/* Rig Route – dark "liquid glass" theme. One accent: orange. */
:root{
  --bg:#0a0a0c; --bg2:#111114;
  --accent:#ff9f0a; --accent-ink:#1a1206; --accent-soft:rgba(255,159,10,.16); --accent-line:rgba(255,159,10,.45);
  --crit:#ff453a;
  --head:rgba(255,255,255,.94); --txt:rgba(235,235,245,.78); --mut:rgba(235,235,245,.52); --faint:rgba(235,235,245,.32);
  --glass:rgba(30,30,34,.58); --glass-strong:rgba(24,24,28,.78); --glass-faint:rgba(255,255,255,.025);
  --stroke:rgba(255,255,255,.10); --stroke-2:rgba(255,255,255,.16); --spec:rgba(255,255,255,.14);
  --blur:saturate(170%) blur(22px);
  --r-xl:26px; --r-lg:22px; --r-md:16px; --r-sm:12px;
  --shadow:0 10px 30px rgba(0,0,0,.45), 0 2px 6px rgba(0,0,0,.3);
  --font:-apple-system,BlinkMacSystemFont,"SF Pro Text","SF Pro Display","Inter","Segoe UI",Roboto,system-ui,sans-serif;
  --ease:cubic-bezier(.2,.8,.2,1);
  --nav-h:68px; --head-h:52px;
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;background:var(--bg);color:var(--txt);font:15px/1.45 var(--font);-webkit-font-smoothing:antialiased;letter-spacing:-.005em}
.bg-glow{position:fixed;inset:0;z-index:-1;pointer-events:none;
  background:radial-gradient(60% 40% at 85% 0%,rgba(255,159,10,.10),transparent 70%),
             radial-gradient(50% 35% at 0% 100%,rgba(120,120,140,.10),transparent 70%),
             linear-gradient(180deg,#0d0d10 0%,#08080a 100%)}
h2,h3,b,strong{color:var(--head)}
h2{margin:0 0 6px;font-size:20px;font-weight:650;letter-spacing:-.02em;display:flex;align-items:center;gap:8px}
h3{margin:18px 0 6px;font-size:11px;font-weight:650;color:var(--mut);text-transform:uppercase;letter-spacing:.09em;display:flex;align-items:center;gap:6px}
h3 .ic{width:14px;height:14px;color:var(--accent)}
h2 .ic{width:20px;height:20px;color:var(--accent)}
a{color:var(--accent)}
.ic{width:18px;height:18px;flex:none;vertical-align:-3px}

/* ---------- glass material ---------- */
.glass,.card,.top,.bottomnav,.tile,.stop,.refuel,.warnbox,.sheet-panel,.hub-routebar,.hub-noroute,.alert-item,.calc,.stat,.kv div,.hour{
  background:var(--glass);
  -webkit-backdrop-filter:var(--blur);backdrop-filter:var(--blur);
  border:1px solid var(--stroke);
  box-shadow:inset 0 1px 0 var(--spec), var(--shadow);
}
.calc,.stat,.kv div,.hour,.alert-item{background:rgba(255,255,255,.04);box-shadow:inset 0 1px 0 rgba(255,255,255,.06);-webkit-backdrop-filter:none;backdrop-filter:none}
@supports not ((-webkit-backdrop-filter:blur(1px)) or (backdrop-filter:blur(1px))){
  :root{--glass:rgba(28,28,32,.96);--glass-strong:rgba(22,22,26,.98)}
}

/* ---------- header (floating glass pill) ---------- */
.top{position:fixed;z-index:1600;top:max(8px,env(safe-area-inset-top));left:10px;right:10px;height:var(--head-h);
  border-radius:var(--r-lg);padding:0 14px;display:flex;align-items:center;background:var(--glass-strong)}
.brand{display:flex;align-items:center;gap:9px;font-size:17px}
.brand b{font-weight:700;letter-spacing:-.02em}
.brand-sub{font-size:12px;color:var(--mut);margin-left:2px}
.brand-mark{display:grid;place-items:center;width:30px;height:30px;border-radius:10px;background:var(--accent);color:var(--accent-ink)}
.brand-mark .ic{width:18px;height:18px}

/* ---------- layout ---------- */
main{max-width:900px;margin:0 auto;padding:calc(var(--head-h) + 20px + env(safe-area-inset-top)) 12px calc(var(--nav-h) + 30px + env(safe-area-inset-bottom))}
.tab{display:none}.tab.active{display:block;animation:fadeIn .28s var(--ease)}
@keyframes fadeIn{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
.card{border-radius:var(--r-xl);padding:16px;margin-bottom:12px}
label{display:block;font-size:12.5px;color:var(--mut);margin:8px 0;font-weight:500}
input,select{width:100%;margin-top:5px;padding:12px 14px;font:16px var(--font);color:var(--head);
  background:rgba(255,255,255,.06);border:1px solid var(--stroke);border-radius:var(--r-sm);outline:none;transition:border-color .2s,background .2s}
input:focus,select:focus{border-color:var(--accent-line);background:rgba(255,255,255,.09)}
select{appearance:none;background-image:linear-gradient(45deg,transparent 50%,var(--mut) 50%),linear-gradient(135deg,var(--mut) 50%,transparent 50%);background-position:calc(100% - 18px) 55%,calc(100% - 13px) 55%;background-size:5px 5px;background-repeat:no-repeat}
input[type=checkbox]{accent-color:var(--accent);width:20px;height:20px}
.row{display:flex;gap:8px;align-items:flex-end}.row input{flex:1}.grow{flex:1}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:0 12px}
@media(max-width:380px){.grid2{grid-template-columns:1fr}}
button{cursor:pointer;font:inherit;transition:transform .18s var(--ease),background .2s,opacity .2s}
button:active,.tile:active,a.dir:active{transform:scale(.96)}
.primary{display:inline-flex;align-items:center;justify-content:center;gap:8px;background:var(--accent);color:var(--accent-ink);border:0;border-radius:14px;padding:12px 18px;font-weight:650;font-size:16px;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.35),0 6px 18px rgba(255,159,10,.25)}
.primary:disabled{opacity:.55}
.big{padding:13px 18px;margin:5px 0}
.ghost{display:inline-flex;align-items:center;gap:6px;background:rgba(255,255,255,.06);color:var(--head);border:1px solid var(--stroke);border-radius:14px;padding:11px 16px}
.icon,.iconbtn{display:grid;place-items:center;background:rgba(255,255,255,.06);border:1px solid var(--stroke);color:var(--head);border-radius:var(--r-sm);width:46px;height:46px;margin-top:5px;padding:0}
.iconbtn{width:36px;height:36px;border-radius:50%;margin:0}
.icon .ic{color:var(--accent)}
.status{min-height:1.2em;font-size:13px;color:var(--mut);margin-top:8px}
.status.err{color:var(--accent)}
.hidden{display:none!important}
.hint{color:var(--mut);font-size:13.5px;margin:4px 0}.small{font-size:12px}.muted{color:var(--mut)}.pad{padding:14px}
.calc{border-radius:var(--r-sm);padding:10px 12px;margin:8px 0;font-size:14px}
.tag{display:inline-block;font-size:10.5px;padding:1px 7px;border-radius:999px;vertical-align:1px;font-weight:600;letter-spacing:.02em}
.tag.est{background:var(--accent-soft);color:var(--accent)}
details{margin-top:14px}summary{cursor:pointer;color:var(--head);font-weight:550}
.inline{display:flex;gap:10px;align-items:center;color:var(--txt);font-size:14px}.inline input{width:auto;margin:0}

/* ---------- map ---------- */
#map{height:46vh;min-height:280px;border-radius:var(--r-xl);border:1px solid var(--stroke);margin-bottom:12px;overflow:hidden;box-shadow:var(--shadow)}
.leaflet-container{background:#0b0b0d;font-family:var(--font)}
.leaflet-tile-pane{filter:invert(1) hue-rotate(180deg) brightness(.82) contrast(.9) saturate(.18)}
.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:rgba(28,28,32,.92);color:var(--txt);-webkit-backdrop-filter:var(--blur);backdrop-filter:var(--blur);box-shadow:var(--shadow)}
.leaflet-popup-content-wrapper{border-radius:16px;border:1px solid var(--stroke)}
.leaflet-popup-content b{color:var(--head)}
.leaflet-container a.leaflet-popup-close-button{color:var(--mut)}
.leaflet-control-attribution{background:rgba(10,10,12,.55)!important;color:var(--faint)!important;border-radius:8px 0 0 0;font-size:10px}
.leaflet-control-attribution a{color:var(--mut)!important}
.leaflet-bar a{background:var(--glass-strong);color:var(--head);border-color:var(--stroke)}
.pin{display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:var(--accent);color:var(--accent-ink);font:700 13px var(--font);border:2px solid rgba(255,255,255,.9);box-shadow:0 2px 10px rgba(0,0,0,.6)}
.pin-warn{display:grid;place-items:center;width:26px;height:26px;border-radius:8px;background:rgba(20,20,22,.9);color:var(--accent);border:1px solid var(--accent-line)}
.pin-warn .ic{width:16px;height:16px}

/* ---------- stats / summary ---------- */
.stats{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}
@media(min-width:640px){.stats{grid-template-columns:repeat(4,1fr)}}
.stat{border-radius:var(--r-md);padding:10px 12px}
.stat span{display:block;font-size:11px;color:var(--mut);text-transform:uppercase;letter-spacing:.07em;font-weight:600}
.stat b{display:block;font-size:24px;font-weight:700;letter-spacing:-.02em;font-variant-numeric:tabular-nums}
.stat.key b{color:var(--accent)}

/* ---------- fuel plan / stops ---------- */
.refuel{border-radius:var(--r-xl);padding:14px;margin-bottom:10px;border-color:var(--accent-line);
  background:linear-gradient(180deg,rgba(255,159,10,.10),rgba(255,159,10,.03)) ,var(--glass)}
.refuel h4{margin:0 0 8px;font-size:12px;font-weight:700;color:var(--accent);text-transform:uppercase;letter-spacing:.08em;display:flex;align-items:center;gap:6px}
.refuel h4 .ic{width:15px;height:15px}
.refuel .alts{font-size:13px;color:var(--mut);margin-top:8px}
.stop{border-radius:var(--r-lg);padding:12px 14px;margin-bottom:8px}
.stop.t1{border-color:var(--accent-line)}
.stop .nm,.refuel .nm{font-weight:650;font-size:17px;color:var(--head);letter-spacing:-.01em}
.stop .meta,.refuel .meta{color:var(--mut);font-size:13.5px;margin-top:2px}
a.dir{display:inline-flex;align-items:center;gap:6px;margin-top:10px;background:rgba(255,255,255,.08);border:1px solid var(--stroke-2);color:var(--head);text-decoration:none;padding:9px 14px;border-radius:12px;font-weight:600;font-size:14px;transition:transform .18s var(--ease)}
a.dir .ic{color:var(--accent);width:16px;height:16px}
.badge{display:inline-flex;align-items:center;gap:4px;font-size:11.5px;font-weight:650;padding:3px 9px;border-radius:999px;margin-right:4px;vertical-align:1px}
.badge .ic{width:12px;height:12px}
.b-ok{background:var(--accent);color:var(--accent-ink)}
.b-warn{background:var(--accent-soft);color:var(--accent);border:1px solid var(--accent-line)}
.b-reg{background:rgba(255,255,255,.07);color:var(--mut);border:1px solid var(--stroke)}
.dot{display:inline-block;width:9px;height:9px;border-radius:50%;vertical-align:0}
.dot.ok{background:var(--accent)}.dot.warn{border:2px solid var(--accent)}.dot.reg{background:rgba(255,255,255,.3)}
.warnbox{border-radius:var(--r-xl);padding:14px;margin-bottom:10px;border-color:var(--accent-line);background:linear-gradient(180deg,rgba(255,159,10,.12),rgba(255,159,10,.04)),var(--glass)}
.warnbox b{display:flex;gap:6px;align-items:center;color:var(--accent)}

/* ---------- bottom nav (floating glass pill) ---------- */
.bottomnav{position:fixed;z-index:1600;left:12px;right:12px;bottom:max(10px,env(safe-area-inset-bottom));height:var(--nav-h);
  max-width:520px;margin:0 auto;display:flex;gap:4px;padding:6px;border-radius:999px;background:var(--glass-strong)}
.bottomnav button{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;border:0;border-radius:999px;background:transparent;color:var(--mut);font-size:11px;font-weight:600;letter-spacing:.01em}
.bottomnav button .ic{width:22px;height:22px}
.bottomnav button.active{color:var(--accent);background:rgba(255,255,255,.09);box-shadow:inset 0 1px 0 rgba(255,255,255,.16),inset 0 0 0 1px rgba(255,255,255,.06)}

/* ---------- hub ---------- */
#tab-hub{margin:calc(-1 * (var(--head-h) + 20px + env(safe-area-inset-top))) -12px 0}
.hub-map-wrap{position:relative;height:50dvh;min-height:300px;
  -webkit-mask-image:linear-gradient(180deg,#000 85%,transparent);mask-image:linear-gradient(180deg,#000 85%,transparent)}
#hubMap{position:absolute;inset:0}
.hub-routebar,.hub-noroute{position:absolute;left:12px;right:12px;bottom:28px;z-index:500;border-radius:var(--r-lg);padding:10px 12px 10px 14px;font-size:13.5px;display:flex;justify-content:space-between;gap:10px;align-items:center;background:var(--glass-strong)}
.hub-routebar .rb-title{color:var(--head);font-weight:650;font-size:15px;display:flex;align-items:center;gap:6px}
.hub-routebar .rb-title .ic{color:var(--accent);width:16px;height:16px}
.hub-routebar .rb-meta{color:var(--mut);display:flex;gap:10px;align-items:center;margin-top:2px;font-variant-numeric:tabular-nums}
.hub-routebar .rb-meta .ic{width:14px;height:14px;vertical-align:-2px;color:var(--faint)}
.hub-routebar .rb-meta b{color:var(--accent);font-weight:650}
.nr-title{color:var(--head);font-weight:650;font-size:15px}
.tile-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:2px 12px 12px;margin-top:-8px;position:relative;z-index:2}
@media(min-width:700px){.tile-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(min-width:1000px){.tile-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
.tile{border-radius:var(--r-xl);padding:13px 14px;min-height:162px;text-align:left;color:var(--txt);display:flex;flex-direction:column;gap:3px;cursor:pointer;font:inherit;transition:transform .2s var(--ease),border-color .2s}
.tile .t-head{display:flex;justify-content:space-between;align-items:center;font-size:11px;font-weight:650;color:var(--mut);text-transform:uppercase;letter-spacing:.09em;margin-bottom:4px}
.tile .t-head span{display:flex;align-items:center;gap:6px}
.tile .t-head .ic{width:14px;height:14px}
.tile .t-head .chev{color:var(--faint)}
.tile .bignum{display:flex;align-items:center;gap:8px;font-size:44px;font-weight:300;line-height:1;letter-spacing:-.04em;color:var(--head);font-variant-numeric:tabular-nums;margin:2px 0 4px}
.tile .bignum .ic{width:30px;height:30px;stroke-width:1.6;color:var(--head)}
.tile .bignum small{font-size:14px;font-weight:550;letter-spacing:0;color:var(--txt)}
.tile .line{font-size:13.5px;display:flex;align-items:center;gap:5px}
.tile .line .ic{width:14px;height:14px;color:var(--mut)}
.tile .sub{font-size:12px;color:var(--mut);margin-top:auto}
.tile.alert-on{border-color:var(--accent-line);background:linear-gradient(160deg,rgba(255,159,10,.20),rgba(255,159,10,.05) 60%),var(--glass)}
.tile.alert-on .t-head,.tile.alert-on .bignum,.tile.alert-on .bignum .ic{color:var(--accent)}
.tile.alert-crit{border-color:rgba(255,69,58,.5);background:linear-gradient(160deg,rgba(255,69,58,.20),rgba(255,69,58,.05) 60%),var(--glass)}
.tile.alert-crit .t-head,.tile.alert-crit .bignum,.tile.alert-crit .bignum .ic{color:var(--crit)}
.tile.placeholder{background:var(--glass-faint);border:1px dashed rgba(255,255,255,.12);box-shadow:none;-webkit-backdrop-filter:none;backdrop-filter:none;align-items:center;justify-content:center;color:var(--faint);cursor:default;gap:6px;font-size:13px}
.tile.placeholder:active{transform:none}
.tile.placeholder .plus{display:grid;place-items:center;width:34px;height:34px;border-radius:50%;border:1px solid rgba(255,255,255,.12)}
.tile.placeholder .plus .ic{width:16px;height:16px}
.tile.placeholder .sub{margin:0;color:var(--faint)}
.wind-warn{color:var(--accent)!important;font-weight:650}.wind-bad{color:var(--accent)!important;font-weight:750}
.wind-warn .ic,.wind-bad .ic{color:var(--accent)!important}

/* ---------- detail sheet ---------- */
.sheet{position:fixed;inset:0;z-index:3000;background:rgba(0,0,0,.45);display:flex;align-items:flex-end;justify-content:center;transition:opacity .28s var(--ease)}
.sheet.hidden{display:flex!important;opacity:0;pointer-events:none}
.sheet .sheet-panel{transform:translateY(0);transition:transform .38s var(--ease)}
.sheet.hidden .sheet-panel{transform:translateY(100%)}
.sheet-panel{width:100%;max-width:720px;max-height:88dvh;display:flex;flex-direction:column;border-radius:28px 28px 0 0;background:rgba(22,22,26,.82)}
.sheet-panel::before{content:"";display:block;width:38px;height:5px;border-radius:3px;background:rgba(255,255,255,.22);margin:8px auto 0}
@media(min-width:700px){.sheet{align-items:center}.sheet-panel{border-radius:28px}.sheet.hidden .sheet-panel{transform:translateY(30px) scale(.98)}}
.sheet-head{display:flex;justify-content:space-between;align-items:center;padding:8px 16px 10px;font-size:19px}
.sheet-head b{font-weight:700;letter-spacing:-.02em}
.sheet-body{overflow:auto;padding:4px 16px calc(20px + env(safe-area-inset-bottom))}
.alert-item{border-radius:var(--r-md);padding:10px 12px;margin-bottom:8px;border-left:3px solid var(--stroke-2)}
.alert-item.sev{border-left-color:var(--accent)}
.alert-item.crit{border-left-color:var(--crit)}
.alert-item .ev{font-weight:650;color:var(--head);display:flex;align-items:center;gap:6px}
.alert-item .ev .ic{width:15px;height:15px;color:var(--accent)}
.alert-item.crit .ev .ic{color:var(--crit)}
.alert-item .meta{font-size:13px;color:var(--mut);margin-top:2px}
.alert-item .meta .ic{width:13px;height:13px;color:var(--accent)}
.alert-item .tow{color:var(--accent);font-weight:600}
.alert-item details{margin-top:6px}.alert-item pre{white-space:pre-wrap;font:13px/1.45 var(--font);color:var(--txt)}
.okbox{display:flex;gap:10px;align-items:center;border-radius:var(--r-md);padding:12px;background:rgba(255,255,255,.04);border:1px solid var(--stroke);margin-bottom:8px}
.okbox .ic{color:var(--mut)}
.hourly{display:flex;gap:6px;overflow-x:auto;padding-bottom:6px;scrollbar-width:none}
.hour{min-width:62px;border-radius:14px;padding:8px 6px;text-align:center;font-size:11.5px;color:var(--mut);display:flex;flex-direction:column;align-items:center;gap:3px}
.hour b{font-size:16px;font-weight:600;font-variant-numeric:tabular-nums}
.hour .ic{width:18px;height:18px;color:var(--txt)}
.kv{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:10px 0}
.kv div{border-radius:var(--r-md);padding:10px 12px}
.kv span{display:flex;align-items:center;gap:5px;font-size:11px;color:var(--mut);text-transform:uppercase;letter-spacing:.07em;font-weight:600}
.kv span .ic{width:13px;height:13px}
.kv b{font-size:20px;font-weight:600;font-variant-numeric:tabular-nums}

@media (prefers-reduced-motion: reduce){
  *,*::before,*::after{animation:none!important;transition:none!important}
}

/* ---------- complementary cool accent: top-off stops ---------- */
:root{--cool:#4fd1dc;--cool-ink:#06191b;--cool-soft:rgba(79,209,220,.14);--cool-line:rgba(79,209,220,.5)}
.pin.topoff{background:var(--cool);color:var(--cool-ink)}
.refuel.topoff{border-color:var(--cool-line);background:linear-gradient(180deg,rgba(79,209,220,.12),rgba(79,209,220,.03)),var(--glass)}
.refuel.topoff h4{color:var(--cool)}
.b-topoff{display:inline-flex;align-items:center;padding:1px 8px;border-radius:999px;background:var(--cool);color:var(--cool-ink);font-weight:750;letter-spacing:.06em}
.topoff-note{color:var(--cool)!important}.topoff-note .ic{color:var(--cool)}
.stop.planned{border-color:var(--accent-line)}
.stop.topoff{border-color:var(--cool-line)}
.plan-tag{display:inline-flex;align-items:center;gap:5px;font-size:11px;font-weight:750;text-transform:uppercase;letter-spacing:.07em;color:var(--accent);margin-bottom:4px}
.plan-tag.topoff{color:var(--cool)}
/* ---------- prices ---------- */
.price{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 6px;margin-top:6px;font-size:13px;color:var(--mut)}
.price .ic{width:14px;height:14px;color:var(--accent);align-self:center}
.price b{font-size:18px;color:var(--head);font-weight:700;font-variant-numeric:tabular-nums}
.price span{font-size:12px}
.price .na-note{color:var(--faint)}
.price.na{color:var(--faint)}.price.na .ic{color:var(--faint)}
.refuel.topoff .price .ic{color:var(--cool)}
/* ---------- CarPlay / nav ---------- */
.fp-head{display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap}
.fp-head h2{margin:0}
.cpgroup{display:inline-flex;gap:6px;align-items:center}
.primary.cp{padding:10px 14px;font-size:14.5px}
.primary.cp .ic{width:17px;height:17px}
.cpmore{width:42px;height:42px;padding:0;justify-content:center;border-radius:14px}
.cpmore .ic{color:var(--mut)}
.wide{width:100%;justify-content:center;margin:6px 0}
.navbtns{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:10px 0}
.navbtns .ic{width:18px;height:18px}
.rb-actions{display:flex;gap:6px;align-items:center;flex:none}
.sm{padding:8px 11px!important;font-size:13.5px!important;border-radius:12px!important}
.sm .ic{width:15px;height:15px}
.hub-routebar{flex-wrap:wrap}
.hub-routebar>div:first-child{flex:1 1 210px;min-width:0}
.hub-routebar .rb-title{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hub-routebar .rb-meta{white-space:nowrap}
/* r3: accessibility + cautions */
:root{--faint:rgba(235,235,245,.42)}
.iconbtn{width:44px;height:44px}
.cpmore{width:44px;height:44px}
.sm{min-height:40px}
a.dir{min-height:44px}
.bottomnav button{min-height:52px}
.inline{min-height:44px}
.warnbox.caution{border-color:rgba(255,69,58,.55);background:linear-gradient(180deg,rgba(255,69,58,.14),rgba(255,69,58,.04)),var(--glass)}
.warnbox.caution>b{color:#ff6b61}
.warnbox.caution .meta b{color:var(--head)}
.rb-caution{color:#ff6b61;font-weight:650}.rb-caution .ic{color:#ff6b61!important}
:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.leaflet-touch .leaflet-bar a{width:40px;height:40px;line-height:40px}
button.rb-caution{background:rgba(255,69,58,.14);border:1px solid rgba(255,69,58,.4);border-radius:999px;padding:2px 10px;font:inherit;font-size:13px;min-height:28px;cursor:pointer;display:inline-flex;gap:5px;align-items:center}
.warnbox.caution .meta{display:block;line-height:1.4;margin-top:6px}
.warnbox.caution .meta b{display:inline;font-weight:650}
.card,.warnbox,.okbox,section{scroll-margin-top:96px;scroll-margin-bottom:110px}
.tile .line{flex-wrap:wrap;column-gap:4px;row-gap:0}.tile .line>b{flex:0 1 auto}
/* ---------- wide layouts (iPad landscape, desktop) ---------- */
@media (min-width:1100px){
  main{max-width:1440px;padding-left:20px;padding-right:20px}
  #tab-hub.active{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(340px,1fr);gap:18px;margin:0;align-items:start}
  #tab-hub .hub-map-wrap{height:calc(100dvh - var(--head-h) - var(--nav-h) - 70px - env(safe-area-inset-top) - env(safe-area-inset-bottom));min-height:420px;
    border-radius:var(--r-xl);overflow:hidden;border:1px solid var(--stroke);-webkit-mask-image:none;mask-image:none;position:sticky;top:calc(var(--head-h) + 20px)}
  #tab-hub .tile-grid{grid-template-columns:repeat(2,minmax(0,1fr));margin-top:0;padding:0}
  #tab-plan.active{display:grid;grid-template-columns:minmax(360px,440px) minmax(0,1fr);column-gap:18px;align-items:start}
  #tab-plan > *{grid-column:1}
  #tab-plan #map{grid-column:2;grid-row:1 / span 20;position:sticky;top:calc(var(--head-h) + 20px);
    height:calc(100dvh - var(--head-h) - var(--nav-h) - 70px - env(safe-area-inset-top) - env(safe-area-inset-bottom));margin-bottom:0}
  #tab-plan .stats{grid-template-columns:repeat(2,1fr)}
}

/* ---------- elevation tile ---------- */
.elev-mini{margin:2px -2px 4px}
.elev-svg{display:block;width:100%;height:64px;overflow:visible}
.elev-svg.big{height:auto;aspect-ratio:680/260;touch-action:pan-y}
.eg-line{fill:none;stroke:rgba(255,159,10,.85);stroke-width:1.6;vector-effect:non-scaling-stroke}
.eg-steep{fill:none;stroke-width:3.4;stroke-linecap:round;vector-effect:non-scaling-stroke}
.eg-steep.climb{stroke:var(--accent)}
.eg-steep.descent{stroke:var(--head);stroke-dasharray:4 3}
.eg-hi{fill:var(--head)}
.eg-grid{stroke:rgba(255,255,255,.07);stroke-width:1;vector-effect:non-scaling-stroke}
.eg-ax{fill:var(--mut);font-size:10.5px;font-family:var(--font)}
.eg-fuel{stroke:var(--mut);stroke-width:2;vector-effect:non-scaling-stroke}
.eg-fuel.topoff{stroke:var(--cool)}
.eg-cursor{stroke:rgba(255,255,255,.5);stroke-width:1;vector-effect:non-scaling-stroke}
.eg-call circle{fill:rgba(22,22,26,.9);stroke-width:1.4}
.eg-call.climb circle{stroke:var(--accent)} .eg-call.descent circle{stroke:var(--head)}
.eg-call text{fill:var(--head);font-size:10px;font-weight:700;font-family:var(--font)}
.elev-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:4px 0 10px}
@media(min-width:560px){.elev-stats{grid-template-columns:repeat(4,minmax(0,1fr))}}
.elev-stats>div{border-radius:var(--r-md);padding:10px 12px;background:rgba(255,255,255,.04);border:1px solid var(--stroke);display:flex;flex-direction:column;gap:2px}
.elev-stats span{font-size:11px;color:var(--mut);text-transform:uppercase;letter-spacing:.08em;font-weight:650}
.elev-stats b{font-size:19px;font-weight:600;display:flex;align-items:center;gap:5px;font-variant-numeric:tabular-nums}
.elev-stats b .ic{width:16px;height:16px;color:var(--accent)}
.elev-stats small{font-size:12px;color:var(--mut)}
.elev-big-wrap{border-radius:var(--r-md);padding:10px 8px 6px;background:rgba(255,255,255,.03);border:1px solid var(--stroke)}
.elev-readout{font-size:12.5px;color:var(--mut);text-align:center;margin-top:4px;font-variant-numeric:tabular-nums}
.elev-legend{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px}
.elev-legend>span{display:inline-flex;align-items:center;gap:5px;white-space:nowrap}
.elev-legend .lg{display:inline-block;width:16px;height:3px;border-radius:2px;background:var(--accent)}
.elev-legend .lg.descent{background:repeating-linear-gradient(90deg,var(--head) 0 4px,transparent 4px 7px)}
.elev-legend .lg.fuel{width:3px;height:10px;background:var(--mut)} .elev-legend .lg.fuel.topoff{background:var(--cool)}
.elev-seg{display:flex;gap:10px;align-items:flex-start;border-radius:var(--r-md);padding:11px 12px;margin-bottom:8px;background:rgba(255,255,255,.04);border:1px solid var(--stroke)}
.elev-seg .num{flex:none;display:grid;place-items:center;width:24px;height:24px;border-radius:50%;border:1.4px solid var(--head);font-size:12px;font-weight:700;color:var(--head)}
.elev-seg.climb .num{border-color:var(--accent);color:var(--accent)}
.elev-seg b{display:flex;align-items:center;gap:6px} .elev-seg b .ic{width:16px;height:16px}
.elev-seg.climb b .ic{color:var(--accent)}
.elev-seg .meta{font-size:12.5px;color:var(--mut);margin-top:3px;line-height:1.35}

/* ---------- pre-trip checklist ---------- */
.tile .ck-of{font-size:20px;color:var(--mut);font-weight:400;letter-spacing:0}
.ck-bar{height:6px;border-radius:3px;background:rgba(255,255,255,.08);overflow:hidden;flex:1}
.ck-bar.mini{flex:none;height:4px;min-height:0;margin:2px 0 6px}
.ck-bar i{display:block;height:100%;background:var(--accent);border-radius:inherit;transition:width .3s var(--ease)}
.tile .accent{color:var(--accent)}
.ck-progress{display:flex;align-items:center;gap:10px;margin:4px 0 12px;font-size:13px;color:var(--mut);font-variant-numeric:tabular-nums}
.ck-sec{border-radius:var(--r-md);background:rgba(255,255,255,.035);border:1px solid var(--stroke);margin-bottom:10px;overflow:hidden}
.ck-sec-head{display:flex;align-items:center;gap:6px}
.ck-sec-btn{flex:1;display:flex;align-items:center;gap:10px;min-height:54px;padding:10px 14px;background:none;border:0;color:var(--head);font:inherit;text-align:left;cursor:pointer}
.ck-sec-btn b{flex:1;font-size:16px;font-weight:650}
.ck-sec-n{font-size:13px;color:var(--mut);font-variant-numeric:tabular-nums}
.ck-sec-ic .ic{width:20px;height:20px;color:var(--mut)} .ck-sec.complete .ck-sec-ic .ic{color:var(--accent)}
.ck-sec.complete .ck-sec-btn b{color:var(--txt)}
.ck-chev{width:18px;height:18px;color:var(--faint)}
.ck-items{padding:0 6px 6px}
.ck-item{display:flex;align-items:center;gap:12px;width:100%;min-height:52px;padding:10px;background:none;border:0;border-top:1px solid rgba(255,255,255,.05);color:var(--txt);font:inherit;font-size:15.5px;text-align:left;cursor:pointer;-webkit-tap-highlight-color:transparent}
.ck-item:active{background:rgba(255,255,255,.04)}
.ck-box{flex:none;display:grid;place-items:center;width:28px;height:28px;border-radius:9px;border:1.6px solid rgba(255,255,255,.28);transition:background .15s,border-color .15s}
.ck-box .ic{width:18px;height:18px;stroke-width:3;color:var(--accent-ink)}
.ck-item.done .ck-box{background:var(--accent);border-color:var(--accent)}
.ck-item.done .ck-text{color:var(--mut);text-decoration:line-through;text-decoration-color:rgba(255,255,255,.25)}
.ck-item.editing{cursor:default;gap:6px;padding:6px 4px}
.ck-input{margin:0;padding:10px 12px;font-size:16px;min-height:44px}
.ck-input.title{flex:1;margin:8px 0 8px 8px;font-weight:650}
.ck-ib{flex:none;display:grid;place-items:center;width:44px;height:44px;border-radius:12px;background:rgba(255,255,255,.06);border:1px solid var(--stroke);color:var(--head);cursor:pointer}
.ck-ib:disabled{opacity:.3;cursor:default} .ck-ib .ic{width:18px;height:18px} .ck-ib.del .ic{color:var(--mut)}
.ck-sec-head .ck-ib:last-child{margin-right:8px}
.ck-add{display:flex;gap:8px;align-items:center;padding:8px 4px 4px}
.ck-add.sec{padding:0 0 10px}
.ck-add .ghost{flex:none;min-height:44px}
.ck-actions{display:flex;flex-wrap:wrap;gap:10px;margin:6px 0 4px}
.ck-actions>button{flex:1;min-height:50px;justify-content:center}
.ck-prompt .meta{font-size:13px;color:var(--txt);margin:4px 0 10px}
.ck-row{display:flex;gap:8px;flex-wrap:wrap}
.tile .elev-ud{gap:10px;white-space:nowrap}.tile .elev-ud span{display:inline-flex;align-items:center;gap:4px}.tile .elev-ud .ic{color:var(--accent)}
.elev-legend{gap:4px 12px}
.tile .elev-ud{flex-wrap:nowrap;font-size:13px;gap:8px}
.eg-lead{stroke:rgba(255,255,255,.22);stroke-width:1;stroke-dasharray:2 3;vector-effect:non-scaling-stroke}
textarea.ck-input{outline:none;flex:1;min-width:0;width:auto;resize:none;line-height:1.3;font:16px var(--font);color:var(--head);background:rgba(255,255,255,.06);border:1px solid var(--stroke);border-radius:12px;field-sizing:content}
.ck-item.editing .ck-ib{width:40px;height:40px}
textarea.ck-input:focus{border-color:var(--accent-line);background:rgba(255,255,255,.09)}
