/* 広島バスマップ（frontend.md §3・§4.14〜§4.17、ワイヤー docs/wireframe/*.dc.html） */
:root{
  --ink:#1D2329; --ink2:#3A4048; --muted:#5A6068; --line:#D6D3CB; --line2:#E4E1D9; --bg:#F6F5F1; --card:#FFFFFF; --link:#1F4E79;
  --on_time:#1F8A5B; --early:#2F6FD6; --late:#E39B2E; --very_late:#A3271B; --unknown:#8A8F96;
  --stale-opacity:.45;
}
*{box-sizing:border-box}
html,body{margin:0;height:100%;background:var(--bg);color:var(--ink);
  font-family:'BIZ UDPGothic','Hiragino Sans','Hiragino Kaku Gothic ProN','Yu Gothic','Meiryo',sans-serif}
a{color:var(--link)}a:hover{color:#163A5B}
[hidden]{display:none!important}
.sr-only{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.skip{position:absolute;left:8px;top:-60px;z-index:3000;background:var(--ink);color:#fff;padding:10px 14px;border-radius:6px}
.skip:focus{top:8px}
:focus-visible{outline:2px solid var(--ink);outline-offset:2px}
[tabindex="-1"]:focus{outline:none}

#app{display:flex;flex-direction:column;height:100vh;height:100dvh;max-width:100vw;overflow:hidden}

/* ヘッダー */
.top{flex:none;display:flex;justify-content:space-between;align-items:center;gap:8px;padding:6px 8px 6px 16px;background:var(--card);border-bottom:1px solid var(--line)}
.brand{display:flex;align-items:baseline;gap:16px;min-width:0}
.top h1{font-size:18px;margin:0;white-space:nowrap}
.tagline{font-size:13px;color:var(--muted)}
.top-right{display:flex;align-items:center;gap:12px;font-size:12px;color:var(--muted)}
.updated{white-space:nowrap}
.updated.is-lagging{background:#FAEEDA;color:#5A3A00;border:1px solid var(--late);border-radius:6px;padding:3px 8px;font-weight:700}
.updated.is-stopped{background:#FCEBEB;color:#791F1F;border:1px solid var(--very_late);border-radius:6px;padding:3px 8px;font-weight:700}
.icon-btn{width:44px;height:44px;border:0;border-radius:50%;background:transparent;color:var(--ink2);cursor:pointer;display:inline-flex;align-items:center;justify-content:center}
.icon-btn:hover{background:#ECEAE4}

/* 帯 */
.banner{flex:none;background:#FAEEDA;color:#5A3A00;border-bottom:1px solid var(--late);padding:8px 16px;font-size:13px;line-height:1.5}
.banner a{color:#5A3A00}
.banner.is-stopped{background:#FCEBEB;color:#791F1F;border-bottom-color:var(--very_late)}
.banner.is-stopped a{color:#791F1F}
.banner-map{background:#ECEAE4;color:var(--ink);border-bottom-color:var(--line)}

/* 本体 */
.body{flex:1 1 auto;min-height:0;display:flex;flex-direction:column}
.col-left{flex:none}
.col-map{flex:1 1 auto;min-height:0;display:flex;flex-direction:column}
.col-right{display:none}
.desktop-only{display:none!important}

/* まとめ */
.summary{display:flex;gap:8px;align-items:center;flex-wrap:wrap;padding:8px 16px;background:var(--card);border-bottom:1px solid var(--line2);font-size:13px}
.sum-item{padding:4px 10px;border-radius:14px;background:#ECEAE4;white-space:nowrap}
.sum-item b{font-size:15px}
.sum-item .unit{margin-left:1px}
.sum-delayed{background:#FAEEDA;color:#5A3A00}
.sum-very{background:#FCEBEB;color:#791F1F}
.sum-filtered{font-size:12px;color:var(--muted);border:1px dashed #9AA0A6;border-radius:12px;padding:2px 8px}
.delays-note{margin:0;padding:6px 16px;font-size:12px;line-height:1.5;color:#3A4048;background:#ECEAE4;border-bottom:1px solid var(--line2)}

/* 地図 */
.map-wrap{position:relative;flex:1 1 auto;min-height:180px}
#map{position:absolute;inset:0;z-index:0;background:#E9E6DF}
.map-loading{position:absolute;inset:0;z-index:5;display:flex;align-items:center;justify-content:center;background:rgba(246,245,241,.85);font-size:14px;pointer-events:none}
.legend{background:rgba(255,255,255,.94);border:1px solid var(--line2);border-radius:8px;padding:6px 9px;font-size:11px;color:var(--ink2);line-height:1.75}
.legend-title{display:none}
.map-slot-legend{position:absolute;z-index:4;left:10px;top:10px}
.map-slot-next{position:absolute;z-index:4;right:10px;top:10px;width:min(250px,60%)}
.sw{display:inline-block;width:10px;height:10px;border-radius:50%;vertical-align:-1px;margin-right:5px}
.c-on_time{background:var(--on_time)}.c-early{background:var(--early)}.c-late{background:var(--late)}.c-very_late{background:var(--very_late)}.c-unknown{background:var(--unknown)}
.bang{display:inline-block;width:12px;height:12px;border-radius:50%;background:var(--ink);color:#fff;font-size:9px;font-weight:700;line-height:12px;text-align:center;font-style:normal;vertical-align:-1px;margin-right:5px}
/* 「現在地へ」は Google の帰属・規約表示より上に置く（§4.16） */
.fab{position:absolute;z-index:4;right:10px;bottom:40px;width:48px;height:48px;border-radius:50%;border:1px solid #C9C6BE;background:#fff;box-shadow:0 2px 6px rgba(0,0,0,.15);cursor:pointer;display:flex;align-items:center;justify-content:center}
.fab[aria-busy="true"]{opacity:.6}
.fab-refresh{bottom:98px}
.fab-refresh[aria-busy="true"] svg{animation:spin 1s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){.fab-refresh[aria-busy="true"] svg{animation:none}}
.toast{position:absolute;z-index:6;left:50%;bottom:100px;transform:translateX(-50%);max-width:90%;background:var(--ink);color:#fff;font-size:13px;line-height:1.5;padding:8px 12px;border-radius:8px}
.empty-card{position:absolute;z-index:4;left:50%;top:50%;transform:translate(-50%,-50%);width:min(320px,86%);background:rgba(255,255,255,.97);border:1px solid var(--line);border-radius:10px;padding:14px 16px;font-size:14px;line-height:1.6;text-align:center;box-shadow:0 2px 8px rgba(0,0,0,.12)}
.empty-card .t{margin-top:8px}
.empty-inline{background:#fff;border:1px solid var(--line2);border-radius:8px;padding:12px 14px;font-size:14px;line-height:1.6;margin-bottom:12px}

/* 車両マーカー（当たり判定 44px、見た目 26px。選択中 34px＋黒縁） */
.bm{position:relative;width:44px;height:44px;display:flex;align-items:center;justify-content:center;cursor:pointer;background:transparent}
.bm.g{transform:translateY(50%)}            /* Google の高度なマーカーは下端中央が基準なので中心に合わせる */
.bm.tight{width:26px;height:26px}
.bm svg.bus{width:26px;height:26px;display:block;filter:drop-shadow(0 1px 2px rgba(0,0,0,.35));pointer-events:none}
.bm.sel svg.bus{width:34px;height:34px}
.bm.sel .body{stroke:var(--ink);stroke-width:2.4}
.bm .body{stroke:#fff;stroke-width:1.6}
.bm.k-on_time .body{fill:var(--on_time)}.bm.k-early .body{fill:var(--early)}.bm.k-late .body{fill:var(--late)}.bm.k-very_late .body{fill:var(--very_late)}.bm.k-unknown .body{fill:var(--unknown)}
.bm .dir{position:absolute;left:50%;top:50%;width:0;height:0;margin:-19px 0 0 -5px;border-left:5px solid transparent;border-right:5px solid transparent;border-bottom:8px solid var(--ink);transform-origin:5px 19px;filter:drop-shadow(0 0 1px #fff);pointer-events:none}
.bm.sel .dir{margin-top:-23px;transform-origin:5px 23px}
.bm .alert-dot{position:absolute;left:50%;top:50%;margin:-20px 0 0 6px;width:14px;height:14px;border-radius:50%;background:var(--ink);color:#fff;font-size:10px;font-weight:700;line-height:12px;text-align:center;border:1.5px solid #fff;pointer-events:none}
.bm.stale{opacity:var(--stale-opacity)}
/* 車両の追跡（§4.18.6）：追跡中は白い輪・黒縁・大きさで目立たせ、ほかは薄く（大きさと当たり判定は変えない） */
.bm.trk{isolation:isolate}
.bm.trk::before{content:"";position:absolute;left:50%;top:50%;width:46px;height:46px;margin:-23px 0 0 -23px;border-radius:50%;background:rgba(255,255,255,.92);box-shadow:0 0 0 1.5px rgba(29,35,41,.45);z-index:-1;pointer-events:none}
.bm.trk.wait{opacity:.6}
.bm.wait .body{stroke-dasharray:3.2 2.4}
.bm .bubble{display:none;position:absolute;left:50%;bottom:calc(100% - 2px);transform:translateX(-50%);white-space:nowrap;background:var(--ink);color:#fff;font-size:12px;line-height:1.4;padding:3px 8px;border-radius:6px;pointer-events:none;box-shadow:0 1px 3px rgba(0,0,0,.35)}
.bm.wait .bubble{display:block}
.bm.dim{opacity:.35}
.bm.dim.stale{opacity:.35}
.bm:focus-visible,gmp-advanced-marker:focus-visible .bm{outline:2px solid var(--ink);border-radius:50%}
/* クラスタ（中立色の丸に台数。遅れがあれば外周を最も重い区分の色の輪に） */
.cl{width:44px;height:44px;display:flex;align-items:center;justify-content:center;cursor:pointer}
.cl.g{transform:translateY(50%)}
.cl span{min-width:34px;height:34px;padding:0 6px;border-radius:17px;background:var(--ink);color:#fff;font-size:13px;font-weight:700;display:flex;align-items:center;justify-content:center;border:2px solid #fff;box-shadow:0 1px 3px rgba(0,0,0,.35)}
.cl.r-late span{box-shadow:0 0 0 3px var(--late),0 1px 3px rgba(0,0,0,.35)}
.cl.r-very_late span{box-shadow:0 0 0 3px var(--very_late),0 1px 3px rgba(0,0,0,.35)}
.cl.stale{opacity:var(--stale-opacity)}
.cl.dim{opacity:.45}
.pin{width:24px;height:34px;filter:drop-shadow(0 1px 2px rgba(0,0,0,.4));pointer-events:none}
.me-dot{width:16px;height:16px;border-radius:50%;background:#2F6FD6;border:3px solid #fff;box-shadow:0 0 0 1px rgba(0,0,0,.25);pointer-events:none}
.me-dot.g{transform:translateY(50%)}

/* 次に来る */
.next{background:rgba(255,255,255,.97);border:1px solid var(--line2);border-radius:8px;padding:8px 10px;font-size:12px;color:var(--ink2);line-height:1.5;max-height:min(46vh,360px);overflow:auto;box-shadow:0 1px 4px rgba(0,0,0,.12)}
.next h3,.list-next h3{margin:0;font-size:13px;color:var(--ink)}
.nx-head{display:flex;justify-content:space-between;align-items:flex-start;gap:4px}
.nx-head h3{padding-top:4px}
.nx-x{flex:none;width:44px;height:44px;margin:-8px -10px -8px 0;border:0;background:none;font-size:18px;color:var(--ink2);cursor:pointer;border-radius:50%}
.nx-x:hover{background:#ECEAE4}
.next .nx-sub{margin:0 0 4px}
.next.frozen .nx-rows{opacity:.55}
.nx-rows{list-style:none;margin:4px 0 0;padding:0}
.nx-row{display:block;width:100%;text-align:left;min-height:44px;padding:4px 2px;border:0;border-top:1px solid #EEE;background:none;font:inherit;font-size:12px;color:var(--ink);cursor:pointer;line-height:1.45}
.nx-rows li:first-child .nx-row{border-top:0}
.nx-row:hover{background:#F2F0EA}
.nx-route{font-weight:700}
.nx-delay-late,.nx-delay-very_late{color:#5A3A00;font-weight:700}
.nx-delay-very_late{color:#791F1F}
.nx-delay-early{color:#163A5B}
.nx-note{margin:6px 0 0;font-size:11px;color:var(--muted)}
.nx-warn{margin:4px 0;font-size:12px;color:#5A3A00;background:#FAEEDA;border-radius:4px;padding:4px 6px}
.list-next{background:#fff;border:1px solid var(--line2);border-radius:8px;padding:12px 14px;margin-bottom:12px;font-size:13px}

/* 追跡の帯・停留所の一覧（§4.18.6） */
.track-band{flex:none;display:flex;flex-wrap:wrap;align-items:center;gap:4px 10px;padding:4px 12px;background:#E8EEF6;border-bottom:1px solid var(--line);font-size:14px;color:var(--ink)}
.tb-text{flex:1 1 12em;min-width:0}
.tb-state{font-size:13px;font-weight:700;color:#5A3A00;background:#FAEEDA;border-radius:6px;padding:3px 8px}
.tb-actions{display:flex;gap:6px;margin-left:auto}
.track-band .t{padding:0 12px;font-size:13px}
.track-empty{flex:none;margin:0;padding:4px 12px;font-size:12px;color:var(--ink2);background:#ECEAE4;border-bottom:1px solid var(--line2)}
#app:not([data-track="idle"]) .map-wrap{min-height:200px}
.nx-mini{display:flex;align-items:center;justify-content:space-between;gap:6px;font-size:12px}
.nx-mini .t{flex:none}
.next.mini{padding:2px 4px 2px 10px}
.nx-trk{font-size:11px;background:var(--ink);color:#fff;border-radius:4px;padding:1px 5px;margin-left:4px;white-space:nowrap}
.tr-sec{margin-top:10px}
.tr-h{margin:0 0 2px;font-size:14px}
.tr-msg,.tr-note{margin:4px 0;font-size:13px;color:var(--ink2)}
.tr-note{color:#5A3A00;background:#FAEEDA;border-radius:6px;padding:4px 8px}
.tr-list{list-style:none;margin:0;padding:0}
.tr-list.dim{opacity:.55}
.tr-row{display:grid;grid-template-columns:5.6em minmax(0,1fr) auto;gap:2px 8px;align-items:center;min-height:36px;padding:3px 2px;border-top:1px solid var(--line2);font-size:13px;line-height:1.4}
.tr-row:first-child{border-top:0}
.tr-away{color:var(--muted);font-size:12px}
.tr-name{font-weight:700;overflow-wrap:anywhere}
.tr-badge{display:inline-block;margin-left:6px;font-style:normal;font-weight:400;font-size:11px;border:1px solid var(--ink2);border-radius:4px;padding:0 4px;white-space:nowrap}
.tr-eta{text-align:right;white-space:nowrap}
.tr-eta small{display:block;font-size:11px;color:var(--muted)}
.tr-more{margin-top:4px}

/* 詳細シート：スマホは地図を縮めて下に置く（地図に重ねない。§4.16） */
.sheet{flex:none;max-height:46vh;overflow:auto;background:var(--card);border-top:1px solid var(--line);box-shadow:0 -4px 16px rgba(0,0,0,.08);padding:12px 16px 14px;font-size:14px}
.sheet.vanished .sh-main{opacity:.5}
.sh-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}
.sh-op{font-size:12px;color:var(--muted)}
.sh-title{margin:0;font-size:21px;font-weight:700;line-height:1.3}
.sh-title .sh-dest{font-size:16px;font-weight:400}
.sh-close{width:44px;height:44px;border:0;border-radius:50%;background:#ECEAE4;font-size:20px;cursor:pointer;flex:none}
.sh-row{display:flex;gap:14px;flex-wrap:wrap;margin-top:8px;align-items:center}
.dl{padding:5px 11px;border-radius:6px;font-size:15px;font-weight:700}
.dl-on_time{background:#DCEFE6;color:#0F4F33}.dl-early{background:#DCE8FA;color:#163A5B}.dl-late{background:#FAEEDA;color:#5A3A00}.dl-very_late{background:#A3271B;color:#fff}.dl-unknown{background:#ECEAE4;color:#3A4048}
.sh-next{font-size:14px;color:var(--ink2)}
.sh-arr{margin-top:8px;line-height:1.6}
.sh-alert{margin-top:8px;padding:8px 10px;border-radius:6px;background:#ECEAE4;font-size:13px;line-height:1.6}
.sh-alert p{margin:2px 0 0;white-space:pre-wrap}
.sh-warn{margin-top:8px;padding:6px 10px;border-radius:6px;background:#FAEEDA;color:#5A3A00;font-size:13px}
.sh-foot{margin-top:8px;font-size:12px;color:var(--muted)}
.sh-near{margin-top:8px;font-size:13px}
.sh-near ul{list-style:none;margin:4px 0 0;padding:0;display:flex;flex-wrap:wrap;gap:6px}

/* 一覧表示・右列 */
.listview{flex:1 1 auto;overflow:auto;padding:12px 16px}
.routes-panel h2,.ops-summary h2{margin:0 0 8px;font-size:15px}
.global-alerts{margin-bottom:8px}
.ga{margin:0 0 6px;border-radius:6px;background:#ECEAE4;font-size:12px;line-height:1.5}
.ga summary{min-height:44px;display:flex;align-items:center;padding:4px 10px;cursor:pointer;list-style:none}
.ga summary::-webkit-details-marker{display:none}
.ga summary span{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.ga[open] summary span{display:block}
.ga .ga-body{padding:0 10px 8px;white-space:pre-wrap}
.ga-more{font-size:12px;color:var(--muted);margin:0 0 8px}
.dr{display:flex;justify-content:space-between;align-items:center;gap:10px;min-height:52px;border-bottom:1px solid var(--line2);padding:4px 2px;width:100%;background:none;border-left:0;border-right:0;border-top:0;font:inherit;text-align:left;color:var(--ink)}
button.dr{cursor:pointer}
button.dr:hover{background:#F2F0EA}
button.dr[aria-pressed="true"]{background:#E8EEF6}
.dr-main{min-width:0}
.dr-title{font-size:14px;font-weight:700}
.dr-title span{font-weight:400;color:var(--ink2)}
.dr-sub{font-size:12px;color:var(--muted)}
.dr-max{flex:none;padding:3px 8px;border-radius:6px;font-size:12px;font-weight:700;background:#FAEEDA;color:#5A3A00;white-space:nowrap}
.dr-max.big{background:#A3271B;color:#fff}
.note{margin:10px 0 0;font-size:11px;color:var(--muted);line-height:1.6}
.empty-routes{font-size:13px;color:var(--ink2);padding:8px 0}
.ops-summary{margin-top:16px}
.ops-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.ops-cell{background:#fff;border:1px solid var(--line2);border-radius:8px;padding:8px 10px}
.ops-cell .on{font-size:12px;color:var(--muted)}
.ops-cell .ov{font-size:20px;font-weight:700}
.ops-cell .ov span{font-size:12px;font-weight:400;color:var(--muted)}

/* 下部（スマホ） */
.bottom{flex:none;background:var(--card);border-top:1px solid var(--line)}
.bottom-alert{padding:0 12px;border-bottom:1px solid var(--line2)}
.bottom-alert .ga{margin:6px 0;background:#ECEAE4}
.bottom-row{display:flex;gap:8px;padding:8px 12px 4px;outline:none}
.attr-short{margin:0;padding:0 12px 6px;font-size:11px;color:var(--muted);display:flex;align-items:center;gap:4px;flex-wrap:wrap}
.linkish{border:0;background:none;padding:0 4px;min-height:44px;font:inherit;color:var(--link);text-decoration:underline;cursor:pointer}
.foot{flex:none;background:var(--card);border-top:1px solid var(--line);padding:8px 16px;font-size:12px;color:var(--muted);line-height:1.6}
.foot p{margin:0}
.foot-links{display:flex;flex-wrap:wrap;gap:4px 14px}
.foot-links a{display:inline-flex;align-items:center;min-height:44px}

/* ボタン類 */
button.t,a.t{min-height:44px;padding:0 14px;border-radius:22px;border:1px solid #C9C6BE;background:var(--card);font:inherit;font-size:14px;color:var(--ink);cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:6px;text-decoration:none}
button.t[aria-pressed="true"],button.t.primary{background:var(--ink);color:#fff;border-color:var(--ink)}
button.t:disabled{opacity:.5;cursor:default}
.t-filter{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block;text-align:left;line-height:42px}
.t-wide{width:100%;justify-content:center}
.t-small{min-height:44px;font-size:13px;padding:0 12px}

/* 重ね表示（絞り込み・このサイトについて） */
.overlay{position:fixed;inset:0;z-index:2000;background:var(--bg);display:flex;flex-direction:column}
.overlay-center{background:rgba(0,0,0,.35);align-items:center;justify-content:center;padding:12px}
.about{background:#fff;border-radius:12px;width:min(520px,100%);max-height:100%;overflow:auto;display:flex;flex-direction:column}
.about-body{padding:4px 16px 16px;font-size:14px;line-height:1.7}
.about-body h3{font-size:14px;margin:12px 0 4px}
.about-links{padding-left:1.2em;margin:4px 0}
.about-links a{display:inline-block;min-height:44px;line-height:44px}
#filter-home{flex:1 1 auto;min-height:0;display:flex;flex-direction:column}
.filter-panel{display:flex;flex-direction:column;min-height:0;flex:1 1 auto;background:var(--bg)}
#filter-panel:not(.placed){display:none}
.fp-head{flex:none;display:flex;justify-content:space-between;align-items:center;gap:8px;padding:8px 12px 8px 16px;background:#fff;border-bottom:1px solid var(--line)}
.fp-head h2{margin:0;font-size:17px;outline:none}
.fp-body{flex:1 1 auto;min-height:0;overflow:auto;padding:4px 16px 16px}
.fp-body h3{font-size:14px;margin:16px 0 8px}
.fp-label{display:block;font-size:13px;color:var(--muted);margin:10px 0 4px}
.fp-body input[type=search]{width:100%;min-height:44px;font:inherit;font-size:16px;padding:0 12px;border:1px solid #C9C6BE;border-radius:8px;background:#fff}
.fp-msg{margin:6px 0;font-size:13px;color:#5A3A00;background:#FAEEDA;border-radius:6px;padding:6px 8px;line-height:1.5}
.fp-hint{margin:0;font-size:12px;color:var(--muted)}
.fp-list{margin-top:4px}
.opt{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:52px;padding:4px 4px;border-bottom:1px solid var(--line2);font-size:15px;cursor:pointer;background:#fff}
.opt input{width:22px;height:22px;margin:0;flex:none}
.opt small{display:block;font-size:12px;color:var(--muted)}
.chosen{display:flex;align-items:center;justify-content:space-between;gap:8px;background:#E8EEF6;border-radius:8px;padding:6px 6px 6px 12px;margin-bottom:8px;font-size:15px}
.chips{display:flex;flex-wrap:wrap;gap:8px}
.chip{min-height:44px;padding:0 16px;border-radius:22px;border:1px solid #C9C6BE;background:#fff;font:inherit;font-size:14px;color:var(--ink);cursor:pointer;display:inline-flex;align-items:center;gap:8px}
.chip[aria-pressed="true"]{background:var(--ink);color:#fff;border-color:var(--ink)}
.fp-routes-head{display:flex;justify-content:space-between;align-items:center;gap:8px}
.fp-routes-head h3{margin-bottom:8px}
.fp-routes{margin-top:6px}
.rt-off{color:var(--muted)}
.fp-foot{flex:none;display:flex;gap:8px;padding:10px 16px;background:#fff;border-top:1px solid var(--line)}
.fp-foot .t{flex:none;white-space:nowrap}
.fp-foot .primary{flex:1 1 auto;white-space:normal;line-height:1.3;padding:6px 12px}

/* タブレット（768〜1023px）：スマホの構成のまま、シートと絞り込みの最大幅を 480px に */
@media (min-width:768px) and (max-width:1023.98px){
  .sheet{align-self:center;width:100%;max-width:480px;border-radius:12px 12px 0 0;border-left:1px solid var(--line);border-right:1px solid var(--line)}
  #filter-overlay{align-items:center}
  #filter-home{width:100%;max-width:480px;border-left:1px solid var(--line);border-right:1px solid var(--line)}
}

/* 横向きのスマホ：まとめと下部を細く */
@media (max-height:480px) and (orientation:landscape) and (max-width:1023.98px){
  .summary{padding:4px 12px}
  .sum-item{padding:2px 8px}
  .bottom-row{padding:4px 12px 2px}
  .attr-short{padding-bottom:2px}
  .top{padding-top:2px;padding-bottom:2px}
}

/* スマホで地図が出せないとき：本体を 1 本の縦スクロールにして、遅れている系統と事業者ごとを出す */
#app[data-map="unavailable"][data-layout="mobile"] .body{overflow:auto;display:block}
#app[data-map="unavailable"][data-layout="mobile"] .col-map{display:block}
#app[data-map="unavailable"][data-layout="mobile"] .listview{overflow:visible;padding-bottom:0}
#app[data-map="unavailable"][data-layout="mobile"] .col-right{display:block;padding:0 16px 16px}
#app[data-map="unavailable"] #btn-late{display:none}
#app[data-map="unavailable"] .map-wrap{display:none}
#app[data-map="unavailable"] .sheet{position:static;width:auto;max-width:none;margin:0 16px 12px;border:1px solid var(--line);border-radius:10px;max-height:none;overflow:visible;box-shadow:none}
#app[data-layout="mobile"][data-map="ready"] .foot,#app[data-layout="mobile"][data-map="loading"] .foot{display:none}

/* PC（1024px 以上）：3 列 */
@media (min-width:1024px){
  .desktop-only{display:revert!important}
  .mobile-only{display:none!important}
  .top{padding:10px 16px 10px 24px}
  .top h1{font-size:20px}
  .top-right{font-size:13px}
  .body{display:grid;grid-template-columns:340px minmax(0,1fr) 320px;gap:16px;padding:16px 24px;overflow:hidden}
  .col-left{display:flex;flex-direction:column;gap:12px;min-height:0;overflow:auto;padding-right:2px}
  .col-map{position:relative;border:1px solid var(--line2);border-radius:8px;overflow:hidden;background:#fff}
  .col-right{display:block;min-height:0;overflow:auto;background:#fff;border:1px solid var(--line2);border-radius:8px;padding:14px}
  .summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding:0;background:none;border:0}
  .sum-item{background:#fff;border:1px solid var(--line2);border-radius:8px;padding:8px 10px;display:block}
  .sum-label{display:block;font-size:12px}
  .sum-item b{font-size:22px}
  .sum-item .unit{font-size:12px;position:relative}
  .sum-delayed{color:#5A3A00}.sum-very{color:#791F1F}
  .sum-filtered{grid-column:1 / -1;justify-self:start}
  .delays-note{border-radius:6px;border:0;padding:6px 10px}
  .filter-panel{background:#fff;border:1px solid var(--line2);border-radius:8px;flex:none;overflow:visible}
  .filter-panel .fp-head{border-radius:8px 8px 0 0}
  .filter-panel .fp-body{overflow:visible;padding:0 14px 12px}
  .filter-panel .fp-foot{border-radius:0 0 8px 8px;position:sticky;bottom:0}
  .fp-routes{max-height:320px;overflow:auto}
  #slot-left-late{display:flex}
  #slot-left-next:has(> #next[hidden]){display:none}
  #app[data-map="unavailable"] #slot-left-late{display:none}
  #slot-left-late .t{width:100%}
  .legend{display:grid;grid-template-columns:1fr 1fr;gap:4px 8px;font-size:12px;padding:12px 14px;border-radius:8px;background:#fff}
  .legend-title{display:none}
  .next{max-height:none;box-shadow:none;font-size:13px;padding:12px 14px}
  .nx-row{font-size:13px}
  /* 詳細は地図の右上に重ねるカード（下端の帰属表示にかからない） */
  .sheet{position:absolute;z-index:6;right:12px;top:12px;width:300px;max-height:calc(100% - 90px);border:1px solid var(--line);border-radius:10px;box-shadow:0 2px 10px rgba(0,0,0,.18)}
  .listview{padding:16px}
  .ops-summary{margin-top:18px}
  .foot{padding:8px 24px;display:flex;flex-wrap:wrap;gap:2px 18px}
}
@media (min-width:1440px){ .body{grid-template-columns:340px minmax(0,1fr) 380px} .sheet{width:340px} }
@media (prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important;animation:none!important}}
/* 開発用の OpenStreetMap（Leaflet）：要素の中心を位置に合わせる */
.lf-icon{background:none;border:0}
.bm.lf,.cl.lf,.me-dot.lf{transform:translate(-50%,-50%)}
