/* © Complxx Web Designs LLC */
/* Thin, swappable UI layer: all look-and-feel lives in these tokens + rules. */
:root {
  --bg: #0b0b0d; --panel: #141417; --panel2: #1c1c21; --line: #2c2c33; --text: #ececf0; --dim: #8b8b96; --acc: #e11d2a; --blue: #4da3ff;
  --tab: 56px; --sa-b: env(safe-area-inset-bottom, 0px); --sa-t: env(safe-area-inset-top, 0px);
}
:root[data-theme=light] { --bg: #f2f3f0; --panel: #fff; --panel2: #ececea; --line: #cfd0cc; --text: #141416; --dim: #6b6b74; }
* { box-sizing: border-box; border-radius: 0 !important; box-shadow: none !important; text-shadow: none; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 15px/1.35 -apple-system, "Segoe UI", Roboto, sans-serif; overflow: hidden; overscroll-behavior: none; }
#map { position: fixed; inset: 0; }
.maplibregl-ctrl-attrib { font-size: 10px; }
.maplibregl-ctrl-bottom-right { bottom: calc(var(--tab) + var(--sa-b)); }
[hidden] { display: none !important; }
button, input, select { font: inherit; color: var(--text); background: var(--panel2); border: 1px solid var(--line); padding: 10px 12px; min-height: 42px; }
button { cursor: pointer; }
button:disabled { opacity: .4; }
button.on, .seg button.on, .chips button.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.pri { background: var(--acc) !important; border-color: var(--acc) !important; color: #fff !important; }
.dim { color: var(--dim); } small { color: var(--dim); font-size: 12px; margin-left: 6px; }
.pad { padding: 14px; } .wide { width: 100%; }
.err { color: var(--acc); min-height: 18px; text-align: center; }
a.b, .btn.file { display: inline-flex; align-items: center; justify-content: center; background: var(--panel2); border: 1px solid var(--line); padding: 10px 12px; min-height: 42px; color: var(--text); text-decoration: none; }
a.b.off { opacity: .35; pointer-events: none; }

.screen { position: fixed; inset: 0; z-index: 50; background: var(--bg); display: flex; align-items: center; justify-content: center; padding: 20px; overflow: auto; }
.authbox { width: 100%; max-width: 340px; display: flex; flex-direction: column; gap: 10px; }
.authbox.wide { max-width: 420px; }
.brand { font-size: 22px; font-weight: 800; letter-spacing: .02em; margin-bottom: 8px; }
.prow { display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); padding: 6px 0; } .prow span:first-child { flex: 1; } .ps { width: 20px; text-align: center; }
.ioscard { border: 1px solid var(--line); padding: 12px; } .ios { margin: 8px 0 0; padding-left: 20px; }

/* top stack */
#top { position: fixed; z-index: 10; top: calc(var(--sa-t) + 10px); left: 10px; right: 10px; display: flex; flex-direction: column; gap: 6px; pointer-events: none; }
#top > * { pointer-events: auto; }
#searchrow { display: flex; background: var(--panel); border: 1px solid var(--line); align-items: center; }
#searchrow input { flex: 1; border: 0; background: transparent; min-width: 0; }
#searchrow .x { border: 0; background: transparent; min-width: 42px; }
#dashchip { background: var(--acc); color: #fff; padding: 0 10px; font-weight: 700; font-size: 12px; align-self: stretch; display: flex; align-items: center; }
#sr { background: var(--panel); border: 1px solid var(--line); max-height: 40vh; overflow: auto; }
.acitem { display: block; width: 100%; text-align: left; background: transparent; border: 0; border-bottom: 1px solid var(--line); }
.acitem small { display: block; margin: 0; }
.ac { background: var(--panel); border: 1px solid var(--line); } .ac:empty { display: none; }
#rc { background: var(--panel); border: 1px solid var(--line); padding: 10px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rcm { flex: 1 1 140px; min-width: 0; } #rc-main { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } #rc-sub { color: var(--dim); font-size: 13px; }
.rco { display: flex; gap: 6px; flex-wrap: wrap; } .rco button { min-height: 38px; padding: 6px 10px; }
#nv { background: var(--panel); border: 1px solid var(--line); border-left: 6px solid var(--blue); padding: 10px 14px; display: flex; gap: 14px; align-items: center; }
#nv-arrow { font-size: 40px; line-height: 1; width: 48px; text-align: center; } #nv-dist { font-size: 26px; font-weight: 800; } #nv-text { color: var(--dim); }

/* map controls */
#mapctl { position: fixed; z-index: 9; right: 10px; top: calc(var(--sa-t) + 74px); display: flex; flex-direction: column; gap: 6px; }
#mapctl button { width: 50px; min-height: 40px; padding: 0; font-size: 12px; font-weight: 700; background: var(--panel); }
#mapctl .soon { opacity: .5; }
body.navving #mapctl { top: calc(var(--sa-t) + 110px); }
.me { width: 40px; height: 40px; } .me svg { display: block; }
.person { width: 28px; height: 28px; background: var(--acc); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; border: 2px solid #fff; }

#nb { position: fixed; z-index: 10; left: 10px; right: 10px; bottom: calc(var(--tab) + var(--sa-b) + 8px); background: var(--panel); border: 1px solid var(--line); padding: 10px; display: flex; gap: 8px; align-items: center; }
#nb > div { flex: 1; } #nb-main { font-weight: 800; font-size: 18px; } #nb-sub { color: var(--dim); font-size: 13px; } #nb button { min-height: 40px; padding: 6px 12px; }

/* sheet + tabbar */
#tabbar { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; height: calc(var(--tab) + var(--sa-b)); padding-bottom: var(--sa-b); background: var(--panel); border-top: 1px solid var(--line); display: flex; }
#tabbar button { flex: 1; border: 0; border-right: 1px solid var(--line); background: transparent; min-height: 0; padding: 0; font-size: 12px; font-weight: 700; }
#tabbar button.on { background: var(--text); color: var(--bg); }
#sheet { position: fixed; z-index: 15; left: 0; right: 0; bottom: calc(var(--tab) + var(--sa-b)); max-height: 56dvh; background: var(--panel); border-top: 1px solid var(--line); display: flex; }
#sheet-body { flex: 1; overflow: auto; -webkit-overflow-scrolling: touch; padding: 0 12px 16px; }
.sh-h { display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; background: var(--panel); padding: 8px 0; z-index: 2; }
.sh-h .x { border: 0; background: transparent; font-size: 22px; min-width: 42px; }
.list { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; }
.card { border: 1px solid var(--line); background: var(--panel2); }
.card.row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; } .card.row .ct { flex: 1; }
.chd { padding: 10px 12px; cursor: pointer; } .ct { font-weight: 700; } .cm { color: var(--dim); font-size: 13px; }
.card > .ct, .card > .cm { padding: 10px 12px 0; } .card > .cm { padding-top: 2px; }
.ca { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 12px 10px; } .ca > * { flex: 1 1 64px; min-height: 38px; padding: 6px 8px; text-align: center; font-size: 14px; }
.ca input.pin { flex: 1 1 80px; }
.hrs { padding: 0 12px 10px; color: var(--dim); font-size: 13px; word-break: break-word; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; } .chips button { min-height: 38px; padding: 6px 12px; }
.seg { display: inline-flex; } .seg button { min-height: 38px; padding: 6px 12px; margin-left: -1px; }
.row { display: flex; gap: 8px; align-items: center; margin: 8px 0; } .row input[type=range] { flex: 1; padding: 0; } .row input { flex: 1; min-width: 0; }
.sec { border-top: 1px solid var(--line); padding: 4px 0; } .sec summary { padding: 12px 0; font-weight: 700; cursor: pointer; }
.form { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; } .form .row { margin: 0; }
.chk { display: flex; align-items: center; gap: 10px; } .chk input, .tg input { width: 22px; min-height: 22px; height: 22px; padding: 0; accent-color: var(--acc); }
.tg { display: flex; align-items: center; gap: 8px; }
.prev { max-width: 100%; max-height: 160px; object-fit: contain; align-self: flex-start; border: 1px solid var(--line); }
.pm { font-weight: 800; min-width: 70px; }
.steps { list-style: none; margin: 0; padding: 0; } .steps li { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); } .steps li.cur { border-left: 4px solid var(--blue); padding-left: 8px; font-weight: 700; }
.coming { display: grid; gap: 1px; background: var(--line); } .coming div { background: var(--panel); padding: 8px 4px; display: flex; justify-content: space-between; color: var(--dim); }
#notepop { position: fixed; z-index: 40; left: 10px; right: 10px; top: calc(var(--sa-t) + 70px); background: var(--panel); border: 2px solid var(--acc); padding: 12px; } #notepop .x { position: absolute; right: 0; top: 0; border: 0; background: transparent; font-size: 22px; } #notepop img { max-width: 100%; max-height: 180px; margin-top: 8px; } .big { font-size: 34px; font-weight: 800; letter-spacing: .06em; }
#lightbox { position: fixed; inset: 0; z-index: 60; background: #000d; display: flex; align-items: center; justify-content: center; } #lightbox img { max-width: 96%; max-height: 96%; }
#toast { position: fixed; z-index: 70; left: 50%; transform: translateX(-50%); bottom: calc(var(--tab) + var(--sa-b) + 70px); background: var(--text); color: var(--bg); padding: 10px 16px; font-weight: 700; }

@media (min-width: 900px) {
  :root { --tab: 0px; }
  #tabbar { top: 0; right: auto; bottom: 0; width: 72px; height: auto; flex-direction: column; border-top: 0; border-right: 1px solid var(--line); padding: 0; z-index: 20; }
  #tabbar button { flex: 0 0 64px; border-right: 0; border-bottom: 1px solid var(--line); }
  #sheet { left: 72px; right: auto; width: 400px; top: 0; bottom: 0; max-height: none; border-top: 0; border-right: 1px solid var(--line); }
  #top { left: 88px; right: auto; width: 420px; } body:not([data-tab=map]) #top { left: 488px; }
  #nb { left: 88px; right: auto; width: 420px; bottom: 16px; } body:not([data-tab=map]) #nb { left: 488px; }
  #mapctl { top: 10px; } body.navving #mapctl { top: 10px; }
  .maplibregl-ctrl-bottom-right { bottom: 0; } #toast { bottom: 40px; }
  #notepop { left: 88px; right: auto; width: 420px; }
}
#mapctl button.on, #mapctl button.on:hover { background: var(--text); color: var(--bg); }
