/* 静的なページ (トップ・駅のページ・駅の一覧・ルール・サイトマップ) の見た目。build_site.py が site/style.css に写す。
   地図の画面 (map.html) は main.css。配色と寸法の決まりは同じ:
   白い紙に墨の文字と細い罫線。藍は押せるもの・選んでいるもの・「上回る」だけ。影は使わない。
   文字の大きさは --fs-1〜6 の 6 段だけ (入力欄と select は iOS の拡大を防ぐため 16px)。角丸は --r-s/m/l と丸だけ。 */
:root {
  /* 配色は地図の画面 (main.css) と同じ。設計書 17 章「配色」 */
  --ink: #22211e; --ink-2: #4c4a45; --ink-3: #66635d;
  --line: #e5e3de; --line-2: #d9d6d0; --edge: #8c8982; --wash: #f5f4f1; --bg: #fff;
  --brand: #27467f; --brand-2: #223a70; --brand-wash: #e0e9f6;
  --home: #d4502b; --tie: #f8b500; --warn: #8a3319;
  --fs-1: 12px; --fs-2: 13px; --fs-3: 15px; --fs-4: 17px; --fs-5: 22px; --fs-6: 32px;
  --r-s: 6px; --r-m: 10px; --r-l: 16px;
  --head-h: 60px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Noto Sans JP", Meiryo, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
/* 押せる所は、すばやく 2 回押しても画面が拡大されないようにする (指 2 本での拡大はそのまま使える) */
a, button, select, input, label, summary { touch-action: manipulation; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-feature-settings: "palt"; font-size: var(--fs-3); line-height: 1.75; letter-spacing: .01em;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  word-break: auto-phrase;     /* 日本語の文を、語の切れ目で折り返す (対応していないブラウザは今までどおり) */
}
.nw { white-space: nowrap; }
a { color: var(--brand); }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p, dl, dd, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
svg { display: block; flex: none; }
[hidden] { display: none !important; }
[id] { scroll-margin-top: calc(var(--head-h) + 12px); }     /* 帯の下に見出しが隠れないように */
:focus-visible { outline: 2px solid var(--brand-2); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.rk, .tm, .list td, .stations b, .num { font-variant-numeric: tabular-nums; }

/* ---------- ボタン ---------- */
.btn, .btn-2 {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: var(--r-m);
  font-size: var(--fs-3); font-weight: 600; line-height: 1.3; text-decoration: none; white-space: nowrap;
}
.btn { border: 0; background: var(--brand); color: #fff; }
.btn:hover { background: var(--brand-2); color: #fff; }
.btn-2 { border: 1px solid var(--edge); background: var(--bg); color: var(--ink); }
.btn-2:hover { border-color: var(--ink-3); }
.btn-2 svg { width: 16px; height: 16px; color: var(--brand); }
.more { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: var(--fs-3); font-weight: 600; text-decoration: none; }
.more:hover { text-decoration: underline; }

/* ---------- 枠 ---------- */
.wrap { max-width: 760px; margin: 0 auto; padding: 0 20px; }
.wrap.wide, main.top { max-width: 1080px; }
.site-head { position: sticky; top: 0; z-index: 5; background: var(--bg); border-bottom: 1px solid var(--line); }
.site-head .wrap { min-height: var(--head-h); display: flex; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 8px; min-height: 44px; min-width: 0; color: var(--ink); text-decoration: none; }
.brand .logo { width: 39px; height: 26px; flex: none; color: var(--brand); }
.brand-t { font-size: var(--fs-3); font-weight: 700; line-height: 1.3; letter-spacing: .02em; }
.brand-t span { white-space: nowrap; }
.brand-t span + span { font-size: var(--fs-1); font-weight: 600; color: var(--ink-2); }
.site-head nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav-l { min-height: 44px; padding: 0 12px; display: flex; align-items: center; border-radius: var(--r-s); font-size: var(--fs-2); font-weight: 500; color: var(--ink-2); text-decoration: none; white-space: nowrap; }
.nav-l:hover { background: var(--wash); color: var(--ink); }
.site-head .btn { margin-left: 8px; padding: 0 16px; font-size: var(--fs-2); }
main.wrap { padding-top: 20px; padding-bottom: 64px; }
h1 { font-size: var(--fs-6); line-height: 1.35; font-weight: 700; }
h1 span { display: inline-block; }
h2 { font-size: var(--fs-5); line-height: 1.45; font-weight: 700; margin-top: 48px; }
h3 { font-size: var(--fs-2); font-weight: 600; color: var(--ink-3); margin-top: 20px; }
.lead { margin-top: 8px; font-size: var(--fs-3); color: var(--ink-2); }
.notice { margin-top: 40px; font-size: var(--fs-2); line-height: 1.7; color: var(--ink-3); }
.crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 0 6px; margin-bottom: 4px; font-size: var(--fs-2); color: var(--ink-3); }
.crumb a { min-height: 40px; display: flex; align-items: center; font-weight: 500; text-decoration: none; }
.crumb a:hover { text-decoration: underline; }

/* 足もと: サイトマップ、このサイトについて、出典 */
.site-foot { border-top: 1px solid var(--line); background: var(--wash); }
.site-foot .wrap { padding-top: 28px; padding-bottom: 40px; font-size: var(--fs-2); line-height: 1.75; color: var(--ink-2); }
.foot-map { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px 32px; padding-bottom: 20px; border-bottom: 1px solid var(--line-2); }
.foot-map h2 { margin: 0 0 2px; font-size: var(--fs-1); font-weight: 700; color: var(--ink-3); letter-spacing: .04em; }
.foot-map a { display: flex; align-items: center; min-height: 40px; font-size: var(--fs-2); font-weight: 400; color: var(--ink); text-decoration: none; }
.foot-map > div { display: flex; flex-direction: column; }
.foot-map a:hover { color: var(--brand); }
.foot-note { padding-top: 14px; max-width: 52em; font-size: var(--fs-1); color: var(--ink-3); }
.foot-note + .foot-note { padding-top: 4px; }
.foot-note a { color: var(--ink-2); margin: 0 2px; }

/* ---------- トップ ---------- */
.top { padding-top: 0; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); grid-template-areas: "main ex"; gap: 0 56px; align-items: start; padding: 40px 0 48px; }
.hero-main { grid-area: main; }
.hero .example { grid-area: ex; }
.kicker { font-size: var(--fs-2); font-weight: 600; color: var(--ink-2); }
.hero h1 { margin-top: 8px; }
.search { display: flex; gap: 8px; margin-top: 28px; max-width: 540px; }
.search .box { position: relative; flex: 1; min-width: 0; }
.search .box > svg { position: absolute; left: 14px; top: 50%; width: 20px; height: 20px; margin-top: -10px; color: var(--ink-3); pointer-events: none; }
/* 候補 (datalist) の ▼ は出さない。プルダウンに見えるため。候補は文字を打つと出る */
.search input::-webkit-calendar-picker-indicator, .search input::-webkit-list-button { display: none !important; opacity: 0; }
.search input {
  width: 100%; height: 52px; padding: 0 12px 0 44px;
  border: 1px solid var(--edge); border-radius: var(--r-m); background: var(--bg);
  font-size: 16px; color: var(--ink); outline: none; -webkit-appearance: none; appearance: none;
}
.search input::placeholder { color: var(--ink-3); }
.search input:focus { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.search input::-webkit-search-cancel-button { display: none; }
.search .btn { min-height: 52px; padding: 0 22px; }
/* 検索欄の下の一言 (お金と登録の心配に先に答える。売り方の設計図 Part 2 の A6) */
.search-note { margin-top: 8px; font-size: var(--fs-2); color: var(--ink-3); }
.here { margin-top: 12px; }
/* トップの練馬区の図 (区の形と園の場所)。地図の画面へのリンク */
.ward { display: block; margin: 28px 0 0; max-width: 460px; color: var(--ink-2); text-decoration: none; border-radius: var(--r-l); }
.ward figure { margin: 0; }
.ward svg { display: block; width: 100%; height: auto; }
.ward:hover .area { fill: var(--brand-wash); }
.ward:hover figcaption { color: var(--brand); text-decoration: underline; }
.ward .area { fill: var(--wash); stroke: var(--line-2); stroke-width: 2; stroke-linejoin: round; }
.ward .dots circle { fill: var(--brand); opacity: .45; }
.ward .st rect { fill: var(--ink); stroke: #fff; stroke-width: 2; }
.ward .st text { font-size: 22px; font-weight: 700; fill: var(--ink); text-anchor: middle; paint-order: stroke; stroke: #fff; stroke-width: 5px; stroke-linejoin: round; }
.ward figcaption { margin-top: 6px; font-size: var(--fs-2); line-height: 1.6; }


.example { border: 1px solid var(--line-2); border-radius: var(--r-l); background: var(--bg); overflow: hidden; }
.ex-head { padding: 18px 20px 14px; }
.ex-head h2 { margin: 0; font-size: var(--fs-4); display: flex; align-items: center; gap: 8px; }
.ex-head h2 small { display: inline-flex; align-items: center; height: 22px; padding: 0 7px; border-radius: var(--r-s); background: var(--wash); font-size: var(--fs-1); font-weight: 600; color: var(--ink-2); }
.ages { display: flex; gap: 4px; margin-top: 12px; }
.ages button {
  flex: 1; min-width: 0; height: 40px; padding: 0;
  border: 1px solid var(--edge); border-radius: var(--r-s); background: var(--bg);
  font-size: var(--fs-2); font-weight: 600; color: var(--ink-2); white-space: nowrap;
}
.ages button:hover { border-color: var(--ink-3); }
.ages button[aria-pressed="true"] { border-color: var(--brand); background: var(--brand); color: #fff; }
.ex-list a {
  display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  min-height: 64px; padding: 10px 20px; border-top: 1px solid var(--line); color: inherit; text-decoration: none;
}
.ex-list a:hover { background: var(--wash); }
/* 順位の番号は、指数を入れる前は濃い灰の丸 (墨より弱く、下回るの白い丸と見分けられる。地図の画面と同じ) */
.rk { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--ink-2); color: #fff; font-size: var(--fs-1); font-weight: 700; line-height: 1; }
.ex-list .nm { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ex-list .nm > b { font-size: var(--fs-3); font-weight: 600; line-height: 1.45; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ex-list small { display: flex; flex-wrap: wrap; gap: 0 10px; font-size: var(--fs-2); font-weight: 400; line-height: 1.5; color: var(--ink-2); }
.ex-list small b { font-weight: 600; color: var(--ink); }
.ex-list .kd { color: var(--ink-3); white-space: nowrap; }
/* 実例の番号の色 (保存してある指数と前回の最低指数の比較。地図の画面の番号と同じ色の意味) */
.rk.ok { background: var(--brand); color: #fff; box-shadow: none; }
.rk.tie { background: var(--tie); color: var(--ink); box-shadow: inset 0 0 0 1px var(--edge); }
.rk.ng { background: var(--bg); color: var(--ink-2); box-shadow: inset 0 0 0 1.5px var(--edge); }
.rk.na, .rk.full { background: #dcd9d3; color: var(--ink-2); box-shadow: none; }   /* 比べられない (非公表・記録なし・前回は空きなし) は 1 つの色 */
.gl { margin-left: 2px; font-style: normal; font-weight: 700; }
.gl.ok { color: var(--brand); }
.gl.tie { color: #8a6100; }
.gl.ng { color: var(--ink-2); }
.ex-cap, .ex-idx { padding: 10px 20px; border-top: 1px solid var(--line); font-size: var(--fs-2); line-height: 1.6; color: var(--ink-2); }
.ex-help { border-top: 1px solid var(--line); }
.ex-help summary { display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 20px; font-size: var(--fs-2); font-weight: 500; color: var(--brand); cursor: pointer; list-style: none; }
.ex-help summary::-webkit-details-marker { display: none; }
.ex-help summary::before { content: "?"; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px currentColor; font-size: var(--fs-1); font-weight: 700; }
.ex-help dl { margin: 0; padding: 0 20px 4px; font-size: var(--fs-2); line-height: 1.6; }
.ex-help dl div { display: flex; gap: 12px; padding: 6px 0; border-top: 1px solid var(--line); }
.ex-help dt { flex: none; width: 6.5em; font-weight: 600; }
.ex-help dd { margin: 0; color: var(--ink-2); }
.ex-help > a { display: inline-flex; align-items: center; min-height: 40px; margin: 0 20px 8px; font-size: var(--fs-2); }
.tm { display: flex; flex-direction: column; align-items: flex-end; font-size: var(--fs-2); line-height: 1.25; color: var(--ink-2); white-space: nowrap; }
.tm b { font-size: var(--fs-4); font-weight: 700; color: var(--ink); }
.tm small { margin-bottom: 1px; font-size: var(--fs-1); color: var(--ink-3); }
.tm > span { font-size: var(--fs-2); }
.ex-more { display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 20px; border-top: 1px solid var(--line); font-size: var(--fs-3); font-weight: 600; text-decoration: none; }
.ex-more:hover { background: var(--brand-wash); }

.sec { padding: 40px 0 8px; border-top: 1px solid var(--line); }
.sec h2 { margin: 0; }
.sec > p { margin-top: 12px; max-width: 38em; color: var(--ink-2); }
.sec > .more { margin-top: 8px; }
.sec-h { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 16px; }
.line { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 0 24px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.sec-h + .line, .lines { margin-top: 12px; border-top: 1px solid var(--line); }
.sec .line:last-of-type { border-bottom: 0; }
.line h2, .line h3 { display: flex; align-items: flex-start; gap: 8px; margin: 0; padding-top: 11px; font-size: var(--fs-2); line-height: 1.5; font-weight: 600; color: var(--ink-2); }
.ln-c { flex: none; width: 4px; height: 1.2em; margin-top: 1px; border-radius: 2px; }
.line ul { display: flex; flex-wrap: wrap; gap: 0 4px; }
.line a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; border-radius: var(--r-s); font-size: var(--fs-3); font-weight: 500; color: var(--ink); text-decoration: none; }
.line a:hover { background: var(--wash); color: var(--brand); }
.line a small { margin-left: 4px; font-size: var(--fs-1); font-weight: 400; color: var(--ink-3); }
.line a.zero { color: var(--ink-3); font-weight: 400; }      /* 徒歩 15 分以内に園の無い駅は薄く (押しても園が出ないことが分かるように) */
.sec-note { margin-top: 12px; font-size: var(--fs-2); color: var(--ink-3); }
.sec-note a { margin-left: 4px; font-weight: 600; }

/* ---------- 駅のページ ---------- */
.station-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; }
.station-head .btn-2 { flex: none; }
.controls { margin-top: 24px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
.fld { display: flex; align-items: center; gap: 10px; min-width: 0; }
.fld-l { font-size: var(--fs-2); font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.sel {
  height: 44px; padding: 0 36px 0 12px; border: 1px solid var(--edge); border-radius: var(--r-m);
  background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5l3 3 3-3' fill='none' stroke='%234a505a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center / 12px 12px;
  font-size: 16px; font-weight: 600; color: var(--ink); -webkit-appearance: none; appearance: none; cursor: pointer;
}
.sel:hover { border-color: var(--ink-3); }
.num {
  width: 92px; height: 40px; padding: 0 10px; border: 1px solid var(--edge); border-radius: var(--r-m); background: var(--bg);
  font-size: 16px; font-weight: 600; text-align: center; outline: none; -moz-appearance: textfield;
}
.num::-webkit-outer-spin-button, .num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.num:focus { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.num.bad { border-color: var(--warn); box-shadow: inset 0 0 0 1px var(--warn); }
.aside { display: inline-flex; align-items: center; min-height: 40px; font-size: var(--fs-2); font-weight: 600; text-decoration: none; }
.aside:hover { text-decoration: underline; }
.err { flex-basis: 100%; margin-top: -4px; font-size: var(--fs-2); font-weight: 600; color: var(--warn); }
.age-note { display: flex; flex-wrap: wrap; align-items: center; gap: 0 10px; margin-top: 8px; font-size: var(--fs-2); color: var(--ink-2); }
.age-note button { min-height: 40px; padding: 0 4px; border: 0; background: none; color: var(--brand); font-size: var(--fs-2); font-weight: 600; }
.legend-line { margin-top: 4px; font-size: var(--fs-1); line-height: 1.8; color: var(--ink-3); }
.legend-line { text-wrap: pretty; }
.legend-line a { margin-left: 4px; padding: 11px 4px; font-weight: 600; text-decoration: none; white-space: nowrap; }

.list { width: 100%; margin-top: 8px; border-collapse: collapse; }
.list thead th { position: sticky; top: var(--head-h); z-index: 1; background: var(--bg); padding: 10px 4px; font-size: var(--fs-1); line-height: 1.4; font-weight: 600; color: var(--ink-3); text-align: right; vertical-align: bottom; white-space: nowrap; border-bottom: 1px solid var(--ink); }
.list th.l, .list tbody th { text-align: left; padding-left: 0; }
.list tbody th, .list td { padding: 14px 4px; border-bottom: 1px solid var(--line); vertical-align: top; }
.list tbody th { font-weight: 400; padding-left: 0; }
.list td { width: 84px; text-align: right; font-size: var(--fs-4); font-weight: 700; line-height: 1.4; white-space: nowrap; }
.list td.wk { width: 64px; font-weight: 400; font-size: var(--fs-2); }
.list td .w { font-size: var(--fs-2); font-weight: 600; }
.list td .na { font-size: var(--fs-2); font-weight: 600; color: var(--ink-3); }
.list td.wk b { font-size: var(--fs-4); font-weight: 700; line-height: 1; }
.list td small { display: block; font-size: var(--fs-1); line-height: 1.4; font-weight: 400; color: var(--ink-3); white-space: normal; }
.list td.nc { width: auto; font-size: var(--fs-2); font-weight: 400; color: var(--ink-3); text-align: left; white-space: normal; }
.nm { display: block; font-size: var(--fs-3); line-height: 1.5; font-weight: 600; }
.nm a { display: inline-block; padding: 8px 0; margin: -6px 0;  color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.nm a:hover { color: var(--brand); text-decoration-color: currentColor; }
.tg, .cl, .ag, .nt { display: block; font-size: var(--fs-1); line-height: 1.6; color: var(--ink-3); }
.cl, .ag { color: var(--ink-2); font-weight: 600; }
.nt { margin-top: 3px; }
.na { color: var(--ink-3); font-weight: 400; }
/* 前回の最低指数との比較。地図の番号の丸と同じ色の意味: 上回る = 藍、同じ = 山吹に墨字、下回る = 白に灰の輪 */
.mark { margin-left: 2px; font-size: var(--fs-2); font-weight: 700; white-space: nowrap; }
.min.ok, .mark.ok { color: var(--brand); }
.min.tie, .mark.tie { color: #8a6100; }
.min.ng, .mark.ng { color: var(--ink-3); }
.min.ng { font-weight: 500; }
body[data-age] tr.r { display: none; }
body[data-age] .ag { display: none; }
body[data-age="0"] tr.r[data-age="0"], body[data-age="1"] tr.r[data-age="1"], body[data-age="2"] tr.r[data-age="2"],
body[data-age="3"] tr.r[data-age="3"], body[data-age="4"] tr.r[data-age="4"], body[data-age="5"] tr.r[data-age="5"] { display: table-row; }
body[data-age]:not(.show-none) tr.r.none { display: none; }

/* ---------- 駅の一覧 ---------- */
.stations { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); column-gap: 24px; margin-top: 8px; }
.stations.one { grid-template-columns: 1fr; margin-top: 40px; }
.stations a { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 500; }
.stations a:hover { color: var(--brand); }
.stations b { font-size: var(--fs-2); font-weight: 600; color: var(--ink-3); }
.eki-index > h2 { font-size: var(--fs-2); font-weight: 600; color: var(--ink-3); margin-top: 32px; letter-spacing: .04em; }

/* ---------- ルール ---------- */
.article p { margin-top: 12px; color: var(--ink-2); text-wrap: pretty; }
.article h2 { padding-top: 20px; border-top: 1px solid var(--line); }
.article h2 + p, .article h2 + ol, .article h2 + dl { margin-top: 12px; }
.article .rule-lead { margin-top: 14px; font-size: var(--fs-4); line-height: 1.75; font-weight: 600; color: var(--ink); }
.steps { margin-top: 14px; padding-left: 1.4em; list-style: decimal; color: var(--ink-2); display: flex; flex-direction: column; gap: 8px; }
.steps li::marker { font-weight: 700; color: var(--ink); }
.legend { margin-top: 12px; font-size: var(--fs-3); line-height: 1.7; }
.legend > div { display: flex; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.legend dt { flex: none; width: 120px; font-weight: 700; }
.legend dt small { display: block; font-size: var(--fs-1); font-weight: 400; color: var(--ink-3); }
.legend dd { color: var(--ink-2); }
.article .wide-btn { margin-top: 40px; }

/* ---------- サイトマップ ---------- */
.sitemap > h2 { font-size: var(--fs-3); margin-top: 32px; padding-bottom: 8px; border-bottom: 1px solid var(--ink); }
.sitemap h3 { margin-top: 18px; }
.sm-list { margin-top: 4px; }
.sm-list.cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); column-gap: 20px; }
.sm-list a { display: flex; align-items: center; min-height: 44px; border-bottom: 1px solid var(--line); font-size: var(--fs-3); font-weight: 500; color: var(--ink); text-decoration: none; }
.sm-list a:hover { color: var(--brand); }

/* ---------- 狭い画面 ---------- */
@media (max-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1fr); grid-template-areas: "main" "ex"; gap: 32px; padding: 32px 0 40px; }
  .hero .ward { display: none; }    /* スマホでは図を出さず、検索のすぐ下に実例を出す */
  .search { max-width: none; }
}
@media (max-width: 640px) {
  :root { --head-h: 56px; }
  .wrap { padding: 0 16px; }
  .nav-l { padding: 0 8px; }
  .site-head .btn { margin-left: 4px; padding: 0 12px; }
  .site-head .wrap { gap: 8px; }
  h1 { font-size: var(--fs-5); }
  h2 { font-size: var(--fs-4); margin-top: 40px; }
  .hero { padding-top: 24px; }
  .search .btn { padding: 0 16px; }
  .ex-head, .ex-list a, .ex-more { padding-left: 16px; padding-right: 16px; }
  .line { grid-template-columns: minmax(0, 1fr); padding: 8px 0; }
  .line h2, .line h3 { padding-top: 4px; }
  .foot-map { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; }   /* 足もとのリンクは 2 列 (前は 16 個が 1 列で長かった) */
  .line ul { margin-left: -10px; }

  /* 駅のページ: 園名を 1 行ぶん使い、数字は見出しを添えてその下に並べる */
  .station-head .btn-2 { width: 100%; }
  .controls { flex-direction: column; align-items: stretch; gap: 10px; }
  .fld { justify-content: space-between; }
  .fld .fld-l { width: 5.5em; }
  .sel { flex: 1; min-width: 0; width: 100%; text-overflow: ellipsis; }   /* 選択肢の文 (生まれた日の範囲つき) が長くても、画面からはみ出さない */
  .num { flex: 1; width: auto; }
  .err { margin-top: -2px; }
  .list, .list tbody { display: block; }
  .list thead { display: none; }
  .list tr { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, .9fr) minmax(0, 1.2fr) minmax(0, 1.1fr); column-gap: 8px; padding: 14px 0; border-bottom: 1px solid var(--line); }
  body[data-age="0"] tr.r[data-age="0"], body[data-age="1"] tr.r[data-age="1"], body[data-age="2"] tr.r[data-age="2"],
  body[data-age="3"] tr.r[data-age="3"], body[data-age="4"] tr.r[data-age="4"], body[data-age="5"] tr.r[data-age="5"] { display: grid; }
  .list tbody th { grid-column: 1 / -1; border: 0; padding: 0 0 10px; }
  .list td, .list td.wk { width: auto; border: 0; padding: 0; text-align: left; white-space: normal; font-size: var(--fs-3); }
  .list td.wk b { font-size: var(--fs-4); }
  .list td[data-l]::before { content: attr(data-l); display: block; margin-bottom: 2px; font-size: var(--fs-1); font-weight: 600; color: var(--ink-3); white-space: nowrap; }
  .list td.nc { grid-column: 2 / -1; }
  .legend > div { flex-direction: column; gap: 4px; }
  .legend dt { width: auto; }
}

@media print {
  .site-head, .site-foot .foot-map, .controls, .station-head .btn-2, .crumb, .age-note { display: none !important; }
  .list thead th { position: static; }
  .list tr { break-inside: avoid; }
}

/* 見つからないページ (404) */
.nf { padding: 24px 0 8px; }
.nf .lead { margin-top: 12px; }
.nf-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }

/* 運営者と問い合わせ (足もとの「このサイトについて」) */
.op { margin-top: 10px; }
.op div { display: flex; gap: 12px; padding: 4px 0; }
.op dt { flex: none; width: 7em; color: var(--ink-3); }
.op a { display: inline-flex; align-items: center; min-height: 40px; }
/* 問い合わせのページ */
.contact { display: grid; gap: 16px; max-width: 560px; margin-top: 24px; }
.contact .f { display: grid; gap: 6px; font-size: var(--fs-2); font-weight: 600; color: var(--ink-2); }
.contact .f small { margin-left: 8px; font-weight: 400; color: var(--ink-3); }
.contact input, .contact select, .contact textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--edge); border-radius: var(--r-m); background: var(--bg);
  font: 400 16px/1.6 var(--font); color: var(--ink);
}
.contact input, .contact select { height: 44px; }
.contact textarea { resize: vertical; min-height: 160px; }
.contact input:focus, .contact select:focus, .contact textarea:focus { outline: 2px solid var(--brand-2); outline-offset: 1px; }
.contact .btn { justify-self: start; min-width: 120px; }
.contact .btn:disabled { opacity: .6; }
.contact .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact .note, .contact-page > .note { font-size: var(--fs-2); color: var(--ink-3); }
.contact-page > .note { margin-top: 24px; }
.contact .result { padding: 10px 12px; border-radius: var(--r-m); font-size: var(--fs-2); font-weight: 600; }
.contact .result.ok { background: var(--brand-wash); color: var(--brand); }
.contact .result.ng { background: #f8ebe6; color: var(--warn); }

/* 表 (特定商取引法に基づく表記・プライバシーポリシー・年パスの「買う前に」) */
.legal { margin-top: 16px; border-top: 1px solid var(--line); }
.legal > div { display: flex; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.legal dt { flex: none; width: 9em; font-weight: 700; }
.legal dd { color: var(--ink-2); text-wrap: pretty; }
.article .note { margin-top: 24px; font-size: var(--fs-2); color: var(--ink-3); }
@media (max-width: 560px) {
  .legal > div { flex-direction: column; gap: 2px; }
  .legal dt { width: auto; }
}
/* 年パスのページ */
.pass-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; margin-top: 8px; font-size: var(--fs-4); font-weight: 700; }
.article .pass-price { color: var(--ink); }
.pass-price b { font-size: var(--fs-6); font-weight: 700; line-height: 1.2; }
.pass-price small { font-size: var(--fs-2); font-weight: 600; color: var(--ink-3); }
/* 「こういうときに使います」の 3 行と、要らない人への一言。価格のすぐ下に、買う場所 (#buy) へ進むボタン */
.pass-page .lead { font-weight: 700; color: var(--ink); }
.pass-when { display: grid; gap: 6px; max-width: 560px; margin-top: 8px; }
.pass-when li { position: relative; padding-left: 16px; color: var(--ink); }
.pass-when li::before { content: ""; position: absolute; left: 2px; top: .75em; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
.article .pass-enough { margin-top: 10px; font-size: var(--fs-2); color: var(--ink-2); }
.article .pass-price { margin-top: 20px; }
.pass-go { margin-top: 12px; }
/* 買う手順 (1 鍵を作る → 2 カードで払う)。いまの手順だけ藍にする */
.pass-steps { display: flex; flex-wrap: wrap; gap: 6px 18px; counter-reset: st; font-size: var(--fs-2); color: var(--ink-3); }
.pass-steps li { display: flex; align-items: center; gap: 6px; counter-increment: st; }
.pass-steps li::before { content: counter(st); display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--line-2); font-size: var(--fs-1); font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.pass-steps[data-at="1"] li:nth-child(1), .pass-steps[data-at="2"] li:nth-child(2) { font-weight: 700; color: var(--ink); }
.pass-steps[data-at="1"] li:nth-child(1)::before, .pass-steps[data-at="2"] li:nth-child(2)::before { background: var(--brand); color: #fff; }
.pass-box { display: grid; gap: 14px; justify-items: start; max-width: 560px; margin-top: 20px; padding: 18px 20px; border-radius: var(--r-l); background: var(--wash); }
.article .pass-box p { margin-top: 0; }
.pass-msg { font-weight: 600; color: var(--ink); }
.pass-msg.ok { color: var(--brand); }
.pass-msg.ng { color: var(--warn); }
.article .pass-url-l { font-size: var(--fs-2); }
.article .pass-fine { font-size: var(--fs-2); color: var(--ink-3); }
.pass-fine a { margin-left: 4px; }
.pass-list { margin-top: 12px; border-top: 1px solid var(--line); }
.pass-list li { display: flex; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.pass-list b { flex: none; width: 9em; }
.pass-list span { color: var(--ink-2); }
@media (max-width: 560px) {
  .pass-list li { flex-direction: column; gap: 2px; }
  .pass-list b { width: auto; }
}
.pass-login { display: grid; gap: 10px; width: 100%; }
.pass-login b { display: block; color: var(--ink); }
.pass-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.pass-acct { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; width: 100%; padding-top: 12px; border-top: 1px solid var(--line-2); font-size: var(--fs-2); color: var(--ink-3); }
.pass-acct .link { min-height: 40px; border: 0; background: none; padding: 0; font-size: var(--fs-2); font-weight: 600; color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
.pass-pay { display: grid; gap: 12px; width: 100%; }
.article .pass-sum { font-size: var(--fs-2); color: var(--ink-2); }
.pass-sum b { display: block; font-size: var(--fs-4); color: var(--ink); }
.pay-wallets { display: grid; gap: 8px; }
.pay-wallets:has(> :not([hidden])) { margin-bottom: 4px; }
.pay-apple { height: 44px; width: 100%; border: 0; border-radius: var(--r-m); -webkit-appearance: -apple-pay-button; -apple-pay-button-type: buy; -apple-pay-button-style: black; cursor: pointer; }
.pay-google { height: 44px; width: 100%; }
.pay-card { min-height: 90px; }
.pass-pay .btn { width: 100%; }
.pass-pay .btn:disabled { opacity: .6; }

@media (max-width: 640px) {
  .nl-x { display: none; }     /* 帯の「希望順位のルール」は、スマホでは「ルール」 */
}
@media (max-width: 420px) {
  .brand-t { font-size: var(--fs-2); }
}

/* ---------- 園のページ ---------- */
.en-head h1 { word-break: auto-phrase; }
.en-head .lead { display: flex; flex-direction: column; gap: 6px; }
.en-y { font-size: var(--fs-2); color: var(--ink-3); }
.tags { display: flex; flex-wrap: wrap; gap: 4px 6px; }
.tags span { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: var(--r-s); background: var(--wash); font-size: var(--fs-1); font-weight: 600; color: var(--ink-2); }
.en-page > h2 { margin-top: 40px; font-size: var(--fs-4); }
.en-st { margin-top: 8px; border-top: 1px solid var(--line); }
.en-st li { display: flex; align-items: center; gap: 12px; min-height: 52px; border-bottom: 1px solid var(--line); }
.en-st li > a:first-child { font-weight: 600; color: var(--ink); }
.en-st li > span { margin-left: auto; font-size: var(--fs-2); color: var(--ink-2); }
.en-st b { margin: 0 1px; font-size: var(--fs-4); color: var(--ink); }
.en-st .aside { padding: 0 4px; }
.en-ctl { margin-top: 12px; }
.en-tbl tbody th { font-size: var(--fs-3); font-weight: 700; }
.en-tbl tbody th small { display: block; font-size: var(--fs-1); font-weight: 400; color: var(--ink-3); }
.en-tbl tr.sub td { width: auto; padding-top: 0; text-align: left; white-space: normal; font-size: var(--fs-1); font-weight: 400; color: var(--ink-3); }
.en-links { margin-top: 8px; border-top: 1px solid var(--line); }
.en-links a { display: flex; align-items: center; min-height: 48px; border-bottom: 1px solid var(--line); font-weight: 600; }
.en-page .note { margin-top: 16px; font-size: var(--fs-2); color: var(--ink-3); }
.en-page .note a { margin-left: 4px; }
.kana-nav { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.kana-nav a { display: grid; place-items: center; min-width: 44px; min-height: 44px; border: 1px solid var(--line-2); border-radius: var(--r-s); font-weight: 600; color: var(--ink); text-decoration: none; }
.kana-nav a:hover { border-color: var(--ink-3); color: var(--brand); }
.en-list a span { min-width: 0; padding: 6px 0; line-height: 1.5; }   /* 長い園名も省略せず折り返す */
.en-list a small { flex: none; font-size: var(--fs-1); font-weight: 400; color: var(--ink-3); }
@media (max-width: 640px) {
  .en-page > h2 { margin-top: 32px; }
  .en-tbl td.nc { grid-column: 1 / -1; }
  .en-tbl tr.sub { display: block; padding-top: 0; }
  .en-tbl tr.sub td { display: block; }
}

/* 年パス: カードの入力欄を読み込むあいだ (3 秒ほど) の表示 */
.pay-wait { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 0 14px; border: 1px dashed var(--edge); border-radius: var(--r-m); background: var(--bg); font-size: var(--fs-2); color: var(--ink-2); }
.article .pass-box .pay-wait { margin-top: 0; }
.pay-wait i { width: 16px; height: 16px; flex: none; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--brand); animation: pay-spin .8s linear infinite; }
@keyframes pay-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .pay-wait i { animation: none; } }
.pay-wait:not([hidden]) + .pay-card { min-height: 0; }

/* トップの検索欄の候補 (app.js)。地図の画面の候補と同じ形 */
.search .box { z-index: 3; }
.t-sg { position: absolute; left: 0; right: 0; top: calc(100% + 6px); max-height: min(420px, 60vh); overflow-y: auto; padding: 4px 0; border: 1px solid var(--line-2); border-radius: var(--r-m); background: var(--bg); box-shadow: 0 12px 32px rgba(29, 33, 37, .14); }
.t-sg .o { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 8px 14px; border: 0; background: none; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.t-sg .o.town { align-items: flex-start; cursor: default; }
.t-sg .o[aria-selected="true"], .t-sg .o:hover { background: var(--wash); }
.sg-i { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--wash); color: var(--ink-2); }
.sg-i svg { width: 16px; height: 16px; }
.t-sg .o.s .sg-i { background: var(--ink); color: #fff; }
.t-sg .o[aria-selected="true"] .sg-i, .t-sg .o:hover .sg-i { background: #fff; }
.t-sg .o.s[aria-selected="true"] .sg-i, .t-sg .o.s:hover .sg-i { background: var(--ink); }
.sg-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sg-t b { font-size: var(--fs-3); font-weight: 600; color: var(--ink); line-height: 1.4; }
.sg-t small { font-size: var(--fs-1); color: var(--ink-3); line-height: 1.4; }
.t-sg .cn { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.t-sg .cn button { min-width: 40px; height: 40px; padding: 0 8px; border: 0; border-radius: var(--r-m); background: var(--bg); box-shadow: inset 0 0 0 1px var(--edge); font: 600 var(--fs-3)/1 var(--font); color: var(--ink); cursor: pointer; }
.t-sg .cn button:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.t-sg .cn em { margin-left: 2px; font-style: normal; font-size: var(--fs-2); color: var(--ink-3); }
.t-sg .none { padding: 12px 14px; font-size: var(--fs-2); color: var(--ink-2); }
.t-sg .none small { display: block; font-size: var(--fs-1); color: var(--ink-3); }

/* 年パスのページの「例」(実際の値で、画面と同じ形を小さく描く) */
.px { display: block; overflow-x: auto; margin-top: 8px; padding: 10px 12px; border-radius: var(--r-m); background: var(--wash); font-size: var(--fs-2); line-height: 1.7; color: var(--ink-2); }
.px b { margin: 0 2px; font-size: var(--fs-4); color: var(--ink); }
.px-strip { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0; }
.px-strip .rk { width: 24px; height: 24px; }
.px-tbl { width: 100%; margin: 6px 0; border-collapse: collapse; font-size: var(--fs-2); }
.px-tbl th, .px-tbl td { padding: 4px 6px; border-bottom: 1px solid var(--line-2); text-align: right; white-space: nowrap; }
.px-tbl th:first-child { text-align: left; white-space: normal; overflow-wrap: anywhere; word-break: normal; font-weight: 600; }
.px-tbl thead th { font-size: var(--fs-1); font-weight: 600; color: var(--ink-3); }

/* ルール: 選考の進み方の例の図。パソコンは「申込者・第1希望・第2希望・結果」の列で幅をそろえ、横の矢印でつなぐ。
   スマホは 1 人ずつ縦に並べ、下向きの矢印でつなぐ (横に折り返すと、矢印から始まる行ができた) */
.flow { margin: 20px 0 0; padding: 16px; border-radius: var(--r-l); background: var(--wash); }
.flow-h, .flow-row { display: grid; grid-template-columns: 6.5em minmax(0, 1fr) minmax(0, 1fr) 9.5em; gap: 0 24px; align-items: stretch; }
.flow-h { padding-bottom: 6px; font-size: var(--fs-1); font-weight: 600; color: var(--ink-3); }
.flow-row { padding: 8px 0; }
.flow-row + .flow-row { border-top: 1px solid var(--line-2); }
.flow .fb { position: relative; display: flex; flex-direction: column; justify-content: center; min-height: 52px; padding: 6px 10px; border-radius: var(--r-m); background: var(--bg); box-shadow: inset 0 0 0 1px var(--line-2); font-size: var(--fs-2); line-height: 1.4; color: var(--ink-2); }
.flow .fb i { font-style: normal; font-size: var(--fs-1); color: var(--ink-3); display: none; }
.flow .fb b { font-size: var(--fs-3); color: var(--ink); }
.flow .fb small { font-size: var(--fs-1); color: var(--ink-3); }
.flow .fb + .fb::before { content: ""; position: absolute; left: -20px; top: 50%; width: 14px; height: 2px; background: var(--edge); }
.flow .fb + .fb::after { content: ""; position: absolute; left: -8px; top: calc(50% - 4px); border: 5px solid transparent; border-left-color: var(--edge); border-right: 0; }
.flow .fx { background: none; box-shadow: none; }
.flow .fx::before { width: calc(100% + 14px) !important; }     /* 第2希望を確かめない行は、線だけで結果へつなぐ */
.flow .fx + .fb::before, .flow .fx::after { display: none; }
.flow .fp { background: var(--ink); color: #fff; box-shadow: none; }
.flow .fp b { color: #fff; }
.flow .fr { font-weight: 700; color: var(--ink-2); }
.flow .fr.ok { background: var(--brand); color: #fff; box-shadow: none; }
.flow figcaption { margin-top: 10px; font-size: var(--fs-2); line-height: 1.7; color: var(--ink-2); }
@media (max-width: 640px) {
  .flow-h { display: none; }
  .flow-row { grid-template-columns: minmax(0, 1fr); gap: 20px 0; padding: 12px 0; }
  .flow .fb i { display: block; }
  .flow .fx { display: none; }
  .flow .fb + .fb::before { left: 50%; top: -16px; width: 2px; height: 10px; }
  .flow .fb + .fb::after { left: calc(50% - 4px); top: -8px; border: 5px solid transparent; border-top-color: var(--edge); border-bottom: 0; }
  .flow .fx + .fb::before { display: block; }
}
/* 幅の狭い端末 (iPhone SE など 389px 以下) では、帯の「駅の一覧」を出さない (サイト名とぶつかった)。駅の一覧は足もとから行ける */
.site-head .brand { flex: none; }
@media (max-width: 389px) {
  .site-head .nav-l[href$="eki/"] { display: none; }
}
@media (max-width: 640px) {
  .brand-t span { display: block; line-height: 1.25; }   /* スマホではサイト名と地域を 2 行にする (帯の幅を空ける) */
}

/* 管理画面 (/admin) */
.adm-me { margin-top: 12px; color: var(--ink-2); }
.adm-me p + p { margin-top: 8px; }
.adm-new { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.adm-new input { flex: 1; min-width: 200px; height: 44px; padding: 0 12px; border: 1px solid var(--edge); border-radius: var(--r-m); font: 400 16px var(--font); }
.adm-list { margin-top: 12px; border-top: 1px solid var(--line); }
.adm-u { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.adm-u b { display: block; }
.adm-u small { display: block; font-size: var(--fs-1); color: var(--ink-3); }
.adm-tag { padding: 1px 6px; border-radius: var(--r-s); background: var(--brand-wash); font-size: var(--fs-1); color: var(--brand); }
.adm-acts { display: flex; align-items: center; gap: 12px; }
.adm-acts .btn-2 { min-height: 40px; padding: 0 14px; font-size: var(--fs-2); }
.adm-acts .link { min-height: 40px; border: 0; background: none; color: var(--brand); font: 600 var(--fs-2) var(--font); text-decoration: underline; cursor: pointer; }
