: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); transition: opacity 0.5s ease; }
.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. It shares the top corner with the search card: one of the two is in front. With the View in
   front the search card is out of sight and its tab shows at the View's left edge; with search in front, the round
   button under it (top set from the header's height in app.js) opens the View. Either way the middle of the map,
   where you listen, stays clear. */
.head { z-index: 2; transition: opacity 0.16s ease, transform 0.16s ease; }                     /* place suggestions drop over the scene card */
body.view-front .head { opacity: 0; transform: translateX(-10px) scale(0.985); visibility: hidden; pointer-events: none; transition: opacity 0.16s ease, transform 0.16s ease, visibility 0s 0.16s; }
/* the View shrinks on short or narrow windows: it stays clear of the map's middle and of the side panel */
.scene { top: 14px; left: 56px; z-index: 2; width: clamp(250px, min(calc((100vh - 330px) * 0.8), calc(100vw - 440px)), 400px); padding: 9px 12px 10px; display: grid; grid-template-rows: auto 1fr; gap: 6px; }
.scene:not(.expanded):not(.full) { border-top-left-radius: 4px; }      /* where the tab joins */
.head-tab { top: 14px; left: 14px; z-index: 2; width: 43px; height: 46px; padding: 0 0 0 1px; display: grid; place-items: center; cursor: pointer; color: var(--muted);
  border-right: 0; border-radius: 12px 0 0 12px; box-shadow: -8px 10px 24px rgba(0, 0, 0, 0.25); }
.head-tab:hover { color: var(--text); background: rgba(28, 36, 60, 0.9); }
.head-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.head-tab svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.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; }
/* heavy bird mode is on: a bird under the glass button; a tap asks whether to turn it off */
.bird-btn { top: 62px; color: var(--accent2); }
.bird-btn[hidden], .bird-ask[hidden] { display: none; }
.bird-ask { top: 110px; right: 372px; z-index: 6; width: 230px; padding: 12px 14px; font-size: 13px; }
.bird-ask p { margin: 0 0 10px; }
.bird-ask .row { display: flex; gap: 8px; }
.bird-ask button { flex: 1; padding: 7px 8px; border-radius: 9px; cursor: pointer; font: inherit; }
.bird-ask button:not(.primary) { background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); color: var(--text); }
@media (max-width: 760px), (max-height: 500px) {
  .bird-btn { top: calc(max(14px, env(safe-area-inset-top)) + 46px); }
  .bird-ask { right: 16px; top: calc(max(14px, env(safe-area-inset-top)) + 92px); }
}
@media (max-width: 760px), (max-height: 500px) { .glass-btn { right: 16px; top: max(14px, env(safe-area-inset-top)); width: 38px; height: 38px; } }
/* saved places: a bookmark under the glass button, its list opening beside it (the bird sits below both) */
.glass-btn.mark-btn { top: 62px; color: var(--text); }
.glass-btn.mark-btn.on { color: var(--warn); }
.glass-btn.mark-btn.on svg { fill: currentColor; fill-opacity: 0.85; }
.glass-btn.bird-btn { top: 110px; }
.bird-ask { top: 158px; }
.mark-menu { top: 62px; right: 420px; z-index: 6; width: 280px; padding: 8px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; background: rgba(13, 18, 33, 0.95); transform-origin: top right; animation: markIn 0.16s ease; }
@keyframes markIn { from { opacity: 0; transform: scale(0.94) translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .mark-menu { animation: none; } }
.mark-save { display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 10px; border-radius: 10px; cursor: pointer; font: inherit; font-weight: 600; text-align: left;
  color: var(--text); background: rgba(102, 184, 255, 0.14); border: 1px solid rgba(102, 184, 255, 0.3); }
.mark-save:hover { background: rgba(102, 184, 255, 0.22); }
.mark-save:disabled { opacity: 0.55; cursor: default; background: rgba(255, 255, 255, 0.05); border-color: var(--line); }
.mark-save svg { flex: none; width: 16px; height: 16px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; }
.mark-save span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mark-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; max-height: min(50vh, 340px); overflow-y: auto; }
.mark-list:empty { display: none; }
.mark-list li { display: flex; align-items: center; gap: 2px; border-radius: 9px; }
.mark-list li:hover { background: var(--tile-hover); }
.mark-list button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; border-radius: 8px; }
.mark-list button:focus-visible, .mark-save:focus-visible { outline: 2px solid var(--accent); outline-offset: -1px; }
.mark-go { flex: 1; min-width: 0; padding: 8px 8px; text-align: left; display: grid; }
.mark-go b { font: 600 14px/1.25 var(--serif); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mark-go span { font-size: 10.5px; color: var(--warn); }
.mark-act { flex: none; width: 34px; height: 34px; padding: 0; display: grid; place-items: center; color: var(--muted); }
.mark-act:hover { color: var(--text); }
.mark-act svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.mark-act[aria-pressed="true"] { color: var(--warn); }
.mark-act[aria-pressed="true"] svg { fill: currentColor; fill-opacity: 0.3; }
.wx { display: none; }
@media (max-width: 760px), (max-height: 500px) {
  .glass-btn.mark-btn { top: calc(max(14px, env(safe-area-inset-top)) + 46px); }
  .glass-btn.bird-btn { top: calc(max(14px, env(safe-area-inset-top)) + 92px); }
  .bird-ask { top: calc(max(14px, env(safe-area-inset-top)) + 138px); }
  .mark-menu { top: calc(max(14px, env(safe-area-inset-top)) + 46px); right: 62px; width: min(290px, calc(100vw - 78px)); }
  .mark-act { width: 40px; height: 40px; }
  /* the weather at the marker: a small window at the bottom, between the two round buttons; its arrow folds it to a tab */
  .wx { position: fixed; z-index: 3; bottom: max(10px, env(safe-area-inset-bottom)); left: calc(max(10px, env(safe-area-inset-left)) + 62px); right: calc(max(16px, env(safe-area-inset-right)) + 60px);
    max-width: 330px; margin: 0 auto; height: 52px; display: flex; align-items: stretch; color: var(--text); border-radius: 14px; border: 1px solid var(--line); background: rgba(11, 15, 28, 0.72);
    backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3); transition: opacity 0.25s; }
  .wx-main { flex: 1; min-width: 0; display: grid; align-content: center; gap: 2px; padding: 4px 2px 5px 12px; text-align: left; font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
  .wx-hide { flex: none; display: flex; align-items: center; gap: 2px; padding: 0 9px 0 5px; font: inherit; color: var(--muted); background: none; border: 0; cursor: pointer; }
  .wx-hide svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.2s; }
  .wx-mini { display: none; font: 600 15px/1 var(--serif); color: var(--text); font-variant-numeric: tabular-nums; }
  .wx-main:focus-visible, .wx-hide:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 12px; }
  .wx.min { left: 0; right: 0; width: max-content; height: 36px; border-radius: 999px; bottom: calc(max(10px, env(safe-area-inset-bottom)) + 8px); }
  .wx.min .wx-main { display: none; }
  .wx.min .wx-hide { padding: 0 9px 0 13px; }
  .wx.min .wx-mini { display: block; }
  .wx.min .wx-hide svg { transform: rotate(180deg); }
  body.panel-open .wx { display: none; }
  @media (max-width: 439px) { .wx-word { display: none; } }
  /* the narrowest phones: the fold arrow moves into the first line's corner (in place of the time) so the numbers get the whole width */
  @media (max-width: 359px) {
    .wx-dir { display: none; } .wx-nums { font-size: 12px; } .wx-nums i { margin: 0 3px; } .wx-main { padding: 4px 8px 5px 10px; }
    .wx:not(.min) .wx-hide { position: absolute; top: 2px; right: 0; height: 26px; padding: 0 7px; }
    .wx-place span { display: none; } .wx-place { padding-right: 20px; }
  }
  .wx.stale { opacity: 0.6; }
  .wx-place { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
  .wx-place b { min-width: 0; font: 600 14.5px/1.2 var(--serif); letter-spacing: 0.1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .wx-place span { margin-left: auto; flex: none; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
  .wx-nums { font-size: 12.5px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
  .wx-nums i { font-style: normal; color: var(--muted); margin: 0 5px; }
  .wx-nums .wet { color: var(--accent); }
  .wx-arrow { width: 13px; height: 13px; vertical-align: -2px; margin-right: 3px; fill: none; stroke: var(--accent2); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
}
.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 { top: var(--scene-top, 150px); left: 14px; 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, .play-fab { 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; }
#birdsHereBox { margin-top: 12px; }
#birdsHereBox .tiny { margin: 2px 0 0; }
.birds-here { max-height: 380px; gap: 2px; }
.birds-here li { align-items: center; padding: 5px 6px; margin: 0 -6px; border-radius: 9px; cursor: pointer; transition: background 0.15s ease; }
.birds-here li:hover, .birds-here li:focus-visible { background: rgba(255, 255, 255, 0.05); outline: none; }
.birds-here li.now { background: rgba(102, 184, 255, 0.14); }
.birds-here li.now b::after { content: " ♪"; color: var(--accent); }
.birds-here li > span:last-child { flex: 1; min-width: 0; }
.birds-here i { color: var(--muted); }
.birds-here .tick { color: var(--accent2); }

/* ---- 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: 72px; height: 72px; border-radius: 16px; box-shadow: 0 6px 24px rgba(0, 0, 0, .45); }
.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: calc(max(12px, env(safe-area-inset-top))); padding: 10px; gap: 7px; }
  .head h1 { font-size: 18px; }
  .head p { display: none; }
  .scene { top: calc(max(12px, env(safe-area-inset-top))); left: 58px; right: 62px; width: auto; max-width: clamp(190px, calc((50vh - max(12px, env(safe-area-inset-top)) - 124px) * 1.9), 360px); padding: 7px 9px 8px; gap: 5px; }   /* (clear of the round button in the corner) */
  .head-tab { top: calc(max(12px, env(safe-area-inset-top))); left: 16px; }
  .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; }
  /* open, the search card stops short of the round buttons on the right, so they never lie on its arrow or on Find rain's menu */
  body.head-open .head { right: 62px; grid-template-columns: minmax(0, 1fr); }
  body.head-open .head #q { min-width: 0; width: 100%; }
  body.head-open .head .split { flex: none; }
  body.head-open .head .primary.more { padding: 7px 9px; }                 /* a wider target for the thumb */
  body.head-open .head .land-only:has(select) { flex-wrap: wrap; row-gap: 4px; }
  body.head-open .head .find-menu { max-width: calc(100vw - 94px); }
  body.head-open .head .land-only select { min-width: 0; max-width: 100%; }

  /* 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); }
  /* the sound's play / pause, in the lower left (over the map's own button there, which only stops the radar loop) */
  .play-fab { display: grid; position: fixed; z-index: 4; left: max(10px, env(safe-area-inset-left)); bottom: max(10px, env(safe-area-inset-bottom)); width: 52px; height: 52px; box-shadow: 0 0 0 4px #070b16, 0 4px 14px rgba(0, 0, 0, 0.5); }
  .play-fab svg { width: 23px; height: 23px; }
  body.panel-open .play-fab { display: none; }
  .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; }

/* ---- local radio (radio.js, behind ?radio=1): a round button under the others, a small set with a backlit dial */
.radio-btn { top: 110px; color: var(--text); }
body:has(#birdBtn:not([hidden])) .radio-btn { top: 158px; }
.radio-btn.on { color: #ffc77a; }
.radio-panel { --amber: #ffcf8f; --amber-dim: rgba(255, 207, 143, 0.6); top: 62px; right: 420px; z-index: 6; width: 340px; padding: 10px 12px 10px;
  background: rgba(13, 18, 33, 0.95); display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; transform-origin: top right; animation: markIn 0.16s ease; }
.radio-head { display: flex; align-items: center; gap: 8px; cursor: grab; }
.radio-panel { touch-action: none; user-select: none; -webkit-user-select: none; }      /* (it drags: see movable() in radio.js) */
.radio-panel.moving, .radio-panel.moving .radio-head { cursor: grabbing; }
.radio-panel.moving { box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55); }
.radio-head .radio-count { flex: 1; min-width: 0; margin: 0; overflow: hidden; text-overflow: ellipsis; text-align: right; }
.radio-head b { font: 600 15px/1.2 var(--serif); }
.radio-power { display: flex; align-items: center; gap: 5px; padding: 4px 9px 4px 7px; border-radius: 999px; cursor: pointer; font-size: 11.5px; font-weight: 600;
  color: var(--muted); background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); }
.radio-power svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.radio-power[aria-pressed="true"] { color: #ffd59a; border-color: rgba(255, 190, 110, 0.45); background: rgba(255, 170, 80, 0.12); }
.radio-power:focus-visible, .radio-seek:focus-visible, .radio-dial:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* the face: walnut rim, a warm backlit glass with the scale printed on it */
.radio-face { border-radius: 11px; padding: 5px; background: linear-gradient(180deg, #3a2618, #24170f); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 2px 8px rgba(0, 0, 0, 0.4); }
.radio-dial { position: relative; height: 78px; border-radius: 7px; cursor: ew-resize; touch-action: none; user-select: none; -webkit-user-select: none;
  background: radial-gradient(120% 140% at 50% 50%, rgba(255, 176, 84, 0.34), rgba(150, 82, 30, 0.16) 60%, rgba(20, 12, 8, 0.9)), #1b120c;
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.7), inset 0 0 1px rgba(255, 210, 150, 0.4); transition: background 0.6s; }
.radio-panel.off .radio-dial { background: radial-gradient(120% 140% at 50% 50%, rgba(140, 110, 80, 0.12), rgba(20, 12, 8, 0.95)), #15100c; }
.radio-dial canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.radio-needle { position: absolute; top: 4px; bottom: 4px; width: 2px; margin-left: -1px; border-radius: 1px; background: #ff5b3a;
  box-shadow: 0 0 6px rgba(255, 90, 50, 0.9), 0 0 2px rgba(255, 200, 160, 0.9); pointer-events: none; }
.radio-panel.off .radio-needle { background: #9a4a36; box-shadow: none; }
.radio-read { min-width: 0; display: flex; align-items: baseline; gap: 8px; min-height: 22px; padding: 4px 4px 0; color: var(--amber); }
.radio-eye { flex: none; align-self: center; width: 13px; height: 13px; border-radius: 50%; --sig: 0;
  background: conic-gradient(from 180deg, rgba(120, 255, 170, calc(0.25 + 0.7 * var(--sig))) calc(var(--sig) * 360deg), rgba(40, 70, 50, 0.6) 0);
  box-shadow: 0 0 calc(var(--sig) * 8px) rgba(120, 255, 170, 0.6), inset 0 0 0 1px rgba(0, 0, 0, 0.5); }
.radio-panel.off .radio-eye { background: rgba(40, 50, 45, 0.6); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.5); }
.radio-name { flex: 0 1 auto; min-width: 0; font: 600 14px/1.25 var(--serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: opacity 0.2s; }
.radio-name a { color: inherit; text-decoration: none; border-bottom: 1px solid rgba(255, 207, 143, 0.35); }
.radio-name a:hover { border-bottom-color: var(--amber); }
.radio-place { margin-left: auto; flex: none; max-width: 55%; font-size: 11px; color: var(--amber-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.radio-band { display: flex; padding: 2px; border-radius: 8px; background: rgba(0, 0, 0, 0.35); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5); }
.radio-band button, .radio-talk { padding: 4px 11px; border: 0; border-radius: 6px; cursor: pointer; font: 600 11px/1.2 inherit; font-family: inherit; letter-spacing: 0.04em; color: var(--muted); background: none; }
.radio-band button[aria-checked="true"] { color: #2a1a0e; background: linear-gradient(180deg, #ffdca8, #e0a968); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); }
.radio-talk { border: 1px solid rgba(255, 255, 255, 0.14); letter-spacing: 0; }
.radio-talk[aria-pressed="true"] { color: #ffd59a; border-color: rgba(255, 190, 110, 0.45); background: rgba(255, 170, 80, 0.12); }
.radio-band button:focus-visible, .radio-talk:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.radio-count { margin-left: auto; font-size: 10.5px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.radio-row { display: flex; align-items: center; gap: 8px; }
.radio-seek { flex: none; width: 34px; height: 30px; border-radius: 9px; cursor: pointer; font-size: 20px; line-height: 1; padding: 0 0 2px;
  color: var(--text); background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); }
.radio-seek:hover { background: rgba(255, 255, 255, 0.1); }
/* three bakelite knobs: drag up or right to turn up */
.radio-knobs { flex: 1; min-width: 0; display: flex; justify-content: space-around; gap: 4px; }
.radio-knob-wrap { display: grid; justify-items: center; gap: 1px; font-size: 10.5px; color: var(--muted); }
.radio-knob-wrap span { color: var(--text); opacity: 0.85; }
.radio-knob-wrap small { font-size: 9.5px; opacity: 0.75; }
.radio-knob-wrap small b { margin: 0 3px; font-weight: 400; }
.radio-knob { --v: 0.5; position: relative; width: 40px; height: 40px; border-radius: 50%; cursor: grab; touch-action: none;
  background: radial-gradient(circle at 38% 32%, #6b4a33, #3a2617 55%, #1e130b 100%);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.55), inset 0 1px 1px rgba(255, 220, 180, 0.18), 0 0 0 3px rgba(255, 190, 120, 0.08); }
.radio-knob::before { content: ""; position: absolute; inset: 4px; border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, rgba(0, 0, 0, 0.28) 0 4deg, rgba(255, 220, 180, 0.06) 4deg 10deg);
  -webkit-mask: radial-gradient(circle, transparent 58%, #000 60%); mask: radial-gradient(circle, transparent 58%, #000 60%); }
.radio-knob i { position: absolute; left: 50%; top: 50%; width: 2px; height: 15px; margin-left: -1px; border-radius: 1px; background: #ffd9a8;
  transform-origin: 50% 0; transform: rotate(calc(180deg - 135deg + var(--v) * 270deg)); box-shadow: 0 0 3px rgba(255, 190, 120, 0.6); }
.radio-knob:active { cursor: grabbing; }
.radio-knob:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.radio-note { min-height: 0; font-size: 11.5px; color: var(--muted); }
.radio-note:empty { display: none; }
@media (prefers-reduced-motion: reduce) { .radio-panel { animation: none; } }
@media (max-width: 760px), (max-height: 500px) {
  .radio-btn { top: calc(max(14px, env(safe-area-inset-top)) + 92px); }
  body:has(#birdBtn:not([hidden])) .radio-btn { top: calc(max(14px, env(safe-area-inset-top)) + 138px); }
  /* phones: low, just above the weather line, so the middle of the map stays clear; smaller all round */
  .radio-panel { top: auto; bottom: calc(max(10px, env(safe-area-inset-bottom)) + 66px); right: 16px; left: 16px; width: auto; max-width: 340px; margin-left: auto; padding: 8px 10px; gap: 6px; }
  .radio-dial { height: 56px; }
  .radio-knob { width: 36px; height: 36px; }
  .radio-knob-wrap small { display: none; }
  .radio-head { gap: 6px; }
  .radio-head .radio-count { visibility: hidden; }
  .radio-band button, .radio-talk { padding: 5px 9px; }
  .radio-power span { display: none; }
  .radio-power { padding: 6px; }
  .radio-seek { width: 40px; height: 38px; }
}
