:root {
  --bg: #040704;
  --panel: #0b110a;
  --g: #9be04a;        /* bright line green */
  --g2: #6fbf2e;
  --g-dim: #2a441b;
  --g-deep: #16260f;
  --text: #f3f7ee;
  --muted: #84947d;
  --blue: #5bbcec;
  --amber: #b9603a;
  --glow: 0 0 12px rgba(155, 224, 74, .65);
  --font: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(111, 191, 46, .10), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:focus-visible { outline: 2px solid var(--g); outline-offset: 2px; }
h1, h2, p, ul { margin: 0; padding: 0; }

.app {
  max-width: 1180px;
  margin: 0 auto;
  padding: max(14px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 110px max(16px, env(safe-area-inset-left));
}

/* ── top bar ─────────────────────────────── */
.top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.brand-row { display: flex; align-items: center; gap: 10px; }
.tag {
  background: var(--g); color: #0a1405; font-weight: 900; font-size: 13px;
  padding: 2px 8px; border-radius: 4px; letter-spacing: .04em;
}
h1 { font-size: clamp(20px, 5.2vw, 30px); font-weight: 900; letter-spacing: .06em; line-height: 1.2; }
.sub { color: var(--g); font-size: 12px; letter-spacing: .06em; margin-top: 4px; opacity: .9; }
.pill {
  flex: none; border: 1.5px solid var(--g); color: var(--g); border-radius: 8px;
  padding: 7px 12px; font-weight: 700; font-size: 13px; letter-spacing: .06em; white-space: nowrap;
  box-shadow: inset 0 0 10px rgba(155, 224, 74, .15);
}
.pill[aria-pressed="false"] { border-color: #3c4a36; color: var(--muted); box-shadow: none; }

/* ── station sign ────────────────────────── */
.sign { display: flex; align-items: stretch; gap: clamp(10px, 2.4vw, 22px); margin-top: 14px; }
.badge {
  flex: none; width: clamp(74px, 17vw, 124px); background: #1b1f1a; border-radius: 14px;
  padding: 6px 8px 10px; display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.code { height: 1.3em; font-weight: 700; font-size: clamp(13px, 3vw, 20px); letter-spacing: .12em; }
.num {
  width: 100%; aspect-ratio: 1 / 1; background: #fff; color: #111; border: clamp(4px, 1vw, 7px) solid var(--g);
  border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1;
}
.num b { font-size: clamp(14px, 3.4vw, 24px); font-weight: 700; }
.num strong { font-size: clamp(24px, 6vw, 44px); font-weight: 900; margin-top: 2px; }
.bar { flex: none; width: clamp(14px, 3.4vw, 34px); background: var(--g); border-radius: 2px; box-shadow: var(--glow); }
.name { flex: 1; min-width: 0; container-type: inline-size; display: flex; flex-direction: column; justify-content: center; gap: clamp(4px, 1.6cqw, 12px); padding: 2px 0; }
.ja, .en { display: flex; justify-content: center; }
.ja { gap: .12em; }
.en { gap: .45em; }
.ja {
  --n: 2;
  font-weight: 900; line-height: 1.15;
  font-size: min(clamp(40px, 21cqw, 104px), calc(100cqw / (var(--n) * 1.14)));
}
.en { font-size: clamp(11px, 3cqw, 19px); font-weight: 700; color: #e4ecdc; flex-wrap: wrap; }
.en .gap { width: .4em; }
.glowline { height: 4px; margin-top: 10px; background: var(--g); border-radius: 2px; box-shadow: 0 0 16px 2px rgba(155, 224, 74, .7); }

/* ── audio row ───────────────────────────── */
.audio { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.audio button {
  display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 12px; text-align: left;
  border: 1.5px solid #3c5a2c; border-radius: 10px; background: #0e160b; min-width: 0;
}
.audio button i { font-style: normal; font-size: 20px; color: var(--g); flex: none; width: 24px; text-align: center; }
.audio button span { display: flex; flex-direction: column; min-width: 0; }
.audio button b { font-size: 14px; font-weight: 900; }
.audio button small { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.audio button { position: relative; overflow: hidden; isolation: isolate; }
/* playback progress: a soft fill behind the text plus a bright bar along the bottom */
.audio button::before, .audio button::after {
  content: ""; position: absolute; left: 0; width: 100%; z-index: -1; pointer-events: none;
  transform: scaleX(var(--p, 0)); transform-origin: left;
}
.audio button::before { top: 0; bottom: 0; background: linear-gradient(90deg, rgba(111, 191, 46, .22), rgba(155, 224, 74, .48)); }
.audio button::after { bottom: 0; height: 3px; background: var(--g); box-shadow: 0 0 8px rgba(155, 224, 74, .9); }
.audio button.playing { border-color: var(--g); background: #16260f; box-shadow: var(--glow); }
.audio button.playing small { color: var(--g); }

/* ── transfer panel ──────────────────────── */
.transfer { margin-top: 12px; background: var(--g-deep); border-radius: 0 0 10px 10px; }
.transfer-head { display: flex; align-items: center; gap: 12px; background: #1d3113; }
.label {
  flex: none; background: var(--g); color: #0a1405; font-weight: 900; letter-spacing: .15em; font-size: 15px;
  padding: 9px 26px 9px 16px; clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%);
}
.transfer-sub { font-size: 12px; color: #b9d79c; letter-spacing: .08em; }
/* phones: one row of lines; when they don't fit it slides right → left in an endless loop */
.lines { display: block; overflow: hidden; padding: 12px 0; min-height: 76px; }
.lines .track { display: flex; align-items: center; width: max-content; padding-left: 12px; }
.lines .dup { display: contents; }
.lines .line { flex: none; margin-right: 8px; background: rgba(0, 0, 0, .28); border: 1px solid #2c4520; border-radius: 10px; padding: 7px 12px 7px 8px; }
.lines.marquee { -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); }
.lines.marquee .track { padding-left: 0; animation: slide-left var(--dur, 20s) linear infinite; will-change: transform; }
.lines.marquee:active .track { animation-play-state: paused; }
@keyframes slide-left { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .lines { overflow-x: auto; scrollbar-width: none; }
}
.transfer-count { margin-left: auto; margin-right: 12px; font-size: 12px; font-weight: 700; color: var(--g); white-space: nowrap; }
.transfer-count:empty { display: none; }
.line { display: flex; align-items: center; gap: 9px; min-width: 0; }
.line .tx { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.line .tx b { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.line .tx b.long { font-size: 12.5px; letter-spacing: -.04em; }
.line .tx small { font-size: 10.5px; color: #a9bb9f; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lines .none { color: var(--muted); font-size: 14px; grid-column: 1 / -1; line-height: 50px; }
.ic {
  flex: none; width: 34px; height: 34px; display: grid; place-items: center; background: #fff; color: #111;
  font: 900 14px/1 "Helvetica Neue", Arial, sans-serif; letter-spacing: -.02em; border: 4px solid var(--c);
}
.ic.jr { border-radius: 7px; }
.ic.ring { border-radius: 50%; border-width: 5px; }
.ic.fill { border-radius: 7px; background: var(--c); color: #fff; border-color: var(--c); }
.ic.sk { border-radius: 7px; background: var(--c); border-color: var(--c); }
.ic.sk svg { width: 24px; height: 24px; fill: #fff; }

/* ── main layout ─────────────────────────── */
.main { display: grid; gap: 14px; margin-top: 14px; grid-template-columns: minmax(0, 1fr); grid-template-areas: "map" "stat" "segs" "list"; }
.mapwrap { grid-area: map; }
.stat { grid-area: stat; }
.segs { grid-area: segs; }
.listwrap { grid-area: list; }

.mapwrap { display: flex; justify-content: center; }
#map { width: 100%; height: auto; max-height: 820px; display: block; touch-action: manipulation; user-select: none; -webkit-user-select: none; }

/* map pieces */
.grid line { stroke: rgba(155, 224, 74, .07); stroke-width: 1; }
.palace { fill: #1c3314; }
.palace-t, .chuo-t { fill: #6f8a62; font-size: 13px; font-weight: 700; }
.chuo { fill: none; stroke: var(--amber); stroke-width: 2; stroke-dasharray: 5 5; opacity: .8; }
.chuo-t { fill: #a8826d; }
.track { fill: none; stroke: var(--g-dim); stroke-width: 7; stroke-linejoin: round; }
.seg { stroke: var(--g); stroke-width: 7; stroke-linecap: round; opacity: 0; transition: opacity .35s; filter: drop-shadow(0 0 5px rgba(155, 224, 74, .8)); }
.seg.v { opacity: 1; }
.dot { fill: #0a1007; stroke: #5d8c38; stroke-width: 2.5; transition: fill .25s, stroke .25s; }
.dot.v { fill: var(--g); stroke: #d8f7ae; }
.lb { fill: var(--muted); font-size: 17px; font-weight: 700; pointer-events: none; transition: fill .25s; }
.lb.v { fill: #cfe9b6; }
.lb.cur { fill: #fff; }
.hit { fill: transparent; cursor: pointer; }
.marker { pointer-events: none; transition: transform .55s cubic-bezier(.3, .8, .3, 1); }
.marker rect { fill: #eaffd0; stroke: var(--g); stroke-width: 3; filter: drop-shadow(0 0 8px rgba(155, 224, 74, 1)); }
.marker circle { fill: none; stroke: var(--g); stroke-width: 2; transform-origin: center; transform-box: fill-box; animation: pulse 1.8s ease-out infinite; }
@keyframes pulse { from { transform: scale(.6); opacity: .9; } to { transform: scale(2.4); opacity: 0; } }
.scale line { stroke: #5d8c38; stroke-width: 2; }
.scale text, .north text { fill: var(--muted); font-size: 12px; font-weight: 700; }
.north path { fill: #5d8c38; }

/* ── stat panel ──────────────────────────── */
.stat-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
h2 { font-size: 17px; font-weight: 900; color: var(--g); letter-spacing: .1em; }
h2 small { font-size: 10px; color: var(--muted); letter-spacing: .2em; margin-left: 6px; }
.stat-actions { display: flex; gap: 6px; }
.ghost { border: 1px solid #36502a; color: #cfe9b6; border-radius: 6px; padding: 6px 10px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.ghost:hover { border-color: var(--g); }
.ghost.on { background: var(--g); color: #0a1405; border-color: var(--g); }
.count { display: flex; align-items: baseline; gap: 10px; margin-top: 6px; }
.count span { font-size: clamp(64px, 16vw, 92px); font-weight: 900; line-height: 1; color: var(--g); text-shadow: 0 0 22px rgba(155, 224, 74, .55); font-variant-numeric: tabular-nums; }
.count em { font-style: normal; font-size: 26px; font-weight: 700; color: #dfe8d8; }
.meter { height: 10px; background: #1c2a16; border-radius: 6px; overflow: hidden; margin-top: 10px; }
.meter i { display: block; height: 100%; width: 0; border-radius: 6px; background: linear-gradient(90deg, var(--g2), #d7ee5a); transition: width .45s; }
.pct { margin-top: 8px; font-weight: 700; font-size: 15px; }
.segs { display: grid; grid-template-columns: repeat(30, 1fr); gap: 2px; margin-top: 12px; }
.segs i { height: 12px; background: #1c2a16; transition: background .25s; }
.segs i.v { background: var(--g); }
.segs i.cur { outline: 1.5px solid #fff; outline-offset: 1px; }

/* ── controls ────────────────────────────── */
.controls {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: grid; grid-template-columns: 1fr 1.5fr 1fr; gap: 8px;
  padding: 10px max(12px, env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  background: rgba(4, 7, 4, .86); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid #22331a;
}
.controls button {
  min-height: 52px; border-radius: 10px; border: 1.5px solid #3c5a2c; background: #0e160b;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  font-weight: 900; font-size: 15px; transition: transform .08s, background .2s;
}
.controls button small { font-size: 9px; letter-spacing: .18em; color: var(--muted); font-weight: 700; }
.controls button:active { transform: scale(.97); }
.controls .primary { background: var(--g); color: #0a1405; border-color: var(--g); box-shadow: var(--glow); }
.controls .primary small { color: #2c4a12; }
.controls .primary:not(.on) { background: #15220f; color: var(--g); box-shadow: none; }
.controls .primary:not(.on) small { color: var(--muted); }

/* ── station list ────────────────────────── */
.list { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 14px; margin-top: 8px; }
.list li { display: flex; align-items: center; gap: 4px; border-radius: 6px; }
.list li.cur { background: rgba(155, 224, 74, .12); }
.chk { flex: none; width: 40px; height: 40px; display: grid; place-items: center; }
.chk::before { content: ""; width: 16px; height: 16px; border: 2px solid #6b7d62; border-radius: 3px; transition: .2s; }
li.v .chk::before { border-color: var(--g); background: var(--g); box-shadow: inset 0 0 0 3px #0a1007, var(--glow); }
.st { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; text-align: left; min-height: 40px; padding-right: 6px; }
.st .nm { font-weight: 700; font-size: 15px; color: #aab8a2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st .no { font-size: 10px; color: #5f7056; letter-spacing: .08em; flex: none; }
li.v .nm { color: var(--text); }
li.cur .nm { color: var(--g); }

.foot { margin-top: 22px; color: #5f7056; font-size: 11px; line-height: 1.7; }

/* ── desktop ─────────────────────────────── */
@media (min-width: 900px) and (orientation: landscape) and (min-height: 540px) {
  #map { max-height: min(74vh, 760px); width: auto; max-width: 100%; }
  .controls { grid-area: ctl; position: static; padding: 0; background: none; border: 0; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .controls button:hover { border-color: var(--g); }
  .list li { cursor: default; }
  .chk, .st { min-height: 32px; height: 32px; }
  .chk { width: 32px; }
  .lines { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); align-content: start; gap: 12px 14px; padding: 18px; overflow: visible; }
  .lines .line { background: none; border: 0; padding: 0; margin: 0; }
  .lines .none { line-height: normal; }
  .transfer-count { display: none; }
  .ic { width: 40px; height: 40px; font-size: 16px; }
  .line .tx b, .line .tx b.long { font-size: 18px; letter-spacing: 0; }
  .line .tx small { font-size: 12px; }
  .audio { max-width: 560px; }
}

@media (prefers-reduced-motion: reduce) {
  .marker { transition: none; }
  .marker circle { animation: none; opacity: 0; }
}

.st .nm.long { font-size: 12px; letter-spacing: -.02em; }

/* ── desktop / landscape: the whole page fits one screen, no scrolling ──
   ┌──────────────── title ─────────────────┐
   │ map        │ station sign │ station    │
   │            │ audio        │ list       │
   │            │ transfer     │            │
   │            │ visited      │            │
   │            │ ◀  AUTO  ▶   │            │
   ├──────────── visited strip ─────────────┤
   └────────────────────────────────────────┘ */
@media (min-width: 900px) and (orientation: landscape) and (min-height: 540px) {
  html, body { height: 100%; overflow: hidden; }
  .app {
    max-width: 1880px; height: 100vh; height: 100dvh;
    padding: clamp(10px, 1.8vh, 22px) clamp(16px, 2vw, 36px);
    display: grid;
    grid-template-rows: auto auto auto auto auto minmax(0, 1fr) auto auto;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, .95fr);
    grid-template-areas:
      "top  top      top"
      "map  sign     list"
      "map  glow     list"
      "map  audio    list"
      "map  transfer list"
      "map  stat     list"
      "map  ctl      list"
      "segs segs     segs";
    gap: clamp(8px, 1.4vh, 16px) clamp(16px, 2vw, 32px);
  }
  .page { display: contents; }
  .foot { display: none; }

  /* title bar */
  .top { grid-area: top; align-items: center; }
  .brand { display: flex; align-items: baseline; gap: 16px; }
  h1 { font-size: clamp(18px, 2.6vh, 28px); }
  .sub { margin: 0; }
  .pill { padding: 5px 12px; }

  /* station sign scales with screen height */
  .sign { grid-area: sign; margin: 0; height: clamp(76px, 12vh, 140px); gap: clamp(8px, 1.2vw, 18px); }
  .badge { width: auto; aspect-ratio: .78; padding: .5vh .6vh 1vh; border-radius: 12px; }
  .code { font-size: clamp(11px, 1.8vh, 20px); }
  .num { border-width: clamp(3px, .6vh, 7px); }
  .num b { font-size: clamp(11px, 2vh, 22px); }
  .num strong { font-size: clamp(20px, 4.2vh, 44px); }
  .bar { width: clamp(12px, 2.2vh, 28px); }
  .ja { font-size: min(clamp(36px, 8.4vh, 96px), calc(100cqw / (var(--n) * 1.14))); line-height: 1.05; }
  .en { font-size: clamp(10px, 1.6vh, 18px); }
  .glowline { grid-area: glow; margin: 0; }

  /* map fills its column */
  .mapwrap { grid-area: map; min-height: 0; align-items: center; }
  #map { width: 100%; height: 100%; max-height: none; max-width: 100%; }

  /* middle column */
  .audio { grid-area: audio; margin: 0; max-width: none; }
  .audio button { min-height: clamp(44px, 6.4vh, 60px); }
  .transfer { grid-area: transfer; margin: 0; min-height: 0; overflow: auto; scrollbar-width: thin; }
  .lines { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(8px, 1.2vh, 14px) 12px; padding: clamp(10px, 1.6vh, 18px); }
  .ic { width: clamp(30px, 4.4vh, 40px); height: clamp(30px, 4.4vh, 40px); font-size: clamp(12px, 1.7vh, 16px); border-width: 3px; }
  .ic.ring { border-width: 4px; }
  .line .tx b, .line .tx b.long { font-size: clamp(14px, 2vh, 18px); }
  .line .tx small { font-size: clamp(10px, 1.3vh, 12px); }

  /* the visited counter takes whatever height is left, so it grows on big screens */
  .stat {
    grid-area: stat; min-height: 0; display: grid;
    grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr);
    grid-template-areas: "head head" "count prog";
    column-gap: clamp(14px, 1.6vw, 28px);
  }
  .stat-head { grid-area: head; }
  .count { grid-area: count; margin: 0; align-self: center; }
  .count span { font-size: clamp(34px, calc(16vh - 64px), 150px); }
  .count em { font-size: clamp(16px, 3vh, 32px); }
  .progress { grid-area: prog; align-self: center; }
  .meter { margin: 0; }
  .pct { margin: 0; font-size: clamp(12px, 1.9vh, 18px); padding-top: 8px; }
  .segs { margin: 0; gap: 3px; }
  .segs i { height: clamp(10px, 1.6vh, 16px); border-radius: 2px; }

  /* right column */
  .controls { grid-area: ctl; grid-template-columns: 1fr 1.5fr 1fr; gap: clamp(8px, 1vw, 14px); margin-bottom: clamp(6px, calc(5vh - 24px), 30px); }
  .controls button { min-height: clamp(48px, 9vh, 104px); border-radius: 14px; font-size: clamp(16px, 2.5vh, 26px); gap: 4px; }
  .controls button small { font-size: clamp(9px, 1.2vh, 13px); }
  .listwrap { grid-area: list; min-height: 0; display: flex; flex-direction: column; }
  .listwrap h2 { flex: none; }
  .list {
    flex: 1; min-height: 0; margin-top: 6px; overflow: auto; scrollbar-width: thin;
    grid-template-rows: repeat(15, minmax(22px, 1fr)); grid-auto-flow: column; gap: 0 12px;
  }
  .list li { min-height: 0; }
  .chk, .st { height: 100%; min-height: 0; max-height: 40px; }
  .st { align-items: center; }
  .chk { width: clamp(24px, 3.4vh, 34px); }
  .chk::before { width: clamp(11px, 1.6vh, 15px); height: clamp(11px, 1.6vh, 15px); }
  .st .nm { font-size: clamp(12px, 1.9vh, 16px); }
  .st .nm.long { font-size: clamp(10px, 1.5vh, 13px); }
}

/* ── phone (and anything that isn't the one-screen desktop): two snap pages ──
   page 1 = title, station sign, audio, transfer, map
   page 2 = visited counter, strip, station list
   The controls bar stays fixed at the bottom across both pages. */
@media not all and (min-width: 900px) and (orientation: landscape) and (min-height: 540px) {
  :root { --ctl: calc(74px + env(safe-area-inset-bottom)); }
  html { scroll-snap-type: y mandatory; }
  .app { padding: 0; }
  .main { display: contents; }
  .page {
    position: relative; display: flex; flex-direction: column; gap: 12px;
    scroll-snap-align: start; scroll-snap-stop: always;
    padding: max(14px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) calc(var(--ctl) + 14px) max(16px, env(safe-area-inset-left));
  }
  .page > * { margin: 0; }
  .p1 { height: 100vh; height: max(100dvh, 600px); }
  .p2 { height: 100vh; height: max(100dvh, 620px); }

  /* page 1: the map takes whatever height is left */
  .mapwrap { position: relative; flex: 1; min-height: 160px; }
  #map { position: absolute; inset: 0; width: 100%; height: 100%; max-height: none; }

  /* page 2: the station list fills the rest, top to bottom then the second column */
  .listwrap { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  .list {
    flex: 1; min-height: 0; margin-top: 6px; overflow: auto;
    grid-template-rows: repeat(15, minmax(21px, 1fr)); grid-auto-flow: column; gap: 0 12px;
  }
  .list li { min-height: 0; }
  .st { min-height: 0; height: 100%; max-height: 44px; }
  .chk { height: 100%; width: 34px; }
  .count { margin-top: 2px; }
  .count span { font-size: clamp(46px, calc(18vh - 60px), 92px); }
  .foot { font-size: 10px; text-align: center; }

  /* page transition: the page you land on rises into place, the one you leave sinks and fades */
  .page > * {
    transition: opacity .45s ease, transform .6s cubic-bezier(.2, .8, .2, 1);
    transition-delay: calc(var(--i, 0) * 45ms);
  }
  .page:not(.active) > * { opacity: 0; transition-delay: 0s; }
  .p1:not(.active) > * { transform: translateY(-36px) scale(.97); }
  .p2:not(.active) > * { transform: translateY(48px); }
}
@media not all and (min-width: 900px) and (orientation: landscape) and (min-height: 540px) and (prefers-reduced-motion: reduce) {
  .page > * { transition: opacity .2s; transform: none !important; }
}
