@font-face {
  font-family: "Manrope";
  src: url("fonts/manrope-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Noto Sans Tamil";
  src: url("fonts/noto-sans-tamil.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0B80-0BFF, U+200C-200D, U+25CC;
}

/* Brand palette sampled from the panda hiker logo:
   leaf green #638d24 / #7c9c3d, hat cream #e8cca2, boot brown #9e7751 / #604c38, panda black. */
:root {
  --ground: #f5f3ee;
  --surface: #ffffff;
  --surface-2: #efebe3;
  --surface-3: #e6e0d4;
  --ink: #1f1b16;
  --ink-2: #554d43;
  --ink-3: #72695e;
  --line: #e2dccf;
  --line-strong: #cfc6b5;

  --leaf-700: #3a5812;
  --leaf-600: #4d7419;
  --leaf-500: #638d24;
  --leaf-400: #7c9c3d;
  --leaf-100: #e8efd9;
  --leaf-50: #f2f6ea;
  --hat-300: #e8cca2;
  --hat-100: #f5e9d6;
  --boot-700: #4a3a29;
  --boot-600: #604c38;
  --boot-500: #9e7751;
  --boot-100: #f0e6da;

  --easy: #4d7419; --easy-bg: #e8efd9;
  --moderate: #94600f; --moderate-bg: #f8ead2;
  --tough: #a3341e; --tough-bg: #f8e1dc;
  --open: #3a5812; --open-bg: #e8efd9;
  --caution: #7f4f05; --caution-bg: #fbecd2;
  --closed: #9b2a1a; --closed-bg: #f9e0db;

  --wp-start: #4d7419; --wp-end: #1f1b16; --wp-water: #2d6fa8; --wp-view: #6b4fa0;
  --wp-caution: #b06a00; --wp-medical: #c0362c; --wp-exit: #604c38;

  --alert: #b3261e; --warn-solid: #8a5a0b; --me: #2d6fa8;
  --shadow-1: 0 1px 2px rgba(31, 27, 22, .06), 0 2px 8px rgba(31, 27, 22, .05);
  --shadow-2: 0 2px 6px rgba(31, 27, 22, .08), 0 12px 32px rgba(31, 27, 22, .12);
  --shadow-3: 0 -2px 12px rgba(31, 27, 22, .08), 0 -12px 40px rgba(31, 27, 22, .10);
  --r-sm: 10px; --r-md: 14px; --r-lg: 20px; --r-xl: 28px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --bar-h: 60px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #13110e; --surface: #1d1a16; --surface-2: #26221d; --surface-3: #312c25;
    --ink: #f3eee6; --ink-2: #cdc4b7; --ink-3: #a99f91; --line: #332e27; --line-strong: #463f36;
    --leaf-700: #c4dd96; --leaf-600: #8fbf45; --leaf-500: #8fbf45; --leaf-100: #263419; --leaf-50: #1c2414;
    --hat-100: #2e271d; --boot-100: #2c241b;
    --easy: #a9d36a; --easy-bg: #24321a; --moderate: #f0c06a; --moderate-bg: #3a2c12; --tough: #f39a86; --tough-bg: #3d1e17;
    --open: #a9d36a; --open-bg: #24321a; --caution: #f0c06a; --caution-bg: #3a2c12; --closed: #f39a86; --closed-bg: #3d1e17;
    --shadow-1: 0 1px 2px rgba(0,0,0,.4); --shadow-2: 0 8px 28px rgba(0,0,0,.45); --shadow-3: 0 -10px 36px rgba(0,0,0,.5);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; }
body {
  background: var(--ground); color: var(--ink);
  font: 400 15px/1.55 "Manrope", "Noto Sans Tamil", system-ui, sans-serif;
  font-feature-settings: "ss01";
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--hat-300); color: #1f1b16; }
:focus-visible { outline: 3px solid var(--leaf-500); outline-offset: 2px; border-radius: 6px; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; }
.num { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }

.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ic-lg { width: 22px; height: 22px; }
.ic-sm { width: 15px; height: 15px; }

/* App bar */
.app-bar {
  position: sticky; top: 0; z-index: 30;
  height: calc(var(--bar-h) + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 12px 0 16px;
  display: flex; align-items: center; gap: 10px;
  background: color-mix(in srgb, var(--ground) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.app-bar.scrolled { border-bottom-color: var(--line); }
.app-bar.overlay { position: fixed; inset: 0 0 auto 0; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; border: 0; pointer-events: none; }
.app-bar.overlay > * { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 19px; letter-spacing: -.02em; }
.brand img { width: 36px; height: 36px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px var(--line); object-fit: cover; }
.bar-title { flex: 1; min-width: 0; font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.bar-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer;
  background: var(--surface); box-shadow: var(--shadow-1);
}
.net-pill, .lang-btn {
  height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; cursor: pointer; box-shadow: var(--shadow-1);
}
.net-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--leaf-500); box-shadow: 0 0 0 3px var(--leaf-100); }
.net-pill.off { background: var(--caution-bg); border-color: transparent; color: var(--caution); }
.net-pill.off .dot { background: var(--caution); box-shadow: none; }
.lang-btn { font-family: "Noto Sans Tamil", "Manrope", sans-serif; }

main { max-width: 720px; margin: 0 auto; }

/* List */
.list-head { padding: 18px 20px 6px; }
.list-head h1 { font-size: 30px; line-height: 1.15; font-weight: 800; letter-spacing: -.03em; text-wrap: balance; }
.list-head p { color: var(--ink-2); margin-top: 6px; max-width: 46ch; }
.chips { display: flex; gap: 8px; padding: 14px 20px 6px; overflow-x: auto; scrollbar-width: none; }
.chip {
  flex: none; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--surface); font-size: 14px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
}
.chip[aria-pressed="true"] { background: var(--ink); color: var(--ground); border-color: var(--ink); }
.cards { display: grid; gap: 18px; padding: 12px 20px 40px; }
@media (min-width: 640px) { .cards { grid-template-columns: 1fr 1fr; } }
.trail-card {
  background: var(--surface); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-1);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.trail-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.trail-card:active { transform: scale(.99); }
.thumb { position: relative; aspect-ratio: 16 / 9; background: var(--leaf-50); }
.thumb > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.thumb .badges { position: absolute; inset: 12px 12px auto 12px; display: flex; justify-content: space-between; gap: 8px; }
.card-body { padding: 14px 16px 16px; }
.card-body h2 { font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
.card-sub { color: var(--ink-2); font-size: 13.5px; margin-top: 2px; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 12px; color: var(--ink-2); font-size: 14px; font-weight: 600; }
.meta span { display: inline-flex; align-items: center; gap: 5px; }
.dash-link { display: flex; justify-content: center; align-items: center; gap: 6px; padding: 0 20px 40px; color: var(--ink-3); font-size: 14px; font-weight: 600; }

/* Pills */
.pill { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12.5px; font-weight: 800; white-space: nowrap; }
.pill.solid { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.pill-easy { background: var(--easy-bg); color: var(--easy); }
.pill-moderate { background: var(--moderate-bg); color: var(--moderate); }
.pill-tough { background: var(--tough-bg); color: var(--tough); }
.pill-open { background: var(--open-bg); color: var(--open); }
.pill-caution { background: var(--caution-bg); color: var(--caution); }
.pill-closed { background: var(--closed-bg); color: var(--closed); }
.pill-offline { background: var(--ink); color: var(--ground); }

/* Trail screen */
.hero-map { position: relative; height: min(48vh, 420px); background: var(--leaf-50); }
.hero-map .map { position: absolute; inset: 0; }
.hero-map .maplibregl-ctrl-bottom-right { bottom: 22px; }
.map-tools { position: absolute; right: 12px; top: 12px; display: flex; flex-direction: column; gap: 8px; z-index: 2; }
.map-btn {
  height: 40px; min-width: 40px; padding: 0 12px; border-radius: 12px; border: 0; cursor: pointer;
  background: var(--surface); box-shadow: var(--shadow-2); display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 13px; font-weight: 800;
}
.sheet-top { position: relative; margin-top: -22px; background: var(--ground); border-radius: var(--r-xl) var(--r-xl) 0 0; padding: 22px 20px 0; z-index: 3; }
.trail-title { font-size: 27px; line-height: 1.15; font-weight: 800; letter-spacing: -.03em; text-wrap: balance; }
.trail-sub { color: var(--ink-2); margin-top: 4px; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 18px; border-block: 1px solid var(--line); }
.stat-row > div { padding: 14px 4px; display: flex; flex-direction: column; gap: 2px; }
.stat-row > div + div { border-left: 1px solid var(--line); padding-left: 12px; }
.stat-v { font-size: 19px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat-v small { font-size: 13px; font-weight: 700; color: var(--ink-2); margin-left: 2px; }
.stat-l { font-size: 12.5px; color: var(--ink-3); font-weight: 600; }

.notice { display: flex; gap: 12px; margin: 18px 20px 0; padding: 14px 16px; border-radius: var(--r-md); }
.notice p { font-size: 14px; }
.notice .small { opacity: .8; margin-top: 4px; font-size: 12.5px; }
.notice-caution { background: var(--caution-bg); color: var(--caution); }
.notice-closed { background: var(--closed-bg); color: var(--closed); }
.notice-open { background: var(--open-bg); color: var(--open); }
.notice-note { background: var(--hat-100); color: var(--boot-700); }
@media (prefers-color-scheme: dark) { .notice-note { color: var(--hat-300); } }

.section { padding: 28px 20px 0; }
.section h2 { font-size: 19px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 12px; }
.compare { background: var(--surface); border-radius: var(--r-md); box-shadow: var(--shadow-1); overflow: hidden; }
.compare-row { display: grid; grid-template-columns: 1.3fr 1fr 1fr; align-items: center; padding: 12px 16px; font-size: 14.5px; }
.compare-row + .compare-row { border-top: 1px solid var(--line); }
.compare-row.head { padding-block: 10px; font-size: 12.5px; font-weight: 800; color: var(--ink-3); background: var(--surface-2); }
.compare-row > :nth-child(n+2) { text-align: right; font-variant-numeric: tabular-nums; }
.compare-row .lbl { font-weight: 600; color: var(--ink-2); }
.compare-row .v { font-weight: 800; }
.compare-row .muted { color: var(--ink-3); font-weight: 500; }
.compare-row .head-v { color: var(--leaf-600); }
.paces { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.pace { background: var(--surface); border-radius: var(--r-sm); padding: 10px 12px; box-shadow: var(--shadow-1); }
.pace b { display: block; font-size: 17px; font-variant-numeric: tabular-nums; }
.pace span { font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.pace.mid { background: var(--leaf-600); color: #fff; }
.pace.mid span { color: rgba(255,255,255,.82); }
.verify-tag { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; font-size: 13px; font-weight: 700; color: var(--boot-600); }
@media (prefers-color-scheme: dark) { .verify-tag { color: var(--hat-300); } }

.profile-card { background: var(--surface); border-radius: var(--r-md); box-shadow: var(--shadow-1); padding: 12px 8px 6px; position: relative; }
.profile { width: 100%; height: 180px; display: block; touch-action: pan-y; cursor: crosshair; }
.profile .area { fill: var(--hat-100); }
.profile .line { fill: none; stroke: var(--boot-500); stroke-width: 2.5; stroke-linejoin: round; }
.profile .grid { stroke: var(--line); stroke-width: 1; }
.profile .axis { fill: var(--ink-3); font: 600 11px "Manrope", sans-serif; }
.profile .cursor { stroke: var(--ink); stroke-width: 1.5; }
.profile .cursor-dot { fill: var(--leaf-600); stroke: #fff; stroke-width: 3; }
.profile-read { position: absolute; top: 10px; left: 16px; font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
.profile-read span { color: var(--ink-3); font-weight: 600; }
.hint { color: var(--ink-3); font-size: 13px; margin-top: 8px; }

.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { position: relative; display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: start; padding-bottom: 18px; }
.timeline li::before { content: ""; position: absolute; left: 19px; top: 34px; bottom: -2px; width: 3px; border-radius: 2px; background: var(--leaf-400); opacity: .45; }
.timeline li:last-child::before { display: none; }
.wp-badge { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; box-shadow: 0 0 0 4px var(--ground); }
.wp-name { font-weight: 700; padding-top: 2px; }
.wp-meta { font-size: 13px; color: var(--ink-3); font-weight: 600; font-variant-numeric: tabular-nums; }
.tag { display: inline-block; margin-top: 4px; font-size: 11.5px; font-weight: 700; color: var(--ink-3); border: 1px dashed var(--line-strong); border-radius: 6px; padding: 1px 7px; }
.wp-alt { font-size: 13px; font-weight: 800; color: var(--ink-2); font-variant-numeric: tabular-nums; padding-top: 2px; }
.bg-start { background: var(--wp-start); } .bg-end { background: var(--wp-end); } .bg-water { background: var(--wp-water); }
.bg-view { background: var(--wp-view); } .bg-caution { background: var(--wp-caution); } .bg-medical { background: var(--wp-medical); } .bg-exit { background: var(--wp-exit); }

.place { background: var(--surface); border-radius: var(--r-md); box-shadow: var(--shadow-1); padding: 16px; }
.place b { display: block; font-size: 16px; }
.place p { color: var(--ink-2); margin-top: 4px; }
.coords { font-size: 12.5px; color: var(--ink-3); font-weight: 600; margin-top: 8px; font-variant-numeric: tabular-nums; }
.source { color: var(--ink-3); font-size: 12.5px; padding: 22px 20px 0; }
.spacer { height: 120px; }

.action-bar {
  position: fixed; inset: auto 0 0 0; z-index: 20; display: flex; gap: 10px; align-items: center;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); max-width: 720px; margin: 0 auto;
  background: color-mix(in srgb, var(--ground) 94%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}

/* Buttons */
.btn {
  height: 52px; padding: 0 18px; border-radius: var(--r-md); border: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 15.5px; font-weight: 800; letter-spacing: -.01em;
  transition: transform .15s var(--ease), background .2s, opacity .2s;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary { flex: 1; background: var(--leaf-600); color: #fff; box-shadow: 0 6px 18px rgba(77, 116, 25, .32); }
.btn-primary:hover { background: var(--leaf-700); }
@media (prefers-color-scheme: dark) { .btn-primary { color: #13110e; } .btn-primary:hover { background: var(--leaf-700); } }
.btn-secondary { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.btn-secondary.done { color: var(--leaf-600); box-shadow: inset 0 0 0 1.5px var(--leaf-400); }
.btn-ghost { background: var(--surface-2); color: var(--ink); height: 44px; font-size: 14px; }
.btn-ghost[aria-pressed="true"] { background: var(--leaf-100); color: var(--leaf-700); box-shadow: inset 0 0 0 1.5px var(--leaf-400); }
.btn-danger { width: 100%; background: transparent; color: var(--closed); box-shadow: inset 0 0 0 1.5px currentColor; height: 48px; }
.btn-block { width: 100%; }

/* Trek pass (check-in) */
.pass { margin: 16px 20px 40px; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-2); overflow: hidden; }
.pass-head { background: var(--leaf-600); color: #fff; padding: 18px 20px 20px; display: flex; gap: 14px; align-items: center; }
.pass-head img { width: 52px; height: 52px; border-radius: 50%; background: #fff; }
.pass-head h1 { font-size: 21px; font-weight: 800; letter-spacing: -.02em; }
.pass-head p { opacity: .85; font-size: 13.5px; }
@media (prefers-color-scheme: dark) { .pass-head { color: #13110e; } }
.pass-tear { height: 18px; position: relative; background: radial-gradient(circle at 0 50%, var(--ground) 9px, transparent 10px) left / 50% 100% no-repeat, radial-gradient(circle at 100% 50%, var(--ground) 9px, transparent 10px) right / 50% 100% no-repeat; }
.pass-tear::after { content: ""; position: absolute; left: 18px; right: 18px; top: 50%; border-top: 2px dashed var(--line-strong); }
.pass form { padding: 4px 20px 22px; display: grid; gap: 14px; }
.field { display: grid; gap: 6px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.field input {
  height: 50px; padding: 0 14px; border-radius: var(--r-sm); border: 1.5px solid var(--line-strong); background: var(--ground);
  font: 600 16px "Manrope", "Noto Sans Tamil", sans-serif; color: var(--ink); caret-color: var(--leaf-600);
}
.field input:focus { outline: none; border-color: var(--leaf-500); box-shadow: 0 0 0 4px var(--leaf-100); }
.field-row { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.5fr); gap: 12px; align-items: end; }
.field input { width: 100%; min-width: 0; }
.pass-hint { font-size: 13px; color: var(--ink-3); }
.form-error { color: var(--closed); font-size: 13px; font-weight: 700; }

/* Trek screen */
.trek-screen { position: fixed; inset: 0; background: var(--leaf-50); }
.trek-screen .map { position: absolute; inset: 0; }
.trek-top { position: absolute; top: calc(env(safe-area-inset-top) + 12px); left: 12px; right: 12px; z-index: 5; display: flex; gap: 8px; align-items: flex-start; }
.route-pill {
  margin: 0 auto; height: 40px; padding: 0 16px; border-radius: 999px; display: inline-flex; align-items: center; gap: 8px;
  font-weight: 800; font-size: 14px; background: var(--surface); box-shadow: var(--shadow-2);
}
.route-pill.good { color: var(--open); }
.route-pill.bad { background: var(--closed); color: #fff; }
.trek-tools { position: absolute; right: 12px; top: calc(env(safe-area-inset-top) + 64px); z-index: 5; display: flex; flex-direction: column; gap: 8px; }
.banner {
  position: absolute; left: 12px; right: 12px; top: calc(env(safe-area-inset-top) + 64px); z-index: 6; margin-right: 60px;
  padding: 12px 14px; border-radius: var(--r-md); display: flex; gap: 10px; align-items: flex-start; box-shadow: var(--shadow-2);
  animation: drop .45s var(--ease);
}
.banner b { display: block; }
.banner-bad { background: var(--closed); color: #fff; }
.banner-warn { background: var(--warn-solid); color: #fff; top: calc(env(safe-area-inset-top) + 130px); }
@keyframes drop { from { transform: translateY(-12px); opacity: 0; } }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 7; max-width: 720px; margin: 0 auto;
  background: var(--surface); border-radius: var(--r-xl) var(--r-xl) 0 0; box-shadow: var(--shadow-3);
  padding: 10px 20px calc(18px + env(safe-area-inset-bottom));
}
.grabber { width: 40px; height: 5px; border-radius: 3px; background: var(--line-strong); margin: 0 auto 12px; }
.big-stats { display: grid; grid-template-columns: repeat(3, 1fr); }
.big-stats > div + div { border-left: 1px solid var(--line); padding-left: 14px; }
.big-v { font-size: 26px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.big-v small { font-size: 14px; color: var(--ink-2); font-weight: 700; margin-left: 2px; }
.big-l { font-size: 12.5px; color: var(--ink-3); font-weight: 700; }
.progress { height: 6px; border-radius: 3px; background: var(--surface-3); margin: 14px 0 12px; overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: var(--leaf-500); border-radius: 3px; transition: width .6s var(--ease); }
.next-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-md); background: var(--surface-2); }
.next-row .wp-badge { width: 34px; height: 34px; box-shadow: none; }
.next-row b { display: block; font-size: 15px; }
.next-row span { font-size: 13px; color: var(--ink-3); font-weight: 600; }
.next-row .dist { margin-left: auto; font-weight: 800; font-size: 16px; font-variant-numeric: tabular-nums; }
.exit-line { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-3); font-weight: 600; margin-top: 10px; }
.controls { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0 10px; }
.who { font-size: 13px; color: var(--ink-3); font-weight: 600; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }

/* Map markers */
.mk { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: #fff; border: 2.5px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.mk .ic { width: 14px; height: 14px; }
.me { width: 20px; height: 20px; border-radius: 50%; background: var(--me); border: 3px solid #fff; box-shadow: 0 0 0 8px rgba(45,111,168,.22), 0 2px 8px rgba(0,0,0,.3); }
.me.off { background: var(--wp-medical); box-shadow: 0 0 0 8px rgba(192,54,44,.25), 0 2px 8px rgba(0,0,0,.3); }
.scrub { width: 16px; height: 16px; border-radius: 50%; background: var(--boot-500); border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.maplibregl-ctrl-attrib { font: 500 11px "Manrope", sans-serif; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); opacity: 0;
  background: var(--ink); color: var(--ground); padding: 12px 18px; border-radius: 14px; font-size: 14px; font-weight: 700;
  transition: opacity .3s var(--ease), transform .3s var(--ease); max-width: calc(100% - 32px); z-index: 60; pointer-events: none; box-shadow: var(--shadow-2);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Dashboard */
.dash { max-width: 1100px; padding: 8px 20px 40px; }
.dash h1 { font-size: 28px; font-weight: 800; letter-spacing: -.03em; margin: 12px 0 4px; }
.dash .lede { color: var(--ink-2); margin-bottom: 20px; }
.dash-grid { display: grid; gap: 18px; }
@media (min-width: 900px) { .dash-grid { grid-template-columns: 2fr 1fr; align-items: start; } }
.panel { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-1); overflow: hidden; }
.panel h2 { font-size: 16px; font-weight: 800; padding: 16px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 8px; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); }
.kpis > div { padding: 14px 18px; }
.kpis > div + div { border-left: 1px solid var(--line); }
.kpis b { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; display: block; }
.kpis span { font-size: 12.5px; color: var(--ink-3); font-weight: 700; }
.table-wrap { overflow-x: auto; }
table.treks { width: 100%; border-collapse: collapse; font-size: 14px; }
.treks th { text-align: left; font-size: 12px; color: var(--ink-3); font-weight: 800; padding: 10px 18px; background: var(--surface-2); }
.treks td { padding: 12px 18px; border-top: 1px solid var(--line); vertical-align: top; font-variant-numeric: tabular-nums; }
.treks .sub { color: var(--ink-3); font-size: 12.5px; }
.empty { padding: 28px 18px; color: var(--ink-3); text-align: center; }
.status-row { padding: 14px 18px; display: grid; gap: 10px; }
.status-row + .status-row { border-top: 1px solid var(--line); }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--surface-2); border-radius: 12px; padding: 4px; gap: 4px; }
.seg button { height: 36px; border: 0; border-radius: 9px; background: transparent; font-weight: 800; font-size: 13px; cursor: pointer; color: var(--ink-2); }
.seg button[aria-pressed="true"].s-open { background: var(--open-bg); color: var(--open); }
.seg button[aria-pressed="true"].s-caution { background: var(--caution-bg); color: var(--caution); }
.seg button[aria-pressed="true"].s-closed { background: var(--closed-bg); color: var(--closed); }
.dash .note { color: var(--ink-3); font-size: 12.5px; padding: 12px 18px; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media (prefers-color-scheme: dark) { .pace.mid { color: #13110e; } .pace.mid span { color: rgba(19,17,14,.75); } .route-pill.bad, .banner-bad { color: #fff; } }

.banner-bad, .route-pill.bad { background: var(--alert) !important; color: #fff !important; }
.controls .btn { font-size: 13px; padding: 0 8px; gap: 5px; white-space: nowrap; }
@media (max-width: 640px) {
  .treks thead { display: none; }
  .treks tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; padding: 14px 18px; border-top: 1px solid var(--line); }
  .treks td { border: 0; padding: 0; }
  .treks td:first-child { grid-column: 1 / -1; }
  .treks td[data-label]::before { content: attr(data-label); display: block; font-size: 11.5px; font-weight: 800; color: var(--ink-3); }
}

.next-row span.wp-badge { color: #fff; }
.btn-ghost:disabled[aria-pressed="true"] { background: var(--surface-2); color: var(--ink-3); }

/* App bar content lines up with the page column on wide screens */
.app-bar { padding-inline: max(16px, calc((100% - 720px) / 2 + 4px)); }
.dash-page .app-bar { padding-inline: max(16px, calc((100% - 1100px) / 2 + 4px)); }
.demo-note { font-size: 12px; color: var(--ink-3); margin: -2px 0 10px; }
.treks .t { white-space: nowrap; }