:root {
  --bg: #ffffff; --fg: #1d2327; --muted: #6b747b; --line: #e3e6e8;
  --accent: #0b7a75; --accent-fg: #ffffff; --hover: #f2f5f6; --err: #b3261e;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15191c; --fg: #e6e9eb; --muted: #9aa3a9; --line: #2a3136;
    --accent: #3fb8b0; --accent-fg: #0b1214; --hover: #1e2428; --err: #f2766d;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  display: flex; font: 14px/1.4 system-ui, -apple-system, sans-serif;
  background: var(--bg); color: var(--fg);
}
#panel { width: 340px; flex: none; overflow-y: auto; border-right: 1px solid var(--line); padding: 16px; }
#map { flex: 1; }
h1 { font-size: 18px; margin: 0 0 12px; }
h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 20px 0 8px; }
.hint { color: var(--muted); font-size: 12px; margin: 4px 0 0; }
.error { color: var(--err); font-size: 12px; }
.day-nav { display: flex; gap: 6px; }
.day-nav button { flex: none; width: 34px; font-size: 18px; line-height: 1; }
.day-nav button:disabled { opacity: .4; cursor: default; }
.date + .date, .hint + .date { margin-top: 12px; }
.date { display: flex; flex-direction: column; gap: 4px; font-weight: 600; }
input, textarea, button, select {
  font: inherit; color: inherit; background: var(--bg);
  border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px;
}
input, textarea { width: 100%; }
button { cursor: pointer; }
button:hover { background: var(--hover); }
button.primary { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
form { display: flex; flex-direction: column; gap: 8px; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.row { display: flex; gap: 8px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
#refresh { flex: none; }
#scenes-meta { flex: 1 1 100%; margin: 0; }
ul { list-style: none; margin: 0; padding: 0; }
#locations li, #scenes li {
  padding: 8px; border-radius: 6px; cursor: pointer; border: 1px solid transparent;
}
#locations li:hover, #scenes li:hover { background: var(--hover); }
#locations li.active, #scenes li.active { border-color: var(--accent); }
#locations .name { font-weight: 600; display: flex; justify-content: space-between; }
#locations .del { border: none; background: none; color: var(--muted); padding: 0 4px; }
#locations .notes { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#scenes li { display: flex; gap: 8px; align-items: center; }
#scenes img { width: 56px; height: 56px; object-fit: cover; border-radius: 4px; background: var(--hover); flex: none; }
#scenes .meta { font-size: 12px; color: var(--muted); }
#scenes li.locked { cursor: default; opacity: .55; }
.drawing #map { cursor: crosshair; }
@media (max-width: 700px) {
  body { flex-direction: column-reverse; }
  #panel { width: 100%; height: 45%; border-right: none; border-top: 1px solid var(--line); }
}
#obs-form select { flex: 1; }
#observations li { padding: 8px; border-radius: 6px; cursor: pointer; display: flex; gap: 8px; align-items: baseline; }
#observations li:hover { background: var(--hover); }
#observations .when { font-weight: 600; flex: none; }
#observations .note { flex: 1; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
#observations .del { border: none; background: none; color: var(--muted); padding: 0 4px; }
.tag { font-size: 11px; padding: 1px 6px; border-radius: 999px; flex: none; border: 1px solid currentColor; }
.tag.spawn { color: #1a8f3c; }
.tag.no-spawn { color: var(--muted); }
.tag.unclear { color: #b07a00; }
details > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; }
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: "▸"; color: var(--muted); font-size: 12px; margin-top: 12px; }
details[open] > summary::before { content: "▾"; }
details > summary h2 { flex: 1; }
details[open] > summary { margin-bottom: 8px; }
.title-row { display: flex; align-items: baseline; justify-content: space-between; gap: 4px 8px; flex-wrap: wrap; }
.title-row a { color: var(--accent); font-size: 13px; text-decoration: none; }
.title-row a:hover { text-decoration: underline; }
body.grid-page { display: block; overflow-y: auto; }
.grid-wrap { max-width: 1200px; margin: 0 auto; padding: 16px; }
.grid-header h1 { margin: 0; }
.grid-controls { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.grid-controls .day-nav { max-width: 280px; flex: 1 1 220px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-top: 16px; }
.card { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; }
.thumb { position: relative; aspect-ratio: 1; background: var(--hover); display: flex; align-items: center; justify-content: center; }
.thumb img { width: 100%; height: 100%; object-fit: fill; display: block; }
.thumb .outline { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.thumb .outline polygon { fill: none; stroke: #ffb000; stroke-width: 2px; vector-effect: non-scaling-stroke; }
.thumb .box { position: absolute; border: 2px solid #ffb000; min-width: 6px; min-height: 6px; box-sizing: border-box; pointer-events: none; }
.thumb .placeholder { color: var(--muted); font-size: 12px; text-align: center; padding: 0 12px; }
.thumb .placeholder a { color: var(--accent); }
.card-body { padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.card-title { font-weight: 600; color: var(--fg); text-decoration: none; }
.card-title:hover { color: var(--accent); }
.card .meta { font-size: 12px; color: var(--muted); }
.card-obs { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.card-obs li { display: flex; gap: 6px; align-items: baseline; font-size: 12px; }
.card-obs .note { color: var(--muted); overflow-wrap: anywhere; }
.thumb canvas { width: 100%; height: 100%; display: block; }
/* Planet thumbnails are very dark; the grid picks a gain per thumbnail (thumbFilter in grid.js). */
.thumb-overlay { filter: brightness(2.6) contrast(1.15) saturate(1.2); }
.card .scene-meta, .card .res { display: none; }
.card-obs:empty { display: none; }
.thumb .badge { position: absolute; left: 6px; top: 6px; font-size: 11px; padding: 1px 6px; border-radius: 4px; background: rgba(0,0,0,.6); color: #fff; }

.source-control { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.source-toggle { display: flex; background: #fff; }
.source-status { background: rgba(255,255,255,.9); border-radius: 4px; padding: 3px 8px; font-size: 12px; color: #333; max-width: 260px; }
.source-toggle button { border: 0; background: #fff; padding: 6px 10px; font: inherit; font-size: 13px; cursor: pointer; color: #333; }
.source-toggle button + button { border-left: 1px solid #ccc; }
.source-toggle button.active { background: #0f766e; color: #fff; }

.day-status { background: rgba(255,255,255,.92); border-radius: 4px; padding: 4px 8px; font-size: 12px; color: #333; max-width: 420px; line-height: 1.5; }
.day-status button { border: 0; background: none; padding: 0; font: inherit; color: #0f766e; text-decoration: underline; cursor: pointer; }
.day-status button:hover { background: none; color: #0b5c56; }
.day-status button[data-act] { background: #0f766e; color: #fff; text-decoration: none; padding: 1px 8px; border-radius: 4px; }

.obs-actions { display: flex; gap: 4px; margin-top: 6px; }
.obs-actions button { flex: 1; font: inherit; font-size: 12px; padding: 4px 0; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: inherit; cursor: pointer; }
.obs-actions button[data-status="spawn"]:hover { border-color: #1a8f3c; color: #1a8f3c; }
.obs-actions button[data-status="unclear"]:hover { border-color: #b07a00; color: #b07a00; }
.obs-actions button:disabled { opacity: .5; cursor: progress; }
.card-obs .del { margin-left: auto; border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 11px; }

/* Spawn sites page: map on the left, cards or one site's observations on the right. */
[hidden] { display: none !important; }
body.sites-page { height: 100vh; }
#sites-map { flex: 1 1 45%; min-width: 0; }
#sites-panel { flex: 1 1 55%; overflow-y: auto; padding: 16px; border-left: 1px solid var(--line); }
.sites-header h1 { margin: 0; }
.sites-header .links a { color: var(--accent); font-size: 13px; text-decoration: none; }
.sites-controls { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; align-items: center; }
.sites-controls input[type="search"] { flex: 1 1 200px; width: auto; }
.sites-controls .check { display: flex; gap: 6px; align-items: center; font-size: 13px; }
.sites-controls .check input { width: auto; }
.site-cards { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.site-card .thumb { cursor: pointer; }
.site-card .thumb img { object-fit: cover; }
.site-card .card-body { padding: 8px 10px; }
.status-line { display: flex; gap: 6px; align-items: center; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.more-row { justify-content: center; margin: 16px 0; }
#site-detail .title-row { margin-bottom: 8px; }
#site-detail .site-name { font-size: 18px; text-transform: none; letter-spacing: 0; color: var(--fg); margin: 8px 0 4px; }
#site-detail .meta { color: var(--muted); font-size: 12px; margin: 2px 0; }
.site-obs { margin-top: 12px; }
.site-obs li { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.obs-thumb { width: 160px; height: 160px; flex: none; background: var(--hover); border-radius: 6px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.obs-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.obs-thumb .placeholder { color: var(--muted); font-size: 12px; text-align: center; padding: 8px; }
.obs-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.obs-body .note { font-size: 12px; overflow-wrap: anywhere; }
.obs-body .meta { overflow-wrap: anywhere; }
.obs-body a { color: var(--accent); }
.tag.reported { color: #6a5acd; }
@media (max-width: 800px) {
  body.sites-page { flex-direction: column; height: auto; }
  #sites-map { flex: none; height: 40vh; }
  #sites-panel { border-left: none; overflow: visible; }
  .obs-thumb { width: 110px; height: 110px; }
}
.obs-filter { justify-content: flex-start; margin-top: 8px; }
.obs-thumb { cursor: zoom-in; }
.label-edit { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-top: 4px; }
.label-edit button { font-size: 12px; padding: 2px 8px; }
.label-edit button.on { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.label-edit .label-note { flex: 1 1 140px; width: auto; font-size: 12px; padding: 2px 6px; }
.overlay-control { background: rgba(255,255,255,.94); color: #222; border-radius: 6px; padding: 6px 28px 6px 10px; font-size: 12px; position: relative; max-width: 260px; box-shadow: 0 1px 4px rgba(0,0,0,.3); }
.overlay-control label { display: flex; gap: 6px; align-items: center; margin-top: 4px; }
.overlay-control input { width: 120px; padding: 0; }
.overlay-control .close { position: absolute; top: 2px; right: 2px; border: 0; background: none; color: #555; padding: 2px 6px; }
.overlay-control .loading { color: #777; }

/* Watch list (/watch) and season replay (/replay). */
.button { display: inline-block; text-align: center; text-decoration: none; color: inherit; border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; }
.button:hover { background: var(--hover); }
.button.primary { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.button.disabled { opacity: .5; pointer-events: none; }
.check { display: flex; gap: 6px; align-items: center; font-size: 13px; margin: 6px 0; }
.check input { width: auto; }
.inline { display: flex; gap: 8px; align-items: center; font-size: 13px; margin: 8px 0 0; }
.inline input[type="range"] { flex: 1; padding: 0; }
.group-row { margin-top: 8px; flex-wrap: nowrap; }
.group-row select { flex: 1; min-width: 0; }
#group-name { margin-top: 8px; font-weight: 600; }
.empty { margin-top: 16px; }
.tools { display: flex; gap: 8px; }
.tools .tool { flex: 1; padding: 10px 6px; }
.tools .tool.on { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
#spots li { display: flex; gap: 4px; align-items: center; padding: 3px 0; }
#spots .spot-name { flex: 1; padding: 5px 8px; }
#spots button { border: none; background: none; color: var(--muted); padding: 4px 6px; }
#spots .meta, #others .meta { color: var(--muted); font-size: 12px; }
.big-actions { display: flex; flex-direction: column; gap: 8px; margin: 16px 0 4px; }
.big-actions .button { padding: 12px; font-size: 15px; }
#others li { display: flex; gap: 8px; align-items: center; justify-content: space-between; padding: 4px 0; }
#others button { padding: 3px 10px; }
.danger-row { justify-content: flex-start; margin-top: 16px; }
.danger-row button { color: var(--err); font-size: 12px; }
.watch-page .leaflet-popup-content button { margin-top: 6px; }

body.replay-page #panel { width: 400px; }
.replay-pick { margin-top: 8px; flex-wrap: nowrap; }
.replay-pick #group { flex: 1; min-width: 0; }
.timeline { display: grid; gap: 0; height: 34px; margin-top: 14px; border-radius: 4px; overflow: hidden; background: var(--hover); }
.timeline .day { position: relative; border: 0; border-radius: 0; padding: 0; min-width: 0; background: transparent; }
.timeline .day.month { box-shadow: inset 1px 0 0 var(--muted); }
.timeline .day.clear { background: #2b8fd6; }
.timeline .day.partly { background: #8cc3ea; }
.timeline .day.cloudy { background: #b9c0c6; }
.timeline .day.pending { background: repeating-linear-gradient(45deg, #b9c0c6 0 2px, transparent 2px 4px); }
.timeline .day.cur { outline: 2px solid var(--fg); outline-offset: -2px; z-index: 1; }
.timeline .day:hover { filter: brightness(1.15); outline: 1px solid var(--fg); outline-offset: -1px; }
.timeline .m { position: absolute; left: 50%; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; }
.timeline .m.alert { top: 3px; background: #ef4444; box-shadow: 0 0 0 1px #fff; }
.timeline .m.weak { top: 4px; width: 4px; height: 4px; margin-left: -2px; background: #f59e0b; }
.timeline .m.known { bottom: 3px; background: #d946ef; transform: rotate(45deg); border-radius: 0; box-shadow: 0 0 0 1px #fff; }
.timeline-key { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 11px; color: var(--muted); margin-top: 6px; }
.timeline-key span { display: flex; gap: 4px; align-items: center; }
.timeline-key .k { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.k.clear { background: #2b8fd6; } .k.partly { background: #8cc3ea; } .k.cloudy { background: #b9c0c6; }
.k.alert { background: #ef4444; border-radius: 50%; } .k.known { background: #d946ef; transform: rotate(45deg) scale(.8); }
.player { display: flex; gap: 6px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.player #play { min-width: 92px; }
.player .check { margin: 0; }
.today { margin-top: 14px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; }
.today-date { font-size: 17px; font-weight: 700; }
.today-head { margin-top: 2px; }
.today-head.muted, .today .meta, .feed .meta { color: var(--muted); }
.today .meta { font-size: 12px; }
.today h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 12px 0 4px; }
.spot-status { margin-top: 8px; }
.spot-status li { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; padding: 4px 0; border-top: 1px solid var(--line); cursor: pointer; }
.spot-status .spot-n { flex: 1 1 120px; font-weight: 600; }
.badge-s { font-size: 11px; padding: 1px 7px; border-radius: 999px; border: 1px solid currentColor; white-space: nowrap; }
.badge-s.clear { color: #1d74b8; } .badge-s.partly { color: #3b8ec9; } .badge-s.hazy { color: #7a8288; }
.badge-s.cloudy, .badge-s.none, .badge-s.pending { color: var(--muted); }
.badge-s.alert { color: #fff; background: #dc2626; border-color: #dc2626; }
.badge-s.hint { color: #b45309; }
.alerts li { padding: 6px 8px; border-radius: 6px; cursor: pointer; margin-top: 4px; border-left: 3px solid #f59e0b; background: var(--hover); }
.alerts li.alert { border-left-color: #dc2626; }
.claude { font-size: 12px; margin-top: 4px; }
.records li { padding: 4px 0; }
.feed li { padding: 5px 6px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.feed li:hover { background: var(--hover); }
.feed li.cur { outline: 1px solid var(--accent); }
.feed li.cloudy { color: var(--muted); }
.feed li.known { color: #a21caf; }
.feed .warn { color: #dc2626; font-weight: 600; }
.about p { margin: 0 0 8px; }
.known-pin { background: #d946ef; border: 2px solid #fff; transform: rotate(45deg); box-shadow: 0 0 2px rgba(0,0,0,.6); }
.stale-image { filter: grayscale(.6) brightness(.8); }
.flag-pop img { display: block; width: 256px; height: 256px; margin: 6px 0; background: #ddd; }
.flag-pop .meta { color: #555; font-size: 12px; }
@media (prefers-color-scheme: dark) {
  .badge-s.clear { color: #60a5fa; } .badge-s.partly { color: #93c5fd; }
  .feed li.known { color: #e879f9; }
}
@media (max-width: 700px) {
  body.replay-page #panel, body.watch-page #panel { width: 100%; height: 55%; }
}

/* Sign-in page, account links and the accounts page. */
body.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 16px; }
.login-box { width: 100%; max-width: 340px; border: 1px solid var(--line); border-radius: 10px; padding: 24px; }
.login-box label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; }
.login-box button { padding: 10px; margin-top: 4px; }
.account-links .who { color: var(--muted); }
.accounts-wrap { max-width: 720px; }
.accounts-wrap .title-row { align-items: baseline; }
.account-form { margin-top: 8px; }
.account-form select { flex: 1; }
.group-pick { border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px; margin: 0; }
.group-pick legend { font-size: 12px; color: var(--muted); padding: 0 4px; }
.done { color: #1a8f3c; font-size: 13px; overflow-wrap: anywhere; }
.user-list li { border-top: 1px solid var(--line); padding: 10px 0; }
.user-head .meta { color: var(--muted); font-size: 12px; }
.user-groups { display: flex; flex-wrap: wrap; gap: 0 14px; }
.user-actions { justify-content: flex-start; }
.user-actions button { font-size: 12px; padding: 4px 10px; }
button.danger { color: var(--err); }
.thumb.known .box { border-color: #d946ef; border-style: dashed; }
.thumb.known .outline polygon { stroke: #d946ef; }

/* Herring spawn map (/spawnmap): sites layout, passes of one spot in a grid. */
.spawnmap-page .year-head { font-size: 14px; margin: 16px 0 6px; display: flex; gap: 8px; align-items: baseline; }
.spawnmap-page .year-head .meta { font-weight: normal; }
.pass-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.pass { margin: 0; border: 2px solid transparent; border-radius: 6px; overflow: hidden; cursor: pointer; background: var(--hover); }
.pass:hover { border-color: var(--line); }
.pass.active { border-color: #ffb000; }
.pass img, .pass .placeholder { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.pass .placeholder { display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 12px; }
.pass figcaption { padding: 4px 6px; font-size: 12px; display: flex; flex-wrap: wrap; gap: 2px 6px; align-items: baseline; }
.pass figcaption .meta { color: var(--muted); width: 100%; }
.sm-legend { background: rgba(255,255,255,.94); color: #222; border-radius: 6px; padding: 6px 10px; font-size: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.3); }
.sm-legend-row { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 4px 0 2px; }
.sm-legend-row i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; vertical-align: -1px; border: 1px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.25); }
.sm-legend .meta { color: #666; }
.sm-pin-wrap { background: none; border: 0; }
.sm-pin { position: relative; width: 100%; height: 100%; border-radius: 50%; overflow: visible; border: 3px solid var(--ring, #ffb000);
  box-shadow: 0 1px 6px rgba(0,0,0,.55); background: #0d2630; cursor: pointer; transition: transform .12s; }
.sm-pin img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; transform: scale(1.7); clip-path: circle(29.4%); }
.sm-pin.many::after { content: ""; position: absolute; inset: -7px; border-radius: 50%; border: 2px solid var(--ring, #ffb000); opacity: .45; }
.sm-pin:hover, .hl .sm-pin, .sm-pin-wrap.hl .sm-pin { transform: scale(1.25); }
.sm-count { position: absolute; right: -8px; top: -8px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: #12313b; color: #fff;
  font: 600 11px/20px system-ui, sans-serif; text-align: center; box-shadow: 0 0 0 2px var(--ring, #ffb000); }
@media (prefers-reduced-motion: reduce) { .sm-pin { transition: none; } }

/* Spawn map on phones: full-screen map, list in a bottom sheet with three heights. */
.sheet-handle { display: none; }
.overlay-control .ov-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.overlay-control .ov-step { display: inline-flex; gap: 4px; align-items: center; }
.overlay-control .ov-step button { padding: 2px 10px; font-size: 16px; line-height: 1.2; background: #fff; color: #222; border: 1px solid #ccc; }
@media (max-width: 700px) {
  body.spawnmap-page { display: block; height: 100%; overflow: hidden; }
  body.spawnmap-page #sites-map { position: fixed; inset: 0; height: auto; }
  body.spawnmap-page #sites-panel {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000; overflow-y: auto; overscroll-behavior: contain;
    height: 50%; padding: 0 max(16px, env(safe-area-inset-right, 0px)) calc(16px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
    background: var(--bg); border: 0; border-radius: 14px 14px 0 0; box-shadow: 0 -2px 14px rgba(0,0,0,.35);
    transition: height .2s ease;
  }
  body.spawnmap-page[data-sheet="peek"] #sites-panel { height: calc(52px + env(safe-area-inset-bottom, 0px)); overflow: hidden; }
  body.spawnmap-page[data-sheet="full"] #sites-panel { height: calc(100% - 56px - env(safe-area-inset-top, 0px)); }
  body.spawnmap-page .sheet-handle {
    display: flex; flex-direction: column; align-items: center; gap: 4px; width: 100%; position: sticky; top: 0; z-index: 2;
    background: var(--bg); border: 0; border-radius: 0; padding: 8px 0 10px; margin-bottom: 4px; font-weight: 600; font-size: 14px;
  }
  body.spawnmap-page .sheet-handle .grip { width: 40px; height: 5px; border-radius: 3px; background: var(--line); }
  body.spawnmap-page .sheet-handle #sheet-title { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  body.spawnmap-page .sites-header h1 { display: none; }
  body.spawnmap-page .sm-legend { display: none; }
  body.spawnmap-page.spot-open .sites-header { display: none; }
  body.spawnmap-page .leaflet-top { top: env(safe-area-inset-top, 0px); }
  body.spawnmap-page .overlay-control { max-width: calc(100vw - 80px); }
  body.spawnmap-page .pass-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.spawnmap-page .site-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) and (prefers-reduced-motion: reduce) { body.spawnmap-page #sites-panel { transition: none; } }

/* Spawn map: hide the side panel for a full-width map. */
.panel-toggle { background: #fff; color: #222; border: 0; border-radius: 4px; padding: 6px 10px; font: 600 12px system-ui, sans-serif;
  box-shadow: 0 1px 5px rgba(0,0,0,.4); cursor: pointer; }
.panel-toggle:hover { background: #f2f2f2; }
body.spawnmap-page.panel-hidden #sites-panel { display: none; }
@media (max-width: 700px) { .panel-toggle { display: none; } }
.tag.new-site { color: #c2410c; }
.tag.nearby-site { color: #7c5cc4; }
.sm-legend-row i.ln { width: 16px; height: 0; border-radius: 0; border: 0; border-top: 2px solid; box-shadow: none; vertical-align: 3px; }
.sm-legend-row i.ln.dash { border-top-style: dashed; }
