*{box-sizing:border-box}
/* 動きの標準トークン（動き検収チェックリスト：強いカスタム曲線を使う） */
:root{--ease-out:cubic-bezier(0.23, 1, 0.32, 1);--ease-in-out:cubic-bezier(0.77, 0, 0.175, 1);--ease-drawer:cubic-bezier(0.32, 0.72, 0, 1)}
html,body{height:100%}
body{margin:0;font-family:-apple-system,"Hiragino Kaku Gothic ProN","Noto Sans JP",sans-serif;color:#263238;background:#f4f1ea}
#topbar{position:fixed;top:0;left:0;right:0;z-index:1200;background:rgba(255,253,248,.96);border-bottom:1px solid #e3dcc9;padding:8px 14px;display:flex;align-items:baseline;gap:10px}
#topbar .title{font-size:19px;font-weight:800;color:#33691e}
#topbar .subtitle{font-size:12px;color:#6d6a5f}
#map{position:fixed;inset:0;top:46px;z-index:0}
.hidden{display:none!important}
button{font-family:inherit;cursor:pointer}
.btn{border:0;border-radius:10px;padding:12px 16px;font-size:15px;min-height:48px}
.btn.main{background:#558b2f;color:#fff;font-weight:700}
.btn.sub{background:#ece7d8;color:#37474f}
.btn.danger{background:#fff;color:#b71c1c;border:1px solid #e0b4b4}
.btn.small{min-height:44px;padding:8px 14px;font-size:14px}
.btn.block{width:100%;margin-top:8px}
.btn:disabled{opacity:.45;cursor:default}
.fab{position:fixed;right:12px;top:58px;z-index:1100;background:#fffdf8;border:1px solid #cfc8b2;border-radius:10px;padding:10px 14px;font-size:14px;font-weight:700;box-shadow:0 2px 8px rgba(0,0,0,.18);min-height:44px}
.fab.round{top:112px;width:44px;padding:0;border-radius:50%;font-size:18px}
#mini{position:fixed;left:0;right:0;bottom:0;z-index:1150;background:#fffdf8;border-top:1px solid #e3dcc9;display:flex;align-items:center;gap:8px;padding:8px 12px calc(8px + env(safe-area-inset-bottom))}
#miniMain{flex:1;background:none;border:0;text-align:left;font-size:15px;font-weight:700;color:#37474f;min-height:44px;padding:4px}
#crosshair{position:fixed;inset:0;top:46px;z-index:900;pointer-events:none;display:flex;align-items:center;justify-content:center}
#crosshair .cross{width:34px;height:34px;position:relative}
#crosshair .cross:before,#crosshair .cross:after{content:"";position:absolute;background:#c62828}
#crosshair .cross:before{left:50%;top:0;width:2px;height:100%;margin-left:-1px}
#crosshair .cross:after{top:50%;left:0;height:2px;width:100%;margin-top:-1px}
#crosshairBar{position:fixed;left:0;right:0;bottom:0;z-index:1160;background:#fffdf8;border-top:1px solid #e3dcc9;padding:10px 12px calc(10px + env(safe-area-inset-bottom))}
#crossMsg{margin:0 0 8px;font-size:14px;font-weight:700;color:#37474f;line-height:1.5}
.crossrow{display:flex;gap:10px}
.crossrow .btn{flex:1}
#panel{position:fixed;left:0;right:0;bottom:0;z-index:1100;background:#fffdf8;border-top:1px solid #d8d2bf;border-radius:16px 16px 0 0;box-shadow:0 -4px 18px rgba(0,0,0,.15);display:flex;flex-direction:column}
#panel.size-small{height:64px}
#panel.size-mid{height:min(52dvh,520px)}
#panel.size-large{height:85dvh}
#handle{padding:13px 0 9px;cursor:grab;touch-action:none;flex:none}
#handle .bar{width:44px;height:5px;border-radius:3px;background:#c9c2ab;margin:0 auto}
#panelBody{overflow-y:auto;padding:2px 16px calc(18px + env(safe-area-inset-bottom));-webkit-overflow-scrolling:touch}
#panel.size-small #panelBody{overflow:hidden}
h2.step{font-size:18px;margin:6px 0 4px}
h3.subhead{font-size:15px;margin:14px 0 2px;color:#33691e}
p.lead{font-size:14px;line-height:1.7;margin:4px 0 10px;color:#455a64}
.note{font-size:12px;color:#6d6a5f;line-height:1.6}
.privacy{background:#eef4e4;border:1px solid #cfe0b4;border-radius:10px;padding:10px 12px;font-size:13px;line-height:1.6;margin:10px 0}
.searchbox{position:relative;margin:8px 0}
.searchbox input{width:100%;padding:13px 14px;font-size:16px;border:1px solid #bdb59b;border-radius:10px;min-height:48px;background:#fff}
.suggest{position:absolute;left:0;right:0;top:100%;background:#fff;border:1px solid #cfc8b2;border-radius:10px;box-shadow:0 6px 16px rgba(0,0,0,.15);z-index:5;overflow:hidden}
.suggest button{display:block;width:100%;text-align:left;background:none;border:0;border-bottom:1px solid #eee8d5;padding:12px 14px;font-size:15px;min-height:44px}
.suggest button small{display:block;color:#78909c;font-size:12px}
.suggest button:last-child{border-bottom:0}
.optgrid{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:8px 0}
.optgrid button{border:1px solid #bdb59b;background:#fff;border-radius:10px;padding:12px 8px;font-size:15px;min-height:52px}
.optgrid button.on{background:#558b2f;border-color:#558b2f;color:#fff;font-weight:700}
.optgrid button small{display:block;font-size:11px;font-weight:400;opacity:.85}
.placed{background:#f1efe4;border-radius:10px;padding:10px 12px;font-size:14px;margin:8px 0;line-height:1.6}
.placed b{color:#33691e}
.rowbtns{display:flex;gap:8px;margin-top:8px}
.rowbtns .btn{flex:1}
.stationrow{display:flex;align-items:center;gap:10px;width:100%;text-align:left;background:#fff;border:1px solid #ddd6c0;border-radius:12px;padding:10px 12px;margin:6px 0;min-height:56px}
.stationrow .nm{font-size:16px;font-weight:700}
.stationrow .sub{font-size:12px;color:#78909c}
.stationrow .pr{margin-left:auto;text-align:right;font-size:14px;font-weight:700;color:#37474f;white-space:nowrap}
.stationrow .pr small{display:block;font-weight:400;color:#90a4ae;font-size:11px}
.mark{font-size:12px;border-radius:8px;padding:2px 7px;font-weight:700;white-space:nowrap}
.mark.m2{background:#e8f5e9;color:#2e7d32}
.mark.m1{background:#fff8e1;color:#8d6e00}
.mark.m0{background:#f5f5f5;color:#90a4ae}
.chiprow{display:flex;gap:6px;flex-wrap:wrap;margin:8px 0}
.chip{border:1px solid #bdb59b;background:#fff;border-radius:999px;padding:8px 13px;font-size:13px;min-height:44px}
.chip.on{background:#37474f;color:#fff;border-color:#37474f}
.sheet{position:fixed;left:0;right:0;bottom:0;top:auto;max-height:88dvh;z-index:1300;background:#fffdf8;border-radius:16px 16px 0 0;box-shadow:0 -6px 24px rgba(0,0,0,.25);display:flex;flex-direction:column}
.sheet-head{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;border-bottom:1px solid #e3dcc9}
.sheet-head h3{margin:0;font-size:17px}
.sheet-head .x{background:none;border:0;font-size:20px;min-width:44px;min-height:44px}
.sheet-body{overflow-y:auto;padding:12px 16px calc(18px + env(safe-area-inset-bottom))}
.cardtable{width:100%;border-collapse:collapse;font-size:14px}
.cardtable th{text-align:left;color:#6d6a5f;font-weight:600;width:92px;vertical-align:top;padding:7px 6px 7px 0;border-bottom:1px solid #eee8d5}
.cardtable td{padding:7px 0;border-bottom:1px solid #eee8d5;line-height:1.6}
.legendimg{max-width:100%;border:1px solid #ddd;border-radius:8px;margin:6px 0}
input.num{width:100%;padding:12px;font-size:17px;border:1px solid #bdb59b;border-radius:10px;min-height:52px;background:#fff}
label.flabel{display:block;font-size:13px;font-weight:700;margin:12px 0 4px;color:#37474f}
.pinbadge{background:#6a1b9a;color:#fff;border-radius:50%;width:26px;height:26px;display:flex;align-items:center;justify-content:center;font-size:14px;font-weight:700;border:2px solid #fff;box-shadow:0 1px 4px rgba(0,0,0,.4)}
.ptlabel{background:rgba(255,253,248,.92);border:1px solid #8d6e63;color:#4e342e;border-radius:8px;padding:2px 7px;font-size:11px;font-weight:700;white-space:nowrap}
.circlelabel{background:rgba(255,253,248,.92);border-radius:8px;padding:2px 7px;font-size:11px;font-weight:700;white-space:nowrap;box-shadow:0 1px 3px rgba(0,0,0,.25)}
.circlelabel.cl-car{border:1px solid #1565c0;color:#0d47a1}
.circlelabel.cl-trainB{border:1px solid #2e7d32;color:#1b5e20}
.circlelabel.cl-trainA{border:1px dashed #2e7d32;color:#1b5e20;background:rgba(232,245,233,.92)}
.circlelabel.cl-family{border:1px solid #6a1b9a;color:#4a148c}
#toast{position:fixed;left:50%;transform:translateX(-50%);bottom:120px;z-index:1400;background:#37474f;color:#fff;padding:10px 16px;border-radius:999px;font-size:14px;box-shadow:0 4px 14px rgba(0,0,0,.3);max-width:92vw;text-align:center}
#loadError{position:fixed;inset:0;z-index:2000;background:#fffdf8;display:flex;align-items:center;justify-content:center;padding:24px;font-size:15px;line-height:1.8;text-align:center}
.zerobox{background:#fff3e0;border:1px solid #ffcc80;border-radius:12px;padding:12px 14px;margin:10px 0;font-size:14px;line-height:1.7}
.zerobox b{color:#e65100}
input[type=range]{width:100%;height:44px;accent-color:#558b2f}
.legendlink{font-size:12px}
.hazardbtn{display:block;width:100%;text-align:left;background:#fff;border:1px solid #ddd6c0;border-radius:10px;padding:10px 12px;margin:6px 0;font-size:15px;min-height:48px}
.hazardbtn.on{border-color:#558b2f;background:#eef4e4;font-weight:700}

/* 押下フィードバック（チェックリスト4：:activeでscale(0.97)、100–160ms、transformのみ。
   パネル開閉・シート出現・レイヤー切替は高頻度操作のため、アニメーションを付けず即時切替のまま） */
.btn,.chip,.optgrid button,.stationrow,.hazardbtn,.fab,.suggest button{transition:transform 120ms var(--ease-out)}
.btn:active,.chip:active,.optgrid button:active,.stationrow:active,.hazardbtn:active,.fab:active,.suggest button:active{transform:scale(0.97)}
/* 動きを弱める設定の端末では、ゼロにせず弱める（チェックリスト9） */
@media (prefers-reduced-motion: reduce){
  .btn,.chip,.optgrid button,.stationrow,.hazardbtn,.fab,.suggest button{transition-duration:40ms}
  .btn:active,.chip:active,.optgrid button:active,.stationrow:active,.hazardbtn:active,.fab:active,.suggest button:active{transform:scale(0.99)}
}

/* PC：左に固定パネル（設計書2-1） */
@media (min-width:900px){
  #panel{left:12px;right:auto;top:58px;bottom:12px;width:400px;height:auto!important;border-radius:16px;border:1px solid #d8d2bf}
  #handle{display:none}
  #mini{left:424px}
  .fab{right:12px}
  .sheet{left:auto;right:12px;bottom:12px;width:440px;max-height:calc(100dvh - 70px);border-radius:16px;border:1px solid #d8d2bf}
}

/* おすすめ案内（Re:Earth「空から読む大府市」への静的リンク）
   地図アプリは全画面固定レイアウトのため、操作パネル・FABと重ならない
   トップバー直下に固定表示する。JSからは参照しない。 */
#recoBar{position:fixed;top:54px;left:12px;right:112px;z-index:1050;display:flex;align-items:center;gap:10px;background:#fffdf8;border:1px solid #cfc8b2;border-radius:12px;box-shadow:0 2px 8px rgba(0,0,0,.18);padding:8px 12px;text-decoration:none;color:#263238}
#recoBar .reco-badge{flex:none;background:#c62828;color:#fff;font-size:11px;font-weight:700;border-radius:999px;padding:2px 8px;letter-spacing:.06em}
#recoBar .reco-main{flex:1;min-width:0;display:flex;flex-direction:column}
#recoBar .reco-title{font-size:14px;font-weight:800;color:#33691e;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#recoBar .reco-desc{font-size:11.5px;color:#6d6a5f;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#recoBar .reco-arrow{flex:none;font-size:16px;font-weight:700;color:#558b2f}
@media (min-width:900px){ #recoBar{left:424px;right:auto;width:430px} }

/* 使い方動画（16:9レスポンシブ） */
.videowrap{position:relative;padding-top:56.25%;margin:0 0 12px}
.videowrap iframe{position:absolute;inset:0;width:100%;height:100%;border:0;border-radius:8px;background:#000}
