.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}

.brand-logo,
.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  flex: none;
}

.brand-logo {
  object-fit: cover;
  background: #fff;
  border: 1px solid var(--line);
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-text strong {
  font-size: 1.05rem;
  line-height: 1.2;
}

.brand-text small {
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.credit-pill {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.92rem;
}

.credit-pill b {
  color: var(--accent);
  font-size: 1.05rem;
}

.page-main {
  padding-top: 24px;
  padding-bottom: 40px;
}

.announce-card {
  margin-bottom: 20px;
}

.announce-item + .announce-item {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.announce-item.level-important {
  background: #fff8ef;
  border: 1px solid #f3dfc0;
  border-radius: 12px;
  padding: 12px 14px;
}

.announce-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.announce-top h2 {
  font-size: 1rem;
  margin: 0;
}

.announce-body {
  margin-top: 6px;
  color: #33404c;
}

.announce-item time {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.8rem;
}

.pill-warn {
  display: inline-block;
  margin-left: 6px;
  background: #f59e0b;
  color: #fff;
  border-radius: 999px;
  font-size: 0.72rem;
  padding: 1px 8px;
  vertical-align: 1px;
}

.workspace {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 16px;
  align-items: start;
}

.workspace-side,
.workspace-main {
  display: grid;
  gap: 16px;
}

.dropzone {
  position: relative;
  border: 1.5px dashed #c9d0da;
  border-radius: 14px;
  background: #fbfcfd;
  min-height: 148px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 18px;
  gap: 6px;
}

.dropzone input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.dropzone span,
.hint {
  color: var(--muted);
  font-size: 0.86rem;
}

.dropzone.is-dragover {
  border-color: var(--accent);
  background: #fff6f4;
}

.preset-row {
  display: flex;
  gap: 8px;
}

.preset-row .active {
  background: #fff1ef;
  border-color: #e23d2b;
  color: #a8281c;
}

.preview-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.preview-meta {
  color: var(--ink);
  font-weight: 600;
}

.preview-stage {
  background: #f7f8fa;
  border: 1px solid var(--line);
  border-radius: 14px;
  min-height: 320px;
  overflow: auto;
}

.empty-preview {
  min-height: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  text-align: center;
  padding: 24px;
}

.preview-canvases {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.preview-canvases.compare {
  grid-template-columns: 1fr 1fr;
}

.canvas-wrap {
  overflow: auto;
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--line);
}

.canvas-wrap canvas,
.canvas-wrap img {
  display: block;
  max-width: 100%;
  height: auto;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  padding: 22px 0 32px;
  font-size: 0.9rem;
}

.footer-note {
  margin-top: 8px;
}

.swatch {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1px solid rgba(31, 41, 51, 0.15);
  vertical-align: -3px;
}

.form-label .hint {
  font-weight: 400;
  margin-left: 4px;
}

.form-range:disabled {
  opacity: 0.45;
}

.form-check-input:disabled + .form-check-label {
  opacity: 0.55;
}

.toast-host {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 1080;
  display: grid;
  gap: 8px;
}

.toast-note {
  background: #1f2933;
  color: #fff;
  border-radius: 12px;
  padding: 10px 14px;
  box-shadow: var(--shadow);
  max-width: 280px;
}

@media (max-width: 991px) {
  .workspace,
  .preview-canvases.compare {
    grid-template-columns: 1fr;
  }
  .brand-text small {
    display: none;
  }
}

@media (max-width: 576px) {
  .header-inner {
    flex-wrap: wrap;
  }
  .header-actions {
    width: 100%;
    justify-content: space-between;
  }
}
