:root {
  --bg: #0b0f1c;
  --glass: rgba(14, 19, 34, 0.78);
  --line: rgba(255, 255, 255, 0.09);
  --text: #e8edf7;
  --muted: rgba(232, 237, 247, 0.62);
  --accent: #66b8ff;
  --accent2: #7ee0d3;
  --warn: #ffad5c;
  --tile: rgba(255, 255, 255, 0.045);
  --tile-hover: rgba(255, 255, 255, 0.08);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--text);
  font: 13px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
h1 { font: 600 22px/1.15 var(--serif); letter-spacing: 0.2px; }
h1 em { font-style: italic; color: var(--accent); }
h2 { font-size: 16px; font-weight: 600; line-height: 1.25; }
h3 { font-size: 12.5px; font-weight: 650; margin-bottom: 4px; }
.small { font-size: 11.5px; }
.land-only { display: flex; align-items: center; gap: 7px; cursor: pointer; margin-top: -2px; }
.land-only input { margin: 0; accent-color: var(--accent, #7aa7ff); }
.tiny { font-size: 10.5px; }
.muted { color: var(--muted); }
.warn { color: var(--warn); }
[hidden] { display: none !important; }

#map { position: fixed; inset: 0; width: 100%; height: 100%; border: 0; background: var(--bg); }
.mapwait { position: fixed; inset: 0; display: grid; place-items: center; color: var(--muted); pointer-events: none; }
#rings, #flashlayer { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#flashlayer { background: #fff; mix-blend-mode: screen; opacity: 0; }

.card { position: fixed; background: var(--glass); border: 1px solid var(--line); border-radius: 14px;
  backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35); }

/* ---- header */
.head { top: 14px; left: 14px; padding: 12px; width: 340px; display: grid; gap: 9px; }
.row { display: flex; gap: 8px; }
.qwrap { position: relative; flex: 1; min-width: 0; display: flex; }
.suggest { position: absolute; top: calc(100% + 6px); left: 0; right: -110px; margin: 0; padding: 4px; list-style: none; z-index: 5;
  background: rgba(14, 19, 34, 0.97); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); }
.suggest li { display: flex; align-items: baseline; gap: 6px; padding: 6px 8px; border-radius: 7px; cursor: pointer; white-space: nowrap; overflow: hidden; }
.suggest li:hover, .suggest li.on { background: rgba(102, 184, 255, 0.15); }
.suggest span { color: var(--muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; }
.suggest em { margin-left: auto; font-style: normal; font-size: 10px; color: var(--accent); flex: none; }
input[type=search] { flex: 1; min-width: 0; padding: 7px 10px; border-radius: 9px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06); outline: none; }
input[type=search]:focus { border-color: var(--accent); }
.primary { display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 9px; padding: 7px 12px; cursor: pointer;
  font-weight: 600; color: #08101e; background: linear-gradient(135deg, var(--accent2), var(--accent)); white-space: nowrap; }
.primary svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.primary:hover { filter: brightness(1.08); }
.split { position: relative; display: flex; }
.split #findRain { border-radius: 9px 0 0 9px; }
.primary.more { border-radius: 0 9px 9px 0; padding: 7px 5px; border-left: 1px solid rgba(8, 16, 30, 0.28); }
.find-menu { left: auto; right: 0; width: 250px; }
.find-menu li.off { opacity: 0.45; cursor: default; }
.find-menu li.off:hover { background: none; }
.ghost { border: 1px solid var(--line); background: var(--tile); border-radius: 8px; padding: 5px 10px; cursor: pointer; }
.ghost:hover { background: var(--tile-hover); }

/* ---- scene view (top set from the header's height in app.js) */
.head { z-index: 2; }                     /* place suggestions drop over the scene card */
/* the View shrinks on short or narrow windows: it stays above the map's legend and clear of the side panel */
.scene { top: var(--scene-top, 150px); left: 14px; width: clamp(240px, min(calc((100vh - 600px) * 1.78 + 24px), calc(100vw - 380px)), 460px); padding: 9px 12px 10px; display: grid; grid-template-rows: auto 1fr; gap: 6px; }
.scene-top { display: flex; justify-content: space-between; align-items: center; min-height: 22px; }
.scene-label { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 650; }
.scene-label svg { width: 14px; height: 14px; fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.scene-ctl { display: flex; gap: 2px; margin-right: -5px; }
.scene-btn { width: 26px; height: 22px; display: grid; place-items: center; border: 0; border-radius: 6px; background: none; padding: 0; cursor: pointer; color: var(--muted); }
.scene-btn:hover { color: var(--text); background: var(--tile-hover); }
.scene-btn:focus-visible, .scene-restore:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.scene-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.scene-btn .i-shrink, .scene.expanded #sceneGrow .i-grow, .scene.full #sceneGrow .i-grow, .scene.full #sceneFull .i-grow { display: none; }
.scene.expanded #sceneGrow .i-shrink, .scene.full #sceneGrow .i-shrink, .scene.full #sceneFull .i-shrink { display: block; }
.scene-body { display: grid; grid-template-rows: auto auto; gap: 6px; min-height: 0; }
.scene-frame { position: relative; aspect-ratio: 356 / 200; border-radius: 8px; overflow: hidden; background: #000; }
.scene-frame canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.scene-caption { position: absolute; left: 6px; bottom: 6px; padding: 3px 7px; border-radius: 999px; font-size: 10px; line-height: 1.2;
  color: #fff; background: rgba(0, 0, 0, 0.45); pointer-events: none; }
.scene-summary { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.env-tabs { display: flex; gap: 2px; padding: 2px; border-radius: 10px; background: rgba(255,255,255,0.05); border: 1px solid var(--line); margin: 6px 0 10px; }
.env-tabs button { flex: 1; font: inherit; font-size: 12px; padding: 6px 8px; border: 0; border-radius: 8px; background: transparent; color: rgba(232,237,247,0.65); cursor: pointer; }
.env-tabs button:hover { color: var(--text); }
.env-tabs button[aria-selected="true"] { background: rgba(102,184,255,0.18); color: var(--text); font-weight: 600; }
.env-pane p { margin: 4px 0 8px; }
#envAutoText b { font-weight: 600; }
.env-warn { color: #f3d9a4; }
.scene-tabs { display: inline-flex; gap: 2px; padding: 2px; border-radius: 999px; background: rgba(255,255,255,0.05); border: 1px solid var(--line); margin-right: auto; margin-left: 10px; }
.scene-tabs button { font: inherit; font-size: 11px; padding: 2px 10px; border: 0; border-radius: 999px; background: transparent; color: rgba(232,237,247,0.65); cursor: pointer; }
.scene-tabs button:hover { color: var(--text); }
.scene-tabs button[aria-selected="true"] { background: rgba(102,184,255,0.18); color: var(--text); font-weight: 600; }
/* a real photo's credit (its licence asks for author, licence and source), and "another photo" */
.scene-photo { position: absolute; top: 6px; right: 6px; left: 40px; display: flex; justify-content: flex-end; align-items: center; gap: 4px; pointer-events: none; }
.scene-credit { pointer-events: auto; min-width: 0; padding: 3px 7px; border-radius: 999px; font-size: 9.5px; line-height: 1.2; color: rgba(255, 255, 255, 0.82);
  background: rgba(0, 0, 0, 0.5); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scene-credit:hover { text-decoration: underline; }
.scene-photo-next { pointer-events: auto; flex: none; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center;
  background: rgba(0, 0, 0, 0.5); color: rgba(255, 255, 255, 0.85); cursor: pointer; }
#scenePhotoCycle .pause, #scenePhotoCycle.on .play { display: none; }
#scenePhotoCycle.on .pause { display: inline; }
#scenePhotoCycle .play { fill: currentColor; stroke-width: 1; }
.scene-photo-next svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.scene.expanded .scene-photo { top: 9px; right: 9px; }
.scene.expanded .scene-credit { font-size: 10.5px; }
.scene.full .scene-photo { top: calc(max(10px, env(safe-area-inset-top)) + 46px); right: max(14px, env(safe-area-inset-right)); }
.scene.full .scene-credit { font-size: 11.5px; padding: 4px 9px; }
.scene-restore { top: var(--scene-top, 150px); left: 14px; width: 40px; height: 40px; border-radius: 50%; padding: 0; display: grid; place-items: center; cursor: pointer; color: var(--text); }
/* rain on the glass, on or off, from the map */
.glass-btn { position: fixed; top: 14px; right: 372px; width: 40px; height: 40px; border-radius: 50%; padding: 0; display: grid; place-items: center; cursor: pointer; color: var(--accent); z-index: 3; }
.glass-btn:hover { background: rgba(28, 36, 60, 0.9); }
.glass-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.glass-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
/* panes: a drop in a frame; everywhere: a filled drop; off: struck through */
.glass-btn .frame, .glass-btn .slash { display: none; }
.glass-btn[data-mode="panes"] .frame { display: inline; opacity: 0.55; }
.glass-btn[data-mode="panes"] .drop { transform: scale(0.68); transform-origin: 12px 12.5px; }
.glass-btn[data-mode="all"] .drop { fill: currentColor; fill-opacity: 0.45; }
.glass-btn[data-mode="off"] { color: var(--muted); }
.glass-btn[data-mode="off"] .slash { display: inline; }
@media (max-width: 760px), (max-height: 500px) { .glass-btn { right: 16px; top: max(14px, env(safe-area-inset-top)); width: 38px; height: 38px; } }
.scene-restore:hover { background: rgba(28, 36, 60, 0.9); }
.scene-restore svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
/* expanded: the map area between the header and the panel; full: the whole window */
.scene.expanded, .scene.full { z-index: 4; grid-template-rows: auto minmax(0, 1fr); }
.scene.expanded { right: 372px; bottom: 14px; width: auto; padding: 10px 14px 12px; }
.scene.expanded .scene-body, .scene.full .scene-body { grid-template-rows: minmax(0, 1fr) auto; }
.scene.expanded .scene-frame, .scene.full .scene-frame { aspect-ratio: auto; min-height: 0; }
.scene.expanded .scene-caption { left: 9px; bottom: 9px; font-size: 11px; }
.scene.expanded .scene-label, .scene.full .scene-label { font-size: 12.5px; }
.scene.full { inset: 0; width: auto; padding: 0; border: 0; border-radius: 0; background: #000; box-shadow: none; z-index: 9;
  backdrop-filter: none; -webkit-backdrop-filter: none; grid-template-rows: minmax(0, 1fr); }
.scene.full .scene-top { position: absolute; z-index: 1; left: 0; right: 0; top: 0; padding: max(10px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 18px max(16px, env(safe-area-inset-left));
  background: linear-gradient(rgba(0, 0, 0, 0.6), transparent); color: #fff; }
.scene.full .scene-btn { width: 32px; height: 28px; color: rgba(255, 255, 255, 0.82); }
.scene.full .scene-btn:hover { color: #fff; background: rgba(255, 255, 255, 0.12); }
.scene.full .scene-btn svg { width: 18px; height: 18px; }
.scene.full .scene-frame { border-radius: 0; }
.scene.full .scene-caption { left: max(14px, env(safe-area-inset-left)); bottom: max(14px, env(safe-area-inset-bottom)); font-size: 12px; padding: 4px 9px; }
.scene.full .scene-summary { position: absolute; right: max(14px, env(safe-area-inset-right)); bottom: max(14px, env(safe-area-inset-bottom)); max-width: 50%;
  padding: 4px 9px; border-radius: 999px; background: rgba(0, 0, 0, 0.45); color: rgba(255, 255, 255, 0.78); font-size: 11.5px; }
.scene:fullscreen { width: 100%; height: 100%; }
.scene::backdrop { background: #000; }

/* ---- panel */
.panel { top: 14px; right: 14px; bottom: 14px; width: 344px; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 16px;
  scrollbar-width: thin; }
.panel section { display: grid; gap: 5px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.sheet-handle { display: none; }
.head-more, .panel-fab, .panel-close { display: none; }      /* the phone's: see the media query */
/* a slow glow that asks to be tried, until it has been */
@keyframes beckon { 0%, 100% { box-shadow: 0 0 0 0 rgba(130, 200, 255, 0.0), 0 4px 18px rgba(0, 0, 0, 0.35); }
  50% { box-shadow: 0 0 0 7px rgba(130, 200, 255, 0.16), 0 0 22px 4px rgba(130, 200, 255, 0.38); } }
.beckon { animation: beckon 3.2s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .beckon { animation: none; box-shadow: 0 0 0 2px rgba(130, 200, 255, 0.45); } }
.topline { display: flex; gap: 11px; align-items: center; }
.grow { flex: 1; min-width: 0; }
.play { width: 42px; height: 42px; border-radius: 50%; border: 0; cursor: pointer; flex: none; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent2), var(--accent)); color: #08101e; }
.play svg { width: 20px; height: 20px; fill: currentColor; }
.play .i-play { display: none; } .play.paused .i-play { display: block; } .play.paused .i-pause { display: none; }
.words { font-weight: 600; font-size: 14px; color: var(--muted); }
.words.wet { color: var(--accent); }
/* who is singing: pops up low over the map (above the radar timeline, clear of the legend) with each new bird, then fades */
.bird { left: max(320px, calc(50% - 385px)); top: auto; bottom: 104px; max-width: max(260px, min(420px, calc(100vw - 760px))); display: flex; gap: 10px; align-items: flex-start;
  padding: 9px 13px; font-size: 12.5px; color: var(--muted); line-height: 1.4; z-index: 3;
  opacity: 0; transform: translate(0, 10px); transition: opacity 0.6s, transform 0.6s; pointer-events: none; }
.bird.show { opacity: 1; transform: translate(0, 0); pointer-events: auto; }
.bird .credit { font-size: 11.5px; }
.bird b { color: var(--text, #e8edf7); font-weight: 600; }
.bird i { color: var(--muted); }
.bird a { color: var(--accent2); text-decoration: none; }
.bird a:hover { text-decoration: underline; }
.bird a.bird-name { color: inherit; }
.bird a.bird-name:hover b { text-decoration: underline; }
.bird-pic { flex: none; width: 48px; height: 48px; border-radius: 8px; overflow: hidden; display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.06); }
.bird-pic img { width: 48px; height: 48px; object-fit: cover; display: block; }
.bird svg { width: 24px; height: 24px; flex: none; fill: none; stroke: var(--accent2); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.vol { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.vol svg { width: 17px; height: 17px; fill: none; stroke: var(--muted); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
input[type=range] { flex: 1; accent-color: var(--accent); }

/* ---- mode grid */
.modes { display: grid; gap: 10px; }
.group-label { font-size: 9.5px; font-weight: 650; letter-spacing: 0.9px; text-transform: uppercase; color: var(--muted); margin-bottom: 5px; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.tile { position: relative; display: grid; justify-items: center; gap: 4px; padding: 6px 2px; border-radius: 11px; cursor: pointer;
  border: 1px solid transparent; background: var(--tile); transition: background 0.15s, border-color 0.2s, transform 0.12s; }
.tile:hover { background: var(--tile-hover); }
.tile:active { transform: scale(0.97); }
.tile.on { background: rgba(102, 184, 255, 0.14); border-color: rgba(102, 184, 255, 0.85); }
.tile.picked { border-style: dashed; background: rgba(102, 184, 255, 0.08); }   /* chosen by the photo (Auto) */
.art { position: relative; width: 100%; height: 40px; display: grid; place-items: center; overflow: hidden; border-radius: 9px; }
.glyph { width: 26px; height: 26px; fill: none; stroke: rgba(232, 237, 247, 0.62); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round;
  vector-effect: non-scaling-stroke; position: relative; }
.tile:hover .glyph { stroke: rgba(232, 237, 247, 0.85); }
.tile.on .glyph { stroke: var(--accent); stroke-width: 1.5; }
.tname { font-size: 9.5px; letter-spacing: -0.1px; font-weight: 500; color: rgba(232, 237, 247, 0.7); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tile.on .tname { font-weight: 650; color: var(--text); }
/* a few streaks drifting down behind the chosen glyph */
.drops { position: absolute; inset: 0; opacity: 0; transition: opacity 0.3s; pointer-events: none;
  background-image: linear-gradient(170deg, transparent 0 45%, rgba(102, 184, 255, 0.32) 46% 54%, transparent 55%);
  background-size: 9px 13px; animation: fall 0.9s linear infinite; mask-image: linear-gradient(transparent, #000 20%, #000 80%, transparent); }
.tile.on .drops { opacity: 1; }
@keyframes fall { from { background-position: 0 0; } to { background-position: -2px 13px; } }
@media (prefers-reduced-motion: reduce) { .drops { animation: none; } }
.mode-now { display: flex; gap: 8px; align-items: flex-start; margin-top: 4px; }
.mode-now .glyph { width: 18px; height: 18px; stroke: var(--accent); stroke-width: 1.4; flex: none; margin-top: 1px; }

/* ---- sounds around you: place, time, season, layers */
.chips { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 9px; }
.chip { font-size: 11px; padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line); background: var(--tile); color: rgba(232, 237, 247, 0.75);
  cursor: pointer; transition: background 0.15s, border-color 0.2s; }
.chip:hover { background: var(--tile-hover); }
.chip.on { background: rgba(102, 184, 255, 0.14); border-color: rgba(102, 184, 255, 0.85); color: var(--text); font-weight: 600; }
.chips .chip.layer:not(.on) { text-decoration: line-through; opacity: 0.7; }

/* ---- birds you've heard */
#heardBox summary { cursor: pointer; list-style: none; }
#heardBox summary::-webkit-details-marker { display: none; }
#heardBox summary h3 { display: inline; }
#heardBox summary::before { content: "▸ "; color: var(--muted); }
#heardBox[open] summary::before { content: "▾ "; }
.been li { display: block; }
.heard { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 7px; max-height: 340px; overflow-y: auto; }
.heard li { display: flex; gap: 9px; align-items: flex-start; font-size: 11.5px; color: var(--muted); line-height: 1.35; }
.heard img, .heard .nopic { width: 40px; height: 40px; border-radius: 7px; object-fit: cover; flex: none; background: rgba(255, 255, 255, 0.06); }
.heard .nopic { display: grid; place-items: center; }
.heard .nopic svg { width: 22px; height: 22px; fill: none; stroke: var(--accent2); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.heard b { color: var(--text, #e8edf7); font-weight: 600; }
.heard a { color: var(--accent2); text-decoration: none; }
.heard a:hover { text-decoration: underline; }
.heard .when { font-size: 10.5px; }

/* ---- rose, legend, meters */
#rose { width: 100%; height: 190px; }
.legend { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 3px 8px; font-size: 10px; color: var(--muted); }
.legend span { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.legend i { width: 10px; height: 10px; border-radius: 2px; flex: none; }
.field { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
select { background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); border-radius: 7px; padding: 3px 6px; }
.meter { display: grid; grid-template-columns: 100px 1fr; align-items: center; gap: 8px; }
.bar { height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.4s; }
#dry { justify-self: start; margin-top: 2px; }

/* ---- weather controls */
.switch { display: flex; justify-content: space-between; align-items: center; gap: 10px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.knob { width: 34px; height: 20px; border-radius: 10px; background: rgba(255, 255, 255, 0.16); position: relative; flex: none; transition: background 0.2s; }
.knob::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform 0.2s; }
.switch input:checked + .knob { background: var(--accent); }
.switch input:checked + .knob::after { transform: translateX(14px); }
.switch input:focus-visible + .knob { outline: 2px solid var(--accent); outline-offset: 2px; }
#sliders { display: grid; gap: 6px; margin-top: 8px; }
.slider { display: grid; grid-template-columns: 78px 1fr 60px; align-items: center; gap: 6px; font-size: 11.5px; }
.slider output { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.check { display: flex; gap: 6px; align-items: center; font-size: 11.5px; }
footer { display: grid; gap: 3px; }
footer a, .veil-card a { color: var(--accent); }
footer a { justify-self: start; }
/* the site's links, always on screen: bottom left, under the map's legend (on phones they stay in the settings sheet) */
.site-bar { position: fixed; left: 20px; bottom: 4px; z-index: 3; padding: 3px 9px; border-radius: 8px; font-size: 11.5px; color: var(--muted);
  background: rgba(10, 14, 26, 0.62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.site-bar a { color: var(--text); text-decoration: none; }
.site-bar a:hover, .site-bar a:focus-visible { text-decoration: underline; }
.panel .site-links { display: none; }
@media (max-width: 760px), (max-height: 500px) { .site-bar { display: none; } .panel .site-links { display: block; } }
.site-links { margin-top: 6px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,.08); }
.veil-maker { margin-top: -4px; opacity: .8; }

.spinner { display: inline-block; width: 9px; height: 9px; border: 1.5px solid var(--muted); border-top-color: transparent; border-radius: 50%;
  animation: spin 0.8s linear infinite; vertical-align: -1px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- start veil */
.veil { position: fixed; inset: 0; display: grid; place-items: center; padding: 16px; background: rgba(6, 9, 18, 0.55);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); transition: opacity 0.5s; z-index: 10; }
.veil.gone { opacity: 0; pointer-events: none; }
.veil-card { max-width: 420px; text-align: center; display: grid; gap: 14px; justify-items: center; }
.veil-card h1 { font-size: 34px; }
.veil-card p { color: var(--muted); font-size: 14px; line-height: 1.5; }
.veil-art { width: 56px; height: 56px; fill: none; stroke: var(--accent); stroke-width: 1.1; stroke-linecap: round; stroke-linejoin: round; }
.primary.big { font-size: 15px; padding: 11px 22px; border-radius: 12px; }

.toast { position: fixed; left: 50%; top: 18px; transform: translate(-50%, -20px); opacity: 0; transition: 0.3s; padding: 8px 14px;
  border-radius: 10px; background: var(--glass); border: 1px solid var(--line); z-index: 11; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---- where-you-stand picker (phones only; the panel has the grid on wider screens) */
.pick { display: none; }

/* ---- phones: the panel becomes a bottom sheet */
@media (max-width: 760px), (max-height: 500px) {
  /* phones: full width, low on the map, just above the round buttons */
  .bird { left: 16px; right: 16px; top: auto; bottom: calc(max(10px, env(safe-area-inset-bottom)) + 66px); max-width: none; transform: translate(0, 10px); }
  .bird.show { transform: translate(0, 0); }
  .head { left: 16px; right: 16px; width: auto; top: max(12px, env(safe-area-inset-top)); padding: 10px; gap: 7px; }
  .head h1 { font-size: 18px; }
  .head p { display: none; }
  .scene { left: 16px; width: min(280px, calc(100vw - 32px)); padding: 7px 9px 8px; gap: 5px; }
  .scene-restore { left: 16px; width: 38px; height: 38px; }
  /* expanded on a phone: a sheet over nearly everything */
  .scene.expanded { top: max(8px, env(safe-area-inset-top)); left: 8px; right: 8px; bottom: max(8px, env(safe-area-inset-bottom)); width: auto; padding: 9px 11px 11px; z-index: 6; }
  .scene.full .scene-summary { left: max(14px, env(safe-area-inset-left)); right: auto; max-width: calc(100% - 28px); bottom: calc(max(14px, env(safe-area-inset-bottom)) + 28px); }
  .veil-card h1 { font-size: 28px; }
  .pick, .sheet-handle { display: none !important; }        /* where you stand lives in Manual Environment Design now */

  /* the map is the page: at the top only Find rain and an arrow that opens the rest */
  body:not(.head-open) .head { right: auto; display: flex; align-items: center; gap: 6px; padding: 6px; }
  body:not(.head-open) .head > :not(#searchForm):not(#headMore),
  body:not(.head-open) .head .qwrap, body:not(.head-open) #findMore { display: none; }
  body:not(.head-open) .head #searchForm { display: block; }
  .head-more { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border-radius: 10px; cursor: pointer;
    background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); color: var(--text); }
  .head-more svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.2s; }
  body.head-open .head-more { position: absolute; top: 8px; right: 8px; }
  body.head-open .head-more svg { transform: rotate(180deg); }
  body.head-open .head h1 { padding-right: 44px; }

  /* every other setting: a round button in the corner opens the side panel as a sheet over the map */
  .panel-fab { display: grid; place-items: center; position: fixed; right: 16px; bottom: max(10px, env(safe-area-inset-bottom)); z-index: 4;
    width: 52px; height: 52px; border-radius: 50%; padding: 0; cursor: pointer; color: var(--text); }
  .panel-fab svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
  .panel { display: none; }
  body.panel-open .panel { display: block; top: max(5vh, env(safe-area-inset-top)); left: 3vw; right: 3vw; bottom: max(3vh, env(safe-area-inset-bottom));
    width: auto; max-height: none; overflow-y: auto; z-index: 8; background: rgba(12, 16, 30, 0.97); border-radius: 18px; padding: 14px 16px 18px; transform: none; }
  body.panel-open::before { content: ""; position: fixed; inset: 0; z-index: 7; background: rgba(3, 5, 12, 0.55); }
  body.panel-open .panel-fab { display: none; }
  .panel-close { display: grid; place-items: center; position: sticky; top: 0; float: right; z-index: 2; width: 34px; height: 34px; margin: -4px -6px 0 8px;
    border-radius: 50%; padding: 0; border: 1px solid var(--line); background: rgba(28, 36, 60, 0.95); color: var(--text); cursor: pointer; }
  .panel-close svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
}


/* the mixer: a fader per group of sounds, with solo */
.slider.mix { grid-template-columns: 1fr 52px 30px; row-gap: 2px; margin: 6px 0; }
.slider.mix > span { grid-column: 1 / -1; }
.slider.mix.muted > span, .slider.mix.muted output { opacity: 0.45; }
.solo { padding: 2px 0; min-width: 28px; font-weight: 600; }
.solo.on { background: var(--accent, #4a8fd8); color: #fff; border-color: transparent; }
.slider.mix.sub { padding-left: 12px; margin: 3px 0; }
