/* Kumamoto BusDoko の画面スタイル（段階2で index.html から分離）。
   見た目は分離前と同一。スプラッシュも含め全ルールをここに置く:
   <head> の <link rel="stylesheet"> はレンダリングブロックのため、
   読み込みが終わるまで描画されず FOUC は起きない。 */
  :root { color-scheme: light; font-family: system-ui, sans-serif;
    --ink: #26241f; --bg: #eceae4; --surface: #fbf9f3; --primary: #33322e; --primary-dark: #26251f;
    --primary-ink: #f3efe4; --accent: #c9a227; --line: #d8d2bd; --muted: #6f6a5c; --warn: #f5edd3; --hover: #e8e2cf; --alert: #b3261e;
    color: var(--ink); background: var(--bg); }
  :root[data-font="large"] { font-size: 112.5%; }
  * { box-sizing: border-box; }
  body { margin: 0; }
  /* display: flow-root で子要素の上マージンがヘッダーの外へ突き抜ける
     （マージンの相殺）のを防ぐ。帯（.led）をヘッダーの外へ出したため、
     注記の margin-top が帯との間にページ背景の白い帯を作っていた。 */
  header { display: flow-root; background: var(--primary); color: var(--primary-ink); padding: 0 0 1.2rem; border-bottom: 5px solid var(--accent); }
  /* 看板（帯）はヘッダーの外（body 直下）に置き、スクロールしても
     上端に残るようにする。残るのは帯だけで、日付の注記と設定ピルは
     ヘッダー側に残って流れていく。 */
  .led { position: sticky; top: 0; z-index: 600; overflow: hidden; background: linear-gradient(180deg, #171713, #0b0b0d); padding: calc(1.15rem + env(safe-area-inset-top, 0px)) max(1rem, calc((100% - 52rem) / 2)) 1rem; transition: padding .18s ease; }
  /* 追従中は細くして本文の邪魔を減らす。is-stuck は startup.js が
     スクロール量を見て付け外しする。タイトルは読める大きさのまま、
     英語の小見出しは隠し、絵は小さくする。 */
  .led.is-stuck { padding-top: calc(.45rem + env(safe-area-inset-top, 0px)); padding-bottom: .45rem; box-shadow: 0 2px 10px rgba(11, 11, 13, .45); }
  .led.is-stuck .led-title { font-size: 1.12rem; }
  .led.is-stuck .led-sub { display: none; }
  .led.is-stuck .led-art { width: 92px; }
  .led.is-stuck .led-castle-img { height: 32px; }
  .led.is-stuck .led-bus { height: 25px; }
  .header-note, .themes { margin-left: max(1rem, calc((100% - 52rem) / 2)); margin-right: max(1rem, calc((100% - 52rem) / 2)); }
  .led-text { position: relative; z-index: 1; }
  .led-title { font-weight: 900; font-size: clamp(1.55rem, 6vw, 2.1rem); letter-spacing: .05em; color: #f3ead2; transition: font-size .18s ease; }
  .led-sub { font-family: "Courier New", monospace; color: #c9a227; font-size: .8rem; letter-spacing: .34em; margin-top: .3rem; }
  /* 絵は少し小さくして下端に座らせ、上端（端末の状態表示の領域）に
     城の屋根やバスが届かないようにする。 */
  .led-art { position: absolute; right: max(.4rem, calc((100% - 52rem) / 2)); bottom: 0; z-index: 0; width: 172px; display: flex; align-items: flex-end; justify-content: flex-end; gap: 3px; transition: width .18s ease; }
  /* 月＋城は採用アイコンから切り出した画像。バスだけ SVG で横に置く。 */
  .led-castle-img { display: block; height: 60px; width: auto; transition: height .18s ease; }
  .led-bus { display: block; height: 44px; width: auto; transition: height .18s ease; }
  /* 文字を大きくした時はタイトルも伸びるので、絵を少し縮めて文字に被せない。 */
  :root[data-font="large"] .led-art { width: 148px; }
  /* 狭い画面ではタイトルとの間隔が詰まるので、絵を一段縮めて月に被せない。 */
  @media (max-width: 400px) { .led-art { width: 150px; } }
  /* スプラッシュ: 上に月（夜）／太陽（昼）＋城、中央にタイトル、
     下部に産交バスが右奥から走ってきて止まり、最下部に読み込みバー。
     昼夜は <head> のスクリプトが熊本の日の出・日の入りで判定して
     dataset.splash に入れる（日の出〜日の入りが day、それ以外が night）。
     表示時間は従来どおり
     最短1,200ms・上限2,000ms（startup-timeout と startup.js が時計）で、
     バスの走行は最短の窓（1.2秒）の中に収まる長さにしてある。 */
  .startup-splash { position: fixed; top: 0; right: 0; bottom: 0; left: 0; inset: 0; z-index: 2000; display: flex; flex-direction: column; align-items: center;
    overflow: hidden; pointer-events: none; background: linear-gradient(180deg, #171713, #0b0b0d);
    animation: startup-timeout 2s ease forwards; }
  .startup-splash.is-ready { animation: startup-fade .18s ease forwards; }
  :root[data-splash="day"] .startup-splash { background: linear-gradient(180deg, #ffffff, #fefaf1 68%, #fdf5df); }
  .startup-art { position: relative; margin-top: max(2rem, 7vh); width: min(236px, 60vw); }
  .startup-art img { width: 100%; display: block; position: relative; }
  .startup-glow { display: none; }
  :root[data-splash="day"] .startup-glow { display: block; position: absolute; inset: -16%; border-radius: 50%;
    background: radial-gradient(closest-side, rgba(255,178,44,.52), rgba(255,178,44,.18) 55%, rgba(255,178,44,0) 78%); }
  .startup-title { color: #f3ead2; font-size: clamp(1.7rem, 9.4vw, 2.3rem); font-weight: 800; letter-spacing: .02em;
    margin-top: clamp(1.2rem, 12vh, 7rem); line-height: 1.3; padding: 0 1rem; text-align: center; white-space: nowrap; }
  :root[data-splash="day"] .startup-title { color: #221f1a; }
  .startup-sub { color: #c9a227; font: .78rem "Courier New", monospace; letter-spacing: .34em; margin-top: .5rem; }
  :root[data-splash="day"] .startup-sub { color: #97781a; }
  .startup-buslane { position: relative; width: 100%; margin-top: auto; }
  .startup-bus { width: min(344px, 88vw); margin: 0 auto; transform-origin: 50% 100%;
    animation: startup-arrive 1s cubic-bezier(.25,.7,.3,1) .1s both; }
  .startup-bus-body { transform-origin: 50% 100%; animation: startup-bob 1s linear .1s both; }
  .startup-bus svg { display: block; width: 100%; height: auto; }
  :root[data-splash="day"] .startup-bus svg { filter: drop-shadow(0 3px 5px rgba(84,66,18,.30)); }
  .startup-bus .wheel { transform-box: fill-box; transform-origin: center;
    animation: startup-spin 1s cubic-bezier(.25,.7,.3,1) .1s both; }
  .startup-ground { position: absolute; left: 0; right: 0; bottom: 10%; height: 2px;
    background: linear-gradient(90deg, rgba(201,162,39,0), rgba(201,162,39,.55) 18%, rgba(201,162,39,.55) 82%, rgba(201,162,39,0)); }
  :root[data-splash="day"] .startup-ground { background: linear-gradient(90deg, rgba(176,141,32,0), rgba(176,141,32,.65) 18%, rgba(176,141,32,.65) 82%, rgba(176,141,32,0)); }
  .startup-bar { width: min(180px, 46vw); height: 4px; border-radius: 2px; background: rgba(243,234,210,.22);
    margin-top: 2.4rem; margin-bottom: 8vh; overflow: hidden; }
  :root[data-splash="day"] .startup-bar { background: #e8e2d1; }
  .startup-bar::before { content: ""; display: block; height: 100%; border-radius: inherit; background: #c9a227;
    transform-origin: left; animation: startup-fill 1.3s ease both; }
  :root[data-splash="day"] .startup-bar::before { background: #bd971f; }
  .startup-splash.is-ready .startup-bar::before { animation: none; }
  @keyframes startup-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
  @keyframes startup-arrive { 0% { transform: translateX(55%) scale(.74); } 70% { transform: translateX(1.7%) scale(.985); } 88% { transform: translateX(-.9%) scale(1.004); } 100% { transform: translateX(0) scale(1); } }
  @keyframes startup-bob { 0%, 100% { transform: translateY(0); } 16% { transform: translateY(-2.5px); } 34% { transform: translateY(0); } 52% { transform: translateY(-2px); } 70% { transform: translateY(0); } 86% { transform: translateY(2.5px); } 94% { transform: translateY(-1px); } }
  @keyframes startup-spin { from { transform: rotate(0deg); } to { transform: rotate(320deg); } }
  @keyframes startup-fade { to { opacity: 0; visibility: hidden; } }
  @keyframes startup-timeout { 0%, 91% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }
  @media (prefers-reduced-motion: reduce) {
    .startup-bar::before { animation: none; }
    .startup-bus, .startup-bus-body, .startup-bus .wheel { animation: none; }
    .led, .led-title, .led-art, .led-castle-img, .led-bus { transition: none; }
  }
  /* 上余白だけを指定する。margin の一括指定だと、全面背景化で付けた
     左右余白（.header-note の margin-left/right）まで 0 に戻ってしまい、
     「本日は○○ダイヤです」が左端で見切れる。 */
  .header-note { margin-top: .65rem; }
  .service-type { font-weight: 700; }
  /* 曜日の色分け（カレンダーの慣例）。ヘッダーの黒地でも読める明るさ。 */
  .dow-sat { color: #7aa8ff; }
  .dow-sun, .dow-holiday { color: #ff8d7e; }
  /* 帯（.led）自体の背景も曜日で変える。平日はクラスなし＝従来の黒。
     土曜は深い青、日曜・祝日は深い赤。城とバスの絵とクリーム色の
     タイトルが従来どおり読めるよう、暗さは黒に寄せてある。 */
  .led.dow-sat { background: linear-gradient(180deg, #1e3a6e, #0d1e3d); }
  .led.dow-sun, .led.dow-holiday { background: linear-gradient(180deg, #5e2126, #331216); }
  .themes { display: flex; gap: .4rem; flex-wrap: nowrap; margin-top: .7rem; }
  .themes button { white-space: nowrap; min-width: 0; }
  .themes button { display: inline-flex; align-items: center; gap: .35rem; background: transparent; color: var(--primary-ink); border: 1.5px solid var(--primary-ink); opacity: .85; padding: .28rem .6rem; border-radius: 999px; font-size: .82rem; }
  .themes button[aria-pressed="true"] { background: var(--primary-ink); color: var(--primary); opacity: 1; font-weight: 700; }
  .romaji { display: block; font-size: .75em; font-weight: 400; color: var(--muted); letter-spacing: .03em; }
  h1, h2, h3 { margin: 0 0 .7rem; line-height: 1.3; }
  h1 { font-size: clamp(1.65rem, 5vw, 2.3rem); }
  .led h1 { margin: 0; }
  main, footer { max-width: 54rem; margin: auto; padding: 1rem; }
  /* 追従中の細い帯の下に、scrollIntoView で先頭へ寄せた要素が隠れないように。 */
  main > section, main > aside { scroll-margin-top: calc(3.6rem + env(safe-area-inset-top, 0px)); }
  section, aside { background: var(--surface); border-radius: 1rem; margin-bottom: 1rem; padding: 1rem; }
  aside { background: var(--warn); }
  #data-update { font-weight: 700; }
  #data-update button { margin-left: .5rem; padding: .3rem .6rem; }
  #install-guide p { margin: .3rem 0; }
  #install-guide .install-title { font-weight: 700; }
  #install-guide button { margin-top: .4rem; padding: .3rem .6rem; }
  /* 使い方カードは熊本城ブラックの板（フッターと同じ基調）で、
     インストール案内（aside の警告色）とは見た目でも重ならない。 */
  #guide-card { background: linear-gradient(180deg, #171713, #0b0b0d); color: var(--primary-ink); border-top: 3px solid var(--accent); }
  #guide-card .guide-title { font-weight: 700; margin: 0 0 .5rem; }
  #guide-card .guide-step { display: flex; align-items: baseline; gap: .55rem; margin: .45rem 0; font-size: 1.08rem; font-weight: 700; line-height: 1.45; }
  #guide-card .guide-num { flex: none; color: var(--accent); font-size: 1.25rem; font-weight: 800; }
  #guide-card button { margin-top: .5rem; padding: .3rem .6rem; }
  footer .guide-link { background: none; border: 0; box-shadow: none; padding: 0; font-size: inherit; color: var(--accent); text-decoration: underline; }
  form, .row { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
  input, button { font: inherit; }
  input { min-width: 0; flex: 1 1 12rem; background: white; border: 1px solid var(--muted); border-radius: .5rem; padding: .55rem .75rem; }
  button { background: white; color: var(--primary); border: 1px solid var(--line); border-radius: 999px; padding: .5rem .95rem; cursor: pointer; box-shadow: 0 2px 6px rgba(38, 36, 31, .07); }
  button:hover { background: var(--hover); }
  button[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); font-weight: 700; }
  a { color: var(--primary); }
  select { font: inherit; border: 1px solid var(--line); border-radius: 999px; padding: .5rem .8rem; background: white; max-width: 100%; }
  /* 検索フォームの統合バー（A案）：入力・音声・検索を1本の pill バーにまとめる。 */
  .bar { display: flex; align-items: center; gap: .35rem; flex: 1 1 100%; min-width: 0; width: 100%; background: white;
    border: 1px solid var(--line); border-radius: 999px; padding: .32rem .32rem .32rem .8rem;
    box-shadow: 0 5px 16px rgba(38, 36, 31, .13); }
  .bar .bar-icon { flex: none; color: var(--muted); }
  .bar input { flex: 1 1 auto; min-width: 0; border: 0; outline: 0; background: transparent; padding: .45rem 0; border-radius: 0; }
  .bar input::placeholder { color: #a39c88; }
  .bar-go { flex: none; border: 0; border-radius: 999px; background: var(--primary); color: var(--primary-ink);
    font-weight: 700; padding: .62rem 1.05rem; box-shadow: none; }
  .bar-go:hover { background: var(--primary-dark); }
  /* 音声ボタンはバー内の丸いマイクボタンにする。JS が textContent で
     「音声で検索／聞き取り中…」を差し替えるので、文字は読み上げ用に
     残したまま font-size: 0 で隠し、アイコンはマスクで currentColor 追随させる。 */
  #voice-button, #place-voice-button { flex: none; width: 2.5rem; height: 2.5rem; padding: 0; border: 0; border-radius: 50%;
    background: var(--surface); color: var(--primary); box-shadow: none; font-size: 0;
    display: inline-flex; align-items: center; justify-content: center; }
  #voice-button::before, #place-voice-button::before { content: ""; width: 1.05rem; height: 1.05rem; background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Crect x='9' y='3' width='6' height='11' rx='3'/%3E%3Cpath d='M5 11a7 7 0 0 0 14 0M12 18v3'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Crect x='9' y='3' width='6' height='11' rx='3'/%3E%3Cpath d='M5 11a7 7 0 0 0 14 0M12 18v3'/%3E%3C/svg%3E") center / contain no-repeat; }
  #voice-button:hover, #place-voice-button:hover { background: var(--hover); }
  /* 声で行き方を聞く入口：行き先フォームの下に置くピル型ボタン。マイクの
     アイコンはバー内の音声ボタンと同じマスクを使い、こちらは文字も
     見せて「現在地から行き方まで出す」入口だと分かるようにする。 */
  .route-voice-row { margin-top: .55rem; }
  #route-voice-button { display: inline-flex; align-items: center; gap: .45rem; min-height: 44px;
    border: 1.5px solid var(--primary); border-radius: 999px; background: var(--surface);
    color: var(--primary); font-weight: 700; padding: .5rem 1rem; box-shadow: none; }
  #route-voice-button::before { content: ""; flex: none; width: 1.05rem; height: 1.05rem; background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Crect x='9' y='3' width='6' height='11' rx='3'/%3E%3Cpath d='M5 11a7 7 0 0 0 14 0M12 18v3'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Crect x='9' y='3' width='6' height='11' rx='3'/%3E%3Cpath d='M5 11a7 7 0 0 0 14 0M12 18v3'/%3E%3C/svg%3E") center / contain no-repeat; }
  #route-voice-button:hover { background: var(--hover); }
  /* 現在地ボタンはバーの下のテキストリンク風（A案）。 */
  #geo-button { background: none; border: 0; box-shadow: none; border-radius: 0; padding: .3rem .1rem;
    color: var(--primary); font-weight: 650; display: inline-flex; align-items: center; gap: .3rem; }
  #geo-button span { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: .25em; }
  #geo-button:hover { background: none; }
  #geo-button:disabled { opacity: .55; }
  /* 時間まわり（2択チップ＋時刻入力）は、場所入力の段と区切って
     ひとかたまりに見せる。詰まった並びにならないよう段間に余白を取る。 */
  .route-time { margin-top: 1.2rem; padding-top: 1.15rem; padding-bottom: .5rem; border-top: 1px solid var(--line); }
  .route-time-heading { font-weight: 700; margin: 0 0 .9rem; }
  .route-time .row + .row { margin-top: .75rem; }
  /* 時間ブロックの中は、見出し→切替→時刻行がくっついて詰まって
     見えないよう段間を広げる。切替は横幅いっぱいにせず、左右にも
     少し余白を持たせてカードの縁から離す。 */
  .route-time .seg { margin: 0 .35rem; }
  .route-time .seg + .row { margin-top: .9rem; }
  /* 出発／到着の切り替えは、1本のバーに収めたセグメント型にする。 */
  .seg { display: flex; border: 1.5px solid var(--primary); border-radius: 999px; overflow: hidden; }
  .seg button { flex: 1; border: 0; border-radius: 0; background: transparent; box-shadow: none; padding: .45rem .4rem; font-weight: 600; min-height: 44px; }
  .seg button + button { border-left: 1.5px solid var(--primary); }
  .seg button[aria-pressed="true"] { background: var(--primary); color: var(--primary-ink); font-weight: 700; }
  /* 時刻入力は全幅に伸ばさず、時刻が1つ入る内容相応の幅にする。 */
  #arrive-by-time { flex: none; width: 8.4rem; text-align: center; border: 1px solid var(--line); border-radius: 999px; padding: .5rem .6rem; box-shadow: 0 2px 6px rgba(38, 36, 31, .07); }
  /* 時刻入力の見出し：出発／着きたいのどちらを探しているか常時示す。 */
  .time-label { font-weight: 700; }
  /* 行き先から探す：手順（1→2→3）を数字で追えるようにする。 */
  .route-step { display: flex; align-items: center; gap: .45rem; font-weight: 700; margin: .9rem 0 .55rem; }
  .route-step:first-of-type { margin-top: 0; }
  .route-step-num { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 1.45rem; height: 1.45rem; border-radius: 50%; background: var(--primary); color: var(--primary-ink); font-size: .9rem; font-weight: 800; }
  .route-origin-label { font-weight: 700; margin: .2rem 0 .5rem; }
  /* ②の塊は要素どうしがくっついて詰まって見えたため、この塊だけ
     段間を広げる：近くのバス停一覧の下、②見出しの下、出発行の下、
     ボタンの下（③見出しとの間）。 */
  #nearby { margin-bottom: 1.25rem; }
  #route-panel .route-origin-label { margin: .8rem 0 .9rem; }
  #route-panel .route-step:last-of-type { margin-top: 1.25rem; }
  #route-origin-form { margin-top: .5rem; }
  /* 行き先から探すの見出し行とリセットボタン。ボタンは控えめに小さくし、
     入力・選択が何もない時は隠す（JS が hidden を切り替える）。 */
  .route-head { margin-bottom: .7rem; }
  .route-head h2 { margin: 0; }
  #route-reset { margin-left: auto; font-size: .85rem; padding: .3rem .7rem; }
  /* 旅程カード：発→（乗り換え）→着を縦に並べ、時刻とバス停を大きく出す。 */
  .itin-row { display: flex; align-items: baseline; gap: .55rem; }
  .itin-row time { flex: none; font-size: 1.2rem; font-weight: 750; font-variant-numeric: tabular-nums; white-space: nowrap; }
  /* 旅程カードのバス停名は2行まで。長い名前が何行にも伸びて
     カードの高さがばらつくのを防ぐ（時刻とタグは flex: none で右に残る）。 */
  .itin-stop { font-weight: 700; min-width: 0; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
  .itin-tag { flex: none; margin-left: auto; white-space: nowrap; font-size: .78rem; font-weight: 800; border-radius: 999px; padding: .08rem .55rem; background: var(--primary); color: var(--primary-ink); }
  .itin-change { margin: .35rem 0 .1rem; color: var(--muted); font-weight: 650; }
  .itin-walk { margin: .3rem 0 0; color: var(--muted); font-size: .9rem; font-weight: 650; }
  .itin-caution { margin: .3rem 0 0; color: var(--alert); font-weight: 800; }
  /* 徒歩の目安カード：歩いた方が早い時だけ、旅程の一番上に控えめに出す。 */
  .walk-card { border: 1.5px dashed var(--muted); border-radius: 1rem; padding: .6rem .9rem; margin-top: .6rem; color: var(--muted); font-weight: 650; }
  /* 終バスの次善策パネル：今日の便がもう無い時だけ、行き方リストの
     所に出す（明日の始発・徒歩・タクシーの目安と呼べる電話番号）。 */
  .lastbus-title { font-size: 1.1rem; font-weight: 800; margin: 0 0 .5rem; }
  .lastbus-line { margin: .3rem 0; font-weight: 650; }
  .lastbus-taxi-title { margin: .8rem 0 .2rem; font-weight: 700; }
  .taxi-phones { display: flex; flex-direction: column; }
  .taxi-phone { display: block; padding: .55rem .2rem; min-height: 44px; box-sizing: border-box; border-top: 1px solid var(--line); color: var(--accent); font-weight: 700; text-decoration: none; }
  .itin-total { flex: none; margin-left: auto; white-space: nowrap; color: var(--accent); font-weight: 700; }
  .guide-num { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 1.45rem; height: 1.45rem; border-radius: 50%; background: var(--primary); color: var(--primary-ink); font-size: .9rem; font-weight: 800; margin-top: .15rem; }
  /* 旅程の案内画面：詳細画面の経由タイムライン（.route-list）と同じ部品で、
     乗るバス停から降りるバス停までを点と縦線でつないで見せる。
     乗り換えの行では線を切り、徒歩の区間は点線にする。 */
  #itinerary-steps { margin: .8rem 0; }
  #itin-detail-list { margin: .8rem 0; }
  #itinerary-steps .tl-name, #itin-detail-list .tl-name { font-weight: 700; font-size: 1.05rem; }
  #itinerary-steps .guide-sub, #itinerary-steps .guide-live, #itinerary-steps .guide-caution, #itin-detail-list .guide-sub, #itin-detail-list .guide-caution { flex: 1 1 100%; }
  #itinerary-steps li.itin-divider .tl-dot, #itin-detail-list li.itin-divider .tl-dot { visibility: hidden; }
  /* 徒歩区間の行は、点の代わりに歩く人のマーク（インラインSVG）を出す。
     区切り行では通常の点は隠れるが、マークは見せる。色は副文と同じ
     muted に寄せ、線の中心に重なるよう少し左へ寄せる。 */
  .tl-dot.tl-walk { border: none; background: none; border-radius: 0; margin-top: .1rem; color: var(--muted); }
  #itinerary-steps li.itin-divider .tl-dot.tl-walk, #itin-detail-list li.itin-divider .tl-dot.tl-walk { visibility: visible; }
  .tl-dot.tl-walk svg { display: block; width: 1.15rem; height: 1.15rem; margin-left: -.18rem; }
  #itinerary-steps li.itin-break::before, #itin-detail-list li.itin-break::before { display: none; }
  #itinerary-steps li.itin-walk::before, #itin-detail-list li.itin-walk::before { background: repeating-linear-gradient(180deg, var(--line) 0, var(--line) 5px, transparent 5px, transparent 10px); }
  #itinerary-steps li.line-end::before, #itin-detail-list li.line-end::before { bottom: 55%; }
  #itinerary-steps li.line-start::before, #itin-detail-list li.line-start::before { top: 55%; }
  #itinerary-steps li.seg-walk-out::before, #itin-detail-list li.seg-walk-out::before { background-color: transparent; background-image: repeating-linear-gradient(180deg, var(--line) 0, var(--line) 5px, transparent 5px, transparent 10px), linear-gradient(var(--line), var(--line)); background-size: 100% 50%, 100% 50%; background-position: 0 100%, 0 0; background-repeat: no-repeat; }
  #itinerary-steps li.seg-walk-in::before, #itin-detail-list li.seg-walk-in::before { background-color: transparent; background-image: repeating-linear-gradient(180deg, var(--line) 0, var(--line) 5px, transparent 5px, transparent 10px), linear-gradient(var(--line), var(--line)); background-size: 100% 50%, 100% 50%; background-position: 0 0, 0 100%; background-repeat: no-repeat; }
  .guide-sub { color: var(--muted); font-weight: 650; margin-top: .15rem; }
  .guide-caution { color: var(--alert); font-weight: 800; margin-top: .15rem; }
  .guide-live { color: var(--primary); font-weight: 700; margin-top: .15rem; }
  /* 案内の「帰りを見る」：入口は案内の一番下に置く幅いっぱいの
     ボタン1つだけ。時刻の入力は当番医カードと同じ白カードの形で、
     「探す」は黒い主ボタン。クイック選択は選んだものが黒になる。 */
  #itinerary-return { margin-top: .8rem; }
  .return-pill-btn { display: block; width: 100%; font-weight: 700; }
  .return-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 1px 4px rgba(38, 36, 31, .12); padding: .8rem .9rem; }
  .return-ask { margin: 0 0 .5rem; font-weight: 700; font-size: 1.05rem; }
  /* iOS Safari は type=time の入力に固有の最小幅があり、大きな文字だと
     width:100% を超えてはみ出す。appearance を切ると CSS の幅どおりに収まる。 */
  #itinerary-return-time { display: block; width: 100%; max-width: 100%; box-sizing: border-box; -webkit-appearance: none; appearance: none; font-size: 1.5rem; font-weight: 750; text-align: center; font-variant-numeric: tabular-nums; padding: .35rem .5rem; border: 1px solid var(--line); border-radius: .6rem; background: var(--surface); color: var(--ink); margin-bottom: .6rem; }
  .return-search-btn { display: block; width: 100%; background: var(--primary); color: var(--primary-ink); font-weight: 700; }
  .return-quick-row { margin-top: .6rem; }
  .return-quick-btn[aria-pressed="true"] { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); font-weight: 700; }
  #itinerary-return-note { margin: .6rem 0 0; }
  .return-cancel-btn { margin-top: .6rem; }
  #itinerary-return-status { margin: .6rem 0; }
  /* 「今日の帰り」のカード：帰り検索で決まった便をホームに残す
     一時置き。金の左帯で通常のバス停カードと区別し、「あと○分」は
     黒いピルで出す。取り消しは見出し行の右端の小さいボタン。 */
  .return-keep-card { border-left: 6px solid var(--accent); cursor: pointer; }
  .return-keep-head { display: flex; align-items: center; gap: .5rem; }
  .return-keep-label { font-weight: 900; font-size: 1.05rem; }
  .return-keep-only { font-size: .72rem; font-weight: 800; color: var(--accent); border: 1.5px solid var(--accent); border-radius: 999px; padding: .05rem .5rem; white-space: nowrap; }
  .return-keep-clear { margin-left: auto; font-size: .82rem; font-weight: 700; padding: .3rem .7rem; }
  .return-keep-main { display: flex; align-items: baseline; gap: .5rem; margin-top: .45rem; }
  .return-keep-main time { font-size: 2.1rem; font-weight: 900; line-height: 1.05; font-variant-numeric: tabular-nums; }
  .return-keep-hatsu { font-size: 1rem; font-weight: 800; }
  .return-keep-count { margin-left: auto; background: var(--primary); color: var(--primary-ink); border-radius: 999px; padding: .35rem .85rem; font-weight: 900; white-space: nowrap; }
  .return-keep-route { font-size: 1rem; font-weight: 700; margin: .4rem 0 0; }
  .return-keep-note { color: var(--muted); font-size: .8rem; margin: .3rem 0 0; }
  .guide-leg-link { cursor: pointer; }
  .guide-more { color: var(--primary); font-weight: 700; margin-left: .45rem; white-space: nowrap; }
  ul, ol { padding-left: 1.4rem; }
  li { margin: .45rem 0; }
  .results { list-style: none; padding: 0; }
  .results button { text-align: left; }
  /* 行き先候補の選択中。タップで付くベージュ（:hover）は別の場所を
     タップすると消える残像なので、選択はクラスで保持して残す。色は
     そのベージュを土台に、金の枠と太字で「選択中」と分かる形にする。
     button[aria-pressed="true"] の暗色ルールより ID 側が勝つ。 */
  #places button.is-selected { background: var(--hover); border-color: var(--accent); color: var(--primary); font-weight: 700; }
  /* 地名候補の副文（町名レベル）と、近くのバス停候補の「最寄り」目印。 */
  .place-sub { color: var(--muted); font-size: .85em; margin-left: .3rem; }
  .near-badge { font-size: .72rem; font-weight: 700; border-radius: 999px; padding: .08rem .55rem; background: var(--primary); color: var(--primary-ink); margin-right: .45rem; }
  /* バス停検索の候補だけ、縦の間延びを抑える：候補同士の間隔と
     ボタンの上下の余白を少し締める（行き先候補など他のリストは対象外）。 */
  #stop-results li { margin: .25rem 0; }
  #stop-results button { padding-top: .4rem; padding-bottom: .4rem; }
  .route-heading { font-weight: 700; color: var(--primary); }
  .muted, small, footer { color: var(--muted); }
  /* 出典の明記は、ヘッダーの看板と対になる黒いプレートに収める。 */
  /* 下の白い余白（margin-bottom）が帯の切れ目に見えるため、フッターは
     ヘッダーと同じく画面の下端まで届かせる。下の角丸も外す。 */
  footer { background: linear-gradient(180deg, #171713, #0b0b0d); color: #cfc7ae; border-top: 3px solid var(--accent); border-radius: .6rem .6rem 0 0; padding: 1rem 1.1rem calc(1rem + env(safe-area-inset-bottom)); font-size: .8rem; line-height: 1.75; margin-bottom: 0; }
  footer a { color: var(--accent); }
  #data-period { display: block; color: #f3ead2; font-weight: 700; margin-bottom: .25rem; }
  .bus { background: white; border: 1px solid var(--line); border-radius: 1rem; padding: .8rem .9rem; margin-top: .6rem; box-shadow: 0 3px 10px rgba(38, 36, 31, .09); }
  .bus .row .go { margin-left: auto; }
  /* いつものバス停カードは、中のピルや発車行がカードの縁に
     張り付いて見えないよう、内側の余白を広めにする。 */
  #usual-stops .bus { padding: 1.2rem 1.3rem; }
  /* いつものバス停カードでは発車行が最大3行積まれ、行き先が長いと
     「あと○分」が行の中で折り返す。行同士の間隔と、折り返した行との
     間隔が無いと塊になって詰まって見えるため、このカードの中だけ
     行間を広げる（他の発車カードは1カード1行で対象外）。 */
  #usual-stops .bus .row { row-gap: .6rem; }
  #usual-stops .bus .row + .row { margin-top: .7rem; }
  /* 発車カードの行：バッジ類は絶対に縮めず、時刻＋あと○分＋終バス＋
     始発＋特急と混んだ時は、カードの中で行を折り返してはみ出しを防ぐ。
     窮屈な時は注記や行き先を省略表示にする。 */
  .bus .row { flex-wrap: wrap; }
  .bus .row time { flex: none; white-space: nowrap; }
  .bus .row .cd { margin-left: auto; white-space: nowrap; flex: none; }
  .bus .row .dest { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .bus .row small { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .bus .row .last, .bus .row .first, .bus .row .badge { flex: none; white-space: nowrap; }
  /* 読み込み中のスケルトン：実データのカード・行に近い形のグレーの
     ブロックを出し、置き換わるまでの間、画面の形を保つ。明滅は薄く、
     モーション抑制の設定では止める。 */
  .skel { pointer-events: none; }
  .skel-bar { display: block; background: #e9e5db; border-radius: .45rem; height: .95rem; animation: skel-pulse 1.6s ease-in-out infinite; }
  .skel-title { width: 55%; height: 1.15rem; margin-bottom: .65rem; }
  .skel-line { width: 80%; margin-top: .6rem; }
  .skel-row { display: flex; align-items: center; gap: .6rem; }
  .skel-row + .skel-row { margin-top: .6rem; }
  .skel-row .skel-bar { animation-delay: .2s; }
  .skel-time { width: 3.4rem; flex: none; }
  .skel-dest { flex: 1; }
  .skel-cd { width: 3.8rem; flex: none; }
  @keyframes skel-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }
  @media (prefers-reduced-motion: reduce) { .skel-bar { animation: none; } }
  .chip { border: 1.5px solid var(--line); background: white; border-radius: 999px; padding: .38rem .75rem; font-size: .9rem; box-shadow: none; }
  .chip[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); font-weight: 700; }
  /* 絞り込みの相互絞り込みで選べない候補（組み合わせると0件になる）は
     薄くして押せなくする。 */
  .chip:disabled { opacity: .38; box-shadow: none; }
  /* バス停画面の操作整理：副次ボタン（全便表示・読み上げ）は操作ボタンの
     行と分け、小さめの別行にまとめる。行き先・のりばの絞り込みは
     見出し付きの別行に小さめのチップで並べる。 */
  .sub-actions { flex-basis: 100%; margin-top: .15rem; }
  .sub-actions button { font-size: .88rem; padding: .38rem .8rem; box-shadow: none; }
  /* バス停パネルの見出し行：右上に星・共有・接近通知ベルのアイコンを
     置き、副次操作は文字型に落として静かにする。 */
  .stop-head { display: flex; align-items: flex-start; gap: .4rem; }
  .stop-head h2 { flex: 1; margin: 0; min-width: 0; }
  .stop-head .romaji { overflow-wrap: anywhere; }
  .stop-head-icons { display: flex; gap: .1rem; flex: none; }
  .icon-btn { border: 0; background: transparent; box-shadow: none; color: var(--muted); min-width: 44px; min-height: 44px; padding: .35rem; display: inline-flex; align-items: center; justify-content: center; }
  .fav-icon { font-size: 1.5rem; line-height: 1; }
  .fav-icon[aria-pressed="true"] { color: var(--accent); background: transparent; border: 0; }
  /* 接近通知のベル：登録済みは金色になり、ベルの塗り（SVG の fill）と
     合わせて入っていることが見て分かるようにする。 */
  .push-icon[aria-pressed="true"] { color: var(--accent); background: transparent; border: 0; }
  /* 読み上げ：読み上げ中はベルと同じく金色にして、スピーカーの塗りと
     合わせて状態が見て分かるようにする。 */
  .speech-icon[aria-pressed="true"] { color: var(--accent); background: transparent; border: 0; }
  .sub-actions button { border: 0; background: transparent; color: var(--muted); }
  .sub-actions button[aria-pressed="true"] { background: transparent; color: var(--ink); }
  .filters { flex-basis: 100%; }
  .filters .row { gap: .35rem; }
  .filters .row + .row { margin-top: .45rem; }
  .filter-label { font-size: .82rem; font-weight: 700; color: var(--muted); }
  /* 折りたたみ式の絞り込み（A案・採用）: 現在の絞り込み条件の表示。 */
  .filter-current { font-size: .82rem; font-weight: 700; color: var(--ink); }
  /* 絞り込みチップ内の行き先名・のりば名は1行で省略する。長い名前で
     チップが縦に伸びたり、行からはみ出したりしないようにする。 */
  .chip.small { padding: .26rem .6rem; font-size: .82rem; min-width: 0; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  /* 通知の設定パネルは開いた時だけ、要約ボタンの代わりに出す。
     いつ／タイミングの選択と設定ボタンを1つに集約する。 */
  .push-panel { flex-basis: 100%; border: 1px solid var(--line); border-radius: 14px; padding: .6rem .7rem; display: flex; flex-direction: column; gap: .5rem; }
  /* 近くの施設カテゴリ：1行に収まる控えめな並びにする。 */
  .poi-cats { flex-wrap: nowrap; gap: .35rem; margin-top: .6rem; overflow-x: auto; scrollbar-width: none; }
  .poi-cats::-webkit-scrollbar { display: none; }
  .poi-chip { padding: .28rem .5rem; font-size: .82rem; white-space: nowrap; }
  /* お気に入りの場所：登録がある時だけ、行き先から探すの先頭に小さく並べる。 */
  .place-favs { flex-wrap: wrap; gap: .35rem; margin-top: .6rem; align-items: center; }
  .place-favs-label { font-size: .82rem; color: var(--muted); }
  .place-fav-chip { padding: .28rem .5rem; font-size: .82rem; white-space: nowrap; min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  /* 休日当番医ブロック：病院カテゴリの先頭に出す。当番がある日だけ
     表示し、病院の一覧とは分けて見せる。 */
  #duty-block { background: var(--warn); border: 1px solid var(--line); border-radius: 14px; padding: .7rem .8rem; margin-top: .6rem; }
  .duty-heading { font-weight: 800; font-size: 1.02rem; margin: 0 0 .3rem; }
  .duty-caution { font-size: .88rem; font-weight: 700; margin: 0 0 .5rem; }
  .duty-note { font-size: .9rem; margin: .3rem 0; }
  .duty-chips { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .5rem; }
  .duty-list { display: flex; flex-direction: column; gap: .75rem; }
  /* 施設カード：白地に他の画面のカード並みの角丸（14px）で、名前・
     科目・時間・距離・住所・お知らせ・電話を1枚に収める。名前まわり
     は素通しのボタン（押すと場所の流れへ）、電話はカード内の黒い
     ボタンにする（承認済みプレビュー準拠）。 */
  .duty-entry { display: flex; flex-direction: column; background: white; border-radius: 14px; padding: .875rem 1rem; box-shadow: 0 1px 3px rgba(60, 50, 20, .12); }
  .duty-entry button { display: flex; flex-direction: column; align-items: flex-start; gap: .1rem; width: 100%; text-align: left; padding: 0; background: transparent; border: 0; border-radius: 0; box-shadow: none; color: inherit; }
  .duty-entry button:hover { background: transparent; }
  /* 見出し行：名前まわりのボタンと地図バッチを横に並べる。バッチは
     .icon-btn（44px）で、カード内ボタンの素通し規則（上の button
     規則）より詳しく書いて、幅いっぱい・縦並びに潰れないようにする。 */
  .duty-head-row { display: flex; align-items: flex-start; gap: .25rem; }
  .duty-head-row > button:first-child { flex: 1 1 auto; min-width: 0; width: auto; }
  .duty-entry .duty-map-btn { flex: none; flex-direction: row; align-items: center; justify-content: center; width: 44px; min-width: 44px; height: 44px; min-height: 44px; padding: .35rem; color: var(--muted); }
  .duty-name { font-weight: 800; font-size: 1.05rem; }
  .duty-sub { font-size: .9rem; color: var(--muted); line-height: 1.55; }
  .duty-addr { font-size: .9rem; color: var(--muted); line-height: 1.55; }
  .duty-tel { display: flex; align-items: center; justify-content: center; margin-top: .65rem; background: var(--primary); color: var(--primary-ink); border-radius: 10px; padding: .7rem; font-size: 1rem; font-weight: 700; text-decoration: none; }
  .tel-num { white-space: nowrap; }
  .duty-notice { font-size: .88rem; color: var(--muted); margin: .45rem 0 0; line-height: 1.55; }
  .duty-source { font-size: .8rem; color: var(--muted); margin: .55rem 0 0; }
  /* 選んだ場所への操作（☆登録と地図）：候補の直下に場所名と並べて出し、
     どの場所への操作か分かるようにする。アイコンはバス停ヘッダーと同格。 */
  .place-actions { display: flex; align-items: center; gap: .35rem; margin-top: .55rem; }
  .place-actions-name { font-weight: 700; flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  /* いつものバス停カードの見出しは2行まで。横の「消す」を押し出さず、
     名前側が縮んで省略されるようにする。 */
  .usual-title { font-size: 1.05rem; font-weight: 700; flex: 1 1 auto; min-width: 0; text-align: left; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
  .bus.clickable:active { background: var(--hover); }
  .bus.selected { background: var(--hover); }
  /* 今日の全便一覧：過ぎた便は地色と見出しの色で弱め、次のバスは地色とタグで目立たせる。
     カード全体を opacity で薄くすると経由などの小さい文字が読めなくなるため、
     文字の濃さは保ったまま、地色を落として「過ぎた便」と分かるようにする。 */
  .bus.fd-passed { background: #f0ebdd; }
  .bus.fd-passed time, .bus.fd-passed .dest { color: var(--muted); }
  .bus.fd-next { background: var(--hover); }
  /* 全便カードは1,000枚を超えることがあるため、画面外のカードは
     描画を省く（content-visibility）。高さの見積もりは実測の中央値
     （経由ありカードで約100px）。auto を付けて、実描画したカードは
     実寸を覚えるようにする。 */
  .bus.fd-card { content-visibility: auto; contain-intrinsic-size: auto 100px; }
  .fd-next-tag { flex: none; margin-left: auto; white-space: nowrap; font-weight: 800; color: #b7481d; }
  .go { color: var(--accent); font-weight: 700; margin-left: auto; white-space: nowrap; }
  .bus time { font-size: 1.3rem; font-weight: 750; }
  /* 数字は等幅（tabular-nums）で揃える：カウントダウンや更新秒数が
     変わるたびに桁幅が揺れて、行全体がガタつくのを防ぐ。時刻・
     あと○分・運賃など、数字が主役の要素だけに絞って適用する。 */
  .bus time, .bus .cd, .fd-next-tag, #bus-status, .tl-chip, .now-summary,
  .itin-total, .alight-banner { font-variant-numeric: tabular-nums; }
  .last { font-weight: 800; color: #fff; background: var(--alert); border-radius: 999px; padding: .05rem .55rem; font-size: .78rem; }
  .first { font-weight: 800; color: var(--primary-ink); background: var(--primary); border-radius: 999px; padding: .05rem .55rem; font-size: .78rem; }
  /* 始発のまとまりの見出し（終バス後の翌日分・始発前の当日分）。 */
  .day-heading { margin: 1rem 0 0; padding-top: .7rem; border-top: 2px solid var(--line); font-size: 1.02rem; font-weight: 800; color: var(--primary); }
  .delay-late { color: var(--alert); font-weight: 700; }
  .last-soon { color: var(--alert); font-weight: 700; }
  .recent-clear { margin-left: auto; font-size: .85rem; }
  #voice-button.listening, #place-voice-button.listening, #route-voice-button.listening { background: var(--alert); border-color: var(--alert); color: #fff; animation: voice-pulse 1.2s ease-in-out infinite; }
  @keyframes voice-pulse { 50% { opacity: .55; } }
  #bus-status.rt-old { color: var(--alert); font-weight: 700; }
  .tl-chip.delay-late { background: var(--alert); color: #fff; }
  details.alert { border-top: 1px solid var(--line); padding: .5rem 0; }
  details.alert summary { cursor: pointer; font-weight: 650; }
  .rel-badge { display: inline-block; margin-left: .5rem; padding: .05rem .45rem; border-radius: 999px; background: var(--primary); color: var(--primary-ink); font-size: .72rem; font-weight: 700; vertical-align: .12em; }
  details.alert p { margin: .45rem 0 0; }
  .bus .line { font-size: 1.08rem; font-weight: 650; margin: .2rem 0; }
  /* 「地図を見る」は詳細見出しのアイコン列（☆・共有・旗と同じ .icon-btn）に
     ピンのアイコンで同格に置く。地図を開いている間は、星やベルと同じく
     aria-expanded で金色にして開いていることが分かるようにする。 */
  .map-icon[aria-expanded="true"] { color: var(--accent); }
  #map { height: min(50vh, 25rem); min-height: 15rem; border-radius: .65rem; margin-top: .75rem; }
  .stop-label { font-weight: 700; padding: .05rem .4rem; }
  /* 地図のピン（divIcon・外部画像なし）。熊本城ブラック＋金で統一する。
     車両マーカー（オレンジの丸＋「バス」ラベル）は対象外で従来どおり。 */
  .map-pin { border-radius: 50%; box-sizing: border-box; box-shadow: 0 1px 4px rgba(38, 36, 31, .45); }
  /* バス停：黒地に金の縁。小さいので縁を太めにして視認性を優先する。 */
  .map-pin-stop { width: 15px; height: 15px; background: #26251f; border: 2.5px solid var(--accent); }
  /* 通過済み：色を落として未通過と判別できるようにする。 */
  .map-pin-stop.passed { background: #8a8a8a; border-color: #d8d2bd; opacity: .75; box-shadow: none; }
  /* 終点：ひと回り大きく、金の芯。 */
  .map-pin-stop.end { width: 19px; height: 19px; background: radial-gradient(circle, var(--accent) 0 32%, #26251f 38% 100%); }
  /* 乗車停留所：金地に黒の縁と黒の芯で一番目立たせる。 */
  .map-pin-stop.boarding { width: 23px; height: 23px; background: radial-gradient(circle, #26251f 0 30%, var(--accent) 38% 100%); border: 3px solid #26251f; }
  /* 現在地：白地に黒の縁、金の芯と金のハロー。バス停ピンとは芯と地の
     明暗が逆なので、重なっても判別できる。 */
  .map-pin-me { width: 17px; height: 17px; background: radial-gradient(circle, var(--accent) 0 30%, #fbf9f3 38% 100%); border: 3px solid #26251f; box-shadow: 0 0 0 5px rgba(201, 162, 39, .35), 0 1px 4px rgba(38, 36, 31, .45); }
  .map-pin-duty { width: 23px; height: 23px; background: linear-gradient(#c0392b, #c0392b) center / 5px 13px no-repeat, linear-gradient(#c0392b, #c0392b) center / 13px 5px no-repeat, white; border: 2.5px solid #c0392b; }
  .duty-popup { min-width: 11rem; }
  .duty-popup-name { font-weight: 800; font-size: 1rem; margin: 0 0 .2rem; }
  .duty-popup-sub { font-size: .88rem; color: var(--muted); margin: 0 0 .55rem; }
  .duty-popup-go { width: 100%; min-height: 44px; font-weight: 700; }
  /* 行き先の地図ポップアップ：画面全体に重ねるモーダル。地図本体は
     #map と同じ地理院タイルで、行き先と最寄りバス停を重ねる。 */
  .place-map-modal { position: fixed; top: 0; right: 0; bottom: 0; left: 0; inset: 0; z-index: 1200; background: rgba(38, 36, 31, .55); display: grid; place-items: center; padding: .75rem; }
  .place-map-box { background: var(--surface); border-radius: .8rem; padding: .8rem; width: min(100%, 52rem); max-height: 94vh; max-height: 94dvh; overflow: auto; box-shadow: 0 8px 32px rgba(38, 36, 31, .4); }
  .place-map-head { display: flex; align-items: center; gap: .6rem; margin-bottom: .6rem; }
  /* 行き先の地図の見出しは2行まで。長い施設名で閉じるボタンが
     下に押し出されないようにする。 */
  .place-map-title { font-weight: 800; font-size: 1.05rem; margin: 0; flex: 1 1 auto; min-width: 0; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
  #place-map { height: min(68vh, 34rem); height: min(68dvh, 34rem); min-height: 18rem; border-radius: .65rem; }
  #place-map-pick-bar { margin-top: .65rem; }
  #place-map-nearest { margin: 0 0 .5rem; }
  #place-map-confirm { width: 100%; min-height: 44px; background: var(--accent); color: #26251f; font-weight: 800; }
  /* 家族が用意する画面：行き先ボタンの作成モーダル。行き先の地図と
     同じ全画面モーダルの形で、家族側の操作をここで完結させる。
     本人のかんたん画面には持ち込まない。 */
  .family-modal { position: fixed; top: 0; right: 0; bottom: 0; left: 0; inset: 0; z-index: 1200; background: rgba(38, 36, 31, .55); display: grid; place-items: center; padding: .75rem; }
  .family-box { background: var(--surface); border-radius: .8rem; padding: .9rem; width: min(100%, 30rem); max-height: 94vh; max-height: 94dvh; overflow: auto; box-shadow: 0 8px 32px rgba(38, 36, 31, .4); }
  .family-head { display: flex; align-items: center; gap: .6rem; margin-bottom: .4rem; }
  .family-title { font-weight: 800; font-size: 1.05rem; margin: 0; flex: 1 1 auto; }
  .family-heading { font-size: 1.1rem; margin: 1rem 0 .4rem; }
  .family-note { color: var(--muted); line-height: 1.6; margin: .3rem 0 .6rem; }
  #family-form { display: flex; gap: .5rem; }
  #family-query { flex: 1 1 auto; min-width: 0; font-size: 1rem; padding: .6rem .7rem; }
  .family-search-btn { flex: none; font-weight: 800; padding: .6rem 1.1rem; background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
  .family-result { display: flex; align-items: center; gap: .6rem; background: white; border: 1px solid var(--line); border-radius: .7rem; padding: .7rem .8rem; margin: .5rem 0; }
  .family-result-texts { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
  .family-result-name { font-weight: 800; font-size: 1.02rem; }
  .family-result-sub { color: var(--muted); font-size: .88rem; margin-top: .1rem; }
  .family-add-btn { flex: none; font-weight: 800; padding: .55rem .9rem; background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
  .family-add-btn:disabled { background: var(--warn); color: var(--muted); border-color: var(--line); }
  .family-picked-row { display: flex; align-items: center; gap: .6rem; background: var(--warn); border-radius: .7rem; padding: .65rem .8rem; margin: .45rem 0; }
  .family-picked-num { flex: none; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--primary); color: var(--primary-ink); font-weight: 800; display: grid; place-items: center; font-size: .95rem; }
  .family-picked-name { flex: 1 1 auto; font-weight: 800; }
  .family-remove-btn { flex: none; font-weight: 700; color: var(--alert); background: transparent; border: 0; box-shadow: none; padding: .4rem .5rem; }
  .family-slot-note { border: 1.5px dashed #c9c2ae; border-radius: .7rem; padding: .65rem .8rem; color: var(--muted); margin: .45rem 0; }
  .family-primary { display: block; width: 100%; font-size: 1.05rem; font-weight: 800; padding: .85rem 1rem; border-radius: .8rem; margin-top: .9rem; background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
  .family-primary:disabled { opacity: .45; }
  .family-name-block { background: white; border: 1px solid var(--line); border-radius: .7rem; padding: .7rem .8rem; margin: .55rem 0; }
  .family-name-place { color: var(--muted); margin: 0 0 .45rem; }
  .family-name-input { width: 100%; box-sizing: border-box; font-size: 1.05rem; font-weight: 700; padding: .6rem .7rem; }
  #family-link-box { background: var(--warn); border-radius: .7rem; padding: .8rem; margin-top: .9rem; }
  .family-link-title { font-weight: 800; margin: 0 0 .3rem; }
  .family-link-url { word-break: break-all; font-size: .82rem; color: var(--muted); margin: 0 0 .7rem; }
  .family-line-btn { display: block; text-align: center; background: #06c755; color: white; font-weight: 800; font-size: 1.05rem; border-radius: .8rem; padding: .85rem 1rem; text-decoration: none; }
  .family-copy-btn { display: block; width: 100%; font-weight: 800; padding: .7rem 1rem; border-radius: .8rem; margin-top: .6rem; }
  .family-back-btn { display: block; width: 100%; font-weight: 800; padding: .7rem 1rem; border-radius: .8rem; margin-top: .9rem; }
  /* 行き先：黒地＋金の縁のしずくピン（先端が場所の座標）の上に、
     同じ配色の「行き先」バッジを重ねる。バッジの文字は長い施設名でも
     1行で省略する（名前折り返しの統一ルール）。 */
  .place-pin-wrap { position: relative; width: 40px; height: 54px; }
  .place-pin { position: absolute; top: 0; left: 50%; transform: translateX(-50%); display: inline-block; background: #26251f; color: var(--primary-ink); font-weight: 800; font-size: .8rem; border: 1.5px solid var(--accent); border-radius: 999px; padding: .18rem .6rem; box-shadow: 0 1px 6px rgba(38, 36, 31, .45); white-space: nowrap; max-width: 70vw; overflow: hidden; text-overflow: ellipsis; }
  .place-pin-mark { position: absolute; bottom: 0; left: 50%; width: 26px; height: 26px; transform: translateX(-50%) rotate(-45deg); background: #26251f; border: 2.5px solid var(--accent); border-radius: 50% 50% 50% 0; box-shadow: 0 1px 5px rgba(38, 36, 31, .45); box-sizing: border-box; }
  .place-pin-mark::after { content: ""; position: absolute; top: 6px; right: 6px; bottom: 6px; left: 6px; inset: 6px; border-radius: 50%; background: var(--accent); }
  .route-list { list-style: none; padding: 0; margin: 0; }
  .route-list li { display: flex; align-items: flex-start; gap: .6rem; padding: .38rem 0; position: relative; }
  /* 詳細を開いた時に「今ここ／ここから乗車」の行へ寄せる位置。
     追従する帯（セクションと同じ 3.6rem）の下に、対象の少し上
     （2行ほど）が見えるよう余分を足す。対象は #route-list だけ
     （行き方案内のリストには効かせない）。 */
  #route-list li { scroll-margin-top: calc(3.6rem + env(safe-area-inset-top, 0px) + 4.5rem); }
  .route-list li::before { content: ""; position: absolute; left: calc(4.4rem - 1.5px); top: 0; bottom: 0; width: 3px; background: var(--line); }
  .route-list li:first-child::before { top: 55%; }
  .route-list li:last-child::before { bottom: 55%; }
  .route-list time { font-variant-numeric: tabular-nums; width: 3.4rem; flex: none; font-weight: 650; }
  .tl-dot { flex: none; width: .8rem; height: .8rem; border-radius: 50%; border: 3px solid var(--primary); background: var(--surface); margin-top: .28rem; position: relative; z-index: 1; }
  li.boarding .tl-dot { background: var(--primary); }
  li.boarding .tl-name { font-weight: 800; }
  li.passed { opacity: .5; }
  /* 経由リストの畳み行：通過済みの区間を1行に畳む。タイムラインの
     縦線は引かず、破線の枠で「タップで開ける行」だと分かる形にする。 */
  .route-list li.fold-row { padding: .1rem 0 .35rem; }
  .route-list li.fold-row::before { content: none; }
  .route-fold { flex: 1; display: flex; align-items: center; width: 100%; text-align: left; font-family: inherit; font-size: .9rem; font-weight: 700; color: var(--muted); background: #f7f3e7; border: 1.5px dashed #c9c2ae; border-radius: .6rem; padding: .55rem .7rem; cursor: pointer; box-shadow: none; }
  .route-fold .fold-chev { margin-left: auto; font-size: 1rem; }
  /* 停名とチップのまとまり。チップが多い行ではチップが停名の下の行に
     回り込むようにし、停名が1文字ずつ縦に潰れるのを防ぐ。 */
  .tl-main { flex: 1 1 auto; min-width: 0; display: flex; align-items: flex-start; flex-wrap: wrap; gap: .15rem .6rem; }
  .tl-name { flex: 1 1 auto; min-width: 7em; }
  .tl-chip { flex: none; font-size: .72rem; font-weight: 700; border-radius: 999px; padding: .08rem .55rem; background: var(--primary); color: var(--primary-ink); margin-top: .18rem; }
  .tl-chip.end { background: transparent; color: var(--muted); border: 1.5px solid var(--muted); }
  .tl-chip.fare { background: transparent; color: var(--muted); border: 1.5px solid var(--muted); }
  .tl-chip.nodrop { background: transparent; color: var(--muted); border: 1.5px solid var(--muted); }
  /* 「乗ってから約○分」：停名の下の行に回り込む、小さく薄い添え書き。 */
  .tl-ride { flex: 0 0 100%; font-size: .78rem; color: var(--muted); }
  li.now .tl-dot { background: #b7481d; border-color: #b7481d; }
  li.now .tl-name { font-weight: 800; }
  .tl-chip.now { background: #b7481d; }
  .now-summary { font-weight: 800; color: #b7481d; margin: .3rem 0 .1rem; }
  .now-summary.no-live { color: #6b675f; font-weight: 600; }
  .tl-chip.alight { background: #b7481d; }
  .tl-alight { flex: none; font-size: .72rem; font-weight: 700; border-radius: 999px; padding: .15rem .55rem; margin-top: .1rem; }
  li.alight-target .tl-dot { border-color: #b7481d; }
  li.alight-target .tl-name { font-weight: 800; }
  .alight-banner { background: var(--alert); color: #fff; font-weight: 800; border-radius: .6rem; padding: .6rem .8rem; margin: .5rem 0 .1rem; }
  /* 詳細の間隔：ヘッダー直下の注記や中段のブロック（地図ボタン・降車設定・
     とまります・現在位置のまとめ）が詰まって見えないよう、#details の中に
     スコープを絞って余白を作る。左右も通常カードの広い方に揃える。 */
  #details { padding-left: 1.15rem; padding-right: 1.15rem; }
  #details > p.muted { margin: .45rem 0; line-height: 1.55; }
  #details .row { margin-top: .9rem; }
  #alight-row { line-height: 1.55; }
  #details #tomarimasu-slot { margin: .95rem 0 .4rem; }
  #details .now-summary { margin: .9rem 0 .3rem; }
  /* 詳細画面の小さなバス帯：窓に動物のシルエットが住む。
     車体はスプラッシュ／ヘッダーと同じ洗練バスの画風で、動物は
     丸い頭＋小さな体＋足のある全身のちびシルエットを、新しい窓帯
     （濃紺ガラスの一帯）の2枚目の窓に合わせて縮小して座らせる。
     ヘッダーの熊本城シルエットと同じ濃色シルエットに揃え、色つき
     のイラストや顔の描き込みはしない。状態の切り替えは #detail-bus
     の data-state だけで行い、見た目は全部ここで決める。 */
  .detail-bus { margin: .8rem 0 .1rem; }
  .detail-bus svg { display: block; width: 100%; max-width: 26rem; height: auto; }
  #db-animal-wrap, #db-animal-out { visibility: hidden; }
  .detail-bus[data-state="ride"] #db-animal-wrap,
  .detail-bus[data-state="wave"] #db-animal-wrap { visibility: visible; }
  .db-wave-arm { visibility: hidden; transform-box: fill-box; transform-origin: 15% 90%; }
  .detail-bus[data-state="wave"] .db-wave-arm { visibility: visible; animation: db-wave .5s ease-in-out infinite alternate; }
  @keyframes db-wave { from { transform: rotate(-16deg); } to { transform: rotate(24deg); } }
  .detail-bus[data-state="arrive"] #db-animal-out { visibility: visible; animation: db-alight 1.8s ease-out forwards; }
  /* 降りる動物は scale(0.72) のグループの中にいるため、下の移動量は
     その局所座標での値（実寸は 0.72 倍）。扉口から車体の底辺まで
     下り、最後は地面の線まで着いて消える従来の動きを保つ。 */
  @keyframes db-alight {
    0% { transform: translate(0, -3px); opacity: 0; }
    18% { opacity: 1; }
    72% { transform: translate(8px, 33px); opacity: 1; }
    100% { transform: translate(14px, 45px); opacity: 0; }
  }
  @media (prefers-reduced-motion: reduce) {
    .db-wave-arm, .detail-bus[data-state="arrive"] #db-animal-out { animation: none !important; }
  }
  /* とまりますボタン（試作）：本物の降車ボタンの見た目を模した遊びのUI。
     降車アラームの挙動とは独立で、点灯と音だけを担当する。 */
  #tomarimasu-slot { display: flex; justify-content: center; margin: .7rem 0 .2rem; }
  .tomarimasu { position: relative; width: 11.5rem; max-width: 80vw; padding: 1.05rem .8rem .8rem; border: 2px solid #c9920e; border-radius: 1.7rem; background: linear-gradient(180deg, #ffe95c, #ffd21f 55%, #f7bd16); box-shadow: 0 3px 0 #b57f0a, 0 6px 14px rgba(38, 36, 31, .28), inset 0 2px 3px rgba(255, 255, 255, .75), inset 0 -3px 5px rgba(150, 100, 0, .35); cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .tomarimasu::before, .tomarimasu::after { content: ""; position: absolute; left: 50%; transform: translateX(-50%); width: .62rem; height: .62rem; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fdfdfd, #b9bdc4 55%, #7d838c); box-shadow: inset 0 -1px 2px rgba(0, 0, 0, .45), 0 1px 1px rgba(255, 255, 255, .6); }
  .tomarimasu::before { top: .3rem; }
  .tomarimasu::after { bottom: .3rem; }
  .tomarimasu-window { display: block; padding: .5rem .2rem .55rem; border-radius: .75rem; background: #170609; color: rgba(255, 96, 96, .3); font-size: 1.55rem; font-weight: 800; letter-spacing: .14em; text-align: center; box-shadow: inset 0 2px 8px rgba(0, 0, 0, .9); transition: background-color .45s ease, color .45s ease, text-shadow .45s ease, box-shadow .45s ease; }
  .tomarimasu.lit .tomarimasu-window { background: #d8113f; color: #fff; text-shadow: 0 0 6px #fff, 0 0 16px #ff8fab, 0 0 26px #ff4d6d; box-shadow: inset 0 0 20px rgba(255, 130, 160, .95), inset 0 2px 6px rgba(120, 0, 30, .55), 0 0 18px rgba(255, 45, 85, .55); animation: tomarimasu-glow 1.6s ease-in-out infinite; }
  @keyframes tomarimasu-glow { 0%, 100% { box-shadow: inset 0 0 20px rgba(255, 130, 160, .95), inset 0 2px 6px rgba(120, 0, 30, .55), 0 0 14px rgba(255, 45, 85, .45); } 50% { box-shadow: inset 0 0 24px rgba(255, 160, 185, 1), inset 0 2px 6px rgba(120, 0, 30, .55), 0 0 24px rgba(255, 45, 85, .7); } }
  .tomarimasu-plate { display: block; margin-top: .55rem; padding: .45rem .3rem; border-radius: .55rem; background: linear-gradient(180deg, #f8b04a, #ef8f1d); color: #3a1c05; font-size: .82rem; font-weight: 700; line-height: 1.45; text-align: center; box-shadow: inset 0 1px 2px rgba(255, 255, 255, .55), inset 0 -2px 3px rgba(120, 60, 0, .35); }
  @media (prefers-reduced-motion: reduce) { .tomarimasu.lit .tomarimasu-window { animation: none; } }
  .badge { background: var(--primary); color: var(--primary-ink); border-radius: .35rem; padding: .05rem .5rem; font-size: .78rem; font-weight: 800; letter-spacing: .06em; }
  .clickable { cursor: pointer; }
  /* 「トップへ戻る」は本文の右下に重なってリンクやボタンを隠さないよう、
     小さめにし、出る条件は JS 側で「スクロール中だけ」に絞る。 */
  #to-top { position: fixed; right: .85rem; bottom: calc(.85rem + env(safe-area-inset-bottom, 0px)); z-index: 900; width: 2.5rem; height: 2.5rem; padding: 0; border-radius: 50%; border: 1.5px solid var(--accent); background: var(--primary); color: var(--primary-ink); font-size: 1.05rem; line-height: 1; display: grid; place-items: center; opacity: .92; box-shadow: 0 2px 8px rgba(38, 36, 31, .3); }
  /* ページ末尾は「トップへ戻る」ボタンの居場所ぶんだけ余白を空け、
     フッターの帰属リンクなどがボタンの裏に隠れたままにならないようにする。 */
  footer { padding-bottom: 4.5rem; }
  #to-top:hover { background: var(--primary-dark); }
  /* かんたんモード（試作）：高齢者向けに情報量を絞り、文字とボタンを
     大きくした専用画面。通常モードのセクションは丸ごと隠し、
     .simple-view だけを出す。文字は :root の font-size を 125% に
     して全体を底上げする（「文字：大」の 112.5% より後ろに置いて勝たせる）。 */
  :root[data-simple="on"] { font-size: 125%; }
  body.simple-mode main > section:not(.simple-view),
  body.simple-mode main > aside { display: none !important; }
  /* かんたんモードでは、黒プレートの長いクレジット（.footer-full）を
     出さず、1行の小さいクレジット（.footer-simple）だけにする。
     帰属表示そのものは通常モードのフッターに残し、1行側にも
     CC BY 4.0 と OSM の © へのリンクを入れる。 */
  .footer-simple { display: none; }
  body.simple-mode footer { background: none; color: var(--muted); border-top: 1px solid var(--line); border-radius: 0; font-size: .62rem; line-height: 1.6; padding: .7rem 1.1rem calc(.7rem + env(safe-area-inset-bottom)); }
  body.simple-mode footer a { color: var(--muted); }
  body.simple-mode .footer-full { display: none; }
  body.simple-mode .footer-simple { display: block; margin: 0; }
  /* かんたんモードでは、ヘッダーの設定ボタン行（文字／ローマ字／
     設定を移す）は出さない。設定値そのものは変えず、通常モードに
     戻れば今までどおり出る。 */
  body.simple-mode .themes { display: none; }
  /* かんたんモードの入口は、白カード全体が押せる1行カード（モックで承認済み）。
     section が白カードの地（背景・角丸）を持ち、ボタンを行いっぱいに広げて
     カードのどこを触っても入れるようにする。左の黒タイルの「あ」が目印。 */
  #simple-entry { padding: 0; }
  .simple-entry-card { display: flex; align-items: center; gap: .75rem; width: 100%; text-align: left; background: transparent; color: var(--ink); border: 0; border-radius: 1rem; box-shadow: none; padding: .85rem 1rem; }
  .simple-entry-card:hover { background: var(--hover); }
  .simple-entry-icon { flex: none; width: 2.75rem; height: 2.75rem; border-radius: .75rem; background: var(--primary); color: var(--primary-ink); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; font-weight: 900; }
  .simple-entry-text { display: block; }
  .simple-entry-title { display: block; font-size: 1.05rem; font-weight: 800; }
  .simple-entry-sub { display: block; font-size: .8rem; color: var(--muted); margin-top: .1rem; }
  .simple-entry-chev { margin-left: auto; font-size: 1.3rem; font-weight: 900; color: #97781a; }
  .simple-exit-btn { display: block; width: 100%; font-size: 1.25rem; font-weight: 800; padding: 1rem; border-radius: 1rem; }
  .simple-stop-btn { display: block; width: 100%; text-align: left; font-size: 1.4rem; font-weight: 800; padding: 1.1rem 1.2rem; border-radius: 1rem; margin: .5rem 0; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
  .simple-hint { font-size: .95rem; color: var(--muted); margin: 0 0 .2rem; }
  .simple-del-confirm { background: white; border: 2px solid var(--alert); border-radius: 1rem; padding: 1rem 1.2rem; margin: .5rem 0; }
  .simple-del-q { font-size: 1.3rem; font-weight: 800; margin: 0 0 .8rem; }
  .simple-del-row { display: flex; gap: .6rem; }
  .simple-del-yes, .simple-del-no { flex: 1 1 0; min-height: 3.4rem; font-size: 1.25rem; font-weight: 800; border-radius: .8rem; }
  .simple-del-yes { background: var(--alert); color: white; border-color: var(--alert); }
  #simple-form { display: flex; gap: .5rem; }
  #simple-query { font-size: 1.3rem; padding: .9rem 1rem; }
  .simple-search-btn { flex: none; font-size: 1.3rem; font-weight: 800; padding: .9rem 1.4rem; background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
  .simple-search-btn:hover { background: var(--primary-dark); }
  .simple-back { font-size: 1.2rem; font-weight: 800; padding: .8rem 1.3rem; margin-bottom: .8rem; }
  .simple-bus { display: flex; flex-wrap: wrap; align-items: baseline; width: 100%; text-align: left; padding: 1rem 1.2rem; margin: .6rem 0; border-radius: 1rem; }
  .simple-bus-time { flex: none; font-size: 2.4rem; font-weight: 900; line-height: 1.1; margin-right: .8rem; font-variant-numeric: tabular-nums; }
  .simple-bus-cd { flex: none; font-size: 1.3rem; font-weight: 800; white-space: nowrap; }
  .simple-bus-dest { flex: 0 0 100%; font-size: 1.4rem; font-weight: 800; margin-top: .3rem; }
  .simple-bus-pos { flex: 0 0 100%; font-size: 1.3rem; font-weight: 800; margin-top: .3rem; }
  .simple-bus-caution { flex: 0 0 100%; font-size: 1.3rem; font-weight: 800; margin-top: .3rem; color: var(--alert); }
  .simple-none { font-size: 1.25rem; font-weight: 700; }
  .simple-now { font-size: 1.35rem; font-weight: 800; line-height: 1.5; }
  .simple-alight-banner { background: var(--alert); color: #fff; font-weight: 800; font-size: 1.3rem; line-height: 1.5; border-radius: .8rem; padding: .9rem 1rem; }
  .simple-route-list { list-style: none; padding: 0; margin: 0; }
  .simple-route-list li { padding: .7rem 0; border-bottom: 1px solid var(--line); }
  .simple-route-list li.passed { opacity: .45; }
  .simple-route-list .st-time { display: inline-block; font-size: 1.25rem; font-weight: 800; font-variant-numeric: tabular-nums; margin-right: .7rem; }
  .simple-route-list .st-name { font-size: 1.35rem; font-weight: 700; }
  .simple-set { display: inline-block; font-weight: 800; color: var(--alert); font-size: 1.2rem; margin-top: .3rem; }
  .simple-nodrop { display: inline-block; font-weight: 700; color: var(--muted); font-size: 1.1rem; margin-top: .3rem; }
  .simple-alight-btn { display: block; font-size: 1.15rem; font-weight: 800; padding: .7rem 1.2rem; margin-top: .45rem; background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
  .simple-alight-btn:hover { background: var(--primary-dark); }
  /* かんたん詳細の「家族に送る」：降車ボタンと並んでも押せる大きなボタンにする。 */
  .simple-share-btn { display: block; width: 100%; font-size: 1.3rem; font-weight: 800; padding: 1rem; border-radius: 1rem; margin: .7rem 0; }
  .simple-share-status { font-size: 1.2rem; font-weight: 700; line-height: 1.5; }
  /* かんたんモードの声の入口は1つだけ：バス停を探す検索の横の
     マイク（.icon-btn のバッチ）。聞き取り中は赤くして鼓動させ、
     押せば止まることが見て分かる。結果は大きな表示で出す。 */
  #simple-stop-voice-button { flex: none; align-self: center; }
  #simple-stop-voice-button.listening { color: var(--alert); animation: voice-pulse 1.2s ease-in-out infinite; }
  .simple-stop-voice-status { font-size: 1.3rem; font-weight: 800; line-height: 1.5; }
  .simple-voice-message { font-size: 1.35rem; font-weight: 800; line-height: 1.5; }
  .simple-voice-sub { display: block; font-size: 1.1rem; font-weight: 700; color: var(--muted); margin-top: .2rem; }
  /* 行き方結果の下の「帰る」「行きを見る」：結果のカードと同じ
     大きさの、画面幅いっぱいの大きなボタン。行きと帰りで同じ
     場所に出し、押し間違えないようにする。 */
  .simple-return-btn { display: block; width: 100%; font-size: 1.4rem; font-weight: 800; padding: 1.1rem 1.2rem; border-radius: 1rem; margin: .8rem 0; background: var(--warn); }
  /* かんたんモードの「今日の帰り」：ホームでは濃い色の大きなカード、
     詳細では大きなカウントダウン帯と発着だけのタイムライン。
     予定は通常モードと共通で、文字はかんたん用の大きさを保つ。 */
  .simple-return-card { background: var(--primary); color: var(--primary-ink); border-bottom: 5px solid var(--accent); border-radius: 1rem; padding: 1.1rem 1.2rem; margin: .6rem 0; cursor: pointer; }
  .simple-return-label { display: block; color: var(--accent); font-weight: 900; font-size: 1.15rem; letter-spacing: .05em; }
  .simple-return-from { display: block; font-size: 1.35rem; font-weight: 900; line-height: 1.4; margin-top: .45rem; }
  .simple-return-timerow { display: flex; align-items: center; gap: .7rem; margin-top: .5rem; }
  .simple-return-time { font-size: 2.6rem; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; }
  .simple-return-count { background: var(--accent); color: #2c2708; border-radius: 999px; padding: .35rem .9rem; font-size: 1.2rem; font-weight: 900; white-space: nowrap; }
  .simple-return-to { display: block; font-size: 1.25rem; font-weight: 800; margin-top: .6rem; }
  .simple-return-arr { display: block; font-size: 1.1rem; font-weight: 700; opacity: .85; margin-top: .2rem; }
  .simple-return-clear { display: block; margin-top: .7rem; font-size: 1rem; font-weight: 800; padding: .45rem 1rem; }
  .simple-return-band { background: linear-gradient(180deg, #171713, #0b0b0d); color: var(--primary-ink); border-bottom: 5px solid var(--accent); border-radius: 1rem; text-align: center; padding: 1rem 1.2rem 1.1rem; }
  .simple-return-band-small { display: block; color: var(--accent); font-weight: 900; font-size: 1.1rem; letter-spacing: .1em; }
  .simple-return-band-big { display: block; font-size: 3rem; font-weight: 900; line-height: 1.15; white-space: nowrap; }
  .simple-return-band-sub { display: block; font-size: 1.05rem; font-weight: 700; opacity: .85; }
  .simple-return-timeline { background: white; border-radius: 1rem; padding: 1rem 1.2rem; margin-top: .7rem; box-shadow: 0 1px 3px rgba(38, 36, 31, .08); }
  .simple-return-row { display: flex; align-items: baseline; gap: .7rem; flex-wrap: wrap; }
  .simple-return-row-time { font-size: 1.8rem; font-weight: 900; font-variant-numeric: tabular-nums; }
  .simple-return-row-stop { font-size: 1.4rem; font-weight: 900; }
  .simple-return-row-act { font-size: 1.05rem; font-weight: 800; color: var(--accent); }
  .simple-return-bus { text-align: center; font-size: 1.05rem; font-weight: 800; color: var(--muted); margin: .6rem 0; }
  .simple-return-clearbtn { display: block; width: 100%; font-size: 1.25rem; font-weight: 800; padding: .9rem; border-radius: 1rem; margin-top: .8rem; }
  /* かんたんモードの当番医：ホームの大きなボタンと、大きな文字の
     一覧。当番がある日（日曜・祝日）だけ出す。施設は通常モードの
     当番医カードと同じ形（白地・角丸14px・影）に揃え、名前・科目・
     時間・距離・住所・お知らせ・電話を1枚に収める。電話はカード
     内の黒いボタン。文字とボタンはかんたんモード用に大きく保つ。 */
  .simple-duty-btn { display: block; width: 100%; font-size: 1.4rem; font-weight: 800; padding: 1.1rem 1.2rem; border-radius: 1rem; margin: .5rem 0; background: var(--warn); }
  .simple-duty-message { font-size: 1.35rem; font-weight: 800; line-height: 1.5; }
  .simple-duty-entry { display: flex; flex-direction: column; background: white; border-radius: 14px; padding: 1.1rem 1.2rem; box-shadow: 0 1px 3px rgba(60, 50, 20, .12); margin: .6rem 0; }
  .simple-duty-entry button { display: flex; flex-direction: column; align-items: flex-start; gap: .1rem; width: 100%; text-align: left; padding: 0; background: transparent; border: 0; border-radius: 0; box-shadow: none; color: inherit; }
  .simple-duty-entry button:hover { background: transparent; }
  .simple-duty-name { display: block; font-size: 1.4rem; font-weight: 800; }
  .simple-duty-sub { display: block; font-size: 1.15rem; font-weight: 700; color: var(--muted); margin-top: .25rem; line-height: 1.5; }
  /* 電話ボタンは「電話する」と番号を2段に分ける（大きい文字では
     1行に収まらず、番号の途中で折れるのを避けるため）。 */
  .simple-duty-tel { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem; margin-top: .8rem; background: var(--primary); color: var(--primary-ink); border-radius: .75rem; padding: 1rem; font-size: 1.3rem; font-weight: 800; text-decoration: none; }
  .simple-duty-notice { font-size: 1.1rem; font-weight: 700; color: var(--muted); line-height: 1.6; margin: .55rem 0 0; }
  .simple-duty-caution { font-size: 1.2rem; font-weight: 700; line-height: 1.6; margin-top: 1rem; }
  /* かんたんホームの「行きたい場所」ボタン：家族が用意した行き先を
     ホームの一番上に大きな濃色ボタンで出す。本人は押すだけ。
     場所名の添え書きは、ボタン名に場所名が含まれない時だけ付く。 */
  .simple-dest-btn { display: block; width: 100%; text-align: left; font-size: 1.5rem; font-weight: 800; padding: 1.1rem 1.2rem; border-radius: 1rem; margin: .5rem 0; background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
  .simple-dest-btn:hover { background: var(--primary-dark); }
  .simple-dest-btn:disabled { opacity: .55; }
  .simple-dest-label { display: block; }
  .simple-dest-sub { display: block; font-size: 1.05rem; font-weight: 700; opacity: .75; margin-top: .2rem; }
  /* 行き先が届いた直後のお知らせ：大きな文字で、何が入ったかを
     そのまま読める形にする。ホームを離れるまで残る。 */
  .simple-dest-notice { background: var(--warn); border-radius: 1rem; padding: 1.1rem 1.2rem; margin: .5rem 0 1rem; text-align: center; }
  .simple-dest-notice-mark { font-size: 2.2rem; line-height: 1; color: #8a6d14; margin: 0; }
  .simple-dest-notice-title { font-size: 1.6rem; font-weight: 800; margin: .3rem 0; }
  .simple-dest-notice-names { font-size: 1.3rem; font-weight: 700; line-height: 1.5; margin: 0; }
  [hidden] { display: none !important; }
  /* 新しい版の知らせバー：画面の下に小さく出し、本人のタップで
     その場で最新版に切り替える（閉じて開き直す手間をなくす）。 */
  #sw-update-bar { position: fixed; left: .75rem; right: .75rem; bottom: calc(.75rem + env(safe-area-inset-bottom, 0px)); z-index: 1500; display: flex; align-items: center; gap: .6rem; background: var(--primary); color: var(--primary-ink); border: 1.5px solid var(--accent); border-radius: .9rem; padding: .7rem .9rem; box-shadow: 0 4px 16px rgba(38, 36, 31, .35); font-weight: 700; }
  #sw-update-bar span { flex: 1; }
  #sw-update-button { flex: none; min-height: 44px; background: var(--accent); color: var(--primary-dark); border: 0; border-radius: .6rem; padding: .5rem 1rem; font-weight: 800; }
  #sw-update-close { flex: none; min-height: 44px; background: transparent; color: var(--primary-ink); border: 1px solid var(--line); border-radius: .6rem; padding: .5rem .8rem; font-weight: 700; }
