:root{
  --accent:#00897B; --accent-ink:#00695C; --accent-pale:#E0F2EF; --on-accent:#fff;
  --ink:#0E1A1C; --slate:#4F5F68; --slate2:#6B7A82; --line:#DCE3E6; --line2:#C9D3D7;
  --panel:rgba(255,255,255,.88); --panel-solid:#fff; --paper:#F3F6F7; --chip:#fff;
  --green:#1F9D6B; --green-pale:#E3F5EC; --red:#D2445E; --red-pale:#FBE9ED;
  --shadow:0 1px 2px rgba(10,30,30,.06),0 8px 28px rgba(10,30,30,.12);
  --route:#00897B; --route-case:#fff;
  --safe-b:env(safe-area-inset-bottom,0px); --safe-t:env(safe-area-inset-top,0px);
}
:root[data-theme="dark"]{
  --accent:#14B8A6; --accent-ink:#5EEAD4; --accent-pale:rgba(20,184,166,.16); --on-accent:#04201C;
  --ink:#E9F0F1; --slate:#A7B4B9; --slate2:#8796A0; --line:rgba(255,255,255,.10); --line2:rgba(255,255,255,.18);
  --panel:rgba(16,24,27,.84); --panel-solid:#121B1E; --paper:#0B1214; --chip:rgba(28,38,42,.95);
  --green:#3FD49B; --green-pale:rgba(63,212,155,.14); --red:#E0566F; --red-pale:rgba(224,86,111,.15);
  --shadow:0 1px 2px rgba(0,0,0,.3),0 10px 30px rgba(0,0,0,.45);
  --route:#2DD4BF; --route-case:#0B1214;
}
*{box-sizing:border-box;margin:0;padding:0}
html,body{width:100%;height:100%;overflow:hidden;background:var(--paper);color:var(--ink);font:400 14px/1.45 Inter,system-ui,sans-serif;-webkit-font-smoothing:antialiased}
h1,h2,h3,.disp{font-family:"Plus Jakarta Sans",Inter,sans-serif;letter-spacing:-.02em}
button{font:inherit;color:inherit;background:none;border:0;cursor:pointer}
input{font:inherit;color:inherit}
#map{position:absolute;inset:0}
.maplibregl-ctrl-logo{display:none!important}
.maplibregl-ctrl-attrib{font-size:10px;opacity:.7}
.ico{width:20px;height:20px;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;display:block;flex:none}
.frost{background:var(--panel);backdrop-filter:blur(18px) saturate(1.4);-webkit-backdrop-filter:blur(18px) saturate(1.4)}
.hide{display:none!important}
.muted{color:var(--slate)} .small{font-size:13px}
.row{display:flex;align-items:center;gap:10px}
.eyebrow{font:600 12px Inter;letter-spacing:.14em;text-transform:uppercase;color:var(--slate2);margin:16px 0 4px}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;height:44px;padding:0 20px;border-radius:999px;font:600 15px "Plus Jakarta Sans",Inter;white-space:nowrap}
.btn-primary{background:var(--accent);color:var(--on-accent);box-shadow:0 6px 18px rgba(0,137,123,.3)}
.btn-soft{background:var(--accent-pale);color:var(--accent-ink)}
.btn-line{background:var(--panel-solid);border:1px solid var(--line2)}
.btn.sm{height:36px;padding:0 14px;font-size:14px}
.iconbtn{width:36px;height:36px;display:grid;place-items:center;border-radius:50%}
.label{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:600;padding:3px 10px;border-radius:999px;white-space:nowrap}
.dot{width:7px;height:7px;border-radius:50%;background:currentColor}
.l-green{color:var(--green);background:var(--green-pale)} .l-red{color:var(--red);background:var(--red-pale)} .l-acc{color:var(--accent-ink);background:var(--accent-pale)}
/* top */
#top{position:absolute;z-index:30;top:calc(12px + var(--safe-t));left:12px;right:12px;display:flex;flex-direction:column;gap:10px;pointer-events:none}
#top>*{pointer-events:auto}
.search{display:flex;align-items:center;gap:10px;height:50px;padding:0 8px 0 16px;border-radius:999px;border:1px solid var(--line);box-shadow:var(--shadow)}
.search input{flex:1;border:0;outline:0;background:none;font-size:16px;min-width:0}
.search input::-webkit-search-cancel-button{display:none}
.chips{display:flex;gap:8px;overflow-x:auto;scrollbar-width:none;margin:0 -12px;padding:0 12px}
.chips::-webkit-scrollbar{display:none}
.chip{display:inline-flex;align-items:center;gap:6px;height:36px;padding:0 14px 0 9px;border-radius:999px;background:var(--chip);border:1px solid var(--line);font-weight:500;white-space:nowrap;box-shadow:0 1px 3px rgba(0,0,0,.08);flex:none}
.chip.off{opacity:1;background:var(--paper);color:var(--slate2)}
.chip.off .cdot{background:var(--line2)!important}
.cdot{width:20px;height:20px;border-radius:50%;display:grid;place-items:center;color:#fff}
.cdot .ico{width:12px;height:12px}
.results{border-radius:18px;border:1px solid var(--line);box-shadow:var(--shadow);max-height:50vh;overflow:auto;padding:4px 14px}
/* fabs */
#fabs{position:absolute;z-index:20;right:12px;display:flex;flex-direction:column;gap:10px}
.fab{width:46px;height:46px;border-radius:50%;display:grid;place-items:center;border:1px solid var(--line);box-shadow:var(--shadow)}
.fab.on{color:var(--accent-ink)}
/* sheet */
#sheet{position:absolute;z-index:25;left:0;right:0;bottom:calc(64px + var(--safe-b));border-radius:22px 22px 0 0;border-top:1px solid var(--line);box-shadow:0 -8px 30px rgba(0,0,0,.12);display:flex;flex-direction:column;max-height:58vh;transition:max-height .2s}
#sheet.min{max-height:170px}
.grab{width:40px;height:5px;border-radius:999px;background:var(--line2);margin:8px auto 4px;flex:none}
#sheetHead{padding:6px 18px 8px;flex:none;border-bottom:1px solid var(--line)}
#sheetBody{padding:0 18px 16px;overflow-y:auto;-webkit-overflow-scrolling:touch}
#tabs{position:absolute;z-index:26;left:0;right:0;bottom:0;display:flex;justify-content:space-around;height:calc(64px + var(--safe-b));padding:6px 0 var(--safe-b);background:var(--panel-solid);border-top:1px solid var(--line)}
.tab{display:flex;flex-direction:column;align-items:center;gap:2px;font-size:11px;font-weight:600;color:var(--slate2);flex:1}
.tab .pill{width:52px;height:28px;border-radius:999px;display:grid;place-items:center}
.tab.on{color:var(--accent-ink)} .tab.on .pill{background:var(--accent-pale)}
/* desktop */
@media (min-width:900px){
  #top{left:16px;right:auto;width:408px;top:16px}
  #sheet{left:16px;right:auto;width:408px;top:126px;bottom:16px;border-radius:20px;border:1px solid var(--line);box-shadow:var(--shadow);max-height:none}
  #sheet.min{max-height:none}
  .grab{display:none}
  #tabs{left:16px;right:auto;width:408px;top:auto;bottom:16px;height:62px;padding:6px 0;border-radius:0 0 20px 20px;border:1px solid var(--line)}
  #sheet{bottom:78px;border-radius:20px 20px 0 0}
  #fabs{top:16px;right:16px}
}
/* lists */
.item{display:flex;align-items:center;gap:12px;padding:11px 0;border-bottom:1px solid var(--line);width:100%;text-align:left}
.item:last-child{border-bottom:0}
.item .t{flex:1;min-width:0}
.item .n{font:600 15px "Plus Jakarta Sans";white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.item .s{font-size:13px;color:var(--slate);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cicon{width:38px;height:38px;border-radius:12px;display:grid;place-items:center;color:#fff;flex:none}
.cicon.sm{width:26px;height:26px;border-radius:8px} .cicon.sm .ico{width:14px;height:14px}
.dist{text-align:right;flex:none}
.dist b{font:700 15px "Plus Jakarta Sans";display:block}
.arrow{display:inline-block;color:var(--accent-ink);vertical-align:middle}
.arrow .ico{width:14px;height:14px;fill:currentColor;stroke:none}
.quick{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-top:10px}
.qc{border:1px solid var(--line);border-radius:14px;padding:9px 8px;background:var(--panel-solid);display:flex;flex-direction:column;gap:3px;text-align:left;white-space:nowrap;min-width:0}
.qc b{font:700 14px "Plus Jakarta Sans"}
.nums{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:12px}
.num{border:1px solid var(--line);border-radius:14px;padding:12px;background:var(--panel-solid);display:flex;flex-direction:column;gap:8px;text-decoration:none;color:inherit}
.num .big{font:800 26px "Plus Jakarta Sans"}
.card{border:1px solid var(--line);border-radius:14px;background:var(--panel-solid)}
.lrow{display:flex;align-items:center;gap:12px;min-height:50px;padding:0 14px;width:100%;text-align:left}
.lrow+.lrow{border-top:1px solid var(--line)}
.tg{width:44px;height:26px;border-radius:999px;background:var(--line2);position:relative;flex:none}
.tg i{position:absolute;top:3px;left:3px;width:20px;height:20px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.3);transition:left .15s}
.tg.on{background:var(--accent)} .tg.on i{left:21px}
.seg{display:flex;gap:4px;padding:4px;border-radius:999px;background:var(--paper);border:1px solid var(--line)}
.seg button{flex:1;display:flex;align-items:center;justify-content:center;gap:6px;height:38px;border-radius:999px;font-weight:600;font-size:14px;color:var(--slate)}
.seg button.on{background:var(--panel-solid);color:var(--accent-ink);box-shadow:0 1px 4px rgba(0,0,0,.12)}
.field{border:1px solid var(--line2);border-radius:12px;padding:6px 12px;display:flex;flex-direction:column;background:var(--panel-solid)}
.field span{font-size:12px;color:var(--slate2)}
.field input,.field select{border:0;outline:0;background:none;font-size:16px;font-weight:500;padding:2px 0}
.stop{display:flex;align-items:center;gap:10px;min-height:46px;border-bottom:1px solid var(--line)}
.snum{width:22px;height:22px;border-radius:50%;background:var(--accent);color:var(--on-accent);display:grid;place-items:center;font:700 12px "Plus Jakarta Sans";flex:none}
.big-time{font:800 28px "Plus Jakarta Sans";color:var(--accent-ink)}
.me{width:20px;height:20px;border-radius:50%;background:#2F80ED;border:3px solid #fff;box-shadow:0 0 0 9px rgba(47,128,237,.2),0 2px 6px rgba(0,0,0,.3)}
.mk{width:28px;height:28px;border-radius:50%;background:var(--accent);color:var(--on-accent);display:grid;place-items:center;font:700 12px "Plus Jakarta Sans";border:2.5px solid #fff;box-shadow:0 3px 10px rgba(0,0,0,.3)}
.sv{display:flex;align-items:center;gap:6px;background:var(--panel-solid);border:1px solid var(--line);border-radius:999px;padding:3px 10px 3px 3px;box-shadow:0 3px 10px rgba(0,0,0,.25);font:600 12px Inter;color:var(--ink)}
.sv span{width:24px;height:24px;border-radius:50%;display:grid;place-items:center;color:#fff}
.sv .ico{width:14px;height:14px}
#toast{position:absolute;z-index:40;left:50%;transform:translateX(-50%);bottom:calc(90px + var(--safe-b));background:var(--ink);color:var(--paper);padding:10px 16px;border-radius:999px;font-weight:500;box-shadow:var(--shadow)}
.empty{padding:18px 0;color:var(--slate)}
/* offline maps, GPS */
.fab.follow{background:var(--accent);color:var(--on-accent)}
.me{position:relative}
.me .hd{display:none;position:absolute;inset:-26px;transform:rotate(var(--hd,0deg));pointer-events:none}
.me .hd::before{content:"";position:absolute;left:50%;top:0;margin-left:-9px;border:9px solid transparent;border-bottom:16px solid #2F80ED;border-top:0}
.me.hd-on .hd{display:block}
#sel{position:absolute;z-index:19;border:2px dashed var(--accent);border-radius:10px;background:rgba(0,137,123,.06);pointer-events:none}
.bar{height:8px;border-radius:999px;background:var(--line2);overflow:hidden}
.bar i{display:block;height:100%;background:var(--accent);border-radius:999px;transition:width .2s}
