/* ==========================================================================
   CloudyBill荧幕档案 · CINEMA ARCHIVE
   设计语言：电影档案馆 / 深墨底色 + 暖金 + 宋体标题 + 胶片颗粒
   ========================================================================== */

:root {
  --bg: #0a0a0c;
  --bg-soft: #0e0e11;
  --bg-card: #131317;
  --ink: #f3eee4;
  --ink-2: #a8a29a;
  --ink-3: #6f6a63;
  --gold: #e2b264;
  --gold-strong: #f0c47e;
  --gold-soft: rgba(226, 178, 100, 0.14);
  --line: rgba(243, 238, 228, 0.1);
  --line-2: rgba(243, 238, 228, 0.2);
  --danger: #e06c5a;
  --on-media: #f3eee4;
  --media-gold: #e8c07a;
  --on-gold: #0a0a0c;
  color-scheme: dark;
  --serif: "Songti SC", "Noto Serif SC", "STSong", "Source Han Serif SC", "SimSun", Georgia, serif;
  --sans: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", "JetBrains Mono", "Cascadia Mono", Consolas, "Liberation Mono", monospace;
  --topbar-h: 60px;
  --filter-h: 48px;
  --pager-h: 72px;
  --stage-max: 1680px;
  --edge: 32px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  padding-bottom: calc(var(--pager-h) + env(safe-area-inset-bottom, 0px));
  background:
    radial-gradient(1100px 560px at 12% -8%, rgba(226, 178, 100, 0.075), transparent 62%),
    radial-gradient(900px 520px at 100% 0%, rgba(120, 140, 170, 0.05), transparent 58%),
    var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.modal-open { overflow: hidden; }

::selection { background: rgba(226, 178, 100, 0.3); color: #fff; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

a { color: inherit; }

img { display: block; max-width: 100%; }

[hidden] { display: none !important; }

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

.icon-star { fill: currentColor; stroke: none; }

/* ==========================================================================
   顶栏
   ========================================================================== */

.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 26px;
  padding-inline: max(var(--edge), calc((100vw - var(--stage-max)) / 2 + var(--edge)));
  background: rgba(10, 10, 12, 0.94);
  border-bottom: 1px solid var(--line);
}

.topbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(226, 178, 100, 0.32), transparent);
  pointer-events: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark {
  width: 30px;
  height: 30px;
  color: var(--gold);
  flex: none;
  filter: drop-shadow(0 0 12px rgba(226, 178, 100, 0.3));
  transition: transform 0.6s var(--ease);
}

.brand:hover .brand-mark { transform: rotate(45deg); }

.brand-words { display: flex; flex-direction: column; }

.brand-cn {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1.1;
  white-space: nowrap;
}

.brand-latin {
  font-family: var(--mono);
  font-style: normal;
  font-size: 0.72em;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--gold);
  margin-right: 0.18em;
}

.brand-en {
  margin-top: 3px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.34em;
  color: var(--ink-3);
}

.topbar-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  color: var(--ink-3);
  white-space: nowrap;
}

.live { display: flex; align-items: center; gap: 7px; color: var(--ink-2); }

.live i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 0 rgba(226, 178, 100, 0.5);
  animation: livePulse 2.4s ease-out infinite;
}

.sep {
  width: 1px;
  height: 10px;
  background: var(--line-2);
  flex: none;
}

.topbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 搜索 */

.search {
  display: flex;
  align-items: center;
  height: 36px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}

.search.open {
  border-bottom-color: var(--line-2);
  background: rgba(255, 255, 255, 0.02);
}

.icon-btn {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: var(--ink-2);
  border-radius: 2px;
  transition: color 0.2s;
}

.icon-btn:hover { color: var(--gold); }

.search input {
  width: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  visibility: hidden;
  background: transparent;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 12.5px;
  letter-spacing: 0.03em;
  outline: none;
  transition: width 0.35s var(--ease), opacity 0.2s, padding 0.35s var(--ease);
}

.search.open input {
  width: 214px;
  padding: 0 8px;
  opacity: 1;
  visibility: visible;
}

.search input::placeholder { color: var(--ink-3); }

.search input::-webkit-search-cancel-button { display: none; }

.search-submit {
  display: none;
  width: 30px;
  height: 30px;
  place-items: center;
  color: var(--gold);
  border-radius: 2px;
}

.search.open .search-submit { display: grid; }

/* ==========================================================================
   分类 / 类型栏
   ========================================================================== */

.filterbar {
  position: sticky;
  top: var(--topbar-h);
  z-index: 55;
  height: var(--filter-h);
  border-bottom: 1px solid var(--line);
  background: rgba(10, 10, 12, 0.94);
}

.rail {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  width: 100%;
  max-width: var(--stage-max);
  height: 100%;
  margin: 0 auto;
  padding-inline: var(--edge);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.rail-left {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
}

.rail-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
  margin-left: auto;
  padding-left: 18px;
  border-left: 1px solid var(--line);
}

.rail::-webkit-scrollbar { display: none; }

.tabs { display: flex; align-items: center; gap: 2px; flex: none; }

.tab {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 7px;
  height: 34px;
  padding: 0 10px;
  color: var(--ink-2);
  font-size: 13px;
  letter-spacing: 0.05em;
  white-space: nowrap;
  border-radius: 2px;
  transition: color 0.2s;
}

.tab .no {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  transition: color 0.2s;
}

.tab:hover { color: var(--ink); }

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

.tab.active .no { color: var(--gold); opacity: 0.72; }

.tab.active::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 1px;
  height: 1px;
  background: var(--gold);
  box-shadow: 0 0 10px rgba(226, 178, 100, 0.75);
}

.rail-label {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.28em;
  color: var(--ink-3);
  margin-right: 3px;
  flex: none;
}

.genres { display: flex; align-items: center; gap: 5px; flex: none; }

.chip {
  height: 26px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--ink-2);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.chip:hover { color: var(--ink); border-color: var(--line-2); }

.chip.active {
  color: var(--gold);
  border-color: rgba(226, 178, 100, 0.6);
  background: var(--gold-soft);
}

/* ==========================================================================
   主舞台 / 标题
   ========================================================================== */

.stage {
  position: relative;
  width: 100%;
  max-width: var(--stage-max);
  margin: 0 auto;
  padding: 12px var(--edge) 0;
}

.board-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 2px 0 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.board-id { display: flex; align-items: center; gap: 14px; min-width: 0; }

.board-index {
  font-family: var(--serif);
  font-size: 34px;
  font-style: italic;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--gold);
  opacity: 0.5;
  flex: none;
}

.board-text { min-width: 0; }

.board-title {
  margin: 0;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.board-desc {
  margin: 4px 0 0;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.board-stats {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  color: var(--ink-2);
  white-space: nowrap;
}

.badge {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.14em;
  color: var(--gold);
  border: 1px solid rgba(226, 178, 100, 0.32);
  padding: 3px 7px;
  border-radius: 2px;
}

/* ==========================================================================
   海报网格
   ========================================================================== */

.poster-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  transition: opacity 0.25s ease;
}

.poster-grid.is-loading { opacity: 0.32; pointer-events: none; }

.card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 3px;
  overflow: hidden;
  animation: cardIn 0.55s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 16ms);
  transition: transform 0.4s var(--ease), border-color 0.3s, box-shadow 0.4s;
}

.card:hover {
  transform: translateY(-3px);
  border-color: rgba(226, 178, 100, 0.5);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(226, 178, 100, 0.1);
}

.card-open {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  text-align: left;
  color: inherit;
  overflow: hidden;
  background:
    radial-gradient(120% 100% at 30% 0%, #1b1b20, #101013 70%);
}

.card-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  filter: saturate(0.92) contrast(1.02);
  transition: opacity 0.5s ease, transform 0.7s var(--ease), filter 0.4s ease;
}

.card-img.is-loaded { opacity: 1; }

.card:hover .card-img { transform: scale(1.045); filter: saturate(1.06) contrast(1.03); }

.card.is-fallback .card-img {
  filter: blur(18px) brightness(0.42) saturate(0.7);
  transform: scale(1.18);
}

.card.is-fallback:hover .card-img { filter: blur(16px) brightness(0.48) saturate(0.8); transform: scale(1.22); }

.card-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.06) 0%,
    rgba(0, 0, 0, 0.12) 42%,
    rgba(6, 6, 8, 0.62) 74%,
    rgba(6, 6, 8, 0.95) 100%
  );
  pointer-events: none;
}

.card-no {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  padding: 3px 5px;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.12em;
  color: rgba(243, 238, 228, 0.82);
  background: rgba(0, 0, 0, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 2px;
}

.card-rate {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 3px 6px;
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--media-gold);
  background: rgba(0, 0, 0, 0.58);
  border: 1px solid rgba(226, 178, 100, 0.3);
  border-radius: 2px;
}

.card-rate .icon { width: 8px; height: 8px; }

.card-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 10px 10px;
  padding-right: 38px;
  pointer-events: none;
}

.card-title {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-family: var(--serif);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.3;
  color: var(--on-media);
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.85);
}

.card-sub {
  font-size: 9.5px;
  letter-spacing: 0.08em;
  color: rgba(243, 238, 228, 0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-overview {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  font-size: 10.5px;
  line-height: 1.6;
  color: rgba(243, 238, 228, 0.76);
  transition: opacity 0.3s ease, max-height 0.35s var(--ease), margin 0.35s var(--ease);
}

.card:hover .card-overview,
.card:focus-within .card-overview {
  max-height: 36px;
  opacity: 1;
  margin-top: 3px;
}

.card-copy {
  position: absolute;
  right: 8px;
  bottom: 9px;
  z-index: 3;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  color: var(--on-media);
  background: rgba(8, 8, 10, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 2px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.25s, transform 0.25s, color 0.2s, border-color 0.2s;
}

.card-copy .icon { width: 13px; height: 13px; }

.card:hover .card-copy,
.card:focus-within .card-copy { opacity: 1; transform: none; }

.card-copy:hover { color: var(--media-gold); border-color: var(--media-gold); }

.card-flag {
  position: absolute;
  top: 8px;
  left: 50%;
  z-index: 2;
  transform: translateX(-50%);
  padding: 2px 6px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.12em;
  color: rgba(243, 238, 228, 0.62);
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 2px;
  white-space: nowrap;
}

/* 骨架屏 */

.skel {
  position: relative;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: 3px;
  overflow: hidden;
  background: #111115;
}

.skel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.045) 42%, transparent 64%);
  background-size: 220% 100%;
  animation: shimmer 1.5s linear infinite;
}

/* ==========================================================================
   状态层
   ========================================================================== */

.state-layer {
  position: fixed;
  inset: calc(var(--topbar-h) + var(--filter-h)) 0 var(--pager-h) 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(10, 10, 12, 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.state-card {
  width: min(420px, 100%);
  padding: 34px 30px 30px;
  text-align: center;
  background: rgba(17, 17, 21, 0.92);
  border: 1px solid var(--line-2);
  border-radius: 4px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6);
}

.state-icon {
  width: 34px;
  height: 34px;
  margin: 0 auto 16px;
  color: var(--gold);
  opacity: 0.8;
}

.state-card h2 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.state-card p {
  margin: 0 0 22px;
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--ink-2);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 22px;
  background: var(--gold);
  border-radius: 2px;
  color: var(--on-gold);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  transition: background 0.2s, transform 0.2s;
}

.btn-primary:hover { background: var(--gold-strong); transform: translateY(-1px); }

/* ==========================================================================
   底部分页 / 自动翻阅
   ========================================================================== */

.pager {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  height: calc(var(--pager-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: rgba(9, 9, 11, 0.96);
  border-top: 1px solid var(--line);
}

.pager::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(226, 178, 100, 0.4), transparent);
  pointer-events: none;
}

.pager-inner {
  display: grid;
  grid-template-columns: 220px 1fr 260px;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: var(--stage-max);
  height: var(--pager-h);
  margin: 0 auto;
  padding-inline: var(--edge);
}

.auto-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px;
  border-radius: 3px;
  text-align: left;
}

.auto-ring {
  position: relative;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: var(--ink-2);
  flex: none;
}

.auto-ring .ring {
  position: absolute;
  inset: 0;
  width: 36px;
  height: 36px;
  transform: rotate(-90deg);
}

.ring-track { fill: none; stroke: rgba(243, 238, 228, 0.12); stroke-width: 1.4; }

.ring-fill {
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-dasharray: 94.25;
  stroke-dashoffset: 94.25;
  opacity: 0.95;
}

.auto-toggle[aria-pressed="true"] .ring-fill {
  animation: ringRun var(--auto-duration, 9s) linear forwards;
}

.auto-toggle[aria-pressed="true"] .ring-fill.is-paused { animation-play-state: paused; }

.auto-toggle[aria-pressed="false"] .ring-fill { animation: none; stroke-dashoffset: 94.25; opacity: 0.16; }

.auto-toggle[aria-pressed="false"] .auto-ring { color: var(--ink-3); }

.auto-ring .icon { position: relative; width: 12px; height: 12px; }

.auto-toggle[aria-pressed="true"] .icon-play { display: none; }
.auto-toggle[aria-pressed="false"] .icon-pause { display: none; }

.auto-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-size: 11.5px;
  letter-spacing: 0.08em;
}

.auto-text b { font-weight: 500; transition: color 0.2s; }

.auto-toggle[aria-pressed="true"] .auto-text b { color: var(--gold); }

.auto-text small {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.16em;
  color: var(--ink-3);
}

.pager-pages {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
}

.pg {
  display: grid;
  place-items: center;
  height: 30px;
  min-width: 30px;
  padding: 0 7px;
  border: 1px solid transparent;
  border-radius: 2px;
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  transition: color 0.18s, border-color 0.18s, background 0.18s;
}

.pg:hover { color: var(--ink); border-color: var(--line-2); }

.pg.active {
  color: var(--on-gold);
  background: var(--gold);
  border-color: var(--gold);
  font-weight: 700;
}

.pg.arrow { border-color: var(--line); }

.pg.arrow:hover { border-color: var(--line-2); }

.pg.arrow:disabled { opacity: 0.25; cursor: not-allowed; }

.pg.ellipsis {
  min-width: 16px;
  padding: 0;
  border: 0;
  color: var(--ink-3);
  cursor: default;
}

.pager-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  white-space: nowrap;
}

.pager-count b { color: var(--ink); font-weight: 600; }

.pager-jump { display: flex; align-items: center; gap: 6px; }

.pager-jump label { color: var(--ink-3); }

.pager-jump input {
  width: 44px;
  height: 28px;
  padding: 0 4px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 11px;
  text-align: center;
  outline: none;
  transition: border-color 0.2s;
}

.pager-jump input:focus { border-color: var(--gold); }

.pager-jump input::-webkit-outer-spin-button,
.pager-jump input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.pager-jump input[type="number"] { -moz-appearance: textfield; appearance: textfield; }

.pager.is-busy .pg { pointer-events: none; }

/* ==========================================================================
   详情弹窗
   ========================================================================== */

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal-veil {
  position: absolute;
  inset: 0;
  background: rgba(4, 4, 6, 0.74);
  -webkit-backdrop-filter: blur(14px) saturate(0.9);
  backdrop-filter: blur(14px) saturate(0.9);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.open .modal-veil { opacity: 1; }

.modal-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(1120px, 94vw);
  max-height: 90vh;
  overflow: hidden;
  background: #0d0d10;
  border: 1px solid var(--line-2);
  border-radius: 5px;
  box-shadow: 0 50px 140px rgba(0, 0, 0, 0.75);
  opacity: 0;
  transform: translateY(16px) scale(0.992);
  transition: opacity 0.32s var(--ease), transform 0.4s var(--ease);
}

.modal.open .modal-panel { opacity: 1; transform: none; }

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 6;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--ink);
  color: var(--on-media);
  background: rgba(6, 6, 8, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  transition: color 0.2s, border-color 0.2s, transform 0.2s;
}

.modal-close:hover { color: var(--media-gold); border-color: var(--media-gold); transform: rotate(90deg); }

.modal-hero {
  position: relative;
  flex: none;
  height: clamp(250px, 44vh, 420px);
  overflow: hidden;
  background:
    linear-gradient(100deg, #17171b 20%, #101014 40%, #17171b 60%);
  background-size: 220% 100%;
  animation: shimmer 1.8s linear infinite;
}

.modal-hero > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.45s ease;
}

.modal-hero > img.is-loaded { opacity: 1; }

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 5, 7, 0.55) 0%, rgba(5, 5, 7, 0.05) 52%, rgba(5, 5, 7, 0.25) 100%),
    linear-gradient(180deg, rgba(6, 6, 8, 0.12) 0%, rgba(6, 6, 8, 0.02) 38%, rgba(13, 13, 16, 0.72) 82%, #0d0d10 100%);
  pointer-events: none;
}

.hero-caption {
  position: absolute;
  left: 30px;
  right: auto;
  bottom: 24px;
  z-index: 2;
  max-width: min(62%, 640px);
  pointer-events: none;
}

.hero-kicker {
  margin: 0 0 8px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.22em;
  color: var(--media-gold);
}

.hero-title {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(26px, 3.2vw, 40px);
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.15;
  color: var(--on-media);
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.65);
}

.hero-original {
  margin: 7px 0 0;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: rgba(243, 238, 228, 0.55);
  text-transform: uppercase;
}

.hero-thumbs {
  position: absolute;
  right: 20px;
  bottom: 18px;
  z-index: 3;
  display: flex;
  gap: 6px;
  padding: 5px;
  background: rgba(6, 6, 8, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.hero-thumbs button {
  width: 62px;
  height: 35px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  overflow: hidden;
  opacity: 0.62;
  transition: opacity 0.2s, border-color 0.2s, transform 0.2s;
}

.hero-thumbs button:hover { opacity: 1; }

.hero-thumbs button.active {
  opacity: 1;
  border-color: var(--gold);
  transform: translateY(-2px);
}

.hero-thumbs img { width: 100%; height: 100%; object-fit: cover; }

.modal-body {
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(300px, 0.88fr);
  gap: 34px;
  padding: 24px 30px 30px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(243, 238, 228, 0.18) transparent;
}

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

.m-facts { display: flex; flex-direction: column; gap: 10px; }

.fact-rating { display: flex; align-items: baseline; gap: 10px; }

.fact-rating strong {
  font-family: var(--serif);
  font-size: 38px;
  font-weight: 600;
  line-height: 1;
  color: var(--gold);
  letter-spacing: -0.02em;
}

.fact-rating span {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--ink-3);
}

.fact-line {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.03em;
  color: var(--ink-2);
}

.fact-line b { color: var(--ink); font-weight: 500; }

.fact-link { color: var(--gold); text-decoration: none; border-bottom: 1px solid rgba(226, 178, 100, 0.35); }
.fact-link:hover { border-bottom-color: var(--gold); }

.fact-genres { display: flex; flex-wrap: wrap; gap: 5px; }

.fact-genres span {
  padding: 3px 8px;
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 2px;
}

.m-overview {
  margin: 16px 0 0;
  font-size: 13.5px;
  line-height: 1.95;
  letter-spacing: 0.015em;
  color: rgba(243, 238, 228, 0.82);
  white-space: pre-line;
}

.m-overview-note {
  margin: 10px 0 0;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--ink-3);
}

.m-cast {
  margin: 16px 0 0;
  font-size: 11.5px;
  line-height: 1.8;
  color: var(--ink-3);
}

.m-cast span { color: var(--ink-3); margin-right: 8px; letter-spacing: 0.1em; }

.m-source {
  margin: 24px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 9.5px;
  line-height: 1.7;
  letter-spacing: 0.04em;
  color: var(--ink-3);
}

.m-source a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; }

.m-side { min-width: 0; }

.m-linkbox {
  padding: 14px;
  background: #111115;
  border: 1px solid var(--line);
  border-radius: 3px;
}

.m-link-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.2em;
  color: var(--ink-3);
}

.m-sizes, .m-sizes button { display: flex; align-items: center; }

.m-sizes {
  gap: 3px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 2px;
}

.m-sizes button {
  height: 20px;
  padding: 0 7px;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  border-radius: 1px;
  transition: color 0.18s, background 0.18s;
}

.m-sizes button:hover { color: var(--ink); }

.m-sizes button.active { color: var(--on-gold); background: var(--gold); }

.m-link-row { display: flex; gap: 7px; }

.m-link-row input {
  flex: 1;
  width: 100%;
  height: 34px;
  padding: 0 10px;
  background: #0b0b0e;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.01em;
  outline: none;
}

.m-link-row input:focus { border-color: var(--gold); }

.btn-copy {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 34px;
  padding: 0 12px;
  background: var(--gold);
  border-radius: 2px;
  color: var(--on-gold);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  flex: none;
  transition: background 0.2s;
}

.btn-copy:hover { background: var(--gold-strong); }

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

.btn-copy .icon { width: 13px; height: 13px; }

.m-link-hint {
  margin: 8px 0 0;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
}

.m-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 14px;
}

.m-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 36px;
  padding: 0 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--ink-2);
  font-size: 10.5px;
  letter-spacing: 0.03em;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.m-action:hover { color: var(--gold); border-color: rgba(226, 178, 100, 0.55); background: var(--gold-soft); }

.m-action .icon { width: 13px; height: 13px; }

/* ==========================================================================
   Toast
   ========================================================================== */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--pager-h) + 22px);
  z-index: 120;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: min(86vw, 520px);
  padding: 10px 16px;
  background: var(--gold);
  border-radius: 3px;
  color: var(--on-gold);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translate(-50%, 10px);
  pointer-events: none;
  transition: opacity 0.25s, transform 0.35s var(--ease);
}

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

.toast .icon { width: 14px; height: 14px; stroke-width: 2.2; }

.noscript {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  letter-spacing: 0.05em;
}

/* ==========================================================================
   动画
   ========================================================================== */

@keyframes cardIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@keyframes shimmer {
  from { background-position: 220% 0; }
  to { background-position: -20% 0; }
}

@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(226, 178, 100, 0.45); }
  70% { box-shadow: 0 0 0 7px rgba(226, 178, 100, 0); }
  100% { box-shadow: 0 0 0 0 rgba(226, 178, 100, 0); }
}

@keyframes ringRun {
  from { stroke-dashoffset: 0; }
  to { stroke-dashoffset: 94.25; }
}

/* ==========================================================================
   响应式
   ========================================================================== */

@media (max-width: 1240px) {
  .poster-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .pager-inner { grid-template-columns: 190px 1fr 220px; }
}

@media (max-width: 1024px) {
  .topbar-meta { display: none; }
  .poster-grid { gap: 12px; }
  .pager-inner { grid-template-columns: 170px 1fr 180px; }
  .pager-meta { gap: 8px; }
  .pager-jump { display: none; }
}

@media (max-width: 900px) {
  .poster-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .modal-body { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .hero-thumbs { display: none; }
  .board-stats .badge { display: none; }
}

@media (max-width: 760px) {
  :root { --topbar-h: 58px; --filter-h: 46px; --pager-h: 68px; --edge: 20px; }
  .brand-cn { font-size: 17px; letter-spacing: 0.1em; }
  .brand-en { font-size: 7px; letter-spacing: 0.26em; }
  .topbar { gap: 14px; }
  .search.open input { width: 160px; }
  .board-index { font-size: 27px; }
  .board-title { font-size: 19px; }
  .board-stats { display: none; }
  .poster-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .pager-inner { grid-template-columns: auto 1fr auto; gap: 8px; }
  .pager-meta { display: none; }
  .auto-text small { display: none; }
  .auto-text b { font-size: 10px; }
  .modal { padding: 0; }
  .modal-panel { width: 100%; max-height: 100dvh; height: 100%; border-radius: 0; border: 0; }
  .modal-hero { height: 34vh; min-height: 220px; }
  .hero-caption { left: 20px; right: 20px; bottom: 18px; }
  .modal-body { padding: 18px 20px 28px; }
  .modal-close { top: 12px; right: 12px; }
  .toast { bottom: calc(var(--pager-h) + 16px); }
}

@media (max-width: 560px) {
  :root { --edge: 16px; }
  .poster-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-info { padding-right: 10px; }
  .card-copy { display: none; }
  .card-overview { display: none; }
  .rail-label { display: none; }
  .tab { padding: 0 8px; font-size: 12.5px; }
  .search.open input { width: 132px; }
  .topbar { gap: 8px; }
  .brand { gap: 9px; }
  .brand-mark { width: 26px; height: 26px; }
  .board-head { align-items: center; }
  .pager-pages { gap: 3px; }
  .pg { min-width: 27px; height: 28px; font-size: 10px; }
  .modal-hero { height: 30vh; min-height: 190px; }
  .hero-title { font-size: 24px; }
  .fact-rating strong { font-size: 32px; }
  .m-actions { grid-template-columns: 1fr; }
  .m-link-row { flex-direction: column; }
  .btn-copy { justify-content: center; }
}

@media (max-height: 820px) and (min-width: 761px) {
  :root { --topbar-h: 56px; --filter-h: 46px; --pager-h: 68px; }
  .board-head { padding-bottom: 8px; margin-bottom: 10px; }
  .board-index { font-size: 28px; }
  .stage { padding-top: 10px; }
  .poster-grid { gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   顶栏：官方首页 / 主题切换
   ========================================================================== */

.official-link {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 8px;
  color: var(--ink-2);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid transparent;
  border-radius: 2px;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.official-link .icon { width: 13px; height: 13px; }

.official-link .icon-ext { width: 9px; height: 9px; opacity: 0.55; }

.official-link:hover {
  color: var(--gold);
  border-color: var(--line);
  background: var(--gold-soft);
}

.official-full { display: inline; }
.official-short { display: none; }

.topbar-divider {
  width: 1px;
  height: 14px;
  margin: 0 2px;
  background: var(--line-2);
  flex: none;
}

.theme-toggle {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: var(--ink-2);
  border: 1px solid transparent;
  border-radius: 2px;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.theme-toggle:hover {
  color: var(--gold);
  border-color: var(--line);
  background: var(--gold-soft);
}

.theme-toggle .icon {
  width: 15px;
  height: 15px;
  transition: transform 0.35s var(--ease), opacity 0.2s;
}

.theme-toggle .icon-moon { display: none; }
.theme-toggle .icon-sun { display: block; }

[data-theme="light"] .theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: block; }

body,
.topbar,
.filterbar,
.pager,
.state-card,
.m-linkbox,
.m-link-row input,
.pager-jump input {
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

/* ==========================================================================
   白天模式 · 纸本档案
   ========================================================================== */

[data-theme="light"] {
  color-scheme: light;
  --bg: #f2ede3;
  --bg-soft: #fbf8f2;
  --bg-card: #e8e1d4;
  --ink: #1e1b16;
  --ink-2: #5c5549;
  --ink-3: #8a8173;
  --gold: #8d5a16;
  --gold-strong: #a96d1c;
  --gold-soft: rgba(141, 90, 22, 0.1);
  --line: rgba(30, 27, 22, 0.12);
  --line-2: rgba(30, 27, 22, 0.26);
  --danger: #b4472f;
  --on-gold: #fff8ec;
}

[data-theme="light"] body {
  background:
    radial-gradient(1100px 560px at 12% -8%, rgba(141, 90, 22, 0.1), transparent 62%),
    radial-gradient(900px 520px at 100% 0%, rgba(70, 90, 120, 0.06), transparent 58%),
    var(--bg);
  color: var(--ink);
}

[data-theme="light"] ::selection {
  background: rgba(141, 90, 22, 0.22);
  color: var(--ink);
}

[data-theme="light"] .topbar {
  background: rgba(242, 237, 227, 0.97);
}

[data-theme="light"] .topbar::after {
  background: linear-gradient(90deg, transparent, rgba(141, 90, 22, 0.32), transparent);
}

[data-theme="light"] .brand-mark {
  filter: drop-shadow(0 0 10px rgba(141, 90, 22, 0.2));
}

[data-theme="light"] .filterbar {
  background: rgba(242, 237, 227, 0.96);
}

[data-theme="light"] .search.open {
  background: rgba(30, 27, 22, 0.035);
}

[data-theme="light"] .state-layer {
  background: rgba(242, 237, 227, 0.6);
}

[data-theme="light"] .state-card {
  background: rgba(251, 248, 242, 0.96);
  border-color: var(--line-2);
  box-shadow: 0 30px 90px rgba(70, 55, 35, 0.22);
}

[data-theme="light"] .pager {
  background: rgba(247, 243, 236, 0.97);
}

[data-theme="light"] .pager::before {
  background: linear-gradient(90deg, transparent, rgba(141, 90, 22, 0.35), transparent);
}

[data-theme="light"] .ring-track {
  stroke: rgba(30, 27, 22, 0.14);
}

[data-theme="light"] .pager-jump input {
  background: rgba(255, 255, 255, 0.55);
}

[data-theme="light"] .card {
  box-shadow: 0 12px 30px rgba(80, 62, 38, 0.14);
}

[data-theme="light"] .card:hover {
  box-shadow: 0 16px 38px rgba(80, 62, 38, 0.22), 0 0 0 1px rgba(141, 90, 22, 0.14);
}

[data-theme="light"] .card-open {
  background: radial-gradient(120% 100% at 30% 0%, #f0e9dc, #e4dccf 70%);
}

[data-theme="light"] .skel {
  background: #e7e0d3;
}

[data-theme="light"] .skel::after {
  background: linear-gradient(100deg, transparent 20%, rgba(30, 27, 22, 0.05) 42%, transparent 64%);
}

[data-theme="light"] .modal-veil {
  background: rgba(36, 29, 19, 0.46);
}

[data-theme="light"] .modal-panel {
  background: #faf7f1;
  border-color: var(--line-2);
  box-shadow: 0 50px 140px rgba(60, 45, 28, 0.35);
}

[data-theme="light"] .modal-hero {
  background: linear-gradient(100deg, #ece5d8 20%, #f4efe6 40%, #ece5d8 60%);
}

[data-theme="light"] .hero-shade {
  background:
    linear-gradient(90deg, rgba(22, 17, 11, 0.65) 0%, rgba(22, 17, 11, 0.12) 52%, rgba(22, 17, 11, 0.28) 100%),
    linear-gradient(180deg, rgba(22, 17, 11, 0.12) 0%, rgba(22, 17, 11, 0.02) 38%, rgba(22, 17, 11, 0.52) 82%, rgba(22, 17, 11, 0.58) 94%, #faf7f1 100%);
}

[data-theme="light"] .modal-body {
  border-top: 1px solid var(--line);
  scrollbar-color: rgba(30, 27, 22, 0.2) transparent;
}

[data-theme="light"] .hero-caption {
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.55);
}

[data-theme="light"] .hero-title {
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.72);
}

[data-theme="light"] .m-overview {
  color: rgba(30, 27, 22, 0.82);
}

[data-theme="light"] .fact-link {
  border-bottom-color: rgba(141, 90, 22, 0.35);
}

[data-theme="light"] .m-linkbox {
  background: #f3eee5;
  border-color: var(--line);
}

[data-theme="light"] .m-link-row input {
  background: #fffdf8;
  color: var(--ink-2);
}

[data-theme="light"] .m-action {
  background: rgba(30, 27, 22, 0.025);
}

[data-theme="light"] .m-action:hover {
  background: var(--gold-soft);
}

[data-theme="light"] .toast {
  color: var(--on-gold);
  box-shadow: 0 14px 40px rgba(70, 52, 30, 0.28);
}

@media (max-width: 760px) {
  .brand-en { display: none; }
  .brand-cn { font-size: 16px; letter-spacing: 0.08em; }
  .official-full { display: none; }
  .official-short { display: inline; }
  .topbar-divider { display: none; }
  .official-link { padding: 0 6px; }
}

@media (max-width: 560px) {
  .official-link { padding: 0 5px; }
  .official-link .icon-ext { display: none; }
}

@media (max-width: 380px) {
  .brand-cn { font-size: 14px; letter-spacing: 0.05em; }
  .brand-mark { width: 24px; height: 24px; }
  .topbar { gap: 6px; }
  .topbar-actions { gap: 2px; }
  .official-short { display: none; }
  .search.open input { width: 104px; }
}

/* ==========================================================================
   华语专区：自定义下拉菜单
   ========================================================================== */

.cn-picker {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  margin-left: 4px;
  padding: 0 9px;
  border: 1px solid var(--line-2);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--ink-2);
  font-size: 11px;
  letter-spacing: 0.05em;
  white-space: nowrap;
  flex: none;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.cn-picker:hover {
  color: var(--ink);
  border-color: var(--line-2);
}

.cn-picker.active,
.cn-picker[aria-expanded="true"] {
  color: var(--gold);
  border-color: rgba(226, 178, 100, 0.55);
  background: var(--gold-soft);
}

.cn-caption {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.12em;
  color: var(--ink-2);
}

[data-theme="light"] .cn-picker {
  background: rgba(30, 27, 22, 0.025);
}

.cn-picker.active .cn-caption,
.cn-picker[aria-expanded="true"] .cn-caption {
  color: var(--gold);
  opacity: 0.75;
}

.cn-current { line-height: 1; }

.cn-chevron {
  width: 10px;
  height: 10px;
  opacity: 0.6;
  transition: transform 0.25s var(--ease);
}

.cn-picker[aria-expanded="true"] .cn-chevron {
  transform: rotate(180deg);
}

.cn-picker:focus-within {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.cn-menu {
  position: fixed;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 190px;
  max-width: calc(100vw - 24px);
  padding: 6px;
  background: #111115;
  border: 1px solid var(--line-2);
  border-radius: 3px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.6);
  animation: cnMenuIn 0.16s var(--ease) both;
}

.cn-menu[hidden] { display: none !important; }

.cn-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  height: 34px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 2px;
  color: var(--ink-2);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.18s, background 0.18s, border-color 0.18s;
}

.cn-menu-item small {
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.12em;
  color: var(--ink-3);
}

.cn-menu-item:hover,
.cn-menu-item:focus-visible {
  color: var(--ink);
  background: var(--gold-soft);
  outline: none;
}

.cn-menu-item.active {
  color: var(--gold);
  background: var(--gold-soft);
  border-color: rgba(226, 178, 100, 0.22);
}

.cn-menu-item.active small {
  color: var(--gold);
  opacity: 0.65;
}

.cn-menu-item.active::after {
  content: "✓";
  font-size: 10px;
  color: var(--gold);
}

[data-theme="light"] .cn-menu {
  background: #faf7f1;
  box-shadow: 0 22px 60px rgba(60, 45, 28, 0.28);
}

@keyframes cnMenuIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}

.rail.is-nonmovie .rail-right {
  display: none;
}

@media (max-width: 1120px) {
  .rail { gap: 14px; }
  .rail-right {
    gap: 4px;
    padding-left: 14px;
  }
  .rail-label { display: none; }
  .chip { padding: 0 7px; }
}

@media (max-width: 760px) {
  .cn-picker {
    order: -1;
    margin-left: 0;
    margin-right: 4px;
    padding: 0 7px;
  }
}

@media (max-width: 380px) {
  .cn-picker {
    height: 28px;
    margin-left: 2px;
    padding: 0 6px;
  }
}


