/* ==========================================================================
   遇见金陵 · 数字云章 — 深墨鎏金夜展风（玄墨黛绿 · 鎏金细线 · 朱砂落印）
   ========================================================================== */
:root {
  --void: #090E0D;
  --void-soft: #0E1714;
  --lacquer: rgba(16, 25, 22, 0.84);
  --lacquer-solid: #101916;
  --lacquer-elevated: rgba(21, 33, 29, 0.92);
  --ivory: #F2ECE0;
  --ivory-soft: #D6CEBE;
  --celadon-mute: #8BA39B;
  --gold: #D4AF61;
  --gold-bright: #EBD29B;
  --gold-line: rgba(212, 175, 97, 0.24);
  --gold-line-strong: rgba(212, 175, 97, 0.52);
  --cinnabar: #B32824;
  --cinnabar-deep: #871B18;
  --jade: #1D5A50;
  --jade-deep: #133E37;
  --r-sm: 4px;
  --r-md: 6px;
  --r-lg: 8px;
  --shadow-museum: 0 28px 72px rgba(0, 0, 0, 0.55);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  min-height: 100%;
}

body {
  background:
    radial-gradient(ellipse at 18% 12%, rgba(24, 66, 58, 0.36), transparent 46%),
    radial-gradient(ellipse at 82% 18%, rgba(169, 38, 34, 0.12), transparent 38%),
    radial-gradient(ellipse at 65% 58%, rgba(212, 175, 97, 0.08), transparent 48%),
    var(--void);
  color: var(--ivory);
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.serif {
  font-family: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
}

.mono {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

.ico {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

/* ---------------- 顶部展馆导航栏 ---------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 58px;
  background: rgba(9, 14, 13, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--gold-line);
}

.topbar-inner {
  width: 100%;
  height: 100%;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-seal {
  width: 34px;
  height: 34px;
  border-radius: var(--r-sm);
  background: linear-gradient(150deg, #C22F2A, var(--cinnabar-deep));
  border: 1px solid rgba(235, 210, 155, 0.55);
  color: #FBF4E7;
  display: grid;
  place-items: center;
  font-family: "Ma Shan Zheng", "Noto Serif SC", "KaiTi", serif;
  font-size: 16px;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(179, 40, 36, 0.38);
  flex-shrink: 0;
}

.brand-title {
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-weight: 700;
  font-size: 17.5px;
  color: var(--ivory);
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.brand-sub {
  font-size: 12px;
  color: var(--celadon-mute);
  letter-spacing: 0.04em;
  margin-left: 10px;
  padding-left: 10px;
  border-left: 1px solid var(--gold-line);
  white-space: nowrap;
}

@media (max-width: 760px) {
  .brand-sub {
    display: none;
  }
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--r-sm);
  font-size: 12.5px;
  font-weight: 500;
  border: 1px solid var(--gold-line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ivory-soft);
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.16s, color 0.16s, background-color 0.16s;
}

.pill:hover {
  border-color: var(--gold);
  color: var(--gold-bright);
  background: rgba(212, 175, 97, 0.08);
}

.pill-celadon {
  border-color: rgba(29, 90, 80, 0.65);
  background: rgba(29, 90, 80, 0.22);
  color: #CFE3DC;
}

.pill-accent {
  border-color: rgba(179, 40, 36, 0.55);
  background: rgba(179, 40, 36, 0.18);
  color: #F5CFCB;
}

.pill-warn {
  border-color: rgba(212, 175, 97, 0.48);
  background: rgba(212, 175, 97, 0.12);
  color: var(--gold-bright);
}

/* ---------------- 全屏展馆式主画案布局 ---------------- */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 22px 44px;
}

.studio-shell {
  display: grid;
  grid-template-columns: 446px minmax(0, 1fr);
  min-height: calc(100vh - 58px);
}

.atelier-sidebar {
  background: rgba(11, 18, 16, 0.94);
  border-right: 1px solid var(--gold-line);
  padding: 16px 20px 22px;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 58px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(212, 175, 97, 0.3) transparent;
}

.atelier-sidebar::-webkit-scrollbar,
.chat-messages::-webkit-scrollbar,
.modal-card::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

.atelier-sidebar::-webkit-scrollbar-track,
.chat-messages::-webkit-scrollbar-track,
.modal-card::-webkit-scrollbar-track {
  background: transparent;
}

.atelier-sidebar::-webkit-scrollbar-thumb,
.chat-messages::-webkit-scrollbar-thumb,
.modal-card::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 97, 0.28);
  border-radius: 999px;
}

.atelier-sidebar::-webkit-scrollbar-thumb:hover,
.chat-messages::-webkit-scrollbar-thumb:hover,
.modal-card::-webkit-scrollbar-thumb:hover {
  background: rgba(212, 175, 97, 0.52);
}

.museum-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 26px 36px 28px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 44%, rgba(212, 175, 97, 0.13), transparent 52%),
    radial-gradient(circle at 50% 48%, rgba(29, 84, 76, 0.24), transparent 72%);
}

.stage-horizon-svg {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 220px;
  pointer-events: none;
  opacity: 0.42;
}

@media (max-width: 960px) {
  .studio-shell {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .museum-stage {
    order: -1;
    padding: 22px 16px;
  }
  .atelier-sidebar {
    border-right: none;
    border-top: 1px solid var(--gold-line);
    padding: 20px 18px 28px;
  }
}

.atelier-grid {
  display: grid;
  grid-template-columns: minmax(350px, 430px) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

@media (max-width: 1000px) {
  .atelier-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }
}

/* 漆木镶金面板 */
.lacquer-panel {
  position: relative;
  background: var(--lacquer);
  border: 1px solid var(--gold-line);
  border-radius: var(--r-lg);
  padding: 20px 22px;
  box-shadow: var(--shadow-museum);
}

/* 四角鎏金 L 型微角饰 */
.lacquer-panel::before,
.lacquer-panel::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  pointer-events: none;
}

.lacquer-panel::before {
  top: 7px;
  left: 7px;
  border-top: 1px solid var(--gold-line-strong);
  border-left: 1px solid var(--gold-line-strong);
}

.lacquer-panel::after {
  bottom: 7px;
  right: 7px;
  border-bottom: 1px solid var(--gold-line-strong);
  border-right: 1px solid var(--gold-line-strong);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: "Noto Serif SC", serif;
  font-size: 16.5px;
  font-weight: 700;
  color: var(--ivory);
  letter-spacing: 0.05em;
}

/* 三标签页签 */
.desk-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--gold-line);
  margin-bottom: 16px;
  flex-shrink: 0;
}

.desk-tab {
  position: relative;
  background: transparent;
  border: none;
  padding: 7px 4px 10px;
  font-family: "Noto Serif SC", serif;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--celadon-mute);
  cursor: pointer;
  transition: color 0.16s;
  white-space: nowrap;
}

.desk-tab:hover {
  color: var(--ivory-soft);
}

.desk-tab.active {
  color: var(--gold-bright);
}

.desk-tab.active::after {
  content: "";
  position: absolute;
  left: 14%;
  right: 14%;
  bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.block-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--gold);
  margin-bottom: 8px;
}

.block-group + .block-group {
  margin-top: 16px;
}

/* 诗意底线输入框（告别白色方块表单感） */
input[type="text"],
input[type="password"],
input[type="number"],
textarea,
select {
  width: 100%;
  background: rgba(8, 13, 12, 0.65);
  border: 1px solid rgba(212, 175, 97, 0.22);
  border-radius: var(--r-sm);
  color: var(--ivory);
  padding: 9px 11px;
  font-family: inherit;
  font-size: 14px;
  transition: border-color 0.16s, background-color 0.16s;
}

input.ink-underline {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--gold-line-strong);
  border-radius: 0;
  padding: 7px 2px;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--gold);
  background: rgba(12, 19, 17, 0.88);
}

input.ink-underline:focus {
  background: transparent;
  border-bottom-color: var(--gold-bright);
}

textarea.poem-area {
  min-height: 82px;
  resize: vertical;
  line-height: 1.72;
}

/* 金陵六景锦囊标签 */
.capsule-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.capsule-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--gold-line);
  border-radius: var(--r-sm);
  padding: 5px 11px;
  font-size: 12.5px;
  color: var(--ivory-soft);
  cursor: pointer;
  transition: all 0.15s ease;
}

.capsule-btn:hover {
  border-color: var(--gold);
  color: var(--gold-bright);
}

.capsule-btn.active {
  background: rgba(212, 175, 97, 0.16);
  border-color: var(--gold);
  color: var(--gold-bright);
}

/* 矿物点彩画风单行选择器 */
.preset-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

@media (max-width: 520px) {
  .preset-grid {
    grid-template-columns: 1fr;
  }
}

.preset-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border-radius: var(--r-sm);
  border: 1px solid var(--gold-line);
  background: rgba(10, 16, 14, 0.72);
  color: var(--ivory-soft);
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.preset-card:hover {
  border-color: var(--gold-line-strong);
}

.preset-card.active {
  border-color: var(--gold);
  background: rgba(29, 90, 80, 0.25);
  color: var(--gold-bright);
}

.mineral-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.preset-name {
  font-family: "Noto Serif SC", serif;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

/* 四步转译笺 */
.breakdown-card {
  margin-top: 12px;
  padding: 12px;
  border-radius: var(--r-sm);
  background: rgba(12, 20, 18, 0.85);
  border: 1px dashed var(--gold-line-strong);
}

.breakdown-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.breakdown-item {
  font-size: 12px;
  color: var(--ivory-soft);
  background: rgba(255, 255, 255, 0.03);
  padding: 5px 8px;
  border-radius: 3px;
}

.breakdown-item strong {
  color: var(--gold);
}

/* 按钮体系 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 16px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.16s, background-color 0.16s, box-shadow 0.16s, opacity 0.16s;
  text-decoration: none;
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-cinnabar {
  background: linear-gradient(145deg, #BE2D28, var(--cinnabar-deep));
  border-color: rgba(235, 210, 155, 0.45);
  color: #FBF4E7;
  box-shadow: 0 8px 22px rgba(179, 40, 36, 0.34);
}

.btn-cinnabar:hover:not(:disabled) {
  box-shadow: 0 10px 28px rgba(179, 40, 36, 0.48);
  border-color: var(--gold-bright);
}

.btn-celadon {
  background: linear-gradient(145deg, #21665B, var(--jade-deep));
  border-color: rgba(212, 175, 97, 0.38);
  color: #F4EFE4;
  box-shadow: 0 6px 18px rgba(19, 62, 55, 0.38);
}

.btn-celadon:hover:not(:disabled) {
  border-color: var(--gold);
}

.btn-gold {
  background: linear-gradient(145deg, #C99D4A, #946D24);
  border-color: rgba(255, 240, 204, 0.35);
  color: #16120B;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--gold-line);
  color: var(--ivory-soft);
}

.btn-ghost:hover:not(:disabled) {
  border-color: var(--gold);
  color: var(--gold-bright);
}

.btn-sm {
  padding: 5px 11px;
  font-size: 12px;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

/* 历史画稿缩略条 */
.history-strip {
  display: flex;
  gap: 9px;
  overflow-x: auto;
  padding-top: 4px;
}

.history-thumb {
  width: 60px;
  height: 60px;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--gold-line);
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
  background: #0B1110;
  transition: transform 0.15s, border-color 0.15s;
}

.history-thumb:hover {
  transform: translateY(-2px);
}

.history-thumb.active {
  border-color: var(--gold-bright);
  box-shadow: 0 0 0 1px var(--gold);
}

.history-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 分段极简选择器 */
.seg-group {
  display: flex;
  background: rgba(8, 13, 12, 0.72);
  border: 1px solid var(--gold-line);
  border-radius: var(--r-sm);
  padding: 2px;
  gap: 2px;
}

.seg-btn {
  flex: 1;
  padding: 5px 7px;
  border-radius: 3px;
  border: none;
  background: transparent;
  font-size: 12px;
  font-weight: 500;
  color: var(--celadon-mute);
  cursor: pointer;
  transition: all 0.14s ease;
  white-space: nowrap;
}

.seg-btn.active {
  background: rgba(212, 175, 97, 0.22);
  color: #F7E8C6;
  box-shadow: inset 0 0 0 1px rgba(212, 175, 97, 0.65);
}

.seal-controls-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

@media (max-width: 520px) {
  .seal-controls-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------------- 右侧展馆聚光主画台 ---------------- */
.showcase-col {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.easel-stage-row {
  position: relative;
  z-index: 2;
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 16px;
}

.easel-motto {
  writing-mode: vertical-rl;
  letter-spacing: 0.34em;
  font-family: "Noto Serif SC", serif;
  font-size: 12px;
  color: rgba(212, 175, 97, 0.62);
  padding-top: 14px;
  user-select: none;
}

@media (max-width: 1160px) {
  .easel-motto {
    display: none;
  }
}

.canvas-stage {
  position: relative;
  width: min(64vh, 580px, 92vw);
  aspect-ratio: 1 / 1;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--gold-line-strong);
  box-shadow:
    0 0 72px rgba(212, 175, 97, 0.14),
    0 28px 72px rgba(0, 0, 0, 0.68);
}

.canvas-stage canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.canvas-overlay-fx {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.easel-actions {
  position: relative;
  z-index: 2;
  width: min(64vh, 580px, 92vw);
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 12px;
  margin-top: 18px;
}

@media (max-width: 520px) {
  .easel-actions {
    grid-template-columns: 1fr;
  }
}

.easel-caption {
  position: relative;
  z-index: 2;
  margin-top: 10px;
  font-size: 12px;
  color: var(--celadon-mute);
  text-align: center;
}

@keyframes stampImpact {
  0% { transform: scale(1.035); }
  35% { transform: scale(0.978); }
  70% { transform: scale(1.01); }
  100% { transform: scale(1); }
}

.canvas-stage.stamping {
  animation: stampImpact 0.54s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes inkRing {
  0% {
    opacity: 0.9;
    transform: translate(-50%, -50%) scale(0.2);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(2.3);
  }
}

.stamp-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  border: 3px solid rgba(198, 53, 46, 0.85);
  box-shadow: 0 0 28px rgba(212, 175, 97, 0.55);
  pointer-events: none;
  animation: inkRing 0.85s ease-out forwards;
}

/* ---------------- 弹窗与提示 ---------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(5, 8, 7, 0.78);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop.open {
  display: flex;
}

.modal-card {
  position: relative;
  background: var(--lacquer-solid);
  color: var(--ivory);
  border: 1px solid var(--gold-line-strong);
  border-radius: var(--r-lg);
  max-width: 480px;
  width: 100%;
  padding: 24px;
  box-shadow: 0 32px 84px rgba(0, 0, 0, 0.65);
  max-height: 92vh;
  overflow-y: auto;
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  z-index: 100;
  background: rgba(16, 25, 22, 0.96);
  border: 1px solid var(--gold-line-strong);
  color: var(--gold-bright);
  padding: 9px 20px;
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s, transform 0.22s;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------------- 云上赏金陵夜博展厅 (/gallery) ---------------- */
.gallery-layout {
  max-width: 1460px;
  margin: 0 auto;
  padding: 22px 22px 64px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.gallery-layout.with-guide {
  grid-template-columns: 320px minmax(0, 1fr);
}

@media (max-width: 980px) {
  .gallery-layout.with-guide {
    grid-template-columns: 1fr;
  }
}

.guide-sidebar {
  background: var(--lacquer);
  border: 1px solid var(--gold-line-strong);
  border-radius: var(--r-lg);
  padding: 20px;
  position: sticky;
  top: 78px;
}

.guide-step {
  border-left: 2px solid var(--gold);
  padding-left: 12px;
  margin-top: 13px;
}

.guide-step h4 {
  font-family: "Noto Serif SC", serif;
  font-size: 13.5px;
  color: var(--gold-bright);
}

.guide-step p {
  font-size: 12px;
  color: var(--celadon-mute);
}

.passcode-box {
  margin-top: 18px;
  padding: 13px;
  border-radius: var(--r-sm);
  background: rgba(179, 40, 36, 0.2);
  border: 1px solid rgba(198, 53, 46, 0.55);
  text-align: center;
}

.passcode-digits {
  font-family: "JetBrains Mono", monospace;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: #FFE7B8;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(264px, 1fr));
  gap: 20px;
}

@keyframes cardDropIn {
  0% {
    opacity: 0;
    transform: scale(1.05) translateY(-14px);
  }
  65% {
    opacity: 1;
    transform: scale(0.99) translateY(2px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.work-card {
  background: var(--lacquer);
  border: 1px solid var(--gold-line);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.work-card:hover {
  transform: translateY(-3px);
  border-color: var(--gold);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.55);
}

.work-card.new-arrival {
  animation: cardDropIn 0.65s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 0 0 1px var(--cinnabar), 0 18px 40px rgba(0, 0, 0, 0.55);
}

.work-card.featured {
  border-color: var(--gold-bright);
  box-shadow: 0 12px 30px rgba(212, 175, 97, 0.16);
}

.work-img-wrap {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #080D0C;
}

.work-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.work-badge-featured {
  position: absolute;
  top: 10px;
  left: 10px;
  background: linear-gradient(135deg, #DFBD72, #A8812D);
  color: #161107;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 3px;
}

.work-meta {
  padding: 12px 14px 14px;
}

.work-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.work-seal-name {
  font-family: "Noto Serif SC", serif;
  font-weight: 700;
  font-size: 16.5px;
  color: var(--ivory);
}

.work-author {
  font-size: 12px;
  color: var(--celadon-mute);
  margin-top: 3px;
}

.work-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.work-tag {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(212, 175, 97, 0.18);
  color: var(--ivory-soft);
}

.like-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--r-sm);
  border: 1px solid var(--gold-line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--gold-bright);
  font-size: 12px;
  cursor: pointer;
}

.like-btn.liked {
  background: rgba(179, 40, 36, 0.28);
  border-color: #D84D47;
  color: #FFDCD9;
}

/* ---------------- 主讲控场台 (/admin) ---------------- */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.metric-card {
  background: var(--lacquer);
  border: 1px solid var(--gold-line);
  border-radius: var(--r-md);
  padding: 15px 16px;
}

.metric-label {
  font-size: 12px;
  color: var(--celadon-mute);
}

.metric-value {
  font-family: "JetBrains Mono", monospace;
  font-size: 27px;
  font-weight: 700;
  color: var(--gold-bright);
  margin-top: 4px;
}

.controls-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 560px) {
  .controls-grid {
    grid-template-columns: 1fr;
  }
}

.table-wrap {
  overflow-x: auto;
}

table.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

table.admin-table th,
table.admin-table td {
  padding: 10px 10px;
  border-bottom: 1px solid var(--gold-line);
  text-align: left;
  vertical-align: middle;
}

table.admin-table th {
  font-size: 11.5px;
  color: var(--gold);
  letter-spacing: 0.05em;
}


/* ---------------- 四段式指令拼装台与 DeepSeek Harness ---------------- */
.slot-card {
  background: rgba(8, 13, 12, 0.56);
  border: 1px solid var(--gold-line);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  display: grid;
  gap: 9px;
}

.slot-row {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.slot-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ivory-soft);
}

.slot-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-subject { background: #D4AF61; }
.dot-lighting { background: #4DA899; }
.dot-style { background: #C84D47; }
.dot-guard { background: #D6CEBE; }

.guard-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.guard-chip {
  font-size: 11.5px;
  padding: 3px 9px;
  border-radius: 3px;
  border: 1px solid var(--gold-line);
  background: rgba(255, 255, 255, 0.02);
  color: var(--celadon-mute);
  cursor: pointer;
}

.guard-chip.active {
  border-color: rgba(212, 175, 97, 0.58);
  background: rgba(212, 175, 97, 0.14);
  color: var(--gold-bright);
}

.live-prompt-box {
  background: rgba(7, 12, 11, 0.85);
  border: 1px solid rgba(212, 175, 97, 0.28);
  border-radius: var(--r-sm);
  padding: 10px 11px;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--ivory-soft);
}

.lp-subject { color: #EBD29B; }
.lp-lighting { color: #7ED4C5; }
.lp-style { color: #F09C97; }
.lp-guard { color: #B9C7C1; }

@keyframes promptFlash {
  0% { box-shadow: 0 0 0 2px rgba(212, 175, 97, 0.7); }
  100% { box-shadow: none; }
}

.live-prompt-box.flash {
  animation: promptFlash 0.7s ease-out;
}

.tweak-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tweak-chip {
  font-size: 11.5px;
  padding: 3px 9px;
  border-radius: 3px;
  border: 1px solid rgba(77, 168, 153, 0.35);
  background: rgba(29, 84, 76, 0.16);
  color: #BEE3DA;
  cursor: pointer;
  transition: all 0.14s;
}

.tweak-chip:hover {
  border-color: #7ED4C5;
  background: rgba(29, 84, 76, 0.32);
}

.harness-panel {
  background: rgba(13, 22, 20, 0.92);
  border: 1px solid var(--gold-line-strong);
  border-radius: var(--r-sm);
  padding: 12px;
}

.harness-score-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.harness-note {
  font-size: 12px;
  color: var(--ivory-soft);
  line-height: 1.55;
}

.harness-trace {
  margin-top: 8px;
  font-size: 11.5px;
  color: var(--celadon-mute);
}

.harness-trace summary {
  cursor: pointer;
  color: var(--gold);
  user-select: none;
}

.trace-list {
  margin-top: 6px;
  display: grid;
  gap: 5px;
}

.trace-item {
  background: rgba(255, 255, 255, 0.03);
  border-left: 2px solid var(--gold);
  padding: 4px 8px;
}

/* 右侧画台对比上一版视图 */
.compare-grid {
  position: relative;
  z-index: 2;
  width: min(76vh, 720px, 94vw);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 720px) {
  .compare-grid {
    grid-template-columns: 1fr;
  }
}

.compare-card {
  background: var(--lacquer);
  border: 1px solid var(--gold-line-strong);
  border-radius: var(--r-md);
  padding: 12px;
}

.compare-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--r-sm);
  display: block;
}

.compare-label {
  font-family: "Noto Serif SC", serif;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--gold-bright);
  margin-bottom: 8px;
}

.compare-prompt {
  margin-top: 8px;
  font-size: 11.5px;
  color: var(--celadon-mute);
  line-height: 1.5;
}

/* 避坑反差弹窗 + 展厅配方卡片 */
.contrast-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 640px) {
  .contrast-grid {
    grid-template-columns: 1fr;
  }
}

.contrast-box {
  background: rgba(8, 13, 12, 0.72);
  border: 1px solid var(--gold-line);
  border-radius: var(--r-sm);
  padding: 12px;
}

.contrast-box.bad {
  border-color: rgba(179, 40, 36, 0.45);
}

.contrast-box.good {
  border-color: rgba(77, 168, 153, 0.55);
}

.contrast-box img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 8px;
}

.recipe-grid {
  display: grid;
  gap: 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--gold-line);
  padding: 10px;
  border-radius: 4px;
  font-size: 12px;
  line-height: 1.55;
}


/* ---------------- DeepSeek Harness 对话框 (.chat-shell) ---------------- */
.chat-shell {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 148px);
  min-height: 460px;
}

@media (max-width: 960px) {
  .chat-shell {
    height: 520px;
  }
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding-right: 4px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-msg {
  max-width: 94%;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  font-size: 13px;
  line-height: 1.62;
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-msg.user {
  align-self: flex-end;
  background: rgba(29, 90, 80, 0.34);
  border: 1px solid rgba(212, 175, 97, 0.38);
  color: var(--ivory);
}

.chat-msg.assistant {
  align-self: flex-start;
  width: 100%;
  background: rgba(14, 22, 19, 0.92);
  border: 1px solid var(--gold-line);
  border-left: 2px solid var(--gold);
  color: var(--ivory-soft);
}

.chat-msg-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
  font-size: 11.5px;
  color: var(--gold-bright);
}

.chat-trace {
  margin-top: 8px;
  font-size: 11.5px;
  color: var(--celadon-mute);
}

.chat-trace summary {
  cursor: pointer;
  color: var(--gold);
  user-select: none;
}

.chat-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.chat-sync-tag {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  color: #7ED4C5;
  border: 1px solid rgba(77, 168, 153, 0.4);
  background: rgba(29, 84, 76, 0.22);
  padding: 2px 7px;
  border-radius: 3px;
}

.chat-quick-chip {
  font-size: 11.5px;
  padding: 4px 9px;
  border-radius: 3px;
  border: 1px solid var(--gold-line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ivory-soft);
  cursor: pointer;
  transition: all 0.14s;
}

.chat-quick-chip:hover {
  border-color: var(--gold);
  color: var(--gold-bright);
}

.chat-composer {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--gold-line);
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

.chat-composer textarea {
  min-height: 62px;
  max-height: 110px;
  resize: none;
  font-size: 13px;
  line-height: 1.55;
}


/* ---------------- DeepSeek Harness A/B 对照实验展示台 ---------------- */
.ab-stage-wrap {
  position: relative;
  z-index: 2;
  width: min(84vh, 780px, 95vw);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ab-stage-wrap .compare-grid {
  width: 100%;
}

.ab-header-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  background: var(--lacquer);
  border: 1px solid var(--gold-line-strong);
  border-radius: var(--r-md);
  padding: 10px 14px;
}

.ab-header-title {
  font-family: "Noto Serif SC", serif;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--gold-bright);
}

.ab-header-sub {
  font-size: 12px;
  color: var(--celadon-mute);
  margin-top: 2px;
}

.ab-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.ab-card-head .compare-label {
  margin-bottom: 0;
}

.ab-diff-pill {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 3px;
  border: 1px solid rgba(212, 175, 97, 0.48);
  background: rgba(212, 175, 97, 0.14);
  color: var(--gold-bright);
  white-space: nowrap;
}

.ab-choose-btn {
  width: 100%;
  margin-top: 10px;
}

.ab-summary-plaque {
  background: rgba(14, 24, 21, 0.94);
  border: 1px solid var(--gold-line-strong);
  border-left: 3px solid var(--gold);
  border-radius: var(--r-sm);
  padding: 10px 14px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ivory-soft);
}

.ab-progress-list {
  margin-top: 8px;
  display: grid;
  gap: 5px;
  padding: 8px 10px;
  border-radius: 4px;
  background: rgba(8, 13, 12, 0.72);
  border: 1px solid var(--gold-line);
}

.ab-step-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11.5px;
  color: var(--celadon-mute);
}

.ab-step-row.running {
  color: var(--gold-bright);
}

.ab-step-row.done {
  color: #7ED4C5;
}

.ab-step-row.error {
  color: #F09C97;
}

/* ==========================================================================
   随堂任务广播条 · 金陵文脉品读笺 · 助教复盘 · 三合一馆藏珍藏弹窗
   ========================================================================== */
.classroom-task-bar {
  height: 42px;
  background: linear-gradient(
    90deg,
    rgba(16, 36, 31, 0.96) 0%,
    rgba(12, 21, 19, 0.97) 52%,
    rgba(24, 34, 24, 0.96) 100%
  );
  border-bottom: 1px solid rgba(212, 175, 97, 0.36);
  position: relative;
  z-index: 45;
}

.classroom-task-inner {
  width: 100%;
  height: 100%;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.classroom-task-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.task-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: 3px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  background: rgba(212, 175, 97, 0.16);
  border: 1px solid rgba(212, 175, 97, 0.55);
  color: var(--gold-bright);
  flex-shrink: 0;
}

.task-live-badge .ico {
  width: 13.5px;
  height: 13.5px;
  color: var(--gold);
}

.task-bar-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ivory);
  letter-spacing: 0.04em;
  white-space: nowrap;
  flex-shrink: 0;
}

.task-bar-sep {
  color: var(--gold);
  opacity: 0.65;
  flex-shrink: 0;
}

.task-bar-desc {
  font-size: 12.5px;
  color: var(--ivory-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.task-apply-btn {
  padding: 4px 12px;
  font-size: 12px;
  line-height: 1.25;
  flex-shrink: 0;
}

@media (min-width: 961px) {
  .studio-shell {
    height: calc(100vh - 58px);
    min-height: calc(100vh - 58px);
  }

  .atelier-sidebar {
    height: 100%;
    max-height: calc(100vh - 58px);
  }

  .museum-stage {
    height: 100%;
    max-height: calc(100vh - 58px);
    overflow-x: hidden;
    overflow-y: auto;
  }

  body.has-task-bar .studio-shell {
    height: calc(100vh - 100px);
    min-height: calc(100vh - 100px);
  }

  body.has-task-bar .atelier-sidebar {
    max-height: calc(100vh - 100px);
  }

  body.has-task-bar .museum-stage {
    max-height: calc(100vh - 100px);
    padding: 18px 32px 20px;
  }

  body.has-task-bar .chat-shell {
    height: calc(100vh - 190px);
    min-height: 380px;
  }

  body.has-task-bar .canvas-stage,
  body.has-task-bar .easel-actions {
    width: min(58vh, 540px, 92vw);
  }

  body.has-task-bar .easel-actions {
    margin-top: 14px;
  }
}

@media (max-width: 960px) {
  .classroom-task-bar {
    height: auto;
    min-height: 42px;
    padding: 7px 0;
  }

  .classroom-task-inner {
    padding: 0 16px;
    flex-wrap: wrap;
    gap: 8px;
  }

  .task-bar-desc {
    white-space: normal;
  }
}

/* ---------------- 金陵文脉品读笺 (#lore-reading-card) ---------------- */
@keyframes loreRefreshGlow {
  0% {
    border-color: rgba(235, 210, 155, 0.72);
    background-color: rgba(24, 46, 40, 0.94);
  }
  100% {
    border-color: rgba(212, 175, 97, 0.32);
    background-color: rgba(13, 23, 20, 0.9);
  }
}

.lore-reading-card {
  margin-top: 9px;
  padding: 9px 11px;
  border-radius: var(--r-sm);
  background: linear-gradient(155deg, rgba(16, 29, 25, 0.92), rgba(10, 18, 16, 0.92));
  border: 1px solid rgba(212, 175, 97, 0.32);
  border-left: 2.5px solid var(--gold);
}

.lore-reading-card.lore-refresh {
  animation: loreRefreshGlow 0.45s ease-out;
}

.lore-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.lore-poet-line {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--gold-bright);
  letter-spacing: 0.03em;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lore-card-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 7px;
  border-radius: 3px;
  font-size: 11px;
  color: #9ED2C6;
  background: rgba(29, 90, 80, 0.25);
  border: 1px solid rgba(77, 168, 153, 0.34);
  flex-shrink: 0;
}

.lore-card-tag .ico {
  width: 12px;
  height: 12px;
}

.lore-cultural-note {
  font-size: 11.8px;
  line-height: 1.52;
  color: var(--ivory-soft);
  margin-bottom: 5px;
}

.lore-visual-tip {
  font-size: 11.5px;
  line-height: 1.48;
  color: #CFE3DC;
  padding-top: 5px;
  border-top: 1px dashed rgba(212, 175, 97, 0.22);
}

.lore-visual-tip strong {
  color: var(--gold);
  font-weight: 600;
}

/* ---------------- 画台副栏与助教复盘进阶按钮 ---------------- */
.easel-subbar {
  position: relative;
  z-index: 2;
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px 14px;
  flex-wrap: wrap;
}

.easel-subbar-btns {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-critique {
  border-color: rgba(212, 175, 97, 0.42);
  background: rgba(29, 90, 80, 0.22);
  color: var(--gold-bright);
}

.btn-critique:hover:not(:disabled) {
  border-color: var(--gold-bright);
  background: rgba(29, 90, 80, 0.36);
}

.btn-critique.ready {
  border-color: var(--gold);
  background: rgba(212, 175, 97, 0.16);
  box-shadow: 0 0 18px rgba(212, 175, 97, 0.16);
}

/* ---------------- 三合一馆藏珍藏与海报弹窗 (#save-modal) ---------------- */
.save-modal-card {
  max-width: 540px;
  padding: 20px 22px;
}

.export-mode-tabs {
  margin-bottom: 10px;
}

.save-modal-hint {
  font-size: 12px;
  color: var(--celadon-mute);
  line-height: 1.5;
  margin-bottom: 10px;
}

.save-preview-well {
  position: relative;
  min-height: 280px;
  max-height: 56vh;
  background:
    radial-gradient(circle at 50% 42%, rgba(29, 84, 76, 0.22), rgba(7, 11, 10, 0.96));
  border: 1px solid var(--gold-line);
  border-radius: var(--r-md);
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.save-preview-media {
  max-width: 100%;
  max-height: calc(56vh - 22px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
  border: 1px solid rgba(212, 175, 97, 0.36);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.58);
  display: block;
}

.save-export-loading {
  width: 100%;
  max-width: 340px;
  padding: 28px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.save-loading-label {
  font-size: 12.5px;
  color: var(--gold-bright);
}

.save-progress-track {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(212, 175, 97, 0.28);
  overflow: hidden;
}

.save-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #1E6B5E, var(--gold), var(--gold-bright));
  border-radius: 999px;
  transition: width 0.14s ease;
}

.save-modal-actions {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
