:root {
  --night: #0c0e13;
  --night-2: #12151c;
  --night-3: #1a1e27;
  --night-4: #262b37;
  --text: #e9e1d1;
  --muted: #a39b8c;
  --faint: #6e685f;
  --cream: #f1e7d0;
  --cream-2: #e3d5b6;
  --ink: #2a2119;
  --ink-2: #5a4d3e;
  --bark: #3b2a1d;
  --lacquer: #a8342b;
  --lacquer-hi: #c4473b;
  --gilt: #c9a560;
  --gilt-line: rgba(201, 165, 96, .3);
  --indigo: #2d4a87;
  --head: "Noto Serif Display", "Noto Serif", Georgia, serif;
  --body: Literata, Georgia, "Times New Roman", serif;
  --brush: "Yuji Syuku", "Noto Serif TC", "Yu Mincho", serif;
  --han: "Noto Serif TC", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --ja: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --gutter: 16px;
  --max: 1180px;
  color-scheme: dark;
}
@media (min-width: 720px) { :root { --gutter: 32px; } }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--night); color: var(--text);
  font: 400 17px/1.7 var(--body); overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--cream); text-decoration-color: var(--gilt); text-decoration-thickness: 1px; text-underline-offset: 3px; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gilt); outline-offset: 3px; }
.px { image-rendering: pixelated; image-rendering: crisp-edges; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.han { font-family: var(--han); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
h1, h2, h3, h4 { font-family: var(--head); font-weight: 500; margin: 0; letter-spacing: -.005em; }
h3, h4 { font-weight: 600; letter-spacing: 0; }
h2 { font-size: clamp(32px, 4.6vw, 52px); line-height: 1.12; }
h2 .ja { font: 400 .52em/1 var(--brush); color: var(--gilt); margin-left: .5em; letter-spacing: .1em; vertical-align: .18em; white-space: nowrap; }
h3 { font-size: clamp(22px, 2.4vw, 28px); line-height: 1.25; }
p { margin: 0 0 1em; }

/* the game's name tab: red lacquer, dot type */
.tag { display: inline-block; padding: 3px 9px 3px; background: var(--lacquer); color: #fbeee0; font: 600 12.5px/1.35 var(--body); letter-spacing: .02em; border-radius: 2px; }
.tag.dim { background: var(--night-4); color: var(--muted); }

/* the game's dialogue box: parchment, a bark border, a gilt rule inside, a red name tab */
.dlg { position: relative; margin: 26px 0 0; padding: 20px 20px 16px; background: var(--cream); color: var(--ink); border: 2px solid var(--bark); border-radius: 3px; box-shadow: inset 0 0 0 3px var(--cream), inset 0 0 0 4px rgba(201,165,96,.7), 0 14px 34px rgba(0,0,0,.4); }
.dlg .tag { position: absolute; top: -13px; left: 14px; }
.dlg blockquote { margin: 0; font: 400 18.5px/1.55 var(--body); }
.dlg blockquote .han { display: block; font-size: 17px; color: var(--ink-2); margin-bottom: 4px; }
.dlg figcaption { margin-top: 6px; font-size: 13px; color: var(--ink-2); }

/* the game's scene title card */
.card-title { text-align: center; padding: 26px var(--gutter); margin: 0 0 clamp(36px, 5vw, 56px); background: linear-gradient(90deg, transparent, rgba(0,0,0,.55) 18%, rgba(0,0,0,.55) 82%, transparent); }
.card-title h2 { font-size: clamp(30px, 4.2vw, 46px); font-weight: 400; }
.card-title p { margin: 6px 0 0; color: var(--gilt); font-size: 16px; }

.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 20px 13px; border-radius: 2px; text-decoration: none; font: 600 15.5px/1 var(--body); letter-spacing: .01em; cursor: pointer; border: 0; transition: background .15s, color .15s, box-shadow .15s; }
.btn-red { background: var(--lacquer); color: #fbeee0; box-shadow: inset 0 0 0 1px rgba(255,220,170,.28), 0 1px 0 rgba(0,0,0,.4); }
.btn-red:hover { background: var(--lacquer-hi); }
.btn-line { background: rgba(12,14,19,.5); color: var(--cream); box-shadow: inset 0 0 0 1px rgba(241,231,208,.45); }
.btn-line:hover { box-shadow: inset 0 0 0 1px var(--gilt); color: #fff; }
.btn small { font: 400 13px/1 var(--body); opacity: .8; }
.ctas { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }

/* ---------- nav ---------- */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 50; padding: max(10px, env(safe-area-inset-top)) var(--gutter) 10px; display: flex; align-items: center; justify-content: space-between; gap: 16px; transition: background .3s, box-shadow .3s; }
.nav.solid, .nav.open { background: rgba(12,14,19,.94); box-shadow: 0 1px 0 rgba(201,165,96,.18); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.seal { display: grid; place-items: center; width: 30px; height: 34px; flex: none; background: var(--lacquer); color: #fbeee0; border-radius: 2px; font: 400 13px/1.05 var(--brush); writing-mode: vertical-rl; box-shadow: inset 0 0 0 2px rgba(255,255,255,.1); }
.brand b { font: 600 18px/1 var(--head); }
.nav-links { display: none; gap: 24px; align-items: center; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 15px; }
.nav-links a:hover { color: var(--cream); }
.nav-links .btn { color: #fbeee0; padding: 9px 14px 8px; font-size: 15px; }
.menu-btn { display: grid; place-items: center; width: 42px; height: 40px; background: none; border: 1px solid rgba(241,231,208,.3); border-radius: 2px; cursor: pointer; font: 400 13px/1 var(--body); color: var(--cream); }
.nav.open .nav-links { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; position: absolute; top: 100%; left: 0; right: 0; padding: 18px var(--gutter) 26px; background: rgba(12,14,19,.97); box-shadow: 0 1px 0 rgba(201,165,96,.18); }
@media (min-width: 1040px) {
  .nav-links, .nav.open .nav-links { display: flex; flex-direction: row; position: static; padding: 0; background: none; box-shadow: none; align-items: center; }
  .menu-btn { display: none; }
}

/* ---------- hero ---------- */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: flex-end; overflow: hidden; isolation: isolate; }
.hero-art { position: absolute; inset: 0; z-index: -2; }
.hero-art img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 55%; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(12,14,19,.7) 0%, rgba(12,14,19,0) 20%), linear-gradient(0deg, var(--night) 0%, rgba(12,14,19,.9) 28%, rgba(12,14,19,.35) 58%, rgba(12,14,19,0) 78%); }
.hero-inner { width: 100%; max-width: var(--max); margin: 0 auto; padding: 120px var(--gutter) 56px; }
.hero .when { margin: 0 0 14px; color: var(--cream-2); font: 400 16px/1 var(--body); font-style: italic; letter-spacing: .01em; }
.lockup { display: flex; align-items: flex-start; gap: clamp(10px, 1.6vw, 18px); margin: 0; }
.lockup .en { font: 500 clamp(46px, 9vw, 112px)/.95 var(--head); letter-spacing: -.015em; text-shadow: 0 2px 24px rgba(0,0,0,.45); }
.lockup .seal { width: clamp(34px, 5vw, 58px); height: clamp(40px, 5.8vw, 68px); font-size: clamp(14px, 2.1vw, 25px); margin-top: .35em; }
.hero .kana { margin: 12px 0 0 4px; font: 400 clamp(18px, 2.2vw, 24px)/1 var(--brush); letter-spacing: .5em; color: var(--cream-2); }
.hero .line { margin: 28px 0 0; font: 400 clamp(21px, 2.6vw, 28px)/1.3 var(--body); font-style: italic; color: var(--cream); }
.hero .lede { margin: 12px 0 0; max-width: 58ch; color: #d7cfbf; font-size: clamp(16px, 1.5vw, 18px); }
.hero .meta { margin: 24px 0 0; color: var(--muted); font: 400 14.5px/1.6 var(--body); }

/* ---------- sections ---------- */
section { position: relative; padding: clamp(80px, 10vw, 130px) 0; }
.head { max-width: 760px; margin-bottom: clamp(30px, 4vw, 48px); }
.head p { margin: 16px 0 0; color: var(--muted); font-size: 17.5px; max-width: 62ch; }
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s ease, transform .8s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- story + roads ---------- */
.story { padding-bottom: 40px; }
.story-grid { display: grid; gap: clamp(28px, 5vw, 64px); align-items: start; }
@media (min-width: 960px) { .story-grid { grid-template-columns: 1fr 1fr; } }
.story-text p { font-size: clamp(17px, 1.45vw, 18.5px); color: #dcd4c5; max-width: 58ch; }
.story-text .you { color: var(--cream); }
.story-text .end { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--gilt-line); font: 400 19px/1.45 var(--body); font-style: italic; color: var(--cream); }
.shot-fig { margin: 0; }
.shot-fig img { width: 100%; border-radius: 2px; box-shadow: 0 24px 60px rgba(0,0,0,.55), 0 0 0 1px rgba(201,165,96,.25); }
.shot-fig figcaption { margin-top: 10px; color: var(--faint); font-size: 14px; }

.roads { padding-top: 40px; }
.roads .intro { text-align: center; max-width: 54ch; margin: -18px auto 34px; color: #dcd4c5; font-size: 18px; }
.fork { display: grid; gap: 16px; }
@media (min-width: 900px) { .fork { grid-template-columns: 1fr 1fr; gap: 22px; } }
.road { position: relative; border-radius: 3px; overflow: hidden; background: var(--night-2); box-shadow: 0 0 0 1px rgba(201,165,96,.2); display: flex; flex-direction: column; }
.road-art { position: relative; aspect-ratio: 16 / 9; overflow: hidden; }
.road-art img { width: 100%; height: 100%; object-fit: cover; }
.road-art .dir { position: absolute; top: 14px; left: 16px; font: 400 44px/1 var(--brush); color: var(--cream); text-shadow: 0 2px 12px rgba(0,0,0,.8); }
.road.east .road-art img { filter: saturate(.8) brightness(.82); }
.road.east .road-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(150,170,190,.18), rgba(12,14,19,.25)); }
.road-body { padding: 22px 22px 24px; flex: 1; display: flex; flex-direction: column; align-items: flex-start; }
.road-body > p:not(.q) { margin-bottom: 18px; }
.road-body h3 { margin: 10px 0 10px; }
.road-body p { color: #cfc7b8; font-size: 16px; }
.road-body .q { margin: auto 0 0; padding-left: 14px; border-left: 2px solid var(--lacquer); }
.road-body .q .han { display: block; color: var(--cream-2); font-size: 17px; letter-spacing: .04em; }
.road-body .q span:last-child { color: var(--muted); font-size: 14px; }
.never { text-align: center; margin: 30px 0 0; font: 400 17px/1.5 var(--body); font-style: italic; color: var(--muted); }

/* ---------- screenshots ---------- */
.shots { background: var(--night-2); }
.gallery { display: grid; gap: 22px 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.shot { margin: 0; min-width: 0; }
.shot.big { grid-column: 1 / -1; }
@media (min-width: 900px) { .shot.big { grid-column: span 2; grid-row: span 2; } }
.shot button { display: block; width: 100%; padding: 0; border: 0; background: var(--night-3); cursor: zoom-in; border-radius: 2px; overflow: hidden; aspect-ratio: 16 / 9; box-shadow: 0 0 0 1px rgba(201,165,96,.16); }
.shot button img { width: 100%; height: 100%; object-fit: cover; transition: opacity .2s; }
.shot button:hover img { opacity: .88; }
.shot figcaption { margin-top: 8px; font-size: 14px; line-height: 1.5; color: var(--muted); }
.shot.big figcaption { font-size: 15px; color: #cfc7b8; }
.shots .note { margin: 26px 0 0; color: var(--faint); font: 400 13px/1.5 var(--body); }

.lightbox { padding: 0; border: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; margin: 0; }
.lightbox::backdrop { background: rgba(6,7,10,.95); }
.lb-inner { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 58px var(--gutter) 24px; gap: 14px; }
.lb-inner img { max-width: min(1280px, 100%); max-height: calc(100vh - 160px); width: auto; height: auto; }
.lb-cap { color: var(--text); text-align: center; max-width: 70ch; font-size: 15px; }
.lb-btn { position: fixed; background: var(--night-3); border: 1px solid var(--gilt-line); color: var(--text); width: 44px; height: 44px; border-radius: 2px; cursor: pointer; font: 400 16px/1 var(--body); display: grid; place-items: center; }
.lb-btn:hover { border-color: var(--gilt); }
.lb-close { top: 12px; right: 12px; }
.lb-prev { left: 12px; top: 50%; }
.lb-next { right: 12px; top: 50%; }

/* ---------- characters ---------- */
.cast { overflow: hidden; }
.tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-bottom: 30px; border-bottom: 1px solid rgba(201,165,96,.2); }
.tab { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 2px 12px; background: none; border: 0; border-bottom: 3px solid transparent; margin-bottom: -1px; cursor: pointer; min-width: 0; color: var(--muted); }
.tab img { width: 54px; height: 54px; object-fit: cover; object-position: 50% 5%; border-radius: 50%; background: var(--night-3); box-shadow: 0 0 0 2px var(--night-4); }
.tab span { font: 600 17px/1.1 var(--head); }
.tab[aria-selected="true"] { color: var(--cream); border-bottom-color: var(--lacquer); }
.tab[aria-selected="true"] img { box-shadow: 0 0 0 2px var(--gilt), 0 0 0 4px var(--night), 0 0 0 5px rgba(201,165,96,.5); }
@media (min-width: 720px) { .tab { flex-direction: row; justify-content: center; gap: 12px; } }
.panel { display: grid; gap: clamp(24px, 4vw, 56px); align-items: center; }
.panel[hidden] { display: none; }
@media (min-width: 960px) { .panel { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.stage { position: relative; margin: 0; aspect-ratio: 1 / 1.03; max-height: 620px; display: flex; align-items: flex-end; justify-content: center; isolation: isolate; }
.stage::before { content: ""; position: absolute; z-index: -2; width: 78%; aspect-ratio: 1; left: 11%; top: 5%; border-radius: 50%; background: radial-gradient(circle at 50% 42%, var(--tint), var(--night) 70%); box-shadow: 0 0 0 2px var(--gilt), 0 0 0 7px var(--night), 0 0 0 8px rgba(201,165,96,.45); }
.portrait { position: relative; width: 84%; transition: opacity .22s; -webkit-mask-image: linear-gradient(180deg, #000 84%, transparent 100%); mask-image: linear-gradient(180deg, #000 84%, transparent 100%); }
.portrait.swap { opacity: 0; }
.walker { position: absolute; left: 2%; bottom: 4%; width: 96px; height: 96px; }
.info .who { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.info h3 { font-size: clamp(40px, 5vw, 58px); line-height: 1; font-weight: 500; }
.info .k { font: 400 clamp(24px, 2.8vw, 32px)/1 var(--brush); color: var(--gilt); }
.info .role { margin: 12px 0 18px; }
.info > p { color: #d8d0c1; max-width: 56ch; }
.info .field { margin: 18px 0 0; padding: 14px 16px; background: var(--night-2); border-radius: 2px; font-size: 16px; color: #cfc7b8; box-shadow: 0 0 0 1px rgba(201,165,96,.15); }
.info .field b { font-weight: 600; color: var(--cream); }
.moods { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 18px 0 0; padding: 0; list-style: none; }
.moods li:first-child { margin-right: 6px; color: var(--faint); font: 400 13px/1 var(--body); }
.moods button { padding: 6px 10px 5px; border-radius: 2px; background: var(--night-3); cursor: pointer; border: 1px solid var(--night-4); color: var(--muted); font: 400 13px/1.2 var(--body); }
.moods button:hover { color: var(--cream); border-color: rgba(201,165,96,.4); }
.moods button[aria-pressed="true"] { background: var(--cream); color: var(--ink); border-color: var(--bark); }
.others { margin-top: clamp(64px, 8vw, 100px); display: grid; gap: 28px; align-items: center; }
@media (min-width: 960px) { .others { grid-template-columns: 5fr 7fr; } }
.others p { color: var(--muted); margin: 12px 0 0; max-width: 46ch; }
.rings { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 12px; }
@media (min-width: 600px) { .rings { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.ring { margin: 0; text-align: center; }
.ring div { aspect-ratio: 1; border-radius: 50%; overflow: hidden; display: flex; align-items: flex-end; justify-content: center; background: radial-gradient(circle at 50% 40%, #5b5040, #1d1b18 72%); box-shadow: 0 0 0 2px var(--gilt), 0 0 0 5px var(--night), 0 0 0 6px rgba(201,165,96,.35); }
.ring img { width: 92%; transform: translateY(6%); }
.ring figcaption { margin-top: 12px; font: 400 13px/1.35 var(--body); color: var(--muted); }

/* ---------- how it plays ---------- */
.play-sec { background: var(--night-2); }
.feature { display: grid; gap: clamp(22px, 4vw, 56px); align-items: center; margin-bottom: clamp(64px, 8vw, 104px); }
@media (min-width: 960px) { .feature { grid-template-columns: 7fr 5fr; } .feature.flip { grid-template-columns: 5fr 7fr; } .feature.flip .f-media { order: 2; } }
.f-media { margin: 0; }
.f-media img { width: 100%; border-radius: 2px; box-shadow: 0 24px 60px rgba(0,0,0,.5), 0 0 0 1px rgba(201,165,96,.22); }
.f-copy h3 { font-size: clamp(28px, 3.2vw, 38px); margin: 12px 0 14px; }
.f-copy p { color: #d6cebf; max-width: 52ch; }
.f-copy .aside { color: var(--muted); font-size: 15.5px; }
.toggle { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.toggle button { padding: 7px 11px 6px; border-radius: 2px; border: 1px solid var(--night-4); background: var(--night-3); color: var(--muted); cursor: pointer; font: 400 13px/1.2 var(--body); }
.toggle button[aria-pressed="true"] { background: var(--cream); color: var(--ink); border-color: var(--bark); }
.chronicle { display: grid; grid-template-columns: 1fr 1fr; border-radius: 2px; overflow: hidden; border: 2px solid var(--bark); box-shadow: inset 0 0 0 3px var(--cream), inset 0 0 0 4px rgba(201,165,96,.7), 0 24px 60px rgba(0,0,0,.5); background: var(--cream); color: var(--ink); }
.chronicle > div { padding: clamp(18px, 3vw, 30px); min-height: 300px; display: flex; flex-direction: column; }
.chronicle > div + div { border-left: 1px dashed rgba(42,33,25,.35); background: var(--cream-2); }
.chronicle h4 { font: 400 13px/1 var(--body); color: var(--ink-2); margin-bottom: 18px; }
.chronicle .entry { writing-mode: vertical-rl; inline-size: 9.8em; font: 500 clamp(22px, 2.6vw, 28px)/1.5 var(--han); letter-spacing: .1em; margin: 0 auto; }
.chronicle .gloss { margin: 16px 0 0; font-size: 15.5px; font-style: italic; }
.chronicle .src { margin: 4px 0 0; font-size: 12.5px; color: var(--ink-2); }
.chronicle .blank { height: 9.8em; font-size: clamp(22px, 2.6vw, 28px); margin: 0 auto; width: 1px; background: repeating-linear-gradient(180deg, rgba(42,33,25,.4) 0 9px, transparent 9px 18px); }
.chronicle .stamp { align-self: center; margin-top: 14px; width: 42px; height: 42px; border: 2px solid var(--lacquer); color: var(--lacquer); display: grid; place-items: center; font: 400 22px/1 var(--brush); border-radius: 2px; transform: rotate(-5deg); opacity: .8; }
.cards { display: grid; gap: 18px; }
@media (min-width: 900px) { .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.card { background: var(--night); border-radius: 3px; overflow: hidden; box-shadow: 0 0 0 1px rgba(201,165,96,.16); display: flex; flex-direction: column; }
.card-media { aspect-ratio: 16 / 10; overflow: hidden; background: #000; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-media.map img { object-position: 50% 28%; }
.card-body { padding: 20px 20px 24px; }
.card-body h3 { margin-bottom: 8px; }
.card-body p { color: var(--muted); font-size: 15.5px; margin-bottom: 8px; }
.lines { padding: 26px 18px 18px; display: flex; flex-direction: column; justify-content: center; gap: 22px; aspect-ratio: 16 / 10; background: #0f1218; }
.lines .dlg { margin: 0; padding: 14px 14px 10px; }
.lines .dlg p { margin: 0; font-size: 15px; line-height: 1.5; }
.lines[data-lang="ja"] .en, .lines[data-lang="en"] .ja { display: none; }
.lines .ja { font-family: var(--ja); }

/* ---------- history ---------- */
.history { background: var(--night); overflow: hidden; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; }
.tl { position: relative; padding: 0 0 34px 30px; }
.tl::before { content: ""; position: absolute; left: 5px; top: 10px; bottom: -6px; width: 1px; background: var(--gilt-line); }
.tl:last-child::before { display: none; }
.tl::after { content: ""; position: absolute; left: 0; top: 6px; width: 11px; height: 11px; border-radius: 50%; background: var(--night); border: 1px solid var(--gilt); }
.tl.key::after { background: var(--lacquer); border-color: var(--lacquer); }
.tl .yr { display: block; font: 500 clamp(32px, 3.6vw, 40px)/1 var(--head); color: var(--cream); }
.tl .era { display: block; margin: 6px 0 0; font: 500 14px/1 var(--han); color: var(--gilt); letter-spacing: .08em; }
.tl .tag { margin-top: 10px; }
.tl h3 { font-size: 21px; margin: 12px 0 6px; }
.tl p { color: #cfc7b8; font-size: 15.5px; max-width: 46ch; margin: 0; }
.tl .src { margin-top: 10px; font-size: 13px; color: var(--faint); }
.tl .src .han { display: block; color: var(--cream-2); font-size: 15px; }
@media (min-width: 1040px) {
  .timeline { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0 18px; }
  .tl { padding: 30px 0 0; }
  .tl::before { left: 0; right: -18px; top: 5px; bottom: auto; width: auto; height: 1px; }
  .tl::after { top: 0; }
  .tl:last-child::before { display: block; right: 0; background: linear-gradient(90deg, var(--gilt-line), transparent); }
  .tl .tag { display: table; }
}
.history-art { margin: clamp(44px, 6vw, 72px) 0 0; display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.history-art figure { margin: 0; }
.history-art img { width: 100%; border-radius: 2px; box-shadow: 0 0 0 1px rgba(201,165,96,.22); }
.history-art figcaption { margin-top: 8px; font-size: 14px; color: var(--faint); }

/* ---------- novel ---------- */
.novel { background: var(--cream); color: var(--ink); }
.novel h2 .ja { color: var(--lacquer); }
.novel-grid { display: grid; gap: clamp(36px, 6vw, 76px); align-items: center; }
@media (min-width: 900px) { .novel-grid { grid-template-columns: 5fr 7fr; } }
.book { margin: 0 auto; width: 100%; max-width: 360px; }
.book img { width: 100%; border-radius: 1px; box-shadow: 0 1px 0 rgba(0,0,0,.2), 0 22px 44px rgba(42,33,25,.35); }
.book figcaption { margin-top: 10px; font-size: 13px; color: var(--ink-2); text-align: center; }
.novel .vol { margin: 10px 0 0; font: 600 19px/1.4 var(--head); color: var(--ink-2); }
.novel .vol span { font: 400 17px/1 var(--brush); margin-left: 10px; white-space: nowrap; }
.blurb { margin: 26px 0; padding: 2px 0 2px 20px; border-left: 3px solid var(--lacquer); font: 400 clamp(19px, 2vw, 22px)/1.55 var(--body); font-style: italic; }
.novel-copy p { color: #3d342a; max-width: 58ch; }
.novel-copy .then { font: 600 clamp(19px, 1.9vw, 22px)/1.45 var(--head); color: var(--ink); }
.novel .btn-red { box-shadow: none; }
.novel .btn-line { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px rgba(42,33,25,.45); }
.novel .btn-line:hover { color: var(--lacquer); box-shadow: inset 0 0 0 1px var(--lacquer); }
.novel .by { margin-top: 18px; font-size: 14px; color: var(--ink-2); }

/* ---------- development ---------- */
.dev { background: var(--night-2); }
.dev-grid { display: grid; gap: clamp(40px, 6vw, 72px); }
@media (min-width: 1000px) { .dev-grid { grid-template-columns: 1fr 1fr; } }
.dev-story > p { color: #d6cebf; max-width: 60ch; }
.rules { margin: 22px 0 0; padding: 0; list-style: none; }
.rules li { padding: 14px 0 14px 46px; position: relative; border-top: 1px solid rgba(201,165,96,.16); color: #cfc7b8; font-size: 16px; }
.rules li::before { content: attr(data-k); position: absolute; left: 0; top: 16px; width: 30px; height: 30px; display: grid; place-items: center; font: 400 16px/1 var(--brush); color: var(--cream); background: var(--lacquer); border-radius: 2px; }
.ledger { margin: 0 0 34px; padding: 20px 22px 12px; background: var(--cream); color: var(--ink); border: 2px solid var(--bark); border-radius: 3px; box-shadow: inset 0 0 0 3px var(--cream), inset 0 0 0 4px rgba(201,165,96,.7); }
.ledger h3 { font-size: 22px; margin-bottom: 8px; }
.ledger table { width: 100%; border-collapse: collapse; font-size: 15.5px; }
.ledger td { padding: 9px 0; border-top: 1px solid rgba(42,33,25,.18); vertical-align: baseline; }
.ledger td:last-child { text-align: right; font: 600 21px/1 var(--head); white-space: nowrap; padding-left: 12px; }
.status { list-style: none; margin: 0; padding: 0; }
.status li { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; padding: 14px 0; border-top: 1px solid rgba(201,165,96,.16); }
.status li .tag { grid-row: span 2; align-self: start; min-width: 92px; text-align: center; }
.status h4 { font: 600 19px/1.3 var(--head); }
.status p { margin: 0; color: var(--muted); font-size: 15.5px; }
.status .tag.done { background: var(--cream); color: var(--ink); }
.status .tag.now { background: var(--lacquer); }
.no-date { margin: 14px 0 0; color: var(--faint); font-size: 15px; font-style: italic; }

/* ---------- finale + footer ---------- */
.finale { position: relative; padding: 0; min-height: 70vh; display: flex; align-items: center; overflow: hidden; isolation: isolate; }
.finale > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.finale::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, var(--night-2) 0%, rgba(12,14,19,.6) 28%, rgba(12,14,19,.6) 70%, #08090d 100%); }
.finale .wrap { text-align: center; padding-top: 90px; padding-bottom: 90px; }
.finale h2 { text-shadow: 0 3px 30px rgba(0,0,0,.7); }
.finale p { margin: 16px auto 0; max-width: 50ch; color: #e6ded0; font-size: 18px; text-shadow: 0 2px 14px rgba(0,0,0,.9); }
.finale .ctas { justify-content: center; }
footer { background: #08090d; padding: 52px 0 calc(36px + env(safe-area-inset-bottom)); color: var(--faint); font-size: 14.5px; }
.foot { display: grid; gap: 26px; }
@media (min-width: 900px) { .foot { grid-template-columns: 6fr 3fr 3fr; } }
.foot h4 { margin: 0 0 10px; font: 400 13px/1 var(--body); color: var(--muted); }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--cream); }
.foot .brand { margin-bottom: 12px; }
.colophon { margin: 34px 0 0; padding-top: 18px; border-top: 1px solid rgba(201,165,96,.1); font-size: 13px; line-height: 1.6; max-width: 92ch; }

/* ---------- music: off until pressed, quiet, one track on a seamless loop ---------- */
.music { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 60; display: flex; align-items: center; gap: 9px; padding: 9px 15px 9px 13px; border-radius: 999px; background: rgba(12,14,19,.84); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); border: 1px solid var(--gilt-line); color: var(--cream); font: 600 13.5px/1 var(--body); cursor: pointer; box-shadow: 0 6px 20px rgba(0,0,0,.35); transition: border-color .2s; }
.music:hover { border-color: var(--gilt); }
.bars { display: flex; align-items: flex-end; gap: 2px; height: 13px; }
.bars i { display: block; width: 2px; height: 3px; background: var(--gilt); border-radius: 1px; }
.music[aria-pressed="true"] .bars i { animation: eq 1.2s ease-in-out infinite; }
.music[aria-pressed="true"] .bars i:nth-child(2) { animation-delay: -.45s; }
.music[aria-pressed="true"] .bars i:nth-child(3) { animation-delay: -.8s; }
.music[aria-pressed="true"] .bars i:nth-child(4) { animation-delay: -.2s; }
@keyframes eq { 0%, 100% { height: 3px; } 50% { height: 13px; } }
.music .state { color: var(--muted); font-weight: 400; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .music[aria-pressed="true"] .bars i { animation: none; height: 9px; }
}

/* ---------- language switch ---------- */
.nav-links .lang { padding: 7px 11px 6px; border: 1px solid rgba(241,231,208,.3); border-radius: 2px; color: var(--cream); font-size: 14px; }
.nav-links .lang:hover { border-color: var(--gilt); }

/* ---------- Japanese (/ja/) ---------- */
/* Mincho throughout, as in the game's title (Noto Serif JP) and the novel's
   Japanese edition. Japanese has no italic: a synthesized slant looks broken. */
html[lang="ja"] { --head: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", serif; --body: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", serif; }
html[lang="ja"] body { font-size: 16px; line-height: 1.95; letter-spacing: .03em; }
html[lang="ja"] * { font-style: normal !important; }
html[lang="ja"] h1, html[lang="ja"] h2, html[lang="ja"] h3, html[lang="ja"] h4 { font-weight: 600; letter-spacing: .05em; line-height: 1.35; }
html[lang="ja"] h2 { font-size: clamp(28px, 3.8vw, 44px); }
html[lang="ja"] .info h3 { font-weight: 600; }
html[lang="ja"] .btn { font-weight: 600; letter-spacing: .06em; }
html[lang="ja"] .tag { font-weight: 500; letter-spacing: .06em; }
html[lang="ja"] .lockup .jt { font: 400 clamp(64px, 12vw, 140px)/1 var(--brush); letter-spacing: .06em; text-shadow: 0 2px 24px rgba(0,0,0,.5); }
html[lang="ja"] .hero .kana { font: 500 clamp(14px, 1.6vw, 18px)/1 "Noto Serif Display", Georgia, serif; letter-spacing: .32em; text-transform: uppercase; margin-top: 16px; }
html[lang="ja"] .hero .line { font-weight: 500; letter-spacing: .08em; }
html[lang="ja"] .card-title h2 { font-weight: 500; letter-spacing: .12em; }
html[lang="ja"] .tl .yr { font-family: "Noto Serif Display", Georgia, serif; }
html[lang="ja"] .ledger td:last-child, html[lang="ja"] .stat b { font-family: "Noto Serif Display", Georgia, serif; }
html[lang="ja"] .blurb { font-size: clamp(17px, 1.8vw, 20px); line-height: 2; }
html[lang="ja"] .dlg blockquote { font-size: 17px; line-height: 1.85; }
ruby rt { font-size: .5em; letter-spacing: 0; opacity: .85; }

/* ---------- trailer ---------- */
.tri { display: inline-block; width: 0; height: 0; border-style: solid; border-width: 6px 0 6px 10px; border-color: transparent transparent transparent currentColor; margin-right: 2px; }
button.btn { font-family: var(--body); }
.trailer-tile { position: relative; display: block; width: 100%; padding: 0; margin: 0 0 22px; border: 0; border-radius: 3px; overflow: hidden; cursor: pointer; background: #000; aspect-ratio: 16 / 9; box-shadow: 0 24px 60px rgba(0,0,0,.5), 0 0 0 1px rgba(201,165,96,.25); }
.trailer-tile img { width: 100%; height: 100%; object-fit: cover; transition: opacity .25s; }
.trailer-tile:hover img { opacity: .9; }
.trailer-tile .play { position: absolute; left: 50%; top: 50%; width: 96px; height: 96px; margin: -48px 0 0 -48px; border-radius: 50%; background: var(--lacquer); color: #fbeee0; display: grid; place-items: center; box-shadow: 0 0 0 1px rgba(255,220,170,.35), 0 0 0 10px rgba(168,52,43,.25), 0 12px 30px rgba(0,0,0,.5); transition: transform .2s, background .2s; }
.trailer-tile .play .tri { border-width: 15px 0 15px 25px; margin: 0 0 0 7px; }
.trailer-tile:hover .play { transform: scale(1.06); background: var(--lacquer-hi); }
.trailer-tile .tile-cap { position: absolute; left: 16px; bottom: 14px; padding: 4px 10px; border-radius: 2px; background: rgba(12,14,19,.75); color: var(--cream); font: 600 13px/1.3 var(--body); }
#trailer-box video { width: auto; height: auto; max-width: min(1280px, 100%); max-height: calc(100vh - 100px); background: #000; box-shadow: 0 0 0 1px var(--gilt-line); }
/* Cloudflare Pages answers byte-range requests with a full 200, and Safari and every iOS browser
   need 206 to play video. Until the trailer moves to YouTube (user, 2026-11-07), hide it there. */
.no-trailer [data-trailer] { display: none !important; }
@media (max-width: 600px) { .trailer-tile .play { width: 72px; height: 72px; margin: -36px 0 0 -36px; } .trailer-tile .play .tri { border-width: 11px 0 11px 18px; margin-left: 5px; } }
