:root {
  --bg: #0B1D2A;
  --surface: #12293A;
  --surface-2: #0E2333;
  --surface-3: #1F3B50;
  --line: #24435A;
  --text: #EAF2F5;
  --text-2: #C4D4DE;
  --muted: #9DB3C1;
  --faint: #6E899B;
  --major: #F2B33D;
  --minor: #4FA3D1;
  --low: #2A4558;
  --ok: #8FD9C4;
  --warn: #F28C3D;
  --ink: #1A1405;
  --radius: 18px;
  --tabbar: 72px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --display: 'Barlow Condensed', 'Arial Narrow', system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font-family: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
#app { max-width: 480px; margin: 0 auto; min-height: 100vh; position: relative; }
#view { outline: none; }
a { color: var(--minor); }
button, input, select, textarea { font: inherit; color: inherit; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.sm svg, svg.sm { width: 15px; height: 15px; stroke-width: 2.2; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.page { padding: calc(20px + var(--safe-t)) 20px calc(var(--tabbar) + var(--safe-b) + 28px); display: flex; flex-direction: column; gap: 16px; }

/* Header */
.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.eyebrow { font-size: 13px; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; }
h1, .h1 { margin: 0; font-size: 24px; font-weight: 700; line-height: 1.15; }
.spot-btn { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-size: 22px; font-weight: 700; min-height: 44px; }
.spot-btn .pin-ico { color: var(--major); width: 18px; height: 18px; }
.spot-btn .chev { color: var(--muted); width: 16px; height: 16px; }
.icon-btn { all: unset; cursor: pointer; width: 44px; height: 44px; border-radius: 22px; background: var(--surface); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.icon-btn:focus-visible, .btn:focus-visible, .chip-btn:focus-visible, .tabs button:focus-visible { outline: 2px solid var(--minor); outline-offset: 2px; }
.icon-btn svg { width: 20px; height: 20px; }
.back { display: flex; align-items: center; gap: 10px; }

/* Cards */
.card { background: var(--surface); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.card.hl { box-shadow: inset 0 0 0 1.5px var(--major); }
.card.okring { box-shadow: inset 0 0 0 1.5px var(--ok); }
.card-label { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; color: var(--muted); text-transform: uppercase; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.big-time { font-family: var(--display); font-size: 44px; font-weight: 700; line-height: 1; }
.big-time.md { font-size: 30px; }
.foot { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 10px; }

/* Chips */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 5px 10px; border-radius: 999px; white-space: nowrap; }
.chip-major { background: var(--major); color: var(--ink); }
.chip-minor { background: var(--minor); color: var(--bg); }
.chip-ok { background: rgba(143, 217, 196, 0.14); color: var(--ok); }
.chip-warn { background: rgba(242, 140, 61, 0.14); color: var(--warn); }
.chip-bad { background: rgba(157, 179, 193, 0.14); color: var(--muted); }
.chip-light { background: var(--text); color: var(--bg); }
.chip-dark { background: var(--surface); color: var(--text); font-weight: 500; }
.card .chip-dark { background: var(--surface-3); }
.chip-btn { all: unset; cursor: pointer; display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border-radius: 999px; font-size: 13px; font-weight: 500; background: var(--surface); color: var(--text); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3); }
.chip-btn[aria-pressed="true"] { background: var(--text); color: var(--bg); font-weight: 600; }
.rating-Great { color: var(--major); } .rating-Good { color: var(--minor); } .rating-Fair, .rating-Poor { color: var(--muted); }
.chip.r-Great { background: var(--major); color: var(--ink); }
.chip.r-Good { background: var(--minor); color: var(--bg); }
.chip.r-Fair { background: var(--surface-3); color: var(--text); }
.chip.r-Poor { background: var(--surface-3); color: var(--muted); }

/* Timeline */
.section-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.section-h h2 { margin: 0; font-size: 15px; font-weight: 600; }
.legend { display: flex; gap: 10px; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 4px; }
.sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.sw.major { background: var(--major); } .sw.minor { background: var(--minor); } .sw.low { background: var(--low); }
.timeline { position: relative; height: 30px; margin-top: 22px; }
.tl-track { position: absolute; inset: 0; background: var(--low); border-radius: 8px; overflow: hidden; }
.tl-win { position: absolute; top: 0; bottom: 0; border-radius: 4px; }
.tl-win.major { background: var(--major); } .tl-win.minor { background: var(--minor); }
.tl-win.past { opacity: 0.4; }
.tl-sun { position: absolute; top: 0; bottom: 0; width: 2px; background: rgba(234, 242, 245, 0.35); }
.tl-now { position: absolute; top: -8px; bottom: -8px; width: 2px; background: var(--text); border-radius: 1px; }
.tl-now span { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); font-size: 11px; font-weight: 700; }
.tl-labels { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 6px; }

/* Window rows */
.wins { display: flex; flex-direction: column; gap: 8px; }
.win { background: var(--surface); border-radius: 16px; padding: 12px 14px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.win.best { box-shadow: inset 0 0 0 1.5px var(--major); }
.win.past { opacity: 0.5; }
.win-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.win-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tag { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 5px; letter-spacing: 0.03em; }
.tag.major { background: var(--major); color: var(--ink); } .tag.minor { background: var(--minor); color: var(--bg); }
.win-time { font-family: var(--display); font-size: 20px; font-weight: 600; }
.win-meta { font-size: 13px; color: var(--muted); }
.verdict { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.verdict.ok { color: var(--ok); } .verdict.warn { color: var(--warn); } .verdict.bad { color: var(--muted); } .verdict.na { color: var(--faint); font-weight: 500; }
.link-btn { all: unset; cursor: pointer; font-size: 13px; color: var(--muted); min-height: 32px; display: inline-flex; align-items: center; }
.link-btn:hover { color: var(--text); }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stats.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stat { background: var(--surface-2); border-radius: 12px; padding: 9px 10px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.card > .stats .stat { background: var(--surface-2); }
.page > .stats .stat { background: var(--surface); }
.stat-label { font-size: 11px; color: var(--muted); }
.stat-value { font-family: var(--display); font-size: 19px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-sub { font-size: 11px; color: var(--muted); }
.stat svg { width: 18px; height: 18px; color: var(--muted); }

/* Buttons */
.btn { all: unset; cursor: pointer; box-sizing: border-box; min-height: 48px; padding: 0 16px; border-radius: 14px; font-weight: 600; font-size: 15px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-align: center; text-decoration: none; }
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--major); color: var(--ink); font-weight: 700; }
.btn-secondary { background: var(--surface-3); color: var(--text); }
.btn-danger { background: transparent; color: var(--warn); box-shadow: inset 0 0 0 1.5px rgba(242, 140, 61, 0.5); }
.btn-row { display: flex; gap: 10px; }
.btn-row > .btn { flex: 1; }
.btn-col { display: flex; flex-direction: column; gap: 10px; }

/* Banner */
.banner { display: flex; align-items: center; gap: 10px; justify-content: space-between; background: rgba(242, 140, 61, 0.12); color: var(--warn); border-radius: 14px; padding: 10px 14px; font-size: 13px; font-weight: 600; }
.muted-line { font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; align-items: center; gap: 8px; }

/* Week */
.days { display: flex; flex-direction: column; gap: 6px; }
.day-row { all: unset; cursor: pointer; box-sizing: border-box; background: var(--surface); border-radius: 14px; padding: 10px 14px; display: grid; grid-template-columns: 50px 66px minmax(0, 1fr) 16px; align-items: center; gap: 10px; }
.day-row:focus-visible { outline: 2px solid var(--minor); }
.day-name { font-size: 15px; font-weight: 700; display: block; }
.day-date { font-size: 12px; color: var(--muted); }
.segs { display: flex; gap: 3px; margin-bottom: 4px; }
.segs i { width: 13px; height: 6px; border-radius: 2px; background: var(--low); }
.day-times { font-family: var(--display); font-size: 16px; font-weight: 600; display: block; }
.day-note { font-size: 12px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.day-note.ok { color: var(--ok); } .day-note.warn { color: var(--warn); } .day-note.na { color: var(--faint); }
.day-row .chev { width: 16px; height: 16px; color: var(--faint); }

/* Bars */
.bars { display: flex; align-items: flex-end; gap: 3px; height: 84px; }
.bars i { flex: 1; border-radius: 3px; background: var(--low); min-height: 6px; }
.bars i.major { background: var(--major); } .bars i.minor { background: var(--minor); }
.bars i.now { box-shadow: 0 0 0 2px var(--text); }
.bars i.wx-bad { opacity: 0.32; }
.bars i.wx-warn { opacity: 0.7; }
.why { display: flex; gap: 10px; align-items: flex-start; border-radius: 14px; padding: 12px 14px; font-size: 14px; line-height: 1.4; }
.why svg { margin-top: 2px; }
.why.ok { background: rgba(143, 217, 196, 0.12); color: var(--ok); }
.why.warn { background: rgba(242, 140, 61, 0.12); color: #F6B07A; }
.why.na { background: var(--surface); color: var(--muted); }
.why b { font-weight: 700; }
.bar-labels { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }
.wind-chips { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.wind-chip { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; border-radius: 8px; background: var(--surface-2); }
.wind-chip b { font-size: 13px; font-weight: 600; }
.wind-chip span { font-size: 11px; color: var(--muted); }
.dot { width: 7px; height: 7px; border-radius: 4px; display: inline-block; }
.dot.ok { background: var(--ok); } .dot.warn { background: var(--warn); } .dot.bad { background: var(--faint); } .dot.na { background: var(--low); }

/* Spot hero */
.spot-hero { margin: calc(-20px - var(--safe-t)) -20px 0; padding: calc(20px + var(--safe-t)) 16px 18px; background: repeating-linear-gradient(135deg, #12293A 0 14px, #163042 14px 28px); display: flex; justify-content: space-between; align-items: flex-start; min-height: 120px; }
.spot-hero .icon-btn { background: rgba(11, 29, 42, 0.85); }
textarea { width: 100%; min-height: 90px; resize: vertical; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; color: var(--text); }
textarea:focus, input:focus, select:focus { outline: 2px solid var(--minor); outline-offset: 1px; }

/* Tabs + rules */
.tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; background: var(--surface); border-radius: 12px; padding: 4px; }
.tabs button { all: unset; cursor: pointer; height: 38px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; color: var(--muted); }
.tabs button[aria-selected="true"] { background: var(--text); color: var(--bg); }
.search { display: flex; align-items: center; gap: 10px; background: var(--surface); border-radius: 14px; padding: 0 14px; height: 46px; }
.search svg { width: 18px; height: 18px; color: var(--muted); }
.search input { flex: 1; background: transparent; border: 0; color: var(--text); font-size: 15px; outline: none; min-width: 0; }
.combined { background: var(--major); color: var(--ink); border-radius: 14px; padding: 12px 14px; display: flex; align-items: center; gap: 12px; }
.combined b { font-family: var(--display); font-size: 34px; line-height: 1; }
.combined span { font-size: 13px; font-weight: 600; line-height: 1.35; }
.rhead, .rrow { display: grid; grid-template-columns: minmax(0, 1fr) 72px 56px; align-items: center; padding: 9px 12px; }
.rhead { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); padding-top: 0; padding-bottom: 0; }
.rtable { background: var(--surface); border-radius: 14px; overflow: hidden; }
.rrow + .rrow { border-top: 1px solid #1A3549; }
.rname { font-size: 14px; font-weight: 600; display: block; }
.rnote { font-size: 11px; color: var(--muted); display: block; }
.rsize { font-size: 14px; } .rsize.none { color: var(--faint); }
.rlimit { font-family: var(--display); font-size: 18px; font-weight: 600; text-align: right; }
.rhead span:last-child { text-align: right; }
.bullets { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-2); margin: 0; padding-left: 18px; }
.notice { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--line); padding-top: 14px; font-size: 12px; color: var(--muted); }
.notice .warn-line { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--warn); }
.empty { text-align: center; color: var(--muted); padding: 24px 12px; font-size: 14px; }

/* Log */
.log-day { font-size: 13px; color: var(--muted); font-weight: 600; margin: 4px 2px 0; }
.log-item { background: var(--surface); border-radius: 14px; padding: 12px 14px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.log-item .lt { font-size: 15px; font-weight: 600; }
.log-item .lm { font-size: 12px; color: var(--muted); }
.kept { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 5px; background: var(--surface-3); color: var(--text); }
.kept.yes { background: var(--ok); color: var(--bg); }

/* Forms + dialog */
dialog { border: 0; padding: 0; background: var(--surface); color: var(--text); border-radius: 22px; width: min(440px, calc(100vw - 24px)); max-height: calc(100vh - 48px); overflow: auto; }
dialog::backdrop { background: rgba(4, 12, 18, 0.7); }
.dlg { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.dlg h2 { margin: 0; font-size: 20px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .field .lbl { font-size: 13px; color: var(--muted); font-weight: 600; }
.field input, .field select { height: 46px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; color: var(--text); width: 100%; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; background: var(--surface-2); border-radius: 12px; padding: 4px; }
.seg label { display: flex; align-items: center; justify-content: center; height: 38px; border-radius: 9px; font-weight: 600; cursor: pointer; color: var(--muted); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg input:checked + span { color: var(--bg); }
.seg label:has(input:checked) { background: var(--text); color: var(--bg); }
.seg label:has(input:focus-visible) { outline: 2px solid var(--minor); }
.hint { font-size: 13px; border-radius: 10px; padding: 8px 12px; }
.hint.warn { background: rgba(242, 140, 61, 0.14); color: var(--warn); }
.hint.ok { background: rgba(143, 217, 196, 0.12); color: var(--ok); }
.spot-list { display: flex; flex-direction: column; gap: 4px; max-height: 50vh; overflow: auto; }
.spot-opt { all: unset; cursor: pointer; display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); }
.spot-opt[aria-current="true"] { box-shadow: inset 0 0 0 1.5px var(--major); }
.spot-opt small { color: var(--muted); font-size: 12px; }

/* Tab bar */
.tabbar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; height: calc(var(--tabbar) + var(--safe-b)); padding-bottom: var(--safe-b); background: var(--surface-2); border-top: 1px solid #1F3B50; display: flex; justify-content: space-around; align-items: center; z-index: 900; }
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 58px; min-height: 48px; text-decoration: none; color: var(--muted); font-size: 11.5px; font-weight: 500; }
.tabbar a[aria-current="page"] { color: var(--major); font-weight: 600; }

/* Map */
#map-view { position: fixed; top: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; bottom: calc(var(--tabbar) + var(--safe-b)); background: #0C2433; }
#map { position: absolute; inset: 0; background: #0C2433; }
.leaflet-container { font-family: inherit; background: #0C2433; }
.tiles-dark { filter: invert(1) hue-rotate(185deg) brightness(0.82) contrast(0.92) saturate(0.6); }
.leaflet-control-attribution { background: rgba(11, 29, 42, 0.75) !important; color: var(--muted) !important; font-size: 10px; }
.leaflet-control-attribution a { color: var(--text-2) !important; }
.map-top { position: absolute; top: calc(14px + var(--safe-t)); left: 12px; right: 12px; z-index: 800; }
.map-top .chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
.map-tools { position: absolute; right: 12px; top: calc(70px + var(--safe-t)); z-index: 800; display: flex; flex-direction: column; gap: 8px; }
.map-tools .icon-btn { border-radius: 12px; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35); }
.map-tools .icon-btn[aria-pressed="true"] { background: var(--major); color: var(--ink); }
.map-hint { position: absolute; left: 50%; top: calc(70px + var(--safe-t)); transform: translateX(-50%); z-index: 800; background: var(--major); color: var(--ink); font-weight: 700; font-size: 13px; padding: 8px 14px; border-radius: 999px; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 850; background: var(--surface); border-radius: 22px 22px 0 0; padding: 10px 18px 16px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.4); }
.sheet .grab { width: 40px; height: 4px; border-radius: 2px; background: #2E4E65; align-self: center; }
.pin { display: flex; flex-direction: column; align-items: center; gap: 2px; transform: translate(-50%, -9px); width: max-content; }
.pin-dot { width: 18px; height: 18px; border-radius: 9px; border: 3px solid var(--bg); background: var(--faint); }
.pin-label { font-size: 11px; font-weight: 600; color: var(--text); background: rgba(11, 29, 42, 0.85); padding: 1px 6px; border-radius: 4px; white-space: nowrap; }
.pin.r-Great .pin-dot { background: var(--major); } .pin.r-Good .pin-dot { background: var(--minor); }
.pin.sel .pin-dot { width: 26px; height: 26px; border-radius: 13px; border-color: var(--text); box-shadow: 0 0 0 6px rgba(242, 179, 61, 0.25); }
.pin.mine .pin-label::after { content: ' ★'; color: var(--major); }
.leaflet-div-icon { background: none; border: 0; }
.reserve { display: flex; align-items: center; gap: 4px; transform: translate(-12px, -12px); width: max-content; }
.reserve i { width: 24px; height: 24px; border-radius: 12px; background: var(--warn); color: var(--ink); display: flex; align-items: center; justify-content: center; font-style: normal; font-weight: 800; font-size: 14px; border: 2px solid var(--bg); }
.reserve span { font-size: 11px; font-weight: 600; background: rgba(11, 29, 42, 0.85); color: var(--warn); padding: 1px 6px; border-radius: 4px; }
.me-dot { width: 16px; height: 16px; border-radius: 8px; background: var(--text); box-shadow: 0 0 0 7px rgba(234, 242, 245, 0.22); transform: translate(-8px, -8px); }

/* Toast */
#toast { position: fixed; left: 50%; bottom: calc(var(--tabbar) + var(--safe-b) + 16px); transform: translateX(-50%) translateY(20px); opacity: 0; transition: opacity .2s, transform .2s; background: var(--text); color: var(--bg); font-weight: 600; font-size: 14px; padding: 10px 16px; border-radius: 12px; z-index: 1000; pointer-events: none; max-width: calc(100vw - 32px); }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.skeleton { color: var(--faint); }
@media (prefers-reduced-motion: reduce) { #toast { transition: none; } }

/* ---------- Column helpers (stack on phones) ---------- */
.cols, .col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.desk-only { display: none !important; }

/* ---------- PC view ---------- */
@media (min-width: 1000px) {
  :root { --side: 236px; }
  .desk-only { display: revert !important; }
  .mob-only { display: none !important; }
  #app { max-width: none; }
  #view { margin-left: var(--side); }
  .page { max-width: 1200px; margin: 0 auto; padding: 36px 44px 48px; gap: 20px; }
  .page.narrow { max-width: 880px; }
  h1, .h1 { font-size: 30px; }
  .cols { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 28px; align-items: start; }
  .col { gap: 18px; }
  .big-time { font-size: 54px; }

  /* Sidebar replaces the bottom tab bar */
  .tabbar {
    left: 0; top: 0; bottom: 0; transform: none; width: var(--side); max-width: none; height: auto;
    flex-direction: column; justify-content: flex-start; align-items: stretch; gap: 4px;
    padding: 24px 14px; border-top: 0; border-right: 1px solid #1F3B50;
  }
  .tabbar .brand { display: flex !important; align-items: center; gap: 12px; padding: 0 8px 22px; }
  .tabbar .brand b { display: block; font-family: var(--display); font-size: 26px; line-height: 1; color: var(--text); }
  .tabbar .brand span { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; }
  .tabbar a { flex-direction: row; justify-content: flex-start; gap: 12px; min-height: 46px; padding: 0 12px; border-radius: 12px; font-size: 15px; }
  .tabbar a:hover { background: var(--surface); color: var(--text); }
  .tabbar a[aria-current="page"] { background: rgba(242, 179, 61, 0.12); }
  .tabbar .nav-settings { margin-top: auto; display: flex !important; }

  /* Spot page hero sits inside the content */
  .spot-hero { margin: 0; border-radius: var(--radius); min-height: 96px; padding: 16px; }
  .bars { height: 120px; }

  /* Week: days list fills the right column */
  .day-row { padding: 14px 18px; grid-template-columns: 64px 80px minmax(0, 1fr) 16px; }
  .day-row:hover, .ml-item:hover, .spot-opt:hover { background: #17324A; }
  .win:hover { background: #15304A; }

  /* Map: full area right of the sidebar, ranked list on the left */
  #map-view { left: var(--side); right: 0; top: 0; bottom: 0; width: auto; max-width: none; transform: none; }
  .map-top { left: 352px; right: 80px; top: 16px; }
  .map-tools { top: 16px; right: 16px; }
  .map-hint { left: calc(50% + 168px); top: 72px; }
  .map-list {
    display: flex !important; flex-direction: column; gap: 10px; position: absolute; z-index: 820;
    left: 16px; top: 16px; bottom: 16px; width: 320px; padding: 14px;
    background: rgba(18, 41, 58, 0.97); border-radius: 20px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  }
  .ml-head { display: flex; justify-content: space-between; align-items: baseline; padding: 2px 4px; }
  .ml-items { display: flex; flex-direction: column; gap: 6px; overflow-y: auto; flex: 1; min-height: 0; }
  .ml-item { all: unset; cursor: pointer; box-sizing: border-box; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
  .ml-item[aria-current="true"] { box-shadow: inset 0 0 0 1.5px var(--major); }
  .ml-item:focus-visible { outline: 2px solid var(--minor); }
  .ml-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
  .ml-name { font-weight: 600; font-size: 15px; }
  .ml-star { color: var(--major); }
  .ml-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sheet { left: 352px; right: auto; width: 420px; bottom: 16px; border-radius: 20px; }
  .sheet .grab { display: none; }
  .leaflet-control-attribution { margin-right: 0 !important; }

  #toast { bottom: 28px; left: calc(50% + var(--side) / 2); }
  dialog { width: 480px; }
}

/* Crew sync */
.crew-code { font-family: var(--display); font-size: 34px; font-weight: 700; letter-spacing: 0.04em; text-align: center; padding: 14px 10px; border-radius: 14px; background: var(--surface-2); color: var(--major); user-select: all; word-break: break-all; }
.warn-text { color: var(--warn); }
.lm .by { color: var(--text-2); font-weight: 600; }
#join-form input { height: 48px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; color: var(--text); min-width: 0; text-transform: uppercase; letter-spacing: 0.04em; }
