@font-face { font-family: 'Figtree'; src: url('/fonts/Figtree-Variable.woff2') format('woff2'); font-weight: 300 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Barlow Semi Condensed'; src: url('/fonts/BarlowSemiCondensed-Medium.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Barlow Semi Condensed'; src: url('/fonts/BarlowSemiCondensed-SemiBold.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Barlow Semi Condensed'; src: url('/fonts/BarlowSemiCondensed-Bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }

:root {
  --fs: 0.95;
  --pin: 1;
  --brand-raw: #10b981;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-num: 'JetBrains Mono', 'Geist Mono', ui-monospace, SFMono-Regular, monospace;
  --font-mono: 'JetBrains Mono', 'Geist Mono', ui-monospace, SFMono-Regular, monospace;

  --bg: #0b0e14;
  --surface: #121824;
  --surface-2: #161f30;
  --surface-3: #1e2638;
  --line: #1e2638;
  --line-2: #28334a;
  --ink: #f1f5f9;
  --ink-2: #cbd5e1;
  --ink-3: #94a3b8;
  --ink-4: #64748b;
  --scrim: rgba(2, 6, 12, 0.75);

  --brand: #10b981;
  --brand-hover: #059669;
  --brand-press: #047857;
  --brand-text: #34d399;
  --brand-soft: rgba(16, 185, 129, 0.12);
  --brand-soft-2: rgba(16, 185, 129, 0.2);
  --brand-line: rgba(16, 185, 129, 0.35);
  --on-brand: #022c22;
  --sign: #f59e0b;
  --sign-ink: #0b0e14;
  --asphalt: #0b0e14;

  --good: #10b981;
  --good-soft: rgba(16, 185, 129, 0.12);
  --good-line: rgba(16, 185, 129, 0.3);
  --bad: #ef4444;
  --bad-soft: rgba(239, 68, 68, 0.12);
  --bad-line: rgba(239, 68, 68, 0.3);
  --warn: #f59e0b;
  --warn-soft: rgba(245, 158, 11, 0.12);
  --warn-line: rgba(245, 158, 11, 0.3);
  --info: #0284c7;
  --info-soft: rgba(2, 132, 199, 0.12);
  --info-line: rgba(2, 132, 199, 0.3);

  --tier-g: #10b981;
  --tier-y: #f59e0b;
  --tier-r: #ef4444;
  --tier-y-ink: #0b0e14;

  --series-1: #38bdf8;
  --series-2: #f97316;
  --series-3: #10b981;
  --series-4: #facc15;
  --series-5: #ec4899;
  --series-6: #84cc16;
  --series-7: #8b5cf6;
  --series-8: #f43f5e;

  --route: #38bdf8;
  --route-casing: #0b0e14;
  --route-alt: #475569;
  --route-range: #f59e0b;

  --r-xs: 2px;
  --r-s: 4px;
  --r: 5px;
  --r-l: 6px;
  --r-xl: 6px;

  --sh-1: 0 1px 2px rgba(0, 0, 0, 0.4);
  --sh-2: 0 4px 12px rgba(0, 0, 0, 0.5);
  --sh-3: 0 12px 32px rgba(0, 0, 0, 0.7);
  --ring: 0 0 0 2px rgba(16, 185, 129, 0.35);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  --top-h: 3rem;
  --gate-bg: #0b0e14;
  --gate-grid: rgba(30, 38, 56, 0.6);
  --gate-road: #161f30;
  color-scheme: dark;
}

[data-theme="light"], [data-theme="dark"] {
  --bg: #0b0e14;
  --surface: #121824;
  --surface-2: #161f30;
  --surface-3: #1e2638;
  --line: #1e2638;
  --line-2: #28334a;
  --ink: #f1f5f9;
  --ink-2: #cbd5e1;
  --ink-3: #94a3b8;
  --ink-4: #64748b;
  --scrim: rgba(2, 6, 12, 0.75);
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: calc(14px * var(--fs, 0.95)); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; font: 400 0.9rem/1.4 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; min-height: 100dvh; overflow: hidden; }
body.booting #gate, body.booting #app { visibility: hidden; }
h1, h2, h3, h4, h5, p { margin: 0; }
h1 { font-size: 1.35rem; line-height: 1.2; font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: 1.1rem; font-weight: 700; letter-spacing: -0.01em; }
h3 { font-size: 0.95rem; font-weight: 700; }
h4 { font-size: 0.8rem; font-weight: 700; color: var(--ink-2); text-transform: uppercase; letter-spacing: 0.03em; }
a { color: var(--brand-text); }
small { font-size: 0.75rem; color: var(--ink-3); }
em { font-style: normal; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled, input:disabled, select:disabled { cursor: not-allowed; }
[hidden] { display: none !important; }
code { font: 500 0.82em var(--font-mono); background: var(--surface-3); padding: 0.1em 0.35em; border-radius: 2px; border: 1px solid var(--line); }
hr { border: 0; border-top: 1px solid var(--line); margin: 0.85rem 0; }
.muted { color: var(--ink-3); }
.dim { color: var(--ink-4); }
.good { color: var(--good); } .bad { color: var(--bad); } .warn { color: var(--warn); }
.num, .mono { font-family: var(--font-num); font-variant-numeric: tabular-nums lining-nums; font-feature-settings: 'tnum' 1, 'lnum' 1; letter-spacing: 0; }
.num { font-weight: 600; }
.mono { font-weight: 500; }
.sm { font-size: 0.82em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.grow { flex: 1 1 auto; }
.block { display: block; }
.wrap { flex-wrap: wrap; }
.full { width: 100%; }
.r { text-align: right; }
.t-g { color: var(--tier-g); } .t-y { color: var(--tier-y); } .t-r { color: var(--tier-r); }
:focus { outline: none; }
:focus-visible { outline: 1px solid var(--brand); outline-offset: 1px; border-radius: 2px; }
::selection { background: rgba(16, 185, 129, 0.25); color: inherit; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-4); }
::-webkit-scrollbar-track { background: transparent; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; } }

body.role-viewer .edit-only { display: none !important; }
body:not(.role-admin) .admin-only { display: none !important; }

.ic { width: 1.1em; height: 1.1em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.2em; }
.ic.mark { stroke: none; width: 1.6rem; height: 1.6rem; vertical-align: middle; }

.btn { --h: 2.15rem; display: inline-flex; align-items: center; justify-content: center; gap: 0.4em; height: var(--h); padding: 0 0.85rem; border-radius: var(--r-s); border: 1px solid var(--line-2); font-weight: 600; font-size: 0.82rem; line-height: 1; white-space: nowrap; text-decoration: none; background: var(--surface-2); color: var(--ink); transition: background 0.12s, border-color 0.12s, box-shadow 0.12s; position: relative; user-select: none; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; }
.btn.sm { --h: 1.85rem; padding: 0 0.65rem; font-size: 0.78rem; }
.btn.xs { --h: 1.6rem; padding: 0 0.5rem; font-size: 0.74rem; gap: 0.3em; border-radius: 3px; }
.btn.block { display: flex; width: 100%; }
.btn.primary { background: var(--brand); color: #022c22; border-color: var(--brand); font-weight: 700; box-shadow: var(--sh-1); }
.btn.primary:hover:not(:disabled) { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn.primary:active:not(:disabled) { background: var(--brand-press); }
.btn.soft { background: var(--brand-soft); color: var(--brand-text); border-color: var(--brand-line); }
.btn.soft:hover:not(:disabled) { background: var(--brand-soft-2); }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--ink-2); }
.btn.ghost:hover:not(:disabled) { background: var(--surface-2); color: var(--ink); border-color: var(--line-2); }
.btn.danger { background: var(--bad); color: #fff; border-color: var(--bad); }
.btn.danger:hover:not(:disabled) { filter: brightness(0.92); }
.btn.danger-soft { background: var(--bad-soft); color: var(--bad); border-color: var(--bad-line); }
.btn.danger-soft:hover:not(:disabled) { filter: brightness(0.97); }
.btn .ic { width: 1.05em; height: 1.05em; }
.btn.busy { color: transparent !important; pointer-events: none; }
.btn.busy::after { content: ''; position: absolute; width: 1em; height: 1em; border-radius: 50%; border: 2px solid var(--on-brand); border-right-color: transparent; animation: spin 0.7s linear infinite; }
label.btn { cursor: pointer; }
.icon-btn { display: inline-grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: var(--r-s); border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); flex: none; transition: background 0.12s, color 0.12s; }
.icon-btn:hover:not(:disabled) { background: var(--surface-2); color: var(--ink); border-color: var(--line-2); }
.icon-btn.sm { width: 1.8rem; height: 1.8rem; }
.icon-btn.xs { width: 1.5rem; height: 1.5rem; border-radius: 3px; }
.icon-btn.danger:hover { background: var(--bad-soft); color: var(--bad); border-color: var(--bad-line); }
.link { background: none; border: 0; padding: 0; color: var(--brand-text); font-weight: 600; text-align: left; }
.link:hover { text-decoration: underline; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.75rem; align-items: center; }
.btn-row.top { margin: 0 0 0.75rem; }
@keyframes spin { to { transform: rotate(360deg); } }
.spin { display: inline-block; width: 1.25rem; height: 1.25rem; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--brand); animation: spin 0.8s linear infinite; }
.spin.sm { width: 0.85rem; height: 0.85rem; border-width: 1.5px; margin-right: 0.4rem; vertical-align: -0.15em; }

.field { display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; }
.field > span { font-size: 0.76rem; font-weight: 650; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.03em; }
.field > span em, .field > span small { font-weight: 400; color: var(--ink-4); text-transform: none; }
.field.inline { flex-direction: row; align-items: center; gap: 0.45rem; }
.field.inline > span { white-space: nowrap; }
.form-grid { display: grid; gap: 0.75rem; }
.g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.65rem; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
.hint { font-size: 0.76rem; color: var(--ink-3); margin-top: 0.4rem; line-height: 1.35; }
.hint.post { display: flex; gap: 0.35rem; align-items: flex-start; }
.hint .ic { margin-top: 0.1em; }

.inp, select.inp, textarea.inp {
  width: 100%; height: 2.15rem; padding: 0 0.65rem; border-radius: var(--r-s); border: 1px solid var(--line);
  background-color: var(--bg); color: var(--ink); -webkit-text-fill-color: var(--ink); caret-color: var(--brand);
  font-size: 0.86rem; transition: border-color 0.12s, box-shadow 0.12s, background-color 0.12s; appearance: none; -webkit-appearance: none;
}
textarea.inp { height: auto; padding: 0.5rem 0.65rem; resize: vertical; line-height: 1.35; }
.inp::placeholder { color: var(--ink-4); -webkit-text-fill-color: var(--ink-4); opacity: 1; }
.inp:hover:not(:disabled) { border-color: var(--line-2); }
.inp:focus { border-color: var(--brand); box-shadow: var(--ring); background-color: var(--bg); color: var(--ink); -webkit-text-fill-color: var(--ink); outline: none; }
.inp:disabled { background-color: var(--surface-2); color: var(--ink-4); -webkit-text-fill-color: var(--ink-4); }
.inp.sm { height: 1.85rem; font-size: 0.78rem; padding: 0 0.55rem; }
.inp.xs { height: 1.6rem; font-size: 0.74rem; padding: 0 0.45rem; }
input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:focus, select:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 40px var(--surface) inset !important; box-shadow: 0 0 0 40px var(--surface) inset !important;
  -webkit-text-fill-color: var(--ink) !important; caret-color: var(--brand); transition: background-color 9999s ease-out;
}
select.inp { padding-right: 1.7rem; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2364748b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.6rem center; background-size: 0.6rem; }
select.inp option { background: var(--surface); color: var(--ink); }
input[type=search].inp::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; height: 0.9rem; width: 0.9rem; cursor: pointer; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 6l12 12M18 6 6 18' stroke='%2364748b' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat; }
input[type=number].inp { -moz-appearance: textfield; appearance: textfield; }
input[type=number].inp::-webkit-inner-spin-button { display: none; }
input[type=date].inp::-webkit-calendar-picker-indicator, input[type=color] { cursor: pointer; }
input[type=date].inp { padding-right: 0.4rem; }
input[type=range] { width: 100%; accent-color: var(--brand); height: 1.3rem; background: transparent; }
.inp-wrap { position: relative; display: flex; align-items: center; }
.inp-wrap .inp { padding-right: 2.3rem; }
.inp-wrap .inp-act { position: absolute; right: 0.25rem; }
.inp-eye, .inp-wrap .inp-act:not(.btn) { position: absolute; right: 0.25rem; top: 50%; transform: translateY(-50%); width: 1.7rem; height: 1.7rem; border: 0; background: transparent; color: var(--ink-3); border-radius: 3px; display: grid; place-items: center; }
.inp-eye:hover, .inp-wrap .inp-act:not(.btn):hover { background: var(--surface-2); color: var(--ink); }
.inp-wrap .inp-act.btn { top: 50%; transform: translateY(-50%); right: 0.25rem; }
.inp-suf { position: absolute; right: 0.65rem; font-size: 0.74rem; color: var(--ink-3); pointer-events: none; }
.inp-wrap:has(.inp-suf) .inp { padding-right: 3.2rem; }
.search-in { position: relative; flex: 1 1 12rem; min-width: 9rem; }
.search-in .ic { position: absolute; left: 0.65rem; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.search-in .inp { padding-left: 2.1rem; }
.mono.inp, .inp.mono { font-family: var(--font-num); font-weight: 500; letter-spacing: 0; font-size: 0.88rem; }
.form-err { display: flex; gap: 0.45rem; align-items: flex-start; background: var(--bad-soft); color: var(--bad); border: 1px solid var(--bad-line); border-radius: var(--r-s); padding: 0.5rem 0.65rem; font-size: 0.8rem; margin-bottom: 0.75rem; font-weight: 600; }
.form-err .ic { margin-top: 0.12em; }

.check { display: inline-flex; align-items: center; gap: 0.45rem; cursor: pointer; font-size: 0.84rem; }
.check input { appearance: none; -webkit-appearance: none; width: 1rem; height: 1rem; flex: none; border: 1px solid var(--line-2); border-radius: 3px; background: var(--bg); display: inline-grid; place-items: center; cursor: pointer; transition: background 0.12s, border-color 0.12s; margin: 0; }
.check input:hover:not(:disabled) { border-color: var(--brand); }
.check input:checked, .check input:indeterminate { background: var(--brand); border-color: var(--brand); }
.check input:checked::after { content: ''; width: 0.52rem; height: 0.28rem; border-left: 2px solid #022c22; border-bottom: 2px solid #022c22; transform: translateY(-1px) rotate(-45deg); }
.check input:indeterminate::after { content: ''; width: 0.5rem; height: 2px; background: #022c22; }
.check input:disabled { opacity: 0.45; }
input[type=checkbox][data-ch="lg-row"], input[type=checkbox][data-ch="lg-all"] { appearance: none; -webkit-appearance: none; width: 1rem; height: 1rem; border: 1px solid var(--line-2); border-radius: 3px; background: var(--bg); display: inline-grid; place-items: center; vertical-align: middle; margin: 0; }
input[type=checkbox][data-ch="lg-row"]:checked, input[type=checkbox][data-ch="lg-all"]:checked, input[type=checkbox][data-ch="lg-all"]:indeterminate { background: var(--brand); border-color: var(--brand); }
input[type=checkbox][data-ch="lg-row"]:checked::after, input[type=checkbox][data-ch="lg-all"]:checked::after { content: ''; width: 0.52rem; height: 0.28rem; border-left: 2px solid #022c22; border-bottom: 2px solid #022c22; transform: translateY(-1px) rotate(-45deg); }
input[type=checkbox][data-ch="lg-all"]:indeterminate::after { content: ''; width: 0.5rem; height: 2px; background: #022c22; }

.switch { display: flex; align-items: flex-start; gap: 0.6rem; cursor: pointer; padding: 0.25rem 0; font-size: 0.84rem; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch > i { flex: none; width: 2.1rem; height: 1.2rem; border-radius: 3px; background: var(--surface-3); border: 1px solid var(--line); position: relative; transition: background 0.15s; margin-top: 0.05rem; }
.switch > i::after { content: ''; position: absolute; top: 1px; left: 1px; width: 0.95rem; height: 0.95rem; border-radius: 2px; background: var(--ink-3); transition: transform 0.15s var(--ease); }
.switch input:checked + i { background: var(--brand-soft); border-color: var(--brand-line); }
.switch input:checked + i::after { transform: translateX(0.9rem); background: var(--brand); }
.switch input:focus-visible + i { box-shadow: var(--ring); }
.switch > span { display: flex; flex-direction: column; font-weight: 550; }
.switch > span small { font-weight: 400; color: var(--ink-3); }

.seg { display: inline-flex; padding: 2px; gap: 2px; background: var(--bg); border-radius: 3px; border: 1px solid var(--line); max-width: 100%; }
.seg.wrap { flex-wrap: wrap; }
.seg > button { height: 1.75rem; padding: 0 0.65rem; border: 0; border-radius: 2px; background: transparent; color: var(--ink-3); font-weight: 600; font-size: 0.78rem; display: inline-flex; align-items: center; gap: 0.35rem; white-space: nowrap; transition: background 0.12s, color 0.12s; }
.seg > button:hover:not(.on) { color: var(--ink); background: var(--surface-2); }
.seg > button.on { background: var(--surface-2); color: var(--brand-text); border: 1px solid var(--line-2); }
.seg.sm > button { height: 1.55rem; font-size: 0.72rem; padding: 0 0.5rem; }

.chips { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 0.35rem; height: 1.75rem; padding: 0 0.65rem; border-radius: 3px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-size: 0.76rem; font-weight: 600; white-space: nowrap; transition: background 0.12s, border-color 0.12s, color 0.12s; }
.chip:hover:not(.on):not(.disabled) { border-color: var(--line-2); color: var(--ink); background: var(--surface-2); }
.chip.on { background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand-text); }
.chip small { color: inherit; opacity: 0.7; font-weight: 600; font-family: var(--font-mono); }
.chip .dot, .dot { display: inline-block; width: 0.45rem; height: 0.45rem; border-radius: 1px; flex: none; }
.chip.disabled { opacity: 0.45; cursor: not-allowed; }
.chip.cardchip i, .chip i:not(.dot) { font-style: normal; display: inline-grid; place-items: center; min-width: 1rem; height: 1rem; padding: 0 0.15rem; border-radius: 2px; background: var(--c); color: #fff; font-size: 0.64rem; font-weight: 700; font-family: var(--font-mono); }
.chip.cardchip.on { border-color: var(--c); }
.bdot { display: inline-block; width: 0.45rem; height: 0.45rem; border-radius: 1px; margin-right: 0.35rem; vertical-align: 0.05em; }

.pill { display: inline-flex; align-items: center; gap: 0.25rem; height: 1.35rem; padding: 0 0.45rem; border-radius: 2px; font-size: 0.7rem; font-weight: 700; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; border: 1px solid var(--line); font-family: var(--font-mono); }
.pill.ok { background: var(--good-soft); color: var(--good); border-color: var(--good-line); }
.pill.bad { background: var(--bad-soft); color: var(--bad); border-color: var(--bad-line); }
.pill.warn { background: var(--warn-soft); color: var(--warn); border-color: var(--warn-line); }
.pill.info { background: var(--info-soft); color: var(--info); border-color: var(--info-line); }
.tag { display: inline-block; padding: 0.06rem 0.35rem; border-radius: 2px; font-size: 0.68rem; font-weight: 700; background: var(--surface-3); color: var(--ink-2); vertical-align: 0.08em; border: 1px solid var(--line); font-family: var(--font-mono); }
.tag.warn { background: var(--warn-soft); color: var(--warn); border-color: var(--warn-line); }
.brand-tag { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.08rem 0.45rem; border-radius: 3px; font-size: 0.72rem; font-weight: 700; background: color-mix(in oklab, var(--b) 12%, var(--surface)); color: var(--ink); border: 1px solid color-mix(in oklab, var(--b) 35%, transparent); white-space: nowrap; }
.brand-tag::before { content: ''; width: 0.45rem; height: 0.45rem; border-radius: 1px; background: var(--b); }
.brand-tag.sm { font-size: 0.68rem; padding: 0.04rem 0.35rem; }
.cardtag { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.08rem 0.45rem 0.08rem 0.15rem; border-radius: 3px; font-size: 0.7rem; font-weight: 650; color: var(--ink); background: color-mix(in oklab, var(--c, var(--cc)) 10%, var(--surface)); border: 1px solid color-mix(in oklab, var(--c, var(--cc)) 40%, transparent); margin: 1px 2px 1px 0; white-space: nowrap; }
.cardtag > i { font-style: normal; display: inline-grid; place-items: center; min-width: 1rem; height: 1rem; padding: 0 0.15rem; border-radius: 2px; background: var(--c, var(--cc)); color: #fff; font-size: 0.62rem; font-weight: 800; font-family: var(--font-mono); }
.cardtag em { color: var(--ink-3); font-weight: 600; }
.cardtag.none { padding: 0.08rem 0.45rem; background: var(--surface-3); border-color: var(--line); color: var(--ink-3); }
.cardtag.lg { width: 2.1rem; height: 2.1rem; padding: 0; justify-content: center; border-radius: 3px; background: var(--cc); color: #fff; font-size: 0.85rem; font-weight: 800; border: 0; margin: 0; }
.av { display: inline-grid; place-items: center; flex: none; width: 1.75rem; height: 1.75rem; border-radius: 3px; background: var(--surface-3); color: var(--brand-text); font-size: 0.7rem; font-weight: 800; letter-spacing: 0.02em; border: 1px solid var(--line); font-family: var(--font-mono); }
.av.lg { width: 2.6rem; height: 2.6rem; font-size: 0.9rem; }

.notice { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.65rem 0.8rem; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface-2); font-size: 0.84rem; margin-bottom: 0.75rem; }
.notice > .ic { margin-top: 0.12em; flex: none; }
.notice p { color: var(--ink-2); margin-top: 0.15rem; font-size: 0.8rem; }
.notice b { font-weight: 700; }
.notice.info, .notice.warn, .notice.bad, .notice.ok { color: var(--ink); }
.notice.info { background: var(--info-soft); border-color: var(--info-line); } .notice.info > .ic { color: var(--info); }
.notice.warn { background: var(--warn-soft); border-color: var(--warn-line); } .notice.warn > .ic { color: var(--warn); }
.notice.bad { background: var(--bad-soft); border-color: var(--bad-line); } .notice.bad > .ic { color: var(--bad); }
.notice > span { flex: 1; }
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.45rem; padding: 1.8rem 1rem; color: var(--ink-3); }
.empty h4 { font-size: 0.92rem; color: var(--ink); }
.empty p { max-width: 30rem; font-size: 0.82rem; }
.empty.sm { padding: 1rem 0.6rem; }
.empty > .ic { width: 1.4rem; height: 1.4rem; color: var(--ink-4); }
.empty-ic { display: grid; place-items: center; width: 2.8rem; height: 2.8rem; border-radius: 4px; background: var(--brand-soft); color: var(--brand-text); border: 1px solid var(--brand-line); }
.empty-ic .ic { width: 1.35rem; height: 1.35rem; }

.toasts { position: fixed; z-index: 2000; left: 50%; bottom: 1rem; transform: translateX(-50%); display: flex; flex-direction: column; gap: 0.4rem; align-items: center; width: min(28rem, calc(100vw - 2rem)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; gap: 0.55rem; align-items: flex-start; width: 100%; padding: 0.65rem 0.85rem; border-radius: var(--r); background: #121824; color: #f1f5f9; font-size: 0.82rem; font-weight: 550; box-shadow: var(--sh-3); animation: toastIn 0.22s var(--ease); border: 1px solid var(--line-2); }
.toast .ic { margin-top: 0.1em; color: var(--ink-3); }
.toast.ok .ic { color: var(--good); } .toast.err .ic { color: var(--bad); }
.toast.err { background: #230808; border-color: #7f1d1d; }
.toast.out { opacity: 0; transform: translateY(6px); transition: opacity 0.2s, transform 0.2s; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px) scale(0.98); } }
body.on-gate .toasts { bottom: 1rem; }

#layers { position: relative; z-index: 1500; }
.back { position: fixed; inset: 0; background: var(--scrim); display: flex; align-items: center; justify-content: center; padding: 1rem; opacity: 0; transition: opacity 0.16s; backdrop-filter: blur(2px); }
.back.in { opacity: 1; } .back.out { opacity: 0; }
.back.k-drawer { justify-content: flex-end; padding: 0; align-items: stretch; }
.dialog { width: min(30rem, 100%); max-height: min(90dvh, 52rem); display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r-l); box-shadow: var(--sh-3); border: 1px solid var(--line); transform: translateY(8px) scale(0.99); transition: transform 0.18s var(--ease); overflow: hidden; }
.back.in .dialog { transform: none; }
.dialog.sm { width: min(24rem, 100%); } .dialog.md { width: min(38rem, 100%); } .dialog.lg { width: min(48rem, 100%); } .dialog.xl { width: min(64rem, 100%); }
.drawer { width: min(30rem, 100%); height: 100%; display: flex; flex-direction: column; background: var(--surface); box-shadow: var(--sh-3); border-left: 1px solid var(--line); transform: translateX(20px); transition: transform 0.22s var(--ease); }
.back.in .drawer { transform: none; }
.drawer.lg { width: min(40rem, 100%); }
.dlg-h { display: flex; align-items: flex-start; gap: 0.5rem; padding: 0.85rem 1rem 0.75rem; border-bottom: 1px solid var(--line); flex-wrap: wrap; position: relative; }
.dlg-h h2 { flex: 1; min-width: 0; font-size: 1.05rem; }
.dlg-h .icon-btn { margin-left: auto; position: absolute; right: 0.6rem; top: 0.6rem; }
.dlg-sub { flex-basis: 100%; font-size: 0.78rem; color: var(--ink-3); margin-top: -0.25rem; padding-right: 2.2rem; }
.dlg-b { padding: 0.95rem 1rem 1.1rem; overflow: auto; flex: 1; min-height: 0; }
.dlg-text { color: var(--ink-2); font-size: 0.86rem; line-height: 1.45; }
.dlg-f { display: flex; justify-content: flex-end; gap: 0.45rem; padding: 0.7rem 1rem; border-top: 1px solid var(--line); background: var(--surface-2); flex-wrap: wrap; }
.dlg-f.in-body { margin: 1rem -1rem -1.1rem; }
body.has-layer .leaflet-container { pointer-events: none; }
.share-box { background: var(--surface-3); border: 1px dashed var(--line-2); border-radius: var(--r-s); padding: 0.65rem; font: 500 0.84rem/1.5 var(--font-num); white-space: pre-wrap; word-break: break-all; margin: 0.7rem 0 0; user-select: all; }
.drag-ghost { opacity: 0.35; }

.sugg { position: absolute; z-index: 700; left: 0; right: 0; top: calc(100% + 4px); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r); box-shadow: var(--sh-3); max-height: min(22rem, 55dvh); overflow: auto; padding: 0.25rem; }
.sg-h { padding: 0.4rem 0.5rem 0.2rem; font-size: 0.68rem; font-weight: 750; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); font-family: var(--font-mono); }
.sg-i { display: flex; gap: 0.5rem; align-items: center; padding: 0.4rem 0.55rem; border-radius: var(--r-s); cursor: pointer; }
.sg-i.on, .sg-i:hover { background: var(--surface-2); border: 1px solid var(--line); }
.sg-ic { flex: none; display: grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 2px; background: var(--surface-3); color: var(--ink-2); }
.sg-ic.k-station { background: var(--brand-soft); color: var(--brand-text); border: 1px solid var(--brand-line); }
.sg-ic.k-gps { background: var(--info-soft); color: var(--info); border: 1px solid var(--info-line); }
.sg-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sg-t b { font-weight: 650; font-size: 0.84rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.sg-t small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 0.74rem; color: var(--ink-3); }
.sg-t mark { background: rgba(245, 158, 11, 0.3); color: inherit; border-radius: 2px; padding: 0 1px; }
.sg-p { font: 700 0.92rem var(--font-num); flex: none; color: var(--brand-text); }
.sg-s { padding: 0.5rem 0.6rem; font-size: 0.78rem; color: var(--ink-3); }
.sg-s.warn { color: var(--warn); }

.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); box-shadow: var(--sh-1); }
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.82rem; }
.tbl th { position: sticky; top: 0; z-index: 2; background: var(--surface-2); text-align: left; font-size: 0.7rem; font-weight: 700; color: var(--ink-3); padding: 0.55rem 0.7rem; border-bottom: 1px solid var(--line); white-space: nowrap; text-transform: uppercase; letter-spacing: 0.04em; font-family: var(--font-mono); }
.tbl th.r, .tbl td.r { text-align: right; }
.tbl td { padding: 0.5rem 0.7rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: var(--surface-2); }
.tbl tr.sel td { background: var(--brand-soft); }
.tbl.compact td { padding: 0.35rem 0.6rem; font-size: 0.78rem; }
.tbl.compact th { padding: 0.4rem 0.6rem; }
.tbl td.nm { font-weight: 650; }
.tbl td.addr { max-width: 18rem; color: var(--ink-2); font-size: 0.78rem; }
.tbl td.exit { max-width: 12rem; color: var(--ink-3); font-size: 0.76rem; font-family: var(--font-mono); }
.tbl td.acts, .tbl td.chk, .tbl th.chk { white-space: nowrap; }
.tbl td.acts { text-align: right; }
.tbl td.acts .icon-btn { color: var(--ink-3); }
.tbl td.chk, .tbl th.chk { width: 2rem; padding-right: 0; }
.tbl .price { font: 700 0.95rem var(--font-num); }
.tbl .price.t-g { color: var(--tier-g); } .tbl .price.t-y { color: var(--tier-y); } .tbl .price.t-r { color: var(--tier-r); }
.tbl .sortb { background: none; border: 0; padding: 0; display: inline-flex; align-items: center; gap: 0.2rem; font: inherit; color: inherit; }
.tbl .sortb.on { color: var(--brand-text); }
.more { display: flex; justify-content: center; padding: 0.75rem 0 0; }
.delta, .dchip { display: inline-flex; align-items: center; gap: 0.15rem; font: 700 0.82rem var(--font-num); padding: 0.1rem 0.35rem; border-radius: 3px; white-space: nowrap; border: 1px solid transparent; }
.delta .ic, .dchip .ic { width: 0.9em; height: 0.9em; stroke-width: 2.4; }
.delta.up, .dchip.up { color: var(--bad); background: var(--bad-soft); border-color: var(--bad-line); }
.delta.dn, .dchip.dn { color: var(--good); background: var(--good-soft); border-color: var(--good-line); }
.dchip.flat { color: var(--ink-3); background: var(--surface-3); border-color: var(--line); }
.dchip.none { color: var(--ink-4); background: transparent; }
.subhead { margin: 1.1rem 0 0.55rem; display: flex; flex-direction: column; gap: 0.1rem; }
.subhead b { font-size: 0.86rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--ink-2); }
details.fold > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 0.45rem; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::before { content: ''; width: 0.45rem; height: 0.45rem; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: rotate(-45deg); transition: transform 0.12s; flex: none; }
details.fold[open] > summary::before { transform: rotate(45deg); }
details.fold > summary h4 { display: inline; }
details.fold.sm summary { font-size: 0.78rem; color: var(--ink-3); margin-top: 0.6rem; font-weight: 600; }

.gate { position: fixed; inset: 0; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(22rem, 0.85fr); background: var(--gate-bg); z-index: 50; overflow: auto; }
.gate-art { position: relative; overflow: hidden; min-height: 100dvh; background: #0b0e14; }
.gate-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.gate-route-d { animation: dash 2.4s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -24; } }
.gate-copy { position: absolute; left: clamp(1.5rem, 5vw, 4rem); top: clamp(2rem, 9vh, 5.5rem); max-width: 28rem; }
.gate-copy h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1.12; font-weight: 700; letter-spacing: -0.025em; color: var(--ink); }
.gate-copy p { margin-top: 0.8rem; color: var(--ink-3); font-size: 0.9rem; max-width: 24rem; line-height: 1.45; }
.gate-panel { display: flex; flex-direction: column; justify-content: center; padding: clamp(1.2rem, 4vw, 3rem); background: var(--surface); border-left: 1px solid var(--line); position: relative; }
.gate-panel::before { content: ''; position: absolute; left: -1px; top: 0; bottom: 0; width: 3px; background: var(--brand); }
.gate-brand { display: flex; align-items: center; gap: 0.6rem; font-weight: 700; font-size: 1.1rem; letter-spacing: -0.01em; margin-bottom: 1.8rem; }
.gate-brand img, .brand-logo { height: 32px; width: auto; object-fit: contain; }
.gate-body { width: min(22rem, 100%); }
.gate-body h1 { font-size: 1.4rem; letter-spacing: -0.02em; }
.gate-body .lede { color: var(--ink-3); margin: 0.35rem 0 1.2rem; font-size: 0.86rem; }
.gate-body form { display: grid; gap: 0.8rem; }
.gate-body .btn.block { margin-top: 0.2rem; }
.gate-loading { display: flex; flex-direction: column; align-items: flex-start; gap: 0.75rem; color: var(--ink-2); }
.gate-foot { margin-top: 2rem; font-size: 0.76rem; color: var(--ink-4); max-width: 22rem; }

.app { display: grid; grid-template-rows: auto auto minmax(0, 1fr); height: 100dvh; background: var(--bg); }
.app > .top { display: flex; align-items: center; gap: 0.8rem; height: var(--top-h); padding: 0 0.85rem; background: var(--surface); border-bottom: 1px solid var(--line); position: relative; z-index: 40; }
.logo { display: flex; align-items: center; gap: 0.5rem; border: 0; background: none; padding: 0.15rem 0.35rem; border-radius: var(--r-s); font-weight: 700; font-size: 0.95rem; color: var(--ink); white-space: nowrap; }
.logo:hover { background: var(--surface-2); }
.logo img, .h-8 { height: 32px; width: auto; object-fit: contain; }
.tabs { display: flex; gap: 0.25rem; height: 100%; align-items: center; }
.tab { position: relative; display: inline-flex; align-items: center; gap: 0.35rem; height: 2rem; padding: 0 0.7rem; border: 1px solid transparent; border-radius: 3px; background: transparent; color: var(--ink-3); font-weight: 600; font-size: 0.8rem; white-space: nowrap; transition: background 0.12s, color 0.12s, border-color 0.12s; }
.tab:hover:not(.on) { background: var(--surface-2); color: var(--ink); border-color: var(--line); }
.tab.on { color: var(--brand-text); background: var(--brand-soft); border-color: var(--brand-line); }
.tab .ic { width: 1rem; height: 1rem; }
.top-r { margin-left: auto; display: flex; align-items: center; gap: 0.4rem; }
.sync { display: inline-flex; align-items: center; gap: 0.4rem; height: 1.85rem; padding: 0 0.55rem; border-radius: 3px; border: 1px solid var(--line); background: var(--bg); color: var(--ink-3); font-size: 0.74rem; font-weight: 600; font-family: var(--font-mono); }
.sync:hover { border-color: var(--line-2); color: var(--ink-2); }
.sync i { width: 0.45rem; height: 0.45rem; border-radius: 1px; background: var(--good); }
.sync[data-state=syncing] i { background: var(--info); animation: pulse 1s ease-in-out infinite; }
.sync[data-state=offline] i, .sync[data-state=error] i { background: var(--bad); }
.sync[data-state=paused] i { background: var(--ink-4); }
@keyframes pulse { 50% { opacity: 0.35; } }
.me { display: inline-flex; align-items: center; gap: 0.45rem; height: 2rem; padding: 0 0.5rem 0 0.25rem; border-radius: 3px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); transition: background 0.12s, border-color 0.12s; }
.me:hover { background: var(--surface-2); border-color: var(--line-2); }
.me .av { width: 1.55rem; height: 1.55rem; background: var(--surface-3); color: var(--brand-text); border: 1px solid var(--line); font-size: 0.68rem; }
.me-t { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.1; text-align: left; }
.me-t b { font-size: 0.78rem; color: var(--ink); } .me-t small { font-size: 0.68rem; color: var(--ink-4); text-transform: uppercase; font-family: var(--font-mono); }
.roadline { height: 1px; background: var(--line); position: relative; z-index: 39; }
.views { position: relative; min-height: 0; background: var(--bg); }
.view { position: absolute; inset: 0; overflow: auto; overscroll-behavior: contain; }
.view.v-map { overflow: hidden; display: grid; grid-template-columns: 340px minmax(0, 1fr); }

.page { max-width: 86rem; margin: 0 auto; padding: 1.1rem 1.1rem 3.5rem; }
.page-h { display: flex; justify-content: space-between; align-items: flex-end; gap: 0.8rem 1.2rem; flex-wrap: wrap; margin-bottom: 1rem; }
.page-h .sub { color: var(--ink-3); margin-top: 0.25rem; max-width: 44rem; font-size: 0.84rem; }
.page-act { display: flex; gap: 0.45rem; align-items: center; flex-wrap: wrap; }
.filterbar { display: flex; gap: 0.55rem; flex-wrap: wrap; align-items: flex-end; margin-bottom: 0.75rem; padding: 0.7rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh-1); }
.filterbar .field.sm { min-width: 8rem; flex: 0 1 10rem; }
.filterbar .field.sm .inp { height: 2rem; }
.filterbar .search-in .inp { height: 2rem; }
.filterbar > .btn { align-self: flex-end; }
.statline { display: flex; flex-wrap: wrap; gap: 0.35rem 1.1rem; margin: 0.65rem 0; font-size: 0.8rem; color: var(--ink-3); font-family: var(--font-mono); }
.statline b { color: var(--ink); font-family: var(--font-num); font-size: 0.92rem; font-weight: 650; }
.toolbar { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 0.85rem; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 0.95rem 1.1rem; box-shadow: var(--sh-1); margin-bottom: 0.85rem; min-width: 0; }
.card-h { display: flex; justify-content: space-between; align-items: center; gap: 0.65rem 0.85rem; flex-wrap: wrap; margin-bottom: 0.8rem; }
.card-h .muted { font-size: 0.78rem; }
.card-tools { display: flex; gap: 0.55rem; align-items: center; flex-wrap: wrap; }
.row-2 { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 0.85rem; align-items: start; margin-bottom: 0.85rem; }
.row-2 > .card { margin-bottom: 0; }
.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 0.65rem; margin-bottom: 0.85rem; }
.tile { display: flex; flex-direction: column; gap: 0.12rem; padding: 0.75rem 0.9rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh-1); min-width: 0; position: relative; overflow: hidden; }
.tile::before { content: ''; position: absolute; left: 0; top: 0.5rem; bottom: 0.5rem; width: 2px; background: var(--brand); }
.tile > small { font-size: 0.72rem; font-weight: 650; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.03em; font-family: var(--font-mono); }
.tile > b { font-size: 1.5rem; line-height: 1.15; font-weight: 700; color: var(--ink); font-family: var(--font-num); }
.tile > b i { font-style: normal; font-size: 0.8rem; color: var(--ink-3); margin-left: 0.3rem; font-family: var(--font-mono); font-weight: 500; }
.tile .sub { display: flex; gap: 0.45rem; align-items: center; font-size: 0.74rem; color: var(--ink-3); flex-wrap: wrap; margin-top: 0.1rem; }
.tile.flat { box-shadow: none; background: var(--surface-2); }
.tile.flat::before { display: none; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); gap: 0.55rem; margin-bottom: 0.85rem; }
.tiles .tile > b { font-size: 1.3rem; }
.sec-title { font-size: 0.84rem; margin: 0.95rem 0 0.5rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--ink-2); }
.fs-act { display: flex; align-items: center; gap: 0.65rem; flex-wrap: wrap; margin-top: 0.85rem; padding-top: 0.85rem; border-top: 1px solid var(--line); }
.fs-act .muted { font-size: 0.78rem; }
.pad { padding: 0.4rem 0.15rem; }

.legend { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.55rem; }
.legend .lg { display: inline-flex; align-items: center; gap: 0.35rem; height: 1.65rem; padding: 0 0.55rem; border-radius: 3px; border: 1px solid var(--line); background: var(--surface); font-size: 0.74rem; font-weight: 600; color: var(--ink-2); font-family: var(--font-mono); }
.legend .lg i { width: 0.65rem; height: 2px; border-radius: 1px; }
.legend .lg.off { opacity: 0.4; text-decoration: line-through; }
.legend .lg:hover { border-color: var(--line-2); }
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid line { stroke: var(--line); stroke-dasharray: 2 4; }
.chart .grid text, .chart .axis text { fill: var(--ink-4); font: 500 10px var(--font-num); }
.chart .cross { stroke: var(--ink-3); stroke-dasharray: 2 2; }
.chart .hit { cursor: crosshair; }
.chart .ln { transition: opacity 0.15s; }
.chart .pt { stroke: var(--surface); stroke-width: 1.5; }
.tip { position: absolute; z-index: 5; pointer-events: none; min-width: 8.5rem; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-s); box-shadow: var(--sh-2); padding: 0.45rem 0.55rem; font-size: 0.74rem; font-family: var(--font-mono); }
.tip > b { display: block; margin-bottom: 0.2rem; font-size: 0.76rem; }
.tip div { display: flex; align-items: center; gap: 0.35rem; padding: 0.05rem 0; }
.tip div i { width: 0.45rem; height: 0.45rem; border-radius: 1px; flex: none; }
.tip div span { flex: 1; color: var(--ink-2); }
.tip div b { font-family: var(--font-num); }
.movers .mv-g + .mv-g { margin-top: 0.75rem; }
.movers h4 { margin-bottom: 0.3rem; }
.movers ul { list-style: none; margin: 0; padding: 0; }
.movers li button { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 0.5rem; align-items: center; text-align: left; padding: 0.45rem 0.5rem; border: 0; border-radius: var(--r-s); background: transparent; }
.movers li button:hover { background: var(--surface-2); }
.mv-n { display: flex; flex-direction: column; min-width: 0; }
.mv-n b { font-size: 0.82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.mv-p { font: 500 0.78rem var(--font-num); color: var(--ink-3); white-space: nowrap; }
.brand-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 0.7rem; }
.bcard { border: 1px solid var(--line); border-radius: var(--r); padding: 0.75rem 0.85rem; background: var(--surface); }
.bcard header { display: flex; align-items: center; gap: 0.45rem; margin-bottom: 0.45rem; }
.bcard header b { font-size: 0.88rem; }
.bcard header .muted { margin-left: auto; font-size: 0.74rem; font-family: var(--font-mono); }
.bavg { font: 650 1.45rem/1.1 var(--font-num); display: flex; align-items: baseline; gap: 0.45rem; margin-bottom: 0.55rem; color: var(--ink); }
.bavg small { font: 500 0.74rem var(--font); color: var(--ink-3); }
.bper { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.35rem; }
.bper > div { display: flex; flex-direction: column; gap: 0.15rem; padding: 0.3rem 0.4rem; border-radius: var(--r-s); background: var(--surface-2); border: 1px solid var(--line); }
.bper > div.sel { background: var(--brand-soft); border-color: var(--brand-line); }
.bper small { font-size: 0.68rem; font-weight: 650; font-family: var(--font-mono); text-transform: uppercase; }
.matrix th, .matrix td { white-space: nowrap; }
.matrix td small.n { font-size: 0.68rem; font-family: var(--font-mono); }
.cmp-top { display: flex; align-items: flex-end; gap: 0.55rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.cmp-top .field { flex: 1 1 12rem; }
.cmp-arrow { display: grid; place-items: center; height: 1.85rem; color: var(--ink-3); }
.cmp-filters { display: flex; gap: 0.55rem; flex-wrap: wrap; align-items: flex-end; margin-bottom: 0.75rem; }
.cmp-filters .field { flex: 0 1 7.5rem; } .cmp-filters .field:first-child { flex: 1 1 12rem; } .cmp-filters .field:last-child { flex: 0 1 9.5rem; }
.cmp-sum { display: flex; gap: 1.2rem; flex-wrap: wrap; padding: 0.65rem 0.85rem; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 0.75rem; }
.cmp-sum > div { display: flex; flex-direction: column; } .cmp-sum b { font: 650 1.2rem var(--font-num); } .cmp-sum .empty { padding: 0.25rem; }
.cmp-tbl { max-height: 42dvh; }
.cmp .dlg-b { display: flex; flex-direction: column; }
.drop { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.35rem; padding: 1.6rem 1rem; border: 1px dashed var(--line-2); border-radius: var(--r); background: var(--surface-2); cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.drop:hover, .drop.over, .drop:focus-visible { border-color: var(--brand); background: var(--brand-soft); }
.drop small { max-width: 26rem; font-size: 0.74rem; color: var(--ink-3); }
.drop-ic { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 4px; background: var(--brand-soft); color: var(--brand-text); border: 1px solid var(--brand-line); }
.drop-ic .ic { width: 1.3rem; height: 1.3rem; }
.up-file { display: flex; align-items: center; gap: 0.65rem; padding: 0.6rem 0.75rem; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); margin-bottom: 0.75rem; }
.up-file > div { flex: 1; display: flex; flex-direction: column; min-width: 0; } .up-file b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.84rem; font-family: var(--font-mono); }
.up-stats { display: grid; gap: 0.45rem; margin-bottom: 0.75rem; }
.up-stats > div { display: flex; align-items: center; gap: 0.75rem; padding: 0.6rem 0.75rem; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); }
.up-stats b { font: 700 1.35rem var(--font-num); min-width: 3rem; text-align: right; }
.up-stats span { display: flex; flex-direction: column; font-size: 0.82rem; }
.up-stats .ok { background: var(--good-soft); border-color: var(--good-line); } .up-stats .ok b { color: var(--good); }
.up-stats .info { background: var(--info-soft); border-color: var(--info-line); } .up-stats .info b { color: var(--info); }
.up-stats .mute b { color: var(--ink-3); }
.success { text-align: center; padding: 0.4rem 0; }
.success h3 { margin: 0.65rem 0 0.15rem; font-size: 1.05rem; }
.success .tiles { margin-top: 0.95rem; text-align: left; }
.ok-ic { display: grid; place-items: center; width: 3rem; height: 3rem; margin: 0 auto; border-radius: 4px; background: var(--good-soft); color: var(--good); border: 1px solid var(--good-line); }
.ok-ic .ic { width: 1.5rem; height: 1.5rem; stroke-width: 2.2; }

.lock { display: inline-flex; align-items: center; gap: 0.4rem; height: 2.15rem; padding: 0 0.75rem; border-radius: var(--r-s); border: 1px solid var(--good-line); background: var(--good-soft); color: var(--good); font-weight: 650; font-size: 0.78rem; font-family: var(--font-mono); }
.lock.closed { border-color: var(--warn-line); background: var(--warn-soft); color: var(--warn); }
.hero { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 0; margin-bottom: 0.85rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh-1); overflow: hidden; position: relative; }
.hero::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--brand); }
.hero-main { padding: 1rem 1.2rem 1rem 1.6rem; display: flex; flex-direction: column; gap: 0.12rem; }
.hero-main > small { font-weight: 650; text-transform: uppercase; letter-spacing: 0.03em; font-family: var(--font-mono); color: var(--ink-3); }
.hero-main > b { font-size: clamp(1.8rem, 4vw, 2.7rem); line-height: 1.05; font-weight: 700; color: var(--ink); font-family: var(--font-num); }
.hero-sub { display: flex; gap: 0.95rem; flex-wrap: wrap; font-size: 0.8rem; color: var(--ink-3); margin-top: 0.25rem; font-family: var(--font-mono); }
.hero-sub b { font-family: var(--font-num); font-size: 0.88rem; color: var(--ink); }
.hero-side { display: grid; grid-template-columns: repeat(3, 1fr); border-left: 1px solid var(--line); background: var(--surface-2); }
.hero-side > div { padding: 1rem 0.9rem; display: flex; flex-direction: column; gap: 0.15rem; justify-content: center; }
.hero-side > div + div { border-left: 1px solid var(--line); }
.hero-side b { font-size: 1.3rem; font-family: var(--font-num); }
.hero-side small { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--ink-3); font-family: var(--font-mono); }
.reps { display: grid; grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr)); gap: 0.55rem; margin-bottom: 0.85rem; }
.rep { position: relative; display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: 'a n v' 'b b s'; gap: 0.3rem 0.55rem; align-items: center; padding: 0.6rem 0.75rem; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); text-align: left; box-shadow: var(--sh-1); transition: border-color 0.12s, box-shadow 0.12s; }
.rep:hover { border-color: var(--line-2); box-shadow: var(--sh-2); }
.rep.on { border-color: var(--brand); box-shadow: var(--ring); }
.rep .av { grid-area: a; } .rep-n { grid-area: n; display: flex; flex-direction: column; min-width: 0; } .rep-n b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 0.84rem; }
.rep-v { grid-area: v; font-size: 1rem; font-family: var(--font-num); }
.rep-bar { grid-area: b; height: 3px; border-radius: 2px; background: var(--surface-3); overflow: hidden; }
.rep-bar i { display: block; height: 100%; border-radius: 2px; background: var(--good); }
.rep-sh { grid-area: s; font: 600 0.7rem var(--font-num); color: var(--ink-3); }
.rep-x { position: absolute; top: 0.25rem; right: 0.25rem; width: 1.3rem; height: 1.3rem; display: none; place-items: center; border-radius: 2px; color: var(--ink-3); }
.rep:hover .rep-x { display: grid; } .rep-x:hover { background: var(--bad-soft); color: var(--bad); }
.rep.add { grid-template-columns: auto; grid-template-areas: none; justify-content: center; align-content: center; border-style: dashed; color: var(--brand-text); background: transparent; box-shadow: none; min-height: 3.5rem; display: flex; gap: 0.45rem; align-items: center; font-size: 0.82rem; }
.rep.add:hover { background: var(--brand-soft); border-color: var(--brand-line); }
.res { display: inline-flex; align-items: center; gap: 0.35rem; font: 700 0.88rem var(--font-num); white-space: nowrap; }
.res i { height: 4px; border-radius: 1px; background: currentColor; opacity: 0.5; display: inline-block; }
.res.win { color: var(--good); } .res.loss { color: var(--bad); } .res.wait { color: var(--warn); font-family: var(--font-mono); font-size: 0.74rem; font-weight: 650; background: var(--warn-soft); padding: 0.1rem 0.4rem; border-radius: 2px; border: 1px solid var(--warn-line); }
.route-chip { display: inline-flex; align-items: center; gap: 0.15rem; font: 700 0.78rem var(--font-num); background: var(--surface-2); border: 1px solid var(--line); border-radius: 3px; padding: 0.1rem 0.3rem; }
.route-chip .ic { width: 0.85em; height: 0.85em; color: var(--ink-4); }
.route-chip .ic, .cmp-arrow .ic, .pop-near > .ic { transform: rotate(-90deg); }
.lk { color: var(--warn); vertical-align: -0.1em; }
.selbar { position: fixed; z-index: 60; left: 50%; bottom: 1rem; transform: translateX(-50%); display: flex; align-items: center; gap: 0.85rem; padding: 0.5rem 0.8rem; background: #121824; color: #f1f6fa; border-radius: var(--r); box-shadow: var(--sh-3); max-width: calc(100vw - 2rem); flex-wrap: wrap; border: 1px solid var(--line-2); font-family: var(--font-mono); font-size: 0.8rem; }
.selbar small { color: #94a3b8; display: block; font-size: 0.68rem; } .selbar .sb-s b { font-size: 0.92rem; font-family: var(--font-num); }
.selbar .btn.ghost { color: #cbd5e1; border-color: var(--line-2); } .selbar .btn.ghost:hover { background: var(--surface-2); color: #fff; }
.selbar .icon-btn { color: #cbd5e1; } .selbar .icon-btn:hover { background: var(--surface-2); color: #fff; }
.selbar .good { color: #10b981; } .selbar .bad { color: #ef4444; }
.tx fieldset { border: 1px solid var(--line); border-radius: var(--r); padding: 0.75rem 0.85rem; margin: 0 0 0.85rem; display: grid; gap: 0.65rem; background: var(--surface); }
.tx legend { font-size: 0.76rem; font-weight: 750; padding: 0 0.35rem; margin-left: -0.35rem; color: var(--ink); text-transform: uppercase; letter-spacing: 0.03em; font-family: var(--font-mono); }
.tx legend small { font-weight: 400; color: var(--ink-3); text-transform: none; }
.tx .field { margin: 0; }
.tx .preview { display: flex; gap: 1.1rem; align-items: center; padding: 0.75rem 0.85rem; border-radius: var(--r); margin-bottom: 0.85rem; border: 1px solid var(--line); background: var(--surface-2); }
.tx .preview > div { display: flex; flex-direction: column; } .tx .preview b { font-size: 1.15rem; font-family: var(--font-num); }
.tx .preview.wait { color: var(--ink-3); gap: 0.6rem; } .tx .preview.wait b { font-size: 0.86rem; color: var(--ink-2); font-family: var(--font-mono); } .tx .preview.wait small { display: block; font-size: 0.72rem; }
.tx .preview.win { background: var(--good-soft); border-color: var(--good-line); } .tx .preview.win .res b { color: var(--good); }
.tx .preview.loss { background: var(--bad-soft); border-color: var(--bad-line); } .tx .preview.loss .res b { color: var(--bad); }
.tx .preview .res { margin-left: auto; text-align: right; display: flex; flex-direction: column; align-items: flex-end; }
.tx .inp-act.btn { position: absolute; right: 0.25rem; }
.tx .hint { margin: 0; }

.mapwrap { position: relative; min-width: 0; min-height: 0; background: #0f172a; }
.map { position: absolute; inset: 0; background: #0f172a; }
.leaflet-container { font-family: var(--font); background: #0f172a; outline: none; }
.leaflet-container.picking, .leaflet-container.picking .leaflet-interactive { cursor: crosshair !important; }
.tiles-night .leaflet-tile-pane { filter: invert(1) hue-rotate(188deg) brightness(.88) contrast(.92) saturate(.55); }
.leaflet-control-attribution { background: rgba(18, 24, 36, 0.85) !important; color: #64748b !important; font-size: 9px !important; padding: 2px 6px !important; border-radius: 2px 0 0 0; border-top: 1px solid #1e2638; border-left: 1px solid #1e2638; backdrop-filter: blur(4px); font-family: var(--font-mono); }
.leaflet-control-attribution a { color: #94a3b8 !important; }
.leaflet-control-container .leaflet-control-zoom { display: none; }
.leaflet-bottom.leaflet-right { z-index: 450; }
.leaflet-tooltip { background: #121824; color: #f1f5f9; border: 1px solid #1e2638; border-radius: 3px; font-size: 11px; box-shadow: var(--sh-2); font-family: var(--font-mono); }

.map-top { position: absolute; z-index: 600; top: 0.75rem; left: 0.75rem; right: 4.2rem; display: flex; flex-direction: column; gap: 0.45rem; align-items: flex-start; pointer-events: none; }
.map-top > * { pointer-events: auto; }
.msearch { position: relative; display: flex; align-items: center; gap: 0.45rem; width: min(24rem, 100%); height: 2.35rem; padding: 0 0.45rem 0 0.75rem; background: #121824; border: 1px solid #1e2638; border-radius: 4px; box-shadow: var(--sh-2); transition: border-color 0.12s; }
.msearch:focus-within { border-color: var(--brand); }
.msearch > .ic { color: #64748b; width: 1rem; height: 1rem; }
.msearch input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background-color: transparent; color: #f1f5f9; -webkit-text-fill-color: #f1f5f9; caret-color: var(--brand); font-size: 0.84rem; padding: 0; appearance: none; -webkit-appearance: none; font-family: var(--font); }
.msearch input::placeholder { color: #64748b; -webkit-text-fill-color: #64748b; opacity: 1; }
.msearch input:-webkit-autofill { -webkit-box-shadow: 0 0 0 40px #121824 inset; -webkit-text-fill-color: #f1f5f9; }
.msearch .sugg { top: calc(100% + 4px); }
.map-top .chips { max-width: 100%; }
.map-ctl { position: absolute; z-index: 600; top: 0.75rem; right: 0.75rem; display: flex; flex-direction: column; gap: 0.45rem; }
.ctl-stack { display: flex; flex-direction: column; background: #121824; border: 1px solid #1e2638; border-radius: 4px; box-shadow: var(--sh-2); overflow: hidden; }
.ctl-stack .ctl + .ctl { border-top: 1px solid #1e2638; }
.ctl { width: 2.2rem; height: 2.2rem; display: grid; place-items: center; border: 0; background: #121824; color: #94a3b8; transition: background 0.12s, color 0.12s; }
.ctl:hover { background: #1e2638; color: #f1f5f9; }
.ctl.solo { border: 1px solid #1e2638; border-radius: 4px; box-shadow: var(--sh-2); }
.ctl[aria-expanded=true] { background: var(--brand-soft); color: var(--brand-text); border-color: var(--brand-line); }
.ctl-pop-wrap { position: relative; }
.style-pop { position: absolute; right: calc(100% + 0.45rem); top: 0; width: 15rem; padding: 0.6rem; background: #121824; border: 1px solid #1e2638; border-radius: 4px; box-shadow: var(--sh-3); }
.sp-h { font-size: 0.7rem; font-weight: 750; letter-spacing: 0.04em; text-transform: uppercase; color: #64748b; margin: 0 0.15rem 0.45rem; font-family: var(--font-mono); }
.sp-g { display: grid; grid-template-columns: 1fr 1fr; gap: 0.35rem; }
.sp-i { display: flex; flex-direction: column; align-items: stretch; gap: 0.25rem; padding: 0.3rem; border: 1px solid #1e2638; border-radius: 3px; background: #0b0e14; text-align: left; transition: border-color 0.12s, background 0.12s; }
.sp-i:hover { border-color: #334155; }
.sp-i.on { border-color: var(--brand); background: var(--brand-soft); }
.sp-sw { height: 2.1rem; border-radius: 2px; border: 1px solid rgba(255, 255, 255, 0.06); }
.sp-i b { font-size: 0.76rem; padding: 0 0.1rem; color: #f1f5f9; } .sp-i small { padding: 0 0.1rem; margin-top: -0.2rem; font-size: 0.68rem; color: #64748b; }
.map-legend { position: absolute; z-index: 560; left: 0.75rem; bottom: 1.2rem; padding: 0.45rem 0.65rem; background: rgba(18, 24, 36, 0.9); border: 1px solid #1e2638; border-radius: 4px; box-shadow: var(--sh-2); font-size: 0.72rem; backdrop-filter: blur(6px); font-family: var(--font-mono); }
.lg-t { font-weight: 700; color: #94a3b8; margin-bottom: 0.25rem; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.04em; }
.lg-r { display: flex; align-items: center; gap: 0.45rem; line-height: 1.5; }
.lg-r i { width: 1.1rem; height: 0.45rem; border-radius: 1px; flex: none; }
.lg-r i.t-g { background: var(--tier-g); } .lg-r i.t-y { background: var(--tier-y); } .lg-r i.t-r { background: var(--tier-r); }
.lg-r small { color: #64748b; font-family: var(--font-num); font-size: 0.72rem; }
.map-count { position: absolute; z-index: 560; right: 0.75rem; bottom: 1.2rem; padding: 0.3rem 0.6rem; border-radius: 3px; background: rgba(18, 24, 36, 0.9); border: 1px solid #1e2638; box-shadow: var(--sh-1); font-size: 0.74rem; color: #94a3b8; backdrop-filter: blur(6px); font-family: var(--font-mono); }
.map-count b { color: #f1f5f9; font-family: var(--font-num); }
.map-count span { color: #64748b; }
.map-banner { position: absolute; z-index: 700; left: 50%; bottom: 3.5rem; transform: translateX(-50%); display: flex; gap: 0.5rem; align-items: center; max-width: min(30rem, calc(100% - 1.5rem)); padding: 0.5rem 0.75rem; background: rgba(245, 158, 11, 0.12); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); border-radius: 3px; box-shadow: var(--sh-2); font-size: 0.78rem; font-family: var(--font-mono); }
.map-banner > .ic { color: #f59e0b; } .map-banner > span { flex: 1; }

.fo-mk { background: none !important; border: 0 !important; overflow: visible; }
.fo-pin {
  position: absolute;
  left: 0;
  top: 0;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  padding: 2px 5px;
  border-radius: 2px;
  background: #121824;
  color: #cbd5e1;
  border: 1px solid #1e2638;
  white-space: nowrap;
  transform: translate(-50%, -100%);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.55);
  cursor: pointer;
  transition: transform 0.1s ease, border-color 0.1s;
}
.fo-pin::before, .fo-pin::after { display: none; }
.fo-pin .st-code, .fo-pin .pin-code {
  color: #64748b;
  font-size: 9px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border-right: 1px solid #1e2638;
  padding-right: 3px;
  margin-right: 1px;
}
.fo-pin .pr, .fo-pin .pin-price {
  font-family: var(--font-num);
  font-weight: 700;
  letter-spacing: 0;
}
.fo-pin.t-g {
  border-color: rgba(16, 185, 129, 0.45);
  background: #091a18;
  color: #10b981;
}
.fo-pin.t-g .pr, .fo-pin.t-g .pin-price { color: #34d399; }
.fo-pin.t-y {
  border-color: rgba(245, 158, 11, 0.45);
  background: #1a160c;
  color: #f59e0b;
}
.fo-pin.t-y .pr, .fo-pin.t-y .pin-price { color: #fbbf24; }
.fo-pin.t-r {
  border-color: rgba(239, 68, 68, 0.45);
  background: #1c0f12;
  color: #ef4444;
}
.fo-pin.t-r .pr, .fo-pin.t-r .pin-price { color: #f87171; }
.fo-pin.is-stop {
  border-color: #38bdf8;
  box-shadow: 0 0 0 1px #38bdf8, 0 3px 8px rgba(0, 0, 0, 0.7);
  background: #0f172a;
}
.fo-pin.is-plan {
  border-color: #f59e0b;
  box-shadow: 0 0 0 1px #f59e0b, 0 3px 8px rgba(0, 0, 0, 0.7);
  background: #1c1507;
}
.fo-pin .bd, .fo-pin .pin-badge {
  display: inline-grid;
  place-items: center;
  min-width: 14px;
  height: 14px;
  padding: 0 2px;
  border-radius: 2px;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
}
.fo-pin .bd.st, .fo-pin .pin-badge.st { background: #38bdf8; color: #0b0e14; }
.fo-pin .bd.pl, .fo-pin .pin-badge.pl { background: #f59e0b; color: #0b0e14; }
.fo-pin .ccs { display: inline-flex; gap: 2px; margin-left: 1px; }
.fo-pin .cc { display: inline-grid; place-items: center; min-width: 12px; height: 12px; padding: 0 2px; border-radius: 1px; background: var(--c); color: #fff; font: 700 8px/1 var(--font-mono); font-style: normal; }
.fo-pin:hover {
  transform: translate(-50%, -100%) scale(1.08);
  border-color: #38bdf8;
  z-index: 9999;
}
.leaflet-marker-icon:hover { z-index: 9999 !important; }

.fo-wp { position: absolute; left: -1rem; top: -2.3rem; width: 2rem; height: 2rem; --wc: var(--surface-3); cursor: grab; }
.fo-wp::before { content: ''; position: absolute; inset: 0; border-radius: 3px; transform: rotate(45deg); background: var(--wc); border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6); }
.fo-wp span { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font: 800 0.85rem var(--font-mono); }
.fo-wp.k-a { --wc: var(--good); } .fo-wp.k-b { --wc: var(--bad); }
.leaflet-dragging .fo-wp { cursor: grabbing; }
.place-pin { position: absolute; left: -12px; top: -32px; width: 24px; height: 32px; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6)); }
.place-pin path { fill: var(--brand); stroke: #121824; stroke-width: 2; } .place-pin circle { fill: #121824; }
.me-dot { position: absolute; left: -7px; top: -7px; width: 14px; height: 14px; border-radius: 2px; background: #38bdf8; border: 2px solid #fff; box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.5), 0 1px 3px rgba(0, 0, 0, 0.5); animation: me-pulse 2.2s ease-out infinite; }
@keyframes me-pulse { 70% { box-shadow: 0 0 0 10px rgba(56, 189, 248, 0), 0 1px 3px rgba(0, 0, 0, 0.5); } 100% { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0), 0 1px 3px rgba(0, 0, 0, 0.5); } }
path.me-acc { fill: #38bdf8; fill-opacity: 0.1; stroke: #38bdf8; stroke-opacity: 0.35; }

path.route-casing { stroke: #0b0e14; stroke-opacity: 1; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6)); }
path.route-body { stroke: #38bdf8; stroke-opacity: 1; cursor: copy; }
path.route-body:hover { stroke: #7dd3fc; }
path.route-alt { stroke: #475569; stroke-opacity: 0.95; cursor: pointer; }
path.route-alt:hover { stroke: #64748b; }
path.route-approx { stroke-dasharray: 2 10; stroke-linecap: round; }
path.route-range { stroke: #f59e0b; stroke-opacity: 0.85; fill: none; }
path.range-circle { stroke: #d97706; fill: #f59e0b; fill-opacity: 0.12; stroke-dasharray: 6 6; }
path.range-origin { fill: #0b0e14; fill-opacity: 1; stroke: #fff; stroke-width: 2; }
.rt-lbl { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; line-height: 1.1; padding: 0.2rem 0.5rem; border-radius: 3px; background: #121824; color: #f1f5f9; border: 1px solid #1e2638; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5); white-space: nowrap; cursor: pointer; font-family: var(--font-mono); }
.rt-lbl b { font: 700 0.85rem var(--font-num); } .rt-lbl small { font-size: 0.68rem; color: #94a3b8; }
.rt-lbl.on { background: #38bdf8; color: #0b0e14; border-color: #fff; cursor: default; }
.rt-lbl.on small { color: #0b0e14; opacity: 0.85; }

.fo-pop .leaflet-popup-content-wrapper {
  background: #121824;
  color: #f1f5f9;
  border-radius: 3px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.75);
  border: 1px solid #1e2638;
  padding: 0;
}
.fo-pop .leaflet-popup-content { margin: 0; width: auto !important; min-width: 15rem; }
.fo-pop .leaflet-popup-tip { background: #121824; border: 1px solid #1e2638; box-shadow: none; }
.fo-pop a.leaflet-popup-close-button {
  top: 5px;
  right: 5px;
  width: 18px;
  height: 18px;
  font: 400 13px/18px var(--font-mono);
  color: #64748b;
  border-radius: 2px;
  padding: 0;
  text-align: center;
}
.fo-pop a.leaflet-popup-close-button:hover { background: #1e2638; color: #f1f5f9; }
.pop { padding: 10px; font-size: 11px; }
.pop-h { display: grid; grid-template-columns: 1fr auto; grid-template-areas: 'b b' 't p'; gap: 5px 8px; align-items: end; padding-right: 16px; }
.pop-brand { grid-area: b; justify-self: start; display: inline-flex; align-items: center; gap: 4px; font-size: 9px; font-weight: 700; letter-spacing: 0.04em; color: #cbd5e1; background: #161f30; border: 1px solid #1e2638; padding: 2px 5px; border-radius: 2px; text-transform: uppercase; font-family: var(--font-mono); }
.pop-brand::before { content: ''; width: 5px; height: 5px; border-radius: 1px; background: var(--b); }
.pop-title { grid-area: t; display: flex; flex-direction: column; min-width: 0; }
.pop-title b { font-size: 12px; line-height: 1.25; font-weight: 700; color: #f8fafc; }
.pop-title small { margin-top: 1px; color: #64748b; font-size: 10px; font-family: var(--font-mono); }
.pop-price { grid-area: p; text-align: right; line-height: 1; }
.pop-price span { font: 700 16px var(--font-num); color: #f8fafc; }
.pop-price small { display: block; margin-top: 1px; font-size: 9px; color: #64748b; text-transform: uppercase; font-family: var(--font-mono); }
.pop-price.t-g span { color: #10b981; }
.pop-price.t-y span { color: #f59e0b; }
.pop-price.t-r span { color: #ef4444; }
.pop-addr { display: flex; justify-content: space-between; align-items: center; gap: 6px; width: 100%; margin-top: 8px; padding: 5px 7px; border-radius: 2px; border: 1px solid #1e2638; background: #0b0e14; text-align: left; color: #94a3b8; font-size: 10px; line-height: 1.3; }
.pop-addr:hover { border-color: #10b981; background: rgba(16, 185, 129, 0.08); }
.pop-addr em { display: inline-flex; gap: 2px; align-items: center; color: #10b981; font-weight: 600; font-size: 9px; flex: none; text-transform: uppercase; font-family: var(--font-mono); }
.pop-exit { display: flex; gap: 5px; align-items: center; margin-top: 5px; color: #94a3b8; font-size: 10px; font-family: var(--font-mono); }
.pop-cards { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 3px; }
.pop-nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 8px; }
.pop-nums > div { padding: 4px 6px; border-radius: 2px; background: #0b0e14; border: 1px solid #1e2638; }
.pop-nums small { font-size: 8px; color: #64748b; text-transform: uppercase; display: block; font-family: var(--font-mono); }
.pop-nums b { font: 700 12px var(--font-num); color: #cbd5e1; }
.pop-nums b.good { color: #10b981; }
.pop-nums b.brand { color: #38bdf8; }
.pop-chg { display: flex; gap: 5px; align-items: center; margin-top: 6px; padding: 4px 6px; border-radius: 2px; font-size: 10px; font-family: var(--font-mono); }
.pop-chg.up { background: rgba(239, 68, 68, 0.12); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.25); }
.pop-chg.dn { background: rgba(16, 185, 129, 0.12); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.25); }
.pop-upd { margin-top: 5px; font-size: 9px; color: #64748b; font-family: var(--font-mono); }
.pop-act { display: flex; gap: 5px; margin-top: 8px; align-items: center; }
.pop-act .btn { height: 26px; font-size: 10px; padding: 0 8px; border-radius: 2px; }
.pop-act .btn.primary { flex: 1; }
.pop-near { display: grid; grid-template-columns: auto 1fr auto; gap: 0.55rem; align-items: center; width: 100%; margin-top: 0.6rem; padding: 0.45rem 0.6rem; border: 1px solid #1e2638; border-radius: 2px; background: #0b0e14; text-align: left; }
.pop-near:hover { background: rgba(16, 185, 129, 0.08); border-color: var(--brand-line); }
.pop-near > span:first-child { font: 700 1.15rem var(--font-num); } .pop-near > span:nth-child(2) { display: flex; flex-direction: column; font-size: 0.8rem; }
.pop-near .t-g { color: var(--tier-g); } .pop-near .t-y { color: var(--tier-y); } .pop-near .t-r { color: var(--tier-r); }
.fo-pop.sm .leaflet-popup-content { min-width: 0; }
.pop-mini { display: flex; align-items: center; gap: 0.65rem; padding: 0.5rem 0.6rem 0.5rem 0.75rem; }

/* Fleet Truck Pin Markers */
.fo-truck-pin {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #0f172a;
  color: #f8fafc;
  border: 1.5px solid #38bdf8;
  border-radius: 999px;
  padding: 3px 8px 3px 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(56, 189, 248, 0.3);
  transform: translate(-50%, -50%);
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  z-index: 3600;
}
.fo-truck-pin:hover {
  transform: translate(-50%, -50%) scale(1.12);
  border-color: #67e8f9;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.8), 0 0 12px rgba(56, 189, 248, 0.6);
  z-index: 9999 !important;
}

.dock { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--surface); border-right: 1px solid var(--line); position: relative; z-index: 20; box-shadow: 2px 0 8px rgba(0, 0, 0, 0.4); width: 340px; }
.dock-grip { display: none; }
.planner { padding: 0.75rem 0.8rem 0.7rem; background: var(--surface); border-bottom: 1px solid var(--line); position: relative; flex: none; }
.pl-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.6rem; gap: 0.4rem; }
.pl-h h3 { display: flex; align-items: center; gap: 0.45rem; font-size: 0.86rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--ink-2); font-family: var(--font-mono); }
.pl-h h3 .ic { color: var(--brand-text); width: 1rem; height: 1rem; }
.pl-tools { display: flex; gap: 0.2rem; }
.stops { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.35rem; }
.stop { display: grid; grid-template-columns: 1rem 1.65rem minmax(0, 1fr) 1.8rem; gap: 0.3rem; align-items: start; position: relative; background: var(--surface); }
.stop:not(:last-child)::before { content: ''; position: absolute; left: calc(1rem + 0.3rem + 0.825rem - 1px); top: calc(0.25rem + 1.65rem + 2px); bottom: calc(-0.35rem - 0.25rem + 2px); border-left: 1px dashed var(--line-2); }
.stop-grip { border: 0; background: none; color: var(--ink-4); cursor: grab; height: 2.15rem; padding: 0; display: grid; place-items: center; touch-action: none; }
.stop-grip:hover { color: var(--ink-2); }
.stop-pt { position: relative; display: grid; place-items: center; width: 1.65rem; height: 1.65rem; margin-top: 0.25rem; border-radius: 2px; color: #fff; font: 700 0.76rem var(--font-mono); background: var(--surface-3); border: 1px solid var(--line-2); z-index: 1; }
.stop-pt.k-a { background: var(--good); color: #022c22; border-color: var(--good); }
.stop-pt.k-b { background: var(--bad); color: #fff; border-color: var(--bad); }
.stop-pt.k-v { background: var(--surface-3); color: var(--ink-2); }
.stop-pt.fuel { border-color: var(--sign); box-shadow: 0 0 0 1px var(--sign); }
.stop-pt.xs { width: 1.3rem; height: 1.3rem; margin: 0; font-size: 0.68rem; box-shadow: none; }
.stop-f { position: relative; min-width: 0; }
.stop-f .inp { padding-right: 1.9rem; font-size: 0.82rem; height: 2.15rem; }
.stop-f.bad .inp { border-color: var(--bad); }
.stop-x { position: absolute; right: 0.25rem; top: 0.25rem; }
.stop-sub { display: flex; gap: 0.35rem; align-items: baseline; margin: 0.2rem 0.1rem 0; font-size: 0.72rem; color: var(--ink-3); font-family: var(--font-mono); }
.stop-sub span { font: 700 0.8rem var(--font-num); }
.stop-sub .t-g { color: var(--tier-g); } .stop-sub .t-y { color: var(--tier-y); } .stop-sub .t-r { color: var(--tier-r); }
.stop-sub.err { color: var(--bad); }
.stop > .icon-btn, .stop-sp { margin-top: 0.2rem; }
.stop .sugg { top: calc(2.15rem + 3px); }
.pl-opts { display: flex; gap: 0.45rem; align-items: flex-end; margin-top: 0.65rem; flex-wrap: wrap; padding-left: 1.3rem; }
.pl-opts > .btn { margin-right: auto; }
.mini { display: flex; flex-direction: column; gap: 0.15rem; font-size: 0.68rem; font-weight: 650; color: var(--ink-3); text-transform: uppercase; font-family: var(--font-mono); }
.mini .inp.sm { width: auto; min-width: 4.8rem; max-width: 7rem; height: 1.85rem; font-size: 0.76rem; }
.mini .inp.num { width: 3.8rem; min-width: 0; }
.pl-bar { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; overflow: hidden; opacity: 0; transition: opacity 0.2s; }
.planner[data-busy=true] .pl-bar { opacity: 1; }
.pl-bar::after { content: ''; position: absolute; inset: 0; width: 40%; background: linear-gradient(90deg, transparent, var(--brand), transparent); animation: bar 1.1s ease-in-out infinite; }
@keyframes bar { from { transform: translateX(-100%); } to { transform: translateX(260%); } }

.dock-tabs { display: flex; padding: 0 0.4rem; background: var(--surface); border-bottom: 1px solid var(--line); flex: none; }
.dtab { position: relative; flex: 1; height: 2.15rem; border: 0; background: transparent; font-weight: 650; font-size: 0.78rem; color: var(--ink-3); transition: color 0.12s; text-transform: uppercase; letter-spacing: 0.03em; font-family: var(--font-mono); }
.dtab:hover { color: var(--ink); }
.dtab.on { color: var(--brand-text); }
.dtab.on::after { content: ''; position: absolute; left: 0.6rem; right: 0.6rem; bottom: -1px; height: 2px; background: var(--brand); }
.dock-body { flex: 1; min-height: 0; overflow: auto; background: var(--bg); padding: 0.75rem 0.8rem 2rem; overscroll-behavior: contain; }

.trip-hero { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.5rem; margin-bottom: 0.7rem; }
.trip-hero > div:first-child { display: flex; flex-direction: column; }
.trip-hero .big { font: 700 1.65rem/1 var(--font-num); letter-spacing: 0; color: var(--ink); }
.trip-hero small { margin-top: 0.2rem; font-size: 0.76rem; color: var(--ink-3); font-family: var(--font-mono); }
.alts { display: grid; grid-template-columns: repeat(auto-fit, minmax(5.5rem, 1fr)); gap: 0.35rem; margin-bottom: 0.75rem; }
.alt { display: flex; flex-direction: column; align-items: flex-start; gap: 0.05rem; padding: 0.45rem 0.55rem; border-radius: 3px; border: 1px solid var(--line); background: var(--surface); text-align: left; transition: border-color 0.12s; }
.alt:hover { border-color: var(--line-2); }
.alt.on { border-color: var(--route); background: rgba(56, 189, 248, 0.08); }
.alt b { font: 700 0.95rem var(--font-num); color: var(--ink); } .alt small { font-size: 0.7rem; color: var(--ink-3); } .alt em { font-size: 0.68rem; font-weight: 700; color: var(--good); margin-top: 0.1rem; font-family: var(--font-mono); }
.alt.on em { color: var(--route); }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.35rem; }
.kpi { display: flex; flex-direction: column; padding: 0.5rem 0.55rem; border: 1px solid var(--line); border-radius: 3px; background: var(--surface); min-width: 0; }
.kpi small { font-size: 0.68rem; font-weight: 650; text-transform: uppercase; letter-spacing: 0.03em; color: var(--ink-3); font-family: var(--font-mono); }
.kpi b { font: 700 1.15rem/1.15 var(--font-num); color: var(--ink); }
.kpi b i { font: 500 0.68rem var(--font-mono); color: var(--ink-3); margin-left: 0.2rem; }
.kpi em { font-size: 0.68rem; color: var(--ink-3); font-family: var(--font-mono); }
.kpi.good { background: var(--good-soft); border-color: var(--good-line); } .kpi.good b { color: var(--good); }
.legs { margin-top: 0.85rem; background: var(--surface); border: 1px solid var(--line); border-radius: 3px; padding: 0.2rem 0.65rem 0.25rem; }
.legs h4 { padding: 0.5rem 0 0.1rem; font-size: 0.74rem; }
.leg { display: grid; grid-template-columns: auto 1fr auto auto; gap: 0.5rem; align-items: center; padding: 0.45rem 0; border-bottom: 1px solid var(--line); font-size: 0.78rem; font-family: var(--font-mono); }
.leg:last-child { border-bottom: 0; }
.lg-pts { display: flex; align-items: center; gap: 0.25rem; } .lg-pts i { width: 0.75rem; height: 0; border-top: 1px dashed var(--line-2); }
.lg-d { display: flex; flex-direction: column; } .lg-d b { font: 700 0.86rem var(--font-num); color: var(--ink); } .lg-d small { font-size: 0.68rem; color: var(--ink-3); }
.lg-g { font: 600 0.8rem var(--font-num); color: var(--ink-2); }
.leg.total { font-weight: 700; } .leg.total > span:first-child { padding-left: 0.1rem; }
.trip-act { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.85rem; }
.trip-empty { padding-top: 1rem; }
.trip-empty h4 { font-size: 0.95rem; }
.tips { list-style: none; padding: 0; margin: 0.5rem 0 0; display: grid; gap: 0.45rem; text-align: left; width: 100%; }
.tips li { display: flex; gap: 0.5rem; align-items: flex-start; font-size: 0.78rem; color: var(--ink-2); padding: 0.45rem 0.6rem; border-radius: 3px; background: var(--surface); border: 1px solid var(--line); }
.tips li .ic { color: var(--brand-text); margin-top: 0.1em; width: 0.95rem; height: 0.95rem; }
.stop-pt + .tips { margin-top: 0; }

.grp { margin-bottom: 1rem; }
.grp > h4, .grp-h h4 { margin-bottom: 0.45rem; font-size: 0.74rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; font-family: var(--font-mono); }
.grp-h { display: flex; justify-content: space-between; align-items: center; }
.grp .row2, .grp .row3 { margin-top: 0.4rem; }
.grp .field.sm .inp { height: 1.95rem; font-size: 0.78rem; }
.grp .chips { gap: 0.3rem; }
.grp .seg { flex-wrap: wrap; }
.grp .switch { padding: 0.25rem 0; }
.grp.fold { background: var(--surface); border: 1px solid var(--line); border-radius: 3px; padding: 0.6rem 0.7rem; }
.grp.fold[open] > summary { margin-bottom: 0.6rem; }
.plan-sum { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.3rem; margin-bottom: 0.65rem; }
.plan-sum > div { padding: 0.4rem 0.45rem; border-radius: 2px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; }
.plan-sum small { font-size: 0.64rem; text-transform: uppercase; color: var(--ink-3); font-family: var(--font-mono); }
.plan-sum b { font: 700 0.95rem var(--font-num); color: var(--ink); }
.plan-sum b i { font: 500 0.62rem var(--font-mono); margin-left: 0.1rem; color: var(--ink-3); }
.plan-sum .good { background: var(--good-soft); border-color: var(--good-line); } .plan-sum .good b { color: var(--good); }
.plan { list-style: none; margin: 0 0 0.65rem; padding: 0; display: grid; gap: 0.35rem; }
.plan-r { width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0.55rem; align-items: center; text-align: left; padding: 0.5rem 0.65rem; border-radius: 3px; border: 1px solid var(--line); background: var(--surface); transition: border-color 0.12s; }
.plan-r:hover { border-color: var(--brand-line); }
.plan-r.best { border-color: var(--brand-line); background: rgba(16, 185, 129, 0.08); }
.plan-r > b.num { display: grid; place-items: center; width: 1.45rem; height: 1.45rem; border-radius: 2px; background: var(--sign); color: var(--sign-ink); font: 800 0.78rem var(--font-mono); }
.plan-t { display: flex; flex-direction: column; gap: 0.08rem; min-width: 0; }
.plan-t strong { font-size: 0.82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.plan-t small { font-size: 0.72rem; line-height: 1.25; color: var(--ink-3); }
.plan-t small b { color: var(--ink); font-family: var(--font-num); }
.plan-t .why { color: var(--brand-text); font-weight: 550; font-family: var(--font-mono); }
.plan-t .why em { color: var(--warn); }
.plan-p { font: 700 1.05rem var(--font-num); }
.plan-p.t-g { color: var(--tier-g); } .plan-p.t-y { color: var(--tier-y); } .plan-p.t-r { color: var(--tier-r); }
.plan-act { display: flex; gap: 0.35rem; flex-wrap: wrap; margin-bottom: 0.55rem; }
.notice.ok { background: var(--good-soft); border-color: var(--good-line); } .notice.ok > .ic { color: var(--good); }
.cfo-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.35rem; margin: 0.65rem 0 0.45rem; }
.cfo-sum > div { padding: 0.45rem 0.5rem; border-radius: 2px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; }
.cfo-sum small { font-size: 0.65rem; text-transform: uppercase; color: var(--ink-3); font-family: var(--font-mono); }
.cfo-sum b { font: 700 1rem var(--font-num); color: var(--ink); }
.cfo-sum em { font-size: 0.65rem; color: var(--ink-3); font-family: var(--font-mono); }
.cfo-sum .good { background: var(--good-soft); border-color: var(--good-line); } .cfo-sum .good b { color: var(--good); }
.cfo-sum .bad { background: var(--bad-soft); border-color: var(--bad-line); } .cfo-sum .bad b { color: var(--bad); }
#cfoOut h5 { margin: 0.75rem 0 0.4rem; font-size: 0.74rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.03em; font-family: var(--font-mono); }
.calc-out { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.35rem; margin: 0.55rem 0; }
.calc-out > div { padding: 0.45rem 0.5rem; border-radius: 2px; background: var(--surface-2); border: 1px solid var(--line); display: flex; flex-direction: column; }
.calc-out small { font-size: 0.65rem; color: var(--ink-3); text-transform: uppercase; font-family: var(--font-mono); }
.calc-out b { font: 700 0.95rem var(--font-num); color: var(--ink); }

.drawer.settings .dlg-b { background: var(--bg); padding: 0.85rem 1rem 1.8rem; }
.set-list { display: flex; flex-direction: column; gap: 0.55rem; }
.sec { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh-1); overflow: hidden; }
.sec.open { border-color: var(--line-2); }
.sec-h { display: flex; align-items: stretch; }
.sec-t { flex: 1; min-width: 0; display: flex; align-items: center; gap: 0.65rem; padding: 0.75rem 0.5rem 0.75rem 0.8rem; border: 0; background: none; text-align: left; border-radius: 0; }
.sec-t:hover { background: var(--surface-2); }
.sec-ic { flex: none; display: grid; place-items: center; width: 1.85rem; height: 1.85rem; border-radius: 3px; background: var(--brand-soft); color: var(--brand-text); border: 1px solid var(--brand-line); }
.sec-n { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sec-n b { font-size: 0.86rem; font-family: var(--font-mono); } .sec-n small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 0.74rem; color: var(--ink-3); }
.sec-chev { color: var(--ink-3); transition: transform 0.2s var(--ease); transform: rotate(-90deg); }
.sec.open .sec-chev { transform: none; }
.sec-grip { flex: none; width: 2.1rem; border: 0; background: none; color: var(--ink-4); cursor: grab; display: grid; place-items: center; touch-action: none; }
.sec-grip:hover { color: var(--ink-2); background: var(--surface-2); }
.sec-b { padding: 0.2rem 0.85rem 0.95rem; border-top: 1px solid var(--line); }
.sec-b > *:first-child { margin-top: 0.75rem; }
.sec-intro { color: var(--ink-3); font-size: 0.8rem; line-height: 1.45; margin-bottom: 0.75rem; }
.sec-load { display: flex; align-items: center; gap: 0.5rem; color: var(--ink-3); padding: 0.5rem 0; font-size: 0.78rem; font-family: var(--font-mono); }
.acct { display: flex; gap: 0.75rem; align-items: center; margin-bottom: 0.7rem; }
.acct > div { display: flex; flex-direction: column; gap: 0.1rem; align-items: flex-start; } .acct b { font-size: 0.95rem; }
.role-tag { margin-top: 0.25rem; padding: 0.08rem 0.45rem; border-radius: 2px; font-size: 0.68rem; font-weight: 750; background: var(--surface-3); color: var(--ink-2); font-family: var(--font-mono); text-transform: uppercase; border: 1px solid var(--line); }
.role-tag.r-admin { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border-color: rgba(245, 158, 11, 0.3); }
.role-tag.r-editor { background: var(--brand-soft); color: var(--brand-text); border-color: var(--brand-line); }
.set-row { display: flex; justify-content: space-between; align-items: center; gap: 0.65rem 1rem; flex-wrap: wrap; padding: 0.75rem 0; border-bottom: 1px solid var(--line); }
.set-row:first-child { padding-top: 0; }
.set-l { display: flex; flex-direction: column; min-width: 9rem; flex: 1 1 11rem; } .set-l b { font-size: 0.84rem; }
.swatches { display: flex; gap: 0.35rem; flex-wrap: wrap; align-items: center; }
.sw { position: relative; width: 1.6rem; height: 1.6rem; border-radius: 2px; border: 1px solid var(--line-2); background: var(--c); display: grid; place-items: center; color: #fff; padding: 0; cursor: pointer; }
.sw:hover { border-color: var(--brand); }
.sw .ic { width: 0.85rem; height: 0.85rem; stroke-width: 3; opacity: 0; }
.sw.on { border-color: #fff; } .sw.on .ic { opacity: 1; }
.sw.custom { background: conic-gradient(#ef4444, #f59e0b, #10b981, #06b6d4, #3b82f6, #8b5cf6, #ef4444); color: #fff; }
.sw.custom .ic { opacity: 1; filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.6)); }
.sw.custom.on { background: var(--c); }
.sw.custom input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; padding: 0; border: 0; }
.range { display: flex; align-items: center; gap: 0.6rem; width: 12rem; max-width: 100%; }
.range output { font: 650 0.8rem var(--font-num); min-width: 2.4rem; text-align: right; color: var(--ink-2); }
.pin-demo { display: flex; gap: 1.2rem; justify-content: center; align-items: flex-end; padding: 1.2rem 0.5rem 1rem; margin: 0.3rem 0 0.2rem; border-radius: var(--r); background: #0b0e14; border: 1px solid var(--line); overflow: hidden; }
.dm-pin { --pc: var(--tier-y); position: relative; display: flex; align-items: center; gap: 3px; font: 700 11px/1 var(--font-num); padding: 2px 6px; border-radius: 2px; background: #121824; color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.4); margin-bottom: 0.4em; }
.dm-pin.lo { color: #10b981; border-color: rgba(16, 185, 129, 0.4); background: #091a18; }
.dm-pin.hi { color: #ef4444; border-color: rgba(239, 68, 68, 0.4); background: #1c0f12; }
.dm-bd { display: inline-grid; place-items: center; min-width: 14px; height: 14px; margin: 0; border-radius: 2px; background: #38bdf8; color: #0b0e14; font: 800 9px var(--font-mono); }
.cards-grid { display: grid; gap: 0.65rem; }
.cardbox { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); overflow: hidden; border-left: 3px solid var(--cc); }
.cb-h { display: flex; align-items: center; gap: 0.65rem; padding: 0.6rem 0.65rem 0.6rem 0.75rem; }
.cb-n { flex: 1; min-width: 0; display: flex; flex-direction: column; } .cb-n b { font-size: 0.88rem; }
.rules { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: 0.35rem; padding: 0 0.65rem 0.7rem 0.75rem; }
.rule { display: flex; align-items: center; justify-content: space-between; gap: 0.45rem; min-height: 2.15rem; padding: 0.3rem 0.5rem; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--surface); transition: border-color 0.12s, background 0.12s; }
.rule.on { border-color: color-mix(in oklab, var(--cc) 55%, var(--line)); background: color-mix(in oklab, var(--cc) 8%, var(--surface)); }
.rule .check { font-weight: 600; font-size: 0.8rem; }
.gal { display: flex; align-items: center; gap: 0.3rem; font-size: 0.68rem; color: var(--ink-3); font-family: var(--font-mono); } .gal .inp { width: 4rem; height: 1.75rem; font-size: 0.74rem; }
.chips-list { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; }
.chip-x { display: inline-flex; align-items: center; gap: 0.15rem; height: 1.75rem; padding: 0 0.3rem 0 0.55rem; border-radius: 2px; background: var(--surface); border: 1px solid var(--line); font-size: 0.76rem; font-weight: 600; font-family: var(--font-mono); }
.chip-x:not(:has(button)) { padding-right: 0.55rem; }
.chip-x button { display: grid; place-items: center; width: 1.25rem; height: 1.25rem; border: 0; border-radius: 2px; background: transparent; color: var(--ink-3); }
.chip-x button:hover { background: var(--bad-soft); color: var(--bad); } .chip-x button .ic { width: 0.75rem; height: 0.75rem; stroke-width: 2.2; }
.add-row { display: flex; gap: 0.45rem; margin-top: 0.65rem; } .add-row .inp { flex: 1; }
.fleet-blk { padding: 0.75rem 0 0.85rem; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 0.55rem; }
.fleet-blk:first-of-type { border-top: 0; padding-top: 0; }
.fleet-blk > header { display: flex; align-items: center; gap: 0.45rem; }
.fleet-blk .count { padding: 0.05rem 0.4rem; border-radius: 2px; background: var(--surface-3); font: 650 0.74rem var(--font-num); color: var(--ink-2); }
.fleet-blk .add-row { margin: 0; }
.ulist { display: flex; flex-direction: column; gap: 0.45rem; }
.urow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto auto; gap: 0.55rem; align-items: center; padding: 0.5rem 0.6rem; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); }
.urow.off { opacity: 0.55; }
.u-main { display: flex; flex-direction: column; min-width: 0; } .u-main b { font-size: 0.84rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .u-main small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 0.72rem; color: var(--ink-3); font-family: var(--font-mono); }
.u-role { width: 7.5rem; }
.u-st { display: flex; flex-direction: column; align-items: flex-end; gap: 0.1rem; } .u-st small { font-size: 0.68rem; color: var(--ink-4); font-family: var(--font-mono); }
.you { display: inline-block; margin-left: 0.25rem; padding: 0 0.35rem; border-radius: 2px; background: var(--brand-soft); color: var(--brand-text); font-size: 0.62rem; font-weight: 750; vertical-align: 0.1em; border: 1px solid var(--brand-line); font-family: var(--font-mono); }
.menu-list { display: flex; flex-direction: column; gap: 0.2rem; margin: -0.35rem -0.35rem; }
.menu-i { display: flex; align-items: center; gap: 0.6rem; padding: 0.6rem 0.65rem; border: 0; border-radius: var(--r-s); background: none; text-align: left; font-weight: 600; color: var(--ink); font-size: 0.82rem; }
.menu-i:hover { background: var(--surface-3); } .menu-i.danger { color: var(--bad); } .menu-i.danger:hover { background: var(--bad-soft); }
.roles { display: grid; gap: 0.4rem; }
.rolecard { display: flex; flex-direction: column; gap: 0.1rem; text-align: left; padding: 0.55rem 0.7rem; border-radius: var(--r-s); border: 1px solid var(--line); background: var(--surface); }
.rolecard:hover { border-color: var(--line-2); } .rolecard.on { border-color: var(--brand); background: var(--brand-soft); }
.rolecard b { font-size: 0.84rem; font-family: var(--font-mono); }
.pw-form { display: grid; gap: 0.7rem; max-width: 20rem; } .pw-form .subhead { margin: 0 0 0.1rem; }
.slist { display: flex; flex-direction: column; gap: 0.35rem; }
.sess { display: flex; gap: 0.65rem; align-items: center; padding: 0.55rem 0.65rem; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); }
.sess.cur { border-color: var(--brand-line); background: var(--brand-soft); }
.sess > div { flex: 1; display: flex; flex-direction: column; min-width: 0; } .sess b { font-size: 0.82rem; font-family: var(--font-mono); }
.sess-ic { display: grid; place-items: center; width: 1.85rem; height: 1.85rem; border-radius: 2px; background: var(--surface-3); color: var(--ink-2); border: 1px solid var(--line); }
.alist { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; max-height: 25rem; overflow-y: auto; }
.arow { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr) auto; gap: 0.65rem; padding: 0.45rem 0.7rem; border-bottom: 1px solid var(--line); font-size: 0.78rem; align-items: start; background: var(--surface-2); font-family: var(--font-mono); }
.arow:last-child { border-bottom: 0; } .arow time { color: var(--ink-4); font: 500 0.74rem var(--font-num); padding-top: 0.1rem; }
.arow > div { display: flex; flex-direction: column; min-width: 0; } .arow small { word-break: break-word; color: var(--ink-3); }
.a-who { text-align: right; display: flex; flex-direction: column; font-size: 0.74rem; max-width: 10rem; word-break: break-all; color: var(--ink-3); }
.data-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 0.65rem; }
.data-card { display: flex; flex-direction: column; align-items: flex-start; gap: 0.35rem; padding: 0.85rem; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); }
.data-card > .ic { width: 1.3rem; height: 1.3rem; color: var(--brand-text); } .data-card .btn { margin-top: auto; }
.cd-prev { display: flex; align-items: center; gap: 0.6rem; padding: 0.6rem; border-radius: var(--r); background: var(--surface-2); border: 1px dashed var(--line-2); font-weight: 650; font-family: var(--font-mono); font-size: 0.8rem; }

@media (max-width: 1180px) {
  .view.v-map { grid-template-columns: 320px minmax(0, 1fr); }
  .me-t { display: none; } .me { padding: 0 0.35rem; }
  .plan-sum { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1000px) {
  .row-2 { grid-template-columns: 1fr; } .row-2 > .card + .card { margin-top: 0.85rem; }
  .hero { grid-template-columns: 1fr; } .hero-side { border-left: 0; border-top: 1px solid var(--line); } .hero-side > div:first-child { padding-left: 1.1rem; }
  .tab span { display: none; } .tab { padding: 0 0.65rem; } .tab .ic { width: 1.1em; height: 1.1em; }
  .tab.on span { display: inline; }
}
@media (max-width: 860px) {
  .gate { grid-template-columns: 1fr; } .gate-art { display: none; }
  .gate-panel { justify-content: flex-start; padding-top: 10dvh; } .gate-panel::before, .gate-panel::after { display: none; }
  .view.v-map { display: block; }
  .mapwrap { position: absolute; inset: 0; }
  .dock { position: absolute; left: 0; right: 0; bottom: 0; z-index: 650; width: 100%; height: var(--dh, 52%); border-right: 0; border-top: 1px solid var(--line-2); border-radius: 4px 4px 0 0; box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.6); transition: height 0.24s var(--ease); }
  .dock[data-snap=min] { --dh: 7.5rem; } .dock[data-snap=mid] { --dh: 52%; } .dock[data-snap=full] { --dh: calc(100% - 0.75rem); }
  .dock-grip { display: grid; place-items: center; width: 100%; height: 1.25rem; border: 0; background: none; flex: none; cursor: pointer; }
  .dock-grip i { width: 2.2rem; height: 3px; border-radius: 2px; background: var(--line-2); }
  .planner { padding-top: 0.2rem; } .dock[data-snap=min] .planner { overflow: hidden; }
  .map-top { right: 3.8rem; } .map-legend, .map-count { display: none; }
  .map-banner { bottom: auto; top: 5.5rem; }
  .page { padding: 0.9rem 0.85rem 2.5rem; }
  .filterbar .field.sm { flex: 1 1 7.5rem; }
  .urow { grid-template-columns: auto minmax(0, 1fr) auto; } .urow .u-role { grid-column: 2; width: 100%; } .urow .u-st { grid-column: 2; align-items: flex-start; flex-direction: row; gap: 0.45rem; align-items: center; }
  .urow > .icon-btn { grid-column: 3; grid-row: 1; }
  .arow { grid-template-columns: 1fr; gap: 0.1rem; } .a-who { text-align: left; max-width: none; }
}
@media (max-width: 700px) {
  :root { --nav-h: 3.2rem; }
  .app { padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); }
  .app > .top { gap: 0.45rem; padding: 0 0.5rem; } .logo .wm { display: none; }
  .logo { padding: 0; }
  .tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 900; height: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding: 0.25rem 0.35rem calc(0.25rem + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.2rem; box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.4); }
  .tab { flex-direction: column; justify-content: center; gap: 0.1rem; height: auto; padding: 0.15rem; font-size: 0.65rem; border-radius: 3px; font-family: var(--font-mono); }
  .tab span, .tab.on span { display: block; line-height: 1.1; text-align: center; }
  .tab.on::after { display: none; }
  .tab .ic { width: 1.2rem; height: 1.2rem; }
  .sync span { display: none; } .sync { padding: 0 0.45rem; }
  .toasts { bottom: calc(var(--nav-h) + 0.65rem); }
  .selbar { bottom: calc(var(--nav-h) + 0.65rem); }
  .msearch { height: 2.3rem; }
  .dialog { max-height: 94dvh; } .back { padding: 0.45rem; }
  .dlg-b { padding: 0.85rem 0.85rem 0.95rem; } .dlg-h { padding-left: 0.85rem; } .dlg-f { padding: 0.65rem 0.85rem; } .dlg-f.in-body { margin: 0.95rem -0.85rem -0.95rem; }
  .g2, .row2 { grid-template-columns: 1fr; } .row3 { grid-template-columns: repeat(3, 1fr); }
  .hero-side { grid-template-columns: 1fr 1fr 1fr; } .hero-side > div { padding: 0.75rem 0.55rem; } .hero-side b { font-size: 1.1rem; } .hero-side > div:first-child { padding-left: 1rem; }
  .kpis { grid-template-columns: 1fr 1fr 1fr; } .kpi b { font-size: 0.98rem; }
  .tbl { font-size: 0.78rem; } .tbl td, .tbl th { padding-left: 0.5rem; padding-right: 0.5rem; }
  .page-h h1 { font-size: 1.15rem; }
  .gate-body h1 { font-size: 1.3rem; }
}
@media (max-height: 520px) and (min-width: 861px) { .planner { padding-top: 0.5rem; } }
@media print { .app > .top, .roadline, .dock, .map-ctl, .map-top, .toasts, .selbar { display: none !important; } body { overflow: visible; } .view { position: static; } }
