/* ============================================
   《上田暗夜·1935》1935山村夜 · 谍战主题
   墨黑底 + 烛金 + 宣纸米白 + 印章红
   ============================================ */

:root {
  --ink-0: #0d0f0e;
  --ink-1: #12110e;
  --ink-2: #161310;
  --ink-3: #1f1a14;
  --gold: #d4a24a;
  --gold-soft: rgba(212, 162, 74, .25);
  --cream: #efe6d0;
  --cream-dim: #c9bfa4;
  --muted: #8d846d;
  --paper: #e9ddbe;
  --paper-ink: #33291a;
  --red: #8f2d2d;
  --red-bright: #b23a3a;
  --font-title: 'Kaiti SC', 'STKaiti', 'KaiTi', 'STSong', 'SimSun', serif;
  --font-body: 'Songti SC', 'STSong', 'SimSun', 'KaiTi', serif;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .5);
}

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

html { font-size: 16px; }

body {
  font-family: var(--font-body);
  color: var(--cream);
  background:
    radial-gradient(1100px 560px at 80% -10%, rgba(212, 162, 74, .08), transparent 60%),
    radial-gradient(800px 500px at -8% 108%, rgba(143, 45, 45, .10), transparent 60%),
    linear-gradient(165deg, var(--ink-0) 0%, var(--ink-2) 55%, #0a0c0b 100%);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.85;
}

img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
.hidden { display: none !important; }

/* ---------- 宣纸噪点 & 余烬背景 ---------- */
.paper-grain {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E");
}

#bg-ember {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.ember {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(226, 178, 92, .95), rgba(212, 162, 74, 0) 70%);
  animation: ember-rise 12s ease-in-out infinite;
}
@keyframes ember-rise {
  0% { transform: translate(0, 0) scale(1); opacity: 0; }
  12% { opacity: var(--o, .5); }
  55% { opacity: calc(var(--o, .5) * .6); }
  100% { transform: translate(var(--dx, 30px), -46vh) scale(.4); opacity: 0; }
}

#app { position: relative; z-index: 1; }

/* ---------- 通用视图 ---------- */
.view {
  max-width: 1180px;
  margin: 0 auto;
  padding: 50px 22px 60px;
  animation: view-in .55s ease both;
}
@keyframes view-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.section-title {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.7rem;
  color: var(--gold);
  letter-spacing: .14em;
}
.view-head { text-align: center; margin-bottom: 30px; position: relative; }
.view-head .btn-mini { position: absolute; left: 0; top: 4px; }
.view-sub { color: var(--muted); margin-top: 6px; letter-spacing: .1em; }

/* ---------- 按钮体系 ---------- */
@property --spin { syntax: '<angle>'; initial-value: 0deg; inherits: false; }

.btn-glow {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 34px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--ink-3), var(--ink-1));
  color: var(--cream);
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: .16em;
  box-shadow: inset 0 0 0 1px rgba(212, 162, 74, .4), var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.btn-glow::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 14px;
  background: conic-gradient(from var(--spin),
    transparent 0deg, transparent 260deg,
    var(--gold) 300deg, #e8c87e 330deg, transparent 360deg);
  z-index: -1;
  animation: spin-border 3.2s linear infinite;
}
@keyframes spin-border { to { --spin: 360deg; } }
.btn-glow:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px rgba(212,162,74,.65), 0 14px 34px rgba(0,0,0,.55); }
.btn-glow:active { transform: translateY(0); }
.btn-glow .corners {
  position: absolute;
  inset: -8px;
  pointer-events: none;
  background:
    radial-gradient(circle 3.5px at 5px 5px, var(--gold) 95%, transparent),
    radial-gradient(circle 3.5px at calc(100% - 5px) 5px, var(--gold) 95%, transparent),
    radial-gradient(circle 3.5px at 5px calc(100% - 5px), var(--gold) 95%, transparent),
    radial-gradient(circle 3.5px at calc(100% - 5px) calc(100% - 5px), var(--gold) 95%, transparent);
}
.btn-alt { background: linear-gradient(145deg, #4a2222, #6b2f2f); box-shadow: inset 0 0 0 1px rgba(178, 58, 58, .45), var(--shadow); }
.btn-sm { padding: 10px 22px; font-size: .95rem; }
.btn-ico { font-size: 1.25em; }

.btn-ghost {
  padding: 9px 18px;
  border: 1px solid rgba(212, 162, 74, .45);
  border-radius: 8px;
  background: transparent;
  color: var(--gold);
  font-size: .92rem;
  letter-spacing: .06em;
  transition: background .2s ease;
}
.btn-ghost:hover { background: rgba(212, 162, 74, .12); }
.btn-ghost:disabled { opacity: .35; cursor: not-allowed; }

.btn-mini {
  padding: 6px 14px;
  border: 1px solid rgba(239, 230, 208, .2);
  border-radius: 999px;
  background: rgba(22, 19, 16, .75);
  color: var(--cream-dim);
  font-size: .85rem;
}
.btn-mini:hover { border-color: var(--gold); color: var(--gold); }

.btn-text {
  border: none;
  background: none;
  color: var(--muted);
  font-size: .85rem;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.btn-text:hover { color: var(--gold); }

/* ---------- 首页 ---------- */
.home-hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 44px;
  align-items: center;
  min-height: 52vh;
}
.home-cover-wrap {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transform: rotate(-1.2deg);
  border: 1px solid rgba(212, 162, 74, .35);
}
.home-cover { width: 100%; height: 100%; object-fit: cover; filter: saturate(.85) contrast(1.05); }
.home-cover-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(200deg, transparent 50%, rgba(13, 15, 14, .65));
}
.home-kicker {
  color: var(--red-bright);
  letter-spacing: .3em;
  font-size: .82rem;
  margin-bottom: 12px;
}
.home-title {
  font-family: var(--font-title);
  font-weight: 900;
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  line-height: 1.15;
  color: var(--cream);
  text-shadow: 0 0 34px rgba(212, 162, 74, .3);
  letter-spacing: .1em;
}
.title-year { color: var(--gold); font-size: .55em; letter-spacing: .04em; }
.home-sub { color: var(--cream-dim); margin: 16px 0 30px; font-size: 1.02rem; }
.home-btns { display: flex; gap: 20px; flex-wrap: wrap; }
.home-btns + .btn-text { margin-top: 22px; }
.save-hint { margin-top: 12px; color: var(--gold); font-size: .85rem; }

.notice-panel {
  margin-top: 56px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 34px;
  background: rgba(31, 26, 20, .5);
  border: 1px dashed rgba(212, 162, 74, .35);
  border-radius: var(--radius);
  padding: 30px 34px;
}
.notice-list { margin-top: 14px; padding-left: 1.2em; color: var(--cream-dim); }
.notice-list li { margin-bottom: 10px; }
.notice-list li::marker { color: var(--gold); }
.notice-map img {
  border-radius: 10px;
  border: 4px solid var(--paper);
  box-shadow: var(--shadow);
  transform: rotate(1.4deg);
  filter: sepia(.18);
}
.notice-map figcaption { text-align: center; color: var(--muted); font-size: .8rem; margin-top: 10px; }

/* ---------- 主控台 ---------- */
.dm-topbar {
  background: rgba(13, 15, 14, .88);
  border: 1px solid rgba(212, 162, 74, .28);
  border-radius: var(--radius);
  padding: 16px 22px;
  backdrop-filter: blur(6px);
  position: sticky;
  top: 14px;
  z-index: 10;
  box-shadow: var(--shadow);
}
.dm-top-row { display: flex; align-items: center; gap: 16px; }
.stage-progress { flex: 1; display: flex; gap: 6px; }
.stage-seg {
  flex: 1;
  min-width: 0;
  text-align: center;
  font-size: .72rem;
  color: var(--muted);
  padding: 6px 2px 8px;
  border-radius: 6px;
  border: 1px solid transparent;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;
  cursor: pointer;
  transition: all .25s ease;
}
.stage-seg::after {
  content: '';
  position: absolute;
  left: 8%; right: 8%; bottom: 3px;
  height: 3px;
  border-radius: 2px;
  background: rgba(239, 230, 208, .12);
}
.stage-seg.done { color: var(--cream-dim); }
.stage-seg.done::after { background: var(--gold); }
.stage-seg.active {
  color: var(--ink-0);
  background: linear-gradient(120deg, var(--gold), #b5813a);
  font-weight: 700;
}
.stage-seg.active::after { background: rgba(13, 15, 14, .5); }

.dm-timers {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.stage-clock-box { text-align: left; }
.stage-clock {
  font-family: var(--font-title);
  font-weight: 900;
  font-size: 3rem;
  line-height: 1;
  color: var(--cream);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 24px rgba(212, 162, 74, .35);
}
.stage-clock.urgent { color: var(--red-bright); animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; } }
.stage-clock-label { color: var(--muted); font-size: .85rem; margin-top: 6px; }

.total-ring-box { position: relative; width: 96px; height: 96px; }
.ring-bg { fill: none; stroke: rgba(239, 230, 208, .12); stroke-width: 9; }
.ring-fg {
  fill: none;
  stroke: var(--gold);
  stroke-width: 9;
  stroke-linecap: round;
  stroke-dasharray: 326.7;
  stroke-dashoffset: 0;
  transform: rotate(-90deg);
  transform-origin: center;
  transition: stroke-dashoffset .6s linear, stroke .3s ease;
}
.total-ring-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-variant-numeric: tabular-nums;
}
.total-ring-text span { font-weight: 700; color: var(--gold); font-size: 1.02rem; }
.total-ring-text small { color: var(--muted); font-size: .68rem; }

.dm-controls { margin-left: auto; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.dm-nav-btns { display: flex; gap: 8px; }

.dm-body {
  display: grid;
  grid-template-columns: 1.25fr .95fr;
  gap: 26px;
  margin-top: 26px;
  align-items: start;
}
.dm-stage-panel { display: flex; flex-direction: column; gap: 18px; }
.dm-stage-head { display: flex; align-items: center; gap: 14px; }
.stage-badge {
  background: linear-gradient(120deg, var(--gold), #b5813a);
  color: var(--ink-0);
  font-weight: 700;
  font-size: .8rem;
  padding: 5px 12px;
  border-radius: 999px;
  white-space: nowrap;
  letter-spacing: .08em;
}
.dm-stage-name { font-family: var(--font-title); font-weight: 700; font-size: 1.9rem; color: var(--cream); letter-spacing: .1em; }

.narration-card, .tips-card {
  border-radius: var(--radius);
  padding: 20px 24px;
}
.narration-card {
  background: linear-gradient(150deg, rgba(31, 26, 20, .92), rgba(22, 19, 16, .92));
  border: 1px solid rgba(212, 162, 74, .45);
  box-shadow: var(--shadow), inset 0 0 60px rgba(212, 162, 74, .05);
}
.narration-tag {
  display: inline-block;
  font-size: .75rem;
  color: var(--gold);
  border: 1px solid rgba(212, 162, 74, .5);
  border-radius: 999px;
  padding: 3px 12px;
  margin-bottom: 12px;
  letter-spacing: .18em;
}
#dm-narration { font-size: 1.1rem; color: var(--cream); }
.tips-card {
  background: rgba(143, 45, 45, .08);
  border: 1px dashed rgba(178, 58, 58, .45);
}
.tips-tag { font-size: .78rem; color: var(--red-bright); font-weight: 700; letter-spacing: .18em; }
#dm-tips { color: var(--cream-dim); margin-top: 6px; font-size: .95rem; }

/* 城北好物展示条 */
.product-strip {
  background: rgba(13, 15, 14, .75);
  border: 1px solid rgba(212, 162, 74, .25);
  border-radius: var(--radius);
  padding: 16px 20px;
}
.product-strip-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.product-strip-title {
  font-family: var(--font-title);
  font-weight: 700;
  color: var(--gold);
  letter-spacing: .24em;
}
.product-copy { color: var(--cream-dim); font-size: .85rem; }
.product-strip-items { display: flex; gap: 14px; margin-top: 12px; overflow-x: auto; padding-bottom: 4px; }
.product-card {
  flex: 0 0 132px;
  background: var(--paper);
  color: var(--paper-ink);
  border-radius: 10px;
  overflow: hidden;
  transform: rotate(-.8deg);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .45);
  transition: transform .2s ease;
}
.product-card:nth-child(2n) { transform: rotate(1deg); }
.product-card:hover { transform: rotate(0) translateY(-4px); }
.product-card img { width: 100%; height: 88px; object-fit: cover; }
.product-card .pc-body { padding: 8px 10px 10px; }
.product-card .pc-tag {
  display: inline-block;
  font-size: .62rem;
  color: var(--cream);
  background: var(--red);
  border-radius: 3px;
  padding: 1px 6px;
  margin-bottom: 4px;
  letter-spacing: .06em;
}
.product-card .pc-name { font-size: .82rem; font-weight: 700; line-height: 1.3; }
.product-card .pc-desc { font-size: .68rem; color: #6e6046; line-height: 1.5; margin-top: 2px; }

/* ---------- 侧栏：线索（泛黄证物袋） ---------- */
.side-title {
  font-family: var(--font-title);
  font-weight: 700;
  color: var(--gold);
  font-size: 1.15rem;
  margin-bottom: 14px;
  letter-spacing: .14em;
}
.clue-panel, .vote-panel {
  background: rgba(13, 15, 14, .78);
  border: 1px solid rgba(212, 162, 74, .25);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 20px;
}
.clue-round { margin-bottom: 18px; }
.clue-round-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.clue-round-title { font-weight: 700; color: var(--cream); font-size: .95rem; letter-spacing: .06em; }
.clue-round-title small { color: var(--muted); font-weight: 400; margin-left: 6px; }
.btn-unlock {
  border: none;
  border-radius: 999px;
  padding: 6px 16px;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .06em;
  background: linear-gradient(120deg, var(--gold), #b5813a);
  color: var(--ink-0);
  transition: transform .15s ease;
}
.btn-unlock:hover { transform: scale(1.05); }
.btn-unlock:disabled { background: rgba(239, 230, 208, .15); color: var(--muted); cursor: default; transform: none; }

.clue-cards { display: grid; gap: 12px; }
.clue-card {
  position: relative;
  background:
    linear-gradient(160deg, rgba(120, 96, 56, .18), rgba(120, 96, 56, 0) 55%),
    var(--paper);
  color: var(--paper-ink);
  border-radius: 8px;
  padding: 16px 16px 14px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .45);
  transform: rotate(-.6deg);
  border: 1px solid #d8c89e;
  animation: clue-flip .5s ease both;
}
.clue-card:nth-child(2n) { transform: rotate(.7deg); }
@keyframes clue-flip {
  from { opacity: 0; transform: rotateY(70deg) translateY(8px); }
  to { opacity: 1; transform: rotateY(0) translateY(0); }
}
.clue-card::before {  /* 证物袋封条 */
  content: '证物 · EVIDENCE';
  position: absolute;
  top: -10px; left: 50%;
  transform: translateX(-50%) rotate(-2deg);
  font-size: .58rem;
  letter-spacing: .2em;
  color: var(--cream);
  background: var(--red);
  padding: 2px 14px;
  border-radius: 2px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .35);
}
.clue-card img { width: 100%; height: 110px; object-fit: cover; border-radius: 4px; border: 3px solid #f6efdc; filter: sepia(.25) contrast(1.02); }
.clue-card h4 { font-family: var(--font-title); font-size: .98rem; margin: 8px 0 4px; color: #2c2314; letter-spacing: .06em; }
.clue-card p { font-size: .8rem; line-height: 1.7; color: #57492f; }
.clue-card-text { padding-top: 22px; }
.clue-seal {
  position: absolute;
  right: 12px; top: 12px;
  width: 40px; height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-title);
  font-size: 1.2rem;
  color: var(--cream);
  background: var(--red);
  border-radius: 6px;
  transform: rotate(8deg);
  opacity: .9;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .3);
}
.clue-locked {
  border: 1px dashed rgba(239, 230, 208, .25);
  border-radius: 8px;
  padding: 14px;
  text-align: center;
  color: var(--muted);
  font-size: .82rem;
  background: rgba(31, 26, 20, .4);
}

/* ---------- 侧栏：投票 ---------- */
.vote-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 14px; }
.vote-card {
  background: rgba(31, 26, 20, .65);
  border: 2px solid rgba(239, 230, 208, .15);
  border-radius: 10px;
  padding: 10px 8px;
  text-align: center;
  cursor: pointer;
  transition: all .2s ease;
  user-select: none;
}
.vote-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.vote-card img {
  width: 62px; height: 62px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 6px;
  border: 2px solid rgba(212, 162, 74, .5);
  filter: saturate(.85);
}
.vote-card .vc-name { font-size: .85rem; font-weight: 700; color: var(--cream); letter-spacing: .06em; }
.vote-card .vc-count { font-size: 1.3rem; font-weight: 800; color: var(--gold); font-variant-numeric: tabular-nums; }
.vote-card .vc-bar { height: 4px; border-radius: 2px; background: rgba(239,230,208,.12); margin-top: 6px; overflow: hidden; }
.vote-card .vc-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--red-bright)); width: 0; transition: width .35s ease; }
.vote-card.suspect {
  border-color: var(--red-bright);
  box-shadow: 0 0 0 3px rgba(178, 58, 58, .35), 0 8px 22px rgba(0, 0, 0, .5);
  animation: suspect-glow 1.6s ease-in-out infinite;
}
@keyframes suspect-glow { 50% { box-shadow: 0 0 0 6px rgba(178, 58, 58, .15), 0 8px 22px rgba(0,0,0,.5); } }
.vote-panel.locked .vote-card { cursor: default; }
.vote-result {
  margin-top: 12px;
  padding: 12px 16px;
  border-radius: 8px;
  background: rgba(143, 45, 45, .14);
  border: 1px solid rgba(178, 58, 58, .5);
  color: var(--cream);
  font-size: .92rem;
}

/* ---------- 玩家选角 ---------- */
.char-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.char-card {
  background: rgba(22, 19, 16, .88);
  border: 1px solid rgba(212, 162, 74, .3);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  animation: view-in .5s ease both;
}
.char-card:hover { transform: translateY(-6px) rotate(-.5deg); border-color: var(--gold); box-shadow: 0 16px 36px rgba(0, 0, 0, .55); }
.char-card img { width: 100%; height: 200px; object-fit: cover; filter: saturate(.82) contrast(1.04); }
.char-card .cc-body { padding: 14px 16px 18px; }
.char-card .cc-name {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--gold);
  letter-spacing: .14em;
}
.char-card .cc-role { color: var(--red-bright); font-size: .85rem; margin: 2px 0 8px; letter-spacing: .06em; }
.char-card .cc-public { color: var(--cream-dim); font-size: .8rem; line-height: 1.65; }

/* ---------- 秘密剧本 ---------- */
#view-secret { max-width: 760px; }
.secret-lock {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 34px;
  padding-top: 40px;
  text-align: center;
}
.lock-icon { font-size: 3rem; }
.lock-warning h2 { font-family: var(--font-title); font-weight: 700; color: var(--gold); margin: 10px 0 6px; letter-spacing: .14em; }
.lock-char-name { color: var(--red-bright); font-weight: 700; font-size: 1.1rem; letter-spacing: .08em; }
.lock-tip { color: var(--muted); margin-top: 12px; font-size: .9rem; }

.hold-btn {
  position: relative;
  width: 150px; height: 150px;
  border-radius: 50%;
  border: none;
  background: radial-gradient(circle at 35% 30%, var(--ink-3), var(--ink-1));
  box-shadow: inset 0 0 0 1px rgba(212, 162, 74, .4), var(--shadow);
  color: var(--gold);
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: .18em;
  user-select: none;
  touch-action: none;
}
.hold-ring { position: absolute; inset: 0; transform: rotate(-90deg); }
.hold-ring .ring-bg { stroke: rgba(239, 230, 208, .12); stroke-width: 7; }
.hold-ring .ring-fg { stroke: var(--gold); stroke-width: 7; stroke-dasharray: 326.7; stroke-dashoffset: 326.7; transition: none; }
.hold-label { position: relative; z-index: 1; line-height: 1.6; }

.secret-content { display: flex; flex-direction: column; gap: 18px; }
.secret-head {
  display: flex;
  align-items: center;
  gap: 18px;
  background: rgba(31, 26, 20, .6);
  border: 1px solid rgba(212, 162, 74, .35);
  border-radius: var(--radius);
  padding: 18px 22px;
}
.secret-avatar {
  width: 84px; height: 84px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--gold);
  filter: saturate(.85);
}
.secret-name { font-family: var(--font-title); font-weight: 900; font-size: 1.8rem; color: var(--gold); letter-spacing: .14em; }
.secret-role { color: var(--red-bright); letter-spacing: .06em; }
.secret-head .btn-ghost { margin-left: auto; }
.secret-block {
  background: rgba(22, 19, 16, .88);
  border: 1px solid rgba(239, 230, 208, .14);
  border-radius: var(--radius);
  padding: 20px 24px;
  animation: view-in .5s ease both;
}
.secret-block h3 {
  font-family: var(--font-title);
  color: var(--gold);
  font-size: 1.02rem;
  letter-spacing: .16em;
  margin-bottom: 10px;
}
.secret-block p, .secret-block li { color: var(--cream-dim); font-size: .96rem; }
.secret-block-gold { border-color: rgba(212, 162, 74, .55); background: rgba(212, 162, 74, .06); }
.secret-tasks { padding-left: 1.2em; }
.secret-tasks li { margin-bottom: 8px; }
.secret-tasks li::marker { color: var(--red-bright); }

/* ---------- 真相页 ---------- */
#view-truth { max-width: 860px; }
.paper-card {
  position: relative;
  background:
    linear-gradient(160deg, rgba(120, 96, 56, .15), rgba(120, 96, 56, 0) 50%),
    var(--paper);
  color: var(--paper-ink);
  border-radius: 6px;
  padding: 34px 38px;
  box-shadow: var(--shadow);
  transform: rotate(-.4deg);
  border: 1px solid #d8c89e;
}
.tape {
  position: absolute;
  top: -12px;
  width: 86px; height: 24px;
  background: linear-gradient(100deg, rgba(212, 162, 74, .55), rgba(181, 129, 58, .55));
  border-radius: 2px;
}
.tape-l { left: 36px; transform: rotate(-5deg); }
.tape-r { right: 36px; transform: rotate(4deg); }
.truth-letter h3 { font-family: var(--font-title); font-size: 1.45rem; color: var(--red); margin-bottom: 14px; letter-spacing: .2em; }
.truth-letter p { white-space: pre-line; font-size: .98rem; line-height: 2.05; color: #453a24; }
.letter-seal {
  position: absolute;
  right: 30px; bottom: 26px;
  width: 52px; height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-title);
  font-size: 1.6rem;
  color: var(--cream);
  background: var(--red);
  border-radius: 8px;
  transform: rotate(-8deg);
  opacity: .88;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .3);
}

.truth-h3 {
  font-family: var(--font-title);
  font-weight: 700;
  color: var(--gold);
  font-size: 1.3rem;
  margin: 42px 0 18px;
  letter-spacing: .18em;
}

.timeline { position: relative; padding-left: 30px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 8px; top: 6px; bottom: 6px;
  width: 2px;
  background: linear-gradient(180deg, var(--gold), var(--red));
  border-radius: 2px;
}
.tl-item {
  position: relative;
  padding: 0 0 22px 20px;
  opacity: 0;
  transform: translateX(24px);
}
.timeline.play .tl-item { animation: tl-in .55s ease forwards; }
@keyframes tl-in { to { opacity: 1; transform: translateX(0); } }
.tl-item::before {
  content: '';
  position: absolute;
  left: -28px; top: 8px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--gold);
  border: 3px solid var(--ink-1);
  box-shadow: 0 0 10px rgba(212, 162, 74, .7);
}
.tl-item:last-child::before { background: var(--red-bright); box-shadow: 0 0 12px rgba(178, 58, 58, .8); }
.tl-time {
  font-family: var(--font-title);
  font-weight: 700;
  color: var(--gold);
  font-size: 1.05rem;
  letter-spacing: .1em;
  font-variant-numeric: tabular-nums;
}
.tl-text { color: var(--cream-dim); font-size: .94rem; }

/* 史实注释卡 */
.history-card {
  margin-top: 42px;
  background: rgba(143, 45, 45, .1);
  border: 1px solid rgba(178, 58, 58, .5);
  border-left: 5px solid var(--red);
  border-radius: 10px;
  padding: 22px 26px;
}
.history-title {
  font-family: var(--font-title);
  font-weight: 700;
  color: var(--red-bright);
  font-size: 1.15rem;
  letter-spacing: .24em;
  margin-bottom: 10px;
}
.history-card p { color: var(--cream-dim); font-size: .95rem; line-height: 2; }

/* 缅怀墙 */
.memorial-text { color: var(--cream-dim); margin: -6px 0 16px; font-size: .95rem; }
.memorial-wall-wrap {
  background: linear-gradient(180deg, #0a0b0a, var(--ink-1));
  border: 1px solid rgba(212, 162, 74, .3);
  border-radius: var(--radius);
  padding: 30px 24px 20px;
  text-align: center;
}
.memorial-wall {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px 22px;
}
.candle {
  position: relative;
  width: 34px; height: 76px;
  border: none;
  background: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  cursor: pointer;
  padding: 0;
}
.candle .stem {
  width: 10px; height: 40px;
  border-radius: 3px 3px 2px 2px;
  background: linear-gradient(90deg, #cfc3a2, #efe6d0 45%, #b3a684);
  box-shadow: 0 3px 6px rgba(0, 0, 0, .5);
}
.candle .wick { width: 2px; height: 7px; background: #4a4232; order: -1; margin-bottom: -1px; }
.candle .flame {
  order: -2;
  width: 14px; height: 22px;
  margin-bottom: -3px;
  border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%;
  background: rgba(239, 230, 208, .1);
  border: 1px dashed rgba(239, 230, 208, .3);
  transform-origin: 50% 100%;
  transition: all .3s ease;
}
.candle.lit .flame {
  border: none;
  background: radial-gradient(circle at 50% 78%, #fff6d8 0%, #f0c96a 45%, #d98a3a 80%, rgba(217, 138, 58, 0) 100%);
  box-shadow: 0 0 18px 6px rgba(212, 162, 74, .45), 0 0 46px 14px rgba(212, 162, 74, .18);
  animation: flicker 1.8s ease-in-out infinite;
}
.candle.half .stem { height: 22px; }
.candle.half .flame { width: 11px; height: 17px; }
.candle.half.lit .flame { box-shadow: 0 0 14px 4px rgba(212, 162, 74, .35), 0 0 34px 10px rgba(212, 162, 74, .14); }
.candle:not(.lit):hover .flame { border-color: var(--gold); background: rgba(212, 162, 74, .14); }
.candle.lit { cursor: default; }
@keyframes flicker {
  0%, 100% { transform: scale(1) skewX(0deg); }
  30% { transform: scale(.94, 1.06) skewX(2.5deg); }
  60% { transform: scale(1.04, .95) skewX(-2deg); }
  80% { transform: scale(.97, 1.03) skewX(1deg); }
}
.memorial-count { margin-top: 20px; color: var(--muted); font-size: .9rem; letter-spacing: .12em; }
.memorial-count.all-lit { color: var(--gold); text-shadow: 0 0 16px rgba(212, 162, 74, .5); }

/* 今日上田 */
.today-section { text-align: center; }
.today-text { color: var(--cream-dim); max-width: 580px; margin: 0 auto 20px; }
.today-hero img, .today-sub img {
  width: 100%;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid rgba(212, 162, 74, .4);
  box-shadow: var(--shadow);
}
.today-hero img { max-height: 320px; }
.today-sub { margin-top: 18px; }
.today-sub img { max-height: 220px; }
.today-line {
  font-family: var(--font-title);
  font-weight: 900;
  font-size: clamp(1.8rem, 4.5vw, 2.8rem);
  color: var(--gold);
  letter-spacing: .3em;
  margin-top: 30px;
  text-shadow: 0 0 30px rgba(212, 162, 74, .4);
}
.tribute-line {
  margin-top: 14px;
  color: var(--muted);
  font-size: .9rem;
  letter-spacing: .18em;
}

.product-band-items {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 6px 2px 14px;
}
.product-band-items .product-card { flex-basis: 148px; }
.truth-actions { text-align: center; margin-top: 44px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 36px;
  transform: translateX(-50%);
  background: rgba(13, 15, 14, .96);
  border: 1px solid var(--gold);
  color: var(--cream);
  padding: 12px 26px;
  border-radius: 999px;
  box-shadow: var(--shadow);
  z-index: 99;
  animation: toast-in .3s ease both;
  font-size: .92rem;
  letter-spacing: .06em;
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---------- 平板适配 ---------- */
@media (max-width: 960px) {
  .home-hero { grid-template-columns: 1fr; gap: 26px; min-height: auto; }
  .home-cover-wrap { max-height: 340px; }
  .notice-panel { grid-template-columns: 1fr; }
  .dm-body { grid-template-columns: 1fr; }
  .dm-topbar { position: static; }
  .stage-clock { font-size: 2.3rem; }
  .char-grid { grid-template-columns: repeat(2, 1fr); }
  .stage-seg { font-size: 0; }
  .stage-seg::before { content: attr(data-n); font-size: .72rem; }
  .stage-seg.active { font-size: .72rem; }
  .stage-seg.active::before { content: none; }
  .dm-controls { margin-left: 0; }
}
@media (max-width: 560px) {
  .char-grid { grid-template-columns: 1fr; }
  .vote-grid { grid-template-columns: repeat(2, 1fr); }
  .home-btns { flex-direction: column; align-items: stretch; }
  .memorial-wall { gap: 12px 14px; }
}

/* ---------- 减少动态 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .ember { animation: none; opacity: 0; }
  .btn-glow::before { animation: none; }
  .candle.lit .flame { animation: none; }
  .tl-item { opacity: 1; transform: none; }
}
