/* haiti.fm — the palette and type of a lit tuning dial:
   ink-navy housing, warm amber backlight, teal for the map's land. */

:root {
  --ground:       #EEF1F0;
  --surface:      #FFFFFF;
  --sunk:         #E3E8E7;
  --ink:          #111A2B;
  --ink-soft:     #46536A;
  --ink-faint:    #7A8699;
  --rule:         #D2D9DA;
  --signal:       #B26A12;
  --signal-hi:    #D98A2B;
  --dial:         #1F6F66;
  --land:         #DCE5E2;
  --land-hover:   #CBDAD5;
  --alert:        #A81E2C;
  --shadow:       0 1px 2px rgba(17,26,43,.07), 0 10px 28px rgba(17,26,43,.06);
  --topbar:       #16233D;
  --topbar-ink:   #EEF1F0;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground:     #0C1220;
    --surface:    #141D31;
    --sunk:       #0F1728;
    --ink:        #E7ECF3;
    --ink-soft:   #A9B5C8;
    --ink-faint:  #78869E;
    --rule:       #26324A;
    --signal:     #F0AE52;
    --signal-hi:  #F7C67C;
    --dial:       #56B8AA;
    --land:       #1B2740;
    --land-hover: #24344F;
    --alert:      #E4707B;
    --shadow:     0 1px 2px rgba(0,0,0,.45), 0 10px 28px rgba(0,0,0,.35);
    --topbar:     #0F1728;
    --topbar-ink: #E7ECF3;
  }
}

:root[data-theme="dark"] {
  --ground:     #0C1220;  --surface:  #141D31;  --sunk:      #0F1728;
  --ink:        #E7ECF3;  --ink-soft: #A9B5C8;  --ink-faint: #78869E;
  --rule:       #26324A;  --signal:   #F0AE52;  --signal-hi: #F7C67C;
  --dial:       #56B8AA;  --land:     #1B2740;  --land-hover:#24344F;
  --alert:      #E4707B;
  --shadow:     0 1px 2px rgba(0,0,0,.45), 0 10px 28px rgba(0,0,0,.35);
  --topbar:     #0F1728;  --topbar-ink: #E7ECF3;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: var(--ground);
  color: var(--ink);
  font-family: "Segoe UI", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  font-size: 15.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.display, .brand-text strong, h2 {
  font-family: "Bahnschrift", "DIN Alternate", "Avenir Next Condensed", "Roboto Condensed", "Arial Narrow", sans-serif;
  font-weight: 600;
  letter-spacing: .01em;
}
.mono, .freq {
  font-family: "Consolas", "SF Mono", "Cascadia Mono", "Roboto Mono", ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
}

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--signal); color: #fff; padding: 10px 16px;
}
.skip:focus { left: 8px; top: 8px; }
.vis-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- top bar ---------- */
.top {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  padding: 12px 20px;
  background: var(--topbar); color: var(--topbar-ink);
  border-bottom: 1px solid var(--rule);
}
.brand {
  display: flex; align-items: center; gap: 11px; min-width: 0;
  /* it is a <button>, so undo the control styling */
  font: inherit; color: inherit; background: none; border: 0;
  padding: 0; margin: 0; text-align: left; cursor: pointer;
}
.brand:hover .wordmark { color: var(--signal-hi); }
.brand:hover .brand-mark { filter: drop-shadow(0 0 10px rgba(255, 255, 255, .34)); }
.brand:focus-visible { outline: 2px solid var(--signal-hi); outline-offset: 3px; border-radius: 5px; }
.brand-mark {
  width: 28px; height: 28px; flex: none; display: block;
  /* A warm glow fought the blue badge; a soft drop shadow gives it depth
     without tinting it. */
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .45));
  transition: filter .15s;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-text strong { font-size: 1.16rem; }
/* The domain is the name, so it is set as one word: the ".fm" is part of the
   wordmark, tinted rather than separated. */
.wordmark { font-size: 1.3rem; letter-spacing: -.012em; }
.dot-fm { color: var(--signal-hi); font-weight: 500; }
.brand-sub { font-size: 11.5px; opacity: .68; letter-spacing: .03em; }

.controls { display: flex; align-items: center; gap: 14px; margin-left: auto; flex-wrap: wrap; }
.top > .toggle { order: 3; }   /* sits at the far right on wide screens */
.search-wrap { position: relative; }
#search {
  width: 270px; max-width: 46vw;
  padding: 8px 12px;
  border: 1px solid color-mix(in srgb, var(--topbar-ink) 26%, transparent);
  border-radius: 4px;
  background: color-mix(in srgb, var(--topbar-ink) 9%, transparent);
  color: var(--topbar-ink);
  font: inherit; font-size: 14px;
}
#search::placeholder { color: color-mix(in srgb, var(--topbar-ink) 52%, transparent); }
#search:focus-visible { outline: 2px solid var(--signal-hi); outline-offset: 1px; }

.toggle { display: flex; align-items: center; gap: 7px; font-size: 13px; cursor: pointer; opacity: .9; }
.toggle input { accent-color: var(--signal-hi); width: 15px; height: 15px; }

.btn-ghost {
  font: inherit; font-size: 13.5px; cursor: pointer;
  padding: 7px 14px; border-radius: 4px;
  border: 1px solid color-mix(in srgb, var(--topbar-ink) 30%, transparent);
  background: transparent; color: var(--topbar-ink);
}
.btn-ghost:hover { background: color-mix(in srgb, var(--topbar-ink) 12%, transparent); }
.btn-ghost.small { font-size: 12.5px; padding: 4px 10px; border-color: var(--rule); color: var(--ink-soft); }

/* segmented view switch */
.segmented { display: flex; border: 1px solid color-mix(in srgb, var(--topbar-ink) 30%, transparent); border-radius: 4px; overflow: hidden; }
.seg {
  font: inherit; font-size: 13px; cursor: pointer;
  padding: 7px 13px; border: 0; background: transparent; color: var(--topbar-ink);
  border-left: 1px solid color-mix(in srgb, var(--topbar-ink) 22%, transparent);
}
.seg:first-child { border-left: 0; }
.seg:hover { background: color-mix(in srgb, var(--topbar-ink) 12%, transparent); }
.seg[aria-pressed="true"] { background: var(--signal); color: #10151F; font-weight: 600; }

/* ---------- layout ---------- */
main {
  display: grid;
  grid-template-columns: 1fr 372px;
  min-height: 0;
}

/* Which pane occupies the main column. On desktop the station list is always
   beside it, so "List" is not a separate view there. */
.map-pane, .tuner-pane { display: none; }
body.view-map .map-pane,
body.view-list .map-pane { display: block; }
body.view-tuner .tuner-pane { display: block; }
.seg[data-view="list"] { display: none; }

/* ---------- map ---------- */
.map-pane { position: relative; min-height: 0; background: var(--ground); overflow: hidden; }
#map { width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
#map.dragging { cursor: grabbing; }

.dept {
  fill: var(--land); stroke: var(--ground); stroke-width: 1.1;
  vector-effect: non-scaling-stroke; transition: fill .12s;
}
.dept.hot { fill: var(--land-hover); }

.mk { cursor: pointer; }
.mk-hit { fill: transparent; }
.mk-dot {
  fill: var(--signal); stroke: var(--ground); stroke-width: 1.4;
  vector-effect: non-scaling-stroke; transition: r .12s;
}
.mk.listed .mk-dot { fill: var(--ink-faint); fill-opacity: .55; }
.mk.on .mk-dot, .mk:hover .mk-dot { stroke: var(--ink); stroke-width: 2; }
.mk-n {
  font-size: 9.5px; font-weight: 700; fill: #fff; text-anchor: middle;
  pointer-events: none; font-family: "Consolas", ui-monospace, monospace;
}
.mk.listed .mk-n { fill: var(--ground); }

.map-legend, .map-reset, .map-zoom, .map-hint { position: absolute; z-index: 2; }
.map-legend {
  left: 14px; bottom: 14px; display: flex; gap: 14px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border: 1px solid var(--rule); border-radius: 4px;
  padding: 7px 11px; font-size: 12px; color: var(--ink-soft);
}
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-right: 4px; }
.dot.live { background: var(--signal); }
.dot.listed { background: var(--ink-faint); opacity: .55; }

.map-reset { right: 14px; top: 14px; }
.map-zoom  { right: 14px; bottom: 14px; display: flex; gap: 6px; }
.btn-icon {
  width: 34px; height: 34px; font: inherit; font-size: 17px; cursor: pointer;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--rule); border-radius: 4px; box-shadow: var(--shadow);
}
.btn-icon.wide { width: auto; padding: 0 11px; font-size: 12.5px; }
.btn-icon:hover { background: var(--sunk); }

.map-hint {
  left: 50%; transform: translateX(-50%); top: 14px;
  font-size: 12.5px; color: var(--ink-soft);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border: 1px solid var(--rule); border-radius: 20px; padding: 5px 14px;
  transition: opacity .3s;
}
.map-hint.gone { opacity: 0; pointer-events: none; }

/* ---------- panel ---------- */
.panel {
  border-left: 1px solid var(--rule); background: var(--surface);
  display: flex; flex-direction: column; min-height: 0;
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 15px 18px 0;
}
.panel-head h2 { margin: 0; font-size: 1.1rem; }
.panel-count { margin: 3px 18px 10px; font-size: 12.5px; color: var(--ink-faint); }
.panel-empty { margin: 24px 18px; color: var(--ink-faint); font-size: 14px; }

.stations { list-style: none; margin: 0; padding: 0 0 12px; overflow-y: auto; flex: 1; }
.st {
  display: grid; grid-template-columns: 56px 1fr auto;
  align-items: center; gap: 12px;
  padding: 10px 18px; border-top: 1px solid var(--rule);
}
.st:first-child { border-top: none; }
.st.playing { background: color-mix(in srgb, var(--signal) 11%, transparent); }
.st .freq { font-size: 13.5px; color: var(--signal); text-align: right; }
.st .freq.none { color: var(--ink-faint); }
.st-main { min-width: 0; }
.st-name {
  font-size: 14.5px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.st-sub { font-size: 12px; color: var(--ink-faint); }
.st-sub .unlic { color: var(--dial); }
.st-sub .offair { color: var(--alert); }

.btn-play-sm {
  width: 34px; height: 34px; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--signal); background: transparent; color: var(--signal);
  display: grid; place-items: center; flex: none;
}
.btn-play-sm:hover { background: var(--signal); color: var(--surface); }
.btn-play-sm[disabled] {
  border-color: var(--rule); color: var(--ink-faint);
  cursor: default; opacity: .5;
}
.btn-play-sm:hover[disabled] { background: transparent; color: var(--ink-faint); }
.ic-play, .ic-stop { width: 0; height: 0; display: block; }
.ic-play {
  border-left: 10px solid currentColor;
  border-top: 6.5px solid transparent; border-bottom: 6.5px solid transparent;
  margin-left: 3px;
}
.ic-stop { width: 11px; height: 11px; background: currentColor; border: 0; }
.btn-play-sm .ic-play { border-left-width: 8px; border-top-width: 5px; border-bottom-width: 5px; }
.btn-play-sm .ic-stop { width: 9px; height: 9px; }

/* ---------- player ---------- */
.player {
  display: flex; align-items: center; gap: 18px;
  padding: 10px 20px calc(10px + env(safe-area-inset-bottom));
  background: var(--topbar); color: var(--topbar-ink);
  border-top: 1px solid var(--rule);
}
.p-now { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }
.p-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.p-text strong {
  font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
#p-meta { font-size: 12px; opacity: .66; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.p-eq { display: flex; align-items: flex-end; gap: 2.5px; height: 20px; width: 22px; flex: none; }
.p-eq i {
  width: 3.5px; background: var(--signal-hi); height: 4px; border-radius: 1px;
  transition: height .2s;
}
.player[data-state="playing"] .p-eq i { animation: eq .9s ease-in-out infinite; }
.player[data-state="playing"] .p-eq i:nth-child(2) { animation-delay: .18s; }
.player[data-state="playing"] .p-eq i:nth-child(3) { animation-delay: .36s; }
.player[data-state="playing"] .p-eq i:nth-child(4) { animation-delay: .1s; }
.player[data-state="loading"] .p-eq i { animation: pulse 1s ease-in-out infinite; }
.player[data-state="error"] .p-eq i { background: var(--alert); }
@keyframes eq { 0%,100% { height: 4px; } 50% { height: 18px; } }
@keyframes pulse { 0%,100% { opacity: .3; } 50% { opacity: 1; } }

.p-controls { display: flex; align-items: center; gap: 16px; }
.btn-play {
  width: 42px; height: 42px; border-radius: 50%; cursor: pointer; flex: none;
  border: none; background: var(--signal); color: #10151F;
  display: grid; place-items: center;
}
.btn-play:hover:not([disabled]) { background: var(--signal-hi); }
.btn-play[disabled] { opacity: .35; cursor: default; }
.p-vol input { width: 108px; accent-color: var(--signal-hi); }

button:focus-visible, input:focus-visible, .mk:focus-visible {
  outline: 2px solid var(--signal-hi); outline-offset: 2px;
}

/* ---------- mobile: one pane at a time, the list leading ---------- */
@media (max-width: 760px) {
  main { grid-template-columns: 1fr; }
  .panel { display: none; }
  body.view-list .panel { display: flex; }
  body.view-list .map-pane { display: none; }
  .seg[data-view="list"] { display: block; }
  /* On a narrow screen the centred hint runs into "All Stations" at the top
     right, so it drops below that row rather than under it. */
  .map-hint { top: 60px; }
  .radio { padding: 16px 14px 18px; }
  .radio-controls { flex-wrap: wrap; gap: 12px; }
  .tuned { order: -1; width: 100%; }

  /* Two rows, not three: the brand sits beside the Live-only checkbox, and
     the search shares the second row with the view switch. On a phone the
     header is pure overhead, so every line it costs is a line of map. */
  .top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px 12px;
    padding: 10px 14px;
  }
  .top > .brand  { grid-column: 1; grid-row: 1; }
  .top > .toggle { grid-column: 2; grid-row: 1; order: 0; justify-self: end; }
  .top > .controls {
    grid-column: 1 / -1; grid-row: 2;
    width: auto; margin-left: 0; gap: 10px; flex-wrap: nowrap;
  }
  .search-wrap { flex: 1; min-width: 0; }
  .segmented { flex: none; }
  .seg { padding: 7px 11px; }
  #search { flex: 1; width: auto; max-width: none; }
  .panel { border-left: none; }
  .p-vol { display: none; }
  .top { gap: 12px; padding: 10px 14px; }
  .st, .panel-head, .panel-count { padding-left: 14px; padding-right: 14px; }
  .panel-count { margin-left: 14px; margin-right: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ---------- the tuner ----------
   An original dial in the app's own palette: warm amber backlight behind a
   dark housing, rather than the green of a period receiver. It is skeuomorphic
   only where the metaphor earns its keep -- the scale, the needle and the seek
   buttons all correspond to something the user can actually do. */

.tuner-pane { min-height: 0; overflow-y: auto; padding: 22px; }

.radio {
  max-width: 940px; margin: 0 auto;
  background: linear-gradient(180deg, #1B2740 0%, #131C2F 100%);
  border: 1px solid #0A1120;
  border-radius: 10px;
  padding: 20px 24px 22px;
  box-shadow: 0 1px 0 rgba(255,255,255,.06) inset, 0 14px 34px rgba(0,0,0,.28);
}
:root[data-theme="dark"] .radio,
:root:not([data-theme="light"]) .radio { border-color: #060B15; }

.radio-top {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 14px;
}
.city-pick { display: flex; align-items: center; gap: 9px; }
.city-pick .lbl {
  font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase;
  color: #8A97AE;
}
#tuner-city {
  font: inherit; font-size: 14px; padding: 6px 10px;
  background: #0C1322; color: #E7ECF3;
  border: 1px solid #2A3550; border-radius: 4px;
}
.band-note { margin: 0; font-size: 12px; color: #8A97AE; }

/* the lit glass */
.dial-window {
  position: relative;
  background: #060B14;
  border: 1px solid #000;
  border-radius: 6px;
  padding: 10px 10px 4px;
  box-shadow: 0 0 0 1px rgba(240,174,82,.10) inset, 0 0 44px rgba(240,174,82,.10) inset;
  overflow: hidden;
}
.dial-readout {
  position: absolute; top: 10px; right: 16px; z-index: 2;
  display: flex; align-items: baseline; gap: 5px;
  text-shadow: 0 0 14px rgba(240,174,82,.55);
}
.ro-freq { font-size: 28px; font-weight: 700; color: #F0AE52; line-height: 1; }
.ro-unit { font-size: 11px; color: #B9873F; letter-spacing: .1em; }

#dial { width: 100%; height: 170px; display: block; touch-action: none; cursor: ew-resize; }
#dial:focus-visible { outline: 2px solid var(--signal-hi); outline-offset: 2px; }

.d-major { stroke: #F0AE52; stroke-opacity: .85; stroke-width: 1.6; }
.d-minor { stroke: #F0AE52; stroke-opacity: .32; stroke-width: 1; }
.d-num {
  fill: #F0AE52; font-size: 15px; text-anchor: middle; font-weight: 600;
  font-family: "Consolas", "SF Mono", ui-monospace, monospace;
}
.d-band {
  fill: #7E8CA5; font-size: 11px; letter-spacing: .18em;
  font-family: "Bahnschrift", "DIN Alternate", "Arial Narrow", sans-serif;
}
.d-rule { stroke: #F0AE52; stroke-opacity: .5; stroke-width: 1; }

/* station marks: lit means there is something to hear */
.st-mark { cursor: pointer; }
.st-mark line { stroke-width: 2.5; stroke-linecap: round; }
.st-mark.lit line { stroke: #FFC978; filter: drop-shadow(0 0 4px rgba(255,201,120,.85)); }
.st-mark.dim line { stroke: #55627C; }
.st-mark:hover line, .st-mark.on line { stroke: #FFFFFF; }

#dial-needle { pointer-events: none; }
#needle-line { stroke: #FF4B45; stroke-width: 2; filter: drop-shadow(0 0 6px rgba(255,75,69,.9)); }
#needle-grip { fill: #FF4B45; filter: drop-shadow(0 0 5px rgba(255,75,69,.8)); }

.radio-controls {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; margin-top: 16px;
}
.btn-seek {
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  padding: 10px 16px; border-radius: 5px; white-space: nowrap;
  background: linear-gradient(180deg, #2A3550 0%, #1D283E 100%);
  color: #E7ECF3; border: 1px solid #0A1120;
  box-shadow: 0 1px 0 rgba(255,255,255,.08) inset;
}
.btn-seek:hover { color: #FFC978; }
.btn-seek:active { box-shadow: 0 1px 3px rgba(0,0,0,.4) inset; }

.tuned { text-align: center; min-width: 0; flex: 1; }
.tuned strong {
  display: block; font-size: 15.5px; color: #E7ECF3;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tuned span { font-size: 12px; color: #8A97AE; }

.dial-legend {
  display: flex; gap: 18px; justify-content: center;
  margin: 14px 0 0; font-size: 11.5px; color: #7E8CA5;
}
.tick { display: inline-block; width: 3px; height: 11px; margin-right: 6px; vertical-align: -1px; border-radius: 1px; }
.tick.lit { background: #FFC978; box-shadow: 0 0 5px rgba(255,201,120,.8); }
.tick.dim { background: #55627C; }

/* ---------- submission sheet ----------
   A bottom sheet on phones and a centred dialog on wider screens. Touch
   targets are 48px because a meaningful share of submissions will come from
   someone standing in front of a radio station on a phone. */

.sheet {
  border: none; padding: 0; border-radius: 12px;
  background: var(--surface); color: var(--ink);
  width: min(520px, calc(100vw - 32px));
  box-shadow: 0 24px 60px rgba(0,0,0,.34);
}
.sheet::backdrop { background: rgba(8,12,20,.55); }
.sheet form { padding: 20px 22px 22px; }

.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sheet-head h2 { margin: 0; font-size: 1.24rem; }
.sheet-x {
  width: 40px; height: 40px; flex: none; cursor: pointer;
  border: none; background: transparent; color: var(--ink-faint);
  font-size: 26px; line-height: 1; border-radius: 6px;
}
.sheet-x:hover { background: var(--sunk); color: var(--ink); }

.sheet-station {
  margin: 4px 0 18px; font-size: 14px; color: var(--ink-soft);
  padding: 10px 12px; background: var(--sunk); border-radius: 6px;
  border-left: 3px solid var(--signal);
}
.sheet-station b { color: var(--ink); }

.field { display: block; margin-bottom: 16px; }
.field-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.field-label em { font-weight: 400; color: var(--ink-faint); font-style: normal; }
.field input {
  width: 100%; font: inherit; font-size: 16px; /* 16px keeps iOS from zooming on focus */
  padding: 12px 13px; min-height: 48px;
  border: 1px solid var(--rule); border-radius: 7px;
  background: var(--ground); color: var(--ink);
}
.field input:focus-visible { outline: 2px solid var(--signal); outline-offset: 1px; border-color: var(--signal); }
.field input[aria-invalid="true"] { border-color: var(--alert); }
.field-hint { display: block; font-size: 12.5px; color: var(--ink-faint); margin-top: 6px; line-height: 1.4; }

.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.sheet-msg { margin: 0 0 14px; font-size: 13.5px; min-height: 1.2em; }
.sheet-msg.good { color: var(--dial); }
.sheet-msg.warn { color: var(--signal); }
.sheet-msg.bad  { color: var(--alert); }

.sheet-actions { display: flex; gap: 10px; justify-content: flex-end; }
.btn-flat, .btn-primary {
  font: inherit; font-size: 15px; cursor: pointer;
  min-height: 48px; padding: 0 20px; border-radius: 7px;
}
.btn-flat { background: transparent; border: 1px solid var(--rule); color: var(--ink-soft); }
.btn-flat:hover { background: var(--sunk); }
.btn-primary { background: var(--signal); border: 1px solid var(--signal); color: #fff; font-weight: 600; }
.btn-primary:hover { background: var(--signal-hi); border-color: var(--signal-hi); }
.btn-primary[disabled] { opacity: .55; cursor: default; }

/* the affordance on a station row with nothing to play */
.btn-add {
  width: 34px; height: 34px; border-radius: 50%; cursor: pointer; flex: none;
  border: 1px dashed var(--rule); background: transparent; color: var(--ink-faint);
  font-size: 19px; line-height: 1; display: grid; place-items: center;
}
.btn-add:hover { border-style: solid; border-color: var(--signal); color: var(--signal); }

@media (max-width: 560px) {
  /* Sit on the bottom edge, where a thumb is. A modal <dialog> is centred by
     the UA through `margin: auto`, so it is margin -- not position -- that
     moves it; overriding position alone leaves it floating mid-screen. */
  .sheet {
    width: 100vw; max-width: 100vw;
    margin: auto auto 0 auto;
    border-radius: 14px 14px 0 0;
  }
  .sheet form { padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); }
  .sheet-actions { flex-direction: column-reverse; }
  .sheet-actions button { width: 100%; }
}

/* Install prompt — only present while the browser reports the app installable. */
.btn-install {
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  padding: 7px 14px; border-radius: 4px; white-space: nowrap;
  background: var(--signal); color: #10151F; border: 1px solid var(--signal);
}
.btn-install:hover { background: var(--signal-hi); border-color: var(--signal-hi); }
.btn-install[hidden] { display: none; }

/* Install instructions sheet */
.sheet-body { padding: 20px 22px 22px; }
.sheet-lead { margin: 6px 0 16px; font-size: 14px; color: var(--ink-soft); }
.steps { margin: 0 0 20px; padding-left: 22px; }
.steps li { margin-bottom: 11px; font-size: 14.5px; line-height: 1.45; }
@media (max-width: 560px) { .sheet-body { padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); } }
