/* 魂百景 PWA · 移植自 v5.1 定稿 mockup（2026-11-03-glass-preview.html）
 * 全黑背景 / brand 行+朱砂印 / tagline / 竖向滚轮 / 124px 横条卡
 * AI 评内联（楷体两行钳制）/ 沉浸式头部 --collapse / 镭射 sweep
 */
:root {
  --bg: #0d0a07;
  --card: #191410;
  --ink-1: #f4efe6;
  --ink-2: #b3a894;
  --ink-3: #7d7261;
  --accent: #D9642A;
  --gold: #C9A25E;
  --gold-l: #E3C584;
  --seal: #B03A2E;
  --green: #2F7A55;
  --f-serif: "Noto Serif SC", "Songti SC", serif;
  --f-boss: "Cormorant Garamond", "Songti SC", serif;
  --f-kai: "Kaiti SC", "STKaiti", "KaiTi", "Noto Serif SC", serif;
  --f-mono: "Geist Mono", ui-monospace, monospace;
  --ease-ui: cubic-bezier(0.23, 1, 0.32, 1);
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { overflow-x: clip; height: 100%; }
body { background: var(--bg); color: var(--ink-1); font-family: -apple-system, "PingFang SC", sans-serif; line-height: 1.5; }

.screen { position: relative; width: 100%; height: 100vh; height: 100dvh; background: var(--bg); overflow: hidden; }

.brandrow {
  display: flex; justify-content: space-between; align-items: center;
  padding: calc(14px + env(safe-area-inset-top)) 24px 0;
  opacity: calc(1 - var(--collapse, 0) * 1.4);
  transform: translateY(calc(var(--collapse, 0) * -22px));
}
.brandrow .brand { font-family: var(--f-serif); font-size: 1.25rem; font-weight: 700; letter-spacing: 0.14em; }
.brandrow .right { display: flex; align-items: center; gap: 10px; }
.brandrow .sync { font-family: var(--f-mono); font-size: 0.5625rem; color: var(--ink-3); letter-spacing: 0.1em; white-space: nowrap; }
.brandrow .sync i { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--green); margin-right: 5px; vertical-align: 1px; }
.brandrow .sync.offline i { background: var(--accent); }
.brandrow .notice {
  font-family: var(--f-mono); font-size: 0.5625rem; color: var(--gold-l);
  letter-spacing: 0.1em; border: 1px solid rgba(227, 197, 132, 0.4);
  border-radius: 3px; padding: 1px 5px; white-space: nowrap;
}
.seal {
  width: 32px; height: 32px; flex: none;
  background: var(--seal); color: #f7ead8;
  font-family: var(--f-kai); font-weight: 700; font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: 5px; transform: rotate(-4deg);
  box-shadow: 0 2px 8px rgba(176, 58, 46, 0.4);
}
.tagline {
  text-align: center; margin-top: 14px;
  opacity: calc(1 - var(--collapse, 0) * 1.6);
  transform: translateY(calc(var(--collapse, 0) * -16px));
}
.tagline .serif { font-family: var(--f-boss); font-size: 1.125rem; font-weight: 600; letter-spacing: 0.14em; }
.tagline .mono { margin-top: 6px; font-family: var(--f-mono); font-size: 0.625rem; letter-spacing: 0.2em; color: var(--ink-3); }
.tagline .mono b { color: var(--gold-l); font-weight: 500; }

/* ── 满屏大卡滚轮 ── */
.drum { position: absolute; top: 178px; left: 0; right: 0; bottom: 0; perspective: 1200px; touch-action: none; cursor: grab; }
.drum.grabbing { cursor: grabbing; }
.bigcard {
  position: absolute; left: 16px; right: 16px; top: calc(50% - 133px);
  height: 124px; margin-top: -62px;
  border-radius: 14px; overflow: hidden;
  background: var(--card);
  display: grid; grid-template-columns: 128px minmax(0, 1fr);
  box-shadow: 0 20px 60px -14px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 240, 220, 0.1);
  transform: translateY(calc(var(--y) * 1px)) scale(var(--sc));
  opacity: var(--op);
  will-change: transform, opacity;
}
.bigcard .art { position: relative; height: 100%; overflow: hidden; }
.bigcard .art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.bigcard .art::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(160deg, transparent 55%, rgba(13, 10, 7, 0.45));
}
.bigcard .clear-mark {
  font-family: var(--f-mono); font-size: 0.625rem; color: var(--gold-l);
  letter-spacing: 0.08em; white-space: nowrap;
}
.bigcard .body { padding: 11px 16px 10px 16px; min-width: 0; }
.bigcard .grow { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.bigcard .clear-mark { flex: none; }
.bigcard .zh { font-family: var(--f-serif); font-size: 1.0625rem; font-weight: 700; letter-spacing: 0.02em; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bigcard .hrs { font-family: var(--f-mono); font-size: 0.75rem; color: var(--ink-1); font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bigcard .meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 4px; font-family: var(--f-mono); font-size: 0.625rem; color: var(--ink-2); font-variant-numeric: tabular-nums; min-width: 0; }
.bigcard .meta > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bigcard .meta .done { color: var(--gold-l); flex: none; }
.bigcard .rbar { margin-top: 7px; height: 3px; border-radius: 2px; background: rgba(244, 239, 230, 0.1); overflow: hidden; }
.bigcard .rbar i { display: block; height: 100%; border-radius: 2px; background: var(--gold); }
.bigcard .verdict {
  margin-top: 7px; font-family: var(--f-kai); font-size: 0.8125rem; line-height: 1.5;
  color: var(--ink-2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.bigcard .verdict::before { content: "AI 评　"; font-family: var(--f-mono); font-size: 0.5625rem; color: var(--accent); letter-spacing: 0.12em; margin-right: 6px; }
.bigcard .flash {
  position: absolute; inset: 0; z-index: 5; pointer-events: none; opacity: 0;
  mix-blend-mode: color-dodge;
  background: linear-gradient(115deg, transparent 20%, rgba(255,119,115,.5) 32%, rgba(255,214,90,.44) 43%, rgba(90,255,165,.42) 54%, rgba(90,165,255,.5) 65%, rgba(214,130,255,.46) 76%, transparent 88%);
  background-size: 300% 100%; background-position: 120% 0;
}
.bigcard.flash-play .flash { animation: holo-sweep 860ms var(--ease-ui) forwards; }
@keyframes holo-sweep {
  0% { opacity: 0; background-position: 120% 0; }
  18% { opacity: 1; }
  82% { opacity: 1; }
  100% { opacity: 0; background-position: -20% 0; }
}
.hint {
  position: absolute; bottom: 20px; padding-bottom: env(safe-area-inset-bottom);
  left: 0; right: 0; text-align: center;
  font-family: var(--f-mono); font-size: 0.5625rem; letter-spacing: 0.22em;
  color: rgba(244, 239, 230, 0.35); z-index: 20;
  opacity: calc(1 - var(--collapse, 0));
}

/* ── 访问令牌弹层 ── */
.gate {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(13, 10, 7, 0.92);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.gate[hidden] { display: none; }
.gate-card {
  width: 100%; max-width: 300px;
  background: var(--card); border: 1px solid rgba(255, 240, 220, 0.12);
  border-radius: 14px; padding: 28px 24px 24px;
  text-align: center;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.9);
}
.gate-seal {
  width: 44px; height: 44px; margin: 0 auto;
  background: var(--seal); color: #f7ead8;
  font-family: var(--f-kai); font-weight: 700; font-size: 1.375rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: 7px; transform: rotate(-4deg);
  box-shadow: 0 2px 8px rgba(176, 58, 46, 0.4);
}
.gate-title { margin-top: 12px; font-family: var(--f-serif); font-size: 1.125rem; font-weight: 700; letter-spacing: 0.14em; }
.gate-sub { margin-top: 4px; font-family: var(--f-mono); font-size: 0.625rem; letter-spacing: 0.18em; color: var(--ink-3); }
.gate-card input {
  width: 100%; margin-top: 16px;
  background: rgba(244, 239, 230, 0.06); color: var(--ink-1);
  border: 1px solid rgba(255, 240, 220, 0.16); border-radius: 8px;
  padding: 10px 12px; font-family: var(--f-mono); font-size: 0.875rem;
  outline: none;
}
.gate-card input:focus { border-color: rgba(201, 162, 94, 0.6); }
.gate-error { margin-top: 8px; font-family: var(--f-mono); font-size: 0.625rem; color: var(--accent); letter-spacing: 0.1em; }
.gate-card button {
  width: 100%; margin-top: 14px;
  background: var(--gold); color: #1d1610;
  border: none; border-radius: 8px; padding: 10px 0;
  font-family: var(--f-serif); font-size: 0.9375rem; font-weight: 700; letter-spacing: 0.2em;
}
.gate-card button:active { opacity: 0.85; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* Task 10 运维兜底：PSN 令牌过期提示条（快照 psn_auth_failed=true 时显示）
 * 暖橙底 #D9642A 20% 透明，固定吸顶不随滚动消失（滚轮墙不产生页面滚动，
 * fixed 是为了覆盖在卡片墙上层，z-index 900 也高于 gate 弹层(100)——
 * 令牌弹层打开时横幅依然可见，运维提示优先级最高） */
.auth-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 900;
  padding: calc(env(safe-area-inset-top, 0px) + 8px) 16px 8px;
  background: rgba(217, 100, 42, 0.2);
  border-bottom: 1px solid rgba(217, 100, 42, 0.45);
  color: var(--gold-l);
  font-family: var(--f-mono); font-size: 0.6875rem; letter-spacing: 0.12em;
  text-align: center; pointer-events: none;
}
.auth-banner[hidden] { display: none; }
