/* 天籁守望 · Skyclef official site.
   Six movements on a calm twilight stage: architectural hairlines, crisp native-scale art,
   warm brass accents and editorial rhythm. One chapter per screen on desktop (html.fp),
   one clean scrolling page on phones and short windows. */

@font-face {
  font-family: "SKT Heaven Kai";
  src: url("assets/fonts/skt-heaven-kai.woff") format("woff");
  font-display: swap;
}
@font-face {
  font-family: "SKT Score Serif";
  src: url("assets/fonts/skt-score-serif.woff") format("woff");
  font-weight: 300 700;
  font-display: swap;
}
/* Lining figures from Noto Serif Display so digits align crisply beside Cormorant */
@font-face {
  font-family: "SKT Score Serif";
  src: url("assets/fonts/skt-score-digits.woff") format("woff");
  font-weight: 300 700;
  unicode-range: U+0030-0039;
  font-display: swap;
}

:root {
  --night: #120F21;
  --night-2: #1A162E;
  --night-3: #252040;
  --text: #F2EDF8;
  --text-2: #BEB7D4;
  --text-3: #928BB0;
  --gold: #E4C380;
  --gold-2: #C09C5F;
  --line: rgba(242, 237, 248, 0.13);
  --line-gold: rgba(228, 195, 128, 0.34);
  --kai: "SKT Heaven Kai", "LXGW WenKai", "Kaiti SC", "STKaiti", "KaiTi", serif;
  --serif: "SKT Score Serif", "Cormorant Garamond", "Times New Roman", serif;
  --sans: "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --top: 72px;
  --rail: 88px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 64px; }
body {
  margin: 0;
  background: var(--night);
  color: var(--text);
  font: 15px/1.8 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.is-loading { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { list-style: none; padding: 0; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ---------- loading ---------- */

.loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 24px;
  background: var(--night);
  clip-path: inset(0 0 0 0);
  transition: clip-path 0.85s cubic-bezier(0.7, 0, 0.2, 1), visibility 0s 0.85s;
}
.loader-logo { width: min(320px, 68vw); height: auto; }
.loader-bar { position: relative; width: min(300px, 62vw); height: 1px; background: var(--line); }
.loader-bar i { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--gold); transition: width 0.3s ease; }
.loader-meta { display: flex; justify-content: space-between; width: min(300px, 62vw); font: 400 13px var(--kai); color: var(--text-2); letter-spacing: 0.2em; }
.loader-meta b { font: 500 15px/1 var(--serif); color: var(--gold); letter-spacing: 0.04em; }
.loader-meta b::after { content: "%"; margin-left: 1px; }
body.is-loaded .loader { clip-path: inset(0 0 100% 0); visibility: hidden; }

/* ---------- top bar ---------- */

.top {
  position: fixed;
  inset: 0 0 auto;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 60px;
  padding: 0 16px;
  background: rgba(18, 15, 33, 0.88);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.top-mark { display: flex; align-items: center; gap: 10px; margin-right: auto; text-decoration: none; }
.top-mark img { width: 96px; height: auto; }
.top-en { display: none; font: 500 11px/1 var(--serif); letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-3); padding-left: 10px; border-left: 1px solid var(--line); }
.top-nav { display: none; }
.top-nav.is-open {
  display: grid;
  position: fixed;
  inset: 60px 0 auto;
  padding: 6px 20px 22px;
  background: rgba(18, 15, 33, 0.97);
  border-bottom: 1px solid var(--line);
}
.top-nav a { display: flex; align-items: baseline; gap: 12px; padding: 12px 0; text-decoration: none; border-bottom: 1px solid var(--line); }
.top-nav b { font: 400 18px/1.2 var(--kai); }
.top-nav i { font: 500 13px/1 var(--serif); font-style: normal; letter-spacing: 0.14em; color: var(--text-3); }
.top-nav a.is-on b { color: var(--gold); }
.top-nav a.is-on i { color: var(--gold-2); }
.top-sound { display: flex; align-items: center; justify-content: center; gap: 3px; width: 40px; height: 40px; }
.top-sound i { width: 2px; height: 5px; border-radius: 1px; background: var(--text-2); }
.top-sound[aria-pressed="true"] i { background: var(--gold); animation: eq 0.9s ease-in-out infinite; }
.top-sound i:nth-child(2), .listen .eq i:nth-child(2) { animation-delay: -0.45s; }
.top-sound i:nth-child(3), .listen .eq i:nth-child(3) { animation-delay: -0.2s; }
.top-sound i:nth-child(4), .listen .eq i:nth-child(4) { animation-delay: -0.65s; }
@keyframes eq { 0%, 100% { height: 4px; } 50% { height: 15px; } }
.top-menu { padding: 5px 12px; font: 400 15px var(--kai); border: 1px solid var(--line); }

.rail, .hairlines, .wipe, .next-hint { display: none; }

/* ---------- chapters (mobile / short window scrolling page) ---------- */

.chapter {
  position: relative;
  padding: 64px 20px 56px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 55% at 74% 46%, rgba(62, 50, 108, 0.22), transparent 72%),
    radial-gradient(ellipse 55% 45% at 22% 18%, rgba(228, 195, 128, 0.055), transparent 68%),
    var(--night);
}
.chapter + .chapter { border-top: 1px solid var(--line); }
.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.shade { position: absolute; inset: 0; z-index: 0; }
.kv-panel, .kv-news, .al-col, .al-stage, .or-list, .or-info, .or-stage,
.ds-info, .ds-stage, .ps-copy, .ps-map, .cd-inner { position: relative; z-index: 1; }

.ch-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 12px; }
.ch-title b { font: 400 clamp(34px, 8.5vw, 56px)/1.12 var(--kai); letter-spacing: 0.04em; }
.ch-title i { font: 400 clamp(19px, 4.2vw, 27px)/1 var(--serif); font-style: normal; color: var(--gold); letter-spacing: 0.07em; }
.kicker { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.kicker b { font: 400 16px var(--kai); color: var(--gold); }
.kicker i { font: 500 14px var(--serif); font-style: normal; letter-spacing: 0.16em; color: var(--text-3); }
.kicker span { margin-left: auto; font: 500 15px var(--serif); letter-spacing: 0.12em; color: var(--text-2); }

/* download buttons: brass accent with subtle chamfer */
.get-btn {
  --cut: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 9px 20px 9px 16px;
  color: var(--gold);
  text-decoration: none;
  background: rgba(24, 20, 44, 0.88);
  box-shadow: inset 3px 0 0 var(--gold), inset 0 0 0 1px rgba(228, 195, 128, 0.36);
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
  transition: background 0.2s ease, color 0.2s ease;
}
.get-btn:hover { background: rgba(228, 195, 128, 0.16); }
.get-btn.is-gold { color: var(--night); background: var(--gold); box-shadow: none; }
.get-btn.is-gold:hover { background: #F1D79B; }
.get-btn.is-web { background: rgba(34, 28, 60, 0.92); box-shadow: inset 3px 0 0 var(--gold), inset 0 0 0 1px rgba(228, 195, 128, 0.56); }
.get-btn.is-web:hover { background: rgba(228, 195, 128, 0.2); }
.get-btn.is-wide { justify-content: center; min-height: 52px; }
.get-icon { flex: none; width: 22px; height: 22px; fill: currentColor; }
.get-btn > span { display: flex; flex-direction: column; line-height: 1.24; }
.get-btn b { font: 400 18px var(--kai); letter-spacing: 0.04em; white-space: nowrap; }
.get-btn small { font: 600 12.5px var(--serif); letter-spacing: 0.08em; opacity: 0.84; }

/* ---------- 00 overture (mobile: crisp 16:9 vista on top, never zoomed blurry) ---------- */

.ch-overture {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 60px 20px 36px;
  background: var(--night);
}
.kv-visual {
  position: relative;
  margin: 0 -20px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.kv-visual .bg { object-position: 42% 45%; }
.kv-visual .shade {
  background:
    linear-gradient(0deg, var(--night) 0%, rgba(18, 15, 33, 0.28) 28%, rgba(18, 15, 33, 0) 62%),
    linear-gradient(180deg, rgba(18, 15, 33, 0.45), rgba(18, 15, 33, 0) 24%);
}
.kv-panel { display: flex; flex-direction: column; gap: 20px; margin-top: -12px; }
.kv-eyebrow {
  font: 500 12px/1 var(--serif);
  letter-spacing: 0.34em;
  color: var(--gold);
  margin-bottom: 6px;
  text-shadow: 0 2px 12px rgba(14, 11, 28, 0.92);
}
.kv-logo img { width: min(290px, 74vw); height: auto; filter: drop-shadow(0 6px 20px rgba(0, 0, 0, 0.55)); }
.kv-line { margin-top: 8px; font: 400 22px/1.38 var(--kai); letter-spacing: 0.04em; color: var(--text); text-shadow: 0 2px 14px rgba(14, 11, 28, 0.85); }
.kv-sub { margin-top: 8px; max-width: 28em; font-size: 14px; line-height: 1.78; color: var(--text-2); text-shadow: 0 1px 12px rgba(14, 11, 28, 0.88); }
.kv-get { display: grid; gap: 10px; }
.kv-ver { display: flex; align-items: baseline; gap: 10px; margin-top: 2px; font-size: 12.5px; color: var(--text-3); }
.kv-ver b { font: 600 15px var(--serif); color: var(--gold); letter-spacing: 0.06em; }
.kv-ver span:last-child { font: 600 13.5px var(--serif); letter-spacing: 0.1em; color: var(--text-2); }
.kv-news {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--text-2);
  text-decoration: none;
}
.kv-news .tag { flex: none; padding: 1px 8px; font: 400 12.5px var(--kai); color: var(--night); background: var(--gold); }
.kv-news .news-text { flex: 1; min-width: 0; overflow: hidden; color: var(--text); white-space: nowrap; text-overflow: ellipsis; }
.kv-news .more { flex: none; color: var(--gold); white-space: nowrap; }

/* ---------- 01 allegro: battle ---------- */

.al-head p { max-width: 30em; font-size: 14.5px; color: var(--text-2); }
.topics { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; margin: 20px 0 22px; }
.topics button {
  position: relative;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 2px 10px;
  width: 100%;
  padding: 11px 0;
  text-align: left;
  border-bottom: 1px solid var(--line);
  transition: color 0.25s ease, padding 0.35s var(--ease), border-color 0.25s ease;
}
.topics b { font: 400 18px/1.3 var(--kai); }
.topics i { font: 500 13px var(--serif); font-style: normal; letter-spacing: 0.12em; color: var(--text-3); }
.topics button.is-on { color: var(--gold); border-color: rgba(228, 195, 128, 0.58); }
.topics button.is-on i { color: var(--gold-2); }
.al-pager { display: none; }
.al-stage { position: relative; }
.al-frame {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  cursor: zoom-in;
  background: var(--night-2);
  box-shadow: 0 18px 42px rgba(6, 4, 16, 0.45);
}
.al-frame img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.al-frame::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 1px var(--line-gold); pointer-events: none; }
.al-frame .incoming { position: absolute; inset: 0; animation: wipe-in 0.65s cubic-bezier(0.7, 0, 0.2, 1) both; }
@keyframes wipe-in { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.al-note { margin-top: 16px; }
.al-note h3 { margin-bottom: 4px; font: 400 21px var(--kai); color: var(--gold); }
.al-note p { max-width: 38em; font-size: 14px; color: var(--text-2); }

/* ---------- shared crisp specimen pedestal (02 orchestra & 03 dissonance) ---------- */

.specimen-medallion {
  position: relative;
  display: grid;
  place-items: center;
  width: 268px;
  height: 268px;
}
.specimen-medallion.is-mood {
  width: 256px;
  height: 256px;
}
.specimen-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 54%, rgba(228, 195, 128, 0.12) 0%, rgba(44, 36, 78, 0.34) 48%, transparent 72%);
  border: 1px solid rgba(228, 195, 128, 0.22);
  pointer-events: none;
}
.specimen-ring i {
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  border: 1px dashed rgba(242, 237, 248, 0.12);
}
.specimen-ring.is-mood {
  background: radial-gradient(circle at 50% 54%, rgba(164, 146, 224, 0.16) 0%, rgba(36, 29, 66, 0.38) 50%, transparent 74%);
  border-color: rgba(242, 237, 248, 0.16);
}
.specimen-tag {
  position: relative;
  margin-top: 16px;
  padding-top: 10px;
  font: 400 13.5px/1.4 var(--kai);
  letter-spacing: 0.16em;
  color: var(--gold-2);
  border-top: 1px solid var(--line);
}
.specimen-tag[hidden] { display: none; }

/* ---------- 02 orchestra (native-sharp <= 240px/256px art, zero overlap on mobile) ---------- */

.ch-orchestra { display: flex; flex-direction: column; gap: 22px; }
.or-stage {
  order: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 0 4px;
}
/* strictly <= 220px tall on mobile (2x screen = 440 physical px < 512px source!) */
.or-art {
  position: relative;
  width: auto;
  height: 214px;
  max-width: 220px;
  object-fit: contain;
  filter: drop-shadow(0 16px 26px rgba(0, 0, 0, 0.48));
}
.or-list { order: 2; display: flex; align-items: center; justify-content: center; }
.or-list ul { display: grid; grid-template-columns: repeat(4, 52px); gap: 12px; padding: 4px; }
.or-step { display: none; }
.or-list li button {
  position: relative;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, #2C264E, #18142B 74%);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
/* a fixed square in the middle of the ring: tall art (the grand harp, 255x512) must not grow past the circle */
.or-list li img { position: absolute; inset: 14%; width: 72%; height: 72%; max-width: none; object-fit: contain; }
.or-list li button.is-on { box-shadow: inset 0 0 0 2px var(--gold), 0 0 0 4px rgba(228, 195, 128, 0.14); }
.or-info { order: 3; }
.or-name { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; }
.or-name b { font: 400 38px/1.15 var(--kai); letter-spacing: 0.03em; }
.or-name i { font: 400 21px var(--serif); font-style: normal; color: var(--gold); letter-spacing: 0.06em; }
.specs-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 0;
  margin: 14px 0 16px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.specs-strip div { display: flex; align-items: baseline; gap: 8px; padding-right: 18px; margin-right: 18px; border-right: 1px solid var(--line); font-size: 13.5px; }
.specs-strip div:last-child { border-right: 0; padding-right: 0; margin-right: 0; }
.specs-strip dt { font-family: var(--kai); color: var(--gold-2); }
.specs-strip dd { color: var(--text); }
.or-desc { max-width: 30em; min-height: 3.4em; font-size: 14.5px; color: var(--text-2); }
.or-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 18px; }
.listen {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 22px;
  font: 400 15.5px var(--kai);
  color: var(--gold);
  border: 1px solid rgba(228, 195, 128, 0.48);
  border-radius: 999px;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.listen:hover { background: rgba(228, 195, 128, 0.12); border-color: var(--gold); }
.listen .eq { display: flex; align-items: center; gap: 2px; height: 15px; }
.listen .eq i { width: 2px; height: 5px; background: currentColor; }
.listen.is-playing .eq i { animation: eq 0.8s ease-in-out infinite; }
.or-more { font-size: 12.5px; color: var(--text-3); }

/* ---------- 03 dissonance (native-sharp <= 240px portrait + crisp live encounter shot) ---------- */

.ch-dissonance { display: flex; flex-direction: column; gap: 22px; }
.ds-stage {
  order: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.ds-pedestal {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 256px;
  width: 100%;
  padding: 12px 0 4px;
}
/* strictly <= 220px on mobile (2x = 440px <= 512px boss / 420px mood -> razor sharp!) */
.ds-art {
  position: relative;
  width: auto;
  height: 215px;
  max-width: 240px;
  object-fit: contain;
  filter: drop-shadow(0 16px 26px rgba(0, 0, 0, 0.52));
}
.ds-stage.is-mood-group .ds-art { height: 190px; }
.ds-info { order: 1; }
.ds-tabs { display: flex; margin: 4px 0 16px; border-bottom: 1px solid var(--line); }
.ds-tabs button { margin-bottom: -1px; padding: 8px 16px 9px; font: 400 16px var(--kai); color: var(--text-2); border-bottom: 2px solid transparent; transition: color 0.2s ease; }
.ds-tabs button[aria-selected="true"] { color: var(--gold); border-color: var(--gold); }
.ds-name { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; }
.ds-name b { font: 400 38px/1.15 var(--kai); }
.ds-name i { font: 400 21px var(--serif); font-style: normal; color: var(--gold); letter-spacing: 0.06em; }
.ds-desc { margin: 8px 0 14px; font-size: 15px; color: var(--text); }
.ds-facts { display: grid; gap: 10px; max-width: 34em; margin-bottom: 18px; padding-top: 12px; border-top: 1px solid var(--line); }
.ds-facts div { display: grid; grid-template-columns: 3em 1fr; gap: 12px; font-size: 14px; color: var(--text-2); }
.ds-facts dt { font-family: var(--kai); color: var(--gold); }
.ds-facts:empty { display: none; }
.ds-thumbs { display: flex; flex-wrap: wrap; gap: 10px; }
.ds-thumbs button { width: 54px; height: 54px; overflow: hidden; border-radius: 50%; opacity: 0.68; box-shadow: inset 0 0 0 1px var(--line); transition: opacity 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease; }
.ds-thumbs img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.16); }
.ds-thumbs button.is-on, .ds-thumbs button:hover { opacity: 1; }
.ds-thumbs button.is-on { box-shadow: 0 0 0 2px var(--gold), 0 0 0 5px rgba(228, 195, 128, 0.14); }
.ds-note { margin-top: 14px; font-size: 12.5px; color: var(--text-3); }
.ds-shot {
  display: block;
  position: relative;
  width: min(440px, 100%);
  cursor: zoom-in;
  overflow: hidden;
  box-shadow: 0 14px 32px rgba(6, 4, 16, 0.45);
}
.ds-shot img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.ds-shot::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 1px var(--line-gold); pointer-events: none; }
.ds-shot span {
  position: absolute;
  left: 0;
  bottom: 0;
  padding: 3px 12px;
  font: 400 12.5px var(--kai);
  letter-spacing: 0.06em;
  color: var(--gold);
  background: rgba(18, 15, 33, 0.84);
}
.ds-shot[hidden] { display: none; }

/* ---------- 04 pastorale: town ---------- */

.ps-copy p { max-width: 32em; font-size: 14.5px; color: var(--text-2); }
.ps-copy p + p { margin-top: 10px; }
.ps-points {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 18px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.ps-points li { display: flex; flex-direction: column; gap: 2px; }
.ps-points b { font: 400 15.5px var(--kai); color: var(--gold); }
.ps-points span { font-size: 12.5px; color: var(--text-3); }
.ps-map { margin-top: 24px; }
.ps-frame {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  cursor: zoom-in;
  box-shadow: 0 20px 44px rgba(6, 4, 16, 0.48);
}
.ps-frame img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
/* soft inner vignette so sunlit 3D town blends smoothly into dusk gallery */
.ps-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 1px var(--line-gold), inset 0 0 28px rgba(18, 15, 33, 0.24);
  pointer-events: none;
}
.ps-map figcaption { margin-top: 12px; font-size: 12.5px; color: var(--text-3); }

/* ---------- 05 coda: download ---------- */

.ch-coda .bg { opacity: 0.34; }
.ch-coda .shade {
  background:
    radial-gradient(ellipse 80% 70% at 50% 30%, rgba(26, 20, 48, 0.54), rgba(18, 15, 33, 0.9) 78%),
    linear-gradient(180deg, rgba(18, 15, 33, 0.68), rgba(18, 15, 33, 0.92));
}
.cd-inner { max-width: 1120px; margin: 0 auto; }
.cd-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 20px; }
.cd-head .ch-title { margin-bottom: 6px; }
.cd-brand { font: 500 13.5px var(--serif); letter-spacing: 0.14em; color: var(--text-3); }
.cd-platforms { display: grid; gap: 24px; margin: 14px 0 24px; }
.cd-plat h3 { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; font: 400 24px var(--kai); }
.cd-plat h3 .get-icon { width: 24px; height: 24px; color: var(--gold); }
.specs { display: flex; flex-wrap: wrap; margin-bottom: 12px; font-size: 13px; color: var(--text-2); }
.specs span + span { margin-left: 0.8em; padding-left: 0.8em; border-left: 1px solid var(--line); }
.hint { max-width: 30em; margin-top: 8px; font-size: 12.5px; color: var(--text-3); }
.cd-plat .get-btn + .get-btn { margin-top: 10px; }
.cd-more { display: grid; gap: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.cd-log h3 { margin-bottom: 8px; font: 400 19px var(--kai); color: var(--gold); }
.cd-log li { position: relative; padding-left: 1.35em; font-size: 13.5px; line-height: 1.68; color: var(--text-2); }
.cd-log li + li { margin-top: 5px; }
.cd-log li::before { content: "♪"; position: absolute; left: 0; color: var(--gold); }
.later { margin-top: 10px; font-size: 13px; color: var(--text); }
.verify summary { cursor: pointer; font-size: 13.5px; color: var(--text-2); list-style: none; text-decoration: underline 1px var(--line); text-underline-offset: 0.3em; }
.verify summary::-webkit-details-marker { display: none; }
.verify summary:hover { color: var(--gold); }
.verify dl { margin-top: 12px; font-size: 12.5px; }
.verify dt { margin-top: 10px; color: var(--text-3); }
.verify dd { display: flex; align-items: flex-start; gap: 10px; margin-top: 4px; }
.verify code { font: 12px/1.55 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; color: var(--text); word-break: break-all; }
.copy { flex: none; padding: 2px 11px; font-size: 12.5px; border: 1px solid var(--line); border-radius: 999px; }
.copy:hover { background: rgba(242, 237, 248, 0.08); }
.cd-foot { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12px; color: var(--text-3); }
.cd-foot a { color: var(--text-2); }

/* ---------- lightbox viewer ---------- */

.viewer { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; }
.viewer::backdrop { background: rgba(12, 10, 24, 0.94); }
.viewer[open] { display: grid; place-items: center; }
.viewer img { width: auto; height: auto; max-width: 96vw; max-height: 92vh; cursor: zoom-out; box-shadow: 0 0 0 1px var(--line-gold); }
.viewer-close { position: fixed; top: 16px; right: 16px; padding: 6px 16px; font: 400 15px var(--kai); color: var(--gold); border: 1px solid rgba(228, 195, 128, 0.42); background: rgba(18, 15, 33, 0.78); }

/* =====================================================================
   Desktop: one chapter per screen (html.fp, >= 1024x640)
   ===================================================================== */

html.fp, html.fp body { height: 100%; overflow: hidden; }

html.fp .top {
  height: var(--top);
  gap: 24px;
  padding: 0 calc(var(--rail) + 28px) 0 40px;
  background: linear-gradient(180deg, rgba(18, 15, 33, 0.78), rgba(18, 15, 33, 0.08));
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border: 0;
}
html.fp .top-mark img { width: 112px; }
html.fp .top-en { display: inline-block; }
html.fp .top-nav { display: flex; gap: clamp(18px, 2.2vw, 38px); }
html.fp .top-nav a { position: relative; flex-direction: column; align-items: flex-start; gap: 3px; padding: 0 0 8px; border: 0; }
html.fp .top-nav a::after { content: ""; position: absolute; left: 0; bottom: 0; width: 0; height: 2px; background: var(--gold); transition: width 0.35s var(--ease); }
html.fp .top-nav a.is-on::after, html.fp .top-nav a:hover::after { width: 100%; }
html.fp .top-nav b { font-size: 16.5px; }
html.fp .top-nav i { font-size: 12px; color: var(--text-3); }
html.fp .top-menu { display: none; }
html.fp .top-sound { position: fixed; top: 16px; right: 24px; }

html.fp .hairlines { display: block; }
html.fp .hairlines i { position: fixed; z-index: 25; background: var(--line); pointer-events: none; }
html.fp .hairlines .h { left: 0; right: 0; top: var(--top); height: 1px; }
html.fp .hairlines .v { top: 0; bottom: 0; right: var(--rail); width: 1px; }

html.fp .rail {
  position: fixed;
  z-index: 28;
  top: 50%;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: var(--rail);
  transform: translateY(-50%);
}
.rail-now, .kicker span, .kv-ver b, .kv-ver span, .loader-meta b, .get-btn small, .specs span { font-variant-numeric: lining-nums; }
.rail-now { font: 400 48px/1 var(--serif); color: var(--gold); transition: opacity 0.3s ease, transform 0.4s var(--ease); }
.rail-now.is-turning { opacity: 0; transform: translateY(-14px); transition: none; }
.rail-all { font: 600 12px var(--serif); letter-spacing: 0.16em; color: var(--text-2); }
.rail-name { margin-top: 14px; font: 600 13px var(--serif); letter-spacing: 0.24em; color: var(--text); writing-mode: vertical-rl; }

html.fp .next-hint {
  position: fixed;
  z-index: 28;
  left: calc((100vw - var(--rail)) / 2);
  bottom: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font: 400 12px var(--kai);
  letter-spacing: 0.3em;
  color: var(--text-3);
  text-decoration: none;
  transform: translateX(-50%);
  transition: opacity 0.3s ease, color 0.2s ease;
}
html.fp .next-hint:hover { color: var(--gold); }
.next-hint svg { width: 14px; height: 9px; fill: none; stroke: currentColor; stroke-width: 1.5; animation: nudge 2.4s ease-in-out infinite; }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(3px); } }
html.fp .next-hint.is-hidden { opacity: 0; pointer-events: none; }

/* page sweep transition */
html.fp .wipe { display: block; position: fixed; inset: 0; z-index: 27; pointer-events: none; background: var(--night-2); transform: translateX(-101%); }
html.fp .wipe::after { content: ""; position: absolute; top: 0; bottom: 0; right: 0; width: 2px; background: var(--gold); }
html.fp .wipe i { position: absolute; left: 0; right: 0; height: 1px; background: rgba(228, 195, 128, 0.46); }
html.fp .wipe i:nth-child(1) { top: calc(50% - 36px); }
html.fp .wipe i:nth-child(2) { top: calc(50% - 18px); }
html.fp .wipe i:nth-child(3) { top: 50%; }
html.fp .wipe i:nth-child(4) { top: calc(50% + 18px); }
html.fp .wipe i:nth-child(5) { top: calc(50% + 36px); }
html.fp .wipe.is-back { transform: translateX(101%); }
html.fp .wipe.is-back::after { right: auto; left: 0; }
html.fp .wipe.go-in { transform: translateX(0); transition: transform 0.44s cubic-bezier(0.7, 0, 0.3, 1); }
html.fp .wipe.go-out { transform: translateX(101%); transition: transform 0.54s cubic-bezier(0.7, 0, 0.3, 1); }
html.fp .wipe.is-back.go-out { transform: translateX(-101%); }

html.fp .chapters { position: fixed; inset: 0; }
html.fp .chapter { position: absolute; inset: 0; padding: 0; border: 0; visibility: hidden; }
html.fp .chapter.is-active { visibility: visible; }
html.fp .chapter .reveal { opacity: 0; transform: translateY(20px); }
html.fp .chapter.is-active .reveal {
  opacity: 1;
  transform: none;
  transition: opacity 0.65s ease, transform 0.85s var(--ease);
  transition-delay: calc(var(--d, 0) * 85ms + 160ms);
}
html.fp body.is-loading .chapter.is-active .reveal { opacity: 0; transform: translateY(20px); transition: none; }
html.fp .ch-title b { font-size: clamp(40px, 3.8vw, 62px); }
html.fp .ch-title i { font-size: clamp(20px, 1.7vw, 28px); }

/* 00 overture desktop: unscaled 2468x1388 KV, unified right-side panel */
html.fp .ch-overture { display: block; padding: 0; }
html.fp .kv-visual { position: absolute; inset: 0; margin: 0; aspect-ratio: auto; }
html.fp .kv-visual .bg { object-position: 36% 48%; }
html.fp .kv-visual .shade {
  background:
    linear-gradient(270deg, rgba(16, 13, 30, 0.96) 0%, rgba(16, 13, 30, 0.89) 30%, rgba(16, 13, 30, 0.62) 45%, rgba(16, 13, 30, 0.08) 62%, rgba(16, 13, 30, 0) 72%),
    linear-gradient(0deg, rgba(16, 13, 30, 0.86) 0%, rgba(16, 13, 30, 0.25) 18%, rgba(16, 13, 30, 0) 34%),
    linear-gradient(180deg, rgba(16, 13, 30, 0.72) 0%, rgba(16, 13, 30, 0) 18%);
}
html.fp body:not(.is-loading) .ch-overture.is-active .bg { animation: kv-fade 1.2s ease both; }
@keyframes kv-fade { from { opacity: 0.72; } to { opacity: 1; } }

html.fp .kv-panel {
  position: absolute;
  right: calc(var(--rail) + 46px);
  top: calc(var(--top) + 6vh);
  bottom: 84px;
  width: min(35vw, 500px);
  margin: 0;
  justify-content: center;
  gap: 24px;
}
html.fp .kv-logo img { width: min(26vw, 410px); }
html.fp .kv-line { font-size: clamp(21px, 1.75vw, 28px); }
html.fp .kv-sub { font-size: 14.5px; color: #D8D2EA; }
html.fp .kv-get { grid-template-columns: 1fr 1fr; column-gap: 12px; row-gap: 10px; }
html.fp .kv-get .is-web { grid-column: 1 / -1; min-height: 50px; }
html.fp .kv-get .kv-ver { grid-column: 1 / -1; }
html.fp .kv-news {
  position: absolute;
  left: 44px;
  bottom: 24px;
  max-width: min(44vw, 560px);
  padding: 8px 18px 8px 10px;
  border-top: 0;
  background: linear-gradient(90deg, rgba(18, 15, 33, 0.84) 0%, rgba(18, 15, 33, 0.56) 100%);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-left: 2px solid var(--gold);
}

/* 01 allegro desktop */
html.fp .ch-allegro {
  display: grid;
  grid-template-columns: minmax(270px, 25vw) minmax(0, 1fr);
  align-items: center;
  column-gap: 4.5vw;
  padding: calc(var(--top) + 3vh) calc(var(--rail) + 48px) 52px 5.5vw;
}
html.fp .al-col { display: flex; flex-direction: column; justify-content: center; }
html.fp .al-head p { font-size: 14.5px; }
html.fp .topics { grid-template-columns: 1fr; margin: 2.8vh 0 0; }
html.fp .topics button { padding: clamp(11px, 1.5vh, 15px) 0; }
html.fp .topics b { font-size: 20px; }
html.fp .topics button:hover { padding-left: 10px; color: var(--text); }
html.fp .topics button.is-on { padding-left: 18px; }
html.fp .topics button.is-on::before { content: ""; position: absolute; left: 0; top: 50%; width: 9px; height: 1px; background: var(--gold); }
html.fp .al-pager { display: flex; align-items: center; gap: 12px; margin-top: 2.6vh; }
html.fp .al-pager .arrow { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; color: var(--text-2); transition: color 0.2s ease, border-color 0.2s ease; }
html.fp .al-pager .arrow:hover { color: var(--gold); border-color: rgba(228, 195, 128, 0.54); }
html.fp .al-pager svg { width: 7px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.6; }
html.fp .segs { display: flex; gap: 6px; }
html.fp .segs i { width: 26px; height: 2px; background: var(--line); transition: background 0.3s ease; }
html.fp .segs i.is-on { background: var(--gold); }
html.fp .al-stage { justify-self: center; width: 100%; max-width: min(56vw, 920px); }
html.fp .al-note { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: baseline; margin-top: 16px; }
html.fp .al-note h3 { margin: 0; font-size: 22px; white-space: nowrap; }
html.fp .al-note p { font-size: 14.5px; line-height: 1.72; }

/* 02 orchestra desktop: strictly native-sharp <= 264px instrument in celestial ring */
html.fp .ch-orchestra {
  display: grid;
  grid-template-columns: 72px minmax(340px, 38vw) minmax(0, 1fr);
  align-items: center;
  column-gap: 4vw;
  padding: var(--top) calc(var(--rail) + 48px) 44px 4.5vw;
}
html.fp .or-list { order: 0; flex-direction: column; justify-content: center; gap: 8px; }
html.fp .or-list ul { display: flex; flex-direction: column; flex-wrap: nowrap; gap: clamp(6px, 1vh, 10px); }
html.fp .or-list li button { width: clamp(46px, 6.2vh, 58px); height: clamp(46px, 6.2vh, 58px); }
html.fp .or-list li button:hover { transform: scale(1.06); }
html.fp .or-step { display: grid; place-items: center; width: 38px; height: 24px; color: var(--text-2); }
html.fp .or-step:hover { color: var(--gold); }
html.fp .or-step svg { width: 15px; height: 9px; fill: none; stroke: currentColor; stroke-width: 1.6; }
html.fp .or-info { order: 0; max-width: 520px; }
html.fp .or-name b { font-size: clamp(42px, 4vw, 66px); }
html.fp .or-name i { font-size: clamp(20px, 1.7vw, 28px); }
html.fp .or-stage { order: 0; padding: 0; }
html.fp .or-stage .specimen-medallion { width: min(332px, 40vh); height: min(332px, 40vh); }
/* 256px max height -> 1:1 native sharpness even on 2x Retina displays (source is 512px) */
html.fp .or-art { height: min(32vh, 256px); max-width: min(30vw, 260px); }
.ch-orchestra.is-switching .or-art { animation: art-in 0.45s var(--ease) both; }
.ch-orchestra.is-switching #instName, .ch-orchestra.is-switching #instLatin,
.ch-orchestra.is-switching #instDesc, .ch-orchestra.is-switching #instChips,
.ch-orchestra.is-switching #instRole { animation: text-in 0.4s var(--ease) both; }
@keyframes art-in { from { opacity: 0; transform: translateY(12px) scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes text-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* 03 dissonance desktop: crisp <= 248px portrait paired cleanly with boss battle still */
html.fp .ch-dissonance {
  display: grid;
  grid-template-columns: minmax(340px, 38vw) minmax(0, 1fr);
  align-items: center;
  column-gap: 4.5vw;
  padding: var(--top) calc(var(--rail) + 48px) 44px 5.5vw;
}
html.fp .ds-info { order: 0; max-width: 540px; }
html.fp .ds-name b { font-size: clamp(42px, 4vw, 64px); }
html.fp .ds-name i { font-size: clamp(20px, 1.7vw, 28px); }
html.fp .ds-thumbs button { width: clamp(50px, 6.2vh, 60px); height: clamp(50px, 6.2vh, 60px); }
html.fp .ds-stage { order: 0; gap: clamp(14px, 2.2vh, 22px); }
html.fp .ds-pedestal { min-height: 0; padding: 0; }
html.fp .ds-pedestal .specimen-medallion.is-mood { width: min(286px, 34vh); height: min(286px, 34vh); }
/* boss sprites are 512px tall -> max 240px; common moods are 420-512px -> max 206px */
html.fp .ds-art { height: min(28vh, 240px); max-width: 248px; }
html.fp .ds-stage.is-mood-group .specimen-medallion.is-mood { width: min(312px, 38vh); height: min(312px, 38vh); }
html.fp .ds-stage.is-mood-group .ds-art { height: min(27vh, 206px); }
html.fp .ds-shot { width: min(34vw, 450px); }
.ch-dissonance.is-switching .ds-art { animation: art-in 0.45s var(--ease) both; }
.ch-dissonance.is-switching .ds-name, .ch-dissonance.is-switching .ds-desc,
.ch-dissonance.is-switching .ds-facts, .ch-dissonance.is-switching #moodTrait { animation: text-in 0.4s var(--ease) both; }

/* 04 pastorale desktop */
html.fp .ch-pastorale {
  display: grid;
  grid-template-columns: minmax(280px, 28vw) minmax(0, 1fr);
  align-items: center;
  column-gap: 4.5vw;
  padding: var(--top) calc(var(--rail) + 48px) 48px 5.5vw;
}
html.fp .ps-copy p { font-size: 14.5px; }
html.fp .ps-map { margin: 0; justify-self: center; width: 100%; max-width: min(56vw, 920px); }

/* 05 coda desktop: fits comfortably inside 1280x720 with zero clipped footer */
html.fp .cd-inner {
  position: absolute;
  inset: 0;
  max-width: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--top) + 2vh) calc(var(--rail) + 48px) 28px 5.5vw;
  overflow-y: auto;
  scrollbar-width: thin;
}
html.fp .cd-platforms { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 1.6vh 0 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
html.fp .cd-plat { padding: clamp(14px, 2.2vh, 26px) 28px clamp(14px, 2.2vh, 26px) 0; }
html.fp .cd-plat + .cd-plat { padding-left: 28px; border-left: 1px solid var(--line); }
html.fp .cd-plat:last-child { padding-right: 0; }
html.fp .cd-plat .get-btn { max-width: 300px; }
html.fp .cd-more { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px; padding-top: clamp(16px, 2.4vh, 28px); border-top: 0; }
html.fp .cd-foot { margin-top: clamp(16px, 2.2vh, 26px); }

@media (hover: hover) {
  .ds-thumbs button:hover { transform: scale(1.05); }
}

/* mid-size desktop tuning (e.g. 1280x720) */
@media (max-width: 1360px) {
  html.fp .top-nav { gap: 18px; }
  html.fp .top-en { display: none; }
  html.fp .kv-panel { width: min(41vw, 460px); right: calc(var(--rail) + 34px); }
  html.fp .kv-get .get-btn { gap: 10px; padding: 9px 14px 9px 12px; }
  html.fp .kv-get .get-btn b { font-size: 16.5px; }
  html.fp .kv-news { max-width: 44vw; }
}
@media (max-height: 760px) {
  html.fp .ch-coda .ch-title b { font-size: 38px; }
  html.fp .cd-plat { padding-top: 14px; padding-bottom: 14px; }
  html.fp .cd-log li { font-size: 13px; line-height: 1.56; }
  html.fp .cd-log li + li { margin-top: 3px; }
  html.fp .cd-foot { margin-top: 12px; padding-top: 10px; }
  html.fp .ds-shot { width: min(30vw, 370px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
