/* Ronin — low-poly clay in mountain fog. Makimono spine: a wide seal rail, one unrolling column. */
:root {
  --night: #1c1d26;
  --slate: #292b35;
  --slate-2: #33364a;
  --fog: #98a1bb;
  --mist: #aeacbe;
  --dusk: #83849b;
  --heather: #908da8;
  --clay: #72574b;
  --straw: #b08a5e;
  --band: #a3202c;
  --glow: #4ff6ff;
  --ember: #ffa24a;
  --bone: #ecebf2;
  --ink: #c9c8d6;
  --line: rgba(174, 172, 190, .22);
  --display: 'Zen Antique', 'Hiragino Mincho ProN', Georgia, serif;
  --body: 'Zen Kaku Gothic New', 'Hiragino Sans', 'Segoe UI', sans-serif;
  --rail: clamp(56px, 13vw, 210px);
  --col: 820px;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --cut: polygon(0 10px, 10px 0, calc(100% - 18px) 0, 100% 18px, 100% calc(100% - 8px), calc(100% - 8px) 100%, 14px 100%, 0 calc(100% - 14px));
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--night); }
html.still { scroll-behavior: auto; }
body {
  margin: 0; min-height: 100vh; overflow-x: hidden;
  font-family: var(--body); font-size: 16px; line-height: 1.6; color: var(--ink);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(144, 141, 168, .22), transparent 60%),
    radial-gradient(900px 700px at -10% 40%, rgba(114, 87, 75, .16), transparent 60%),
    linear-gradient(180deg, var(--slate) 0, var(--night) 1400px);
  background-color: var(--night);
  background-repeat: no-repeat;
}
body::after { /* grain */
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 90; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--bone); text-decoration-color: var(--glow); text-underline-offset: 3px; }
a:hover { color: var(--glow); }
:focus-visible { outline: 2px solid var(--glow); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; color: var(--bone); line-height: 1.05; margin: 0 0 .4em; letter-spacing: .005em; }
h2 { font-size: clamp(2rem, 5vw, 3.6rem); }
h3 { font-size: clamp(1.3rem, 2.4vw, 1.7rem); }
p { margin: 0 0 1em; max-width: 60ch; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; z-index: 200; background: var(--glow); color: var(--night); padding: .6em 1em; }
.skip:focus { left: 1rem; }

/* ---------- header ---------- */
.top {
  position: fixed; inset: 0 0 auto 0; z-index: 60; display: flex; align-items: center; gap: 1rem;
  padding: .7rem clamp(1rem, 3vw, 2.2rem);
  background: linear-gradient(180deg, rgba(28, 29, 38, .85), rgba(28, 29, 38, 0));
}
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--bone); font-family: var(--display); font-size: 1.15rem; }
.brand img { width: 40px; height: 40px; object-fit: contain; transition: transform .4s var(--ease); }
.brand:hover img { transform: rotate(-8deg) scale(1.06); }
.brand small { display: block; font-family: var(--body); font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; color: var(--fog); }
.nav { margin-left: auto; display: flex; gap: .2rem; align-items: center; }
.nav a {
  position: relative; text-decoration: none; color: var(--mist); font-size: .88rem; letter-spacing: .08em;
  padding: .45rem .7rem; transition: color .25s;
}
.nav a::after { content: ''; position: absolute; left: .7rem; right: .7rem; bottom: .2rem; height: 2px; background: var(--glow); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.nav a:hover, .nav a:focus-visible { color: var(--bone); }
.nav a:hover::after, .nav a:focus-visible::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--bone); }
.nav a[aria-current="page"]::before { content: ''; position: absolute; left: -.05rem; top: 50%; width: 7px; height: 7px; margin-top: -4px; background: var(--band); transform: rotate(45deg); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line); color: var(--bone); font: inherit; padding: .45rem .8rem; cursor: pointer; transition: border-color .2s, background .2s; }
.nav-toggle:hover { border-color: var(--glow); }
.nav-toggle:active { background: rgba(79, 246, 255, .12); }
.slots-top { display: flex; gap: .4rem; }
.slot-link { color: var(--fog); font-size: .8rem; border: 1px solid var(--line); padding: .3rem .6rem; text-decoration: none; transition: border-color .2s, color .2s; }
.slot-link:hover { color: var(--glow); border-color: var(--glow); }
@media (max-width: 860px) {
  .nav-toggle { display: inline-block; }
  .nav { position: fixed; inset: 3.6rem .8rem auto .8rem; flex-direction: column; align-items: stretch; background: rgba(28, 29, 38, .97); border: 1px solid var(--line); padding: .6rem; display: none; clip-path: var(--cut); }
  .nav-open .nav { display: flex; }
  .nav a { padding: .7rem .9rem; }
}

/* ---------- buttons & controls ---------- */
.btn {
  --bg: transparent; display: inline-flex; align-items: center; gap: .55rem; cursor: pointer;
  font: 500 .95rem/1 var(--body); letter-spacing: .06em; text-decoration: none; color: var(--bone);
  padding: .95rem 1.35rem; border: 1px solid var(--mist); background: var(--bg); clip-path: var(--cut);
  transition: background .25s, color .25s, border-color .25s, transform .15s, box-shadow .25s;
}
.btn:hover { border-color: var(--glow); color: var(--glow); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn--glow { --bg: var(--glow); color: var(--night); border-color: var(--glow); font-weight: 700; }
.btn--glow:hover { --bg: #a6fbff; color: var(--night); }
.btn--ghost { border-color: var(--line); }
.btn[disabled] { opacity: .5; cursor: progress; }
.btn .glyph { width: 14px; height: 14px; }

.field { display: grid; gap: .35rem; margin-bottom: 1.1rem; }
.field label, .field .lab { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--fog); display: flex; justify-content: space-between; gap: 1rem; }
.field output { font-family: var(--display); color: var(--bone); letter-spacing: 0; font-size: 1rem; text-transform: none; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 26px; background: transparent; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 3px; background: linear-gradient(90deg, var(--glow) var(--p, 50%), var(--line) var(--p, 50%)); }
input[type="range"]::-moz-range-track { height: 3px; background: var(--line); }
input[type="range"]::-moz-range-progress { height: 3px; background: var(--glow); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -7.5px; background: var(--bone); border: 3px solid var(--slate); transform: rotate(45deg); transition: background .2s, transform .2s; }
input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; background: var(--bone); border: 3px solid var(--slate); border-radius: 0; transform: rotate(45deg); }
input[type="range"]:hover::-webkit-slider-thumb, input[type="range"]:focus-visible::-webkit-slider-thumb { background: var(--glow); transform: rotate(45deg) scale(1.15); }
input[type="range"]:active::-webkit-slider-thumb { background: var(--ember); }
input[type="number"], input[type="search"], input[type="email"], select {
  font: inherit; color: var(--bone); background: rgba(28, 29, 38, .7); border: 1px solid var(--line); padding: .6rem .75rem; width: 100%; transition: border-color .2s, background .2s;
}
input:hover, select:hover { border-color: var(--heather); }
input:focus-visible, select:focus-visible { border-color: var(--glow); outline: none; background: rgba(28, 29, 38, .95); }
.seg { display: inline-flex; border: 1px solid var(--line); }
.seg button { font: inherit; font-size: .85rem; letter-spacing: .06em; color: var(--mist); background: none; border: 0; padding: .55rem .95rem; cursor: pointer; transition: background .2s, color .2s; }
.seg button:hover { color: var(--bone); background: rgba(174, 172, 190, .1); }
.seg button:active { background: rgba(79, 246, 255, .2); }
.seg button[aria-pressed="true"] { background: var(--bone); color: var(--night); }

/* ---------- seals & freshness ---------- */
.seal { display: inline-block; font-family: var(--display); font-size: .78rem; letter-spacing: .12em; color: #f3dfe0; background: var(--band); padding: .3rem .55rem; transform: rotate(-2deg); box-shadow: 2px 2px 0 rgba(0, 0, 0, .35); }
.tag { display: inline-block; font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--fog); border: 1px solid var(--line); padding: .2rem .5rem; }
.tag--sim { color: var(--glow); border-color: rgba(79, 246, 255, .4); }
.fresh { font-size: .78rem; letter-spacing: .04em; color: var(--fog); display: flex; align-items: center; gap: .5rem; margin: .4rem 0 0; }
.fresh::before { content: ''; width: 8px; height: 8px; flex: none; background: var(--dusk); transform: rotate(45deg); }
.fresh--live::before { background: var(--glow); box-shadow: 0 0 10px var(--glow); animation: breathe 2.4s ease-in-out infinite; }
.fresh--saved::before { background: var(--ember); }
.fresh--error::before { background: var(--band); }
@keyframes breathe { 50% { opacity: .35; } }

/* ---------- the stage (3D canvas over a still frame) ---------- */
.stage { position: relative; overflow: hidden; background: #2b2d39; }
.stage > svg, .stage > canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.stage > canvas { opacity: 0; transition: opacity 1.1s ease; }
.stage--live > canvas { opacity: 1; }
.stage:not(.stage--live) > canvas { pointer-events: none; }
.stage--live > svg.still-frame { pointer-events: none; }
.stage--live > svg.still-frame { opacity: 0; transition: opacity 1.1s ease; }
.still-frame .drift { animation: drift 14s ease-in-out infinite alternate; }
.still-frame .lamp { animation: breathe 3s ease-in-out infinite; }
@keyframes drift { to { transform: translateX(-40px); } }

/* ---------- home hero ---------- */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 560px; }
.hero .stage { position: absolute; inset: 0; }
.hero__veil { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(28, 29, 38, .78) 0%, rgba(28, 29, 38, .25) 55%, transparent 80%), linear-gradient(0deg, rgba(28, 29, 38, .9) 0%, transparent 35%); }
.hero__type { position: absolute; left: clamp(1rem, 5vw, 5rem); bottom: clamp(1.4rem, 7vh, 5rem); right: 1rem; max-width: 760px; pointer-events: none; }
.hero__type > * { pointer-events: auto; }
.hero h1 { font-size: clamp(2.7rem, 7.4vw, 6.6rem); margin: .2em 0 .25em; text-shadow: 0 4px 30px rgba(28, 29, 38, .8); }
.hero h1 .k { display: block; color: var(--glow); }
.hero .lede { color: var(--bone); font-size: clamp(.98rem, 1.4vw, 1.12rem); max-width: 44ch; }
.hero .ctas { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.1rem; }
.breadth-chip { position: absolute; right: clamp(1rem, 4vw, 3rem); top: 5.5rem; width: min(270px, 44vw); padding: 1rem 1.1rem; background: rgba(28, 29, 38, .62); border: 1px solid var(--line); backdrop-filter: blur(6px); clip-path: var(--cut); }
.breadth-chip .big { font-family: var(--display); font-size: clamp(2.2rem, 4.6vw, 3.4rem); color: var(--bone); line-height: 1; }
.breadth-chip .lab { font-size: .78rem; color: var(--mist); }
.breadth-chip .bar { height: 4px; background: rgba(174, 172, 190, .2); margin: .6rem 0 .2rem; }
.breadth-chip .bar i { display: block; height: 100%; width: 0; background: var(--ember); transition: width 1.2s var(--ease); }
@media (max-width: 640px) {
  .hero__veil { background: linear-gradient(0deg, rgba(28, 29, 38, .95) 0%, rgba(28, 29, 38, .55) 45%, transparent 70%); }
  .breadth-chip { top: 4.6rem; left: 1rem; right: auto; width: auto; padding: .65rem .8rem; display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; max-width: calc(100% - 2rem); }
  .breadth-chip .big { font-size: 1.8rem; }
  .breadth-chip .bar { display: none; }
  .breadth-chip .fresh { width: 100%; margin: 0; }
  .hero .lede { font-size: .95rem; }
  .btn { padding: .85rem 1.05rem; }
}
.scroll-cue { position: absolute; right: clamp(1rem, 4vw, 3rem); bottom: 1.4rem; writing-mode: vertical-rl; font-size: .7rem; letter-spacing: .3em; text-transform: uppercase; color: var(--fog); }
.scroll-cue::after { content: ''; display: inline-block; width: 1px; height: 46px; margin-top: .6rem; background: linear-gradient(var(--glow), transparent); animation: cue 2s ease-in-out infinite; }
@keyframes cue { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }
@media (max-width: 640px) { .scroll-cue { display: none; } }

/* ---------- home: the gatehouse — seal rail · the words · a window onto the valley ---------- */
.gatehouse { position: relative; display: grid; grid-template-columns: 184px minmax(0, 1fr) minmax(0, 1.2fr); grid-template-rows: minmax(0, 1fr) auto; height: 100vh; height: 100svh; min-height: 660px; }
.gh-rail { grid-column: 1; grid-row: 1 / 3; position: relative; z-index: 5; display: flex; flex-direction: column; align-items: flex-start; gap: 2.2rem; padding: 1.4rem 1.1rem 1.6rem; border-right: 1px solid var(--line); background: linear-gradient(180deg, rgba(20, 21, 28, .7), rgba(20, 21, 28, .25)); }
.gh-rail .brand { flex-direction: column; align-items: flex-start; gap: .5rem; }
.gh-rail .nav { margin: 0; flex-direction: column; align-items: stretch; gap: 0; width: 100%; }
.gh-rail .nav a { padding: .55rem .7rem .55rem 1rem; }
.gh-rail .nav a::after { left: 1rem; right: auto; width: 1.6rem; }
.gh-rail .kanji-tall { margin-top: auto; writing-mode: vertical-rl; font-family: var(--display); font-size: 3.6rem; line-height: 1; color: rgba(174, 172, 190, .22); animation: breathe 6s ease-in-out infinite; }
.gh-type { grid-column: 2; grid-row: 1; align-self: end; position: relative; z-index: 3; padding: 5rem clamp(1.2rem, 3vw, 3rem) 1.2rem; }
.gh-type h1 { font-size: clamp(2.6rem, 5vw, 4.6rem); margin: .25em 0 .25em; }
.gh-type h1 .k { display: block; color: var(--glow); }
.gh-type .lede { color: var(--bone); font-size: clamp(.98rem, 1.3vw, 1.1rem); max-width: 40ch; }
.gh-type .ctas { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1rem; }
.gh-read { grid-column: 2; grid-row: 2; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .8rem; padding: 0 clamp(1.2rem, 3vw, 3rem) 1.6rem; position: relative; z-index: 3; }
.gh-card { min-width: 0; padding: .9rem 1rem; border: 1px solid var(--line); background: rgba(28, 29, 38, .78); clip-path: var(--cut); }
.gh-card .lab { display: block; font-size: .88rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--bone); }
.gh-card--live { border-color: rgba(255, 162, 74, .45); }
.gh-card--live .lab::before { content: '本'; font-family: var(--display); color: var(--ember); margin-right: .45rem; letter-spacing: 0; }
.gh-card--sim { border-color: rgba(79, 246, 255, .45); }
.gh-card--sim .lab { color: var(--glow); }
.gh-card--sim .lab::before { content: '仮'; font-family: var(--display); margin-right: .45rem; letter-spacing: 0; }
.gh-figs { display: flex; gap: 1.1rem; align-items: flex-end; flex-wrap: wrap; margin: .45rem 0 .2rem; }
.gh-figs b { display: block; font-family: var(--display); font-weight: 400; font-size: clamp(1.7rem, 2.8vw, 2.4rem); color: var(--bone); line-height: 1; }
.gh-figs small { display: block; font-size: .9rem; color: var(--bone); }
.gh-hover { font-size: .95rem; color: var(--ink); min-height: 1.4em; margin: .35rem 0 0; }
.gh-hover b { color: var(--ember); font-weight: 700; }
.gh-card .fresh { color: var(--ink); font-size: .86rem; }
.gh-tick { font-family: var(--display); color: var(--bone); font-size: 1.3rem; line-height: 1.25; margin: .45rem 0 .55rem; min-height: 2.5em; }
.gh-tick em { font-style: normal; color: var(--ember); }
.gh-days { display: grid; grid-template-columns: repeat(30, minmax(0, 1fr)); gap: 2px; }
.gh-days i { height: 8px; background: rgba(174, 172, 190, .18); transition: background .3s; }
.gh-days i.on { background: var(--glow); }
.gh-days i.left { background: var(--ember); }
.gh-stage { grid-column: 3; grid-row: 1 / 3; margin: 1rem 1rem 1rem 0; clip-path: polygon(0 26px, 26px 0, 100% 0, 100% calc(100% - 26px), calc(100% - 26px) 100%, 0 100%); }
.gh-stage::after { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 1; background: linear-gradient(0deg, rgba(28, 29, 38, .55), transparent 40%); }
.stage > svg.gh-ronin { inset: auto auto 0 4%; width: 30%; height: auto; aspect-ratio: 200 / 300; z-index: 3; pointer-events: none; transform: translate(var(--mx, 0px), var(--my, 0px)); transition: transform .5s var(--ease); filter: drop-shadow(0 20px 30px rgba(0, 0, 0, .5)); }
.gh-ronin .body-sway { transform-origin: 100px 300px; animation: sway 5s ease-in-out infinite; }
.gh-ronin .eyes { animation: blink 5.5s infinite; transform-origin: 100px 118px; }
.gh-ronin .scarf { animation: scarf 3.2s ease-in-out infinite; transform-origin: 70px 150px; }
@keyframes sway { 50% { transform: rotate(-1.6deg) translateY(-4px); } }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes scarf { 50% { transform: rotate(7deg); } }
.gh-say { position: absolute; z-index: 4; left: 30%; bottom: 33%; max-width: 15rem; font-family: var(--display); font-size: .95rem; color: var(--night); background: var(--bone); padding: .5rem .75rem; clip-path: var(--cut); pointer-events: none; transition: opacity .3s; }
@media (max-width: 860px) {
  .gatehouse { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 300px auto auto; height: auto; min-height: 0; }
  .gh-rail { grid-column: 1; grid-row: 1; flex-direction: row; align-items: center; gap: 1rem; padding: .7rem 1rem; border-right: 0; border-bottom: 1px solid var(--line); }
  .gh-rail .brand { flex-direction: row; align-items: center; }
  .gh-rail .brand img { width: 34px; height: 34px; }
  .gh-rail .kanji-tall { display: none; }
  .gh-stage { grid-column: 1; grid-row: 2; margin: 0; }
  .gh-type { grid-column: 1; grid-row: 3; padding: 1.1rem 1rem .6rem; }
  .gh-type h1 { font-size: clamp(2.3rem, 10vw, 3rem); }
  .gh-read { grid-column: 1; grid-row: 4; grid-template-columns: minmax(0, 1fr); padding: .4rem 1rem 2rem; }
  .stage > svg.gh-ronin { width: 26%; }
  .gh-say { left: 28%; bottom: 40%; font-size: .82rem; max-width: 11rem; }
}

/* names floating over the 3D valley */
.stage-tags { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 2; }
.stage-tag { position: absolute; left: 0; top: 0; font-size: .72rem; letter-spacing: .05em; color: var(--bone); background: rgba(28, 29, 38, .8); border: 1px solid var(--line); padding: .14rem .45rem; white-space: nowrap; transition: opacity .3s; }
.stage-tag::after { content: ''; position: absolute; left: 50%; top: 100%; width: 1px; height: calc(12px + var(--lift, 0px)); background: rgba(174, 172, 190, .5); }
.stage-tag--stop { border-color: rgba(79, 246, 255, .55); color: var(--glow); }
.stage-tag--lead { font-family: var(--display); font-size: .9rem; padding: .25rem .6rem; color: var(--night); background: var(--bone); border-color: var(--bone); }
.stage-tag--hover { font-family: var(--display); font-size: .9rem; padding: .25rem .6rem; color: var(--night); background: var(--ember); border-color: var(--ember); z-index: 2; }
.stage-tag--ronin { background: var(--band); border-color: var(--band); color: #fbeaea; font-family: var(--display); z-index: 1; }

/* ---------- makimono: seal rail + one column ---------- */
.maki { position: relative; display: grid; grid-template-columns: var(--rail) minmax(0, var(--col)) 1fr; column-gap: clamp(1rem, 3vw, 3rem); padding: clamp(4rem, 9vw, 7.5rem) clamp(1rem, 3vw, 2.2rem) clamp(3rem, 6vw, 5rem) 0; }
.maki + .maki { border-top: 1px solid var(--line); }
.maki::before { /* the scroll's thread */ content: ''; position: absolute; left: calc(var(--rail) / 2); top: 0; bottom: 0; width: 1px; background: linear-gradient(var(--line), rgba(174, 172, 190, .05)); }
.rail { position: relative; grid-column: 1; }
.rail .mark { position: sticky; top: 6rem; display: flex; flex-direction: column; align-items: center; gap: .7rem; }
.rail .mark .seal { writing-mode: vertical-rl; transform: none; padding: .7rem .35rem; font-size: .82rem; }
.rail .mark .kanji { font-family: var(--display); color: var(--dusk); font-size: clamp(1.3rem, 3vw, 2.4rem); writing-mode: vertical-rl; line-height: 1; }
.body { grid-column: 2; min-width: 0; }
.wide { grid-column: 2 / 4; min-width: 0; }
.eyebrow { font-size: .74rem; letter-spacing: .22em; text-transform: uppercase; color: var(--glow); margin-bottom: .8rem; display: block; }
@media (max-width: 640px) {
  :root { --rail: 40px; }
  .maki { column-gap: .8rem; padding-right: 1rem; }
  .rail .mark .kanji { display: none; }
  .rail .mark .seal { font-size: .7rem; }
  .wide { grid-column: 2; }
}

/* page heads (inner pages) */
.pagehead { padding: 7.5rem clamp(1rem, 5vw, 5rem) 2rem; position: relative; }
.pagehead h1 { font-size: clamp(2.6rem, 7vw, 5.6rem); max-width: 14ch; }
.pagehead p { color: var(--mist); max-width: 52ch; }
.pagehead p.plan-asof { display: block; color: var(--bone); font-size: .9rem; margin-top: 1rem; padding-left: 1.1rem; position: relative; }
.pagehead p.plan-asof::before { position: absolute; left: 0; top: .45em; background: var(--ember); }
.pagehead p.plan-asof time { color: var(--glow); }

/* ---------- panels (faceted) ---------- */
.panel { position: relative; background: linear-gradient(160deg, rgba(51, 54, 74, .78), rgba(33, 35, 47, .9)); border: 1px solid var(--line); padding: clamp(1rem, 2.4vw, 1.6rem); clip-path: var(--cut); }
.panel--clay { background: linear-gradient(160deg, rgba(114, 87, 75, .45), rgba(51, 40, 38, .7)); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 1rem; }
.figure-row { display: flex; flex-wrap: wrap; gap: 1.6rem 2.4rem; margin: .4rem 0 1rem; }
.fig .n { font-family: var(--display); font-size: clamp(1.7rem, 3.6vw, 2.6rem); color: var(--bone); line-height: 1.05; }
.fig .l { font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--fog); }
.up { color: var(--glow); } .down { color: #ff8e8e; }

/* mascots */
.mascot { width: min(320px, 70%); height: auto; filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .45)); }
.mascot--float { animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-10px); } }
.split { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 1.5rem; align-items: center; }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } .split .mascot { margin: 0 auto; } }

/* ---------- journey stops (home quick-cast) ---------- */
.stops { list-style: none; margin: 1.2rem 0; padding: 0; display: grid; gap: .8rem; counter-reset: s; }
.stops li { position: relative; padding: .9rem 1rem .9rem 3.2rem; border-left: 2px solid var(--glow); background: rgba(28, 29, 38, .5); }
.stops li::before { counter-increment: s; content: counter(s, cjk-ideographic); position: absolute; left: .9rem; top: .75rem; font-family: var(--display); color: var(--ember); font-size: 1.3rem; }
.stops b { font-family: var(--display); font-weight: 400; color: var(--bone); font-size: 1.25rem; }
.stops span { display: block; font-size: .85rem; color: var(--mist); }

/* ---------- the bill: one flow, left to right, the road filling above it as you scroll ---------- */
.road { position: relative; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.road__inner { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1.2rem 2.2rem; align-items: stretch; padding: clamp(4rem, 8vw, 6rem) clamp(1rem, 5vw, 5rem) clamp(4rem, 8vw, 6rem); }
.road__intro { grid-column: 1 / 4; margin-bottom: .6rem; order: 0; }
.road__path { order: 1; grid-column: 1 / -1; position: relative; height: 3px; margin-bottom: .4rem; background: rgba(174, 172, 190, .15); }
.road__path i { position: absolute; inset: 0; background: linear-gradient(90deg, var(--glow), var(--ember)); transform-origin: left; transform: scaleX(1); }
.road__step { order: 2; min-height: 260px; display: flex; flex-direction: column; justify-content: flex-start; position: relative; overflow: visible; clip-path: none; }
.road__step:not(:last-of-type)::after { content: '→'; position: absolute; right: -1.1rem; top: 50%; transform: translate(50%, -50%); font-family: var(--display); font-size: 1.4rem; line-height: 1; color: var(--ember); pointer-events: none; }
@media (max-width: 960px) {
  .road__inner { grid-template-columns: minmax(0, 1fr); row-gap: 2.4rem; }
  .road__intro { grid-column: 1; }
  .road__path { display: none; }
  .road__step { min-height: 0; }
  .road__step:not(:last-of-type)::after { content: '↓'; right: auto; left: 50%; top: auto; bottom: -1.2rem; transform: translate(-50%, 50%); }
}
.road__step .glyphbig { position: absolute; top: 1rem; right: 1.2rem; font-family: var(--display); font-size: 4.6rem; color: rgba(174, 172, 190, .16); line-height: 1; pointer-events: none; }
.road__step svg { width: 64px; height: 64px; margin-bottom: 1rem; flex: none; }
.road__step h3 { margin-top: 1rem; }
.road__step p { color: var(--mist); font-size: .95rem; margin: 0; }

/* ---------- journal & scroll ---------- */
.journal { list-style: none; margin: 0; padding: 0; max-height: 360px; overflow: auto; border-top: 1px solid var(--line); }
.journal li { display: grid; grid-template-columns: 4.2rem 1fr; gap: .8rem; padding: .7rem .2rem; border-bottom: 1px solid var(--line); font-size: .92rem; opacity: .55; transition: opacity .3s, background .3s; }
.journal li.now { opacity: 1; background: rgba(79, 246, 255, .06); }
.journal li.leave .d { color: var(--ember); }
.journal .d { font-family: var(--display); color: var(--glow); }
.paper {
  position: relative; color: #3a2e28; background: linear-gradient(180deg, #efe6d6, #e3d7c1); padding: 2rem 1.6rem; margin: 1rem 0;
  box-shadow: 0 20px 40px rgba(0, 0, 0, .35); border-left: 14px solid #8c6a4c; border-right: 14px solid #8c6a4c;
}
.paper h3 { color: #2b201b; }
.paper ol { margin: 0; padding-left: 1.3rem; }
.paper li { margin: .3rem 0; }
.paper .stamp { position: absolute; right: 1.2rem; top: 1.2rem; width: 58px; height: 58px; display: grid; place-items: center; background: var(--band); color: #f8e7e7; font-family: var(--display); font-size: .75rem; text-align: center; line-height: 1.1; transform: rotate(6deg); }

/* ---------- map page ---------- */
.mapwrap { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.mapwrap .stage { height: min(74vh, 720px); min-height: 420px; }
.console { background: rgba(28, 29, 38, .92); border-left: 1px solid var(--line); padding: 1.2rem; display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
@media (max-width: 960px) { .mapwrap { grid-template-columns: 1fr; } .mapwrap .stage { height: 62vh; min-height: 340px; } .console { border-left: 0; border-top: 1px solid var(--line); } }
.readout { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.readout .fig .n { font-size: 1.5rem; }
.stage-hud { position: absolute; left: 1rem; top: 1rem; right: 1rem; display: flex; justify-content: space-between; gap: .6rem; pointer-events: none; flex-wrap: wrap; }
.stage-hud > * { pointer-events: auto; background: rgba(28, 29, 38, .72); padding: .4rem .7rem; border: 1px solid var(--line); font-size: .8rem; }
.vlist { display: flex; flex-wrap: wrap; gap: .35rem; }
.vlist button { font: inherit; font-size: .78rem; color: var(--mist); background: rgba(28, 29, 38, .6); border: 1px solid var(--line); padding: .3rem .55rem; cursor: pointer; transition: color .2s, border-color .2s, background .2s; }
.vlist button:hover { color: var(--bone); border-color: var(--glow); }
.vlist button:active { background: rgba(79, 246, 255, .18); }
.vlist button[aria-pressed="true"] { color: var(--night); background: var(--glow); border-color: var(--glow); }
.vlist button.visited { border-color: var(--ember); }
.vlist button.banned { text-decoration: line-through; opacity: .55; }
.pager { display: flex; align-items: center; gap: .6rem; margin-top: .8rem; font-size: .82rem; color: var(--fog); }
.pager button { font: inherit; background: none; color: var(--bone); border: 1px solid var(--line); padding: .35rem .7rem; cursor: pointer; transition: border-color .2s; }
.pager button:hover:not([disabled]) { border-color: var(--glow); }
.pager button[disabled] { opacity: .35; cursor: default; }

/* ---------- states ---------- */
.state { display: flex; gap: 1rem; align-items: center; padding: 1rem; border: 1px dashed var(--line); background: rgba(28, 29, 38, .5); }
.state img { width: 92px; height: auto; flex: none; }
.state b { font-family: var(--display); font-weight: 400; color: var(--bone); font-size: 1.15rem; display: block; }
.state p { margin: 0; font-size: .9rem; color: var(--mist); }
.state--loading b::after { content: '…'; display: inline-block; animation: breathe 1.4s infinite; }
.skeleton { height: 14px; background: linear-gradient(90deg, rgba(174, 172, 190, .08), rgba(174, 172, 190, .2), rgba(174, 172, 190, .08)); background-size: 200% 100%; animation: shimmer 1.6s linear infinite; margin: .45rem 0; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- tables ---------- */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: .65rem .8rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-weight: 500; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--fog); background: rgba(28, 29, 38, .6); }
th button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; letter-spacing: inherit; text-transform: inherit; }
th button:hover { color: var(--glow); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tbody tr { transition: background .2s; }
tbody tr:hover { background: rgba(79, 246, 255, .05); }
td .nm { color: var(--bone); }
td .sy { color: var(--fog); font-size: .78rem; margin-left: .4rem; }
@media (max-width: 640px) { th, td { padding: .55rem .5rem; } .hide-sm { display: none; } }

/* ---------- token ---------- */
.wheel { width: min(340px, 100%); height: auto; aspect-ratio: 1; }
.wheel path { transition: transform .3s var(--ease), opacity .3s; transform-origin: 50% 50%; cursor: pointer; }
.wheel path:hover, .wheel path:focus-visible { transform: scale(1.04); outline: none; }
.legend { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.legend li { display: grid; grid-template-columns: 14px 3.4rem 1fr; gap: .7rem; align-items: baseline; font-size: .92rem; padding: .3rem .2rem; transition: background .2s; }
.legend li.on { background: rgba(174, 172, 190, .1); }
.legend i { width: 12px; height: 12px; display: block; transform: rotate(45deg); }
.legend b { font-family: var(--display); font-weight: 400; color: var(--bone); font-size: 1.2rem; }
.flow { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .5rem; }
.flow > div { padding: .9rem .7rem; border: 1px solid var(--line); background: rgba(28, 29, 38, .55); font-size: .85rem; position: relative; }
.flow > div b { display: block; font-family: var(--display); font-weight: 400; color: var(--bone); font-size: 1.05rem; }
@media (max-width: 760px) { .flow { grid-template-columns: 1fr; } }
.chartbox svg { width: 100%; height: auto; display: block; }
.chartbox { position: relative; }

/* ---------- dojo ---------- */
.phases { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0; }
.phases button { font: inherit; font-family: var(--display); font-size: 1rem; color: var(--mist); background: rgba(28, 29, 38, .6); border: 1px solid var(--line); padding: .6rem 1rem; cursor: pointer; clip-path: var(--cut); transition: color .2s, border-color .2s, background .2s; }
.phases button:hover { color: var(--bone); border-color: var(--glow); }
.phases button:active { background: rgba(79, 246, 255, .18); }
.phases button[aria-pressed="true"] { background: var(--band); color: #fbeaea; border-color: var(--band); }
.territories { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: .6rem; }
.territories li { padding: .8rem .9rem; border: 1px solid var(--line); border-top: 3px solid var(--c, var(--glow)); background: rgba(28, 29, 38, .55); font-size: .85rem; color: var(--mist); }
.territories li b { display: block; color: var(--bone); font-family: var(--display); font-weight: 400; font-size: 1.05rem; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); padding: 3rem clamp(1rem, 5vw, 5rem) 2.4rem; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 2rem; background: rgba(20, 21, 28, .6); }
.foot .tagline { font-family: var(--display); font-size: clamp(1.5rem, 3vw, 2.2rem); color: var(--bone); margin: .6rem 0; }
.foot small { color: var(--dusk); display: block; line-height: 1.5; }
.foot small.asof { color: var(--bone); font-size: .82rem; margin: .5rem 0 .2rem; display: flex; align-items: center; flex-wrap: wrap; gap: .45rem; }
.foot small.asof::before { content: ''; width: 8px; height: 8px; flex: none; background: var(--ember); transform: rotate(45deg); }
.foot small.asof.asof--live::before { background: var(--glow); box-shadow: 0 0 10px var(--glow); }
.foot small.asof time { color: var(--glow); }
.foot nav { display: flex; flex-wrap: wrap; gap: .3rem 1rem; margin: .8rem 0; }
.foot nav a { color: var(--mist); text-decoration: none; font-size: .9rem; }
.foot nav a:hover { color: var(--glow); }
.foot .follow { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .6rem; }
.ca { display: flex; align-items: center; gap: .5rem; border: 1px solid var(--line); padding: .4rem .6rem; max-width: 100%; }
.ca code { font-size: .78rem; overflow-wrap: anywhere; color: var(--mist); }
.ca button { font: inherit; font-size: .78rem; background: none; color: var(--bone); border: 1px solid var(--line); padding: .25rem .55rem; cursor: pointer; }
.ca button:hover { border-color: var(--glow); }
.waitlist { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .6rem; }
.waitlist input { flex: 1 1 200px; width: auto; }
.waitlist__msg { width: 100%; font-size: .8rem; color: var(--fog); margin: 0; min-height: 1.2em; }
@media (max-width: 760px) { .foot { grid-template-columns: 1fr; } }

/* ---------- page gate: the walk between pages ---------- */
.gate { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; background: radial-gradient(circle at 50% 60%, #3a3c50, #1c1d26 70%); transition: opacity .38s ease, visibility .38s; }
.gate__box { text-align: center; padding: 1rem; }
.gate__box img { width: 84px; height: auto; margin: 0 auto 1rem; animation: float 1.6s ease-in-out infinite; }
.gate__word { font-size: .72rem; letter-spacing: .3em; text-transform: uppercase; color: var(--fog); }
.gate__dest { display: block; font-family: var(--display); font-size: clamp(2rem, 6vw, 3.4rem); color: var(--bone); margin: .2rem 0 .9rem; }
.gate__road { width: min(260px, 60vw); height: 2px; margin: 0 auto; background: rgba(174, 172, 190, .2); position: relative; overflow: hidden; }
.gate__road i { position: absolute; inset: 0; background: var(--glow); transform: scaleX(0); transform-origin: left; }
html.gate-leaving .gate__road i { transition: transform .4s linear; transform: scaleX(1); }
html:not(.js) .gate, html.gate-open .gate { opacity: 0; visibility: hidden; pointer-events: none; }
html.gate-leaving .gate { opacity: 1; visibility: visible; }

.toast { position: fixed; left: 50%; bottom: 1.5rem; z-index: 160; transform: translate(-50%, 20px); opacity: 0; background: var(--bone); color: var(--night); padding: .7rem 1.1rem; font-size: .9rem; transition: opacity .25s, transform .25s; clip-path: var(--cut); pointer-events: none; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- reveals ---------- */
/* never invisible, never dimmed: a reveal only lowers what waits below, it stays at full strength */
html.reveal-ready [data-reveal] { opacity: 1; transform: translateY(36px); transition: transform .8s var(--ease); }
html.reveal-ready [data-reveal].in { opacity: 1; transform: none; }
html.reveal-ready [data-reveal="left"] { transform: translateX(-30px); }
html.reveal-ready [data-reveal="left"].in { transform: none; }

/* first-screen entrance */
.enter { animation: enter 1s var(--ease) both; }
.enter.d1 { animation-delay: .15s; } .enter.d2 { animation-delay: .3s; } .enter.d3 { animation-delay: .45s; } .enter.d4 { animation-delay: .6s; }
@keyframes enter { from { opacity: 0; transform: translateY(22px); } }

/* scroll-driven: page progress thread (native) */
.progress { position: fixed; left: 0; top: 0; height: 2px; width: 100%; background: var(--glow); transform-origin: left; transform: scaleX(0); z-index: 70; }
@supports (animation-timeline: scroll()) {
  .progress { animation: grow linear both; animation-timeline: scroll(root); }
}
@keyframes grow { to { transform: scaleX(1); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  html.reveal-ready [data-reveal] { opacity: 1; transform: none; }
  .progress { display: none; }
}
