/* thejapanlogic.com · the roll sign: look A (Eki) from the reels, in daylight, on a phone first.
   Tokens and rules: ../../DESIGN.md. The reels' own: ../../../_kit/film/assets/jl/jl.css and marks.js. */

@font-face { font-family: "Inter"; src: url("/assets/fonts/inter-latin.woff2") format("woff2"); font-weight: 400 900; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; src: url("/assets/fonts/inter-latin-ext.woff2") format("woff2"); font-weight: 400 900; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "JL Mono"; src: url("/assets/fonts/ptmono-latin.woff2") format("woff2"); font-weight: 400; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "JL Mono"; src: url("/assets/fonts/ptmono-latin-ext.woff2") format("woff2"); font-weight: 400; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
/* the reels' chips, labels and tags are PT Mono Bold: a renamed Latin subset (fonts/LICENSES.md) */
@font-face { font-family: "JL Mono"; src: url("/assets/fonts/jlmono-bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --paper: #eceee8;
  --grid-major: rgba(96, 124, 100, .17);
  --grid-minor: rgba(96, 124, 100, .07);
  --sign: #fbfaf6;
  --cloth: #f5f4ee;
  --ink: #26272b;
  --ink-soft: #55585e;
  --line: #2f9e4f;
  --field: #23813f;          /* green as a surface: white body text on it passes AA (4.9:1) */
  --line-deep: #1f7a3a;      /* white type on green controls (5.4:1) */
  --line-dark: #175f2d;
  --housing: #191b1a;
  --amber: #ffb11a;
  --led-green: #7ee08b;
  --violet: #5b45a0;
  --red-ui: #d4352b;         /* the reels' tag red (#e23b30), a shade deeper so small white type on it passes AA (4.8:1) */
  --exit: #ffd21f;
  --error: #b42318;
  --hard: 6px 7px 0 -1px rgba(38, 39, 43, .14);
  --hard-green: 6px 7px 0 -1px rgba(10, 30, 15, .26);
  --soft: 0 16px 30px rgba(30, 32, 30, .10);
  --sans: "Inter", "Hiragino Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "JL Mono", "PT Mono", ui-monospace, Menlo, monospace;
  --jp: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Noto Sans CJK JP", "Yu Gothic", YuGothic, Meiryo, sans-serif;
  --out: cubic-bezier(.22, 1, .36, 1);
  --io: cubic-bezier(.65, 0, .35, 1);
  --gutter: 16px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--paper); }
body { margin: 0; min-height: 100dvh; color: var(--ink); font: 400 17px/1.5 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: clip; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input { font: inherit; }
[lang="ja"] { font-family: var(--jp); }
:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 10; background: var(--ink); color: var(--sign); padding: 10px 14px; border-radius: 8px; text-decoration: none; font-weight: 600; }
.skip:focus { top: 12px; }
.print-only { display: none; }

/* ---------- the grounds: graph paper (the reels' eki ground) and field green ---------- */
.g-paper, body {
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid-major) 1px, transparent 1px), linear-gradient(90deg, var(--grid-major) 1px, transparent 1px),
    linear-gradient(var(--grid-minor) 1px, transparent 1px), linear-gradient(90deg, var(--grid-minor) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  background-position: -1px -1px;
}
.g-field {
  color: #fff; background-color: var(--field);
  background-image:
    linear-gradient(rgba(255, 255, 255, .1) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .1) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  background-position: -1px -1px;
}
.kicker { margin: 0; font-family: var(--mono); font-weight: 700; font-size: 12.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--line-deep); }
.g-field .kicker { color: #fff; }

/* ---------- the station sign, hanging on two rods, the green line through it edge to edge ---------- */
.sign-wrap { position: relative; padding: 26px var(--gutter) 0; overflow-x: clip; }   /* the line's end rings run off the edges */
.sign-line {
  position: absolute; left: 0; right: 0; bottom: 10px; height: 20px; transform-origin: 0 50%;
  background: var(--line); border-top: 3px solid var(--ink); border-bottom: 3px solid var(--ink);
}
.sign-line i { position: absolute; top: 50%; width: 22px; height: 22px; margin-top: -11px; border-radius: 50%; background: #fff; border: 3.5px solid var(--ink); }
.sign-line i:nth-child(1) { left: -6px; }
.sign-line i:nth-child(2) { right: -6px; }
.sign-line i:nth-child(n+3) { display: none; }
.sign-hang { position: relative; z-index: 1; max-width: 520px; margin: 0 auto; transform-origin: 50% -30px; }
.rod { position: absolute; top: -30px; width: 4px; height: 34px; background: var(--ink); }
.rod::after { content: ""; position: absolute; left: -6px; bottom: -3px; width: 16px; height: 8px; background: var(--sign); border: 2px solid var(--ink); border-radius: 3px; }
.rod-l { left: 24%; }
.rod-r { right: 24%; }
.sign {
  position: relative; display: block; text-decoration: none; color: var(--ink);
  background: var(--sign); border: 3px solid var(--ink); border-radius: 12px; overflow: hidden; box-shadow: var(--hard), var(--soft);
}
.sign-face { display: flex; align-items: center; gap: 12px; padding: 8px 14px 7px 9px; }
.sign-badge { width: 48px; height: 48px; flex: none; }
.sign-names { flex: 1; display: grid; justify-items: center; min-width: 0; }
.sign-jp { font-weight: 800; font-size: clamp(20px, 6.9vw, 34px); line-height: 1.12; letter-spacing: .03em; white-space: nowrap; }
.sign-en { font-weight: 650; font-size: 12.5px; letter-spacing: .34em; margin-right: -.34em; margin-top: 1px; }
.sign-band {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 32px; padding: 0 9px;
  background: var(--line-deep); color: #fff; border-top: 3px solid var(--ink);
  font-family: var(--mono); font-weight: 700; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap;
}
.arr { flex: none; width: 0; height: 0; border-top: 7px solid transparent; border-bottom: 7px solid transparent; }
.arr-l { border-right: 11px solid #fff; }
.arr-r { border-left: 11px solid #fff; }
/* the homepage's nameplate: the sign's face without its band, on shorter rods (the 行先 sign below carries the headline) */
.sign-plate { padding-top: 14px; }
.sign-plate .rod { top: -16px; height: 20px; }
.sign-plate .sign-face { padding: 6px 14px 6px 8px; gap: 10px; }
.sign-plate .sign-badge { width: 42px; height: 42px; }
.sign-plate .sign-jp { font-size: clamp(19px, 6.2vw, 30px); }
.sign-plate .sign-en { font-size: 11px; }
@media (max-width: 359px) { .sign-band { font-size: 9.5px; letter-spacing: .04em; } .sign-badge { width: 44px; height: 44px; } }
@media (min-width: 480px) { .sign-band { font-size: 12px; letter-spacing: .14em; } }
@media (min-width: 760px) {
  .sign-line i:nth-child(n+3) { display: block; }
  .sign-line i:nth-child(3) { left: calc(50% - 260px - 70px); }
  .sign-line i:nth-child(4) { right: calc(50% - 260px - 70px); }
}

/* ---------- the hero: the 行先 roll sign is the headline. It whirs through destinations and lands on the h1 ---------- */
.hero { padding: 18px var(--gutter) 40px; }
.hero > * { max-width: 520px; margin-left: auto; margin-right: auto; }
.hsign { display: grid; gap: 5px; padding: 6px 6px 7px; background: var(--housing); border: 3px solid var(--ink); border-radius: 12px; box-shadow: var(--hard); }
.hsign-k { display: flex; align-items: baseline; gap: 8px; padding: 1px 6px 0; color: #a3a7a2; }
.hsign-k [lang="ja"] { font-weight: 800; font-size: 14px; letter-spacing: .1em; color: var(--amber); }
.hsign-k span:last-child { font-family: var(--mono); font-weight: 700; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; }
.hsign-win { position: relative; height: 124px; overflow: hidden; border-radius: 6px; border: 2px solid #000; }
.hsign-win::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(rgba(0, 0, 0, .3), transparent 16%, transparent 84%, rgba(0, 0, 0, .3)); }
.hsign-cloth { will-change: transform; }
.hc { height: 124px; display: grid; align-content: center; justify-items: center; gap: 7px; margin: 0; padding: 0 14px; text-align: center; }
.hc-jp { font-weight: 800; font-size: clamp(34px, 10.4vw, 52px); line-height: 1; letter-spacing: .06em; white-space: nowrap; }
.hc-en { font-weight: 850; font-size: clamp(17px, 4.9vw, 24px); line-height: 1.1; letter-spacing: -.015em; text-wrap: balance; }
html:not([data-motion]) .hc:not(.hc-last) { display: none; }
.lede { margin-top: 14px; margin-bottom: 0; font-size: 16px; line-height: 1.45; color: var(--ink-soft); text-wrap: pretty; }
.hero .signup { margin-top: 16px; }

/* the two cloths: duck cloth with its weave showing */
.c-green, .hc.hc-g {
  color: #fff; background-color: var(--field);
  background-image: repeating-linear-gradient(0deg, rgba(255, 255, 255, .05) 0 1px, transparent 1px 3px), repeating-linear-gradient(90deg, rgba(0, 0, 0, .05) 0 1px, transparent 1px 3px);
}
.c-white, .hc {
  color: var(--ink); background-color: var(--cloth);
  background-image: repeating-linear-gradient(0deg, rgba(38, 39, 43, .04) 0 1px, transparent 1px 3px), repeating-linear-gradient(90deg, rgba(38, 39, 43, .035) 0 1px, transparent 1px 3px);
}

/* ---------- the stamp-rally card: the sign-up ---------- */
.signup {
  position: relative; max-width: 460px; color: var(--ink); text-align: left;
  background: var(--sign); border: 3px solid var(--ink); border-radius: 16px; box-shadow: var(--hard), var(--soft);
}
.g-field .signup { --notch: var(--field); box-shadow: var(--hard-green), 0 18px 34px rgba(8, 40, 16, .2); }
.signup-head { display: flex; align-items: center; min-height: 58px; padding: 10px 86px 10px 16px; border-bottom: 2px dashed rgba(38, 39, 43, .32); }
.signup-head .rally { display: grid; gap: 4px; }
.rally-jp { font-weight: 800; font-size: 13px; letter-spacing: .12em; color: var(--violet); }
.rally-en { font-family: var(--mono); font-weight: 700; font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); }
/* the perforation's two notches, cut in the ground's own colour */
.signup-head::before, .signup-head::after { content: ""; position: absolute; top: 58px; width: 18px; height: 18px; margin-top: -8px; border-radius: 50%; background: var(--notch, var(--paper)); border: 3px solid var(--ink); }
.signup-head::before { left: -11px; clip-path: inset(0 0 0 50%); }
.signup-head::after { right: -11px; clip-path: inset(0 50% 0 0); }
.fields, .done { padding: 14px 16px 16px; }
.signup label[for] { display: block; margin: 0 0 7px; font-weight: 650; font-size: 15px; }
.signup input[type="email"] {
  display: block; width: 100%; height: 54px; padding: 0 14px; font: 500 17px/1 var(--sans); color: var(--ink);
  background: #fff; border: 2px solid var(--ink); border-radius: 10px; appearance: none;
}
.signup input[type="email"]::placeholder { color: #6b6e73; opacity: 1; }
.signup input[aria-invalid="true"] { border-color: var(--error); box-shadow: 0 0 0 3px rgba(180, 35, 24, .16); }
.signup input:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; }
.signup button {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; height: 58px; margin-top: 12px;
  font: 780 17.5px/1 var(--sans); letter-spacing: -.01em; color: #fff; background: var(--line-deep);
  border: 2.5px solid var(--ink); border-radius: 11px; box-shadow: 0 5px 0 var(--ink); cursor: pointer;
  transition: transform .12s ease-out, box-shadow .12s ease-out, background-color .15s; -webkit-tap-highlight-color: transparent;
}
.signup button::after { content: ""; width: 0; height: 0; border-top: 7px solid transparent; border-bottom: 7px solid transparent; border-left: 11px solid #fff; }
.signup button:hover { background: var(--line-dark); }
.signup button:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.signup button:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; }
.signup button[aria-busy="true"] { cursor: progress; }
.signup button[aria-busy="true"] .btn-label::after { content: ""; display: inline-block; width: 1.4em; text-align: left; animation: dots 1s steps(4, end) infinite; }
@keyframes dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }
.signup .help { margin: 11px 0 0; font-size: 14px; line-height: 1.45; color: var(--ink-soft); }
.signup .err { margin: 8px 0 0; font-size: 14.5px; font-weight: 600; color: var(--error); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.done:focus { outline: none; }
.done-title { margin: 2px 0 8px; font-weight: 850; font-size: 26px; line-height: 1.05; letter-spacing: -.03em; }
.done p { margin: 0; }
.done p + p { margin-top: 8px; }
.stamp-spot { position: absolute; right: 13px; top: 8px; width: 68px; height: 68px; pointer-events: none; }
.stamp-ring {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 3px; border-radius: 50%;
  border: 2px dashed rgba(91, 69, 160, .55); color: rgba(91, 69, 160, .9);
}
.stamp-ring [lang="ja"] { font-weight: 700; font-size: 11px; letter-spacing: .08em; line-height: 1; }
.stamp-ring span:last-child { font-family: var(--mono); font-weight: 700; font-size: 9px; letter-spacing: .16em; text-transform: uppercase; line-height: 1; }
.stamp { position: absolute; left: -14px; top: -14px; width: 96px; height: 96px; max-width: none; color: var(--violet); opacity: 0; transform: rotate(-9deg); }
.stamp .stamp-type { font-family: var(--mono); font-weight: 700; }
.stamp .stamp-cut { fill: var(--sign); }
/* on the forms the ring sits in the slim ticket head */
form.signup .stamp-spot { right: 14px; top: 3px; width: 54px; height: 54px; }
form.signup .stamp-ring [lang="ja"] { font-size: 10px; }
form.signup .stamp-ring span:last-child { font-size: 8.5px; }
form.signup .stamp { left: -21px; top: -21px; }
.signup.is-stamped .stamp { opacity: .93; }
.signup.is-stamped .stamp-ring > * { visibility: hidden; }

/* ---------- the roll sign: a sticky window of one screen; the scroll picks the course, roll.js rolls the cloth ---------- */
.roll { position: relative; }
.housing { position: relative; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; padding: 0 6px; background: var(--housing); }
.roller {
  display: block; height: 16px; margin: 0 -6px; border-top: 3px solid var(--ink); border-bottom: 3px solid var(--ink);
  background: linear-gradient(#0d0e0d, #545a56 45%, #2b2f2d 70%, #0d0e0d);
}
.win { position: relative; overflow: hidden; overflow: clip; border-left: 3px solid #000; border-right: 3px solid #000; }   /* clip: a link or Find can't scroll the window from inside */
.cloth { margin: 0; padding: 0; list-style: none; }
.course {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  padding: 30px 14px 34px; text-align: center; border-top: 2px dashed rgba(0, 0, 0, .2);
}
.course:first-child { border-top: 0; }
/* one stop per swipe (roll.js places the snap points): mandatory snapping, and scroll-snap-stop on every course */
html.is-snap { scroll-snap-type: y mandatory; }
html.is-snap:has(input:focus) { scroll-snap-type: none; }   /* typing: let the keyboard scroll the field into view */
.snap { position: absolute; left: 0; top: 0; width: 1px; pointer-events: none; scroll-snap-align: start; }
.snap-stop { height: 1px; scroll-snap-stop: always; }
.snap-tail { scroll-snap-stop: always; }
/* the pinned sign needs a screen at least 501px tall; on a shorter one (a phone on its side) the courses stack, finished */
@media (min-height: 501px) {
  html[data-motion] .roll { height: calc(7 * 66vh + 100vh); height: calc(7 * 66svh + 100lvh); }
  html[data-motion] .stage { position: sticky; top: 0; height: 100vh; height: 100lvh; }
  html[data-motion] .housing { height: 100%; }
  html[data-motion] .cloth { will-change: transform; }
  html[data-motion] .course { height: var(--h, 100svh); padding-top: 14px; padding-bottom: 16px; gap: 12px; }
  html[data-motion] .win::after {
    content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
    background: linear-gradient(rgba(0, 0, 0, .3), transparent 7%, transparent 93%, rgba(0, 0, 0, .3));
  }
  /* a stop always shows its case, move and source; on a short screen the drawing is what gives way */
  html[data-motion] .course > * { flex: none; }
  html[data-motion] .course > .c-card { flex: 0 1 auto; min-height: 0; display: flex; flex-direction: column; }
  html[data-motion] .c-card > * { flex: none; }
  html[data-motion] .c-card > .scene { flex: 0 1 auto; min-height: 88px; max-height: 250px; }
}
.c-head { display: grid; justify-items: center; gap: 8px; }
.c-no {
  margin: 0; padding: 5px 10px 4px; font-family: var(--mono); font-weight: 700; font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase;
  color: #c9ccc7; background: var(--housing); border-radius: 6px;
}
.c-no b { color: var(--amber); margin-right: 4px; }
.c-legend { display: grid; justify-items: center; gap: 2px; margin: 0; }
.c-jp { font-weight: 800; font-size: clamp(44px, 13vw, 72px); line-height: 1.02; letter-spacing: .04em; white-space: nowrap; }
.c-en { font-weight: 850; font-size: clamp(22px, 6.2vw, 30px); line-height: 1.08; letter-spacing: -.02em; }
.c-card {
  display: grid; gap: 8px; width: min(100%, 440px); padding: 12px 14px 14px; text-align: left; color: var(--ink);
  background: var(--sign); border: 3px solid var(--ink); border-radius: 14px; box-shadow: var(--hard-green);
}
.c-white .c-card { box-shadow: var(--hard), var(--soft); }
.scene { width: 100%; height: auto; overflow: visible; }
.c-case { margin: 2px 0 0; font-weight: 700; font-size: 16px; line-height: 1.36; letter-spacing: -.008em; text-wrap: pretty; }
.c-move { margin: 0; font-size: 15px; line-height: 1.42; color: var(--ink-soft); text-wrap: pretty; }
.move-k {
  display: inline-block; margin-right: 5px; padding: 2px 7px 1px; vertical-align: 1px; font-family: var(--mono); font-weight: 700; font-size: 11px;
  letter-spacing: .14em; text-transform: uppercase; color: var(--ink); background: var(--exit); border: 2px solid var(--ink); border-radius: 6px;
}
.c-src { margin: 2px 0 0; padding-top: 8px; border-top: 2px solid rgba(38, 39, 43, .12); font-family: var(--mono); font-size: 11px; line-height: 1.45; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-soft); }
.c-src b { font-weight: 700; color: var(--line-deep); white-space: nowrap; }
.c-hint { display: flex; align-items: center; gap: 10px; margin: 4px 0 0; font-family: var(--mono); font-weight: 700; font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); }
.c-hint-arrow { width: 10px; height: 10px; border-right: 3px solid currentColor; border-bottom: 3px solid currentColor; transform: translateY(-3px) rotate(45deg); }
html:not([data-motion]) .c-hint { display: none; }
@media (max-height: 500px) { .c-hint { display: none; } }
.c-sub { max-width: 30ch; margin: 0; font-size: 17px; line-height: 1.45; color: var(--ink-soft); }
@media (min-height: 501px) and (max-height: 690px) {
  html[data-motion] .c-jp { font-size: 42px; }
  html[data-motion] .c-en { font-size: 21px; }
  html[data-motion] .course { gap: 9px; }
}

/* the first course: the seven stops on the line */
.route { position: relative; display: grid; gap: 0; width: min(100%, 400px); margin: 0; padding: 4px 0 4px; list-style: none; text-align: left; }
.route::before { content: ""; position: absolute; left: 10px; top: 16px; bottom: 16px; width: 10px; background: var(--line); border-left: 2.5px solid var(--ink); border-right: 2.5px solid var(--ink); transform-origin: 50% 0; }
.route li { position: relative; display: grid; grid-template-columns: 30px 30px minmax(0, 1fr) auto; align-items: center; gap: 6px; min-height: 34px; }
.route li::before { content: ""; width: 20px; height: 20px; margin-left: 5px; border-radius: 50%; background: #fff; border: 3px solid var(--ink); }
.r-no { font-family: var(--mono); font-weight: 700; font-size: 13px; letter-spacing: .04em; color: var(--line-deep); }
.r-name { font-weight: 750; font-size: 17px; letter-spacing: -.01em; }
.r-when { font-family: var(--mono); font-weight: 700; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }

/* the scenes' type: the site's own faces inside the drawings */
.t-num { font-family: var(--sans); font-weight: 900; }
.t-mono { font-family: var(--mono); font-weight: 700; }
.t-jp { font-family: var(--jp); font-weight: 800; }

/* ---------- the terminal: the sign-up again, on green ---------- */
.last { padding: 48px var(--gutter) 64px; }
.last > * { max-width: 520px; margin-left: auto; margin-right: auto; }
.last h2 { margin-top: 10px; margin-bottom: 0; font-weight: 900; font-size: clamp(36px, 10vw, 58px); line-height: .96; letter-spacing: -.04em; }
.last-lede { margin-top: 12px; margin-bottom: 0; font-size: 17px; line-height: 1.45; }
.last .signup { margin-top: 24px; }

/* ---------- the cases: a station plate per posted reel, then the exits ---------- */
.exits { max-width: 560px; margin: 0 auto; padding: 56px var(--gutter) 0; }
.exits h2 { margin: 0; font-weight: 900; font-size: clamp(32px, 9vw, 46px); line-height: 1; letter-spacing: -.035em; }
.exits-lede { margin: 10px 0 0; color: var(--ink-soft); }
.plate {
  position: relative; display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: stretch; gap: 14px; margin: 20px 0 0; padding: 10px 14px 22px 10px;
  color: var(--ink); text-decoration: none; background: var(--sign); border: 3px solid var(--ink); border-radius: 14px; overflow: hidden; box-shadow: var(--hard), var(--soft);
  transition: transform .12s ease-out, box-shadow .12s ease-out;
}
.plate::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 12px; background: var(--line); border-top: 3px solid var(--ink); }
.plate:active { transform: translate(2px, 3px); box-shadow: 2px 2px 0 -1px rgba(38, 39, 43, .14); }
.plate-cover { width: 96px; height: auto; aspect-ratio: 9 / 16; object-fit: cover; border: 2.5px solid var(--ink); border-radius: 8px; background: var(--paper); }
.plate-face { display: grid; align-content: start; gap: 6px; min-width: 0; padding-top: 2px; }
.plate-badge {
  display: grid; justify-items: center; align-content: center; width: 50px; height: 50px; border: 4px solid var(--line); border-radius: 9px; background: #fff;
  font-family: var(--jp); font-weight: 800; line-height: 1;
}
.plate-badge span:first-child { font-size: 11px; letter-spacing: .06em; }
.plate-badge span:last-child { font-size: 21px; margin-top: 2px; }
.plate-names { display: grid; gap: 2px; }
.plate-jp { font-weight: 800; font-size: 21px; line-height: 1.15; letter-spacing: .03em; }
.plate-en { font-family: var(--mono); font-weight: 700; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
.plate-line { font-weight: 750; font-size: 16px; line-height: 1.3; }
.plate-go { margin-top: 2px; font-family: var(--mono); font-weight: 700; font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--line-deep); }
.exit-list { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 14px; }
.exit {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 10px 16px 10px 10px;
  color: var(--ink); text-decoration: none; background: var(--exit); border: 3px solid var(--ink); border-radius: 11px; box-shadow: var(--hard);
  transition: transform .12s ease-out, box-shadow .12s ease-out;
}
.exit:active { transform: translate(2px, 3px); box-shadow: 2px 2px 0 -1px rgba(38, 39, 43, .14); }
.exit-mark { display: grid; justify-items: center; padding: 6px 9px 5px; background: var(--ink); color: var(--exit); border-radius: 6px; }
.exit-mark [lang="ja"] { font-weight: 800; font-size: 16px; line-height: 1.1; letter-spacing: .06em; }
.exit-mark span:last-child { margin-top: 2px; font-family: var(--mono); font-weight: 700; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.exit-name { display: block; font-weight: 800; font-size: 21px; line-height: 1.1; letter-spacing: -.02em; }
.exit-handle { display: block; font-family: var(--mono); font-size: 13px; letter-spacing: .04em; }
.exit-arrow { font-weight: 800; font-size: 26px; line-height: 1; }

/* ---------- the footer ---------- */
.foot { position: relative; max-width: 560px; margin: 0 auto; padding: 72px var(--gutter) calc(40px + env(safe-area-inset-bottom)); font-size: 14px; color: var(--ink-soft); }
.foot-line { position: absolute; left: var(--gutter); right: var(--gutter); top: 36px; height: 12px; background: var(--line); border-top: 2.5px solid var(--ink); border-bottom: 2.5px solid var(--ink); border-radius: 6px; }
.foot-line i { position: absolute; top: 50%; width: 18px; height: 18px; margin-top: -9px; border-radius: 50%; background: #fff; border: 3px solid var(--ink); }
.foot-line i:nth-child(1) { left: 0; }
.foot-line i:nth-child(2) { left: calc(50% - 9px); }
.foot-line i:nth-child(3) { right: 0; }
.foot p { margin: 0 0 6px; }
.foot-sign { font-weight: 750; color: var(--ink); }
.foot-sign [lang="ja"] { margin-right: 6px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px; }
.foot a { text-underline-offset: 3px; }

/* ---------- inner pages: thanks, privacy, 404 ---------- */
.page { max-width: 680px; margin: 0 auto; padding: 44px var(--gutter) 0; }
.page > h1 { margin: 0; font-weight: 900; font-size: clamp(34px, 9.4vw, 54px); line-height: 1; letter-spacing: -.04em; text-wrap: balance; }
.page > .kicker + h1 { margin-top: 10px; }
.page .lede { margin-top: 12px; }
.page-card { margin-top: 26px; padding: 18px 16px 18px; }
.page-card .done-title { margin-right: 84px; }
.page-card .done-title + p { margin-right: 64px; }
.page-card p { margin: 10px 0 0; }
.page-h2 { margin: 44px 0 0; font-weight: 850; font-size: 24px; letter-spacing: -.02em; }
.page-list { margin: 12px 0 0; padding-left: 1.2em; }
.page-list li + li { margin-top: 8px; }
.page-back { margin: 36px 0 0; font-weight: 650; }
.page-back a { text-underline-offset: 4px; }
.prose h2 { margin: 36px 0 0; font-weight: 850; font-size: 22px; letter-spacing: -.02em; }
.prose p, .prose ul { margin: 10px 0 0; max-width: 64ch; }
.prose ul { padding-left: 1.2em; }
.prose li + li { margin-top: 6px; }
.prose a { text-underline-offset: 3px; }
.prose-date { font-family: var(--mono); font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }

/* ---------- the checklist page ---------- */
.cl { max-width: 760px; margin: 0 auto; padding: 40px var(--gutter) 0; }
.cl-head h1 { margin: 0; font-weight: 900; font-size: clamp(36px, 10vw, 60px); line-height: .96; letter-spacing: -.04em; text-wrap: balance; }
.cl-edition { display: inline-block; margin: 14px 0 0; padding: 5px 10px 4px; font-family: var(--mono); font-weight: 700; font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: #c9ccc7; background: var(--housing); border-radius: 6px; }
.cl-intro { margin: 14px 0 0; max-width: 52ch; color: var(--ink-soft); }
.cl-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0 0; }
.btn, .btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 18px; border-radius: 11px;
  font: 750 16px/1 var(--sans); text-decoration: none; cursor: pointer; border: 2.5px solid var(--ink);
  transition: transform .12s ease-out, box-shadow .12s ease-out, background-color .15s;
}
.btn { color: #fff; background: var(--line-deep); box-shadow: 0 5px 0 var(--ink); }
.btn:hover { background: var(--line-dark); }
.btn-ghost { color: var(--ink); background: var(--sign); box-shadow: 0 5px 0 var(--ink); }
.btn:active, .btn-ghost:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.cl-count { margin: 18px 0 0; font-family: var(--mono); font-weight: 700; font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--line-deep); }
.cl-line { position: relative; list-style: none; margin: 26px 0 0; padding: 0 0 0 40px; }
.cl-line::before {
  content: ""; position: absolute; left: 12px; top: 8px; bottom: 24px; width: 12px;
  background: var(--line); border-left: 2.5px solid var(--ink); border-right: 2.5px solid var(--ink);
}
.cl-stop { position: relative; padding: 0 0 34px; }
.cl-stop::before { content: ""; position: absolute; left: -38px; top: 1px; width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 3.5px solid var(--ink); }
.when { margin: 0 0 3px; font-family: var(--mono); font-weight: 700; font-size: 12.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--line-deep); }
.cl-stop h2 { margin: 0 0 6px; font-weight: 850; font-size: 25px; line-height: 1.15; letter-spacing: -.025em; }
.cl-stop h2 [lang="ja"] { margin-left: 6px; font-weight: 700; font-size: 14px; letter-spacing: .05em; color: var(--ink-soft); white-space: nowrap; }
.cl-items { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 10px; }
.cl-item {
  display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; align-items: start; cursor: pointer;
  padding: 12px 14px 12px 12px; background: var(--sign); color: var(--ink); border: 2.5px solid var(--ink); border-radius: 12px; box-shadow: var(--hard);
}
.cl-item input {
  appearance: none; margin: 1px 0 0; width: 26px; height: 26px; border: 2.5px solid var(--ink); border-radius: 7px; background: #fff;
  display: grid; place-items: center; cursor: pointer;
}
.cl-item input::after { content: ""; width: 12px; height: 7px; border-left: 3px solid #fff; border-bottom: 3px solid #fff; transform: translateY(-2px) rotate(-45deg) scale(0); transition: transform .16s var(--out); }
.cl-item input:checked { background: var(--line-deep); }
.cl-item input:checked::after { transform: translateY(-2px) rotate(-45deg) scale(1); }
.cl-item input:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; }
.cl-item:has(input:checked) { background: #eef3ea; }
.cl-item:has(input:checked) .cl-do { text-decoration: line-through; text-decoration-thickness: 2px; text-decoration-color: rgba(38, 39, 43, .45); }
.cl-do { display: block; font-weight: 750; font-size: 17px; line-height: 1.35; }
.cl-why { display: block; margin-top: 4px; font-size: 15.5px; line-height: 1.45; color: var(--ink-soft); }
.cl-src { display: block; margin-top: 8px; font-family: var(--mono); font-size: 11px; line-height: 1.45; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.cl-phrases { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 10px; }
.cl-phrase { display: grid; align-content: start; padding: 12px 14px; background: var(--sign); color: var(--ink); border: 2.5px solid var(--ink); border-radius: 12px; box-shadow: var(--hard); }
.cl-phrase .ro { font-weight: 750; font-size: 16.5px; }
.cl-phrase .jp { font-weight: 800; font-size: 18px; margin-top: 2px; }
.cl-phrase .en { font-size: 15px; color: var(--ink-soft); margin-top: 2px; }
.cl-src-block { margin-top: 10px; }
.cl-notes { margin: 8px 0 0; padding: 18px 0 0; border-top: 3px solid var(--line); font-size: 14.5px; color: var(--ink-soft); }
.cl-notes h2 { margin: 0 0 8px; font-weight: 850; font-size: 20px; color: var(--ink); }
.cl-notes p { margin: 0 0 8px; max-width: 64ch; }
.link-btn { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* ---------- wider screens ---------- */
@media (min-width: 600px) {
  :root { --gutter: 28px; }
  .exit-list { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
  .hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); grid-template-rows: auto 1fr; column-gap: 56px; align-items: start; max-width: 1120px; margin: 0 auto; padding-top: 34px; }
  .hero > * { max-width: none; margin-left: 0; margin-right: 0; }
  .hsign, .hero .lede { grid-column: 1; }
  .hsign { max-width: 560px; }
  .hero .signup { grid-column: 2; grid-row: 1 / span 2; margin-top: 0; align-self: center; }
  html[data-motion] .course { flex-direction: row; gap: 56px; }
  .course .c-head { flex: 0 1 420px; }
  .course .c-card, .course .route { flex: 0 1 440px; }
  .exits { max-width: 760px; }
  .exits .plate { max-width: 560px; }
}

/* ---------- motion: the line draws, the stamp lands; the roll signs' moves live in roll.js ---------- */
@media (prefers-reduced-motion: no-preference) {
  html[data-motion] .sign-line { animation: line-draw .9s var(--io) .05s both; }
  html[data-motion] .sign-line i { animation: ring-pop .42s cubic-bezier(.3, 1.6, .5, 1) both; }
  html[data-motion] .sign-line i:nth-child(1) { animation-delay: .5s; }
  html[data-motion] .sign-line i:nth-child(2) { animation-delay: .85s; }
  html[data-motion] .c-hint-arrow { animation: hint 1.4s var(--io) infinite; }
  /* the first course: the line draws down and the stops pop on it, once the sign is in view */
  html[data-motion] .c-intro:not(.is-on) .route::before { transform: scaleY(0); }
  html[data-motion] .c-intro:not(.is-on) .route li { opacity: 0; transform: translateX(-14px); }
  html[data-motion] .c-intro.is-on .route::before { transition: transform .9s var(--io); }
  html[data-motion] .c-intro.is-on .route li { transition: opacity .3s linear, transform .5s var(--out); }
  html[data-motion] .c-intro.is-on .route li:nth-child(2) { transition-delay: .1s; }
  html[data-motion] .c-intro.is-on .route li:nth-child(3) { transition-delay: .2s; }
  html[data-motion] .c-intro.is-on .route li:nth-child(4) { transition-delay: .3s; }
  html[data-motion] .c-intro.is-on .route li:nth-child(5) { transition-delay: .4s; }
  html[data-motion] .c-intro.is-on .route li:nth-child(6) { transition-delay: .5s; }
  html[data-motion] .c-intro.is-on .route li:nth-child(7) { transition-delay: .6s; }
  .clunk { animation: clunk .36s linear; }
  .signup.is-stamped .stamp { animation: stamp-slam .2s var(--out) both; }
  .signup.is-stamped { animation: card-shake .5s linear .12s; }
  .done:not([hidden]) { animation: rise .45s var(--out) .1s both; }
}
@keyframes line-draw { from { transform: scaleX(0); } to { transform: none; } }
@keyframes ring-pop { from { transform: scale(0); } to { transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes hint { 0%, 100% { translate: 0 0; } 50% { translate: 0 5px; } }
@keyframes clunk { 0% { translate: 0 0; } 20% { translate: 0 3px; } 45% { translate: 0 -1.5px; } 70% { translate: 0 .6px; } 100% { translate: 0 0; } }
@keyframes stamp-slam { from { opacity: 0; transform: rotate(-9deg) scale(1.9); } to { opacity: .93; transform: rotate(-9deg) scale(1); } }
@keyframes card-shake { 0% { translate: 0 0; } 15% { translate: 0 5px; } 32% { translate: 0 -3px; } 50% { translate: 0 1.6px; } 70% { translate: 0 -.6px; } 100% { translate: 0 0; } }

/* ---------- print: the checklist PDF, two Letter pages ---------- */
@media print {
  @page { size: letter; margin: 9mm 10mm 10mm; }
  html, body { background: #fff !important; color: #26272b; font-size: 10pt; }
  body { background-image: none !important; }
  .rod, .sign-line, .cl-actions, .cl-count, .skip, .foot, .print-hide { display: none !important; }
  .print-only { display: block; }
  a { color: inherit; text-decoration: none; }

  .sign-wrap { padding: 0; }
  .sign-hang { max-width: none; animation: none !important; }
  .sign { box-shadow: none; border-width: 2px; border-radius: 8px; }
  .sign-face { padding: 4px 8px; gap: 8px; }
  .sign-badge { width: 32px; height: 32px; }
  .sign-jp { font-size: 18px; }
  .sign-en { font-size: 7.5pt; }
  .sign-band { height: auto; padding: 3px 8px; font-size: 7pt; border-top-width: 2px; }
  .arr { border-top-width: 5px; border-bottom-width: 5px; }
  .arr-l { border-right-width: 8px; }
  .arr-r { border-left-width: 8px; }

  .cl { max-width: none; padding: 6px 0 0; }
  .cl-head { break-after: avoid; }
  .cl-head h1 { font-size: 21pt; }
  .cl-edition { margin-top: 4px; padding: 2px 6px; font-size: 7pt; color: #26272b; background: none; border: 1px solid #26272b; }
  .cl-intro { font-size: 8.5pt; margin-top: 4px; max-width: none; }
  .cl-line { margin-top: 6px; padding: 0; columns: 2; column-gap: 14px; column-fill: balance; }
  .cl-line::before, .cl-stop::before { display: none; }
  .cl-stop { padding: 0 0 6px; break-inside: auto; }
  .cl-stop:last-child { break-before: column; }
  /* the ring rides with its label, so a page or column break can't clip or split it */
  .when { display: flex; align-items: center; gap: 5px; margin: 0; font-size: 7pt; break-after: avoid; }
  .when::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 3px solid var(--line); box-shadow: inset 0 0 0 1.5px var(--ink); }
  .cl-stop h2 { font-size: 11.5pt; margin-bottom: 2px; break-after: avoid; }
  .cl-stop h2 [lang="ja"] { font-size: 8.5pt; }
  .cl-items { gap: 3px; margin-top: 3px; }
  .cl-item { grid-template-columns: 12px minmax(0, 1fr); gap: 6px; padding: 4px 6px; border-width: 1.25px; border-radius: 6px; box-shadow: none; break-inside: avoid; }
  .cl-item input { width: 11px; height: 11px; border-width: 1.5px; border-radius: 3px; margin-top: 1px; background: #fff; }
  .cl-item input::after { display: none; }
  .cl-item:has(input:checked) { background: #fff; }
  .cl-item:has(input:checked) .cl-do { text-decoration: none; }
  .cl-do { font-size: 9pt; line-height: 1.25; }
  .cl-why { font-size: 8.3pt; line-height: 1.3; margin-top: 1px; }
  .cl-src { font-size: 6.4pt; line-height: 1.35; margin-top: 2px; letter-spacing: .04em; }
  .cl-phrases { grid-template-columns: 1fr 1fr; gap: 3px; }
  .cl-phrase { padding: 3px 6px; border-width: 1.25px; border-radius: 6px; box-shadow: none; break-inside: avoid; }
  .cl-phrase .ro { font-size: 8.4pt; }
  .cl-phrase .jp { font-size: 8.4pt; font-weight: 700; white-space: nowrap; margin-top: 0; }
  .cl-phrase .en { font-size: 7.6pt; margin-top: 0; }
  .cl-src-block { color: #4a4d52; margin-top: 3px; }
  .cl-notes-print { margin-top: 6px; padding-top: 5px; border-top: 1px solid var(--line); font-size: 6.8pt; line-height: 1.4; color: #4a4d52; break-inside: avoid; }
  .cl-notes-print p { margin: 0 0 2px; }
}
