/* EB Garamond and Source Sans 3 are bundled under the SIL Open Font License. See fonts/. */

@font-face {
  font-family: "EB Garamond";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/eb-garamond-latin-500.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "EB Garamond";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/eb-garamond-latin-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "EB Garamond";
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/eb-garamond-latin-500-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "EB Garamond";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/eb-garamond-greek-500.woff2") format("woff2");
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}

@font-face {
  font-family: "EB Garamond";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/eb-garamond-greek-600.woff2") format("woff2");
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}

@font-face {
  font-family: "EB Garamond";
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/eb-garamond-greek-500-italic.woff2") format("woff2");
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}

@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/source-sans-3-latin-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/source-sans-3-latin-500.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/source-sans-3-latin-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/source-sans-3-greek-400.woff2") format("woff2");
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}

@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/source-sans-3-greek-500.woff2") format("woff2");
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}

@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/source-sans-3-greek-600.woff2") format("woff2");
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}

:root {
  color-scheme: dark;
  --bg: #0c0907;
  --ink: #f6efe4;
  --ink-soft: #e4d5c2;
  --muted: #c4b5a2;
  --amber: #e0aa55;
  --amber-hot: #e8b86a;
  --amber-soft: #f0d7a8;
  --ink-on-amber: #1a1208;
  --line: rgba(224, 170, 85, 0.38);
  --serif: "EB Garamond", Palatino, "Palatino Linotype", "Times New Roman", serif;
  --sans: "Source Sans 3", "Segoe UI", "Noto Sans", "Noto Sans Hebrew", "Noto Sans Arabic", "Noto Sans Devanagari", "Noto Sans Ethiopic", "Noto Sans Myanmar", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 90% 42% at 50% -12%, rgba(224, 170, 85, 0.16), transparent 52%),
    radial-gradient(ellipse 46% 36% at 110% 86%, rgba(92, 52, 18, 0.28), transparent 46%),
    radial-gradient(ellipse 40% 32% at -12% 92%, rgba(68, 40, 18, 0.22), transparent 42%);
}

#stars {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.wrap {
  position: relative;
  z-index: 1;
  width: min(62rem, calc(100% - 2rem));
  margin-inline: auto;
  padding-top: calc(1rem + env(safe-area-inset-top));
  padding-bottom: calc(2.5rem + env(safe-area-inset-bottom));
}

::selection {
  background: rgba(224, 170, 85, 0.35);
  color: #fff8ee;
}

:focus-visible {
  outline: 2px solid var(--amber-soft);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  inset-inline-start: 1rem;
  top: -4rem;
  z-index: 5;
  padding: 0.6rem 0.9rem;
  background: var(--amber);
  color: var(--ink-on-amber);
  font-family: var(--sans);
  font-weight: 600;
  text-decoration: none;
}

.skip:focus {
  top: calc(0.75rem + env(safe-area-inset-top));
}

.mast {
  grid-area: mast;
  text-align: center;
  margin-bottom: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
  text-align: initial;
}

.series {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber);
}

.lang {
  display: flex;
  align-items: center;
  margin-inline-start: auto;
}

.lang select {
  min-height: 44px;
  max-width: min(15rem, 100%);
  padding-block: 0.35rem;
  padding-inline: 0.8rem 1.6rem;
  color-scheme: dark;
  border: 1px solid var(--line);
  border-radius: 999px;
  background-color: transparent;
  color: var(--amber-soft);
  font-family: var(--sans);
  font-size: 0.92rem;
  cursor: pointer;
}

h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.15rem, 8vw, 3.5rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
}

.rose {
  line-height: 1;
}

h1 .rose {
  font-size: 0.7em;
  vertical-align: 0.06em;
}

.greek {
  margin: 0.35rem 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.55rem, 4vw, 2.2rem);
  line-height: 1.1;
  color: var(--amber-soft);
}

.by {
  margin: 0.35rem 0 0;
  color: var(--ink-soft);
  font-size: 0.98rem;
}

.tagline {
  margin: 0.55rem auto 0;
  max-width: 36rem;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.05rem, 2.4vw, 1.28rem);
  line-height: 1.35;
  color: var(--ink);
}

.meander {
  display: block;
  width: min(100%, 18rem);
  height: auto;
  margin: 0.45rem auto;
  color: var(--amber);
  opacity: 0.8;
}

.gift {
  margin: 0 auto;
  max-width: 38rem;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--amber-soft);
}

.blurb {
  margin: 0.4rem auto 0;
  max-width: 34rem;
  font-size: 1rem;
  line-height: 1.45;
  color: var(--ink-soft);
}

.count {
  margin: 0.55rem 0 0;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.layout {
  display: grid;
  gap: 1.15rem 0;
  grid-template-areas:
    "mast"
    "player"
    "stations"
    "queue"
    "foot";
}

.player {
  grid-area: player;
}

.stations {
  grid-area: stations;
}

.queue {
  grid-area: queue;
}

.colophon {
  grid-area: foot;
}

.player {
  text-align: center;
}

.kicker {
  margin: 0 0 0.4rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--amber);
}

.cover-frame {
  position: relative;
  width: min(100%, 12.4rem);
  margin: 0 auto 1rem;
  aspect-ratio: 1;
  padding: 0.45rem;
  background:
    linear-gradient(var(--amber), var(--amber)) top left / 1.15rem 1px no-repeat,
    linear-gradient(var(--amber), var(--amber)) top left / 1px 1.15rem no-repeat,
    linear-gradient(var(--amber), var(--amber)) top right / 1.15rem 1px no-repeat,
    linear-gradient(var(--amber), var(--amber)) top right / 1px 1.15rem no-repeat,
    linear-gradient(var(--amber), var(--amber)) bottom left / 1.15rem 1px no-repeat,
    linear-gradient(var(--amber), var(--amber)) bottom left / 1px 1.15rem no-repeat,
    linear-gradient(var(--amber), var(--amber)) bottom right / 1.15rem 1px no-repeat,
    linear-gradient(var(--amber), var(--amber)) bottom right / 1px 1.15rem no-repeat,
    #14110d;
  border: 1px solid rgba(224, 170, 85, 0.28);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

.cover-frame img,
.cover-fallback {
  width: 100%;
  height: 100%;
}

.cover-frame img {
  object-fit: cover;
  display: block;
}

.cover-fallback {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 42%, rgba(224, 170, 85, 0.16), transparent 58%),
    #17130f;
}

.onair {
  position: absolute;
  inset-inline-start: 0.7rem;
  bottom: 0.7rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0.22rem 0.55rem 0.22rem 0.45rem;
  background: rgba(12, 9, 7, 0.78);
  color: var(--amber-soft);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.onair::before {
  content: "";
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 8px var(--amber);
}

html.is-playing .onair::before {
  animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.now-title {
  margin: 0.2rem auto 0;
  max-width: 24rem;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.7rem, 4.4vw, 2.35rem);
  line-height: 1.12;
  text-wrap: balance;
  overflow-wrap: break-word;
}

.artist {
  margin: 0.3rem 0 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.place {
  margin: 0.15rem 0 0;
  min-height: 1.2em;
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
}

.progress {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: center;
  max-width: 20rem;
  margin: 0.5rem auto 0;
}

.time {
  min-width: 2.7rem;
  font-variant-numeric: tabular-nums;
  font-size: 0.8rem;
  color: var(--muted);
}

.time:first-child {
  text-align: right;
}

.seek {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 2rem;
  margin: 0;
  background: transparent;
  accent-color: var(--amber);
  cursor: pointer;
}

.seek:disabled {
  cursor: not-allowed;
}

.seek::-webkit-slider-runnable-track {
  height: 2px;
  background: rgba(224, 170, 85, 0.35);
}

.seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 0.95rem;
  height: 0.95rem;
  margin-top: -0.42rem;
  border: 0;
  border-radius: 50%;
  background: var(--amber-soft);
}

.seek::-moz-range-track {
  height: 2px;
  background: rgba(224, 170, 85, 0.35);
  border: 0;
}

.seek::-moz-range-thumb {
  width: 0.95rem;
  height: 0.95rem;
  border: 0;
  border-radius: 50%;
  background: var(--amber-soft);
}

.transport {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  max-width: 18.5rem;
  margin: 0.35rem auto 0;
}

button {
  font-family: var(--sans);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.play {
  grid-column: 1 / -1;
  min-height: 3.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.75rem 1.3rem;
  border: 0;
  border-radius: 999px;
  background: var(--amber);
  color: var(--ink-on-amber);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.play:hover:not(:disabled) {
  background: var(--amber-hot);
}

.play:active:not(:disabled) {
  transform: translateY(1px);
}

.icon {
  display: inline-flex;
}

.icon-pause {
  display: none;
}

html.is-playing .play .icon-play {
  display: none;
}

html.is-playing .play .icon-pause {
  display: inline-flex;
}

.step {
  min-height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-size: 0.95rem;
}

.step:hover:not(:disabled) {
  border-color: var(--amber);
  color: var(--amber-soft);
}

.toggles {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  max-width: 26rem;
  margin: 0.9rem auto 0;
}

.toggle {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.toggle .flag {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.toggle[aria-pressed="true"] {
  border-color: var(--amber);
  background: rgba(224, 170, 85, 0.12);
  color: var(--amber-soft);
}

.toggle[aria-pressed="true"] .flag {
  color: var(--amber);
}

.note,
.status {
  max-width: 28rem;
  margin: 0.75rem auto 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.4;
}

.status.is-alert {
  color: #f3d2c6;
}

.retry-row {
  margin: 0;
}

.retry,
.dismiss {
  min-height: 44px;
  padding: 0.35rem 0.7rem;
  border: 0;
  background: transparent;
  color: var(--amber-soft);
  font-size: 0.95rem;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.tip,
.noscript {
  max-width: 28rem;
  margin: 0.9rem auto 0;
  padding: 0.9rem 1rem 0.7rem;
  border: 1px solid rgba(224, 170, 85, 0.4);
  background: rgba(224, 170, 85, 0.08);
  text-align: initial;
}

.tip-title {
  margin: 0 0 0.3rem;
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 600;
}

.tip p,
.noscript {
  margin: 0;
  color: var(--ink-soft);
}

.suno-row {
  margin: 0.4rem 0 0;
}

.suno {
  color: var(--amber-soft);
  font-size: 0.98rem;
  text-underline-offset: 0.2em;
}

.suno:hover {
  color: var(--ink);
}

.stations-heading {
  margin: 0 0 0.45rem;
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--amber-soft);
}

.station-list {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  padding-bottom: 0.2rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(224, 170, 85, 0.45) transparent;
}

.station {
  flex: none;
  min-height: 44px;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.station[aria-checked="true"] {
  border-color: var(--amber);
  background: rgba(224, 170, 85, 0.14);
  color: var(--amber-soft);
}

.station:hover {
  border-color: var(--amber);
  color: var(--amber-soft);
}

.queue {
  border-top: 1px solid rgba(224, 170, 85, 0.22);
  padding-top: 0.35rem;
}

.queue summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--amber-soft);
  list-style: none;
}

.queue summary::-webkit-details-marker {
  display: none;
}

.queue summary::after {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  margin-inline-end: 0.25rem;
  border-inline-end: 1.5px solid var(--amber);
  border-bottom: 1.5px solid var(--amber);
  transform: rotate(45deg) translateY(-0.1rem);
  flex: none;
}

.queue[open] summary::after {
  transform: rotate(225deg) translateY(-0.1rem);
}

.queue-count {
  margin-inline-start: auto;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
  color: var(--muted);
}

#queue-list {
  list-style: none;
  margin: 0.25rem 0 0;
  padding: 0;
  max-height: 50vh;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(224, 170, 85, 0.45) transparent;
}

#queue-list button {
  width: 100%;
  min-height: 48px;
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: 0.65rem;
  align-items: center;
  padding: 0.45rem 0.15rem;
  border: 0;
  border-bottom: 1px solid rgba(224, 170, 85, 0.14);
  background: transparent;
  color: var(--ink);
  text-align: start;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.2rem;
  line-height: 1.25;
}

#queue-list button:hover {
  color: var(--amber-soft);
}

.q-index {
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
  color: var(--amber);
}

.q-title {
  overflow-wrap: break-word;
}

.queue-note {
  margin: 0;
  padding: 0.8rem 0.15rem 0.4rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.colophon {
  margin-top: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(224, 170, 85, 0.18);
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
}

.colophon p {
  margin: 0.2rem 0;
}

@media (min-width: 960px) {
  .wrap {
    width: min(68rem, calc(100% - 4rem));
    padding-top: 1.75rem;
  }

  .layout {
    grid-template-columns: minmax(0, 28rem) minmax(18rem, 26rem);
    grid-template-areas:
      "player mast"
      "player stations"
      "player queue"
      "foot foot";
    justify-content: center;
    align-items: start;
    column-gap: 4rem;
    row-gap: 1.25rem;
  }

  .mast {
    text-align: start;
    padding-top: 0.35rem;
  }

  .mast .tagline,
  .mast .gift,
  .mast .blurb,
  .mast .meander {
    margin-left: 0;
    margin-right: 0;
  }

  .cover-frame {
    width: min(100%, 16.5rem);
  }

  h1 {
    font-size: clamp(2.6rem, 4vw, 3.6rem);
  }

  .player {
    position: sticky;
    top: 1.25rem;
  }

  .station-list {
    flex-wrap: wrap;
    overflow: visible;
  }

  #queue-list {
    max-height: min(46vh, 28rem);
  }

  .colophon {
    margin-top: 0.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html.is-playing .onair::before,
  .play:active:not(:disabled) {
    animation: none;
    transform: none;
  }

  button {
    transition: none;
  }
}
