/* Seichi — site styles
   Layout: Kotaku-style black masthead over a white news grid; every spot opens
   with a Japanese station-name sign, facts sit on a train-ticket card.
   Station signs, tickets and maps stay "physical" (light) in both themes. */

:root {
  --paper: #ffffff;
  --paper-2: #f3f2ef;
  --ink: #000000;
  --text: #141414;
  --text-2: #3f3f3f;
  --muted: #6a6a6a;
  --rule: #e2e1dd;
  --shu: #e8371c;
  --shu-text: #c32c12;
  --on-ink: #ffffff;
  --on-ink-2: #b4b4b4;
  --ink-rule: #262626;
  --sign-bg: #ffffff;
  --sign-fg: #111111;
  --sign-sub: #555555;
  --ticket-bg: #e4efe6;
  --ticket-fg: #18231b;
  --ticket-sub: #4f6155;
  --caution: #8a5a00;
  --caution-bg: #fff1cf;
  --map-sea: #e9eef2;
  --shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 0 0 1px rgba(0, 0, 0, .07);
  --font-head: "Archivo", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --font-ui: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --font-jp: "BIZ UDPGothic", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", sans-serif;
  --gutter: 16px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #131313;
    --paper-2: #1d1d1c;
    --text: #ededeb;
    --text-2: #c9c8c4;
    --muted: #9b9a95;
    --rule: #2d2c2a;
    --shu: #ff5435;
    --shu-text: #ff7a5e;
    --shadow: 0 0 0 1px rgba(255, 255, 255, .06);
    --caution: #ffcf70;
    --caution-bg: #3a2c0c;
    --map-sea: #1d2329;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #131313;
  --paper-2: #1d1d1c;
  --text: #ededeb;
  --text-2: #c9c8c4;
  --muted: #9b9a95;
  --rule: #2d2c2a;
  --shu: #ff5435;
  --shu-text: #ff7a5e;
  --shadow: 0 0 0 1px rgba(255, 255, 255, .06);
  --caution: #ffcf70;
  --caution-bg: #3a2c0c;
  --map-sea: #1d2329;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font: 400 1rem/1.5 var(--font-ui);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
img { height: auto; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--shu); outline-offset: 3px; border-radius: 2px; }
[hidden] { display: none !important; }
:lang(ja) { font-family: var(--font-jp); }

.wrap { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: var(--gutter); }
@media (min-width: 720px) { :root { --gutter: 24px; } }
.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: 50; background: var(--shu); color: #fff; padding: 10px 14px; font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }

/* ---------- masthead ---------- */
.mast { background: var(--ink); color: var(--on-ink); position: relative; z-index: 20; }
.mast__bar { display: flex; align-items: center; gap: 16px; padding-block: 14px 12px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--on-ink); min-width: 0; }
.brand__seal { width: 23px; height: 40px; flex: none; }
.brand__name {
  font-family: var(--font-head);
  font-weight: 900;
  font-stretch: 62.5%;
  font-size: clamp(2.3rem, 7.4vw, 3.6rem);
  line-height: .78;
  letter-spacing: -.005em;
  text-transform: uppercase;
  padding-top: .06em;
}
.brand__tag { margin: 0; color: var(--on-ink-2); font-size: .8125rem; font-weight: 600; letter-spacing: .01em; display: none; }
@media (min-width: 760px) { .brand__tag { display: block; padding-left: 16px; border-left: 1px solid var(--ink-rule); } }
.mast__tools { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.tool {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; min-width: 40px; padding: 0 10px;
  border: 0; border-radius: 6px; background: transparent; color: var(--on-ink); cursor: pointer;
  text-decoration: none; font: 700 .875rem var(--font-ui);
}
.tool:hover { background: #1c1c1c; }
.tool svg { width: 20px; height: 20px; flex: none; }
.tool__count {
  display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: 11px; background: var(--shu); color: #fff; font-size: .75rem; font-variant-numeric: tabular-nums;
}
.tool__label { display: none; }
@media (min-width: 560px) { .tool__label { display: inline; } }
.mast__nav { display: flex; gap: 24px; overflow-x: auto; scrollbar-width: none; border-top: 1px solid var(--ink-rule); }
.mast__nav::-webkit-scrollbar { display: none; }
.mast__nav a {
  flex: none; padding-block: 12px 10px; font: 700 .9375rem/1 var(--font-ui); color: var(--on-ink);
  text-decoration: none; border-bottom: 3px solid transparent;
}
.mast__nav a:hover { border-bottom-color: #555; }
.mast__nav a[aria-current="page"] { border-bottom-color: var(--shu); }

/* ---------- shared type ---------- */
.kicker { display: inline-block; font: 700 .8125rem/1.2 var(--font-ui); color: var(--shu-text); text-decoration: none; }
a.kicker:hover { text-decoration: underline; }
.headline { font-family: var(--font-head); font-weight: 800; font-stretch: 80%; letter-spacing: -.01em; text-wrap: balance; margin: 0; }
.headline a { text-decoration: none; }
.headline a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.h-xl { font-size: clamp(2.1rem, 5.2vw, 3.9rem); line-height: 1; }
.h-lg { font-size: clamp(1.75rem, 3.6vw, 2.75rem); line-height: 1.03; }
.h-md { font-size: 1.375rem; line-height: 1.1; }
.h-sm { font-size: 1.125rem; line-height: 1.15; font-stretch: 85%; }
.dek { font: 400 1.125rem/1.45 var(--font-body); color: var(--text-2); margin: 10px 0 0; text-wrap: pretty; }
.byline { font: 500 .8125rem/1.4 var(--font-ui); color: var(--muted); margin-top: 12px; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.byline strong { color: var(--text); font-weight: 700; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; border-top: 4px solid var(--text); padding-top: 10px; margin-bottom: 18px; }
.sec-head h2 { font: 800 1.5rem/1.1 var(--font-head); font-stretch: 85%; margin: 0; }
.sec-head a { font: 700 .875rem var(--font-ui); color: var(--shu-text); text-decoration: none; white-space: nowrap; }
.sec-head a:hover { text-decoration: underline; }

/* ---------- covers ---------- */
.cover { position: relative; margin: 0; aspect-ratio: 16 / 9; overflow: hidden; background: var(--paper-2); max-width: 100%; }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover__jp {
  position: absolute; top: 7%; right: 4.5%; writing-mode: vertical-rl; text-orientation: upright;
  font: 700 clamp(1.1rem, 3.2vw, 2.5rem)/1.05 var(--font-jp); letter-spacing: .12em; color: #fff;
  text-shadow: 0 0 2px rgba(0, 0, 0, .45), 0 1px 3px rgba(0, 0, 0, .4), 0 4px 18px rgba(0, 0, 0, .4); pointer-events: none; max-height: 86%;
}
.cover--sm .cover__jp { font-size: 1.05rem; }
.cover__code {
  position: absolute; left: 10px; bottom: 10px; display: inline-flex; gap: 6px; align-items: center;
  background: #fff; color: #111; border-radius: 5px; padding: 4px 8px 4px 6px; font: 800 .75rem/1 var(--font-ui);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}
.cover__code::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--line, var(--shu)); }
.cover-credit { font: 500 .75rem/1.4 var(--font-ui); color: var(--muted); margin-top: 6px; }

/* ---------- home ---------- */
.lead-grid { display: grid; gap: 28px; padding-block: 24px 36px; }
@media (min-width: 980px) { .lead-grid { grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); gap: 36px; } }
.lead { min-width: 0; }
.lead .cover { margin-bottom: 16px; }
.lead .headline { margin-top: 8px; }
.rail-title { font: 800 1.125rem/1 var(--font-head); font-stretch: 85%; margin: 0 0 4px; padding: 10px 0; border-top: 4px solid var(--text); }
.latest-list { list-style: none; margin: 0; padding: 0; }
.latest-list li { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.latest-list time { font: 600 .75rem/1.3 var(--font-ui); color: var(--muted); padding-top: 2px; font-variant-numeric: tabular-nums; }
.latest-list .kicker { font-size: .75rem; }
.latest-list .headline { margin-top: 2px; }

.story-row { display: grid; gap: 28px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); padding-bottom: 44px; }
.card { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.card .cover { margin-bottom: 4px; }
.card .dek { font-size: 1rem; margin-top: 0; }

.band { padding-block: 40px 48px; }
.band--signs { background: var(--paper-2); }
.band--ink { background: var(--ink); color: var(--on-ink); }
.band--ink .sec-head { border-top-color: var(--on-ink); }
.band--ink .sec-head a { color: #ff8a70; }

.river { display: grid; gap: 36px; padding-block: 44px 56px; }
@media (min-width: 980px) { .river { grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); } }
.river-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.river-item { display: grid; grid-template-columns: minmax(0, 1fr) 132px; gap: 18px; padding: 20px 0; border-bottom: 1px solid var(--rule); }
.river-item:first-child { padding-top: 4px; }
@media (min-width: 640px) { .river-item { grid-template-columns: minmax(0, 1fr) 240px; } }
.river-item .cover { order: 2; }
.river-item .dek { font-size: 1rem; display: none; }
@media (min-width: 640px) { .river-item .dek { display: block; } }

.side-box { border-top: 4px solid var(--text); padding-top: 10px; margin-bottom: 32px; }
.side-box h2 { font: 800 1.125rem/1 var(--font-head); font-stretch: 85%; margin: 0 0 6px; }
.trend-list { list-style: none; margin: 0; padding: 0; counter-reset: t; }
.trend-list li { counter-increment: t; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.trend-list li::before { content: counter(t); font: 900 1.75rem/1 var(--font-head); font-stretch: 70%; color: var(--shu); }
.code-teaser ol { margin: 0; padding-left: 1.2em; font: 500 .9375rem/1.45 var(--font-ui); display: grid; gap: 8px; }
.code-teaser p { margin: 12px 0 0; }
.code-teaser a { font-weight: 700; color: var(--shu-text); }

/* ---------- station signs (spot cards) ---------- */
.sign-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.signcard {
  display: flex; flex-direction: column; text-decoration: none; color: var(--sign-fg); background: var(--sign-bg);
  border-radius: 8px; overflow: hidden; box-shadow: var(--shadow); transition: transform .15s ease;
}
.signcard:hover { transform: translateY(-2px); }
.signcard:hover .sign__kanji { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.sign { display: flex; align-items: center; gap: 12px; padding: 12px 14px 10px; }
.num {
  flex: none; display: inline-grid; place-items: center; align-content: center; width: 42px; height: 42px;
  border: 4px solid var(--line); border-radius: 9px; background: #fff; color: #111; font-family: var(--font-ui); line-height: .95;
}
.num b { display: block; text-align: center; font-weight: 800; }
.num b:first-child { font-size: .5625rem; letter-spacing: .04em; }
.num b:last-child { font-size: 1rem; font-variant-numeric: tabular-nums; }
.sign__names { display: flex; flex-direction: column; min-width: 0; }
.sign__kanji { font: 700 1.375rem/1.15 var(--font-jp); letter-spacing: .04em; overflow-wrap: anywhere; }
.sign__romaji { font: 700 .8125rem/1.3 var(--font-ui); color: var(--sign-sub); }
.signcard__band { height: 8px; background: var(--line); flex: none; }
.signcard__meta { flex: 1; padding: 0 14px 14px 68px; font: 600 .8125rem/1.35 var(--font-ui); color: var(--sign-sub); }
.signcard__meta strong { color: var(--sign-fg); font-weight: 700; }

/* big sign on spot pages */
.ekimei { background: var(--sign-bg); color: var(--sign-fg); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); margin-block: 22px 26px; }
.ekimei__top { position: relative; display: flex; align-items: center; justify-content: center; padding: 22px 20px 16px 92px; min-height: 120px; }
.ekimei .num { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); width: 60px; height: 60px; border-width: 6px; border-radius: 12px; }
.ekimei .num b:first-child { font-size: .75rem; }
.ekimei .num b:last-child { font-size: 1.5rem; }
.ekimei__names { text-align: center; display: flex; flex-direction: column; align-items: center; min-width: 0; }
.ekimei__kana { font: 700 .9375rem/1.3 var(--font-jp); letter-spacing: .32em; color: var(--sign-sub); word-break: keep-all; }
.ekimei__kanji { font: 700 clamp(2.1rem, 7.5vw, 4.25rem)/1.08 var(--font-jp); letter-spacing: .08em; margin: 2px 0 2px; overflow-wrap: anywhere; }
.ekimei__kanji.is-long { font-size: clamp(1.75rem, 7.6vw, 3.4rem); letter-spacing: .03em; }
@media (max-width: 560px) {
  .ekimei__top { flex-direction: column; padding: 16px 16px 14px; min-height: 0; }
  .ekimei .num { position: static; transform: none; width: 46px; height: 46px; border-width: 4px; border-radius: 9px; margin-bottom: 8px; }
  .ekimei .num b:first-child { font-size: .625rem; }
  .ekimei .num b:last-child { font-size: 1.0625rem; }
  .ekimei__adj { padding-inline: 14px; }
}
.ekimei__romaji { font: 800 clamp(1rem, 2.6vw, 1.375rem)/1.2 var(--font-ui); letter-spacing: .02em; }
.ekimei__band { display: flex; justify-content: space-between; gap: 12px; background: var(--line); color: #fff; padding: 7px 20px; font: 700 .8125rem/1.2 var(--font-ui); }
.ekimei__band span:last-child { text-align: right; }
.ekimei__adj { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 12px 20px 14px; }
.ekimei__adj a, .ekimei__adj span { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--sign-fg); min-width: 0; }
.ekimei__adj .next { justify-content: flex-end; text-align: right; }
.ekimei__adj a:hover .adj-en { text-decoration: underline; }
.adj-tri { flex: none; width: 0; height: 0; border-block: 9px solid transparent; }
.prev .adj-tri { border-right: 13px solid var(--line); }
.next .adj-tri { border-left: 13px solid var(--line); }
.adj-txt { display: flex; flex-direction: column; min-width: 0; }
.adj-jp { font: 700 1rem/1.2 var(--font-jp); overflow-wrap: anywhere; }
.adj-en { font: 600 .75rem/1.3 var(--font-ui); color: var(--sign-sub); }
.adj-end { font: 600 .75rem var(--font-ui); color: var(--sign-sub); }

/* ---------- article layout ---------- */
.crumbs { font: 600 .8125rem/1.4 var(--font-ui); color: var(--muted); padding-top: 22px; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs a { color: var(--text-2); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.article-head { max-width: 52rem; padding-top: 10px; }
.article-head .headline { margin-top: 8px; }
.article-grid { display: grid; gap: 36px; padding-block: 26px 56px; }
@media (min-width: 1000px) { .article-grid { grid-template-columns: minmax(0, 1fr) 340px; gap: 52px; } }
.article-main { min-width: 0; }
.article-side { min-width: 0; display: grid; gap: 24px; align-content: start; }
@media (min-width: 1000px) { .article-side .sticky { position: sticky; top: 20px; } }
.hero { margin-bottom: 8px; }
.share { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 26px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px;
  border-radius: 8px; border: 2px solid var(--text); background: transparent; color: var(--text); cursor: pointer;
  font: 700 .9375rem/1 var(--font-ui); text-decoration: none;
}
.btn:hover { background: var(--paper-2); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn--solid { background: var(--text); color: var(--paper); }
.btn--solid:hover { background: var(--text-2); }
.btn--shu { background: var(--shu); border-color: var(--shu); color: #fff; }
.btn--shu:hover { background: var(--shu-text); border-color: var(--shu-text); }
.btn[aria-pressed="true"] { background: var(--paper-2); border-color: var(--shu); color: var(--text); }
.btn-note { font: 500 .8125rem var(--font-ui); color: var(--muted); align-self: center; }

/* prose */
.prose { font-family: var(--font-body); font-size: 1.125rem; line-height: 1.66; max-width: 40rem; color: var(--text); }
@media (min-width: 720px) { .prose { font-size: 1.1875rem; } }
.prose > * { margin: 0 0 1.05em; }
.prose h2 { font: 800 1.75rem/1.12 var(--font-head); font-stretch: 85%; letter-spacing: -.01em; margin: 1.7em 0 .5em; text-wrap: balance; }
.prose h3 { font: 800 1.3rem/1.2 var(--font-head); font-stretch: 88%; margin: 1.4em 0 .4em; }
.prose a { color: inherit; text-decoration: underline; text-decoration-color: var(--shu); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.prose a:hover { color: var(--shu-text); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .45em; }
.prose li::marker { color: var(--shu); font-weight: 700; }
.prose strong { font-weight: 700; }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 2em 0; }
.prose blockquote { margin-left: 0; padding-left: 18px; border-left: 4px solid var(--shu); font-style: italic; color: var(--text-2); }
.prose code { font-size: .88em; background: var(--paper-2); padding: .1em .35em; border-radius: 4px; }
.callout { font-family: var(--font-ui); font-size: 1rem; line-height: 1.55; background: var(--paper-2); border-radius: 8px; padding: 16px 18px; }
.callout > *:last-child { margin-bottom: 0; }
.callout p { margin: 0 0 .6em; }
.callout__title { font-weight: 800; }
.callout--heads-up { background: var(--caution-bg); color: var(--text); }
.callout--heads-up .callout__title { color: var(--caution); }
.prose-fig img { width: 100%; border-radius: 6px; }
.prose-fig figcaption { font: 500 .8125rem/1.4 var(--font-ui); color: var(--muted); margin-top: 6px; }
.prose .embed { margin-block: 1.6em; }

.sources { margin-top: 34px; padding-top: 14px; border-top: 1px solid var(--rule); max-width: 40rem; }
.sources h2 { font: 800 1rem var(--font-head); margin: 0 0 8px; }
.sources ol { margin: 0; padding-left: 1.3em; font: 500 .875rem/1.5 var(--font-ui); color: var(--text-2); display: grid; gap: 4px; }
.sources a { color: inherit; overflow-wrap: anywhere; }
.updated { font: 500 .8125rem var(--font-ui); color: var(--muted); margin-top: 10px; }

/* ---------- ticket (spot facts) ---------- */
.ticket {
  position: relative; background-color: var(--ticket-bg); color: var(--ticket-fg); border-radius: 10px; padding: 18px 18px 16px;
  background-image: repeating-linear-gradient(135deg, rgba(24, 35, 27, .045) 0 2px, transparent 2px 9px);
}
.ticket::before, .ticket::after { content: ""; position: absolute; top: 58px; width: 18px; height: 18px; border-radius: 50%; background: var(--paper); }
.ticket::before { left: -9px; }
.ticket::after { right: -9px; }
.ticket__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 2px dashed rgba(24, 35, 27, .25); }
.ticket__title { font: 800 1rem/1.1 var(--font-ui); }
.ticket__title span { display: block; font: 700 .75rem/1.2 var(--font-jp); letter-spacing: .3em; color: var(--ticket-sub); margin-bottom: 3px; }
.ticket .num { width: 44px; height: 44px; }
.ticket dl { margin: 0; display: grid; gap: 12px; }
.ticket dt { font: 700 .75rem/1.2 var(--font-ui); color: var(--ticket-sub); margin-bottom: 3px; }
.ticket dd { margin: 0; font: 600 .9375rem/1.4 var(--font-ui); }
.ticket dd ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ticket .jp { font-family: var(--font-jp); font-weight: 700; }
.ticket .sub { display: block; font-weight: 500; color: var(--ticket-sub); font-size: .8125rem; }
.ticket__anime a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.flags { display: flex; flex-wrap: wrap; gap: 6px; }
.flag { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 6px; background: #fff7df; color: #6b4600; font: 700 .75rem/1.1 var(--font-ui); }
.flag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #d18a00; }

.minimap { position: relative; margin: 0; border-radius: 10px; overflow: hidden; background: #e9eef2; box-shadow: var(--shadow); }
.minimap img { width: 100%; }
.minimap__pin { position: absolute; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: var(--line); border: 3px solid #fff; box-shadow: 0 0 0 2px var(--line), 0 2px 6px rgba(0, 0, 0, .3); }
.minimap__pin::after { content: ""; position: absolute; inset: -14px; border-radius: 50%; border: 2px solid var(--line); opacity: .5; }
.minimap figcaption { position: absolute; left: 10px; bottom: 10px; background: #fff; color: #111; border-radius: 5px; padding: 5px 8px; font: 700 .75rem var(--font-ui); }

.more-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }

/* ---------- stamp button ---------- */
.stamp-btn .stamp-ico { width: 22px; height: 22px; }
.stamp-btn.is-stamped .stamp-ico { color: var(--shu); }
.stamp-pop { animation: stamp .42s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes stamp { 0% { transform: scale(1.35) rotate(-8deg); opacity: .2; } 60% { transform: scale(.94) rotate(2deg); opacity: 1; } 100% { transform: none; } }
@media (prefers-reduced-motion: reduce) { .stamp-pop { animation: none; } .signcard { transition: none; } }

/* ---------- page heads ---------- */
.page-head { padding-block: 30px 10px; }
.page-head > * { max-width: 54rem; }
.page-head .dek { margin-top: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 18px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 12px; border-radius: 18px;
  border: 2px solid var(--rule); background: var(--paper); color: var(--text); font: 700 .8125rem/1 var(--font-ui); cursor: pointer;
}
.chip:hover { border-color: var(--text-2); }
.chip[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--paper); }
.chip i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); flex: none; }
.chip span { font-variant-numeric: tabular-nums; opacity: .7; }

/* ---------- map page ---------- */
.map-layout { display: grid; gap: 32px; padding-bottom: 60px; }
@media (min-width: 1000px) { .map-layout { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: start; } .map-panel { position: sticky; top: 16px; } }
.map-panel { min-width: 0; }
.map-box { position: relative; background: var(--map-sea); border-radius: 12px; overflow: hidden; }
.jmap { display: block; width: 100%; height: auto; }
.jmap .land { transition: opacity .2s ease; }
.jmap .borders { fill: none; stroke: var(--map-sea); stroke-width: 1; }
.jmap .inset-frame { fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 5 5; opacity: .6; }
.jmap .inset-label { font: 700 16px var(--font-ui); fill: var(--muted); }
.jmap .leader { stroke: var(--text-2); stroke-width: 1.5; }
.jmap .pin { cursor: pointer; }
.jmap .pin-dot { stroke: #fff; stroke-width: 3; }
.jmap .pin-label rect { fill: #fff; stroke: var(--line); stroke-width: 2.5; }
.jmap .pin-label text { font: 800 15px var(--font-ui); fill: #111; }
.jmap .pin:hover .pin-dot, .jmap .pin:focus .pin-dot, .jmap .pin.is-hot .pin-dot { stroke: #111; stroke-width: 4; }
.jmap .pin:focus { outline: none; }
.jmap .pin:focus-visible .pin-label rect { stroke: var(--shu); stroke-width: 4; }
.jmap.is-filtered .land:not(.is-on) { opacity: .25; }
.jmap.is-filtered .pin:not(.is-on) { opacity: .2; }
.map-legend { position: absolute; right: 12px; bottom: 12px; background: rgba(255, 255, 255, .92); color: #111; border-radius: 8px; padding: 8px 10px; font: 600 .6875rem/1.4 var(--font-ui); max-width: 60%; }
.map-credit { font: 500 .75rem/1.4 var(--font-ui); color: var(--muted); margin-top: 8px; }

.lines { display: grid; gap: 26px; min-width: 0; }
.line-block { min-width: 0; }
.line-head { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 8px; background: var(--line); color: #fff; }
.line-head h2 { margin: 0; font: 800 1.125rem/1.1 var(--font-head); font-stretch: 85%; }
.line-head .jp { font: 700 .875rem var(--font-jp); opacity: .9; }
.line-head .count { margin-left: auto; font: 700 .8125rem var(--font-ui); font-variant-numeric: tabular-nums; }
.route { list-style: none; margin: 0; padding: 6px 0 0; position: relative; }
.route::before { content: ""; position: absolute; left: 21px; top: 0; bottom: 18px; width: 6px; background: var(--line); border-radius: 3px; }
.route li { position: relative; }
.route a { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 10px; align-items: start; padding: 10px 8px 10px 0; text-decoration: none; border-radius: 8px; }
.route a:hover, .route a.is-hot { background: var(--paper-2); }
.route .dot { width: 22px; height: 22px; margin: 4px 0 0 13px; border-radius: 50%; background: var(--paper); border: 5px solid var(--line); position: relative; z-index: 1; }
.route .stamped .dot { background: var(--line); }
.route .r-jp { font: 700 1.0625rem/1.25 var(--font-jp); }
.route .r-en { font: 700 .9375rem/1.25 var(--font-ui); }
.route .r-meta { display: block; font: 500 .8125rem/1.35 var(--font-ui); color: var(--muted); margin-top: 2px; }
.route .r-code { font: 800 .75rem var(--font-ui); color: var(--muted); margin-right: 6px; }
.route-empty { font: 500 .875rem/1.5 var(--font-ui); color: var(--muted); padding: 10px 0 0 4px; }

/* ---------- latest + anime index ---------- */
.latest-page { padding-bottom: 60px; }
.anime-grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); padding-bottom: 60px; }
.anime-card { background: var(--paper); border-top: 4px solid var(--text); padding-top: 12px; scroll-margin-top: 20px; }
.anime-card:target { border-top-color: var(--shu); }
.anime-card h2 { font: 800 1.375rem/1.1 var(--font-head); font-stretch: 82%; margin: 0; }
.anime-card .jp { font: 700 .9375rem/1.3 var(--font-jp); color: var(--text-2); margin-top: 4px; }
.anime-card .meta { font: 600 .8125rem/1.4 var(--font-ui); color: var(--muted); margin-top: 6px; }
.anime-card p { font: 400 1rem/1.5 var(--font-body); color: var(--text-2); margin: 10px 0 12px; }
.anime-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.anime-card li a { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 700 .9375rem/1.25 var(--font-ui); }
.anime-card li a:hover span:last-child { text-decoration: underline; }
.anime-card .num { width: 36px; height: 36px; border-width: 3px; border-radius: 7px; }
.anime-card .num b:first-child { font-size: .5rem; }
.anime-card .num b:last-child { font-size: .8125rem; }

/* ---------- passport ---------- */
.pass-top { display: grid; gap: 18px; padding-block: 8px 24px; }
@media (min-width: 820px) { .pass-top { grid-template-columns: minmax(0, 1fr) auto; align-items: end; } }
.pass-progress { font: 800 1.125rem var(--font-ui); }
.pass-bar { height: 10px; border-radius: 5px; background: var(--paper-2); overflow: hidden; margin-top: 8px; box-shadow: inset 0 0 0 1px var(--rule); }
.pass-bar span { display: block; height: 100%; width: 0; background: var(--shu); border-radius: 5px; transition: width .4s ease; }
.pass-regions { display: flex; flex-wrap: wrap; gap: 30px 34px; padding-bottom: 60px; }
.pass-region { flex: 0 1 auto; min-width: 0; }
.pass-region h2 { display: flex; align-items: center; gap: 10px; font: 800 1.125rem var(--font-head); font-stretch: 85%; margin: 0 0 12px; }
.pass-region h2 i { width: 14px; height: 14px; border-radius: 50%; background: var(--line); }
.stamps { display: flex; flex-wrap: wrap; gap: 14px; }
.stamps > * { width: 150px; }
@media (max-width: 420px) { .stamps > * { width: calc(50% - 7px); } .stamp-slot svg { width: 100px; height: 100px; } }
.stamp-slot { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 8px; border-radius: 10px; background: var(--sign-bg); color: var(--sign-fg); text-decoration: none; box-shadow: var(--shadow); text-align: center; }
.stamp-slot svg { width: 112px; height: 112px; }
.stamp-slot .st-ring { fill: none; stroke: #b9b9b9; stroke-width: 2.5; stroke-dasharray: 5 5; }
.stamp-slot .st-ring2 { fill: none; stroke: none; }
.stamp-slot text { fill: #9a9a9a; font-family: var(--font-ui); font-weight: 800; text-anchor: middle; }
.stamp-slot .st-kanji { font-family: var(--font-jp); font-weight: 700; }
.stamp-slot.is-stamped .st-art { transform-origin: 60px 60px; transform: rotate(var(--tilt, -6deg)); }
.stamp-slot.is-stamped .st-ring { stroke: var(--line); stroke-dasharray: none; stroke-width: 5; }
.stamp-slot.is-stamped .st-ring2 { stroke: var(--line); stroke-width: 2; }
.stamp-slot.is-stamped text { fill: var(--line); }
.stamp-slot.is-stamped svg { filter: url(#ink); }
.stamp-slot .st-name { font: 700 .8125rem/1.25 var(--font-ui); }
.stamp-slot .st-when { font: 600 .75rem var(--font-ui); color: var(--sign-sub); }
.pass-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.confirm { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font: 600 .875rem var(--font-ui); }

/* ---------- search ---------- */
.search { position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, .55); display: flex; justify-content: center; align-items: flex-start; padding: calc(env(safe-area-inset-top, 0px) + 10vh) 16px 16px; }
.search__panel { width: min(680px, 100%); background: var(--paper); color: var(--text); border-radius: 12px; box-shadow: 0 20px 60px rgba(0, 0, 0, .35); overflow: hidden; }
.search__field { display: flex; align-items: center; gap: 10px; padding: 6px 8px 6px 16px; border-bottom: 1px solid var(--rule); }
.search__field svg { width: 20px; height: 20px; color: var(--muted); flex: none; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font: 600 1.125rem var(--font-ui); padding: 14px 0; }
.search__close { border: 0; background: transparent; color: var(--muted); font: 700 .8125rem var(--font-ui); padding: 10px; cursor: pointer; border-radius: 6px; }
.search__results { list-style: none; margin: 0; padding: 6px; max-height: 60vh; overflow-y: auto; }
.search__results a { display: block; padding: 10px 12px; border-radius: 8px; text-decoration: none; }
.search__results a:hover, .search__results a[aria-selected="true"] { background: var(--paper-2); }
.search__results .k { font: 700 .75rem var(--font-ui); color: var(--shu-text); }
.search__results .t { display: block; font: 800 1rem/1.25 var(--font-head); font-stretch: 88%; }
.search__results .s { display: block; font: 500 .8125rem/1.35 var(--font-ui); color: var(--muted); margin-top: 2px; }
.search__hint { margin: 0; padding: 12px 18px 16px; font: 500 .875rem var(--font-ui); color: var(--muted); }

/* ---------- footer ---------- */
.foot { background: var(--ink); color: var(--on-ink); padding-block: 44px 28px; margin-top: 0; }
.foot__grid { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); }
.foot .brand { color: var(--on-ink); }
.foot .brand__name { font-size: 2.6rem; }
.foot p { color: var(--on-ink-2); font: 500 .875rem/1.5 var(--font-ui); margin: 12px 0 0; max-width: 30ch; }
.foot h2 { font: 800 .875rem var(--font-ui); margin: 0 0 10px; color: var(--on-ink); }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot a { color: var(--on-ink-2); text-decoration: none; font: 600 .875rem var(--font-ui); }
.foot a:hover { color: var(--on-ink); text-decoration: underline; }
.foot__legal { border-top: 1px solid var(--ink-rule); margin-top: 32px; padding-top: 18px; color: #8a8a8a; font: 500 .75rem/1.6 var(--font-ui); display: grid; gap: 6px; }
.foot__legal p { margin: 0; max-width: none; color: inherit; font: inherit; }

/* ---------- 404 ---------- */
.lost { padding-block: 60px 80px; display: grid; gap: 24px; max-width: 46rem; }
.lost .ekimei { margin: 0; }

/* ---------- home map band ---------- */
.home-map { display: grid; gap: 30px; align-items: center; }
@media (min-width: 900px) { .home-map { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 48px; } }
.home-map__text { min-width: 0; }
.home-map__text p { font: 400 1.0625rem/1.55 var(--font-body); color: var(--on-ink-2); margin: 0 0 20px; max-width: 34rem; }
.home-lines { list-style: none; margin: 0 0 24px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); gap: 8px; }
.home-lines a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; background: #151515; color: var(--on-ink); text-decoration: none; font: 700 .875rem var(--font-ui); }
.home-lines a:hover { background: #222; }
.home-lines i { width: 12px; height: 12px; border-radius: 50%; background: var(--line); flex: none; }
.home-lines span { margin-left: auto; color: var(--on-ink-2); font-variant-numeric: tabular-nums; }
.home-map__map { min-width: 0; }
.hmap { position: relative; border-radius: 12px; overflow: hidden; max-width: 560px; margin-inline: auto; }
.hmap img { width: 100%; }
.hpin { position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--line); border: 2.5px solid #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .35); }
.hpin:hover, .hpin:focus-visible { transform: scale(1.5); z-index: 2; }
@media (prefers-reduced-motion: no-preference) { .hpin { transition: transform .12s ease; } }
@media (max-width: 640px) {
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
}

/* ---------- contact cards ({{links}} on a page) ---------- */
.contact-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); margin: 1.2em 0 1.9em; font-family: var(--font-ui); }
.prose a.contact-card { display: grid; gap: 3px; padding: 14px 16px 15px 18px; border-radius: 10px; background: var(--paper); box-shadow: var(--shadow); border-left: 6px solid var(--shu); color: var(--text); text-decoration: none; transition: box-shadow .15s ease; }
.prose a.contact-card:hover { color: var(--text); box-shadow: 0 0 0 2px var(--shu); }
.contact-card__k { font: 800 .78rem/1.2 var(--font-head); letter-spacing: .08em; text-transform: uppercase; color: var(--shu-text); }
.contact-card__v { font: 800 1.35rem/1.15 var(--font-head); font-stretch: 85%; overflow-wrap: anywhere; }
.contact-card__n { font-size: .9rem; line-height: 1.35; color: var(--muted); }
.prose .contact-soon { font-family: var(--font-ui); font-size: 1rem; background: var(--paper-2); border-radius: 10px; padding: 14px 16px; }
