/* ─────────────────────────────────────────────────────────────
   STUDIO PORTFOLIO TEMPLATE — shared stylesheet
   Layout: one 12-column fluid grid, oversized display type,
   stone neutrals with a single electric-blue accent.
   Edit the tokens below to re-skin every page at once.
   ───────────────────────────────────────────────────────────── */
/* Chengkang palette: Lele Blue signature accent, Crisp White ground,
   Powder Blue surfaces, Soft Sand warm accent, Blush Lilac romantic
   accent, Slate Blue Gray secondary text, Deep Ink primary text. */
:root {
  --bg: #fafaf7;        /* Crisp White */
  --bg-2: #dce8f2;      /* Powder Blue */
  --fg: #303538;        /* Deep Ink */
  --muted: #6e7f8a;     /* Slate Blue Gray */
  --line: rgba(48, 53, 56, 0.14);
  --accent: #a9c8d4;    /* Lele Blue */
  --accent-ink: #303538;
  --sand: #c7ae93;      /* Soft Sand */
  --lilac: #d8c4d1;     /* Blush Lilac */
  --tile: #e6eef4;
  --code: #7fa7b8;      /* code wall glyphs: a deeper Lele Blue on light ground */

  /* Expression 01 · Precision Minimal (default) */
  --font-display: "Inter", "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
  --font-cjk: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, monospace;
  --display-weight: 700;
  --display-track: -0.04em;

  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --nav-h: 64px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 0.9s;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1b1f22; --bg-2: #303538; --fg: #fafaf7; --muted: #a9c8d4;
    --line: rgba(250, 250, 247, 0.14); --accent: #a9c8d4; --accent-ink: #1b1f22; --tile: #2a2f33; --code: #a9c8d4;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #1b1f22; --bg-2: #303538; --fg: #fafaf7; --muted: #a9c8d4;
  --line: rgba(250, 250, 247, 0.14); --accent: #a9c8d4; --accent-ink: #1b1f22; --tile: #2a2f33; --code: #a9c8d4;
  color-scheme: dark;
}

/* Expression 02 · Quiet Editorial: EB Garamond display, DM Sans body, Noto Serif SC headings */
:root[data-expr="editorial"] {
  --font-display: "EB Garamond", "Noto Serif SC", Georgia, "Times New Roman", serif;
  --font-body: "DM Sans", "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
  --font-cjk: "Noto Serif SC", "Songti SC", serif;
  --display-weight: 400;
  --display-track: -0.02em;
  --accent-dot: var(--sand);
}
/* Expression 03 · Future Systems: Space Grotesk display, Inter body, always dark */
:root[data-expr="future"] {
  --font-display: "Space Grotesk", "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
  --display-weight: 700;
  --display-track: -0.04em;
  --bg: #1b1f22; --bg-2: #303538; --fg: #fafaf7; --muted: #a9c8d4;
  --line: rgba(250, 250, 247, 0.14); --accent: #a9c8d4; --accent-ink: #1b1f22; --tile: #2a2f33; --code: #a9c8d4;
  color-scheme: dark;
}
:root { --accent-dot: var(--accent); }
:root[data-expr="editorial"] { --accent-dot: var(--sand); }
.cjk { font-family: var(--font-cjk); }

/* 中文 mode: Chinese faces lead, no negative tracking, taller lines */
:root[data-lang="zh"] { --font-display: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif; --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif; --display-track: 0; --display-weight: 500; }
:root[data-lang="zh"][data-expr="editorial"] { --font-display: "Noto Serif SC", "Songti SC", serif; --display-weight: 400; }
:root[data-lang="zh"][data-expr="future"] { --font-display: "Noto Sans SC", "PingFang SC", sans-serif; --display-weight: 700; }
:root[data-lang="zh"] h1, :root[data-lang="zh"] h2, :root[data-lang="zh"] h3 { line-height: 1.2; }
:root[data-lang="zh"] .hero2 h1 { line-height: 1.08; font-size: clamp(2.8rem, 9vw, 9rem); }
:root[data-lang="zh"] .mono { letter-spacing: 0.1em; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: clamp(15px, 1.05vw, 17px);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, canvas, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: var(--display-track); line-height: 0.95; text-wrap: balance; }
:root[data-expr="editorial"] h1, :root[data-expr="editorial"] h2, :root[data-expr="editorial"] h3 { line-height: 1; }
.dot-accent { color: var(--accent-dot); }
p { margin: 0; }
::selection { background: var(--accent); color: var(--accent-ink); }

.wrap { padding-left: var(--gutter); padding-right: var(--gutter-r); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(12px, 1.6vw, 28px); }
.mono { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.idx { font-family: var(--font-mono); font-size: 0.75em; letter-spacing: 0.02em; color: var(--muted); vertical-align: top; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ── Navigation ─────────────────────────────────────────────── */
.nav {
  position: fixed; top: env(safe-area-inset-top, 0px); left: 0; right: 0; z-index: 50;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-left: var(--gutter); padding-right: var(--gutter-r);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.4s;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav .brand { font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: -0.02em; font-size: 1.15rem; display: inline-flex; align-items: baseline; }
.nav .brand .dot { color: var(--accent-dot); }
.nav .right { display: flex; align-items: center; gap: 8px; }
/* language toggle: shows the language you can switch to */
.nav .lang { padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line); font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; color: var(--fg); background: color-mix(in srgb, var(--bg) 70%, transparent); transition: background 0.3s, color 0.3s, border-color 0.3s; }
.nav .lang:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }
/* pill contact button, top right */
.nav .cta { display: inline-flex; align-items: center; gap: 12px; padding: 10px 10px 10px 18px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-weight: 500; font-size: 0.95rem; transition: transform 0.4s var(--ease), background 0.3s; }
.nav .cta .arr { width: 26px; height: 26px; border-radius: 50%; background: color-mix(in srgb, var(--accent-ink) 12%, transparent); display: grid; place-items: center; font-size: 0.85rem; transition: transform 0.4s var(--ease); }
.nav .cta:hover { transform: translateY(-2px); } .nav .cta:hover .arr { transform: translateX(3px); }

/* floating bottom tab bar (home / work / about) */
.tabs {
  position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 55;
  transform: translateX(-50%); display: inline-flex; gap: 4px; padding: 6px;
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line); border-radius: 999px; box-shadow: 0 18px 50px -20px rgba(48, 53, 56, 0.35);
  animation: tabsIn 0.9s var(--ease) 0.4s both;
}
.tabs a { padding: 10px 18px; border-radius: 999px; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg); transition: background 0.3s, color 0.3s; white-space: nowrap; }
.tabs a:hover { background: var(--bg-2); }
.tabs a[aria-current="page"] { background: var(--accent); color: var(--accent-ink); }
.tabs a .cn { font-family: var(--font-cjk); letter-spacing: 0.06em; opacity: 0.7; margin-left: 4px; }
@media (max-width: 560px) { .tabs a { padding: 10px 14px; } .tabs a .cn { display: none; } }
@media (max-width: 480px) { .tabs { gap: 0; padding: 5px; } .tabs a { padding: 9px 9px; letter-spacing: 0.06em; font-size: 0.64rem; } }

/* vertical edge tabs on the right (quick info / say hello) */
.edge { position: fixed; right: 0; top: 50%; transform: translateY(-50%); z-index: 54; display: grid; gap: 8px; padding-right: env(safe-area-inset-right, 0px); }
.edge > * { writing-mode: vertical-rl; text-orientation: mixed; padding: 18px 12px; border-radius: 10px 0 0 10px; font-family: var(--font-body); font-size: 0.85rem; letter-spacing: 0.04em; cursor: pointer; transition: padding 0.35s var(--ease), background 0.3s, color 0.3s; }
.edge .qi { background: var(--bg); color: var(--fg); border: 1px solid var(--line); border-right: 0; box-shadow: 0 10px 30px -14px rgba(48, 53, 56, 0.3); }
.edge .hello { background: var(--fg); color: var(--bg); }
.edge > *:hover { padding-right: 18px; }
.edge .qi[aria-expanded="true"] { background: var(--accent); color: var(--accent-ink); }
@media (max-width: 560px) { .edge > * { padding: 14px 9px; font-size: 0.72rem; } }

.quick {
  position: fixed; top: 50%; transform: translateY(-50%) translateX(12px) scale(0.98); right: calc(56px + var(--gutter-r)); z-index: 49;
  width: min(320px, calc(100vw - var(--gutter) - var(--gutter-r)));
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px;
  padding: 18px; display: grid; gap: 12px;
  opacity: 0; pointer-events: none;
  transition: transform 0.45s var(--ease), opacity 0.35s;
  box-shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.35);
}
.quick.open { transform: translateY(-50%); opacity: 1; pointer-events: auto; }
@media (max-width: 560px) { .quick { right: var(--gutter); left: var(--gutter); width: auto; top: auto; bottom: calc(80px + env(safe-area-inset-bottom, 0px)); transform: translateY(12px); } .quick.open { transform: none; } }
.quick dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 0.9rem; }
.quick dt { color: var(--muted); } .quick dd { margin: 0; font-variant-numeric: tabular-nums; }
.quick .avail { display: inline-flex; align-items: center; gap: 8px; }
.quick .avail::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #2fa36b; box-shadow: 0 0 0 0 rgba(47, 163, 107, 0.6); animation: ring 2s infinite; }

/* ── Page shell & transitions ──────────────────────────────── */
main { padding-top: calc(var(--nav-h) + 24px); }
.veil { position: fixed; inset: 0; z-index: 100; background: var(--bg); pointer-events: none; opacity: 0; transition: opacity 0.45s var(--ease); }
.veil.on { opacity: 1; pointer-events: auto; }
html.leaving .veil { opacity: 1; }

/* ── Contact strip (appears top of page and in footer) ─────── */
.contact {
  display: grid; grid-template-columns: auto 1fr; gap: 20px 24px; align-items: center;
  padding-block: 28px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.contact .avatar { width: 72px; height: 72px; border-radius: 50%; overflow: hidden; background: var(--tile); flex: none; }
.contact .avatar canvas { width: 100%; height: 100%; }
.contact h2 { font-size: clamp(1.4rem, 2.6vw, 2.2rem); margin-bottom: 8px; }
.contact .row { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; font-size: 0.95rem; }
.contact .email { font-family: var(--font-mono); font-size: 0.85rem; letter-spacing: 0; text-transform: none; display: inline-flex; gap: 8px; align-items: center; }
.contact .email button { border: 1px solid var(--line); border-radius: 6px; padding: 2px 8px; font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); transition: all 0.25s; }
.contact .email button:hover { color: var(--fg); border-color: var(--fg); }
.contact .social { display: flex; gap: 12px; }
.contact .social a { display: inline-grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 50%; transition: transform 0.4s var(--ease), background 0.3s, color 0.3s, border-color 0.3s; }
.contact .social a:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); transform: translateY(-3px); }
.contact .social svg { width: 15px; height: 15px; fill: currentColor; }
@media (max-width: 560px) { .contact { grid-template-columns: 1fr; } }

/* ── Hero ───────────────────────────────────────────────────── */
.hero { padding-block: clamp(40px, 7vw, 110px) 0; row-gap: 28px; align-items: start; }
.hero .title { grid-column: 1 / span 6; display: grid; gap: 22px; align-content: start; }
.hero h1 { font-size: clamp(3.2rem, 9.5vw, 9.6rem); line-height: 0.9; }
.hero .intro { grid-column: 7 / span 3; align-self: end; display: grid; gap: 16px; padding-bottom: 6px; }
.hero .intro h2 { font-family: var(--font-cjk); font-weight: 400; font-size: clamp(1.4rem, 2.3vw, 2rem); letter-spacing: 0.02em; line-height: 1.35; }
.hero .intro p { color: var(--muted); font-size: 0.95rem; max-width: 36ch; }
.hero .intro a { display: inline-flex; gap: 10px; align-items: center; padding-bottom: 6px; border-bottom: 1px solid var(--accent-dot); width: max-content; transition: gap 0.3s var(--ease); }
.hero .intro a:hover { gap: 16px; }
.hero .portrait { grid-column: 10 / span 3; aspect-ratio: 3 / 4; border-radius: 4px; overflow: hidden; background: var(--tile); max-width: 100%; }
.hero .portrait canvas { width: 100%; height: 100%; }
@media (max-width: 920px) {
  .hero .title { grid-column: 1 / span 12; }
  .hero .intro { grid-column: 1 / span 7; }
  .hero .portrait { grid-column: 9 / span 4; }
}
@media (max-width: 560px) { .hero .intro, .hero .portrait { grid-column: 1 / span 12; } .hero .portrait { aspect-ratio: 4 / 3; } }

/* ── Home: one-screen hero (photo + two-line title + subtitle) ── */
.hero2 { position: relative; min-height: calc(100svh - var(--nav-h) - 24px); display: grid; align-content: center; overflow: hidden; margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter-r)); padding-left: var(--gutter); padding-right: var(--gutter-r); }
.hero2 .photo {
  position: absolute; left: 50%; bottom: 0; z-index: 1; height: min(82vh, 960px); width: auto; max-width: 70vw;
  transform: translateX(-78%);
  -webkit-mask-image: linear-gradient(to top, #000 82%, transparent 100%), linear-gradient(to right, transparent 0, #000 14%, #000 86%, transparent 100%);
  mask-image: linear-gradient(to top, #000 82%, transparent 100%), linear-gradient(to right, transparent 0, #000 14%, #000 86%, transparent 100%);
  -webkit-mask-composite: source-in; mask-composite: intersect;
  animation: photoIn 1.4s var(--ease) 0.2s both;
}
.hero2 .text { position: relative; z-index: 1; display: grid; gap: clamp(16px, 3vw, 36px); padding-bottom: 14vh; pointer-events: none; }
.hero2 .text > * { pointer-events: auto; }
.hero2 h1 { font-size: clamp(3rem, 8.6vw, 9.4rem); line-height: 0.95; }
.hero2 h1 .line:nth-child(1) > span { padding-left: 22vw; }
.hero2 h1 .line:nth-child(2) > span { padding-left: 38vw; }
.hero2 .sub { margin-left: 38vw; color: var(--muted); font-size: clamp(1rem, 1.5vw, 1.3rem); max-width: 48ch; }
.hero2 .photo { z-index: 2; }
.hero2 .scroll-dn { position: absolute; left: var(--gutter); bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 3; width: 64px; height: 64px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); display: grid; place-items: center; font-size: 1.1rem; transition: background 0.3s, color 0.3s, transform 0.4s var(--ease); }
.hero2 .scroll-dn:hover { background: var(--fg); color: var(--bg); transform: translateY(3px); }
.hero2 .scroll-dn span { display: inline-block; animation: nudge 2s var(--ease) infinite; }
.hero2 .social { position: absolute; right: var(--gutter-r); bottom: calc(32px + env(safe-area-inset-bottom, 0px)); z-index: 3; }
.social { display: flex; gap: 12px; }
.social a { display: inline-grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 50%; background: var(--bg); transition: transform 0.4s var(--ease), background 0.3s, color 0.3s, border-color 0.3s; }
.social a:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); transform: translateY(-3px); }
.social svg { width: 15px; height: 15px; fill: currentColor; }
@media (max-width: 900px) {
  .hero2 { min-height: auto; padding-top: 8px; }
  .hero2 .photo { position: relative; left: auto; transform: none; height: auto; width: min(72vw, 420px); max-width: 100%; margin: 0 auto; display: block; }
  .hero2 .text { padding-bottom: 96px; margin-top: -10vw; }
  .hero2 h1 .line:nth-child(1) > span, .hero2 h1 .line:nth-child(2) > span, .hero2 .sub { padding-left: 0; }
  .hero2 h1 .line:nth-child(2) > span { padding-left: 14vw; }
  .hero2 .social { bottom: 28px; }
  .hero2 .scroll-dn { display: none; }
}
@keyframes photoIn { from { opacity: 0; transform: translateX(-78%) translateY(24px); } to { opacity: 1; transform: translateX(-78%); } }
@keyframes nudge { 0%, 100% { transform: translateY(-2px); } 50% { transform: translateY(3px); } }
@media (max-width: 900px) { @keyframes photoIn { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } } }

/* three facts strip (practice / philosophy / focus) */
.strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: clamp(32px, 5vw, 64px); }
.strip > div { padding: 26px 24px 26px 0; display: grid; gap: 10px; align-content: start; min-width: 0; }
.strip > div + div { border-left: 1px solid var(--line); padding-left: 24px; }
.strip h3 { font-size: clamp(1.15rem, 1.8vw, 1.5rem); font-weight: var(--display-weight); letter-spacing: -0.02em; line-height: 1.15; }
.strip h3.cjk { font-weight: 400; letter-spacing: 0.02em; line-height: 1.4; }
.strip p { color: var(--muted); font-size: 0.85rem; }
@media (max-width: 700px) { .strip { grid-template-columns: 1fr; } .strip > div + div { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; } }

/* keyword list (about) */
.keywords { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-bottom: clamp(48px, 7vw, 110px); }
.keywords div { background: var(--bg); padding: 22px 18px; display: grid; gap: 4px; transition: background 0.4s; }
.keywords div:hover { background: var(--bg-2); }
.keywords .cn { font-family: var(--font-cjk); font-size: 1.5rem; color: var(--muted); }
.keywords .en { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 1.05rem; letter-spacing: 0.04em; text-transform: uppercase; }

/* expression switcher in the quick panel */
.expr { display: flex; gap: 6px; flex-wrap: wrap; }
.expr button { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); transition: all 0.25s; }
.expr button[aria-pressed="true"], .expr button:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }

/* line-reveal: each .line is clipped and slides up on load */
.lines .line { display: block; overflow: hidden; padding-bottom: 0.12em; margin-bottom: -0.12em; }
.lines .line > span { display: block; transform: translateY(110%); animation: rise var(--dur) var(--ease) forwards; animation-delay: calc(var(--i, 0) * 0.09s + 0.1s); }

/* ── Statement ──────────────────────────────────────────────── */
.statement { padding-block: clamp(56px, 10vw, 150px); }
.statement h2 { grid-column: 2 / span 10; font-size: clamp(2rem, 6vw, 6.2rem); letter-spacing: -0.04em; }
.statement h2 em { font-style: normal; color: var(--muted); }
.statement h2 .cjk { font-weight: 400; letter-spacing: 0.02em; }
.statement p { grid-column: 2 / span 5; margin-top: 28px; color: var(--muted); font-size: 1.05rem; max-width: 42ch; }
@media (max-width: 820px) { .statement h2, .statement p { grid-column: 1 / span 12; } }

/* ── Reel ───────────────────────────────────────────────────── */
.reel { position: relative; aspect-ratio: 16 / 9; max-width: 100%; border-radius: 16px; overflow: hidden; background: var(--tile); cursor: pointer; }
.reel canvas { width: 100%; height: 100%; }
.reel .play {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: -0.02em; font-size: clamp(1.4rem, 4vw, 3.2rem);
  color: var(--fg); transition: opacity 0.4s;
}
.reel .play > span { display: inline-flex; align-items: center; gap: 16px; padding: 0.3em 0.7em 0.3em 0.45em; border-radius: 999px; background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(10px); }
.reel .play .ring { width: 1.1em; height: 1.1em; border: 2px solid currentColor; border-radius: 50%; display: inline-grid; place-items: center; transition: transform 0.5s var(--ease); }
.reel .play .ring::after { content: ""; border-style: solid; border-width: 0.22em 0 0.22em 0.38em; border-color: transparent transparent transparent currentColor; margin-left: 0.08em; }
.reel:hover .play .ring { transform: scale(1.15) rotate(90deg); }
.reel.playing .play { opacity: 0; }
.reel .time { position: absolute; left: 18px; bottom: 14px; color: var(--fg); background: color-mix(in srgb, var(--bg) 70%, transparent); padding: 4px 8px; border-radius: 6px; }

/* ── Marquee ────────────────────────────────────────────────── */
.marquee { overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding-block: 18px; white-space: nowrap; }
.marquee .track { display: inline-flex; gap: 48px; animation: slide 28s linear infinite; font-family: var(--font-display); font-size: clamp(1.1rem, 2.4vw, 1.9rem); letter-spacing: -0.02em; }
.marquee .track span::after { content: "✦"; color: var(--accent); margin-left: 48px; font-size: 0.7em; }
.marquee:hover .track { animation-play-state: paused; }

/* ── Works grid ─────────────────────────────────────────────── */
.works-head { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: 12px 24px; padding-block: clamp(40px, 6vw, 90px) 28px; }
.works-head h2 { font-size: clamp(2rem, 5vw, 4.6rem); letter-spacing: -0.04em; }
.works { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(28px, 4vw, 64px) clamp(12px, 1.6vw, 28px); padding-bottom: clamp(48px, 7vw, 110px); }
.work { display: grid; gap: 14px; min-width: 0; }
.work.portrait { grid-column: span 5; } .work.landscape { grid-column: span 7; }
.work:nth-child(4n+3) { grid-column: span 7; } .work:nth-child(4n+4) { grid-column: span 5; }
.work.portrait .media { aspect-ratio: 4 / 5; } .work.landscape .media { aspect-ratio: 16 / 10; }
.work .media { position: relative; border-radius: 12px; overflow: hidden; background: var(--tile); max-width: 100%; }
.work .media canvas { width: 100%; height: 100%; transform: scale(1.001); transition: transform 1.1s var(--ease); }
.work:hover .media canvas { transform: scale(1.05); }
.work .media .badge { position: absolute; top: 12px; left: 12px; padding: 5px 10px; border-radius: 999px; background: rgba(0, 0, 0, 0.55); color: #fff; font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase; backdrop-filter: blur(6px); }
.work .cap { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.work .cap h3 { font-family: var(--font-body); font-weight: 500; font-size: 1.05rem; letter-spacing: -0.01em; }
.work .tags { display: flex; gap: 6px; flex-wrap: wrap; }
.work .tags span { font-size: 0.72rem; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 3px 9px; }
.work .desc { color: var(--muted); font-size: 0.9rem; line-height: 1.55; max-width: 56ch; }
.work .desc:empty { display: none; }
@media (max-width: 760px) { .work, .work:nth-child(n) { grid-column: 1 / -1; } }


/* ── About ──────────────────────────────────────────────────── */
.about-hero { padding-block: clamp(40px, 7vw, 100px) clamp(32px, 5vw, 72px); row-gap: 32px; }
.about-hero .portrait { grid-column: 1 / span 5; aspect-ratio: 4 / 5; border-radius: 12px; overflow: hidden; background: var(--tile); max-width: 100%; }
.about-hero .portrait canvas { width: 100%; height: 100%; }
.about-hero .copy { grid-column: 7 / span 6; align-self: center; display: grid; gap: 22px; }
.about-hero h1 { font-size: clamp(2.4rem, 6vw, 5.6rem); letter-spacing: -0.04em; }
.about-hero .lede { font-size: clamp(1.05rem, 1.5vw, 1.3rem); max-width: 40ch; }
.about-hero .body { color: var(--muted); max-width: 48ch; display: grid; gap: 12px; }
@media (max-width: 820px) { .about-hero .portrait, .about-hero .copy { grid-column: 1 / span 12; } }

.list { border-top: 1px solid var(--line); }
.list .row { display: grid; grid-template-columns: 56px 1fr 1fr; gap: 16px 24px; padding-block: 24px; border-bottom: 1px solid var(--line); align-items: start; transition: padding-left 0.5s var(--ease); }
.list .row:hover { padding-left: 10px; }
.list .row h3 { font-family: var(--font-display); font-size: clamp(1.3rem, 2.4vw, 2rem); letter-spacing: -0.03em; }
.list .row p { color: var(--muted); max-width: 48ch; }
@media (max-width: 700px) { .list .row { grid-template-columns: 48px 1fr; } .list .row p { grid-column: 2; } }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding-block: clamp(48px, 7vw, 100px) 20px; }
.section-head h2 { font-size: clamp(1.8rem, 4vw, 3.4rem); letter-spacing: -0.04em; }

.tools { display: flex; flex-wrap: wrap; gap: 10px; padding-bottom: clamp(48px, 7vw, 110px); }
.tools span { padding: 10px 16px; border: 1px solid var(--line); border-radius: 999px; font-size: 0.9rem; transition: background 0.3s, color 0.3s, border-color 0.3s; }
.tools span:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }

/* ── Footer ─────────────────────────────────────────────────── */
footer { padding-bottom: calc(32px + env(safe-area-inset-bottom, 0px)); }
footer .big { font-size: clamp(2.6rem, 12vw, 12rem); letter-spacing: -0.05em; line-height: 0.85; padding-block: clamp(40px, 7vw, 90px) 24px; font-weight: 800; }
footer .big a { display: inline-block; transition: color 0.3s; } footer .big a:hover { color: var(--accent); }
footer .bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; padding-top: 20px; }

/* ── Scroll reveal ──────────────────────────────────────────── */
[data-reveal] { transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
[data-reveal].pre { opacity: 0; transform: translateY(28px); }
[data-reveal].in { opacity: 1; transform: none; }

/* giant centered page title (work) */
.page-title { min-height: clamp(320px, 55vh, 640px); display: grid; place-items: center; text-align: center; padding-block: clamp(32px, 6vw, 80px); }
.page-title h1 { font-size: clamp(3rem, 11vw, 11rem); line-height: 0.95; }
.page-title h1 .idx { font-size: 0.14em; margin-left: 0.15em; letter-spacing: 0.04em; }
.page-title .cjk { display: block; font-size: 0.22em; font-weight: 400; letter-spacing: 0.12em; color: var(--muted); margin-top: 0.4em; }

/* portrait photo is a wide landscape shot; keep the subject (right of centre) in frame in every crop */
.portrait img, .avatar img { object-position: 68% 42%; }

/* code wall (engineer page): fixed canvas behind the content */
.codewall { position: fixed; inset: 0; z-index: 0; pointer-events: none; width: 100vw; height: 100vh; max-width: none; }
.codewall ~ main { position: relative; z-index: 1; }
.page-title .hint { margin-top: 20px; }

/* real images in work tiles */
.work .media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.001); transition: transform 1.1s var(--ease); }
.work:hover .media img { transform: scale(1.05); }
.work .media > a { display: block; width: 100%; height: 100%; }
.work .cap a { border-bottom: 1px solid var(--line); transition: border-color 0.3s; }
.work .cap a:hover { border-color: var(--fg); }
main { padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }

@keyframes tabsIn { from { opacity: 0; transform: translateX(-50%) translateY(24px); } to { opacity: 1; transform: translateX(-50%); } }
@keyframes rise { to { transform: translateY(0); } }
@keyframes slide { to { transform: translateX(-50%); } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.35); } }
@keyframes ring { to { box-shadow: 0 0 0 10px rgba(47, 163, 107, 0); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .lines .line > span { transform: none; }
  [data-reveal].pre { opacity: 1; transform: none; }
}

/* Company mark in the footer copyright line. The logo is black ink on a
   transparent background, so it is inverted on dark themes. */
footer .bottom .copy { display: inline-flex; align-items: center; gap: 8px; }
footer .bottom .duo a { border-bottom: 1px solid var(--line); transition: color 0.3s, border-color 0.3s; }
footer .bottom .duo a:hover { color: var(--accent); border-color: currentColor; }
footer .bottom .corp { height: 22px; width: auto; display: block; }
:root[data-theme="dark"] footer .bottom .corp,
:root[data-expr="future"] footer .bottom .corp { filter: invert(1); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) footer .bottom .corp { filter: invert(1); }
}





/* Self-hosted video: showreel and looping tile clips */
.reel video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: var(--tile); }
.reel.playing { cursor: auto; }
.work .media video { width: 100%; height: 100%; object-fit: cover; display: block; transform: scale(1.001); transition: transform 1.1s var(--ease); }
.work:hover .media video { transform: scale(1.05); }

/* Project page (e.g. /design/lumi-ring) */
.project-head .back { display: inline-block; margin-bottom: 18px; color: var(--muted, inherit); text-decoration: none; }
.project-head .back:hover { text-decoration: underline; }
.project-head .tags { margin: 18px 0 0; display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.project-head .tags span { font-size: 0.72rem; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 3px 9px; }
.project-head .lede { max-width: 62ch; margin: 22px auto 0; font-size: clamp(1rem, 1.4vw, 1.2rem); line-height: 1.6; }
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(16px, 2.4vw, 32px); margin-top: clamp(32px, 5vw, 64px); }
.gallery figure { margin: 0; }
.gallery figure.wide { grid-column: 1 / -1; }
.gallery img { width: 100%; height: auto; display: block; border-radius: 12px; background: var(--tile); }
.gallery figcaption { margin-top: 10px; font-size: 0.78rem; opacity: 0.75; }
@media (max-width: 700px) { .gallery { grid-template-columns: 1fr; } }
.work .media > a > video { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ── Home: one focal point per screen ─────────────────────────
   Hero = name, one sentence, one link, photo. Work = one project
   per row, same 16:9 frame, caption on a shared top line. */
.hero .title { grid-column: 1 / span 8; }
.hero .title .lead { font-size: clamp(1.1rem, 1.6vw, 1.4rem); line-height: 1.5; color: var(--muted); max-width: 40ch; margin-top: 8px; }
.hero .title > a { display: inline-flex; gap: 10px; align-items: center; padding-bottom: 6px; border-bottom: 1px solid var(--accent-dot); width: max-content; transition: gap 0.3s var(--ease); }
.hero .title > a:hover { gap: 16px; }
.hero .portrait { grid-column: 9 / span 4; }

.works.feature { grid-template-columns: minmax(0, 1fr); row-gap: clamp(56px, 8vw, 120px); counter-reset: work; }
.works.feature .work { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); grid-template-rows: auto 1fr; column-gap: clamp(20px, 3vw, 48px); align-items: start; counter-increment: work; }
.works.feature .work .media { grid-column: 1; grid-row: 1 / span 2; aspect-ratio: 16 / 9; }
.works.feature .work .cap { grid-column: 2; grid-row: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; margin: 0; padding-top: 16px; border-top: 1px solid var(--line); }
.works.feature .work .cap::before { content: counter(work, decimal-leading-zero); font-family: var(--font-mono, monospace); font-size: 0.75rem; letter-spacing: 0.08em; color: var(--muted); }
.works.feature .work .cap h3 { font-size: clamp(1.5rem, 2.6vw, 2.4rem); letter-spacing: -0.03em; line-height: 1.05; }
.works.feature .work .desc { grid-column: 2; grid-row: 2; margin-top: 16px; max-width: 34ch; }
@media (max-width: 760px) {
  .hero .title, .hero .portrait { grid-column: 1 / -1; }
  .works.feature .work { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; }
  .works.feature .work .media, .works.feature .work .cap, .works.feature .work .desc { grid-column: 1; grid-row: auto; }
  .works.feature .work .cap { margin-top: 18px; }
}

/* "Say hello" contact card */
.hello-card { width: min(440px, calc(100vw - 32px)); padding: 28px 28px 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); color: var(--fg); box-shadow: 0 24px 80px rgba(0, 0, 0, 0.18); }
.hello-card::backdrop { background: rgba(20, 24, 26, 0.35); backdrop-filter: blur(4px); }
.hello-card[open] { animation: hc-in 0.35s var(--ease); }
@keyframes hc-in { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: none; } }
.hello-card .hc-eyebrow { font-size: 0.72rem; letter-spacing: 0.08em; color: var(--muted); }
.hello-card h2 { font-size: clamp(1.8rem, 4vw, 2.4rem); letter-spacing: -0.03em; margin: 6px 0 18px; }
.hello-card .hc-row { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.hello-card .hc-k { font-size: 0.72rem; letter-spacing: 0.06em; color: var(--muted); text-transform: uppercase; }
.hello-card .hc-v { overflow-wrap: anywhere; font-size: 1rem; }
.hello-card a.hc-v { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; }
.hello-card a.hc-v:hover { text-decoration-color: currentColor; }
.hello-card .hc-copy { font-size: 0.7rem; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); }
.hello-card .hc-copy:hover { color: var(--fg); border-color: var(--fg); }
.hello-card .hc-close { position: absolute; top: 12px; right: 14px; width: 36px; height: 36px; border-radius: 50%; font-size: 1.4rem; line-height: 1; color: var(--muted); }
.hello-card .hc-close:hover { background: var(--tile); color: var(--fg); }
@media (prefers-reduced-motion: reduce) { .hello-card[open] { animation: none; } }
@media (max-width: 520px) {
  .hello-card { padding: 24px 20px 14px; }
  .hello-card .hc-row { grid-template-columns: minmax(0, 1fr) auto; row-gap: 4px; }
  .hello-card .hc-k { grid-column: 1 / -1; }
  .hello-card .hc-v { overflow-wrap: normal; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

/* Home: the three proof points sit under the name, in the hero's text column */
.hero .title .hero-stats { margin-top: clamp(20px, 3vw, 40px); }
.hero .title .hero-stats > div { padding-top: 20px; padding-bottom: 20px; }

/* Work rows alternate: image left, right, left… */
.works.feature .work:nth-child(even) { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); }
.works.feature .work:nth-child(even) .media { grid-column: 2; }
.works.feature .work:nth-child(even) .cap,
.works.feature .work:nth-child(even) .desc { grid-column: 1; }
@media (max-width: 760px) {
  .works.feature .work:nth-child(even) { grid-template-columns: minmax(0, 1fr); }
  .works.feature .work:nth-child(even) .media,
  .works.feature .work:nth-child(even) .cap,
  .works.feature .work:nth-child(even) .desc { grid-column: 1; }
}

/* About: keywords as one flowing line of words instead of a box grid */
.keywords { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.15em 0; background: none; border: 0; border-top: 1px solid var(--line); padding-top: clamp(20px, 3vw, 36px); }
.keywords div { background: none; padding: 0; display: inline; }
.keywords div:hover { background: none; }
.keywords .en { font-size: clamp(1.7rem, 3.8vw, 3.4rem); letter-spacing: -0.03em; text-transform: none; line-height: 1.15; transition: color 0.3s; }
.keywords div:hover .en { color: var(--muted); }
.keywords div:not(:last-child)::after { content: "·"; color: var(--accent); margin: 0 0.4em; font-size: clamp(1.7rem, 3.8vw, 3.4rem); line-height: 1.15; }
:root[data-lang="zh"] .keywords .en { letter-spacing: 0; }

/* Engineer: text-only project cards, two per row */
.works.cards { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(24px, 4vw, 64px); row-gap: clamp(40px, 5vw, 72px); counter-reset: work; }
.works.cards .work { grid-column: auto; counter-increment: work; display: flex; flex-direction: column; gap: 16px; padding-top: 20px; border-top: 1px solid var(--line); }
.works.cards .work .cap { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; margin: 0; }
.works.cards .work .cap::before { content: counter(work, decimal-leading-zero); font-family: var(--font-mono, monospace); font-size: 0.75rem; letter-spacing: 0.08em; color: var(--muted); }
.works.cards .work .cap h3 { font-size: clamp(1.5rem, 2.6vw, 2.4rem); letter-spacing: -0.03em; line-height: 1.05; }
.works.cards .work .desc { max-width: 48ch; margin: 0; }
@media (max-width: 760px) { .works.cards { grid-template-columns: minmax(0, 1fr); } }

/* Game (pixel art) and Anime (dragon) pages: background illustration that appears while the mouse moves */
.reveal-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; background: url("img/design-bg.webp") right center / auto 100% no-repeat; -webkit-mask-image: linear-gradient(to left, #000 38vh, transparent 66vh); mask-image: linear-gradient(to left, #000 38vh, transparent 66vh); opacity: 0; transition: opacity 1.6s var(--ease); }
.reveal-bg--anime { background-image: url("img/anime-bg.webp"); -webkit-mask-image: linear-gradient(to left, #000 16vh, transparent 52vh); mask-image: linear-gradient(to left, #000 16vh, transparent 52vh); }
.reveal-bg.on { opacity: 0.38; transition-duration: 1.1s; }
.reveal-bg ~ main { position: relative; z-index: 1; }

/* ─── Lumi: the mini AI companion in the corner ─── */
.lumi-fab { position: fixed; right: calc(6px + env(safe-area-inset-right, 0px)); bottom: calc(6px + env(safe-area-inset-bottom, 0px)); z-index: 60; width: 128px; height: 128px; padding: 0; border: 0; cursor: pointer; background: none; -webkit-tap-highlight-color: transparent; }
.lumi-chibi { position: absolute; inset: 0; display: block; transform-origin: 50% 100%; filter: drop-shadow(0 6px 10px rgba(70, 60, 160, .28)); }
.lumi-chibi img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transform-origin: 50% 100%; animation: lumi-breathe 3.2s ease-in-out infinite; }
.lumi-chibi img.on { opacity: 1; }
.lumi-chibi.flip img { scale: -1 1; }
.lumi-chibi img[data-f^="walk"], .lumi-chibi img[data-f^="run"] { animation: none; }
.lumi-shadow { position: absolute; left: 50%; bottom: 2px; width: 60px; height: 9px; margin-left: -30px; border-radius: 50%; background: radial-gradient(rgba(60, 60, 140, .3), transparent 70%); pointer-events: none; }
@keyframes lumi-breathe { 0%, 100% { transform: scale(1, 1) translateY(0); } 50% { transform: scale(1.012, 1.03) translateY(-2px); } }
.lumi-fab .star { position: absolute; right: 14px; top: 8px; width: 18px; height: 18px; color: #7b88ee; filter: drop-shadow(0 1px 2px rgba(0,0,0,.2)); animation: lumi-twinkle 2.4s ease-in-out infinite; }
@keyframes lumi-hop { 0% { transform: translateY(0) scale(1, 1); } 30% { transform: translateY(-10px) scale(.97, 1.04); } 70% { transform: translateY(0) scale(1.04, .96); } 100% { transform: none; } }
@keyframes lumi-shadow { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(.85); opacity: .7; } }
.lumi-fab[aria-expanded="true"] { animation: none; }
.lumi-tip { position: fixed; right: calc(136px + env(safe-area-inset-right, 0px)); bottom: calc(64px + env(safe-area-inset-bottom, 0px)); z-index: 60; background: var(--bg); color: var(--fg); border: 1px solid var(--line); border-radius: 14px 14px 4px 14px; padding: 8px 12px; font: 500 0.82rem/1.3 var(--font-body); box-shadow: 0 10px 30px -14px rgba(48, 53, 56, .35); opacity: 0; transform: translateY(6px); transition: opacity .4s, transform .4s var(--ease); pointer-events: none; white-space: nowrap; }
.lumi-tip.on { opacity: 1; transform: none; }
.lumi-panel { position: fixed; right: calc(18px + env(safe-area-inset-right, 0px)); bottom: calc(150px + env(safe-area-inset-bottom, 0px)); z-index: 61; width: min(360px, calc(100vw - 36px)); height: min(520px, calc(100vh - 190px)); display: flex; flex-direction: column; background: var(--bg); color: var(--fg); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 30px 60px -24px rgba(48, 53, 56, .45); overflow: hidden; opacity: 0; transform: translateY(14px) scale(.97); transform-origin: bottom right; pointer-events: none; transition: opacity .3s, transform .35s var(--ease); font-family: var(--font-body); }
.lumi-panel.on { opacity: 1; transform: none; pointer-events: auto; }
.lumi-head { display: flex; align-items: center; gap: 10px; padding: 14px 14px 12px; background: linear-gradient(135deg, rgba(185, 175, 250, .28), rgba(169, 200, 212, .25)); border-bottom: 1px solid var(--line); }
.lumi-head img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.lumi-head b { display: block; font-size: .95rem; }
.lumi-head small { display: block; font-size: .72rem; opacity: .65; }
.lumi-head .x { margin-left: auto; width: 30px; height: 30px; border: 0; border-radius: 50%; background: transparent; color: var(--fg); font-size: 1.1rem; cursor: pointer; }
.lumi-head .x:hover { background: var(--line); }
.lumi-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.lumi-msg { flex-shrink: 0; max-width: 85%; padding: 9px 12px; border-radius: 16px; font-size: .88rem; line-height: 1.45; white-space: pre-wrap; word-wrap: break-word; }
.lumi-msg.bot { align-self: flex-start; background: var(--bg-2); border-bottom-left-radius: 4px; }
.lumi-msg.me { align-self: flex-end; background: var(--fg); color: var(--bg); border-bottom-right-radius: 4px; }
.lumi-msg.err { background: rgba(232, 58, 98, .12); }
.lumi-dots span { display: inline-block; width: 6px; height: 6px; margin: 0 2px; border-radius: 50%; background: currentColor; opacity: .4; animation: lumi-dot 1s infinite; }
.lumi-dots span:nth-child(2) { animation-delay: .15s; } .lumi-dots span:nth-child(3) { animation-delay: .3s; }
.lumi-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 10px; }
.lumi-chips button { border: 1px solid var(--line); background: transparent; color: var(--fg); border-radius: 999px; padding: 5px 10px; font: 400 .76rem var(--font-body); cursor: pointer; }
.lumi-chips button:hover { background: var(--bg-2); }
.lumi-form { display: flex; gap: 8px; padding: 10px 12px 12px; border-top: 1px solid var(--line); }
.lumi-form input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 999px; padding: 9px 14px; background: transparent; color: var(--fg); font: 400 16px var(--font-body); outline: none; }
.lumi-form input:focus { border-color: #7b88ee; }
.lumi-form button { border: 0; border-radius: 999px; padding: 0 16px; background: #7b88ee; color: #fff; font: 500 .85rem var(--font-body); cursor: pointer; }
.lumi-form button:disabled { opacity: .5; cursor: default; }
@keyframes lumi-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes lumi-twinkle { 0%, 100% { transform: scale(1) rotate(0); opacity: 1; } 50% { transform: scale(.75) rotate(20deg); opacity: .7; } }
@keyframes lumi-dot { 0%, 100% { opacity: .25; transform: translateY(0); } 50% { opacity: .9; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .lumi-fab, .lumi-fab .star, .lumi-dots span, .lumi-chibi, .lumi-shadow { animation: none; } }
@media print { .lumi-fab, .lumi-tip, .lumi-panel { display: none; } }
@media (max-width: 760px) {   /* sit above the bottom tab bar on narrow screens */
  .lumi-fab { bottom: calc(70px + env(safe-area-inset-bottom, 0px)); width: 100px; height: 100px; }
  .lumi-tip { bottom: calc(176px + env(safe-area-inset-bottom, 0px)); right: calc(14px + env(safe-area-inset-right, 0px)); }
  .lumi-panel { bottom: calc(184px + env(safe-area-inset-bottom, 0px)); height: min(480px, calc(100vh - 210px)); }
}

/* ─── Lumi colour theme: blue-violet, periwinkle by day, a starlit indigo stage by night ─── */
.pal button::before { content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 6px; border-radius: 50%; vertical-align: -1px; background: #a9c8d4; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.pal button[data-pal="lumi"]::before { background: linear-gradient(135deg, #7f95f5, #9a84ee); }
:root[data-palette="lumi"] {
  --bg: #f6f7fe; --bg-2: #e2e5fb; --fg: #262a5c; --muted: #6f78b0;
  --line: rgba(38, 42, 92, 0.14); --accent: #8b9cf7; --accent-ink: #1d2150;
  --sand: #a99ff0; --lilac: #d3d9fb; --tile: #eaecfc; --code: #7b88ee;
}
@media (prefers-color-scheme: dark) {
  :root[data-palette="lumi"]:not([data-theme="light"]) {
    --bg: #121433; --bg-2: #222658; --fg: #f1f2ff; --muted: #aab4fa;
    --line: rgba(241, 242, 255, 0.14); --accent: #8b9cf7; --accent-ink: #121433; --tile: #1b1e45; --code: #aab4fa;
  }
}
:root[data-palette="lumi"][data-theme="dark"], :root[data-palette="lumi"][data-expr="future"] {
  --bg: #121433; --bg-2: #222658; --fg: #f1f2ff; --muted: #aab4fa;
  --line: rgba(241, 242, 255, 0.14); --accent: #8b9cf7; --accent-ink: #121433; --tile: #1b1e45; --code: #aab4fa;
}
:root[data-palette="lumi"] body {
  background-image: radial-gradient(1200px 700px at 85% -10%, rgba(139, 156, 247, 0.22), transparent 60%), radial-gradient(900px 600px at -10% 110%, rgba(154, 132, 238, 0.16), transparent 60%);
  background-attachment: fixed;
}
:root[data-palette="lumi"] ::selection { background: #8b9cf7; color: #fff; }

/* YouTube embed: thumbnail first, the player loads on click */
.yt { position: relative; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: #000; cursor: pointer; margin-top: clamp(16px, 2.4vw, 32px); }
.yt img, .yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; display: block; }
.yt .play { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-display); font-size: clamp(1.4rem, 3vw, 2.4rem); font-weight: 500; color: var(--fg); }
.yt .play > span { display: inline-flex; align-items: center; gap: 16px; padding: 0.3em 0.7em 0.3em 0.45em; border-radius: 999px; background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(10px); }
.yt .play .ring { width: 1.1em; height: 1.1em; border: 2px solid currentColor; border-radius: 50%; display: inline-grid; place-items: center; transition: transform 0.5s var(--ease); }
.yt .play .ring::after { content: ""; border-style: solid; border-width: 0.22em 0 0.22em 0.38em; border-color: transparent transparent transparent currentColor; margin-left: 0.08em; }
.yt:hover .play .ring { transform: scale(1.15) rotate(90deg); }
.yt-cap { margin-top: 10px; font-size: 0.78rem; opacity: 0.75; }
.yt-cap a { color: inherit; }
.lumi-cards { flex-shrink: 0; display: flex; gap: 8px; margin-top: -2px; max-width: 100%; overflow-x: auto; padding-bottom: 2px; }
.lumi-card { flex: 0 0 auto; width: 98px; border-radius: 12px; overflow: hidden; background: var(--bg-2); border: 1px solid var(--line); color: var(--fg); text-decoration: none; transition: transform .25s var(--ease), box-shadow .25s; }
.lumi-card:hover { transform: translateY(-2px); box-shadow: 0 8px 18px -10px rgba(48, 53, 56, .45); }
.lumi-card img { width: 100%; height: 68px; object-fit: cover; display: block; }
.lumi-card span { display: block; padding: 5px 7px 6px; font-size: .7rem; line-height: 1.25; }

/* ─── Work gacha: a capsule machine covered in Lumi stickers ─── */
.gacha { position: relative; display: grid; justify-items: center; text-align: center; gap: 14px; padding: clamp(24px, 4vw, 56px) 0 clamp(56px, 8vw, 120px); }
.gacha-head h2 { font-size: clamp(1.8rem, 4vw, 3.4rem); letter-spacing: -0.04em; }
.gacha-head p { margin-top: 6px; color: var(--muted); font-size: .78rem; }
.gm-stage { position: relative; width: min(400px, 88vw); display: flex; flex-direction: column; align-items: center; gap: 14px; }
.gm-stage .gacha-btn { margin-top: 120px; }   /* room for the capsule to land */
.gm { position: relative; cursor: pointer; outline: none; }
.gm-svg { display: block; width: 100%; height: auto; overflow: visible; }
.gm:focus-visible .gm-svg { filter: drop-shadow(0 0 0 3px rgba(139,156,247,.6)); }
#gm-knob, #gm-balls { transform-box: fill-box; transform-origin: center; }
.gm:hover #gm-knob { transform: rotate(25deg); transition: transform .35s var(--ease); }
.gm.turn #gm-knob { animation: gm-turn .9s cubic-bezier(.5, 0, .3, 1); }
@keyframes gm-turn { to { transform: rotate(720deg); } }
.gm.shake #gm-balls { animation: gm-shake .9s ease-in-out; }
@keyframes gm-shake { 0%, 100% { transform: none; } 15% { transform: translate(-5px, 3px) rotate(-5deg); } 35% { transform: translate(6px, -5px) rotate(6deg); } 55% { transform: translate(-6px, -2px) rotate(-4deg); } 75% { transform: translate(4px, 3px) rotate(3deg); } }
/* the capsule that rolls out */
.gm-cap { position: absolute; left: 50%; top: 0; width: 64px; height: 64px; margin-left: -32px; z-index: 5; pointer-events: none; filter: drop-shadow(0 8px 8px rgba(40,30,120,.3)); }
.gm-cap svg { width: 100%; height: 100%; overflow: visible; }
.gm-cap .t, .gm-cap .b { transform-box: fill-box; transform-origin: center; transition: transform .55s var(--ease), opacity .55s; }
.gm-cap.pop .t { transform: translate(-24px, -60px) rotate(-40deg); opacity: 0; }
.gm-cap.pop .b { transform: translate(24px, 34px) rotate(30deg); opacity: 0; }
/* the prize: a liquid-glass card */
.gres { position: absolute; left: 50%; top: 50%; width: 80%; aspect-ratio: 3 / 4; z-index: 6; display: flex; flex-direction: column; overflow: hidden; border-radius: 22px; color: var(--fg); text-decoration: none; text-align: left;
  border: 1px solid rgba(255,255,255,.75); backdrop-filter: blur(18px) saturate(180%); -webkit-backdrop-filter: blur(18px) saturate(180%);
  background: linear-gradient(150deg, rgba(255,255,255,.8), rgba(255,255,255,.45) 55%, rgba(255,255,255,.6));
  box-shadow: inset 0 1px 0 #fff, 0 0 0 2px rgba(139,156,247,.85), 0 0 46px 6px rgba(139,156,247,.45), 0 26px 50px -24px rgba(60,50,140,.6);
  transform: translate(-50%, -50%) scale(.2); opacity: 0; transition: transform .6s cubic-bezier(.2, 1.4, .4, 1), opacity .3s; }
.gres.show { transform: translate(-50%, -50%) scale(1); opacity: 1; }
.gres img { width: 100%; flex: 1 1 auto; min-height: 0; object-fit: cover; display: block; }
.gres .info { padding: 12px 14px 14px; display: grid; gap: 4px; }
.gres .rar { position: absolute; top: 12px; right: 12px; padding: 3px 10px; border-radius: 999px; font: 700 .68rem var(--font-mono); letter-spacing: .12em; color: #fff; background: linear-gradient(135deg, #7f95f5, #b07cf0); }
.gres h3 { font: 600 1.02rem/1.2 var(--font-body); }
.gres small { font-size: .72rem; color: var(--muted); }
.gres .go { font: 500 .74rem var(--font-mono); letter-spacing: .06em; color: #5b6be0; }
.gm.dimmed { opacity: .35; filter: blur(2px); transition: opacity .4s, filter .4s; }
.gacha-btn { position: relative; padding: 14px 28px; border-radius: 999px; border: 1px solid rgba(255,255,255,.75); color: var(--fg); font: 600 1rem var(--font-body); cursor: pointer;
  background: linear-gradient(135deg, rgba(255,255,255,.6), rgba(255,255,255,.18)); backdrop-filter: blur(16px) saturate(180%); -webkit-backdrop-filter: blur(16px) saturate(180%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), inset 0 -8px 18px -10px rgba(120,110,230,.35), 0 12px 30px -14px rgba(70,60,160,.55); transition: transform .3s var(--ease); }
.gacha-btn:hover { transform: translateY(-2px) scale(1.03); }
.gacha-btn:disabled { opacity: .6; cursor: default; transform: none; }
@media (prefers-reduced-motion: reduce) { .gm.shake #gm-balls, .gm.turn #gm-knob { animation: none; } }

/* 3D mode: the machine is drawn by a viewport-wide canvas into the .gm box */
.lumi-3d { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 4; pointer-events: none; display: block; }
.gacha.is3d .gm-stage { width: min(560px, 92vw); }
.gacha.is3d .gm { width: 100%; height: min(70vh, 640px); }
.gacha.is3d .gm-svg { display: none; }
.gacha.is3d .gm-stage .gacha-btn { margin-top: 18px; }
.gacha.is3d .gres { width: min(300px, 72vw); }
.gacha-btn.charged { box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 0 0 2px rgba(139,156,247,.8), 0 0 30px 4px rgba(139,156,247,.55); animation: gacha-charge 1.6s ease-in-out infinite; }
@keyframes gacha-charge { 50% { box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 0 0 2px rgba(139,156,247,.5), 0 0 16px 1px rgba(139,156,247,.3); } }
/* the gacha stage is a dark showroom so the glowing knob and LEDs read */
.gacha.is3d { position: relative; isolation: isolate; color: #eef0ff; padding: clamp(48px, 7vw, 96px) 0; }
.gacha.is3d::before { content: ""; position: absolute; inset: 0 calc(50% - 50vw); z-index: -1;
  background: radial-gradient(60% 55% at 50% 58%, #2a2d6e 0%, #15163d 55%, #0b0c22 100%); }
.gacha.is3d .gacha-head h2 { color: #f3f4ff; }
.gacha.is3d .gacha-head p { color: #a9b4fa; }
.gacha.is3d .gacha-btn { color: #f3f4ff; border-color: rgba(170,180,255,.5); background: linear-gradient(135deg, rgba(139,156,247,.35), rgba(139,156,247,.08)); }
.gacha.is3d .gacha-btn.charged { color: #fff; background: linear-gradient(135deg, #8b9cf7, #6f5ce6); box-shadow: 0 0 0 2px rgba(170,180,255,.9), 0 0 36px 8px rgba(139,156,247,.65); }


/* the prize opens in the middle of the screen, where the capsule popped */
.gacha.is3d .gres { position: fixed; left: 50%; top: 50%; z-index: 10; }

/* bilingual inline text: show the half that matches the page language */
.i-zh { display: none; }
:root[data-lang="zh"] .i-zh { display: inline; }
:root[data-lang="zh"] .i-en { display: none; }
/* extra languages (music page): a .i-zht / .i-ja / .i-ko span replaces its .i-zh or .i-en sibling; without one, the fallback stays */
.i-zht, .i-ja, .i-ko { display: none; }
:root[data-lang5="zht"] .i-zh:has(~ .i-zht), :root[data-lang="ja"] .i-en:has(~ .i-ja), :root[data-lang="ko"] .i-en:has(~ .i-ko) { display: none; }
:root[data-lang5="zht"] .i-zht, :root[data-lang="ja"] .i-ja, :root[data-lang="ko"] .i-ko { display: inline; }
:root[data-lang5="zht"] { --font-display: "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", "Noto Sans SC", sans-serif; --font-body: "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", "Noto Sans SC", sans-serif; }
:root[data-lang="ja"] { --font-display: "Hiragino Sans", "Yu Gothic", "Noto Sans JP", sans-serif; --font-body: "Hiragino Sans", "Yu Gothic", "Noto Sans JP", sans-serif; --display-track: 0; }
:root[data-lang="ko"] { --font-display: "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif; --font-body: "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif; --display-track: 0; }
/* language menu (pages with more than two languages) */
.lang-wrap { position: relative; display: inline-flex; }
.lang-menu { position: absolute; top: calc(100% + 8px); right: 0; z-index: 80; display: none; flex-direction: column; gap: 2px; min-width: 150px; padding: 6px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg); box-shadow: 0 14px 40px rgba(10, 8, 30, .18); }
.lang-menu.on { display: flex; }
.lang-menu button { border: 0; background: transparent; text-align: left; padding: 9px 12px; border-radius: 9px; font: 500 .88rem var(--font-body); color: var(--fg); cursor: pointer; }
.lang-menu button:hover { background: var(--bg-2); }
.lang-menu button[aria-checked="true"] { background: #6f78d8; color: #fff; }

/* anime cast */
.cast { padding-bottom: clamp(48px, 7vw, 110px); }
.cast-grid { display: grid; gap: clamp(28px, 4vw, 56px); }
.cast-card { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(18px, 3vw, 44px); align-items: center; }
.cast-card:nth-child(even) { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); }
.cast-card:nth-child(even) .cast-img { order: 2; }
.cast-img { border-radius: 16px; overflow: hidden; background: linear-gradient(180deg, #eceef7, #e2e4f2); }
.cast-img img { width: 100%; height: auto; display: block; }
.cast-body h3 { font-size: clamp(2rem, 4.4vw, 3.8rem); letter-spacing: -0.03em; line-height: 1; }
.cast-trait { margin-top: 14px; font-size: .78rem; letter-spacing: .08em; color: #6f78d8; text-transform: uppercase; }
.cast-desc { margin-top: 16px; color: var(--muted); line-height: 1.65; max-width: 44ch; }
.cast-sub { margin-top: clamp(56px, 8vw, 110px); font-size: clamp(1.6rem, 3.4vw, 2.8rem); letter-spacing: -0.03em; }
.cast-rel { list-style: none; padding: 0; margin: 22px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 14px; }
.cast-rel li { border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; background: color-mix(in srgb, var(--bg-2) 40%, transparent); }
.cast-rel b { font-family: var(--font-mono); font-size: .8rem; letter-spacing: .08em; color: #6f78d8; }
.cast-rel p { margin-top: 8px; color: var(--muted); line-height: 1.6; font-size: .95rem; }
.cast-sum { margin-top: clamp(32px, 5vw, 56px); font-family: var(--font-display); font-size: clamp(1.2rem, 2.4vw, 1.9rem); line-height: 1.35; letter-spacing: -0.01em; max-width: 36ch; }
@media (max-width: 760px) { .cast-card, .cast-card:nth-child(even) { grid-template-columns: minmax(0, 1fr); } .cast-card:nth-child(even) .cast-img { order: 0; } }

/* anime: character poster wall */
.posters { padding-bottom: clamp(40px, 6vw, 90px); }
.poster-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(10px, 1.6vw, 22px); }
.poster { display: block; border-radius: 14px; overflow: hidden; background: #fff; box-shadow: 0 18px 40px -26px rgba(60, 50, 140, .45); transition: transform .5s var(--ease), box-shadow .5s; }
.poster img { width: 100%; height: auto; display: block; }
.poster:hover { transform: translateY(-6px) rotate(-.6deg); box-shadow: 0 28px 50px -24px rgba(60, 50, 140, .55); }
.cast-card { scroll-margin-top: calc(var(--nav-h) + 20px); }
@media (max-width: 760px) {
  .poster-row { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: calc(-1 * var(--gutter)); padding: 4px var(--gutter) 14px; }
  .poster { flex: 0 0 72%; scroll-snap-align: center; }
}
.design-lede { max-width: 52ch; margin: 22px auto 0; color: var(--muted); font-size: clamp(1rem, 1.4vw, 1.15rem); line-height: 1.6; }
/* FAQ */
.faq { padding-block: clamp(48px, 7vw, 100px); max-width: 860px; margin-inline: auto; }
.faq h2 { font-size: clamp(1.6rem, 3.4vw, 2.6rem); letter-spacing: -0.03em; margin-bottom: 18px; }
.faq-item { border-top: 1px solid var(--line); padding: 16px 0; }
.faq-item:last-child { border-bottom: 1px solid var(--line); }
.faq-item summary { cursor: pointer; font-weight: 500; font-size: 1.05rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq-item summary::after { content: "+"; color: var(--muted); transition: transform .3s; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { margin-top: 10px; color: var(--muted); line-height: 1.65; }
/* engineering cards: centred content */
.works.cards .work { align-items: center; text-align: center; }
.works.cards .work .cap { align-items: center; }
.works.cards .work .tags { justify-content: center; }
.works.cards .work .desc { margin-inline: auto; }

/* poster peel: hover peels the poster off from the bottom-right corner and shows the hidden persona underneath */
@property --peel { syntax: "<length-percentage>"; inherits: true; initial-value: 0px; }
.poster.peel { position: relative; aspect-ratio: 1122 / 1402; container-type: size; overflow: hidden; isolation: isolate; --peel: 8%;
  transition: --peel .9s cubic-bezier(.3, 1.3, .5, 1), transform .5s var(--ease), box-shadow .5s; }
.poster.peel:hover, .poster.peel:focus-visible, .poster.peel.peeled { --peel: 210%; transform: none; }
.poster.peel .persona { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 74% 40%; z-index: 0; }
.poster.peel .peel-front { position: absolute; inset: 0; z-index: 1;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--peel)), calc(100% - var(--peel)) 100%, 0 100%); }
.poster.peel .peel-front img { width: 100%; height: 100%; object-fit: cover; display: block; }
.poster.peel .peel-flap { position: absolute; inset: 0; z-index: 2; pointer-events: none; filter: drop-shadow(-6px -6px 10px rgba(30, 20, 80, .35)); }
.poster.peel .peel-flap i { position: absolute; inset: 0;
  clip-path: polygon(calc(100% - var(--peel)) 100%, 100% calc(100% - var(--peel)), calc(100% - var(--peel)) calc(100% - var(--peel)));
  background: linear-gradient(135deg, #cfd2e6 0%, #f6f6fb 42%, #ffffff 50%, #e9eaf4 60%, #bfc3dc 100%);
  background-size: 100% 100%; }
.poster.peel::after { content: "✦ peel"; position: absolute; right: calc(8% + 6px); bottom: 6px; z-index: 3; font: 600 .62rem var(--font-mono); letter-spacing: .12em; color: #6f78d8; opacity: .75; transition: opacity .3s; pointer-events: none; }
.poster.peel:hover::after, .poster.peel.peeled::after { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .poster.peel { transition: none; } }
/* Cast outfit switch */
.cast-look { display: grid; gap: 12px; min-width: 0; }
.cast-card:nth-child(even) .cast-look { order: 2; }
.cast-card:nth-child(even) .cast-look .cast-img { order: 0; }
.look-switch { justify-self: start; display: inline-flex; padding: 4px; gap: 2px; border-radius: 999px; border: 1px solid var(--line); background: color-mix(in srgb, var(--bg-2) 60%, transparent); }
.look-switch button { font: 600 .72rem var(--font-mono); letter-spacing: .1em; text-transform: uppercase; padding: 8px 16px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer; transition: background .3s, color .3s; }
.look-switch button[aria-pressed="true"] { background: #6f78d8; color: #fff; }
.look-switch button:focus-visible { outline: 2px solid #6f78d8; outline-offset: 2px; }
.cast-look .cast-img { position: relative; }
.cast-look .cast-img .look-alt { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.02); transition: opacity .55s var(--ease), transform .7s var(--ease); }
.cast-look .cast-img .look-alt.on { opacity: 1; transform: none; }
.cast-look .cast-img::after { content: "Coming soon"; position: absolute; left: 16px; top: 16px; translate: 0 -6px; z-index: 2; padding: 8px 16px; border-radius: 999px; font: 600 .7rem var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: #fff; background: rgba(60, 64, 120, .72); backdrop-filter: blur(6px); opacity: 0; transition: opacity .4s, translate .4s; pointer-events: none; }
:root[data-lang="zh"] .cast-look .cast-img::after { content: "造型即将上线"; letter-spacing: .2em; }
.cast-look.soon .cast-img::after { opacity: 1; translate: 0 0; }
@media (max-width: 760px) { .cast-card:nth-child(even) .cast-look { order: 0; } }
.cast-head { display: flex; justify-content: flex-start; align-items: center; flex-wrap: wrap; gap: 14px 24px; }
.cast-head .look-switch { justify-self: auto; }
.cast-look .cast-img .look-photo { display: block; overflow: hidden; background: #222; }
.cast-look .cast-img .look-photo::before { content: ""; position: absolute; inset: -30px; background: var(--bg) center / cover; filter: blur(24px) brightness(.85); }
.cast-look .cast-img .look-photo img { position: relative; width: 100%; height: 100%; object-fit: contain; }
/* Engineer cards: metric row */
.works.cards .work .stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; width: 100%; max-width: 52ch; margin: 8px 0 0; padding-top: 18px; border-top: 1px dashed var(--line); }
.works.cards .work .stats div { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.works.cards .work .stats dt { font-family: var(--font-display); font-size: clamp(1.25rem, 2vw, 1.8rem); font-weight: 600; letter-spacing: -0.02em; line-height: 1; color: var(--fg); white-space: nowrap; }
.works.cards .work .stats dd { margin: 0; font-size: .74rem; line-height: 1.35; color: var(--muted); }
@media (max-width: 420px) { .works.cards .work .stats dt { font-size: 1.1rem; } }
/* Anime: relationship map */
.relmap { position: relative; margin: 40px auto 0; width: 100%; max-width: 980px; aspect-ratio: 10 / 7; }
.relmap-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.relmap-lines path { fill: none; stroke: color-mix(in srgb, #6f78d8 45%, transparent); stroke-width: 2; stroke-dasharray: 6 7; vector-effect: non-scaling-stroke; transition: stroke .3s, stroke-width .3s; }
.relmap-lines path.on { stroke: #6f78d8; stroke-width: 3; stroke-dasharray: none; }
.relmap-lines path.dim { opacity: .25; }
.rel-node { --s: clamp(54px, 10vw, 108px); position: absolute; width: var(--s); height: var(--s); translate: -50% -50%; padding: 0; border: 0; background: none; color: inherit; cursor: pointer; z-index: 2; }
.rel-node.core { --s: clamp(70px, 13vw, 140px); }
.rel-node img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; border: 3px solid var(--bg); box-shadow: 0 0 0 2px color-mix(in srgb, #6f78d8 55%, transparent), 0 14px 30px -14px rgba(60, 50, 150, .6); transition: transform .35s var(--ease), box-shadow .35s; }
.rel-node.core img { box-shadow: 0 0 0 3px #6f78d8, 0 0 40px -6px rgba(140, 130, 255, .7); }
.rel-node b, .rel-node small { position: absolute; left: 50%; translate: -50% 0; white-space: nowrap; }
.rel-node b { top: calc(100% + 8px); font: 600 clamp(.62rem, 1.2vw, .86rem) var(--font-mono); letter-spacing: .12em; }
.rel-node small { top: calc(100% + 8px + 1.5em); font-size: clamp(.58rem, 1vw, .74rem); color: var(--muted); }
.rel-node:hover img, .rel-node.on img { transform: scale(1.07); box-shadow: 0 0 0 3px #6f78d8, 0 0 36px -4px rgba(140, 130, 255, .8); }
.rel-node.dim { opacity: .45; }
.rel-label { position: absolute; translate: -50% -50%; z-index: 1; padding: 5px 12px; border-radius: 999px; border: 1px solid color-mix(in srgb, #6f78d8 45%, transparent); background: var(--bg); color: #6f78d8; font: 600 clamp(.58rem, 1vw, .74rem) var(--font-mono); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; cursor: pointer; transition: background .3s, color .3s; }
.rel-label.on, .rel-label:hover { background: #6f78d8; color: #fff; }
.rel-details { max-width: 640px; margin: 64px auto 0; min-height: 7.5em; text-align: center; }
.rel-detail { animation: rel-in .45s var(--ease); }
.rel-detail b { font: 600 .8rem var(--font-mono); letter-spacing: .12em; color: #6f78d8; }
.rel-detail p { margin-top: 10px; color: var(--muted); line-height: 1.7; font-size: 1rem; }
@keyframes rel-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (max-width: 560px) { .rel-node small { display: none; } .relmap { aspect-ratio: 1; } .rel-label { padding: 3px 8px; } }
@media (max-width: 560px) {
  .rel-label[data-pair="0"] { top: 33% !important; }
  .rel-label[data-pair="1"] { top: 71% !important; }
  .rel-label[data-pair="2"] { left: 18% !important; top: 37% !important; }
  .rel-label[data-pair="3"] { left: 82% !important; top: 37% !important; }
  .rel-label[data-pair="4"] { left: 20% !important; top: 20% !important; }
}
/* Anime: creator's note */
.creator-note { max-width: 640px; margin: clamp(80px, 11vw, 150px) auto 0; text-align: center; }
.note-label { font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; color: #6f78d8; }
.note-label::before, .note-label::after { content: "✦"; margin: 0 .8em; opacity: .7; }
.note-body { margin-top: 22px; color: var(--muted); line-height: 1.95; font-size: 1.02rem; }
:root[data-lang="zh"] .note-body { line-height: 2.1; letter-spacing: .02em; }
.note-sign { margin-top: 22px; font-family: var(--font-display); font-style: italic; font-size: 1.05rem; }
.cast-sum { margin-inline: auto; text-align: center; }
/* Music page: always dark, particle sphere behind everything */
:root[data-page="music"] { --bg: #04050a; --bg-2: #141726; --fg: #f1f2f8; --muted: #9ea3bd; --line: rgba(241, 242, 248, 0.14); --tile: #141726; color-scheme: dark; }
:root[data-page="music"] body { background: #04050a; }
canvas.orb { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; pointer-events: none; }
canvas.orb ~ main, canvas.orb ~ footer { position: relative; z-index: 1; }
.music-hero { min-height: calc(100svh - var(--nav-h)); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.music-sub { margin-top: 18px; color: var(--muted); font-size: clamp(.95rem, 1.4vw, 1.1rem); letter-spacing: .01em; }
/* Music: Lumiverse artwork behind the sphere, and the player */
.music-bg { position: fixed; inset: 0; z-index: 0; transform: scale(1.04); transition: transform 1.2s var(--ease); }
.music-bg i { position: absolute; inset: 0; background: center / cover no-repeat; opacity: 0; transition: opacity .6s linear; }
.music-bg i:first-child { opacity: 1; }
.music-bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(4, 5, 12, .34) 0%, rgba(4, 5, 12, .52) 60%, rgba(4, 5, 10, .78) 100%); }
:root[data-page="music"].playing .music-bg { transform: scale(1.0); }
.music-player { margin-top: 34px; display: flex; align-items: center; gap: 16px; width: min(440px, 100%); padding: 14px 18px 14px 14px; border-radius: 20px; text-align: left; background: transparent; border: 0; }
.music-player .play { flex: none; width: 52px; height: 52px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; background: #f1f2f8; color: #141726; transition: transform .25s var(--ease), box-shadow .3s; box-shadow: 0 0 0 0 rgba(200, 200, 255, .5); }
.music-player .play:hover { transform: scale(1.06); box-shadow: 0 0 24px rgba(190, 190, 255, .55); }
.music-player .play svg { width: 22px; height: 22px; fill: currentColor; }
.music-player .i-pause, .music-player.on .i-play { display: none; }
.music-player.on .i-pause { display: inline; }
.music-player .track { flex: 1; min-width: 0; }
.music-player .t-name { font-weight: 600; letter-spacing: -0.01em; }
.music-player .t-sub { margin-top: 2px; font-size: .8rem; color: var(--muted); }
.music-player .t-soon { display: none; }
.music-player.missing .t-soon { display: inline; }
.music-player.missing .play { opacity: .45; cursor: not-allowed; }
.music-player .bar { margin-top: 10px; display: flex; align-items: center; gap: 10px; }
.music-player input[type=range] { flex: 1; accent-color: #c9c6ff; height: 4px; }
.music-player .t-time { font: 500 .72rem var(--font-mono); color: var(--muted); min-width: 3.2em; text-align: right; }
.music-player .t-ver { font-weight: 400; color: var(--muted); }
.music-hero h1, .music-sub { transition: opacity 2.4s var(--ease); }
:root.finale .music-hero h1, :root.finale .music-sub { opacity: 0.08; }
:root.playing .music-hero h1, :root.playing .music-sub { opacity: 0; }

/* Music player: while playing and idle it folds into the play button with a progress ring; any movement unfolds it */
.music-player { overflow: visible; transition: transform .9s var(--ease), width .9s var(--ease), padding .9s var(--ease), background .6s, border-color .6s, gap .7s var(--ease); }
.music-player .track { transition: opacity .35s, transform .5s var(--ease); }
.music-player .play { position: relative; transition: transform .25s var(--ease), box-shadow .3s, width .6s var(--ease), height .6s var(--ease), background .6s, color .6s; }
.music-player .play::before { content: ""; position: absolute; inset: -6px; border-radius: 50%; background: conic-gradient(#c9c6ff calc(var(--p, 0) * 1turn), rgba(255, 255, 255, .22) 0); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 2px)); mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 2px)); opacity: 0; transition: opacity .6s; pointer-events: none; }
:root.idle .music-player { transform: translateY(clamp(8px, 1.5vh, 16px)); }
.music-player { position: relative; top: 9vh; }
:root.idle .music-player:not(.peek) { width: 64px; gap: 0; padding: 6px; background: rgba(20, 22, 40, 0); border-color: rgba(255, 255, 255, 0); }
:root.idle .music-player:not(.peek) .track { opacity: 0; transform: translateX(-12px); pointer-events: none; width: 0; overflow: hidden; }
:root.idle .music-player:not(.peek) .play { width: 40px; height: 40px; background: rgba(241, 242, 248, .14); color: #f1f2f8; }
:root.idle .music-player:not(.peek) .play svg { width: 16px; height: 16px; }
:root.idle .music-player:not(.peek) .play::before { opacity: 1; }
:root.idle .lumi-fab:not(:hover), :root.idle .lumi-tip.on { opacity: .2 !important; transition: opacity .8s; }
nav.tabs a { transition: opacity .8s; }
:root.idle nav.tabs:not(:hover) a { opacity: .25; }
/* Music: brush-script dialogue over the scenes. Chinese is set as vertical calligraphy columns that cascade
   down the page; each character bleeds in like ink, one after another. English is set as staggered brush lines. */
.lyrics { position: fixed; z-index: 2; inset: 0; pointer-events: none; }
.lyric { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity 1.4s var(--ease); }
.lyric.on { opacity: 1; }
.lyric .ch { display: inline-block; color: #fbfaff; text-shadow: 0 2px 16px rgba(10, 8, 30, .6), 0 0 2px rgba(10, 8, 30, .45); }
.lyric.on .ch { animation: ink 1.5s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i) * .42s + .2s); }
@keyframes ink { 0% { opacity: 0; filter: blur(10px); transform: scale(1.35) rotate(-4deg); } 55% { opacity: .9; filter: blur(1.5px); } 100% { opacity: 1; filter: blur(0); transform: none; } }
.lyric > span { filter: url(#brush); }
/* Chinese: vertical columns, right to left, each one starting a little lower than the last */
.lyric .v { font-family: "Ma Shan Zheng", "STXingkai", "KaiTi", serif; font-size: clamp(1.9rem, 3.6vw, 3.3rem); line-height: 1.15; writing-mode: vertical-rl; white-space: nowrap; }
.lyric .v .col { display: block; margin-left: .35em; padding-top: calc(var(--c) * 1.6em); }
.lyric .v .ch { margin-bottom: .06em; }
.lyric .v .pu { font-size: .7em; opacity: .85; }
.lyric[data-pos="r"] .v { position: absolute; top: 14vh; right: max(var(--gutter), 8vw); }
.lyric[data-pos="l"] .v { position: absolute; top: 14vh; left: max(var(--gutter), 7vw); }
/* English: brush lines, each indented and tilted a touch */
.lyric .h { font-family: "Kaushan Script", "Brush Script MT", cursive; font-size: clamp(1.5rem, 2.8vw, 2.6rem); line-height: 1.3; }
.lyric .h .row { display: block; white-space: nowrap; margin-left: calc(var(--c) * 1.4em); transform: rotate(-3deg); transform-origin: left center; }
.lyric .h .ch { margin-right: .02em; }
.lyric[data-pos="l"] .h { position: absolute; top: 18vh; left: max(var(--gutter), 6vw); }
.lyric[data-pos="r"] .h { position: absolute; top: 18vh; right: max(var(--gutter), 8vw); text-align: right; }
.lyric[data-pos="r"] .h .row { margin-left: 0; margin-right: calc(var(--c) * -1.4em); transform-origin: right center; }
/* one script per language: Chinese (both) and Japanese run vertically, English and Korean run as brush lines */
.lyric .i-zht { font-family: "LXGW WenKai TC", "Kaiti TC", "DFKai-SB", serif; font-weight: 700; }
.lyric .i-ja { font-family: "Yuji Boku", "Hiragino Mincho ProN", "Yu Mincho", serif; }
.lyric .i-ko { font-family: "Nanum Brush Script", "Kaushan Script", cursive; font-size: clamp(2rem, 3.8vw, 3.5rem); line-height: 1.2; }
:root .lyric > span.v, :root .lyric > span.h { display: none; }
:root:not([data-lang5]) .lyric .i-en, :root[data-lang5="en"] .lyric .i-en, :root[data-lang5="zh"] .lyric .i-zh, :root[data-lang5="zht"] .lyric .i-zht,
:root[data-lang5="ja"] .lyric .i-ja, :root[data-lang5="ko"] .lyric .i-ko { display: block; }
/* last scene: the words turn the same blue-violet as the ring */
.lyric.blue .ch { background: linear-gradient(100deg, #8fa8ff, #b38cff, #7fb6ff, #b38cff); background-size: 400% 100%; background-position: calc(var(--i) * 18%) 0; -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; filter: drop-shadow(0 2px 10px rgba(20, 10, 60, .55)); }
.lyric.blue.on .ch { animation: ink 1.5s cubic-bezier(.2, .7, .2, 1) both, lyric-shift 5s ease-in-out infinite alternate; animation-delay: calc(var(--i) * .42s + .2s), 0s; }
@keyframes lyric-shift { to { background-position: 100% 0; } }
@media (max-width: 700px) { .lyric .v { font-size: 1.8rem; } .lyric .h { font-size: 1.35rem; } .lyric .i-ko { font-size: 1.8rem; } .lyric[data-pos] .h { top: 11vh; } }
@media (prefers-reduced-motion: reduce) { .lyric.on .ch { animation: none; } .lyric > span { filter: none; } }
/* keep the player one row tall while it folds: text never wraps, it just clips */
.music-player .track { overflow: hidden; }
.music-player .t-name, .music-player .t-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
:root.idle .music-player:not(.peek) .track { width: auto; flex: 0 1 0; min-width: 0; }
.music-sub { color: #fbfaff; font-weight: 500; text-shadow: 0 1px 2px rgba(10, 8, 30, .7), 0 2px 18px rgba(10, 8, 30, .65); }
.music-hero h1 { text-shadow: 0 4px 30px rgba(10, 8, 30, .45); }
/* after "这样就好" settles, it melts away and LUMI calls his name, softly, missing him: GIN…… with echoes drifting out */
.lyric .call { position: absolute; top: 24vh; right: max(var(--gutter), 9vw); font-family: "Kaushan Script", "Brush Script MT", cursive; font-size: clamp(2.8rem, 6vw, 5.4rem); letter-spacing: .04em; white-space: nowrap; opacity: 0; color: #b4a6ff; filter: none; text-shadow: 0 2px 16px rgba(20, 10, 60, .55), 0 0 22px rgba(150, 140, 255, .35); will-change: opacity, transform; }
.lyric.on .call { animation: call-in 3.2s cubic-bezier(.2, .7, .2, 1) 1.2s forwards, call-hue 6s ease-in-out 1.2s infinite alternate; }
.lyric .call::before, .lyric .call::after { content: attr(data-t); position: absolute; left: 0; top: 0; color: inherit; text-shadow: none; opacity: 0; transform-origin: 60% 50%; will-change: opacity, transform; pointer-events: none; }
.lyric.on .call::before { animation: call-echo 4.2s ease-out 4.4s infinite; }
.lyric.on .call::after { animation: call-echo 4.2s ease-out 6.5s infinite; }
@keyframes call-in { 0% { opacity: 0; transform: scale(.92) translateY(8px); } 60% { opacity: .9; } 100% { opacity: 1; transform: none; } }
@keyframes call-hue { from { color: #9fb4ff; } to { color: #c39cff; } }
@keyframes call-echo { 0% { opacity: .4; transform: scale(1); } 100% { opacity: 0; transform: scale(1.35); } }
@media (max-width: 700px) { .lyric .call { top: 20vh; font-size: 2.4rem; } }
@media (prefers-reduced-motion: reduce) { .lyric.on .call { animation: none; opacity: 1; } .lyric.on .call::before, .lyric.on .call::after { animation: none; } }
/* Anime: Roxy, the house cat */
.roxy { margin-top: clamp(56px, 8vw, 110px); }
.roxy .cast-sub { margin-top: 0; }
.roxy-grid { margin-top: 24px; display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(20px, 3.5vw, 52px); align-items: start; }
.roxy-poster { border-radius: 16px; }
.roxy-body .cast-trait { margin-top: 0; }
.roxy-body .cast-desc { max-width: 60ch; }
.roxy-look { margin-top: 22px; }
@media (max-width: 760px) { .roxy-grid { grid-template-columns: minmax(0, 1fr); } .roxy-poster { max-width: 360px; } }
.companions { margin-top: clamp(40px, 6vw, 80px); }
.companions .cast-body .comp-title { margin-top: 8px; font-family: var(--font-display); font-style: italic; font-size: clamp(1.05rem, 1.6vw, 1.35rem); color: var(--muted); }
.companions .roxy-poster { display: block; width: min(220px, 70%); margin-top: 22px; border-radius: 14px; }
/* Music: hover the title and the screen "breaks": RGB split, sliced jitter and a stuttering flicker */
.music-hero h1 { position: relative; cursor: default; }
.music-hero h1::before, .music-hero h1::after { content: attr(data-text); position: absolute; inset: 0; opacity: 0; pointer-events: none; mix-blend-mode: screen; }
.music-hero h1::before { color: #36f2ff; }
.music-hero h1::after { color: #ff2fae; }
:root:not(.playing) .music-hero h1:hover { animation: glitch-main 1.1s steps(1, end) infinite; }
:root:not(.playing) .music-hero h1:hover::before { opacity: .85; animation: glitch-a .42s steps(1, end) infinite; }
:root:not(.playing) .music-hero h1:hover::after { opacity: .85; animation: glitch-b .5s steps(1, end) infinite; }
@keyframes glitch-main {
  0% { opacity: 1; transform: none; } 8% { opacity: .35; transform: translate(2px, -1px) skewX(-6deg); } 10% { opacity: 1; transform: none; }
  32% { transform: translate(-3px, 0); } 34% { transform: none; } 51% { opacity: .15; } 53% { opacity: 1; transform: translate(4px, 1px) skewX(4deg); }
  56% { transform: none; } 78% { opacity: .7; transform: translate(-1px, 2px); } 80% { opacity: 1; transform: none; }
}
@keyframes glitch-a {
  0% { clip-path: inset(8% 0 72% 0); transform: translate(-6px, 0); } 20% { clip-path: inset(55% 0 20% 0); transform: translate(5px, 0); }
  40% { clip-path: inset(30% 0 52% 0); transform: translate(-9px, 0); } 60% { clip-path: inset(80% 0 4% 0); transform: translate(3px, 0); }
  80% { clip-path: inset(12% 0 60% 0); transform: translate(-4px, 0); } 100% { clip-path: inset(44% 0 36% 0); transform: translate(7px, 0); }
}
@keyframes glitch-b {
  0% { clip-path: inset(66% 0 12% 0); transform: translate(6px, 0); } 25% { clip-path: inset(18% 0 64% 0); transform: translate(-5px, 0); }
  50% { clip-path: inset(40% 0 40% 0); transform: translate(9px, 0); } 75% { clip-path: inset(4% 0 82% 0); transform: translate(-3px, 0); }
  100% { clip-path: inset(70% 0 8% 0); transform: translate(4px, 0); }
}
@media (prefers-reduced-motion: reduce) { .music-hero h1:hover, .music-hero h1:hover::before, .music-hero h1:hover::after { animation: none; } }

/* the card (tint, border and frosted blur) is its own layer so folding just fades it out, no flicker, nothing left behind */
.music-player::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: rgba(20, 22, 40, .45); border: 1px solid rgba(255, 255, 255, .14); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); transition: opacity .6s; pointer-events: none; }
.music-player { isolation: isolate; }
:root.idle .music-player:not(.peek)::before { opacity: 0; }
:root.playing .music-hero h1 { pointer-events: none; }
.relmap[hidden], .rel-details[hidden], .cast-sub[hidden] { display: none !important; }
/* About: letter */
.letter { max-width: 40em; margin: clamp(48px, 7vw, 96px) auto; padding: clamp(24px, 4vw, 44px); border: 1px solid var(--line); border-radius: 18px; font-family: var(--font-cjk); }
.letter h2 { font-size: clamp(1.3rem, 2.4vw, 1.8rem); letter-spacing: .04em; margin-bottom: 18px; }
.letter p { line-height: 2; margin-top: 14px; color: var(--fg); }
.letter .letter-sign { text-align: right; margin-top: 22px; color: var(--muted); }
.cast-sum[hidden] { display: none !important; }
.letter .i-en { font-family: var(--font-body); }
/* About: blinking down arrow under the intro */
.scroll-cue { display: block; width: clamp(120px, 16vw, 220px); margin: clamp(40px, 7vw, 96px) auto 0; color: var(--fg); animation: cue-blink 1.6s ease-in-out infinite; }
.scroll-cue svg { display: block; width: 100%; height: auto; fill: none; stroke: currentColor; stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.scroll-cue:hover { color: #7b88ee; }
@keyframes cue-blink { 0%, 100% { opacity: .2; transform: translateY(0); } 50% { opacity: 1; transform: translateY(14px); } }
@media (prefers-reduced-motion: reduce) { .scroll-cue { animation: none; } }
.letter { scroll-margin-top: calc(var(--nav-h) + 20px); }
/* About: the love line under the intro, small and light */
.love-line { margin-top: 22px; opacity: .8; }
/* Game page: switch between Hokkaido Smash and World of Lumi (World of Lumi is empty for now, only the footer shows) */
.game-switch-wrap { display: flex; justify-content: center; padding-top: clamp(20px, 3vw, 36px); }
.game-switch button[aria-selected="true"] { background: #6f78d8; color: #fff; }
:root.wol .game-smash { display: none; }
:root.wol .reveal-bg { display: none; }
/* World of Lumi: the 3D world viewer */
.wol-world { display: none; padding-top: clamp(20px, 3vw, 36px); }
:root.wol .wol-world { display: block; }
.wol-stage { position: relative; aspect-ratio: 16 / 9; max-height: 78vh; width: 100%; border-radius: 18px; overflow: hidden; background: #0b0c14; border: 1px solid var(--line); touch-action: none; }
.wol-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 1; opacity: 0; transition: opacity 1.2s ease; cursor: grab; }
.wol-stage canvas:active { cursor: grabbing; }
.wol-stage.live canvas { opacity: 1; }
.wol-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(6px) brightness(.55); transform: scale(1.04); }
.wol-hud { position: absolute; z-index: 2; left: 20px; top: 16px; right: 20px; pointer-events: none; color: #fff; text-shadow: 0 1px 8px rgba(0,0,0,.6); }
.wol-place { font: 600 .78rem var(--font-mono); letter-spacing: .14em; text-transform: uppercase; margin: 0; }
.wol-status { margin: 8px 0 0; font-size: .95rem; opacity: .9; }
.wol-hint { position: absolute; z-index: 2; left: 20px; bottom: 14px; margin: 0; color: #fff; font: .72rem var(--font-mono); letter-spacing: .08em; opacity: 0; transition: opacity .6s; pointer-events: none; text-shadow: 0 1px 6px rgba(0,0,0,.7); }
.wol-stage.live .wol-hint { opacity: .75; }
.wol-open { position: absolute; z-index: 2; right: 16px; top: 12px; padding: 7px 14px; border-radius: 999px; background: rgba(15,16,28,.55); backdrop-filter: blur(8px); color: #fff; font: 600 .7rem var(--font-mono); letter-spacing: .08em; text-decoration: none; }
.wol-open:hover { background: #6f78d8; }
@media (max-width: 700px) { .wol-stage { aspect-ratio: 3 / 4; } .wol-hint { display: none; } }
.seek-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; background: #10131f; }
.seek-stage .wol-open { z-index: 3; }
@media (max-width: 700px) { .seek-stage { aspect-ratio: 16 / 9; } }
/* Experiment tab: PlayGen2 frames streamed from a cloud GPU */
:root.exp .game-smash, :root.exp .reveal-bg { display: none; }
.exp-world { display: none; padding-top: clamp(20px, 3vw, 36px); }
:root.exp .exp-world { display: block; }
.exp-stage { position: relative; aspect-ratio: 4 / 3; width: min(100%, calc(74vh * 4 / 3)); margin: 0 auto; border-radius: 18px; overflow: hidden; background: #0b0c14; border: 1px solid var(--line); touch-action: none; }
.exp-frame { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
.exp-frame[hidden] { display: none; }
.exp-hud { position: absolute; z-index: 2; left: 20px; top: 16px; right: 20px; pointer-events: none; color: #fff; text-shadow: 0 1px 8px rgba(0,0,0,.6); }
.exp-status { margin: 8px 0 0; font-size: .95rem; opacity: .9; }
.exp-start { position: absolute; z-index: 3; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 12px 26px; border: 0; border-radius: 999px; background: #6f78d8; color: #fff; font: 600 .8rem var(--font-mono); letter-spacing: .12em; text-transform: uppercase; cursor: pointer; }
.exp-start:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.exp-start[hidden] { display: none; }
.exp-pad { position: absolute; z-index: 2; right: 14px; bottom: 14px; display: none; grid-template-columns: repeat(3, 44px); gap: 6px; }
.exp-stage.live .exp-pad { display: grid; }
.exp-pad button { width: 44px; height: 44px; border: 0; border-radius: 12px; background: rgba(15,16,28,.55); backdrop-filter: blur(8px); color: #fff; font: 600 .9rem var(--font-mono); touch-action: none; }
.exp-pad button.active { background: #6f78d8; }
.exp-keys { margin: 14px 0 0; text-align: center; color: var(--muted); font-size: .72rem; letter-spacing: .06em; }
.exp-keys i { font-style: normal; opacity: .5; padding: 0 4px; }
.exp-note { max-width: 62ch; margin: 10px auto 0; text-align: center; color: var(--muted); font-size: .9rem; line-height: 1.55; }
@media (hover: hover) and (pointer: fine) { .exp-stage.live .exp-pad { display: none; } }
@media (max-width: 560px) { .game-switch button { padding: 8px 11px; letter-spacing: .06em; white-space: nowrap; } }
/* About: a short dated log of what I've been doing */
.diary dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 14px 20px; }
.diary dt { font: 600 .85rem var(--font-mono); color: #6f78d8; padding-top: .35em; }
.diary dd { margin: 0; line-height: 2; }
@media (max-width: 600px) { .diary dl { grid-template-columns: 1fr; gap: 4px; } .diary dd { margin-bottom: 12px; } }
/* About: the love line closes the page, centred above the footer */
.love-end { margin: clamp(56px, 8vw, 110px) auto 0; text-align: center; }
.diary .diary-end { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }
.works .work[hidden] { display: none !important; }
.diary .diary-end:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
/* Anime: the LUMI · SEA PV above the Lumi Universe card */
.anime-pv { margin-bottom: clamp(32px, 5vw, 64px); }
.anime-pv .reel .play { color: #fff; text-shadow: 0 2px 18px rgba(10, 8, 30, .45); }
.anime-pv .reel .play > span { background: rgba(15, 16, 28, .38); }
/* Music: track list (01 GINNI, 02 KIKI, 03 MOMO) and a subtitle per track */
.music-player .s2, .music-player .s3 { display: none; }
.music-player:not([data-track="0"]) .s1 { display: none; }
.music-player[data-track="1"] .s2, .music-player[data-track="2"] .s3 { display: inline; }
.music-player .t-list { display: flex; gap: 6px; margin-top: 10px; flex-wrap: nowrap; overflow: hidden; }
.music-player .t-list button { flex: 0 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 5px 11px; border-radius: 999px; border: 1px solid rgba(241, 242, 248, .22); background: transparent; color: inherit; font: 500 .72rem var(--font-body); opacity: .75; cursor: pointer; transition: background .25s, opacity .25s; }
.music-player .t-list button b { font: 600 .66rem var(--font-mono); margin-right: 4px; opacity: .7; }
.music-player .t-list button:hover { opacity: 1; }
.music-player .t-list button[aria-pressed="true"] { background: #6f78d8; border-color: #6f78d8; color: #fff; opacity: 1; }
/* Music: the SEA poster as the background, shown whole in the middle, with a blurred copy filling the sides */
.music-bg--poster b { position: absolute; inset: 0; background: center / cover no-repeat; }
.music-bg--poster .mb-blur { inset: -40px; filter: blur(34px) brightness(.62) saturate(1.15); }
.music-bg--poster .mb-poster { background-size: contain; }
.music-bg--poster::after { background: radial-gradient(ellipse at center, rgba(4, 5, 12, .14) 0%, rgba(4, 5, 12, .3) 60%, rgba(4, 5, 10, .55) 100%); }
.music-bg--poster .mb-poster { top: var(--nav-h, 64px); }
/* Music: no words over the poster for now (title and subtitle hidden visually; the h1 stays for screen readers and search) */
.music-hero.no-text h1, .music-hero.no-text .music-sub { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
