:root {
  /* 背景・カード・文字（依頼書の指定） */
  --bg: #F3F1EA; --card: #FFFFFF; --text: #1A1D21; --muted: #5A5F66; --line: #E2DED3;
  /* 定刻は緑・遅延は赤（依頼書の指定）。「少し急ぐ」は黄土色 */
  --accent: #0B6E5E; --accent-soft: #E3F1EC; --ok: #0B6E5E;
  --warn: #B3261E; --warn-soft: #F9E3E1; --bad: #B3261E; --bad-soft: #F9E3E1; --mid: #8A5A00; --mid-soft: #F6EBD2;
  --jr: #1F5FAE; --jr-soft: #E4ECF7;
  --walk: #8A8F96; --shadow: 0 1px 2px rgba(0,0,0,.05), 0 2px 8px rgba(0,0,0,.04);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1413; --card: #172120; --text: #e6eeec; --muted: #93a19e; --line: #26332f;
    --accent: #2dd4bf; --accent-soft: #123330; --warn: #f59e0b; --warn-soft: #3a2a10;
    --bad: #f87171; --bad-soft: #3b1717; --ok: #4ade80; --jr: #7aa2ff; --jr-soft: #18223d;
    --walk: #9ca3af; --shadow: none;
  }
}
:root[data-theme="dark"] {
    --bg: #0e1413; --card: #172120; --text: #e6eeec; --muted: #93a19e; --line: #26332f;
    --accent: #2dd4bf; --accent-soft: #123330; --warn: #f59e0b; --warn-soft: #3a2a10;
    --bad: #f87171; --bad-soft: #3b1717; --ok: #4ade80; --jr: #7aa2ff; --jr-soft: #18223d;
    --walk: #9ca3af; --shadow: none;
}
* { box-sizing: border-box; }
html, body { margin: 0; overflow-x: hidden; }
main, .card { overflow-wrap: anywhere; }
body {
  background: var(--bg); color: var(--text);
  font: 16px/1.55 "BIZ UDPGothic", -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", sans-serif;
  font-variant-numeric: tabular-nums;
  padding-bottom: calc(72px + env(safe-area-inset-bottom));
  -webkit-text-size-adjust: 100%;
}
header {
  position: sticky; top: 0; z-index: 5; background: var(--bg);
  padding: calc(10px + env(safe-area-inset-top)) 16px 8px;
  display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--line);
}
header h1 { font-size: 17px; margin: 0; flex: 1; }
.upd { font-size: 12px; color: var(--muted); text-align: right; white-space: nowrap; }
.upd b { color: var(--ok); font-weight: 600; }
.upd.stale b { color: var(--bad); }
main { max-width: 640px; margin: 0 auto; padding: 12px 16px; }
nav.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; display: flex;
  background: var(--card); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
}
nav.tabs button {
  flex: 1; border: 0; background: none; color: var(--muted); font: inherit; font-size: 12px;
  padding: 8px 0 10px; display: flex; flex-direction: column; align-items: center; gap: 2px;
}
nav.tabs button svg { width: 24px; height: 24px; }
nav.tabs button[aria-selected="true"] { color: var(--accent); font-weight: 600; }
.card { background: var(--card); border-radius: 14px; box-shadow: var(--shadow); border: 1px solid var(--line); margin-bottom: 12px; overflow: hidden; }
.controls { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.seg { display: inline-flex; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.seg button { border: 0; background: none; color: var(--muted); font: inherit; font-size: 14px; padding: 6px 12px; border-radius: 8px; }
.seg button[aria-pressed="true"] { background: var(--accent); color: #fff; font-weight: 600; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .seg button[aria-pressed="true"] { color: #062220; } }
:root[data-theme="dark"] .seg button[aria-pressed="true"] { color: #062220; }
input[type=time], select, input[type=number] {
  font: inherit; font-size: 15px; color: var(--text); background: var(--card);
  border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px;
}
.hero { padding: 14px 16px; }
.hero .tag { display: inline-block; font-size: 12px; font-weight: 700; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 2px 10px; margin-bottom: 6px; }
.hero .tag.jr { color: var(--jr); background: var(--jr-soft); }
.times { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.times .big { font-size: 34px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.5px; }
.times .arrow { color: var(--muted); font-size: 20px; }
.meta { color: var(--muted); font-size: 14px; }
.count { margin-top: 6px; font-size: 15px; font-weight: 600; }
.count.soon { color: var(--bad); }
.legs { border-top: 1px solid var(--line); padding: 4px 16px 12px; }
.leg { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 0 10px; position: relative; }
.leg .t { font-variant-numeric: tabular-nums; font-weight: 700; padding-top: 10px; font-size: 15px; }
.leg .t small { display: block; font-weight: 500; font-size: 12px; color: var(--muted); }
.leg .t .late { color: var(--bad); }
.leg .body { padding: 10px 0 10px 14px; border-left: 5px solid var(--c, var(--accent)); }
.leg.walk .body { border-left-style: dotted; --c: var(--walk); }
.stopname { font-weight: 700; }
.plat { font-size: 12px; color: var(--muted); font-weight: 500; margin-left: 4px; }
.line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0; font-size: 14px; }
.badge { font-size: 12px; font-weight: 700; border-radius: 6px; padding: 1px 7px; background: var(--accent); color: #fff; white-space: nowrap; }
.leg.jr .badge { background: var(--jr); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .badge { color: #062220; } }
:root[data-theme="dark"] .badge { color: #062220; }
.live { font-size: 13px; border-radius: 8px; padding: 4px 8px; margin-top: 4px; display: inline-block; }
.live.on { background: var(--accent-soft); color: var(--accent); }
.live.late { background: var(--warn-soft); color: var(--warn); }
.live.bad { background: var(--bad-soft); color: var(--bad); }
.live.off { background: var(--bg); color: var(--muted); }
.live a { color: inherit; }
.infocard { border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; font-size: 14px; border: 2px solid var(--ic); background: color-mix(in srgb, var(--ic) 12%, var(--card)); --ic: var(--mid); }
.infominor { font-size: 12px; color: var(--muted); margin: -2px 4px 10px; }
.infocard.red { --ic: var(--bad); }
.infocard .ic-h { font-size: 18px; margin-bottom: 2px; color: var(--ic); }
.infocard .ic-h b { font-weight: 900; }
.infocard .ic-s { font-size: 13px; margin-top: 4px; color: var(--muted); }
.infocard a { color: var(--ic); font-weight: 700; }
.stale { background: var(--bad-soft); color: var(--bad); border-radius: 12px; padding: 10px 12px; font-size: 14px; margin-bottom: 10px; }
.stale b { display: block; font-size: 15px; }
.lastbus { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 14px; margin-bottom: 10px; }
.lastbus.soon { border: 2px solid var(--bad); color: var(--bad); }
.daybanner { background: var(--jr-soft); color: var(--jr); border-radius: 12px; padding: 10px 12px; font-size: 14px; margin-bottom: 10px; }
.pinbtn { display: block; width: 100%; margin-top: 10px; border: 0; border-radius: 12px; padding: 11px; background: var(--accent); color: #fff; font: inherit; font-weight: 700; font-size: 15px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pinbtn { color: #062220; } }
:root[data-theme="dark"] .pinbtn { color: #062220; }
.pinned-note { margin-top: 10px; font-size: 14px; font-weight: 700; color: var(--accent); }
.linkbtn { border: 0; background: none; color: var(--muted); font: inherit; font-size: 13px; text-decoration: underline; padding: 4px; }
.card.pin { border: 2px solid var(--accent); padding: 12px 14px; }
.pin-top { display: flex; align-items: center; justify-content: space-between; }
.pin-top .tag { margin: 0; }
.na { margin-top: 8px; }
.na-label { font-size: 13px; font-weight: 800; color: var(--accent); }
.phase-ride .na-label { color: var(--jr); }
.na-text { font-size: 22px; font-weight: 800; line-height: 1.3; margin-top: 2px; }
.na-time { font-size: 18px; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.na-time b { color: var(--accent); font-size: 22px; }
.phase-ride .na-time b { color: var(--jr); }
.na-live { margin-top: 4px; }
.danger { margin-top: 12px; border-radius: 12px; background: var(--bad-soft); color: var(--bad); padding: 10px 12px; font-size: 14px; }
.danger b { display: block; font-size: 15px; margin-bottom: 4px; }
.altbox { margin-top: 8px; color: var(--text); background: var(--card); border-radius: 10px; padding: 8px 10px; line-height: 1.9; }
.altbox .pinbtn { background: var(--bad); }
.pin-all { margin-top: 10px; }
.pin-all summary { cursor: pointer; font-size: 14px; color: var(--muted); padding: 4px 0; }
.pin-all .card { box-shadow: none; margin: 8px -6px 0; }
.ttbtn { border: 1px solid var(--line); background: var(--card); color: var(--accent); font: inherit; font-size: 12px; font-weight: 600; border-radius: 8px; padding: 3px 8px; margin-top: 4px; }
.alt { padding: 12px 16px; display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--line); cursor: pointer; }
.alt:first-child { border-top: 0; }
.alt .tm { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 17px; white-space: nowrap; }
.alt .via { flex: 1; font-size: 13px; color: var(--muted); min-width: 0; }
.alt .dur { font-size: 13px; color: var(--muted); white-space: nowrap; }
.alt[aria-current="true"] { background: var(--accent-soft); }
h2 { font-size: 13px; color: var(--muted); font-weight: 600; margin: 18px 4px 8px; letter-spacing: .02em; }
.cmp { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-bottom: 12px; }
.cmp .card { margin: 0; padding: 10px 12px; cursor: pointer; }
.cmp .k { font-size: 12px; color: var(--muted); }
.cmp .v { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cmp .d { font-size: 12px; color: var(--muted); }
.cmp .best { outline: 2px solid var(--accent); }
.msg { padding: 14px 16px; color: var(--muted); font-size: 14px; }
.alert { background: var(--warn-soft); color: var(--warn); border-radius: 10px; padding: 8px 12px; font-size: 13px; margin-bottom: 10px; }
.watch h3 { margin: 0; padding: 12px 16px 8px; font-size: 16px; }
.watch h3 small { display: block; color: var(--muted); font-weight: 500; font-size: 12px; margin-top: 1px; }
.row { display: grid; grid-template-columns: 68px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 16px; border-top: 1px solid var(--line); }
.row.tap { cursor: pointer; }
.bcard { border-top: 1px solid var(--line); padding: 10px 14px 12px; cursor: pointer; }
.sheet-body .bcard { padding: 10px 0 12px; }
.bhead { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.bcount { font-size: 13px; color: var(--muted); margin-right: 2px; white-space: nowrap; }
.bcount b { font-size: 20px; color: var(--text); font-variant-numeric: tabular-nums; }
.bcount.soon b { color: var(--bad); }
.bdest { font-weight: 700; font-size: 14px; min-width: 0; flex: 1; }
.bstat { font-size: 12px; font-weight: 800; border-radius: 999px; padding: 2px 9px; white-space: nowrap; }
.bstat.on { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.bstat.early { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.bstat.late { background: var(--warn-soft); color: var(--warn); }
.bstat.off { background: var(--bg); color: var(--muted); }
.btl { display: grid; grid-template-columns: auto minmax(24px, 1fr) auto; align-items: start; gap: 8px; margin-top: 8px; }
.bt { min-width: 0; }
.bt:last-child { text-align: right; }
.btt { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; letter-spacing: -.3px; }
.btt small { font-size: 13px; font-weight: 700; color: var(--muted); margin-left: 1px; }
.btt.is-late { color: var(--warn); }
.bts { font-size: 13px; font-weight: 600; margin-top: 2px; }
.bsch { font-size: 12px; color: var(--warn); font-weight: 700; }
.barrow { position: relative; height: 26px; }
.barrow::before { content: ""; position: absolute; left: 0; right: 8px; top: 12px; height: 4px; border-radius: 2px; background: var(--c); }
.barrow::after { content: ""; position: absolute; right: 0; top: 7px; border: 7px solid transparent; border-left: 10px solid var(--c); border-right: 0; }
.bwhere { font-size: 13px; color: var(--muted); margin-top: 6px; }
.bwhere a { color: var(--accent); }
.row .tm { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 17px; line-height: 1.2; }
.row .tm small { display: block; font-size: 12px; color: var(--muted); font-weight: 500; }
.row .dest { font-size: 14px; font-weight: 600; }
.row .where { font-size: 12px; color: var(--muted); }
.row .st { text-align: right; font-size: 13px; font-weight: 700; white-space: nowrap; }
.row .st.late { color: var(--warn); }
.row .st.on { color: var(--ok); }
.row .st.off { color: var(--muted); font-weight: 500; }
.row .st small { display: block; font-weight: 500; color: var(--muted); }
.chips { display: flex; gap: 6px; overflow-x: auto; margin: 0 -16px 10px; padding: 0 16px 2px; scrollbar-width: none; }
.chips button { flex: none; border: 1px solid var(--line); background: var(--card); color: var(--text); border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 13px; }
.chips button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
details.settings { margin-top: 18px; }
details.settings summary { color: var(--muted); font-size: 14px; cursor: pointer; padding: 6px 4px; }
.set { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 14px; }
.set:first-child { border-top: 0; }
.set input[type=number] { width: 72px; text-align: right; }
.foot { color: var(--muted); font-size: 12px; margin: 16px 4px; }
.foot a { color: inherit; }
.hidden { display: none !important; }
.search { padding: 10px 12px; }
.srow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.srow + .srow { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
#placeRow { font-size: 17px; font-weight: 800; }
.sarrow { color: var(--muted); font-weight: 700; }
.sfixed { padding: 6px 2px; }
.search select { font: inherit; font-weight: 700; font-size: 16px; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 6px 28px 6px 10px; appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: right 13px center, right 8px center; background-size: 5px 5px; background-repeat: no-repeat; }
.search input[type=time] { font-size: 16px; font-weight: 700; }
.ch { font-size: 15px; margin: 0; padding: 12px 16px 6px; }
.card.more .cmp { padding: 0 12px 10px; margin: 0; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.card.more .cmp .card { padding: 8px; border-radius: 10px; box-shadow: none; }
.card.more .cmp .k { font-size: 11px; line-height: 1.3; }
.card.more .cmp .v { font-size: 20px; white-space: nowrap; }
.card.more .cmp .v small { font-size: 12px; color: var(--muted); margin-left: 1px; }
.card.more .cmp .d { font-size: 11px; }
#alts .alt:first-child { border-top: 1px solid var(--line); }
details.mapcard > summary { padding: 14px 16px; font-weight: 700; cursor: pointer; list-style: none; }
details.mapcard > summary::-webkit-details-marker { display: none; }
details.mapcard > summary::after { content: "▾"; float: right; color: var(--muted); }
details.mapcard[open] > summary::after { content: "▴"; }
.herobtns { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.herobtns .pinbtn { margin-top: 0; flex: 1; }
.sharebtn { border: 1px solid var(--accent); background: var(--card); color: var(--accent); font: inherit; font-weight: 700; font-size: 15px; border-radius: 12px; padding: 10px 14px; white-space: nowrap; }
.sharebtn.sm { font-size: 12px; padding: 4px 9px; border-radius: 8px; margin-right: 4px; }
.morebtn { display: block; width: 100%; border: 0; border-top: 1px solid var(--line); background: none; color: var(--accent); font: inherit; font-size: 14px; font-weight: 700; padding: 10px; }
.setcard { padding: 4px 0 6px; }
.setcard h3 { margin: 0; padding: 12px 16px 4px; font-size: 15px; }
.setcard .set small { display: block; color: var(--muted); font-size: 12px; }
.setcard select, .setcard input[type=time] { font: inherit; font-size: 15px; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px; }
.setcard input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--accent); }
.set-info { padding: 4px 16px 8px; font-size: 14px; line-height: 1.8; }
.set-btns { padding: 0 16px 10px; }
.set-desc { font-size: 13px; color: var(--muted); margin: 0; padding: 0 16px 6px; }
.days { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.set.daysrow { grid-template-columns: 1fr; }
.set.daysrow .days { justify-content: space-between; }
.set.daysrow .daybtn { flex: 1; width: auto; }
.daybtn { width: 40px; border: 1px solid var(--line); background: var(--card); color: var(--text); border-radius: 10px; font: inherit; font-weight: 700; }
.daybtn[aria-pressed="true"] { background: var(--accent); color: #fff; border-color: var(--accent); }
.push-btns { display: flex; gap: 8px; align-items: center; }
.push-btns .pinbtn { margin-top: 0; flex: 1; }
.help { margin: 4px 0 10px; padding: 0 16px 0 34px; font-size: 14px; line-height: 1.7; }
.help li { margin-bottom: 6px; }
#toast { position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 30;
  background: var(--text); color: var(--card); border-radius: 12px; padding: 10px 14px; font-size: 14px; max-width: 90vw; transition: .25s; }
#toast.on { opacity: 1; transform: translate(-50%, 0); }
/* 押せるところは 44px 以上 */
button, select, input[type=time], input[type=number], .alt, .gitem, .row.tap, .rcard, .favcard, .bcard, details > summary { min-height: 44px; }
.ttbtn, .sharebtn.sm, .linkbtn, .favbtn, .dchip, .chips button, .stopgrid button { min-height: 44px; }
.cmpcard { padding-bottom: 6px; }
.cmphead { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-right: 12px; }
.cmphead select { font: inherit; font-size: 14px; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px; }
.krec { margin: 0 12px 8px; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--k43) 10%, var(--card)); border: 1px solid color-mix(in srgb, var(--k43) 35%, transparent); font-size: 14px; }
.rcard { margin: 0 12px 10px; border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; cursor: pointer; background: var(--card); }
.rcard.sel { border: 2px solid var(--accent); padding: 9px 11px; }
.rcard.none { cursor: default; opacity: .75; }
.rc-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rc-name { font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; }
.rc-name i { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.rc-badge { font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2px 8px; background: var(--bg); color: var(--muted); }
.rc-badge.best { background: var(--accent); color: #fff; }
.rc-times { display: flex; align-items: baseline; gap: 8px; margin: 6px 0; flex-wrap: wrap; }
.rc-t { font-size: 26px; font-weight: 700; letter-spacing: -.3px; }
.rc-t small { font-size: 13px; color: var(--muted); margin-left: 1px; }
.rc-arrow { color: var(--muted); }
.rc-dur { margin-left: auto; font-size: 14px; color: var(--muted); font-weight: 700; }
.rbar { display: flex; height: 22px; border-radius: 6px; overflow: hidden; background: var(--bg); }
.rb { display: flex; align-items: center; justify-content: center; color: #fff; font-size: 11px; font-weight: 700; white-space: nowrap; overflow: hidden; min-width: 2px; }
.rb.wait { background: repeating-linear-gradient(90deg, var(--line) 0 4px, transparent 4px 6px); }
.rb.walk { background: repeating-linear-gradient(90deg, var(--walk) 0 2px, transparent 2px 5px); opacity: .6; }
.rb + .rb { border-left: 1px solid var(--card); }
.rc-stats { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; font-size: 14px; }
.rc-rel b { font-size: 16px; }
.rc-rel small { font-size: 11px; color: var(--muted); margin-left: 3px; border: 1px solid var(--line); border-radius: 4px; padding: 0 3px; }
.rc-rel.ok b { color: var(--ok); } .rc-rel.mid b { color: var(--mid); } .rc-rel.tight b { color: var(--bad); }
.rc-badge.last { background: var(--bad); color: #fff; }
.gpsbox { margin-top: 10px; padding: 8px 10px; border-radius: 10px; background: var(--jr-soft); font-size: 14px; line-height: 1.6; }
.gpsbox .linkbtn { float: right; min-height: 0; }
.bconn .bc-row { border-top: 1px solid var(--line); padding: 10px 14px; }
.bc-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bc-t { font-size: 22px; font-weight: 700; }
.bc-t small { font-size: 12px; color: var(--muted); }
.bc-t.is-late { color: var(--bad); }
.bc-cell { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-top: 6px; padding: 6px 8px; border-radius: 10px; background: var(--bg); font-size: 13px; }
.bc-cell small { margin: 0 2px; font-weight: 700; }
.bc-cell.best { background: var(--accent-soft); outline: 2px solid var(--accent); }
.bc-cell.none { color: var(--muted); }
.bc-l { font-weight: 700; margin-right: 4px; min-width: 6.5em; }
.bc-arr { margin-left: auto; font-size: 15px; }
.heatcard > summary { padding: 14px 16px; font-weight: 700; cursor: pointer; }
.heatctl { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 12px 8px; align-items: center; }
.heatctl select { font: inherit; padding: 6px 8px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); }
table.heat { width: calc(100% - 24px); margin: 0 12px; border-collapse: collapse; font-size: 13px; }
.heat th { font-size: 12px; color: var(--muted); font-weight: 700; padding: 4px; text-align: center; }
.heat th small { display: block; font-weight: 400; font-size: 10px; }
.heat td { padding: 6px 4px; border-top: 1px solid var(--line); }
.hc { text-align: center; font-weight: 700; border-radius: 4px; }
.hc small { display: block; font-size: 10px; font-weight: 400; opacity: .8; }
.hc.none { color: var(--muted); font-weight: 400; }
.hc.h0 { background: #DCEFE8; color: #0B6E5E; } .hc.h1 { background: #EEF2D9; color: #4D5B12; } .hc.h2 { background: #F6EBD2; color: #8A5A00; }
.hc.h3 { background: #F7DCCB; color: #9A3B0A; } .hc.h4 { background: #F2C9C5; color: #B3261E; }
.stale.tt-only { background: var(--mid-soft); color: var(--mid); }
.cmpnote { margin: 0 14px 8px; font-size: 12px; color: var(--muted); }
.rc-join { font-size: 13px; color: var(--muted); margin-top: 4px; }
.rc-warn { font-size: 13px; color: var(--bad); font-weight: 700; margin-top: 4px; }
details.more > summary { padding: 14px 16px; font-weight: 700; cursor: pointer; }
body.no-route .cmpcard, body.no-route #altBox, body.no-route #mapDetails { display: none !important; }
.msg .pinbtn { margin-top: 12px; }
.rmode { display: flex; width: 100%; margin-bottom: 8px; }
.rmode button { flex: 1; font-weight: 700; }
body.mode-free .commute-only { display: none !important; }
body:not(.mode-free) .free-only { display: none !important; }
#freeRow { gap: 6px; }
#freeRow input { flex: 1 1 40%; min-width: 0; font: inherit; font-size: 16px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--text); min-height: 44px; }
.swapbtn { border: 1px solid var(--line); background: var(--card); border-radius: 10px; width: 44px; font-size: 18px; }
.setbtns { display: flex; gap: 8px; margin-bottom: 6px; }
.setbtns .sharebtn { flex: 1; }
.dirbar { display: flex; width: 100%; margin-bottom: 10px; }
.dirbar button { flex: 1; font-size: 15px; font-weight: 700; padding: 8px 4px; }
.dirbar small { font-weight: 500; font-size: 11px; opacity: .85; margin-left: 2px; }
.tlabel { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); }
:root { --kas: #5C8A12; --kab: #C8302C; --k3y: #7C7466; --k4: #7C7466; --kjr: #1F5FAE; --k41: #B0520F; --k43: #6A43A8; --k3: #0E8C78; --k8: #B23A7A; --kx: #6b7280; --k6: #0284c7; --kek: #16a34a; --kmw: #9333ea; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --kas: #A3D45A; --kab: #F07470; --k41: #E08A4A; --k43: #A98BE0; --k4: #B8B0A2; --kx: #9ca3af; --k3y: #B8B0A2; --kjr: #7FA7E0; --k3: #3CC4AA; --k8: #E07AB0; --k6: #38bdf8; --kek: #4ade80; --kmw: #c084fc; } }
:root[data-theme="dark"] { --kas: #A3D45A; --kab: #F07470; --k41: #E08A4A; --k43: #A98BE0; --k4: #B8B0A2; --kx: #9ca3af; --k3y: #B8B0A2; --kjr: #7FA7E0; --k3: #3CC4AA; --k8: #E07AB0; --k6: #38bdf8; --kek: #4ade80; --kmw: #c084fc; }
.mapcard { padding: 8px 8px 12px; }
.mapcard h3 { margin: 4px 8px 0; font-size: 15px; }
.dg { width: 100%; height: auto; display: block; max-width: 420px; margin: 0 auto; }
.dg-node { font-size: 14px; font-weight: 700; fill: var(--text); }
.dg-sub { font-size: 11px; fill: var(--muted); }
.dg-line { font-size: 12px; font-weight: 700; }
.dg-mark rect { fill: var(--accent); }
.dg-mark text { font-size: 12px; font-weight: 700; fill: #fff; }
.dg-mark.start rect, .dg-mark.end rect { fill: var(--text); }
.dg-mark.start text, .dg-mark.end text { fill: var(--card); }
.dg-mark.ok rect { fill: var(--ok); }
.dg-mark.mid rect { fill: var(--mid); }
.dg-mark.tight rect { fill: var(--bad); }
.veh { cursor: pointer; transition: transform 2s linear; }
.veh-ring { fill: none; stroke: transparent; stroke-width: 3; }
.veh-win { fill: #fff; opacity: .85; }
.veh-pan { fill: none; stroke: var(--text); stroke-width: 1.6; display: none; }
.veh-rail { fill: var(--text); display: none; }
.veh.train .veh-pan, .veh.train .veh-rail { display: inline; }
.veh.train .veh-wh { display: none; }
.veh-badge rect { stroke: #fff; stroke-width: 1.5; }
.veh-badge rect.late { fill: var(--bad); }
.veh-badge rect.on { fill: var(--ok); }
.veh-badge text { font-size: 9px; font-weight: 700; fill: #fff; pointer-events: none; }
.veh-wh { fill: #222; stroke: #fff; stroke-width: 1.5; }
.veh.sel .veh-ring { stroke: var(--text); }
.node { cursor: pointer; }
.node-hit { fill: transparent; }
.node:hover .node-hit, .node.sel .node-hit { fill: var(--accent-soft); }
.node:focus, .veh:focus { outline: none; }
.node:focus-visible .node-hit { stroke: var(--accent); stroke-width: 2; }
.dg-soon { cursor: pointer; }
.citycard { padding: 0; }
#cityMap { height: 58vh; min-height: 320px; border-radius: 14px 14px 0 0; z-index: 0; }
#cityMap .msg { padding: 40px 16px; text-align: center; }
.citynote { font-size: 12px; color: var(--muted); padding: 8px 12px; }
.cdot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; }
.cbus { background: none; border: 0; }
.cb { display: inline-flex; align-items: center; gap: 2px; background: var(--c); color: #fff; border: 2px solid #fff; border-radius: 12px; padding: 1px 7px; font-size: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.35); white-space: nowrap; }
.cb b { font-weight: 800; }
.cb.cl { background: #1f2937; }
.bi { position: relative; width: 46px; height: 32px; filter: drop-shadow(0 1px 2px rgba(0,0,0,.4)); }
.bi i { position: absolute; right: -8px; top: -8px; font-style: normal; font-weight: 800; font-size: 10px; background: #b45309; color: #fff; border: 1.5px solid #fff; border-radius: 8px; padding: 0 4px; }
.sdot i { display: block; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 3px solid #333; box-sizing: border-box; }
.sclu span { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: rgba(90,95,102,.85); color: #fff; font-size: 11px; font-weight: 700; border: 2px solid #fff; }
.bcl { display: inline-flex; align-items: baseline; gap: 1px; background: #1f2937; color: #fff; border: 2px solid #fff; border-radius: 13px; padding: 1px 8px; font-size: 11px; box-shadow: 0 1px 4px rgba(0,0,0,.4); white-space: nowrap; }
.bcl b { font-size: 14px; }
.obadge { display: inline-block; color: #fff; font-weight: 800; font-size: 13px; border-radius: 6px; padding: 1px 8px; }
.favmore { border: 1px dashed var(--line); border-radius: 12px; }
.favcard { border: 1px solid var(--line); background: var(--card); border-radius: 12px; padding: 8px 12px; width: 100%; cursor: pointer; }
.favhead { display: flex; align-items: baseline; gap: 6px; margin-bottom: 4px; }
.favhead small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.favhead .chev { margin-left: auto; color: var(--muted); }
.fdep { display: flex; align-items: center; gap: 8px; padding: 3px 0; font-size: 14px; }
.fwait { min-width: 52px; font-weight: 800; }
.fwait.soon { color: var(--bad); }
.fdest { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ftime { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ftime.is-late { color: var(--warn); }
.ftime small { font-size: 11px; margin-left: 2px; }
.sharebtn.on { background: var(--accent); color: #fff; }
.favbtn { border: 0; background: none; font-size: 22px; color: #eab308; padding: 0 4px; }
.dchips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.dchip { border: 1px solid var(--line); background: var(--card); color: var(--text); font: inherit; font-size: 13px; border-radius: 999px; padding: 5px 10px; }
.dchip.more { border-style: dashed; color: var(--muted); }
.bdest .via { font-weight: 500; color: var(--muted); font-size: 12px; }
.dchip small { color: var(--muted); margin-left: 2px; }
.dchip[aria-pressed="true"] { background: var(--accent); color: #fff; border-color: var(--accent); }
.dchip[aria-pressed="true"] small { color: #fff; opacity: .85; }
.cline { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.cmeta { font-size: 13px; color: var(--muted); line-height: 1.4; }
.stopsearch { display: flex; gap: 6px; margin: 0 0 10px; }
.stopsearch input { flex: 1; min-width: 0; font: inherit; font-size: 16px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--text); }
.stopsearch button { border: 0; border-radius: 12px; background: var(--text); color: var(--card); font: inherit; font-weight: 700; padding: 0 14px; }
.cb i { font-style: normal; font-weight: 800; background: #fff; color: #b45309; border-radius: 6px; padding: 0 3px; font-size: 10px; }
.stopgrid { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }
.stopgrid button { border: 1px solid var(--line); background: var(--card); color: var(--text); font: inherit; font-size: 14px; border-radius: 10px; padding: 7px 11px; }
.stopgrid button small { color: var(--muted); }
#nearBtn { margin-top: 0; }
.schedtoggle { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); padding: 2px 8px; }
.gitem { padding: 10px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.gitem .chev { float: right; color: var(--muted); font-size: 18px; }
.gitem .bstat { margin-left: 4px; }
.dg-soon .chev { float: right; color: var(--muted); font-size: 18px; line-height: 1; }
.warn { color: var(--warn); }
.sheet { position: fixed; inset: 0; z-index: 20; }
.sheet-bg { position: absolute; inset: 0; background: rgba(0,0,0,.4); animation: fade .15s; }
.sheet-panel {
  position: absolute; left: 0; right: 0; bottom: 0; max-width: 640px; margin: 0 auto; max-height: 80vh;
  background: var(--card); border-radius: 18px 18px 0 0; display: flex; flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom); animation: up .2s ease-out; box-shadow: 0 -4px 24px rgba(0,0,0,.2);
}
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
.sheet-grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 8px auto 0; }
.sheet-head { display: flex; align-items: center; gap: 8px; padding: 8px 12px 10px 16px; border-bottom: 1px solid var(--line); }
.sheet-title { flex: 1; font-weight: 700; font-size: 17px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-width: 0; }
.sheet-btn { border: 0; background: var(--bg); color: var(--text); width: 36px; height: 36px; border-radius: 50%; font-size: 22px; line-height: 1; flex: none; }
.sheet-body { overflow-y: auto; padding: 12px 16px 20px; -webkit-overflow-scrolling: touch; }
.sheet-body .row { padding: 10px 0; cursor: pointer; }
.sheet-body h4 { margin: 14px 0 2px; font-size: 14px; display: flex; align-items: center; gap: 4px; }
.sh-h { font-size: 13px; color: var(--muted); margin: 16px 0 0; border-top: 1px solid var(--line); padding-top: 12px; }
.note { font-size: 13px; background: var(--bg); border-radius: 10px; padding: 8px 10px; margin: 8px 0; }
.pill { display: inline-block; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 8px; margin-left: 6px; vertical-align: 1px; }
.pill.ride { background: var(--text); color: var(--card); }
.pill.ride.xf { background: var(--mid); color: #fff; }
table.tt { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 8px; font-variant-numeric: tabular-nums; }
.tt th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 4px 0; border-bottom: 1px solid var(--line); position: sticky; top: -12px; background: var(--card); }
.tt th:nth-child(n+2), .tt td:nth-child(n+2) { text-align: right; width: 56px; }
.tt td { padding: 7px 0; border-bottom: 1px solid var(--line); }
.tt tr.hub td:first-child { font-weight: 700; }
.tt tr.passed td { color: var(--muted); opacity: .6; }
.tt td.late { color: var(--warn); font-weight: 700; }
.tt tr.here td { background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 13px; padding: 6px 8px; border-radius: 8px; }
.veh-t { font-size: 11px; font-weight: 800; pointer-events: none; }
.veh-late { font-size: 11px; font-weight: 800; fill: var(--warn); }
.veh.sel circle { stroke: var(--text); stroke-width: 3; }
.dg-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--muted); padding: 4px 8px; }
.dg-legend i { display: inline-block; width: 14px; height: 5px; border-radius: 3px; margin-right: 4px; vertical-align: middle; }
.dg-legend i.solid { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.dg-legend i.hollow { width: 10px; height: 10px; border-radius: 50%; border: 2px dashed var(--muted); box-sizing: border-box; }
.dg-info { margin: 6px 8px 0; padding: 8px 10px; border-radius: 10px; background: var(--bg); font-size: 13px; min-height: 40px; }
.dg-soonwrap { margin: 8px 8px 0; }
.dg-soon { padding: 6px 10px; border-top: 1px solid var(--line); font-size: 13px; }
.kdot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; }
.flow { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 2px; margin-top: 8px; font-size: 14px; }
.flow .badge { font-size: 13px; padding: 2px 8px; }
.flow .fx { color: var(--muted); font-weight: 700; display: inline-flex; align-items: center; gap: 2px; padding: 0 2px; }
.flow .fx small { font-size: 12px; font-weight: 600; color: var(--text); background: var(--bg); border-radius: 6px; padding: 1px 6px; }
.flow .fgoal { font-size: 14px; }
.ride { margin: 4px 0; }
.rrow { display: grid; grid-template-columns: 82px 22px minmax(0, 1fr); column-gap: 6px; }
.rt { padding: 8px 0 6px; text-align: right; }
.tlbl { display: inline-block; font-size: 11px; font-weight: 800; border-radius: 6px; padding: 1px 7px; color: #fff; background: var(--c, var(--accent)); }
.tlbl.arr { background: var(--card); color: var(--text); box-shadow: inset 0 0 0 2px var(--c, var(--text)); }
.tlbl.start, .tlbl.goal { background: var(--text); color: var(--card); }
.rtt { white-space: nowrap; font-size: 21px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.15; margin-top: 3px; letter-spacing: -.3px; }
.rtt small { font-size: 12px; font-weight: 700; margin-left: 1px; color: var(--muted); }
.rtt.is-late { color: var(--warn); }
.rlate { font-size: 11px; font-weight: 700; color: var(--warn); line-height: 1.3; margin-top: 2px; }
.rlate.early { color: var(--ok); }
.rl { position: relative; }
.rl::before { content: ""; position: absolute; left: 50%; width: 6px; margin-left: -3px; background: var(--c, var(--accent)); top: 0; bottom: 0; }
.rrow.dep .rl::before { top: 32px; }
.rrow.arr .rl::before { bottom: auto; height: 32px; }
.rrow.dep .rl::after, .rrow.arr .rl::after { content: ""; position: absolute; left: 50%; top: 32px; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; box-sizing: border-box; }
.rrow.dep .rl::after { background: var(--c); border: 3px solid var(--card); box-shadow: 0 0 0 2px var(--c); }
.rrow.arr .rl::after { background: var(--card); border: 4px solid var(--c); }
.rn { padding: 8px 0 6px; min-width: 0; }
.rrow.dep .rn, .rrow.arr .rn { padding-top: 21px; }
.rrow.mid .rn { padding: 2px 0 10px; }
.rrow.mid .line { margin: 0 0 2px; }
.walkrow .rl::before { background: none; border-left: 3px dotted var(--walk); width: 0; margin-left: -1px; top: 0; bottom: 0; }
.walkrow .rn { padding-top: 21px; }
.row .tm { white-space: nowrap; }
.row .tm .suf { font-size: 12px; font-weight: 700; color: var(--muted); margin-left: 1px; }
.row .tm.is-late { color: var(--warn); }
.row .tm small { color: var(--warn); font-weight: 700; }
.xcard { margin: 6px 0 10px; border: 2px solid var(--xc); border-radius: 14px; background: color-mix(in srgb, var(--xc) 7%, var(--card)); padding: 10px 12px; --xc: var(--ok); }
.xcard.mid { --xc: var(--mid); }
.xcard.tight { --xc: var(--bad); }
.xh { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 15px; }
.xn { font-size: 12px; font-weight: 800; color: #fff; background: var(--xc); border-radius: 6px; padding: 1px 7px; }
.xspare { margin-left: auto; font-size: 13px; font-weight: 800; color: var(--xc); }
.xrow { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.3fr); gap: 8px; align-items: center; margin-top: 8px; }
.xside { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 7px 9px; min-height: 100%; }
.xlbl { font-size: 11px; color: var(--muted); font-weight: 700; margin-bottom: 3px; }
.xtime { font-weight: 800; font-size: 16px; font-variant-numeric: tabular-nums; margin-top: 3px; }
.xdest { font-size: 12px; color: var(--muted); margin-top: 2px; }
.xarrow { font-size: 22px; color: var(--xc); font-weight: 800; }
.xwalk { font-size: 13px; margin-top: 8px; font-weight: 600; }
.xwalk::before { content: "🚶 "; }
.xfer { display: inline-block; font-size: 13px; font-weight: 700; border-radius: 8px; padding: 3px 9px; margin-top: 2px; }
.xfer.ok { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.xfer.mid { background: var(--warn-soft); color: var(--warn); }
.xfer.tight { background: var(--bad-soft); color: var(--bad); }

/* ───────── 全体の仕上げ ───────── */
.card { border: 0; border-radius: 18px; box-shadow: 0 1px 2px rgba(26,29,33,.05), 0 8px 24px rgba(26,29,33,.06); }
:root[data-theme="dark"] .card { border: 1px solid var(--line); box-shadow: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .card { border: 1px solid var(--line); box-shadow: none; } }
header { background: color-mix(in srgb, var(--bg) 82%, transparent); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
header h1 { font-size: 18px; letter-spacing: .02em; }
nav.tabs { border-top: 0; box-shadow: 0 -6px 24px rgba(26,29,33,.07); background: color-mix(in srgb, var(--card) 92%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
nav.tabs button { font-weight: 700; }
nav.tabs button svg { padding: 3px 16px; border-radius: 999px; box-sizing: content-box; transition: background .2s; }
nav.tabs button[aria-selected="true"] svg { background: var(--accent-soft); }
h2 { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 15px; font-weight: 700; letter-spacing: .02em; }
h2::before { content: ""; width: 4px; height: 16px; border-radius: 2px; background: var(--accent); }
.seg { border-radius: 14px; }
.seg button { border-radius: 11px; }
.badge, .obadge { letter-spacing: .02em; }
.sheet-panel { border-radius: 24px 24px 0 0; max-height: 86vh; }
.sheet-head { border-bottom: 0; padding-bottom: 4px; }

/* ───────── バス停マップ ───────── */
#view-city { margin-top: -12px; }
.mapwrap { position: relative; isolation: isolate; margin: 0 -16px; height: max(380px, calc(100svh - 300px)); }
.mapwrap #cityMap { position: absolute; inset: 0; height: auto; min-height: 0; border-radius: 0 0 22px 22px; }
.mapover { position: absolute; left: 12px; right: 12px; top: 12px; z-index: 500; pointer-events: none; }
.mapover > * { pointer-events: auto; }
.mapsearch { display: flex; align-items: center; gap: 8px; background: var(--card); border-radius: 16px; padding: 4px 4px 4px 14px; box-shadow: 0 4px 18px rgba(26,29,33,.16); }
.mapsearch svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2.4; stroke-linecap: round; flex: none; }
.mapsearch input { flex: 1; min-width: 0; border: 0; background: none; font: inherit; font-size: 16px; color: var(--text); outline: none; min-height: 44px; }
.mapsearch button { border: 0; border-radius: 12px; background: var(--accent); color: #fff; font: inherit; font-weight: 700; padding: 0 16px; }
.mapchips { margin: 8px -12px 0; padding: 0 12px 4px; }
.mapchips button { background: color-mix(in srgb, var(--card) 94%, transparent); box-shadow: 0 2px 8px rgba(26,29,33,.12); border-color: transparent; font-weight: 700; }
.mapchips button[aria-pressed="false"] { opacity: .6; }
.mapchips button[aria-pressed="true"] { background: var(--card); color: var(--text); border-color: var(--accent); box-shadow: 0 2px 10px rgba(11,110,94,.25); }
.mapfab { position: absolute; right: 12px; bottom: 96px; z-index: 500; width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--card); box-shadow: 0 4px 14px rgba(26,29,33,.2); display: grid; place-items: center; }
.mapfab svg { width: 24px; height: 24px; fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round; }
.mapinfo { position: absolute; left: 12px; bottom: 14px; z-index: 500; font-size: 12px; background: color-mix(in srgb, var(--card) 90%, transparent); border-radius: 999px; padding: 6px 12px; box-shadow: 0 2px 8px rgba(26,29,33,.12); color: var(--muted); }
.mapinfo b { color: var(--text); font-size: 14px; }
.leaflet-bottom.leaflet-right { margin-bottom: 4px; }
.nearwrap { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 0; }
.nearwrap button { border: 1px solid var(--line); background: var(--card); border-radius: 12px; padding: 8px 12px; font: inherit; font-size: 14px; color: var(--text); }
.nearwrap button small { color: var(--muted); }
.sechead { display: flex; align-items: center; justify-content: space-between; margin: 18px 4px 8px; }
.sechead h2 { margin: 0; }
.favscroll { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 2px 16px 12px; scrollbar-width: none; }
.favscroll::-webkit-scrollbar { display: none; }
.favcard2 { flex: none; width: 84%; max-width: 330px; scroll-snap-align: start; background: var(--card); border-radius: 18px; padding: 12px 14px; box-shadow: 0 1px 2px rgba(26,29,33,.05), 0 6px 18px rgba(26,29,33,.07); cursor: pointer; }
.fc-head { display: flex; align-items: center; justify-content: space-between; font-size: 17px; }
.fc-head .chev { color: var(--muted); font-size: 20px; }
.fc-dir { font-size: 12px; color: var(--muted); margin: 2px 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc-row { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; gap: 6px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); font-size: 14px; }
.fc-t { font-size: 17px; }
.fc-t.late { color: var(--bad); }
.fc-dest { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc-wait { font-weight: 700; color: var(--muted); font-size: 13px; }
.fc-wait.soon { color: var(--bad); }
.fc-empty { font-size: 13px; color: var(--muted); padding: 8px 0; }
.favempty { color: var(--muted); font-size: 14px; padding: 8px 4px; }

/* ───────── 発車一覧（発車標） ───────── */
.sh-stop { font-size: 22px; font-weight: 700; letter-spacing: .02em; }
.st-actions { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-bottom: 10px; }
.chipbtn { flex: none; border: 1px solid var(--line); background: var(--bg); color: var(--text); border-radius: 999px; padding: 0 14px; font: inherit; font-size: 14px; font-weight: 700; }
.dirrow { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.dirrow .dl { font-size: 12px; font-weight: 700; color: var(--muted); flex: none; }
.dscroll { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.dscroll::-webkit-scrollbar, .st-actions::-webkit-scrollbar { display: none; }
.dscroll .dchip { flex: none; white-space: nowrap; font-weight: 700; }
.board { background: #15191E; color: #F2F4F6; border-radius: 16px; overflow: hidden; }
.drow { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: center; padding: 12px 14px; border-top: 1px solid rgba(255,255,255,.08); cursor: pointer; }
.drow:first-child { border-top: 0; }
.drow:active { background: rgba(255,255,255,.05); }
.d-time b { display: block; font-size: 25px; line-height: 1.05; letter-spacing: -.3px; color: #fff; }
.d-time b.late { color: #FF8A80; }
.d-wait { font-size: 12px; font-weight: 700; color: #F5B83D; }
.d-wait.soon { color: #FF8A80; }
.d-line { display: flex; align-items: center; gap: 8px; min-width: 0; }
.d-dest { font-size: 17px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-dest small { font-size: 12px; margin-left: 1px; color: #AEB5BD; }
.d-sub { font-size: 12px; color: #9AA1A9; margin-top: 3px; line-height: 1.4; }
.dpill { display: inline-block; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 3px 9px; white-space: nowrap; }
.dpill.on { background: rgba(60,196,170,.18); color: #5FE0C4; }
.dpill.late { background: rgba(255,138,128,.18); color: #FF8A80; }
.dpill.off { background: rgba(255,255,255,.08); color: #AEB5BD; }
.b-empty { padding: 22px 16px; color: #AEB5BD; text-align: center; font-size: 14px; }

.fc-t, .fc-wait, .d-time b, .d-wait, .dpill, .obadge, .d-plan { white-space: nowrap; }
.fc-t { min-width: 3.1em; }
.d-time { min-width: 4.3em; }
.d-line .obadge { flex: none; }
.d-sub .dpill { font-size: 11px; padding: 1px 7px; margin-right: 6px; vertical-align: 1px; }
.d-plan { margin-right: 6px; color: #FF8A80; font-weight: 700; }
.d-dest { font-size: 18px; }

.bcl2 { position: relative; display: inline-flex; align-items: center; gap: 3px; background: #1A1D21; border: 2px solid #fff; border-radius: 14px; padding: 2px 4px 2px 3px; box-shadow: 0 2px 6px rgba(0,0,0,.35); white-space: nowrap; height: 24px; box-sizing: border-box; }
.bcl2 span { color: #fff; font-size: 11px; font-weight: 900; border-radius: 9px; padding: 1px 5px; line-height: 15px; }
.bcl2 b { color: #fff; font-size: 13px; padding: 0 3px 0 2px; line-height: 1; }
.bcl2 b small { font-size: 9px; margin-left: 1px; }
.bcl2 i { position: absolute; top: -4px; right: -4px; width: 10px; height: 10px; border-radius: 50%; background: #B3261E; border: 2px solid #fff; }
.d-time .obadge { font-size: 15px; padding: 3px 9px; }

.veh-stack { display: none; fill: var(--muted); stroke: var(--card); stroke-width: 2; opacity: .55; }
.veh.grp .veh-stack { display: inline; }
.veh.grp .veh-t { font-size: 10.5px; }


.chimegrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px 16px 0; }
.chimebtn { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 72px; border: 2px solid var(--line); background: var(--bg); color: var(--text); border-radius: 14px; padding: 10px 12px; font: inherit; font-size: 14px; font-weight: 700; text-align: left; }
.chimebtn .ci { font-size: 20px; line-height: 1; }
.chimebtn small { font-size: 11px; font-weight: 500; color: var(--muted); }
.chimebtn[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.chimebtn[aria-pressed="true"] small { color: var(--accent); font-weight: 700; }

.mapfail { display: flex; flex-direction: column; gap: 12px; align-items: center; text-align: center; padding: 40px 24px; }
.mapfail .pinbtn { width: auto; padding: 11px 22px; }
#cityMap { background: #EEF0EC; }
:root[data-theme="dark"] #cityMap .leaflet-tile-pane { filter: brightness(.82) contrast(1.05) saturate(.85); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) #cityMap .leaflet-tile-pane { filter: brightness(.82) contrast(1.05) saturate(.85); } }
.tt tr.here-row td { background: var(--accent-soft); font-weight: 700; }

.vcomp { margin: 4px 0 14px; padding: 12px; border-radius: 14px; background: var(--bg); }
.vcomp h4 { margin: 0 0 8px; font-size: 15px; }
.vctab { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.vctab th, .vctab td { padding: 6px 4px; border-top: 1px solid var(--line); text-align: center; vertical-align: middle; }
.vctab thead th { border-top: 0; font-size: 12px; }
.vctab small { display: block; font-size: 10.5px; color: var(--muted); font-weight: 500; }
.vctab td b { font-size: 17px; }
.vctab td.vc-win { background: color-mix(in srgb, var(--ok) 14%, transparent); border-radius: 8px; }

.sttiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.sttile { background: var(--card); border-radius: 16px; padding: 12px 10px; box-shadow: 0 1px 2px rgba(26,29,33,.05), 0 6px 18px rgba(26,29,33,.06); }
.stt-k { font-size: 11.5px; color: var(--muted); font-weight: 700; }
.stt-v { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; margin-top: 2px; white-space: nowrap; }
.stt-v small { font-size: 12px; margin-left: 2px; color: var(--muted); }
.stcard { padding: 14px 16px; }
.stcard h3 { margin: 0 0 4px; font-size: 16px; }
.st-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.st-h h3 { margin: 0; }
.st-h select { font: inherit; font-size: 14px; font-weight: 700; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; min-height: 40px; }
.st-desc { font-size: 12.5px; color: var(--muted); margin: 0 0 10px; }
.st-metric { margin-bottom: 8px; }
.strow { display: grid; grid-template-columns: 104px minmax(0, 1fr) 92px; gap: 8px; align-items: center; padding: 7px 0; border-top: 1px solid var(--line); }
.strow:first-child { border-top: 0; }
.str-name { font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.str-name i, .stdot { width: 10px; height: 10px; border-radius: 3px; flex: none; display: inline-block; margin-right: 4px; }
.str-bar { height: 10px; background: var(--bg); border-radius: 5px; overflow: hidden; }
.str-bar span { display: block; height: 100%; border-radius: 5px; }
.str-v { text-align: right; font-variant-numeric: tabular-nums; font-size: 12px; }
.str-v b { font-size: 18px; }
.str-v small { display: block; font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.stchart { width: 100%; height: auto; display: block; touch-action: pan-y; }
.stc-grid { stroke: var(--line); stroke-width: 1; }
.stc-ax { font-size: 10px; fill: var(--muted); font-variant-numeric: tabular-nums; }
.stc-cross { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.stchart-tip { min-height: 22px; font-size: 13px; margin-bottom: 4px; font-variant-numeric: tabular-nums; }
.stchart-tip small { color: var(--muted); margin-left: 6px; }
.st-foot { margin: 4px 4px 16px; }
#view-stats .vcomp { margin: 0; }

.rlate.exp { color: var(--muted); }
.rc-late { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.rc-late b { color: var(--text); font-variant-numeric: tabular-nums; }

header { gap: 8px; }
.hbtns { display: flex; gap: 2px; margin-right: -6px; }
.hbtn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-width: 44px; min-height: 44px; border: 0; border-radius: 12px; background: none; color: var(--text); font: inherit; font-size: 10px; font-weight: 700; padding: 2px 4px; }
.hbtn:active { background: var(--accent-soft); }
.hbtn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hbtn.spin svg { animation: hspin .8s linear infinite; }
@keyframes hspin { to { transform: rotate(360deg); } }
.upd { line-height: 1.3; }

header h1 { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 16.5px; }
.upd { font-size: 11px; }
