/* 黑暗森林 · 30 局回放：全屏的深空，字都浮在玻璃上 */
@font-face { font-family: "SG"; src: url("/fonts/space-grotesk.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #03050a;
  --ink: #eef1f7;
  --ink-2: #c9d0de;
  --dim: #8c95a8;
  --faint: #5d6679;
  --line: rgba(220, 230, 255, 0.13);
  --line-2: rgba(220, 230, 255, 0.22);
  --glass: rgba(10, 13, 24, 0.62);
  --glass-hi: rgba(18, 24, 40, 0.84);
  --claude: #e8845e;
  --gpt: #8fd3ff;
  --red: #ff4a3d;
  --lime: #c8f03c;
  --gold: #ffe3a6;
  --sans: "Inter", system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --num: "SG", "Inter", system-ui, sans-serif;
  --dock-h: 96px;
  --lab-bottom: 62%;
  --top-reserve: 92px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--ink); font: 400 15px/1.55 var(--sans); -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button:disabled { cursor: default; opacity: 0.35; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
svg { display: block; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }

#app { position: fixed; inset: 0; overflow: hidden; user-select: none; -webkit-user-select: none; }
#gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
#gl:active { cursor: grabbing; }
[data-who="claude"] { --c: var(--claude); }
[data-who="gpt"] { --c: var(--gpt); }

/* ---------- 贴在星球上的字 ---------- */
.fxl { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.plab { position: absolute; left: 0; top: 0; width: 220px; margin-left: -110px; display: flex; flex-direction: column; align-items: center; text-align: center; will-change: transform; }
.pl-name { font: 600 12px/1.2 var(--sans); letter-spacing: 0.06em; color: var(--c, var(--ink)); text-shadow: 0 0 12px rgba(0, 0, 0, 0.9); white-space: nowrap; }
.pl-tech { margin-top: 2px; font: 500 38px/1 var(--num); color: #fff; text-shadow: 0 0 18px color-mix(in srgb, var(--c, #fff) 70%, transparent), 0 0 2px rgba(0, 0, 0, 0.6); font-variant-numeric: tabular-nums; }
.pl-tech.bump { animation: bump 520ms cubic-bezier(0.2, 1.6, 0.4, 1); }
@keyframes bump { 0% { transform: scale(1); } 35% { transform: scale(1.32); color: var(--c); } 100% { transform: scale(1); } }
.pl-sub { margin-top: 3px; min-height: 16px; font-size: 11.5px; line-height: 16px; color: var(--dim); white-space: nowrap; }
.plab[data-dead="1"] .pl-tech { color: var(--red); text-shadow: 0 0 16px rgba(255, 74, 61, 0.6); }
.plab[data-dead="1"] .pl-sub { color: #ff8a80; }
.poollab { position: absolute; left: 0; top: 0; width: 160px; margin-left: -80px; text-align: center; font: 600 11.5px/1.3 var(--sans); letter-spacing: 0.08em; color: #b9d27a; text-shadow: 0 0 10px rgba(0, 0, 0, 0.9); will-change: transform; }
.poollab[data-empty="1"] { color: #a0866e; }
.fl { position: absolute; left: 0; top: 0; width: 200px; margin-left: -100px; text-align: center; font: 700 15px/1.2 var(--sans); color: #fff; text-shadow: 0 0 14px rgba(0, 0, 0, 0.95), 0 0 2px #000; white-space: nowrap; will-change: transform, opacity; }
.fl[data-kind="up"], .fl[data-kind="found"] { color: #e4ff9c; }
.fl[data-kind="boom"] { color: #fff2c4; font-size: 17px; }
.fl[data-kind="miss"] { color: var(--dim); font-weight: 600; }
.fl[data-kind="dead"] { color: #ff6b5e; font-size: 18px; letter-spacing: 0.1em; }
.fl[data-kind="signal"] { color: #d7e6ff; }
.fl[data-kind="coop"] { color: #fff0cc; }

/* ---------- 大时刻：开枪、被消灭、第一次合作、第一次找到对方 ---------- */
.moment { position: absolute; z-index: 4; left: 50%; top: 18%; transform: translate(-50%, 6px) scale(0.98); width: max-content; max-width: calc(100% - 32px); padding: 0 4px; text-align: center; pointer-events: none; font: 300 clamp(22px, 3.6vw, 40px)/1.2 var(--sans); letter-spacing: 0.18em; color: #fff; text-shadow: 0 0 30px rgba(0, 0, 0, 0.9), 0 0 3px rgba(0, 0, 0, 0.9); opacity: 0; filter: blur(4px); transition: opacity 360ms ease, transform 600ms cubic-bezier(0.2, 1, 0.3, 1), filter 360ms ease; }
.moment[data-on="1"] { opacity: 1; transform: translate(-50%, 0) scale(1); filter: blur(0); }
.moment[data-kind="fire"] { color: #ffb3a8; }
.moment[data-kind="killed"] { color: #ff6b5e; font-weight: 400; text-shadow: 0 0 34px rgba(255, 74, 61, 0.55), 0 0 3px #000; }
.moment[data-kind="missed"] { color: #ffc9a0; }
.moment[data-kind="allied"] { color: var(--gold); }
.moment[data-kind="found"] { color: #cfe6ff; }
html[lang="en"] .moment { letter-spacing: 0.06em; }

/* ---------- 顶上：哪一局（点开换一局）、声音、这是什么 ---------- */
.top { position: absolute; top: 0; left: 0; right: 0; z-index: 5; display: flex; align-items: center; gap: 12px; padding: max(12px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) 0 calc(max(14px, env(safe-area-inset-left)) + var(--top-reserve)); pointer-events: none; }
.top > * { pointer-events: auto; }
.title-btn { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; padding: 4px 8px; border-radius: 10px; text-align: left; }
.tt-a { font: 600 15px/1.25 var(--sans); letter-spacing: 0.02em; color: var(--ink); white-space: nowrap; }
.tt-a::after { content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 0 3px 8px; border-right: 1.5px solid var(--dim); border-bottom: 1.5px solid var(--dim); transform: rotate(45deg); }
.tt-b { font: 500 12.5px/1.3 var(--sans); color: var(--dim); white-space: nowrap; }
.title-btn:hover .tt-a { text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 4px; }
.tools { display: flex; gap: 6px; margin-left: auto; flex: none; }
.ibtn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; color: var(--ink-2); background: var(--glass); border: 1px solid var(--line); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); transition: background 150ms, color 150ms, transform 90ms; }
.ibtn:hover:not(:disabled) { background: var(--glass-hi); color: #fff; }
.ibtn:active:not(:disabled) { transform: scale(0.94); }
.ibtn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.snd .s-off { display: none; }
.snd[aria-pressed="false"] .s-on { display: none; }
.snd[aria-pressed="false"] .s-off { display: block; }
.snd[aria-pressed="false"] { color: var(--faint); }

/* ---------- 两边的理由卡 ---------- */
.cards { position: absolute; z-index: 3; left: max(14px, env(safe-area-inset-left)); right: max(14px, env(safe-area-inset-right)); top: calc(var(--lab-bottom) + 10px); bottom: calc(var(--dock-h) + 6px); display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; pointer-events: none; }
.card { pointer-events: auto; width: min(400px, 31vw, calc(50% - 8px)); max-height: 100%; display: flex; flex-direction: column; border-radius: 16px; background: var(--glass); border: 1px solid var(--line); -webkit-backdrop-filter: blur(16px) saturate(1.3); backdrop-filter: blur(16px) saturate(1.3); box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35); overflow: hidden; border-top: 2px solid color-mix(in srgb, var(--c, var(--ink)) 70%, transparent); transition: opacity 300ms; }
.card[data-dead="1"] { opacity: 0.45; }
.cd-top { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 14px 0; }
.cd-who { display: inline-flex; align-items: center; gap: 7px; min-width: 0; font-size: 13px; color: var(--c); }
.cd-who b { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px var(--c); }
.cd-head { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.cd-ep { font: 600 12px/1 var(--num); color: var(--dim); letter-spacing: 0.04em; white-space: nowrap; }
.chip { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px 0 6px; border-radius: 999px; font-size: 12px; font-weight: 650; background: rgba(238, 241, 247, 0.08); color: var(--ink); border: 1px solid var(--line); white-space: nowrap; }
.chip .ic { width: 14px; height: 14px; }
.chip[data-act="strike"] { background: rgba(255, 74, 61, 0.16); border-color: rgba(255, 74, 61, 0.5); color: #ffb0a8; }
.chip[data-act="coop"] { background: rgba(255, 228, 160, 0.1); border-color: rgba(255, 228, 160, 0.35); color: #ffe9b8; }
.chip[data-act="search"] { color: #cfe3ff; }
.chip[data-act="dev"] { color: #e2f7b4; }
.chip[data-act="signal"] { background: rgba(143, 211, 255, 0.1); color: #d7ecff; }
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cd-body { position: relative; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 8px 14px 13px; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; user-select: text; -webkit-user-select: text; }
.cd-body[data-fade="top"] { -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 22px); mask-image: linear-gradient(to bottom, transparent 0, #000 22px); }
.cd-body[data-fade="bottom"] { -webkit-mask-image: linear-gradient(to top, transparent 0, #000 22px); mask-image: linear-gradient(to top, transparent 0, #000 22px); }
.cd-body[data-fade="both"] { -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 22px, #000 calc(100% - 22px), transparent 100%); mask-image: linear-gradient(to bottom, transparent 0, #000 22px, #000 calc(100% - 22px), transparent 100%); }
.cd-text { font-size: 14.5px; line-height: 1.65; color: var(--ink); white-space: pre-wrap; }
.cd-text[data-kind="note"] { color: var(--dim); }
.cd-text[data-typing]::after { content: ""; display: inline-block; width: 7px; height: 1em; margin-left: 2px; vertical-align: -2px; background: var(--c, var(--ink)); opacity: 0.75; animation: caret 0.9s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.cd-msg { margin-top: 9px; padding: 8px 10px; border-radius: 10px; background: rgba(143, 211, 255, 0.07); border: 1px dashed rgba(143, 211, 255, 0.3); font-size: 14px; line-height: 1.55; }
.cd-msg-l { display: block; font-size: 11px; font-weight: 650; letter-spacing: 0.06em; color: var(--dim); margin-bottom: 2px; }
.cd-msg-t { color: #e4f2ff; }

/* ---------- 底栏：选局、播放、时间轴、倍速 ---------- */
.dock { position: absolute; z-index: 6; left: 0; right: 0; bottom: 0; padding: 14px max(16px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); display: flex; align-items: center; gap: 14px; background: linear-gradient(to top, rgba(3, 5, 10, 0.92) 30%, rgba(3, 5, 10, 0)); pointer-events: none; }
.dock > * { pointer-events: auto; }
.transport { display: flex; align-items: center; gap: 6px; flex: none; }
.ibtn.big { width: 48px; height: 48px; background: rgba(238, 241, 247, 0.92); color: #0b0e16; border-color: transparent; }
.ibtn.big:hover:not(:disabled) { background: #fff; color: #000; }
.ibtn.big svg { width: 22px; height: 22px; }
.speed { flex: none; min-width: 44px; height: 32px; padding: 0 10px; border-radius: 999px; font: 600 13px/1 var(--num); color: var(--ink-2); border: 1px solid var(--line); background: var(--glass); }
.timeline { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 2px; overflow-x: auto; scrollbar-width: none; padding: 2px 0; }
.timeline::-webkit-scrollbar { display: none; }
.tl-n { position: relative; flex: none; width: 46px; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px 0; border-radius: 12px; color: var(--faint); transition: background 160ms, color 160ms; }
.tl-n:hover { background: rgba(238, 241, 247, 0.06); color: var(--ink-2); }
.tl-d { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; font: 600 12.5px/1 var(--num); border: 1px solid var(--line); background: rgba(10, 13, 24, 0.6); }
.tl-a { height: 15px; display: grid; place-items: center; opacity: 0.55; }
.tl-a .ic { width: 15px; height: 15px; stroke-width: 2; }
.tl-n .tl-a:first-child { color: var(--claude); }
.tl-n .tl-a:last-child { color: var(--gpt); }
.tl-a[data-act="strike"] { color: var(--red) !important; opacity: 1; }
.tl-a[data-act="coop"] { opacity: 0.9; }
.tl-a[data-sig="1"]::after { content: ""; position: absolute; width: 4px; height: 4px; margin: -9px 0 0 14px; border-radius: 50%; background: #d7ecff; }
.tl-n[data-state="past"] { color: var(--ink-2); }
.tl-n[data-state="past"] .tl-a { opacity: 0.85; }
.tl-n[data-state="now"] { color: #0b0e16; }
.tl-n[data-state="now"] .tl-d { background: var(--ink); border-color: var(--ink); box-shadow: 0 0 0 4px rgba(238, 241, 247, 0.14); }
.tl-n[data-state="now"] .tl-a { opacity: 1; }
.tl-n[data-strike="hit"] .tl-d { border-color: var(--red); color: #ffb3ab; }
.tl-n[data-strike="miss"] .tl-d { border-color: rgba(255, 74, 61, 0.55); border-style: dashed; }
.tl-n[data-coop="1"] .tl-d { border-color: rgba(255, 228, 160, 0.6); }
.tl-n[data-state="now"][data-strike="hit"] .tl-d { background: var(--red); border-color: var(--red); color: #fff; }

.pill { position: relative; height: 38px; display: inline-flex; align-items: center; gap: 7px; padding: 0 16px; border-radius: 999px; font-weight: 600; font-size: 13.5px; color: var(--ink); background: var(--glass); border: 1px solid var(--line); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); white-space: nowrap; overflow: hidden; }
.pill svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.pill:hover { background: var(--glass-hi); }
.pill.accent { background: var(--lime); color: #10140a; border-color: transparent; }
.pill.accent:hover { background: #d8fb5a; }

/* ---------- 一局放完 ---------- */
.endcard { position: absolute; z-index: 7; left: 50%; bottom: calc(var(--dock-h) + 14px); transform: translate(-50%, 10px); width: min(560px, calc(100% - 24px)); padding: 14px 16px 12px; border-radius: 18px; text-align: center; background: var(--glass-hi); border: 1px solid var(--line-2); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); opacity: 0; transition: opacity 300ms, transform 400ms cubic-bezier(0.2, 1, 0.3, 1); }
.endcard[data-on="1"] { opacity: 1; transform: translate(-50%, 0); }
.ec-t { font-size: 15.5px; font-weight: 650; line-height: 1.5; }
.ec-b { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.ec-bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: rgba(16, 20, 10, 0.35); transform-origin: left; transform: scaleX(0); }
.endcard[data-count="1"] .ec-bar { animation: next-in var(--next-in, 12s) linear forwards; }
@keyframes next-in { to { transform: scaleX(1); } }

/* ---------- 弹层：30 局、这是什么 ---------- */
.sheet { position: absolute; inset: 0; z-index: 20; display: grid; place-items: center; padding: 16px; background: rgba(2, 3, 8, 0.5); opacity: 0; transition: opacity 220ms; }
.sheet[data-on="1"] { opacity: 1; }
.sh-card { position: relative; width: min(560px, 100%); max-height: calc(100% - 8px); overflow-y: auto; overscroll-behavior: contain; padding: 18px 20px 20px; border-radius: 22px; background: rgba(12, 16, 28, 0.86); border: 1px solid var(--line-2); -webkit-backdrop-filter: blur(22px) saturate(1.3); backdrop-filter: blur(22px) saturate(1.3); box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55); transform: translateY(14px) scale(0.98); transition: transform 300ms cubic-bezier(0.2, 1, 0.3, 1); scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; user-select: text; -webkit-user-select: text; }
.sheet[data-on="1"] .sh-card { transform: none; }
.sh-card.wide { width: min(760px, 100%); }
.sh-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.sh-top h2 { font-size: 19px; font-weight: 700; letter-spacing: 0.01em; }
.sh-top .ibtn { width: 36px; height: 36px; flex: none; }
.sh-lead { color: var(--ink-2); font-size: 14.5px; line-height: 1.65; margin-bottom: 4px; }
.sh-p { color: var(--ink-2); font-size: 14px; line-height: 1.65; margin-top: 10px; }
.sh-note { color: var(--dim); font-size: 12.5px; line-height: 1.6; margin-top: 12px; }
.sh-card h3 { font-size: 13px; font-weight: 650; letter-spacing: 0.06em; color: var(--dim); margin: 18px 0 8px; }
.rl { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.rl li { display: grid; grid-template-columns: 22px 64px 1fr; gap: 8px; align-items: start; font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.rl li b { color: var(--ink); font-weight: 650; }
.rl .ic { margin-top: 1px; }
.rl li[data-act="strike"] .ic { color: #ff9a8f; }
.rl li[data-act="dev"] .ic { color: #d7f77a; }
.rl li[data-act="search"] .ic { color: #b9dcff; }
.rl li[data-act="coop"] .ic { color: #ffe3a6; }
.rl li[data-act="signal"] .ic { color: #d7ecff; }
html[lang="en"] .rl li { grid-template-columns: 22px 82px 1fr; }
.lg { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; color: var(--ink-2); }
.lg li { display: flex; align-items: center; gap: 10px; }
.lg i { width: 22px; height: 12px; flex: none; }
.lg [data-k="crystal"] i { background: linear-gradient(135deg, #e9ffb0, #a8d23c); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.lg [data-k="dash"] i { background: repeating-linear-gradient(90deg, var(--claude) 0 5px, transparent 5px 9px); height: 2px; }
.lg [data-k="ring"] i { border: 1.5px solid #ffd6bd; border-radius: 50%; height: 10px; }

/* 出自哪一期视频 */
.vid { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); background: rgba(238, 241, 247, 0.04); }
.vid:hover { background: rgba(238, 241, 247, 0.08); }
.vid-c { flex: none; width: 112px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; background: #111726; }
.vid-x { display: flex; flex-direction: column; gap: 2px; min-width: 0; text-align: left; }
.vid-l { font-size: 11.5px; letter-spacing: 0.06em; color: var(--dim); }
.vid-t { font-weight: 650; font-size: 14px; line-height: 1.45; }
.vid-g { font-size: 12.5px; font-weight: 600; color: var(--lime); }
.vid.mini { margin-top: 10px; padding: 8px 10px; gap: 10px; }
.vid.mini .vid-c { width: 72px; border-radius: 6px; }
.vid.mini .vid-t { font-size: 12.5px; font-weight: 600; }
.vid.mini .vid-g { display: none; }

/* 选局 */
.gl-u { margin-top: 14px; }
.gl-u:first-child { margin-top: 4px; }
.gl-u h3 { margin: 0 0 8px; display: flex; align-items: baseline; gap: 10px; font-size: 14px; color: var(--ink); letter-spacing: 0.02em; }
.gl-u h3 small { font-size: 12px; font-weight: 500; color: var(--dim); letter-spacing: 0; }
.gl-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.gt-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 3px; border-radius: 14px; border: 1px dashed var(--line); }
.gt { position: relative; height: 58px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border-radius: 11px; background: rgba(238, 241, 247, 0.05); border: 1px solid var(--line); transition: background 150ms, border-color 150ms; }
.gt:hover { background: rgba(238, 241, 247, 0.1); }
.gt[aria-current="true"] { border-color: var(--ink); background: rgba(238, 241, 247, 0.14); }
.gt-n { font: 600 11px/1 var(--num); color: var(--dim); }
.gt-s { display: flex; align-items: center; gap: 4px; font: 600 14px/1 var(--num); }
.gt-s b[data-who="claude"] { color: var(--claude); }
.gt-s b[data-who="gpt"] { color: var(--gpt); }
.gt-s i { width: 3px; height: 3px; border-radius: 50%; background: var(--faint); }
.gt-e { position: absolute; top: 4px; right: 5px; font: 700 10px/1 var(--num); color: #ff8a80; }
.gt[data-kind="fired"] { border-color: rgba(255, 74, 61, 0.45); background: rgba(255, 74, 61, 0.09); }
.gt[data-kind="allied"]::after { content: ""; position: absolute; bottom: 5px; width: 14px; height: 2px; border-radius: 2px; background: var(--gold); }
.gt[data-kind="apart"] { opacity: 0.7; }
.gl-legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 12px; font-size: 12px; color: var(--dim); }
.gl-legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 3px; vertical-align: -1px; border: 1px solid var(--line-2); }
.gl-legend [data-k="fired"]::before { background: rgba(255, 74, 61, 0.35); border-color: rgba(255, 74, 61, 0.6); }
.gl-legend [data-k="allied"]::before { background: var(--gold); height: 3px; border: 0; vertical-align: 2px; }
.gl-legend [data-k="apart"]::before { opacity: 0.6; }

.nogl { position: absolute; z-index: 4; left: 50%; top: 30%; transform: translateX(-50%); width: min(420px, 90%); text-align: center; color: var(--dim); font-size: 14px; }
#app[data-nogl="1"] { background: radial-gradient(ellipse at 50% 30%, #121a33, #03050a 70%); }
#app[data-nogl="1"] .fxl { display: none; }
#app[data-nogl="1"] .cards { top: 42%; }

/* ---------- 手机竖屏：标题挪进顶上那一行，时间轴瘦一点，两张卡按字多字少分地方 ---------- */
#app[data-layout="portrait"] { --top-reserve: 58px; }
#app[data-layout="portrait"] .top { gap: 6px; padding-top: max(10px, env(safe-area-inset-top)); padding-right: max(10px, env(safe-area-inset-right)); }
#app[data-layout="portrait"] .title-btn { padding: 2px 6px; }
#app[data-layout="portrait"] .tt-a { font-size: 14px; }
#app[data-layout="portrait"] .tt-b { font-size: 12px; }
#app[data-layout="portrait"] .tools { gap: 4px; }
#app[data-layout="portrait"] .tools .ibtn { width: 36px; height: 36px; }
#app[data-layout="portrait"] .plab { width: 160px; margin-left: -80px; }
#app[data-layout="portrait"] .pl-name { font-size: 11px; }
#app[data-layout="portrait"] .pl-tech { font-size: 28px; }
#app[data-layout="portrait"] .pl-sub { font-size: 10.5px; min-height: 14px; line-height: 14px; }
#app[data-layout="portrait"] .plab:not([data-dead="1"]) .pl-sub { display: none; }
#app[data-layout="portrait"] .moment { top: 13%; font-size: 24px; letter-spacing: 0.12em; }
#app[data-layout="portrait"] .cards { flex-direction: column; justify-content: flex-start; align-items: stretch; gap: 7px; left: 10px; right: 10px; top: calc(var(--lab-bottom) + 4px); bottom: calc(var(--dock-h) + 4px); }
#app[data-layout="portrait"] .card { width: 100%; flex: 0 1 auto; min-height: 58px; max-height: none; border-radius: 14px; }
#app[data-layout="portrait"] .cd-top { padding: 8px 12px 0; }
#app[data-layout="portrait"] .cd-who { font-size: 12.5px; }
#app[data-layout="portrait"] .chip { height: 20px; font-size: 11.5px; }
#app[data-layout="portrait"] .cd-body { padding: 5px 12px 9px; }
#app[data-layout="portrait"] .cd-text { font-size: 13.5px; line-height: 1.55; }
html[lang="en"] #app[data-layout="portrait"] .cd-text { font-size: 13px; line-height: 1.5; }
#app[data-layout="portrait"] .cd-msg { margin-top: 6px; padding: 6px 9px; font-size: 13px; }
#app[data-layout="portrait"] .dock { flex-wrap: wrap; justify-content: space-between; gap: 6px 6px; padding-top: 8px; padding-bottom: max(10px, env(safe-area-inset-bottom)); }
#app[data-layout="portrait"] .timeline { order: -1; flex-basis: 100%; justify-content: space-between; gap: 0; }
#app[data-layout="portrait"] .tl-n { width: auto; flex: 1 1 0; max-width: 34px; padding: 2px 0; gap: 0; }
#app[data-layout="portrait"] .tl-a { display: none; }
#app[data-layout="portrait"] .tl-d { width: 24px; height: 24px; font-size: 11.5px; }
#app[data-layout="portrait"] .transport { gap: 4px; }
#app[data-layout="portrait"] .transport .ibtn { width: 38px; height: 38px; }
#app[data-layout="portrait"] .transport .ibtn.big { width: 46px; height: 46px; }
#app[data-layout="portrait"] .gamesbtn { width: 38px; height: 38px; }
#app[data-layout="portrait"] .sheet { place-items: end stretch; padding: 10px 8px max(8px, env(safe-area-inset-bottom)); }
#app[data-layout="portrait"] .sh-card { width: 100%; max-height: 86%; border-radius: 22px; padding: 16px 16px 18px; }
#app[data-layout="portrait"] .gl-row { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; }
#app[data-layout="portrait"] .gt-pair { grid-template-columns: 1fr; padding: 2px; gap: 2px; border-radius: 12px; }
#app[data-layout="portrait"] .gt { height: 46px; border-radius: 10px; }
#app[data-layout="portrait"] .endcard { bottom: calc(var(--dock-h) + 10px); padding: 12px 12px 10px; }
#app[data-layout="portrait"] .ec-t { font-size: 14.5px; }
#app[data-layout="portrait"] .vid-c { width: 96px; }
@media (max-width: 360px) {
  #app[data-layout="portrait"] .tt-b { display: none; }
}

/* ---------- 手机横屏（矮） ---------- */
#app[data-layout="short"] { --top-reserve: 60px; }
#app[data-layout="short"] .top { padding-top: max(8px, env(safe-area-inset-top)); }
#app[data-layout="short"] .tools .ibtn { width: 34px; height: 34px; }
#app[data-layout="short"] .pl-tech { font-size: 24px; }
#app[data-layout="short"] .pl-name { font-size: 11px; }
#app[data-layout="short"] .pl-sub { display: none; }
#app[data-layout="short"] .card { width: min(340px, 36vw); }
#app[data-layout="short"] .cd-top { padding: 7px 11px 0; }
#app[data-layout="short"] .cd-body { padding: 4px 11px 8px; }
#app[data-layout="short"] .cd-text { font-size: 12.5px; line-height: 1.5; }
#app[data-layout="short"] .tl-n { width: 38px; }
#app[data-layout="short"] .dock { padding-top: 6px; padding-bottom: max(6px, env(safe-area-inset-bottom)); }
#app[data-layout="short"] .ibtn.big { width: 42px; height: 42px; }
#app[data-layout="short"] .moment { top: 12%; font-size: 22px; }
#app[data-layout="short"] .sh-card { max-height: calc(100% - 4px); }

/* 平板、窄桌面：两张卡挤一点 */
@media (max-width: 1100px) { #app[data-layout="wide"] .card { width: min(360px, 38vw); } }

@media (prefers-reduced-motion: reduce) {
  .pl-tech.bump, .cd-text[data-typing]::after { animation: none; }
  .sh-card, .sheet, .moment { transition: none; }
  .moment { filter: none; }
}

/* ---------- 开机：包还在下载时先有一屏 ---------- */
.boot { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: radial-gradient(ellipse at 50% 45%, #0b1024 0%, #03050a 70%); }
.boot-t { margin: 0; font: 200 clamp(40px, 9vw, 88px)/1.05 var(--sans); letter-spacing: 0.32em; margin-right: -0.32em; color: #f4f6fb; opacity: 0.85; }
html[lang="en"] .boot-t { letter-spacing: 0.12em; margin-right: -0.12em; }
.boot-s { margin: 0; font-size: 13px; letter-spacing: 0.08em; color: var(--dim); animation: bootp 1.6s ease-in-out infinite; }
@keyframes bootp { 50% { opacity: 0.35; } }
