/* Cold Library — visual system
   Polar Night (dark, default) and Reading Room (light).
   Fonts: IBM Plex (OFL), self-hosted. Chinese falls back to system fonts. */

@font-face { font-family: "Plex Sans"; src: url("fonts/ibm-plex-sans-latin-300-normal.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Plex Sans"; src: url("fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Sans"; src: url("fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Plex Sans"; src: url("fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Plex Cond"; src: url("fonts/ibm-plex-sans-condensed-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Plex Cond"; src: url("fonts/ibm-plex-sans-condensed-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Plex Cond"; src: url("fonts/ibm-plex-sans-condensed-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --f-sans: "Plex Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", system-ui, sans-serif;
  --f-cond: "Plex Cond", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  --f-mono: "Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  /* Polar Night */
  --bg: #060a0f;
  --bg-2: #0a1118;
  --bg-3: #0f1922;
  --panel: rgba(16, 27, 37, 0.72);
  --panel-2: rgba(22, 36, 49, 0.86);
  --line: rgba(150, 205, 235, 0.13);
  --line-2: rgba(150, 205, 235, 0.26);
  --ink: #e4edf3;
  --ink-2: #a3b4c2;
  --ink-3: #6f8291;
  --ice: #a8e1ff;
  --ice-2: #69bfe9;
  --ice-3: #2f86b5;
  --glow: rgba(118, 201, 255, 0.32);
  --ember: #ff7b3f;
  --ember-2: #d0652e;
  --ember-glow: rgba(255, 123, 63, 0.35);
  --carpet: #5e6f5a;
  --paper: #efe8d8;
  --paper-2: #e4dbc6;
  --paper-ink: #222830;
  --paper-rule: rgba(60, 110, 160, 0.20);
  --stamp: #c24a2c;
  --lake: #3fb1b0;
  --lake-deep: #0d2a2f;
  --pine: #14251f;
  --pine-2: #1f3a31;
  --ridge-far: #1b2733;
  --ridge-near: #121c25;
  --snow: #dfe9f0;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  --radius: 14px;
  --maxw: 1180px;
  color-scheme: dark;
}

:root[data-theme="light"] {
  /* Reading Room */
  --bg: #edf1f4;
  --bg-2: #e3e9ee;
  --bg-3: #d8e0e7;
  --panel: rgba(255, 255, 255, 0.72);
  --panel-2: rgba(255, 255, 255, 0.9);
  --line: rgba(31, 36, 40, 0.11);
  --line-2: rgba(31, 36, 40, 0.22);
  --ink: #1f2428;
  --ink-2: #48535d;
  --ink-3: #6b7680;
  --ice: #1b6f99;
  --ice-2: #1e7fa8;
  --ice-3: #13587a;
  --glow: rgba(30, 127, 168, 0.18);
  --ember: #c8642d;
  --ember-2: #a9501f;
  --ember-glow: rgba(200, 100, 45, 0.22);
  --paper: #fbf8f1;
  --paper-2: #f1ecdf;
  --lake: #2a8f8c;
  --lake-deep: #b9d3d6;
  --pine: #2d4b42;
  --pine-2: #3d5f54;
  --ridge-far: #c3cfd9;
  --ridge-near: #a9b9c6;
  --snow: #ffffff;
  --shadow: 0 24px 60px rgba(31, 36, 40, 0.16);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: radial-gradient(1200px 700px at 70% -10%, rgba(80, 150, 200, 0.10), transparent 60%), var(--bg);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: 17px;
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
}
:root[data-theme="light"] body { background: radial-gradient(1200px 700px at 70% -10%, rgba(30, 127, 168, 0.08), transparent 60%), var(--bg); }
html[lang="zh-CN"] body { font-size: 17px; line-height: 1.8; letter-spacing: 0.01em; }

/* film grain */
body::after {
  content: "";
  position: fixed; inset: -50%;
  pointer-events: none; z-index: 60;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: 0.045;
  mix-blend-mode: overlay;
}
:root[data-theme="light"] body::after { opacity: 0.03; mix-blend-mode: multiply; }

@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out 260ms ease both; }
::view-transition-new(root) { animation: vt-in 380ms ease both; }
@keyframes vt-out { to { opacity: 0; filter: blur(4px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { ::view-transition-old(root), ::view-transition-new(root) { animation: none; } }

a { color: var(--ice); text-decoration: none; text-underline-offset: 3px; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--ice-2); outline-offset: 3px; border-radius: 4px; }
img { max-width: 100%; display: block; }
p { margin: 0 0 1em; }
strong { color: var(--ink); font-weight: 600; }
code, kbd, .mono { font-family: var(--f-mono); font-size: 0.9em; }
code { background: var(--bg-3); border: 1px solid var(--line); padding: 0.1em 0.38em; border-radius: 6px; }
pre { font-family: var(--f-mono); font-size: 0.86rem; line-height: 1.6; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; overflow-x: auto; color: var(--ink-2); }
hr { border: 0; border-top: 1px solid var(--line); margin: 48px 0; }
::selection { background: var(--ice-3); color: #fff; }

.wrap { width: min(var(--maxw), calc(100% - 32px)); margin: 0 auto; }
.narrow { width: min(760px, calc(100% - 32px)); margin: 0 auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ice); color: #000; padding: 8px 12px; border-radius: 8px; }
.skip:focus { top: 12px; }

/* ---------- type ---------- */
.label {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ice-2);
}
html[lang="zh-CN"] .label { letter-spacing: 0.12em; }
.label .dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--ice-2); box-shadow: 0 0 10px var(--glow); margin-right: 8px; vertical-align: 1px; }
.label.ember { color: var(--ember); }
.label.ember .dot { background: var(--ember); box-shadow: 0 0 10px var(--ember-glow); }

h1, h2, h3, h4 { margin: 0 0 0.5em; line-height: 1.08; font-weight: 600; letter-spacing: -0.01em; }
.display {
  font-family: var(--f-cond);
  font-weight: 600;
  font-size: clamp(2.6rem, 7vw, 6.2rem);
  line-height: 0.98;
  letter-spacing: -0.015em;
  text-transform: uppercase;
}
html[lang="zh-CN"] .display { text-transform: none; font-family: var(--f-sans); font-weight: 600; letter-spacing: 0.02em; line-height: 1.12; font-size: clamp(2.3rem, 6.2vw, 5.2rem); }
h2.section-title { font-family: var(--f-cond); font-weight: 600; font-size: clamp(1.9rem, 3.8vw, 3.1rem); text-transform: uppercase; }
html[lang="zh-CN"] h2.section-title { font-family: var(--f-sans); text-transform: none; letter-spacing: 0.02em; }
h3 { font-size: 1.25rem; }
.lede { font-size: clamp(1.1rem, 1.9vw, 1.35rem); color: var(--ink-2); max-width: 46em; line-height: 1.6; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.ember-text { color: var(--ember); }
.ice-text { color: var(--ice); }

/* ---------- header ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  background: linear-gradient(to bottom, rgba(6, 10, 15, 0.86), rgba(6, 10, 15, 0.62));
  border-bottom: 1px solid var(--line);
}
:root[data-theme="light"] .topbar { background: linear-gradient(to bottom, rgba(237, 241, 244, 0.92), rgba(237, 241, 244, 0.72)); }
.topbar .wrap { display: flex; align-items: center; gap: 16px; height: 62px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none !important; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand-name { font-family: var(--f-cond); font-weight: 600; letter-spacing: 0.14em; font-size: 0.98rem; text-transform: uppercase; white-space: nowrap; }
html[lang="zh-CN"] .brand-name { font-family: var(--f-sans); letter-spacing: 0.18em; }
.ticker { font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: 0.12em; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ticker b { color: var(--ice-2); font-weight: 500; }
.topbar .spacer { flex: 1; min-width: 8px; }
.tool {
  appearance: none; border: 1px solid var(--line-2); background: transparent; color: var(--ink);
  height: 36px; padding: 0 12px; border-radius: 10px; cursor: pointer;
  font-family: var(--f-mono); font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none !important; white-space: nowrap; flex: none;
}
.tool:hover { border-color: var(--ice-2); color: var(--ice); box-shadow: 0 0 0 4px var(--glow); }
.tool svg { width: 16px; height: 16px; }
.tool.lang { min-width: 56px; justify-content: center; white-space: nowrap; }
@media (max-width: 860px) { .ticker { display: none; } }
@media (max-width: 520px) { .brand-name { font-size: 0.84rem; letter-spacing: 0.1em; } .tool .tool-text { display: none; } .tool { padding: 0 10px; } }

/* ---------- directory (elevator board) ---------- */
.directory {
  position: fixed; inset: 0; z-index: 80;
  display: none;
  background: rgba(3, 6, 9, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow-y: auto;
}
.directory.open { display: block; animation: fade 220ms ease both; }
@keyframes fade { from { opacity: 0; } }
.board {
  width: min(880px, calc(100% - 24px));
  margin: 72px auto 48px;
  background: linear-gradient(180deg, #0b1016, #070a0e);
  border: 1px solid rgba(160, 210, 240, 0.18);
  border-radius: 18px;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  padding: 26px 26px 18px;
  color: #dfe9f0;
}
.board-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border-bottom: 1px solid rgba(160, 210, 240, 0.16); padding-bottom: 14px; margin-bottom: 8px; }
.board-title { font-family: var(--f-cond); font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; font-size: 0.95rem; }
html[lang="zh-CN"] .board-title { font-family: var(--f-sans); }
.board-close { appearance: none; background: none; border: 1px solid rgba(160, 210, 240, 0.25); color: #dfe9f0; border-radius: 10px; height: 34px; padding: 0 12px; font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: 0.12em; cursor: pointer; }
.board-close:hover { border-color: #69bfe9; }
.board ol { list-style: none; margin: 0; padding: 0; }
.board li a {
  display: grid; grid-template-columns: 64px 1fr auto; gap: 16px; align-items: center;
  padding: 12px 10px; border-radius: 10px; color: #dfe9f0; text-decoration: none;
  border-bottom: 1px dashed rgba(160, 210, 240, 0.08);
}
.board li a:hover, .board li a:focus-visible { background: rgba(105, 191, 233, 0.08); }
.board li a[aria-current="page"] .floor { background: #69bfe9; color: #041018; }
.floor {
  font-family: var(--f-mono); font-weight: 500; font-size: 0.8rem; letter-spacing: 0.06em;
  border: 1px solid rgba(160, 210, 240, 0.35); border-radius: 8px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center; color: #a8e1ff;
}
.board .dept { font-family: var(--f-cond); font-size: 1.12rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
html[lang="zh-CN"] .board .dept { font-family: var(--f-sans); text-transform: none; letter-spacing: 0.06em; }
.board .what { font-size: 0.86rem; color: #8ea2b1; display: block; font-family: var(--f-sans); text-transform: none; letter-spacing: 0; font-weight: 400; }
.board .arrow { font-family: var(--f-mono); color: #5f7686; }
.board li a.warm .floor { border-color: rgba(255, 123, 63, 0.6); color: #ff9a6a; }
.board-foot { margin-top: 14px; font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: 0.1em; color: #5f7686; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

/* ---------- hero ---------- */
.hero { position: relative; min-height: min(92vh, 900px); display: flex; align-items: flex-end; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; opacity: 0.55; transform: scale(1.04); filter: saturate(0.85) contrast(1.05); }
:root[data-theme="light"] .hero-media img { opacity: 0.32; filter: saturate(0.6) brightness(1.25); }
.hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, var(--bg) 6%, rgba(6, 10, 15, 0.35) 55%, rgba(6, 10, 15, 0.65) 100%); }
:root[data-theme="light"] .hero-media::after { background: linear-gradient(to top, var(--bg) 8%, rgba(237, 241, 244, 0.5) 60%, rgba(237, 241, 244, 0.7) 100%); }
canvas.snow { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero .wrap { position: relative; z-index: 2; padding: 140px 0 72px; }
.hero .display { max-width: 12em; text-shadow: 0 2px 40px rgba(0, 0, 0, 0.45); }
:root[data-theme="light"] .hero .display { text-shadow: none; }
.hero .lede { margin-top: 18px; color: var(--ink-2); }
.hero-meta { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 30px; font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.hero-meta span b { color: var(--ink-2); font-weight: 500; }
.page-hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.page-hero .wrap { position: relative; z-index: 2; padding: 96px 0 56px; }
.page-hero.with-image { min-height: 520px; display: flex; align-items: flex-end; }
.page-hero .floor-big { font-family: var(--f-mono); color: var(--ice-2); font-size: 0.8rem; letter-spacing: 0.2em; margin-bottom: 18px; display: inline-flex; align-items: center; gap: 10px; }
.page-hero .floor-big .floor { width: auto; padding: 0 10px; height: 28px; color: var(--ice); border-color: var(--line-2); }
.page-hero h1 { font-family: var(--f-cond); font-weight: 600; text-transform: uppercase; font-size: clamp(2.4rem, 6vw, 5rem); line-height: 1; letter-spacing: -0.01em; max-width: 14em; }
html[lang="zh-CN"] .page-hero h1 { font-family: var(--f-sans); text-transform: none; letter-spacing: 0.02em; line-height: 1.15; font-size: clamp(2.1rem, 5.2vw, 4.2rem); }

/* ---------- buttons ---------- */
.btns { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.btn {
  appearance: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 10px;
  height: 48px; padding: 0 20px; border-radius: 12px;
  font-family: var(--f-mono); font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase;
  border: 1px solid var(--ice-2); color: var(--ice); background: rgba(105, 191, 233, 0.06);
  text-decoration: none !important; transition: box-shadow 160ms ease, transform 160ms ease, background 160ms ease;
}
html[lang="zh-CN"] .btn { letter-spacing: 0.08em; font-family: var(--f-sans); font-size: 0.92rem; }
.btn:hover { box-shadow: 0 0 0 5px var(--glow), 0 0 40px var(--glow); background: rgba(105, 191, 233, 0.12); transform: translateY(-1px); }
.btn.ghost { border-color: var(--line-2); color: var(--ink); background: transparent; }
.btn.ghost:hover { border-color: var(--ink-2); box-shadow: 0 0 0 5px rgba(160, 200, 230, 0.08); }
.btn.ember { border-color: var(--ember); color: var(--ember); background: rgba(255, 123, 63, 0.07); }
.btn.ember:hover { box-shadow: 0 0 0 5px var(--ember-glow), 0 0 40px var(--ember-glow); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn .k { opacity: 0.6; }

/* ---------- sections ---------- */
section.block { padding: 96px 0; border-bottom: 1px solid var(--line); position: relative; }
section.block.tight { padding: 64px 0; }
.section-head { display: grid; grid-template-columns: 220px 1fr; gap: 32px; margin-bottom: 40px; align-items: start; }
@media (max-width: 860px) { .section-head { grid-template-columns: 1fr; gap: 10px; } }
.grid { display: grid; gap: 20px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 980px) { .grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid.two, .grid.three, .grid.four { grid-template-columns: 1fr; } }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  position: relative;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.panel h3 { font-family: var(--f-cond); text-transform: uppercase; letter-spacing: 0.02em; font-size: 1.3rem; margin-top: 10px; }
html[lang="zh-CN"] .panel h3 { font-family: var(--f-sans); text-transform: none; font-size: 1.18rem; }
.panel p:last-child, .panel ul:last-child { margin-bottom: 0; }
.panel .num { font-family: var(--f-mono); color: var(--ice-2); font-size: 0.78rem; letter-spacing: 0.14em; }
.panel.ember-edge { border-color: rgba(255, 123, 63, 0.35); box-shadow: inset 0 0 0 1px rgba(255, 123, 63, 0.06), 0 0 60px rgba(255, 123, 63, 0.05); }
.panel.ice-edge::before { content: ""; position: absolute; inset: -1px; border-radius: var(--radius); padding: 1px; background: linear-gradient(140deg, rgba(168, 225, 255, 0.55), transparent 40%, transparent 70%, rgba(168, 225, 255, 0.25)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
ul.clean { list-style: none; padding: 0; margin: 0; }
ul.clean li { padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; gap: 12px; }
ul.clean li:last-child { border-bottom: 0; }
ul.clean li .mark { font-family: var(--f-mono); color: var(--ice-2); flex: none; width: 2.2em; }
ul.dash { padding-left: 1.1em; margin: 0 0 1em; }
ul.dash li { margin: 0.3em 0; }

.figure { margin: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); position: relative; background: var(--bg-2); }
.figure img { width: 100%; height: 100%; object-fit: cover; }
.figure figcaption { position: absolute; left: 12px; bottom: 10px; font-family: var(--f-mono); font-size: 0.68rem; letter-spacing: 0.12em; color: rgba(230, 240, 246, 0.8); text-transform: uppercase; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.7); }
.figure.tall { aspect-ratio: 4 / 5; }
.figure.wide { aspect-ratio: 16 / 9; }

/* ---------- catalog cards ---------- */
.catalog { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.card {
  position: relative;
  background:
    linear-gradient(var(--paper), var(--paper)) padding-box;
  color: var(--paper-ink);
  border-radius: 6px;
  padding: 22px 22px 34px;
  min-height: 210px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2), 0 18px 40px rgba(0, 0, 0, 0.35);
  background-image:
    linear-gradient(to bottom, transparent 46px, rgba(194, 74, 44, 0.55) 46px, rgba(194, 74, 44, 0.55) 47px, transparent 47px),
    repeating-linear-gradient(to bottom, transparent 0 25px, var(--paper-rule) 25px 26px);
  background-color: var(--paper);
  transition: transform 220ms ease, box-shadow 220ms ease;
  font-family: var(--f-mono);
  font-size: 0.84rem;
  line-height: 26px;
}
:root[data-theme="light"] .card { box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06), 0 14px 30px rgba(31, 36, 40, 0.12); border: 1px solid rgba(31, 36, 40, 0.08); }
.card:hover { transform: translateY(-3px) rotate(-0.4deg); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2), 0 28px 60px rgba(0, 0, 0, 0.45); }
.card::after { /* punch hole */
  content: ""; position: absolute; left: 50%; bottom: 10px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%;
  background: var(--bg); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.45);
}
.card .acc { position: absolute; top: 14px; right: 18px; font-size: 0.72rem; letter-spacing: 0.08em; color: #8a3b24; }
.card .card-title { font-family: var(--f-cond); font-weight: 700; font-size: 1.12rem; letter-spacing: 0.02em; text-transform: uppercase; line-height: 26px; color: #1a1f25; margin: 0 0 22px; padding-right: 90px; }
html[lang="zh-CN"] .card .card-title { font-family: var(--f-sans); text-transform: none; }
.card .field { display: grid; grid-template-columns: 7.5em 1fr; gap: 10px; }
.card .field span:first-child { color: #6a6253; text-transform: uppercase; font-size: 0.72rem; letter-spacing: 0.06em; }
html[lang="zh-CN"] .card .field span:first-child { text-transform: none; letter-spacing: 0.04em; }
.card a { color: #1c5a82; }
.card .card-body { color: #2d343c; }

.stamp {
  display: inline-block;
  font-family: var(--f-cond);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--stamp);
  border: 2px solid var(--stamp);
  border-radius: 6px;
  padding: 2px 10px;
  transform: rotate(-6deg);
  opacity: 0.85;
  mix-blend-mode: multiply;
}
.stamp.ice { color: #2f6f97; border-color: #2f6f97; }
.card .stamp { position: absolute; right: 18px; bottom: 26px; }
.stamp.big { font-size: 1.05rem; padding: 4px 14px; }

/* ---------- steps ---------- */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }
.step { padding: 28px 24px 30px; border-right: 1px solid var(--line); background: linear-gradient(180deg, rgba(105, 191, 233, 0.03), transparent); position: relative; }
.step:last-child { border-right: 0; }
@media (max-width: 900px) { .step:nth-child(2) { border-right: 0; } .step:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }
@media (max-width: 560px) { .step { border-right: 0; border-bottom: 1px solid var(--line); } .step:last-child { border-bottom: 0; } }
.step::before { counter-increment: step; content: "0" counter(step); font-family: var(--f-mono); color: var(--ice-2); font-size: 0.78rem; letter-spacing: 0.16em; }
.step h3 { font-family: var(--f-cond); text-transform: uppercase; font-size: 1.5rem; margin: 14px 0 8px; }
html[lang="zh-CN"] .step h3 { font-family: var(--f-sans); text-transform: none; font-size: 1.3rem; }
.step p { color: var(--ink-2); margin: 0; font-size: 0.96rem; }

/* ---------- promises ---------- */
.promise { display: grid; grid-template-columns: 56px 1fr; gap: 16px; padding: 22px 0; border-top: 1px solid var(--line); }
.promise .n { font-family: var(--f-mono); color: var(--ice-2); font-size: 0.85rem; padding-top: 4px; }
.promise h3 { font-size: 1.35rem; font-family: var(--f-cond); text-transform: uppercase; margin-bottom: 4px; }
html[lang="zh-CN"] .promise h3 { font-family: var(--f-sans); text-transform: none; font-size: 1.22rem; }
.promise p { color: var(--ink-2); margin: 0; }
.truths { border-left: 2px solid var(--ember); padding: 6px 0 6px 20px; margin-top: 28px; }
.truths p { color: var(--ink-2); margin: 0.4em 0; }
.truths .label { margin-bottom: 8px; display: block; }

/* ---------- half-life ---------- */
.halflife { padding: 34px; }
.hl-sentence { font-family: var(--f-cond); font-size: clamp(1.4rem, 3.4vw, 2.4rem); line-height: 1.2; transition: color 300ms ease, opacity 300ms ease, filter 300ms ease; margin: 6px 0 26px; text-transform: none; }
html[lang="zh-CN"] .hl-sentence { font-family: var(--f-sans); }
.hl-status { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-family: var(--f-mono); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 14px; }
.hl-status b { color: var(--ice); font-weight: 500; }
input[type="range"].hl-range { width: 100%; appearance: none; -webkit-appearance: none; height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--ink) 0%, var(--ice-2) 22%, var(--ink-3) 100%); outline: none; }
input[type="range"].hl-range::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--bg); border: 2px solid var(--ice); box-shadow: 0 0 0 6px var(--glow); cursor: grab; }
input[type="range"].hl-range::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: var(--bg); border: 2px solid var(--ice); box-shadow: 0 0 0 6px var(--glow); cursor: grab; }
.hl-ticks { display: grid; grid-template-columns: 2fr 8fr 10fr; margin-top: 14px; font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.hl-ticks span { border-left: 1px solid var(--line-2); padding-left: 8px; }

/* ---------- directory teaser (lobby) ---------- */
.floors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
@media (max-width: 760px) { .floors { grid-template-columns: 1fr; } }
.floors a { display: grid; grid-template-columns: 58px 1fr; gap: 14px; padding: 20px 22px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); color: var(--ink); text-decoration: none; transition: background 160ms ease; }
.floors a:nth-child(2n) { border-right: 0; }
@media (max-width: 760px) { .floors a { border-right: 0; } }
.floors a:hover { background: rgba(105, 191, 233, 0.06); }
.floors a .floor { width: 52px; }
.floors a b { display: block; font-family: var(--f-cond); text-transform: uppercase; letter-spacing: 0.04em; font-size: 1.1rem; font-weight: 600; }
html[lang="zh-CN"] .floors a b { font-family: var(--f-sans); text-transform: none; }
.floors a small { color: var(--ink-2); font-size: 0.9rem; }
.floors a.warm .floor { border-color: rgba(255, 123, 63, 0.6); color: var(--ember); }

/* ---------- terminal / orientation ---------- */
.terminal {
  background: #03070b;
  border: 1px solid rgba(120, 200, 255, 0.22);
  border-radius: 16px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6), 0 30px 80px rgba(0, 0, 0, 0.6), inset 0 0 120px rgba(80, 170, 230, 0.06);
  color: #bfe8ff;
  font-family: var(--f-mono);
  padding: 22px 24px 26px;
  position: relative;
  overflow: hidden;
}
.terminal::before { /* scanlines */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 3px);
}
.terminal .t-head { display: flex; justify-content: space-between; font-size: 0.7rem; letter-spacing: 0.16em; color: #4f7f9d; text-transform: uppercase; border-bottom: 1px solid rgba(120, 200, 255, 0.14); padding-bottom: 10px; margin-bottom: 18px; }
.terminal .t-line { font-size: 1.02rem; line-height: 1.7; min-height: 1.7em; white-space: pre-wrap; }
html[lang="zh-CN"] .terminal .t-line { font-family: var(--f-mono), var(--f-sans); }
.terminal .caret { display: inline-block; width: 0.6em; height: 1.1em; background: #bfe8ff; vertical-align: -0.15em; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.terminal .choices { display: grid; gap: 10px; margin-top: 18px; }
.terminal button.choice {
  text-align: left; appearance: none; background: rgba(120, 200, 255, 0.05); border: 1px solid rgba(120, 200, 255, 0.22); color: #d8f1ff;
  font-family: var(--f-mono); font-size: 0.95rem; padding: 12px 14px; border-radius: 10px; cursor: pointer;
}
html[lang="zh-CN"] .terminal button.choice { font-family: var(--f-sans); }
.terminal button.choice:hover { border-color: #7fd0f7; background: rgba(120, 200, 255, 0.1); }
.terminal button.choice.right { border-color: #6fd39b; color: #c9f5da; }
.terminal button.choice.wrong { border-color: #ff7b3f; color: #ffd2bd; }
.terminal .feedback { margin-top: 14px; color: #8fb7cc; min-height: 1.6em; }
.terminal .progress { display: flex; gap: 6px; margin-top: 18px; }
.terminal .progress i { flex: 1; height: 3px; background: rgba(120, 200, 255, 0.15); border-radius: 3px; }
.terminal .progress i.on { background: #7fd0f7; box-shadow: 0 0 8px rgba(127, 208, 247, 0.6); }
.terminal { /* the terminal stays dark in the light theme */
  --ink: #e4edf3; --ink-2: #a3b4c2; --line-2: rgba(150, 205, 235, 0.26); --bg-2: #0a1118; --ice: #a8e1ff; --ice-2: #69bfe9; --ice-3: #2f86b5;
  --glow: rgba(118, 201, 255, 0.32); --ember: #ff7b3f; --ember-glow: rgba(255, 123, 63, 0.35);
}
.terminal .btns { margin-top: 0; }
.terminal .oath-lines .t-line { opacity: 0; animation: oath-in 0.45s ease forwards; }
@keyframes oath-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .terminal .oath-lines .t-line { animation: none; opacity: 1; } }

/* ---------- forms ---------- */
.form { display: grid; gap: 16px; }
.form label { display: grid; gap: 6px; font-family: var(--f-mono); font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); }
html[lang="zh-CN"] .form label { font-family: var(--f-sans); letter-spacing: 0.04em; font-size: 0.86rem; }
.form input[type="email"], .form input[type="text"] {
  height: 50px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--ink);
  padding: 0 14px; font-size: 1.05rem; font-family: var(--f-sans); text-transform: none; letter-spacing: 0;
}
.form input.code { font-family: var(--f-mono); letter-spacing: 0.5em; font-size: 1.4rem; text-align: center; }
.form input:focus { outline: none; border-color: var(--ice-2); box-shadow: 0 0 0 4px var(--glow); }
.form .check { display: flex; gap: 10px; align-items: flex-start; text-transform: none; letter-spacing: 0; font-family: var(--f-sans); font-size: 0.95rem; color: var(--ink-2); }
.form .check input { margin-top: 5px; width: 18px; height: 18px; accent-color: var(--ice-2); }
.form .hint { font-size: 0.86rem; color: var(--ink-3); font-family: var(--f-sans); text-transform: none; letter-spacing: 0; }
.notice { border: 1px solid var(--line-2); border-radius: 12px; padding: 14px 16px; font-size: 0.95rem; color: var(--ink-2); background: var(--bg-2); }
.notice.warn { border-color: rgba(255, 123, 63, 0.45); }
.notice.ok { border-color: rgba(111, 211, 155, 0.5); }

/* ---------- librarian card ---------- */
.libcard-wrap { display: grid; gap: 16px; justify-items: start; }
canvas.libcard { width: min(100%, 600px); height: auto; border-radius: 16px; box-shadow: var(--shadow); }

/* ---------- register ---------- */
.register { width: 100%; border-collapse: collapse; font-family: var(--f-mono); font-size: 0.9rem; }
.register th { text-align: left; font-weight: 500; font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); border-bottom: 1px solid var(--line-2); padding: 10px 8px; }
.register td { border-bottom: 1px solid var(--line); padding: 12px 8px; color: var(--ink-2); }
.register td.no { color: var(--ice); white-space: nowrap; }
.register td.name { color: var(--ink); font-family: var(--f-sans); }

/* ---------- ledger ---------- */
.ledger-row { display: grid; grid-template-columns: 1fr auto; gap: 16px; padding: 14px 0; border-bottom: 1px dashed var(--line-2); font-family: var(--f-mono); font-size: 0.92rem; }
.ledger-row span:last-child { color: var(--ice); text-align: right; }

/* ---------- open stacks reading ---------- */
.prose { font-size: 1.08rem; line-height: 1.85; color: var(--ink); }
.prose h2 { font-family: var(--f-cond); text-transform: uppercase; font-size: 1.6rem; margin-top: 1.6em; }
html[lang="zh-CN"] .prose h2 { font-family: var(--f-sans); text-transform: none; }
.prose p { color: var(--ink-2); }
.prose blockquote { margin: 1.4em 0; padding: 4px 0 4px 20px; border-left: 2px solid var(--ice-2); color: var(--ink); font-size: 1.15rem; }

/* ---------- warm room ---------- */
.warm-room { background: radial-gradient(900px 500px at 30% 10%, rgba(255, 123, 63, 0.14), transparent 60%); }
.hotline { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line); }
.hotline b { font-family: var(--f-mono); font-size: 1.4rem; color: var(--ember); }

/* ---------- footer ---------- */
footer.site { padding: 64px 0 80px; color: var(--ink-3); font-size: 0.9rem; }
footer.site .cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 28px; }
@media (max-width: 820px) { footer.site .cols { grid-template-columns: 1fr 1fr; } }
footer.site h4 { font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-2); font-weight: 500; margin-bottom: 12px; }
footer.site ul { list-style: none; padding: 0; margin: 0; }
footer.site li { margin: 6px 0; }
footer.site a { color: var(--ink-2); }
footer.site a:hover { color: var(--ice); }
footer.site .fineprint { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 700ms ease, transform 700ms ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- zh banner ---------- */
.lang-hint { position: fixed; right: 16px; bottom: 16px; z-index: 50; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 12px; display: none; gap: 10px; align-items: center; box-shadow: var(--shadow); font-size: 0.92rem; }
.lang-hint.show { display: flex; }
.lang-hint button { appearance: none; background: none; border: 0; color: var(--ink-3); cursor: pointer; font-size: 1rem; }

/* ---------- misc ---------- */
.kv { display: grid; grid-template-columns: 180px 1fr; gap: 6px 20px; font-size: 0.96rem; }
.kv dt { font-family: var(--f-mono); font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); padding-top: 3px; }
.kv dd { margin: 0; color: var(--ink-2); }
@media (max-width: 600px) { .kv { grid-template-columns: 1fr; } .kv dd { margin-bottom: 10px; } }
.coords { font-family: var(--f-mono); letter-spacing: 0.18em; color: var(--ink-3); font-size: 0.74rem; text-transform: uppercase; }
.big-number { font-family: var(--f-cond); font-weight: 600; font-size: clamp(3rem, 9vw, 7rem); line-height: 0.9; color: var(--ice); letter-spacing: -0.02em; }
.split { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
.tag { display: inline-block; font-family: var(--f-mono); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; border: 1px solid var(--line-2); color: var(--ink-2); border-radius: 999px; padding: 2px 10px; margin: 0 6px 6px 0; }
.mt-0 { margin-top: 0 !important; } .mt-1 { margin-top: 12px; } .mt-2 { margin-top: 24px; } .mt-3 { margin-top: 40px; } .mb-0 { margin-bottom: 0 !important; }
.center { text-align: center; }
.hidden { display: none !important; }

/* ---------- horizon: snow mountains, spruce, lake ---------- */
footer.site { position: relative; padding-top: 0; }
svg.horizon { display: block; width: 100%; height: 200px; margin-bottom: 40px; }
@media (max-width: 640px) { svg.horizon { height: 130px; } }
.horizon .h-far { fill: var(--ridge-far); }
.horizon .h-near { fill: var(--ridge-near); }
.horizon .h-snow { fill: var(--snow); opacity: 0.55; }
.horizon .h-pines { fill: var(--pine); }
:root:not([data-theme="light"]) .horizon .h-pines { fill: #0c1714; }
.horizon .h-lake-top { stop-color: var(--lake-deep); }
.horizon .h-lake-bottom { stop-color: var(--bg); }
.horizon .h-ripples line { stroke: var(--lake); stroke-opacity: 0.22; stroke-width: 1; }
.horizon .h-shore { stroke: var(--lake); stroke-opacity: 0.35; stroke-width: 1; }
.label.lake { color: var(--lake); }
.label.lake .dot { background: var(--lake); box-shadow: 0 0 10px rgba(63, 177, 176, 0.5); }
.panel.lake-edge { border-color: rgba(63, 177, 176, 0.35); }
.panel.pine-edge { border-color: rgba(80, 140, 110, 0.35); }
.hero .hero-media img { object-position: 68% 55%; }

/* ---------- warm mode (the thermostat, and the solstice) ---------- */
:root[data-warm="on"] { --ice: #ffc29a; --ice-2: #ff9e66; --ice-3: #c8642d; --glow: rgba(255, 140, 80, 0.3); --line: rgba(255, 196, 160, 0.14); --line-2: rgba(255, 196, 160, 0.28); }
:root[data-warm="on"] body { background: radial-gradient(1200px 700px at 70% -10%, rgba(255, 123, 63, 0.16), transparent 60%), var(--bg); transition: background 1.2s ease; }
:root[data-warm="on"] .hero-media img, :root[data-warm="on"] .page-hero .hero-media img { filter: sepia(0.35) saturate(1.1) hue-rotate(-12deg); }
.house-note { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0; transition: all 500ms ease; z-index: 90; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 18px; font-family: var(--f-mono); font-size: 0.85rem; color: var(--ink); box-shadow: var(--shadow); }
.house-note.show { opacity: 1; transform: translate(-50%, 0); }
.night-lamp { position: fixed; left: 16px; bottom: 16px; z-index: 45; display: flex; align-items: center; gap: 10px; max-width: 320px; font-size: 0.82rem; color: var(--ink-2); background: var(--panel-2); border: 1px solid rgba(255, 123, 63, 0.35); border-radius: 12px; padding: 10px 14px; box-shadow: 0 0 40px rgba(255, 123, 63, 0.18); }
.night-lamp .bulb { width: 12px; height: 12px; border-radius: 50%; background: #ffb070; box-shadow: 0 0 16px 4px rgba(255, 150, 80, 0.6); flex: none; }

/* ---------- cinematic lobby (v2) ---------- */
.hero-cine { min-height: 100vh; min-height: 100svh; }
.hero-cine .hero-media img { opacity: 0.92; filter: saturate(1.05) contrast(1.06); transform: scale(1.08); animation: kenburns 38s ease-in-out infinite alternate; object-position: 50% 60%; }
@keyframes kenburns { from { transform: scale(1.08) translate3d(0, 0, 0); } to { transform: scale(1.16) translate3d(-1.5%, -1%, 0); } }
.hero-cine .hero-media::after { background:
  linear-gradient(to top, var(--bg) 2%, rgba(6, 10, 15, 0.55) 34%, rgba(6, 10, 15, 0) 62%),
  linear-gradient(100deg, rgba(4, 8, 12, 0.78) 0%, rgba(4, 8, 12, 0.35) 42%, rgba(4, 8, 12, 0) 70%); }
:root[data-theme="light"] .hero-cine .hero-media img { opacity: 0.9; filter: none; }
:root[data-theme="light"] .hero-cine .hero-media::after { background: linear-gradient(to top, var(--bg) 2%, rgba(237, 241, 244, 0.6) 34%, rgba(237, 241, 244, 0) 62%), linear-gradient(100deg, rgba(237, 241, 244, 0.85) 0%, rgba(237, 241, 244, 0.4) 45%, rgba(237, 241, 244, 0) 70%); }
.hero-cine .wrap { padding-bottom: 96px; }
.hero-q { max-width: 15em !important; font-size: clamp(2.2rem, 5.4vw, 4.6rem) !important; line-height: 1.08;
  background: linear-gradient(100deg, #ffffff 0%, #e4f4ff 40%, #a8e1ff 70%, #ffffff 100%); background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 9s ease-in-out infinite; }
html[lang="zh-CN"] .hero-q { font-size: clamp(2.3rem, 5.6vw, 4.8rem) !important; line-height: 1.18; max-width: 13em !important; }
:root[data-theme="light"] .hero-q { background: linear-gradient(100deg, #0b1620, #1d4a66 60%, #0b1620); -webkit-background-clip: text; background-clip: text; background-size: 220% 100%; }
@keyframes shimmer { 0%, 100% { background-position: 0% 0; } 50% { background-position: 100% 0; } }
.hero-cine .lede { max-width: 38em; color: #d3e2ec; text-shadow: 0 1px 18px rgba(0, 0, 0, 0.6); }
:root[data-theme="light"] .hero-cine .lede { color: var(--ink-2); text-shadow: none; }
.hero-cine .hero-meta span { padding: 6px 10px; border: 1px solid rgba(168, 225, 255, 0.18); border-radius: 999px; background: rgba(6, 10, 15, 0.35); backdrop-filter: blur(6px); color: #bcd3e2; }
:root[data-theme="light"] .hero-cine .hero-meta span { background: rgba(255, 255, 255, 0.5); color: var(--ink-2); }
.aurora { position: absolute; inset: -10% -10% 40% -10%; pointer-events: none; mix-blend-mode: screen; opacity: 0.55; filter: blur(60px); z-index: 1; }
.aurora i { position: absolute; border-radius: 50%; }
.aurora i:nth-child(1) { width: 60%; height: 40%; left: 10%; top: 10%; background: radial-gradient(closest-side, rgba(80, 255, 190, 0.55), transparent); animation: drift1 22s ease-in-out infinite alternate; }
.aurora i:nth-child(2) { width: 50%; height: 35%; left: 45%; top: 0; background: radial-gradient(closest-side, rgba(150, 110, 255, 0.45), transparent); animation: drift2 28s ease-in-out infinite alternate; }
.aurora i:nth-child(3) { width: 40%; height: 30%; left: 30%; top: 25%; background: radial-gradient(closest-side, rgba(90, 200, 255, 0.4), transparent); animation: drift1 34s ease-in-out infinite alternate-reverse; }
@keyframes drift1 { to { transform: translate3d(12%, 6%, 0) scale(1.15); } }
@keyframes drift2 { to { transform: translate3d(-14%, 8%, 0) scale(0.9); } }
:root[data-theme="light"] .aurora { display: none; }
.scroll-cue { position: absolute; left: 50%; bottom: 22px; width: 1px; height: 54px; background: linear-gradient(to bottom, transparent, rgba(168, 225, 255, 0.8)); z-index: 2; animation: cue 2.4s ease-in-out infinite; }
@keyframes cue { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

.name-line { padding-top: 56px; padding-bottom: 56px; border-bottom: 1px solid var(--line); }
.name-split { display: grid; grid-template-columns: 1fr auto 1fr; gap: 36px; align-items: start; }
.name-split .big { display: block; font-family: var(--f-cond); font-weight: 700; font-size: clamp(2.6rem, 6vw, 5rem); line-height: 1; letter-spacing: 0.02em; text-transform: uppercase;
  background: linear-gradient(180deg, var(--ink) 30%, var(--ice-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
html[lang="zh-CN"] .name-split .big { font-family: var(--f-sans); font-weight: 700; }
.name-split p { margin-top: 14px; color: var(--ink-2); font-size: 1.1rem; max-width: 26em; }
.name-split .plus { font-family: var(--f-mono); font-size: 2.4rem; color: var(--ember); padding-top: 14px; }

.story-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; margin-top: 34px; }
.story-card { position: relative; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 3 / 2.3; background: #05090d; isolation: isolate; }
.story-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s cubic-bezier(.2, .7, .2, 1), filter 1.4s; filter: saturate(0.95); }
.story-card:hover img { transform: scale(1.06); filter: saturate(1.1); }
.story-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(3, 6, 10, 0.94) 0%, rgba(3, 6, 10, 0.55) 38%, rgba(3, 6, 10, 0) 68%); z-index: 0; }
.story-text { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 28px; z-index: 1; color: #e8f1f6; }
.story-text .num { font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: #ffb48a; }
.story-text h3 { margin-top: 8px; font-size: clamp(1.3rem, 2.2vw, 1.75rem); line-height: 1.2; color: #fff; }
.story-text p { margin-top: 8px; color: #b9cad6; max-width: 34em; font-size: 0.98rem; }

.who { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: 30px; background: var(--line); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.who > div { background: var(--bg); padding: 22px 20px; display: grid; gap: 8px; }
.who b { font-size: 1.05rem; color: var(--ink); }
.who span { color: var(--ink-2); font-size: 0.95rem; }

.cine-band { position: relative; min-height: 78vh; display: flex; align-items: flex-end; overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cine-media { position: absolute; inset: -12% 0; }
.cine-media img { width: 100%; height: 100%; object-fit: cover; }
.cine-band::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(4, 8, 12, 0.9), rgba(4, 8, 12, 0.1) 55%, rgba(4, 8, 12, 0.35)); }
.cine-band .wrap { position: relative; z-index: 1; padding: 120px 0 80px; }
.cine-band .section-title { color: #fff; text-shadow: 0 2px 30px rgba(0, 0, 0, 0.6); }
.cine-band .label { color: #bfe8ff; }

@media (max-width: 900px) {
  .story-grid { grid-template-columns: 1fr; }
  .story-card { aspect-ratio: 4 / 5; }
  .who { grid-template-columns: 1fr 1fr; }
  .name-split { grid-template-columns: 1fr; gap: 18px; }
  .name-split .plus { padding: 0; }
  .hero-cine .hero-media img { object-position: 60% 60%; }
}
@media (max-width: 520px) { .who { grid-template-columns: 1fr; } .story-text { padding: 20px; } }
@media (prefers-reduced-motion: reduce) {
  .hero-cine .hero-media img, .aurora i, .hero-q, .scroll-cue { animation: none; }
}

/* ---------- the Long Shelf ---------- */
.shelf { margin-top: 30px; border-top: 1px solid var(--line-2); }
.shelf-row { display: grid; grid-template-columns: 74px minmax(180px, 1.1fr) 2fr auto; gap: 22px; align-items: baseline; padding: 18px 4px; border-bottom: 1px solid var(--line); transition: background 200ms; }
.shelf-row:hover { background: rgba(120, 200, 255, 0.04); }
.shelf-row .yr { font-family: var(--f-mono); color: var(--ember); letter-spacing: 0.1em; }
.shelf-row b { display: block; font-family: var(--f-cond); font-size: 1.3rem; letter-spacing: 0.02em; }
.shelf-row .who-made { display: block; color: var(--ink-3); font-size: 0.9rem; margin-top: 2px; }
.shelf-row p { color: var(--ink-2); margin: 0; }
.shelf-row a { font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; }
@media (max-width: 760px) { .shelf-row { grid-template-columns: 56px 1fr; } .shelf-row p, .shelf-row a { grid-column: 2; } }
@media (max-width: 520px) {
  html[lang="zh-CN"] .hero-q { font-size: 1.8rem !important; line-height: 1.3; }
  .hero-q { font-size: 2rem !important; }
  .hero-cine .wrap { padding-top: 110px; padding-bottom: 70px; }
}

/* ---------- lobby v3: calm hero, offers, layers ---------- */
.hero-calm { min-height: 100vh; min-height: 100svh; }
.hero-calm .hero-media img { opacity: 0.8; filter: saturate(0.95) contrast(1.04); transform: scale(1.04); object-position: 50% 55%; }
.hero-calm .hero-media::after { background:
  linear-gradient(to top, var(--bg) 3%, rgba(6, 10, 15, 0.45) 36%, rgba(6, 10, 15, 0) 66%),
  linear-gradient(100deg, rgba(4, 8, 12, 0.7) 0%, rgba(4, 8, 12, 0.3) 45%, rgba(4, 8, 12, 0) 72%); }
:root[data-theme="light"] .hero-calm .hero-media img { opacity: 0.85; filter: none; }
:root[data-theme="light"] .hero-calm .hero-media::after { background: linear-gradient(to top, var(--bg) 3%, rgba(237, 241, 244, 0.6) 36%, rgba(237, 241, 244, 0) 66%), linear-gradient(100deg, rgba(237, 241, 244, 0.85) 0%, rgba(237, 241, 244, 0.4) 45%, rgba(237, 241, 244, 0) 72%); }
.hero-calm .wrap { padding-bottom: 96px; }
.hero-calm .lede { max-width: 38em; color: #d3e2ec; text-shadow: 0 1px 18px rgba(0, 0, 0, 0.55); }
:root[data-theme="light"] .hero-calm .lede { color: var(--ink-2); text-shadow: none; }
.hero-calm .hero-meta span { padding: 6px 10px; border: 1px solid rgba(168, 225, 255, 0.18); border-radius: 999px; background: rgba(6, 10, 15, 0.35); backdrop-filter: blur(6px); color: #bcd3e2; }
:root[data-theme="light"] .hero-calm .hero-meta span { background: rgba(255, 255, 255, 0.55); color: var(--ink-2); }
.hero-q { animation: none !important; }

.offer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 30px; }
.offer { position: relative; display: block; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: var(--bg-2); color: inherit; text-decoration: none !important; transition: transform 300ms ease, border-color 300ms; }
.offer:hover { transform: translateY(-3px); border-color: var(--line-2); }
.offer img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; display: block; transition: transform 1.2s cubic-bezier(.2, .7, .2, 1); }
.offer:hover img { transform: scale(1.04); }
.offer-text { padding: 20px 22px 24px; }
.offer-text .num { font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ember); }
.offer-text h3 { margin-top: 6px; font-size: 1.45rem; }
.offer-text p { margin-top: 8px; color: var(--ink-2); }

.layers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 30px; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.layer { padding: 26px 24px; background: var(--bg); position: relative; }
.layer + .layer { border-left: 1px solid var(--line); }
.layer h3 { margin-top: 6px; font-size: 1.35rem; }
.layer p { margin-top: 8px; color: var(--ink-2); }
.layer .who { display: inline-block; margin-top: 14px; font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: 0.1em; padding: 5px 9px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--ink-2); }
.layer.l-open { background: linear-gradient(180deg, rgba(168, 225, 255, 0.07), transparent 60%), var(--bg); }
.layer.l-rec { background: linear-gradient(180deg, rgba(255, 123, 63, 0.08), transparent 60%), var(--bg); }
.layer.l-rec .who { border-color: rgba(255, 123, 63, 0.45); color: var(--ember); }
.layer.l-seal { background: linear-gradient(180deg, rgba(63, 177, 176, 0.08), transparent 60%), var(--bg); }

/* ---------- exhibits and plaques ---------- */
.item-card { display: grid; grid-template-columns: 42% 1fr; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--bg-2); color: inherit; text-decoration: none !important; transition: border-color 250ms, transform 250ms; }
.item-card:hover { border-color: var(--line-2); transform: translateY(-2px); }
.item-card img { width: 100%; height: 100%; min-height: 190px; object-fit: cover; }
.item-text { padding: 20px 22px; }
.item-text .num { font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.item-text h3 { margin-top: 8px; font-size: 1.4rem; }
.item-text p { margin-top: 6px; color: var(--ink-2); }
.tag-example { margin-left: 10px; padding: 3px 8px; border-radius: 999px; border: 1px solid rgba(255, 123, 63, 0.5); color: var(--ember); font-size: 0.72em; letter-spacing: 0.08em; }
.item-body { align-items: start; }

.terminal.warden .t-line.you { color: #ffd2bd; }
.terminal.warden .t-line.hint { color: #6f9bb6; font-size: 0.88rem; }
.terminal.warden .t-line.faint { color: #6f8291; }
.terminal.warden .t-line.ok { color: #9be7bd; }
.terminal.warden .t-line.no { color: #ffb48a; }
.terminal.warden .w-form { display: flex; gap: 10px; margin: 10px 0 14px; }
.terminal.warden .w-form input { flex: 1; height: 46px; }
.terminal.warden .w-form .btn { height: 46px; }
.terminal.warden.open { border-color: rgba(155, 231, 189, 0.45); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6), 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 60px rgba(155, 231, 189, 0.12); }

.lamps { border-top: 1px solid var(--line); padding-top: 18px; }
.lamp-count { display: flex; align-items: center; gap: 10px; color: var(--ink-2); }
.lamp-count b { font-family: var(--f-mono); color: var(--ink); font-size: 1.2rem; }
.lamp-icon { width: 12px; height: 12px; border-radius: 50%; background: #3a4a56; box-shadow: none; }
.lamps.lit .lamp-icon { background: #ffb06a; box-shadow: 0 0 14px 4px rgba(255, 150, 70, 0.55); }
.lamp-notes { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; }
.lamp-notes li { display: flex; justify-content: space-between; gap: 14px; padding: 10px 14px; border-radius: 10px; background: rgba(255, 176, 106, 0.06); border: 1px solid rgba(255, 176, 106, 0.18); }
.lamp-notes small { color: var(--ink-3); font-family: var(--f-mono); white-space: nowrap; }
.lamp-form.done textarea, .lamp-form.done button { display: none; }

.badge-card { display: grid; gap: 6px; padding: 22px 24px; border-radius: 16px; border: 1px solid rgba(255, 176, 106, 0.45); background: radial-gradient(120% 140% at 0% 0%, rgba(255, 176, 106, 0.16), transparent 60%), var(--bg-2); max-width: 420px; }
.badge-card .num { font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: 0.16em; color: var(--ember); }
.badge-card b { font-size: 1.5rem; }
.badge-card .code { font-family: var(--f-mono); letter-spacing: 0.12em; color: var(--ink-2); }
.badge-card small { color: var(--ink-3); }

/* ---------- front desk form ---------- */
.workbench fieldset { border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px 20px; margin: 0; display: grid; gap: 14px; }
.workbench legend { padding: 0 8px; font-family: var(--f-mono); font-size: 0.78rem; letter-spacing: 0.12em; color: var(--ice); text-transform: uppercase; }
html[lang="zh-CN"] .workbench legend { font-family: var(--f-sans); letter-spacing: 0.04em; }
.form textarea { border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--ink); padding: 12px 14px; font: inherit; font-size: 1rem; text-transform: none; letter-spacing: 0; resize: vertical; }
.form textarea:focus { outline: none; border-color: var(--ice-2); box-shadow: 0 0 0 4px var(--glow); }
.seg { display: flex; flex-wrap: wrap; gap: 10px; }
.seg label { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border: 1px solid var(--line-2); border-radius: 12px; cursor: pointer; text-transform: none; letter-spacing: 0; font-family: var(--f-sans); font-size: 0.95rem; color: var(--ink); }
.seg label:has(input:checked) { border-color: var(--ember); background: rgba(255, 123, 63, 0.08); }
.qrow { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; }
.workbench.sent fieldset, .workbench.sent > .btn { opacity: 0.5; pointer-events: none; }

@media (max-width: 900px) {
  .offer-grid, .layers { grid-template-columns: 1fr; }
  .layer + .layer { border-left: 0; border-top: 1px solid var(--line); }
  .item-card { grid-template-columns: 1fr; }
  .item-card img { min-height: 0; aspect-ratio: 16 / 9; }
  .qrow { grid-template-columns: 1fr; }
}

/* ---------- vault desk ---------- */
.vault-app { margin-top: 26px; border: 1px solid var(--line); border-radius: 18px; padding: 22px; background: var(--bg-2); }
.v-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.v-status { font-family: var(--f-mono); color: var(--ink-2); margin-right: auto; }
.vault-app .feedback.bad { color: #ffb48a; }
.vault-card { border: 1px solid var(--line-2); border-radius: 14px; padding: 16px 18px; margin-bottom: 14px; background: var(--bg); }
.vault-card dl.kv { margin: 0; }
.form input[type="datetime-local"] { height: 50px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--ink); padding: 0 14px; font-family: var(--f-sans); text-transform: none; letter-spacing: 0; }
