/* ============================================================
   漫剧工厂 · 独立站全局样式（古风低饱和：米白 / 黛青 / 暗金）
   纯 CSS，无构建；四页共用
   ============================================================ */

:root {
  --rice: #f4efe6;          /* 米白底 */
  --rice-deep: #ece3d3;     /* 米白深一档 */
  --paper: #fbf8f1;         /* 卡片纸面 */
  --ink: #2b3a42;           /* 黛青近墨 */
  --ink-soft: #53666f;
  --cyan: #264653;          /* 黛青主色 */
  --cyan-deep: #1b333e;
  --gold: #b08d57;          /* 暗金 */
  --gold-soft: #d6bd91;
  --gold-line: rgba(176, 141, 87, 0.35);
  --danger: #a34a3f;
  --shadow: 0 10px 30px rgba(38, 70, 83, 0.10);
  --radius: 14px;
  --font-serif: "Noto Serif SC", "Songti SC", "STSong", serif;
  --font-sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background:
    radial-gradient(1200px 600px at 100% -10%, rgba(176, 141, 87, 0.08), transparent 60%),
    var(--rice);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.65;
  min-height: 100vh;
}

a { color: var(--cyan); text-decoration: none; }
a:hover { color: var(--gold); }

button, input, textarea { font-family: inherit; }

/* ---------------- 顶部导航 ---------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 20px;
  background: rgba(244, 239, 230, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--gold-line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--cyan-deep);
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 2px;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: #f7f1e5;
  background: linear-gradient(135deg, var(--cyan), var(--cyan-deep));
  border: 1px solid var(--gold);
  border-radius: 8px 2px 8px 2px;
  font-size: 15px;
}

.nav {
  display: flex;
  gap: 6px;
  margin-left: auto;
  overflow-x: auto;
  scrollbar-width: thin;
}

.nav-link {
  padding: 7px 13px;
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 14px;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: all 0.18s ease;
}

.nav-link:hover { color: var(--cyan-deep); background: var(--rice-deep); }
.nav-link.active {
  color: #f7f1e5;
  background: var(--cyan);
  border-color: var(--gold);
}

.page {
  width: min(1240px, 100%);
  margin: 0 auto;
  padding: 18px;
}

.page-title {
  margin: 8px 0 4px;
  font-family: var(--font-serif);
  font-size: 24px;
  letter-spacing: 2px;
}

.page-sub { margin: 0 0 18px; color: var(--ink-soft); font-size: 14px; }

.footer {
  padding: 22px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 12px;
  border-top: 1px solid var(--gold-line);
}

/* ---------------- 通用组件 ---------------- */
.card {
  background: var(--paper);
  border: 1px solid var(--gold-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border: 1px solid var(--cyan);
  border-radius: 10px;
  background: var(--cyan);
  color: #f7f1e5;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.16s ease;
}

.btn:hover { background: var(--cyan-deep); border-color: var(--cyan-deep); }
.btn.ghost {
  background: transparent;
  color: var(--cyan);
  border-color: var(--gold);
}
.btn.ghost:hover { background: var(--rice-deep); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.input, .textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--gold-line);
  border-radius: 10px;
  background: #fffdf8;
  color: var(--ink);
  font-size: 14px;
}
.input:focus, .textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(176, 141, 87, 0.15);
}
.textarea { resize: vertical; line-height: 1.6; }

.empty-hint {
  padding: 18px;
  color: var(--ink-soft);
  font-size: 13px;
  text-align: center;
  border: 1px dashed var(--gold-line);
  border-radius: 10px;
}

/* ============================================================
   首页大屏
   ============================================================ */
.hero {
  position: relative;
  min-height: calc(100vh - 62px);
  overflow: hidden;
  border-radius: 0 0 22px 22px;
  background: var(--cyan-deep);
}

/* 视频源用注释占位：替换下方 <source src> 为本地 mp4 */
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
}

.hero-video::after { content: ""; }

.hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px;
  text-align: center;
  color: #f7f1e5;
  background: linear-gradient(180deg, rgba(27, 51, 62, 0.25), rgba(27, 51, 62, 0.72));
}

.hero-avatar {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  border: 2px solid var(--gold-soft);
  background:
    radial-gradient(circle at 50% 35%, #d6bd91, transparent 62%),
    var(--cyan);
  display: grid;
  place-items: center;
  color: #f7f1e5;
  font-family: var(--font-serif);
  font-size: 18px;
  letter-spacing: 3px;
  box-shadow: 0 0 0 6px rgba(214, 189, 145, 0.18);
  /* 沈念定妆照占位：替换为 <img src="..."> 即可 */
}

.hero-copy {
  max-width: 680px;
  font-family: var(--font-serif);
  font-size: 20px;
  letter-spacing: 1px;
}

.typing::after {
  content: "|";
  margin-left: 2px;
  color: var(--gold-soft);
  animation: blink 0.9s step-end infinite;
}
.typing.done::after { display: none; }

@keyframes blink { 50% { opacity: 0; } }

.quick-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
}
.quick-links a {
  padding: 8px 16px;
  border: 1px solid rgba(214, 189, 145, 0.7);
  border-radius: 999px;
  color: #f7f1e5;
  font-size: 14px;
  transition: all 0.16s ease;
}
.quick-links a:hover { background: rgba(214, 189, 145, 0.2); }

/* 3D 数字人对话条 */
.chat-dock {
  position: fixed;
  left: 50%;
  bottom: 16px;
  z-index: 60;
  width: min(760px, calc(100% - 24px));
  transform: translateX(-50%);
  padding: 12px;
  border-radius: 16px;
  background: rgba(251, 248, 241, 0.94);
  border: 1px solid var(--gold);
  box-shadow: 0 18px 50px rgba(27, 51, 62, 0.35);
  backdrop-filter: blur(8px);
}

.chat-dock h3 {
  margin: 0 0 8px;
  font-family: var(--font-serif);
  font-size: 14px;
  letter-spacing: 1px;
  color: var(--cyan-deep);
}

.chat-log {
  max-height: 180px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 4px 2px;
}

.bubble {
  max-width: 82%;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
}
.bubble.user {
  align-self: flex-end;
  background: var(--cyan);
  color: #f7f1e5;
  border-bottom-right-radius: 4px;
}
.bubble.assistant {
  align-self: flex-start;
  background: var(--rice-deep);
  color: var(--ink);
  border-bottom-left-radius: 4px;
}
.bubble.typing { opacity: 0.7; }

.chat-input-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.chat-input-row .input { flex: 1; }

/* ============================================================
   剧本车间
   ============================================================ */
.script-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 16px;
  align-items: start;
}

.idea-box { margin-bottom: 16px; }
.idea-box .textarea { min-height: 110px; margin-bottom: 10px; }
.idea-actions { display: flex; align-items: center; gap: 10px; }
.idea-actions .hint { color: var(--ink-soft); font-size: 12px; }

.asset-panel { position: sticky; top: 78px; }
.asset-panel h3 {
  margin: 0;
  padding: 12px 14px;
  border-bottom: 1px solid var(--gold-line);
  font-family: var(--font-serif);
  font-size: 15px;
  letter-spacing: 1px;
}
.asset-list { max-height: 70vh; overflow-y: auto; padding: 8px; }

.asset-group { margin-bottom: 4px; }
.asset-group > button {
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}
.asset-group > button:hover { background: var(--rice-deep); border-radius: 8px; }
.asset-group .caret { color: var(--gold); transition: transform 0.16s ease; }
.asset-group.open .caret { transform: rotate(90deg); }

.asset-group ul {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0 0 4px 14px;
}
.asset-group.open ul { display: block; }
.asset-group li button {
  display: block;
  width: 100%;
  padding: 6px 10px;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  border-radius: 6px;
}
.asset-group li button:hover { background: var(--rice-deep); color: var(--cyan-deep); }

.reader {
  min-height: 420px;
  padding: 20px;
}
.reader-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--gold-line);
  margin-bottom: 14px;
}
.reader-head .tag {
  padding: 2px 8px;
  border: 1px solid var(--gold);
  border-radius: 999px;
  color: var(--gold);
  font-size: 12px;
}

.md-output { font-size: 14px; line-height: 1.8; }
.md-output h1, .md-output h2, .md-output h3 {
  margin: 0.6em 0 0.35em;
  font-family: var(--font-serif);
  color: var(--cyan-deep);
}
.md-output h1 { font-size: 21px; }
.md-output h2 { font-size: 18px; border-left: 3px solid var(--gold); padding-left: 8px; }
.md-output h3 { font-size: 16px; }
.md-output ul { padding-left: 20px; margin: 0.4em 0; }
.md-output p { margin: 0.5em 0; }
.md-output table { width: 100%; margin: 0.6em 0; border-collapse: collapse; font-size: 13px; }
.md-output td, .md-output th {
  padding: 6px 9px;
  border: 1px solid var(--gold-line);
  text-align: left;
  vertical-align: top;
}
.md-output pre {
  overflow-x: auto;
  padding: 10px;
  border: 1px solid var(--gold-line);
  border-radius: 8px;
  background: var(--rice-deep);
  font-size: 12px;
}

/* ============================================================
   3D 沙盘
   ============================================================ */
.sandbox-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 16px;
  align-items: start;
}

.episode-panel {
  position: sticky;
  top: 78px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: min(720px, calc(100vh - 100px));
  overflow: hidden;
}
.col { display: flex; flex-direction: column; border-right: 1px solid var(--gold-line); }
.col:last-child { border-right: 0; }
.col h4 {
  margin: 0;
  padding: 11px;
  border-bottom: 1px solid var(--gold-line);
  font-family: var(--font-serif);
  font-size: 13px;
  letter-spacing: 1px;
  text-align: center;
  background: var(--rice-deep);
}
.col-scroll { flex: 1; overflow-y: auto; padding: 6px; }
.col-scroll button {
  display: block;
  width: 100%;
  padding: 7px 8px;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  border-radius: 6px;
}
.col-scroll button:hover { background: var(--rice-deep); }
.col-scroll button.active {
  background: var(--cyan);
  color: #f7f1e5;
}

.sandbox-main { min-width: 0; }

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px;
}
.toolbar .spacer { flex: 1; }
.toolbar label { font-size: 12px; color: var(--ink-soft); }
.toolbar .input { width: 260px; }

.cad-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}
.cad-card {
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  padding: 12px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 13px;
  border: 1px dashed var(--gold);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(176,141,87,0.06), transparent),
    var(--paper);
}
.cad-card b { display: block; margin-bottom: 4px; color: var(--ink); font-family: var(--font-serif); }

.viewport-wrap {
  position: relative;
  height: 480px;
  overflow: hidden;
  border: 1px solid var(--gold-line);
  border-radius: 12px;
  background: linear-gradient(180deg, #203b46, #14272f);
}
#viewport3d { width: 100%; height: 100%; }
.viewport-tip {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(20, 39, 47, 0.72);
  color: #e9dfc9;
  font-size: 12px;
  pointer-events: none;
}

/* ============================================================
   剪辑车间
   ============================================================ */
.edit-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 16px;
  align-items: start;
}
.episode-list {
  position: sticky;
  top: 78px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  padding: 8px;
}
.episode-list h4 {
  margin: 4px 8px 8px;
  font-family: var(--font-serif);
  font-size: 14px;
  letter-spacing: 1px;
}
.episode-list button {
  display: block;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  border-radius: 8px;
}
.episode-list button:hover { background: var(--rice-deep); }
.episode-list button.active { background: var(--cyan); color: #f7f1e5; }

.workbench { padding: 16px; }
.dub-box {
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--gold-line);
  border-radius: 12px;
  background: var(--rice-deep);
}
.dub-box h4 {
  margin: 0 0 10px;
  font-family: var(--font-serif);
  font-size: 14px;
  letter-spacing: 1px;
}
.dub-box .textarea { min-height: 72px; margin-bottom: 10px; }
.workbench-title {
  margin: 0 0 12px;
  font-family: var(--font-serif);
  font-size: 17px;
  letter-spacing: 1px;
}

.preview {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  margin-bottom: 16px;
  border: 1px solid var(--gold-line);
  border-radius: 12px;
  background:
    radial-gradient(circle at 50% 45%, rgba(214,189,145,0.18), transparent 40%),
    linear-gradient(180deg, #1b333e, #14272f);
  color: #e9dfc9;
  font-family: var(--font-serif);
  font-size: 16px;
  letter-spacing: 2px;
}

.timeline { padding: 14px; }
.timeline-head {
  display: flex;
  justify-content: space-between;
  color: var(--ink-soft);
  font-size: 12px;
  margin-bottom: 10px;
}
.track {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.track-label {
  width: 56px;
  font-size: 12px;
  color: var(--ink-soft);
  text-align: right;
  flex-shrink: 0;
}
.track-lane {
  position: relative;
  flex: 1;
  height: 34px;
  border-radius: 8px;
  background: repeating-linear-gradient(
    90deg,
    rgba(176, 141, 87, 0.12) 0 1px,
    transparent 1px 24px
  ), var(--rice-deep);
}
.track-clip {
  position: absolute;
  top: 6px;
  height: 22px;
  border-radius: 6px;
  border: 1px solid var(--gold);
  font-size: 11px;
  line-height: 22px;
  color: #f7f1e5;
  padding: 0 8px;
  overflow: hidden;
  white-space: nowrap;
}
.clip-video { left: 4%; width: 42%; background: var(--cyan); }
.clip-audio { left: 28%; width: 35%; background: #52796f; }
.clip-sub { left: 10%; width: 30%; background: var(--gold); }

.workbench-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--gold-line);
  margin-top: 4px;
}

/* ---------------- 响应式 ---------------- */
@media (max-width: 900px) {
  .script-layout, .sandbox-layout, .edit-layout {
    grid-template-columns: 1fr;
  }
  .asset-panel, .episode-panel, .episode-list { position: static; height: auto; max-height: 360px; }
  .cad-grid { grid-template-columns: repeat(2, 1fr); }
  .episode-panel { height: 420px; }
}

@media (max-width: 520px) {
  .topbar { gap: 8px; padding: 8px 10px; }
  .brand { font-size: 16px; }
  .hero-copy { font-size: 17px; }
  .hero-avatar { width: 104px; height: 104px; }
  .cad-grid { grid-template-columns: 1fr 1fr; }
  .toolbar .input { width: 100%; }
  .viewport-wrap { height: 320px; }
}

/* ============================================================
   首页 · 影院大屏放映厅
   ============================================================ */
body.cinema-page {
  min-height: 100vh;
  color: #e7dfd1;
  background:
    radial-gradient(ellipse 90% 48% at 50% -12%, rgba(115, 142, 147, 0.18), transparent 70%),
    radial-gradient(ellipse 50% 36% at 50% 12%, rgba(176, 141, 87, 0.08), transparent 74%),
    linear-gradient(180deg, #101c20 0%, #081114 42%, #060b0d 100%);
}

.cinema-page .topbar {
  background: rgba(8, 17, 20, 0.82);
  border-bottom-color: rgba(214, 189, 145, 0.18);
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.18);
}

.cinema-page .brand {
  color: #eee3ce;
}

.cinema-page .brand-mark {
  color: #f4e9d4;
  background: linear-gradient(145deg, #5e332d, #2c1c1b);
  border-color: rgba(214, 189, 145, 0.62);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.cinema-page .nav-link {
  color: #9daba9;
  border-color: transparent;
}

.cinema-page .nav-link:hover {
  color: #f1e6d1;
  background: rgba(214, 189, 145, 0.08);
}

.cinema-page .nav-link.active {
  color: #faefd9;
  background: rgba(94, 51, 45, 0.76);
  border-color: rgba(214, 189, 145, 0.54);
}

.cinema-main {
  position: relative;
  width: min(1240px, calc(100% - 36px));
  margin: 0 auto;
  padding: clamp(24px, 4.2vw, 54px) 0 34px;
}

.cinema-main::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.16;
  background-image:
    linear-gradient(rgba(214, 189, 145, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(214, 189, 145, 0.06) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, transparent, #000 22%, transparent 88%);
}

.viewer {
  position: relative;
}

.viewer-head {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(320px, 1.7fr) minmax(120px, 0.7fr);
  align-items: center;
  gap: 22px;
  padding: 0 6px 16px;
}

.viewer-brand {
  display: flex;
  align-items: center;
  gap: 11px;
}

.viewer-seal {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  color: #ead4aa;
  font-family: var(--font-serif);
  font-size: 21px;
  background:
    linear-gradient(145deg, rgba(116, 56, 49, 0.92), rgba(45, 29, 27, 0.96));
  border: 1px solid rgba(214, 189, 145, 0.58);
  border-radius: 12px 3px 12px 3px;
  box-shadow:
    inset 0 0 0 3px rgba(10, 16, 17, 0.5),
    0 6px 18px rgba(0, 0, 0, 0.32);
}

.viewer-brand div {
  display: flex;
  flex-direction: column;
}

.viewer-brand strong {
  color: #f1e7d5;
  font-family: var(--font-serif);
  font-size: 18px;
  letter-spacing: 3px;
  line-height: 1.25;
}

.viewer-brand div span {
  margin-top: 3px;
  color: #748581;
  font-size: 8px;
  letter-spacing: 2.6px;
}

.viewer-now {
  min-width: 0;
  text-align: center;
}

.viewer-series {
  color: #9d8b69;
  font-family: var(--font-serif);
  font-size: 12px;
  letter-spacing: 4px;
}

.viewer-now h1 {
  overflow: hidden;
  margin: 3px 0 0;
  color: #f4ebdb;
  font-family: var(--font-serif);
  font-size: clamp(21px, 2.35vw, 31px);
  font-weight: 600;
  letter-spacing: 3px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.viewer-state {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 7px;
  padding: 6px 11px;
  color: #bfcac4;
  font-size: 11px;
  letter-spacing: 1px;
  border: 1px solid rgba(141, 164, 154, 0.22);
  border-radius: 999px;
  background: rgba(18, 35, 37, 0.64);
}

.viewer-state-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #a8b99d;
  box-shadow: 0 0 10px rgba(168, 185, 157, 0.62);
}

.viewer-state.is-pending {
  color: #a79b88;
  border-color: rgba(176, 141, 87, 0.2);
}

.viewer-state.is-pending .viewer-state-dot {
  background: #8e7657;
  box-shadow: none;
}

.cinema-screen-shell {
  position: relative;
  padding: 26px clamp(34px, 5.4vw, 72px) 32px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(214, 189, 145, 0.13), transparent 48%),
    linear-gradient(100deg, #070a0b 0%, #281c19 12%, #10181a 23%, #0a1012 50%, #10181a 77%, #281c19 88%, #070a0b 100%);
  border: 1px solid rgba(214, 189, 145, 0.2);
  border-radius: 20px;
  box-shadow:
    0 32px 90px rgba(0, 0, 0, 0.56),
    0 10px 28px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.cinema-screen-shell::before,
.cinema-screen-shell::after {
  content: "";
  position: absolute;
  top: 15px;
  bottom: 15px;
  z-index: 3;
  width: clamp(14px, 3.2vw, 40px);
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.62), transparent 26%, rgba(255, 255, 255, 0.055) 44%, transparent 58%, rgba(0, 0, 0, 0.46)),
    repeating-linear-gradient(90deg, #381c1c 0 8px, #512925 8px 13px, #2b1718 13px 22px);
  border: 1px solid rgba(214, 189, 145, 0.2);
  border-radius: 7px;
  box-shadow:
    inset 0 0 20px rgba(0, 0, 0, 0.58),
    0 0 24px rgba(0, 0, 0, 0.48);
}

.cinema-screen-shell::before {
  left: 8px;
  transform: perspective(90px) rotateY(6deg);
  transform-origin: left center;
}

.cinema-screen-shell::after {
  right: 8px;
  transform: perspective(90px) rotateY(-6deg);
  transform-origin: right center;
}

.screen-drape {
  position: absolute;
  z-index: 4;
  top: 0;
  left: clamp(32px, 5vw, 68px);
  right: clamp(32px, 5vw, 68px);
  height: 19px;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent),
    repeating-linear-gradient(90deg, #3b1e1d 0 17px, #5a2e29 17px 25px, #2b1718 25px 39px);
  border-bottom: 1px solid rgba(214, 189, 145, 0.38);
  border-radius: 0 0 45% 45% / 0 0 14px 14px;
  box-shadow: 0 7px 19px rgba(0, 0, 0, 0.54);
}

.cinema-screen-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 38%, rgba(81, 108, 110, 0.12), transparent 42%),
    #010203;
  border: 4px solid #17120f;
  border-radius: 3px;
  box-shadow:
    0 0 0 1px rgba(214, 189, 145, 0.62),
    0 0 0 5px rgba(0, 0, 0, 0.34),
    0 18px 50px rgba(0, 0, 0, 0.7),
    inset 0 0 46px rgba(0, 0, 0, 0.88);
}

.cinema-screen-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.18), transparent 8%, transparent 92%, rgba(0, 0, 0, 0.18)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 12%, transparent 82%, rgba(0, 0, 0, 0.18));
  box-shadow: inset 0 0 34px rgba(0, 0, 0, 0.42);
}

.cinema-screen-frame video {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.cinema-screen-frame video[hidden] {
  display: none;
}

.screen-empty {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px;
  text-align: center;
  background:
    radial-gradient(ellipse at 50% 115%, rgba(99, 126, 126, 0.2), transparent 50%),
    radial-gradient(circle at 50% 35%, rgba(176, 141, 87, 0.1), transparent 38%),
    linear-gradient(155deg, #0d181b 0%, #070d0f 56%, #0c1112 100%);
}

.screen-empty[hidden] {
  display: none;
}

.screen-empty::before,
.screen-empty::after {
  content: "";
  position: absolute;
  bottom: 12%;
  width: 38%;
  height: 28%;
  opacity: 0.28;
  border-top: 1px solid rgba(214, 189, 145, 0.34);
  transform: skewY(-8deg);
  pointer-events: none;
}

.screen-empty::before {
  left: 0;
  background: linear-gradient(145deg, transparent 45%, rgba(77, 104, 104, 0.15));
}

.screen-empty::after {
  right: 0;
  background: linear-gradient(215deg, transparent 45%, rgba(77, 104, 104, 0.12));
  transform: skewY(8deg);
}

.empty-emblem {
  display: grid;
  place-items: center;
  width: clamp(46px, 6vw, 68px);
  height: clamp(46px, 6vw, 68px);
  margin-bottom: 14px;
  color: #cfb98c;
  font-family: var(--font-serif);
  font-size: clamp(19px, 2.5vw, 28px);
  border: 1px solid rgba(214, 189, 145, 0.5);
  border-radius: 50%;
  box-shadow:
    0 0 0 6px rgba(214, 189, 145, 0.035),
    0 0 36px rgba(176, 141, 87, 0.11);
}

.empty-kicker {
  margin: 0 0 5px;
  color: #7d8c88;
  font-family: var(--font-serif);
  font-size: clamp(9px, 1.2vw, 13px);
  letter-spacing: 4px;
}

.screen-empty h2 {
  margin: 0;
  color: #d7cbb9;
  font-family: var(--font-serif);
  font-size: clamp(19px, 3.2vw, 37px);
  font-weight: 500;
  letter-spacing: 5px;
}

.empty-episode {
  margin: 7px 0 3px;
  color: #9e8763;
  font-family: var(--font-serif);
  font-size: clamp(12px, 1.7vw, 18px);
  letter-spacing: 2px;
}

.screen-empty small {
  color: #657370;
  font-size: clamp(9px, 1.1vw, 12px);
  letter-spacing: 1px;
}

.screen-play {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 4;
  display: grid;
  place-items: center;
  width: clamp(52px, 5.4vw, 72px);
  height: clamp(52px, 5.4vw, 72px);
  padding: 0;
  color: #f4e7d0;
  font-size: clamp(17px, 2vw, 24px);
  line-height: 1;
  cursor: pointer;
  background: rgba(15, 27, 29, 0.7);
  border: 1px solid rgba(214, 189, 145, 0.68);
  border-radius: 50%;
  box-shadow:
    0 10px 32px rgba(0, 0, 0, 0.42),
    inset 0 0 0 5px rgba(214, 189, 145, 0.055);
  backdrop-filter: blur(8px);
  transform: translate(-50%, -50%);
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.screen-play span {
  margin-left: 3px;
}

.screen-play:hover {
  background: rgba(70, 43, 35, 0.82);
  transform: translate(-50%, -50%) scale(1.04);
}

.screen-play:disabled {
  display: none;
}

.cinema-screen-frame.is-playing .screen-play {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.92);
}

.cinema-screen-frame.is-playing:hover .screen-play {
  opacity: 0.82;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.viewer-controls {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: auto auto minmax(80px, 1fr) auto minmax(58px, 86px) auto auto;
  align-items: center;
  gap: 9px;
  padding: 42px 15px 11px;
  color: #e9e0d2;
  background: linear-gradient(180deg, transparent 0%, rgba(4, 7, 8, 0.5) 33%, rgba(4, 7, 8, 0.94) 100%);
}

.player-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 34px;
  height: 32px;
  padding: 0 7px;
  color: #e8decf;
  font-size: 11px;
  white-space: nowrap;
  cursor: pointer;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.player-button:hover {
  color: #fff6e6;
  background: rgba(214, 189, 145, 0.1);
  border-color: rgba(214, 189, 145, 0.18);
}

.player-button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.play-glyph {
  width: 16px;
  font-size: 12px;
  text-align: center;
}

.icon-button {
  min-width: 32px;
  padding: 0 5px;
}

.icon-button svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.volume-off {
  display: none;
}

.player-button.is-muted .volume-on {
  display: none;
}

.player-button.is-muted .volume-off {
  display: block;
}

.time-display {
  display: flex;
  align-items: center;
  gap: 3px;
  min-width: 71px;
  color: #bcbdb4;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.time-display i {
  color: #6f756f;
  font-style: normal;
}

.viewer-range {
  --range-progress: 0%;
  width: 100%;
  height: 24px;
  margin: 0;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
}

.viewer-range:disabled {
  cursor: not-allowed;
  opacity: 0.28;
}

.viewer-range::-webkit-slider-runnable-track {
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    #c2a372 0 var(--range-progress),
    rgba(231, 223, 209, 0.22) var(--range-progress) 100%
  );
}

.viewer-range::-webkit-slider-thumb {
  width: 13px;
  height: 13px;
  margin-top: -4.5px;
  appearance: none;
  -webkit-appearance: none;
  border: 2px solid #10191b;
  border-radius: 50%;
  background: #e7d4ad;
  box-shadow: 0 0 0 3px rgba(214, 189, 145, 0.13);
}

.viewer-range::-moz-range-track {
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: rgba(231, 223, 209, 0.22);
}

.viewer-range::-moz-range-progress {
  height: 4px;
  border-radius: 999px;
  background: #c2a372;
}

.viewer-range::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border: 2px solid #10191b;
  border-radius: 50%;
  background: #e7d4ad;
}

.volume-range {
  min-width: 54px;
}

.speed-control {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #aeb4ac;
  font-size: 10px;
  white-space: nowrap;
}

.speed-control select {
  height: 28px;
  padding: 0 3px;
  color: #e5dccd;
  font-family: inherit;
  font-size: 10px;
  cursor: pointer;
  background: rgba(16, 28, 30, 0.78);
  border: 1px solid rgba(214, 189, 145, 0.22);
  border-radius: 6px;
  outline: none;
}

.speed-control select:focus {
  border-color: rgba(214, 189, 145, 0.58);
}

.speed-control select:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.speed-control select option {
  color: #e5dccd;
  background: #152124;
}

.cinema-screen-frame:fullscreen {
  width: 100vw;
  height: 100vh;
  aspect-ratio: auto;
  border: 0;
  border-radius: 0;
  background: #000;
}

.cinema-screen-frame:fullscreen .viewer-controls {
  padding-right: clamp(14px, 3vw, 42px);
  padding-left: clamp(14px, 3vw, 42px);
}

.production-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 20px;
  padding: 13px 16px;
  background: rgba(15, 28, 31, 0.76);
  border: 1px solid rgba(214, 189, 145, 0.16);
  border-radius: 13px;
}
.production-run { flex: 0 0 auto; }
.production-steps {
  flex: 1;
  min-width: 0;
  color: #b9bbb2;
  font-size: 12px;
  letter-spacing: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.episode-shelf {
  margin-top: 20px;
  padding: 18px 20px 17px;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.025), transparent 42%),
    rgba(15, 28, 31, 0.76);
  border: 1px solid rgba(214, 189, 145, 0.16);
  border-radius: 15px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.2);
}

.shelf-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  padding: 0 4px;
}

.shelf-kicker {
  display: block;
  margin-bottom: 1px;
  color: #7a8e89;
  font-size: 8px;
  letter-spacing: 2.8px;
}

.shelf-head h2 {
  margin: 0;
  color: #e9dfd0;
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 3px;
}

.shelf-count {
  color: #8d806b;
  font-size: 10px;
  letter-spacing: 2px;
}

.episode-carousel {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.episode-track {
  display: flex;
  flex: 1;
  gap: 9px;
  min-width: 0;
  padding: 3px 2px 9px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
  scrollbar-color: rgba(176, 141, 87, 0.56) rgba(255, 255, 255, 0.035);
  scrollbar-width: thin;
}

.episode-track::-webkit-scrollbar {
  height: 5px;
}

.episode-track::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
}

.episode-track::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(176, 141, 87, 0.56);
}

.episode-card {
  position: relative;
  display: flex;
  flex: 0 0 128px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: 76px;
  padding: 11px 12px 10px;
  overflow: hidden;
  color: #b9bbb2;
  text-align: left;
  cursor: pointer;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.035), transparent 58%),
    rgba(7, 15, 17, 0.58);
  border: 1px solid rgba(214, 189, 145, 0.1);
  border-radius: 9px;
  scroll-snap-align: start;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.episode-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 12px;
  left: 12px;
  height: 1px;
  opacity: 0;
  background: linear-gradient(90deg, transparent, #d6bd91, transparent);
  transition: opacity 0.18s ease;
}

.episode-card:hover {
  color: #eee4d4;
  background:
    linear-gradient(145deg, rgba(214, 189, 145, 0.075), transparent 58%),
    rgba(20, 36, 38, 0.82);
  border-color: rgba(214, 189, 145, 0.27);
  transform: translateY(-1px);
}

.episode-card.is-active {
  color: #f6ead6;
  background:
    linear-gradient(145deg, rgba(118, 59, 51, 0.58), rgba(36, 28, 26, 0.9)),
    #172124;
  border-color: rgba(214, 189, 145, 0.58);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.025),
    0 7px 18px rgba(0, 0, 0, 0.18);
}

.episode-card.is-active::before {
  opacity: 1;
}

.episode-number {
  color: #9b8b72;
  font-size: 9px;
  letter-spacing: 1px;
}

.episode-name {
  display: block;
  width: 100%;
  margin: 2px 0 5px;
  overflow: hidden;
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 1px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.episode-status {
  color: #646e6a;
  font-size: 8px;
  letter-spacing: 1px;
}

.episode-status.is-ready {
  color: #9cac9f;
}

.episode-card.is-active .episode-number,
.episode-card.is-active .episode-status {
  color: #c5ad86;
}

.episode-arrow {
  flex: 0 0 27px;
  align-self: center;
  width: 27px;
  height: 42px;
  padding: 0;
  color: #aa987c;
  font-family: Georgia, serif;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  background: rgba(8, 16, 18, 0.54);
  border: 1px solid rgba(214, 189, 145, 0.13);
  border-radius: 7px;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.episode-arrow:hover {
  color: #f0dfc1;
  background: rgba(77, 47, 39, 0.58);
  border-color: rgba(214, 189, 145, 0.32);
}

.reception {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(440px, 1.12fr);
  gap: 22px;
  align-items: stretch;
  margin-top: 24px;
  padding: 20px;
  background:
    radial-gradient(ellipse at 8% 20%, rgba(103, 136, 136, 0.1), transparent 38%),
    linear-gradient(120deg, rgba(255, 255, 255, 0.025), transparent 48%),
    rgba(16, 30, 33, 0.7);
  border: 1px solid rgba(214, 189, 145, 0.16);
  border-radius: 17px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.23);
}

.reception-intro {
  display: flex;
  align-items: center;
  gap: 15px;
  min-width: 0;
}

.digital-orb {
  position: relative;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  flex: 0 0 auto;
  color: #edddbf;
  font-family: var(--font-serif);
  font-size: 22px;
  background:
    radial-gradient(circle at 36% 28%, rgba(255, 242, 215, 0.43), transparent 17%),
    radial-gradient(circle at 45% 38%, #94745b 0%, #583b35 38%, #20363a 76%, #101d20 100%);
  border: 1px solid rgba(214, 189, 145, 0.44);
  border-radius: 50%;
  box-shadow:
    inset -10px -12px 19px rgba(4, 9, 10, 0.62),
    inset 6px 7px 16px rgba(255, 232, 194, 0.12),
    0 8px 24px rgba(0, 0, 0, 0.34),
    0 0 0 5px rgba(214, 189, 145, 0.035);
  animation: receptionFloat 4.8s ease-in-out infinite;
}

.digital-orb::before,
.digital-orb::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(214, 189, 145, 0.22);
  border-radius: 50%;
  pointer-events: none;
}

.digital-orb::before {
  inset: -7px;
  border-top-color: rgba(214, 189, 145, 0.55);
  transform: rotate(-28deg);
}

.digital-orb::after {
  inset: 7px;
  border-right-color: transparent;
  transform: rotate(34deg);
}

.digital-orb > span {
  position: relative;
  z-index: 2;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.digital-orb i {
  position: absolute;
  right: 9px;
  bottom: 10px;
  z-index: 2;
  width: 8px;
  height: 8px;
  border: 2px solid #1a292c;
  border-radius: 50%;
  background: #aebe9e;
  box-shadow: 0 0 9px rgba(174, 190, 158, 0.7);
}

@keyframes receptionFloat {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-4px) rotate(1deg); }
}

.reception-copy {
  min-width: 0;
}

.reception-kicker {
  display: block;
  margin-bottom: 3px;
  color: #918265;
  font-size: 9px;
  letter-spacing: 2px;
}

.reception-copy h2 {
  overflow: hidden;
  margin: 0 0 4px;
  color: #e6ddce;
  font-family: var(--font-serif);
  font-size: clamp(14px, 1.45vw, 18px);
  font-weight: 500;
  letter-spacing: 0.5px;
  line-height: 1.55;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reception-copy p {
  margin: 0;
  color: #7f8e8a;
  font-size: 11px;
  line-height: 1.55;
}

.online-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  padding: 4px 8px;
  color: #9eac9f;
  font-size: 9px;
  white-space: nowrap;
  border: 1px solid rgba(158, 172, 159, 0.16);
  border-radius: 999px;
}

.online-badge i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #aebe9e;
  box-shadow: 0 0 8px rgba(174, 190, 158, 0.56);
}

.reception-dock {
  min-width: 0;
  padding: 10px;
  background: rgba(6, 13, 15, 0.42);
  border: 1px solid rgba(214, 189, 145, 0.1);
  border-radius: 11px;
}

.reception-log {
  max-height: 92px;
  padding: 1px 2px 7px;
  overflow-y: auto;
  scrollbar-color: rgba(176, 141, 87, 0.38) transparent;
  scrollbar-width: thin;
}

.reception-message {
  display: grid;
  grid-template-columns: 35px minmax(0, 1fr);
  gap: 7px;
  align-items: baseline;
  padding: 4px 5px;
}

.reception-message > span {
  color: #9b8563;
  font-family: var(--font-serif);
  font-size: 10px;
}

.reception-message p {
  margin: 0;
  color: #c4c9c1;
  font-size: 12px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.reception-message.user p {
  color: #e0d8c9;
}

.reception-message.is-pending p {
  color: #7e8a86;
}

.reception-form {
  display: flex;
  gap: 8px;
}

.reception-form input {
  min-width: 0;
  height: 38px;
  flex: 1;
  padding: 0 13px;
  color: #eee5d7;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(214, 189, 145, 0.16);
  border-radius: 8px;
  outline: none;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.reception-form input::placeholder {
  color: #667571;
}

.reception-form input:focus {
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(214, 189, 145, 0.48);
  box-shadow: 0 0 0 3px rgba(214, 189, 145, 0.07);
}

.reception-form input:disabled {
  opacity: 0.58;
}

.reception-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 15px;
  color: #f1e5d1;
  font-size: 11px;
  cursor: pointer;
  background: linear-gradient(145deg, #714239, #4b2b28);
  border: 1px solid rgba(214, 189, 145, 0.32);
  border-radius: 8px;
  transition: filter 0.16s ease, transform 0.16s ease;
}

.reception-form button:hover {
  filter: brightness(1.09);
  transform: translateY(-1px);
}

.reception-form button:disabled {
  opacity: 0.48;
  cursor: wait;
  transform: none;
}

.site-footer {
  padding: 8px 20px 28px;
  color: #566562;
  font-size: 10px;
  letter-spacing: 2px;
  text-align: center;
}

.cinema-page .visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 980px) {
  .reception {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .reception-copy h2 {
    white-space: normal;
  }
}

@media (max-width: 760px) {
  .cinema-main {
    width: min(100% - 20px, 1240px);
    padding-top: 20px;
  }

  .viewer-head {
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 0 2px 13px;
  }

  .viewer-brand {
    grid-column: 1;
  }

  .viewer-now {
    grid-column: 1 / -1;
    grid-row: 2;
    text-align: left;
  }

  .viewer-now h1 {
    font-size: 21px;
  }

  .viewer-state {
    grid-column: 2;
    grid-row: 1;
  }

  .cinema-screen-shell {
    padding: 19px 12px 17px;
    border-radius: 13px;
  }

  .cinema-screen-shell::before,
  .cinema-screen-shell::after {
    top: 10px;
    bottom: 10px;
    width: 7px;
    border-radius: 3px;
  }

  .cinema-screen-shell::before {
    left: 4px;
  }

  .cinema-screen-shell::after {
    right: 4px;
  }

  .screen-drape {
    top: 0;
    left: 10px;
    right: 10px;
    height: 13px;
  }

  .cinema-screen-frame {
    border-width: 2px;
  }

  .viewer-controls {
    grid-template-columns: auto auto minmax(42px, 1fr) auto auto auto;
    grid-template-areas:
      "play time volume mute speed full"
      "progress progress progress progress progress progress";
    gap: 4px;
    padding: 33px 7px 7px;
  }

  #playToggle { grid-area: play; }
  .time-display { grid-area: time; }
  .progress-range { grid-area: progress; }
  #muteToggle { grid-area: mute; }
  .volume-range { grid-area: volume; }
  .speed-control { grid-area: speed; }
  #fullscreenToggle { grid-area: full; }

  .control-label,
  .speed-control .control-label {
    display: none;
  }

  .player-button {
    min-width: 29px;
    height: 27px;
    padding: 0 3px;
  }

  .icon-button svg {
    width: 16px;
    height: 16px;
  }

  .time-display {
    min-width: 63px;
    gap: 2px;
    font-size: 9px;
  }

  .volume-range {
    min-width: 35px;
  }

  .speed-control select {
    height: 25px;
    padding: 0 1px;
    font-size: 9px;
  }

  .viewer-range {
    height: 19px;
  }

  .viewer-range::-webkit-slider-thumb {
    width: 11px;
    height: 11px;
    margin-top: -3.5px;
  }

  .episode-shelf {
    margin-top: 13px;
    padding: 14px 11px 12px;
  }

  .episode-carousel {
    gap: 5px;
  }

  .episode-arrow {
    flex-basis: 23px;
    width: 23px;
    height: 38px;
    font-size: 20px;
  }

  .episode-card {
    flex-basis: 112px;
    min-height: 70px;
    padding: 9px 10px;
  }

  .episode-name {
    font-size: 13px;
  }

  .reception {
    margin-top: 15px;
    padding: 15px;
  }
}

@media (max-width: 520px) {
  .cinema-page .topbar {
    gap: 6px;
    padding: 8px 9px;
  }

  .cinema-page .brand {
    font-size: 15px;
    letter-spacing: 1px;
  }

  .cinema-page .brand-mark {
    width: 27px;
    height: 27px;
  }

  .cinema-page .nav {
    gap: 2px;
  }

  .cinema-page .nav-link {
    padding: 6px 8px;
    font-size: 11px;
  }

  .viewer-seal {
    width: 35px;
    height: 35px;
    font-size: 18px;
  }

  .viewer-brand strong {
    font-size: 15px;
  }

  .viewer-brand div span {
    font-size: 7px;
    letter-spacing: 1.8px;
  }

  .viewer-series {
    font-size: 9px;
    letter-spacing: 2.5px;
  }

  .viewer-now h1 {
    margin-top: 2px;
    font-size: 18px;
    letter-spacing: 1.5px;
  }

  .viewer-state {
    gap: 5px;
    padding: 4px 7px;
    font-size: 9px;
  }

  .screen-empty {
    padding: 10px;
  }

  .empty-emblem {
    margin-bottom: 7px;
  }

  .screen-empty h2 {
    letter-spacing: 2px;
  }

  .empty-episode {
    margin-top: 3px;
    letter-spacing: 1px;
  }

  .screen-empty small {
    display: none;
  }

  .viewer-controls {
    padding-top: 27px;
  }

  .episode-arrow {
    display: none;
  }

  .reception {
    padding: 13px;
  }

  .reception-intro {
    align-items: flex-start;
    gap: 11px;
  }

  .digital-orb {
    width: 51px;
    height: 51px;
    font-size: 18px;
  }

  .reception-copy h2 {
    font-size: 14px;
  }

  .reception-copy p {
    font-size: 10px;
  }

  .online-badge {
    display: none;
  }

  .reception-form input {
    padding: 0 10px;
  }

  .reception-form button {
    padding: 0 11px;
  }

  .site-footer {
    padding-bottom: 22px;
    letter-spacing: 1px;
  }
}

/* ============================================================
   工业级改造：Toast / Loading / 动画增强
   ============================================================ */

/* 页面内容淡入 */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.page,
.cinema-main,
.cad-layout {
  animation: fadeIn 0.42s ease both;
}

/* 卡片 hover + 按钮按下反馈 */
.card {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 42px rgba(38, 70, 83, 0.13);
  border-color: rgba(176, 141, 87, 0.5);
}
.btn:active:not(:disabled) {
  transform: translateY(1px) scale(0.98);
}

/* 通用 spinner（按钮 + loading 遮罩共用） */
@keyframes spin {
  to { transform: rotate(360deg); }
}
.btn.is-loading::before {
  content: "";
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* ---------------- Toast ---------------- */
.toast-container {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 220px;
  max-width: 360px;
  padding: 11px 14px;
  border-radius: 12px;
  color: #f7f1e5;
  font-size: 13px;
  line-height: 1.5;
  background: var(--cyan-deep);
  border: 1px solid rgba(214, 189, 145, 0.35);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.28);
  pointer-events: auto;
  animation: toastIn 0.28s ease both;
}
.toast-success { background: #3d6b57; }
.toast-error { background: #7d3b34; }
.toast-info { background: var(--cyan); }
.toast-icon {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  border-radius: 50%;
  font-size: 12px;
  line-height: 1;
  background: rgba(255, 255, 255, 0.16);
}
.toast-text { flex: 1; overflow-wrap: anywhere; }
.toast-leave { animation: toastOut 0.24s ease both; }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
@keyframes toastOut {
  from { opacity: 1; }
  to { opacity: 0; transform: translateY(8px) scale(0.98); }
}

/* ---------------- 全局 Loading 遮罩 ---------------- */
.app-loading-mask {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: rgba(10, 20, 23, 0.52);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}
.app-loading-mask.is-visible {
  opacity: 1;
  pointer-events: auto;
}
.app-loading-mask[hidden] {
  display: none;
}
.app-loading-spinner {
  width: 42px;
  height: 42px;
  border: 3px solid rgba(214, 189, 145, 0.3);
  border-top-color: #d6bd91;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.app-loading-text {
  color: #f1e7d5;
  font-family: var(--font-serif);
  font-size: 14px;
  letter-spacing: 2px;
}
