/* エキアナ — 共通スタイル
   方向性: split stage（片側が動かない）。固定側は全国8,987駅のドット地図と駅名標。
   書体: 見出し Shippori Mincho B1 / 本文 Zen Kaku Gothic New。角はすべて直角。 */

:root {
  --bg: #ffffff;
  --surface: #f4f4f2;
  --surface-2: #e9e8e3;
  --ink: #1f2b4d;
  --muted: #5b6277;
  --accent: #f7941d;
  --accent-ink: #1f2b4d;
  --field-1: #070a12;
  --field-1-ink: #ffffff;
  --field-1-muted: #b7bccb;
  --field-2: #e3e1dc;

  --font-display: "Shippori Mincho B1", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --font-text: "Zen Kaku Gothic New", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;

  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(2rem, 1.3rem + 3.2vw, 4rem);
  --step-display: clamp(2.75rem, 1.2rem + 5.4vw, 5.5rem);

  --gutter: clamp(16px, 4vw, 64px);
  --gap: 12px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--step-body);
  line-height: 1.6;
  letter-spacing: 0.01em;
  font-feature-settings: "palt" 0;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ol, ul, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.num { font-variant-numeric: tabular-nums; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.display, h1, h2 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.12;
  text-wrap: balance;
}
h1 { font-size: var(--step-display); }
h2 { font-size: var(--step-head); }
h3 { font-size: var(--step-lead); font-weight: 700; line-height: 1.35; }
.lead { font-size: var(--step-lead); line-height: 1.5; max-width: 32em; text-wrap: pretty; }
.small { font-size: var(--step-small); color: var(--muted); }
p { max-width: 38em; text-wrap: pretty; }

/* ------------------------------------------------------------ 共通部品 */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 52px; padding: 0 1.4em;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 700; border: 0; cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 180ms ease;
}
.btn:hover { background: #ffa53a; transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.97); }
.btn--ink { background: var(--ink); color: #fff; }
.btn--ink:hover { background: #2c3b66; }

.wordmark {
  font-family: var(--font-display); font-weight: 700; font-size: var(--step-lead);
  letter-spacing: -0.01em; line-height: 1;
}

.bar {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 20px 0;
}
.bar nav { display: flex; gap: clamp(16px, 2.4vw, 32px); align-items: center; }
.bar nav a { transition: opacity 160ms ease; }
.bar nav a:hover { opacity: 0.65; }
.bar .btn { min-height: 44px; }

.ad {
  background: var(--surface); padding: 16px; margin: 64px 0;
  min-height: 140px;
}
.ad-label { font-size: var(--step-small); color: var(--muted); display: block; margin-bottom: 8px; }

/* ------------------------------------------------------------ split stage */

.stage {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--gap); padding: var(--gap);
  align-items: start;
}
.stage-read { padding: 0 clamp(16px, 3.6vw, 64px) 96px; min-width: 0; }
.stage-fix {
  position: sticky; top: var(--gap);
  height: calc(100svh - 2 * var(--gap));
  background: var(--field-1); color: var(--field-1-ink);
  overflow: hidden;
}
.map { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.map-drift { animation: drift 28s var(--ease-in-out) infinite alternate; transform-origin: 60% 40%; }
@keyframes drift { from { transform: scale(1); } to { transform: scale(1.045) translate(-0.6%, 0.4%); } }
.map-key {
  position: absolute; top: 20px; left: 24px; right: 24px; z-index: 2;
  font-size: var(--step-small); color: var(--field-1-muted); line-height: 1.5;
}
.map-key b { color: var(--accent); font-weight: 500; }

/* ------------------------------------------------------------ 駅名標 */

.sign {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  background: #fff; color: var(--ink);
}
.sign-main { padding: 18px 24px 14px; text-align: center; }
.sign-kana { display: block; font-size: var(--step-small); color: var(--ink); letter-spacing: 0.3em; margin-top: 2px; }
.sign-name {
  display: block; font-family: var(--font-text); font-weight: 700;
  font-size: clamp(2rem, 1.2rem + 2.6vw, 3.5rem); line-height: 1.1; letter-spacing: 0.08em;
}
.sign-meta { display: block; font-size: var(--step-small); color: var(--muted); margin-top: 4px; }
.sign-band {
  display: grid; grid-template-columns: 1fr 1fr;
  background: var(--ink); color: #fff;
}
.sign-band a {
  display: flex; align-items: baseline; gap: 0.5em; padding: 12px 20px;
  font-weight: 500; min-height: 52px; transition: background-color 180ms ease;
}
.sign-band a:hover { background: #2c3b66; }
.sign-band a + a { justify-content: flex-end; text-align: right; }
.sign-band b { color: var(--accent); font-weight: 700; white-space: nowrap; }
.sign-band .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sign.swap .sign-name, .sign.swap .sign-kana, .sign.swap .sign-band a { animation: swap 520ms var(--ease-out) both; }
.sign.swap .sign-band a + a { animation-delay: 70ms; }
@keyframes swap { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------ トップ: 一画面目 */

.hero { min-height: calc(100svh - 2 * var(--gap)); display: flex; flex-direction: column; }
.hero .bar { justify-content: space-between; }
.hero-body { margin-top: auto; margin-bottom: auto; padding: 48px 0; }
.hero h1 { max-width: 9em; }
.hero .lead { margin-top: 28px; max-width: 26em; }
.search { margin-top: 40px; position: relative; max-width: 560px; }
.search-row { display: flex; }
.search input {
  flex: 1; min-width: 0; min-height: 60px; padding: 0 18px;
  background: var(--surface); border: 0; border-radius: 0;
  font-size: var(--step-body);
}
.search input::placeholder { color: var(--muted); }
.search input:focus { outline: 3px solid var(--accent); outline-offset: 0; }
.search .btn { min-height: 60px; }
.suggest {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 20;
  background: #fff; box-shadow: 0 18px 40px rgba(31, 43, 77, 0.18);
  max-height: 420px; overflow-y: auto;
}
.suggest[hidden] { display: none; }
.suggest a {
  display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; padding: 12px 18px;
  transition: background-color 140ms ease;
}
.suggest a:nth-child(even) { background: var(--surface); }
.suggest a:hover, .suggest a.on { background: var(--field-2); }
.suggest .s-name { font-weight: 700; }
.suggest .s-sub, .suggest .s-v { font-size: var(--step-small); color: var(--muted); }
.suggest .s-v { grid-row: span 2; align-self: center; text-align: right; color: var(--ink); }
.suggest .empty { padding: 16px 18px; color: var(--muted); }
.hero-facts { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 28px; font-size: var(--step-small); color: var(--muted); }

/* ------------------------------------------------------------ トップ: 人気駅の代わり */

.pick { padding-top: 120px; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.tabs button {
  background: var(--surface); border: 0; padding: 8px 14px; min-height: 44px; cursor: pointer;
  color: var(--muted); font-weight: 500;
  transition: background-color 160ms ease, color 160ms ease, transform 140ms var(--ease-out);
}
.tabs button:hover { color: var(--ink); background: var(--surface-2); }
.tabs button:active { transform: scale(0.96); }
.tabs button[aria-selected="true"] { background: var(--ink); color: #fff; }
.pick h2 { margin-top: 56px; }
.pick-desc { margin-top: 20px; }
.alts { margin-top: 40px; display: grid; gap: 6px; }
.alts a {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 24px; align-items: baseline;
  padding: 18px 20px; background: var(--surface);
  transition: background-color 160ms ease, transform 200ms var(--ease-out);
}
.alts a:hover { background: var(--surface-2); transform: translateX(6px); }
.alts .a-name { font-weight: 700; font-size: var(--step-lead); }
.alts .a-diff { font-weight: 700; font-size: var(--step-lead); text-align: right; }
.alts .a-sub, .alts .a-rent { font-size: var(--step-small); color: var(--muted); }
.alts .a-rent { text-align: right; }
.cheaper { color: #b25e00; }
.pricier { color: var(--muted); }
.cells { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 40px; }
.cells a {
  display: flex; align-items: center; justify-content: space-between; padding: 0 20px; min-height: 72px;
  font-weight: 700; transition: transform 160ms var(--ease-out), background-color 160ms ease;
}
.cells a:active { transform: scale(0.98); }
.cells a:first-child { background: var(--ink); color: #fff; }
.cells a:first-child:hover { background: #2c3b66; }
.cells a:last-child { background: var(--surface-2); }
.cells a:last-child:hover { background: var(--field-2); }

/* ------------------------------------------------------------ トップ: 穴場ランキング */

.rank { padding: 200px var(--gutter) 180px; }
.rank-col { width: min(640px, 100%); margin: 0 auto; container-type: inline-size; }
.giant {
  font-family: var(--font-display); font-weight: 700; font-size: 49cqw;
  line-height: 1; letter-spacing: -0.04em; margin-left: -0.04em;
}
.rank-col .giant + div { margin-top: 32px; }
.areas { margin-top: 48px; display: grid; gap: 6px; }
.areas details { background: var(--surface); }
.areas summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 60px; padding: 0 20px; cursor: pointer; list-style: none; font-weight: 700;
  transition: background-color 160ms ease;
}
.areas summary::-webkit-details-marker { display: none; }
.areas summary:hover { background: var(--surface-2); }
.areas summary .plus { position: relative; width: 16px; height: 16px; flex: none; transition: transform 240ms var(--ease-out); }
.areas summary .plus::before, .areas summary .plus::after { content: ""; position: absolute; background: var(--ink); left: 0; right: 0; top: 7px; height: 2px; }
.areas summary .plus::after { transform: rotate(90deg); }
.areas details[open] summary .plus { transform: rotate(45deg); }
.areas summary .cnt { margin-left: auto; font-weight: 400; color: var(--muted); font-size: var(--step-small); }
.rank-list { list-style: decimal; padding: 4px 20px 28px 3em; font-variant-numeric: tabular-nums; }
.rank-list li { padding: 12px 0; }
.rank-list li::marker { color: var(--muted); }
.rank-list a { display: grid; grid-template-columns: 1fr auto; gap: 2px 20px; align-items: baseline; }
.rank-list a:hover .r-name { color: #b25e00; }
.rank-list .r-name { font-weight: 700; transition: color 160ms ease; }
.rank-list .r-val { text-align: right; font-weight: 700; white-space: nowrap; }
.rank-list .r-sub, .rank-list .r-num { font-size: var(--step-small); color: var(--muted); }
.rank-list .r-num { text-align: right; white-space: nowrap; }

/* ------------------------------------------------------------ トップ: 仕組み（伝票） */

.method { background: var(--field-2); padding: 180px var(--gutter); }
.method-grid {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 0 24px;
  max-width: 1320px; margin: 0 auto; align-items: start;
}
.method-text { grid-column: 1 / span 5; }
.method-text p { margin-top: 28px; }
.method-text p + p { margin-top: 16px; }
.slip {
  grid-column: 7 / span 5; background: #fff; padding: 36px 32px 72px;
  clip-path: polygon(var(--zig));
  font-variant-numeric: tabular-nums;
}
.slip h3 { font-family: var(--font-text); font-size: var(--step-body); font-weight: 700; margin-top: 28px; }
.slip h3:first-child { margin-top: 0; }
.slip-row { display: flex; align-items: baseline; gap: 10px; margin-top: 10px; }
.slip-row .dots {
  flex: 1; min-width: 24px; height: 4px; align-self: center; margin-top: 4px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='4'%3E%3Ccircle cx='2' cy='2' r='2' fill='%231f2b4d' fill-opacity='.45'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
}
.slip-row .v { font-weight: 700; white-space: nowrap; }
.slip-total {
  display: flex; justify-content: space-between; gap: 12px; align-items: center;
  margin: 32px -32px 0; padding: 0 32px; min-height: 52px;
  background: var(--ink); color: #fff; font-weight: 700;
}

/* ------------------------------------------------------------ フッター */

.foot {
  position: relative; background: var(--field-1); color: var(--field-1-ink);
  min-height: 100svh; display: flex; flex-direction: column; overflow: hidden;
}
.foot .map { opacity: 0.75; }
.foot-top {
  position: relative; z-index: 1; display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap;
  padding: 32px var(--gutter) 0;
}
.foot-top nav { display: grid; gap: 6px; align-content: start; }
.foot-top nav a:hover { color: var(--accent); }
.foot-src { max-width: 26em; color: var(--field-1-muted); font-size: var(--step-small); }
.foot-src p + p { margin-top: 8px; }
.foot-bottom { position: relative; z-index: 1; margin-top: auto; padding: 0 var(--gutter) 28px; }
.foot-name {
  font-family: var(--font-display); font-weight: 700; font-size: 21vw;
  line-height: 0.9; letter-spacing: -0.04em; margin-left: -0.05em;
}
.foot-legal { margin-top: 20px; font-size: var(--step-small); color: var(--field-1-muted); max-width: 44em; }

/* ------------------------------------------------------------ 駅ページ */

.crumb { font-size: var(--step-small); color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; }
.crumb a:hover { color: var(--ink); }
.st-head { padding: 48px 0 0; }
.st-head h1 { margin-top: 16px; }
.st-head h1.long { font-size: var(--step-head); }
.st-head .lead { margin-top: 20px; }

.verdict { margin-top: 72px; }
.verdict p { font-family: var(--font-display); font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.25rem); line-height: 1.4; max-width: 20em; }
.meter { margin-top: 28px; max-width: 560px; }
.meter-track { position: relative; height: 14px; background: var(--surface-2); }
.meter-fill { position: absolute; inset: 0 auto 0 0; background: var(--ink); transform-origin: left; }
.meter-mid { position: absolute; top: -6px; bottom: -6px; left: 50%; width: 3px; background: var(--accent); }
.meter-scale { display: flex; justify-content: space-between; margin-top: 8px; font-size: var(--step-small); color: var(--muted); }

.figs { margin-top: 120px; }
.figs h2, .specs h2, .memo h2, .sims-sec h2 { font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.75rem); }
.compare { margin-top: 36px; display: grid; gap: 56px; }
.compare-row .v { font-family: var(--font-display); font-size: var(--step-head); line-height: 1; letter-spacing: -0.02em; }
.compare-row .cap { margin-top: 8px; font-size: var(--step-small); color: var(--muted); }
.compare-row .track { height: 22px; background: var(--surface); margin-top: 10px; }
.compare-row .fill { height: 100%; background: var(--ink); transform-origin: left; }
.compare-row.theory .fill { background: var(--field-2); }
.rents { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 40px; }
.rents div { background: var(--surface); padding: 20px; }
.rents b { display: block; margin-bottom: 6px; font-family: var(--font-display); font-size: var(--step-head); font-weight: 500; line-height: 1.1; letter-spacing: -0.02em; }
.rents span { font-size: var(--step-small); color: var(--muted); }

.specs { margin-top: 140px; }
.specs ul { margin-top: 32px; display: grid; gap: 18px; max-width: 640px; }
.specs li .lbl { display: flex; justify-content: space-between; gap: 12px; }
.specs li .track { height: 10px; background: var(--surface-2); margin-top: 8px; position: relative; }
.specs li .fill { height: 100%; background: var(--ink); transform-origin: left; }
.specs li .track::after { content: ""; position: absolute; top: -4px; bottom: -4px; left: 50%; width: 3px; background: var(--accent); }

.memo { margin-top: 140px; }
.memo p { margin-top: 24px; }

.sims-sec { margin-top: 140px; }
.sims-sec > p { margin-top: 20px; }
.sims { margin-top: 36px; display: grid; gap: 6px; counter-reset: none; }
.sims a {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 20px; padding: 18px 20px;
  background: var(--surface); transition: background-color 160ms ease, transform 200ms var(--ease-out);
}
.sims a:hover { background: var(--surface-2); transform: translateX(6px); }
.sims .n { font-weight: 700; font-size: var(--step-lead); line-height: 1.3; }
.sims .d { font-weight: 700; font-size: var(--step-lead); text-align: right; line-height: 1.3; white-space: nowrap; }
.sims .sub { font-size: var(--step-small); color: var(--muted); }
.sims .rt { font-size: var(--step-small); color: var(--muted); text-align: right; white-space: nowrap; }

.rent-cta { margin-top: 120px; background: var(--ink); color: #fff; padding: clamp(28px, 4vw, 48px); }
.rent-cta h2 { font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.75rem); }
.rent-cta p { margin-top: 16px; color: #d7dbe6; }
.rent-cta .btn { margin-top: 28px; }

/* ------------------------------------------------------------ 出現（JSがあるときだけ隠す） */

.js [data-reveal] > * { opacity: 0; transform: translateY(24px); }
.js [data-reveal].in > * {
  opacity: 1; transform: none;
  transition: opacity 700ms var(--ease-out), transform 800ms var(--ease-out);
  transition-delay: calc(var(--i, 0) * 75ms);
}
.js [data-grow] { transform: scaleX(0); }
.js .in [data-grow] { transform: scaleX(1); transition: transform 1100ms var(--ease-out) 200ms; }
.js [data-wipe] > span { display: block; clip-path: inset(0 100% 0 0); }
.js [data-wipe].in > span { clip-path: inset(0 0 0 0); transition: clip-path 1100ms var(--ease-out); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .map-drift { animation: none; }
  .js [data-reveal] > *, .js [data-grow], .js [data-wipe] > span { opacity: 1 !important; transform: none !important; clip-path: none !important; transition: none !important; }
  .sign.swap * { animation: none !important; }
  .btn, .alts a, .sims a, .cells a, .tabs button { transition: none; }
}

/* ------------------------------------------------------------ 幅 */

@media (max-width: 1100px) {
  .method-text { grid-column: 1 / -1; }
  .slip { grid-column: 1 / span 9; margin-top: 56px; }
}

@media (max-width: 860px) {
  .stage { display: flex; flex-direction: column; align-items: stretch; padding: 0; gap: 0; }
  .stage-read { display: contents; }
  .stage-read > * { order: 2; margin-left: 16px; margin-right: 16px; }
  .stage-read > [data-first] { order: 0; }
  .stage-read > :last-child { margin-bottom: 72px; }
  .stage-fix { position: relative; top: 0; height: 72svh; order: 1; margin-top: 48px; }
  .rank-list a { grid-template-columns: 1fr auto; }
  .rank-list .r-sub, .rank-list .r-num { grid-column: 1 / -1; text-align: left; }
  .hero { min-height: 0; }
  .hero-body { padding: 40px 0 0; }
  .home .bar .btn { display: none; }
  .station .bar nav a:not(.btn) { display: none; }
  .pick { padding-top: 96px; }
  .sign-band a { padding: 10px 14px; font-size: var(--step-small); }
  .slip { grid-column: 1 / -1; padding: 28px 20px 64px; }
  .slip-total { margin: 28px -20px 0; padding: 0 20px; }
  .rank { padding: 120px 16px 120px; }
  .method { padding: 120px 16px; }
  .foot { min-height: 88svh; }
  .foot-top { padding: 24px 16px 0; }
  .foot-bottom { padding: 0 16px 24px; }
  .rents { grid-template-columns: 1fr 1fr; }
  .cells { grid-template-columns: 1fr; }
  .cells a { min-height: 60px; }
}
