/* Cream on near-black. Dark only, so the cream logo always reads. */
@font-face {
  font-family: "Cianchlo";
  src: url("/fonts/cianchlo.otf") format("opentype");
  font-display: swap;
}
:root {
  --cream: #faf6ec;
  --bg: #121212; --fg: var(--cream); --muted: var(--cream); --line: #2e2c28;
  --card: #1b1a18; --accent: var(--cream); --accent-fg: #121212; --chip: #2a2824;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 14px/1.5 "IBM Plex Mono", "Courier New", monospace; }
main { max-width: 760px; margin: 0 auto; padding: 24px 16px 64px; }
a { color: inherit; }
h1 { margin: 0; font: 400 64px/1 "Cianchlo", serif; color: var(--cream); letter-spacing: 0.01em; }
h2 { font-size: 14px; margin: 0 0 8px; }
.tag, .status, .muted { color: var(--muted); }
.tag { margin: -2px 0 0; font-size: 12px; }

.listen { display: grid; justify-items: center; padding: 56px 0 36px; }
.listen-btn {
  position: relative; width: 180px; height: 180px; border-radius: 50%; border: 0;
  /* Solid cream in the middle, fading out to the page colour at the edge */
  background: radial-gradient(circle closest-side, var(--cream) 0%, rgb(250 246 236 / 1) 80%, rgb(250 246 236 / 0.98) 83%, rgb(250 246 236 / 0.92) 86%, rgb(250 246 236 / 0.8) 89%, rgb(250 246 236 / 0.62) 92%, rgb(250 246 236 / 0.4) 95%, rgb(250 246 236 / 0.18) 97.5%, rgb(250 246 236 / 0) 100%);
  color: var(--accent-fg); font-family: inherit; font-size: 12px; line-height: 1.2; font-weight: 400; cursor: pointer;
}
.listen-btn:disabled { cursor: progress; }
.listen-btn .ring { position: absolute; inset: -8px; border-radius: 50%; border: 2px solid var(--accent); opacity: 0; }
.listen-btn.on .ring { animation: pulse 1.4s ease-out infinite; }
@keyframes pulse { from { transform: scale(0.95); opacity: 0.6; } to { transform: scale(1.2); opacity: 0; } }
.status { min-height: 1.5em; margin: 16px 0 0; text-align: center; font-size: 12px; }

.manual { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 12px 0; }
.manual summary { cursor: pointer; color: var(--muted); font-size: 12px; }
.manual form { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 8px; }
input, button { font: inherit; }
input[type=search], .manual input:not([type=file]) {
  flex: 1 1 160px; min-width: 0; padding: 8px 11px; font-size: 13px; border: 0; border-radius: 0;
  background: transparent; color: var(--fg); outline: none; -webkit-appearance: none; appearance: none;
}
input[type=search]:focus, .manual input:not([type=file]):focus { box-shadow: inset 0 0 0 1px var(--cream); }
input::placeholder { color: var(--muted); opacity: 0.6; }
.chips button {
  padding: 10px 16px; border: 0; border-radius: 8px; background: var(--accent); color: var(--accent-fg); cursor: pointer;
}
/* Search button: square, dashed, like the input boxes */
.manual button {
  display: inline-block; padding: 8px 15px; border: 0; border-radius: 0;
  background: transparent; color: var(--fg); font-size: 13px; line-height: 1.5; cursor: pointer;
}
.manual button:hover { box-shadow: inset 0 0 0 1px var(--cream); }

.track { display: flex; gap: 14px; align-items: center; margin: 20px 0 6px; }
.track img { width: 72px; height: 72px; border-radius: 6px; object-fit: cover; background: var(--chip); flex: none; }
.track h2 { font-size: 17px; margin: 2px 0 0; }
.track .artist { margin: 0 0 6px; font-size: 13px; }
.links { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; }

.summary { margin: 18px 0 6px; font-size: 14px; }
.summary small { display: block; font-size: 11px; color: var(--muted); opacity: 0.75; }
.stations { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 16px; }
.stations button, .chips button.off {
  border: 0; border-radius: 999px; padding: 3px 9px; background: var(--chip); color: var(--fg); font-size: 11px; cursor: pointer;
}
.chips button { border-radius: 999px; padding: 3px 10px; font-size: 11px; }
.stations button.active { background: var(--accent); color: var(--accent-fg); }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 8px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.toggle { font-size: 12px; color: var(--muted); }

.plays { list-style: none; margin: 0; padding: 0; }
.plays li { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.plays img, .plays .ph { width: 48px; height: 48px; border-radius: 4px; object-fit: cover; flex: none; background: var(--chip); }
.plays .body { min-width: 0; flex: 1; }
.plays .show { font-weight: 600; overflow-wrap: anywhere; text-decoration: none; }
.plays .show:hover { text-decoration: underline; }
.plays .meta, .plays .as { font-size: 11px; color: var(--muted); }
.plays .at { font-variant-numeric: tabular-nums; }
.badge { display: inline-block; font-size: 10px; padding: 1px 6px; border-radius: 4px; background: var(--chip); color: var(--muted); }
.more { width: 100%; margin-top: 12px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: none; color: var(--fg); cursor: pointer; }

.history { margin-top: 40px; }
.history ul { list-style: none; padding: 0; margin: 0; }
.history button { background: none; border: 0; padding: 6px 0; color: var(--fg); cursor: pointer; text-align: left; font: inherit; }
.history time { color: var(--muted); font-size: 11px; margin-left: 6px; }

/* Player */
body.playing main { padding-bottom: 260px; }
.player {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  background: var(--card); border-top: 1px solid var(--line); box-shadow: 0 -6px 24px rgb(0 0 0 / 0.25);
}
.player-head { display: flex; align-items: center; gap: 8px; max-width: 760px; margin: 0 auto; padding: 8px 16px; }
.np { flex: 1; min-width: 0; display: grid; }
.np b, .np span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np span { font-size: 11px; color: var(--muted); }
.np-btn {
  flex: none; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: none;
  color: var(--fg); font-size: 12px; text-decoration: none; cursor: pointer;
}
.player-frame { max-width: 760px; margin: 0 auto; padding: 0 16px 10px; }
.player-frame iframe { display: block; width: 100%; border: 0; border-radius: 6px; }
.player-frame .yt { height: 200px; }
.player-frame .sc { height: 120px; }
.player-frame .mc { height: 60px; }
.player-frame p { margin: 4px 0 8px; color: var(--muted); font-size: 12px; }

/* Play buttons in the list */
.plays li { align-items: flex-start; }
.plays .thumb { position: relative; flex: none; width: 48px; height: 48px; padding: 0; border: 0; background: none; cursor: pointer; }
.plays .thumb img, .plays .thumb .ph { width: 48px; height: 48px; }
.plays .thumb::after {
  content: "▶"; position: absolute; inset: 0; display: grid; place-items: center;
  color: var(--cream); background: rgb(0 0 0 / 0.35); border-radius: 4px; font-size: 14px;
}
.plays .thumb.noaudio::after { content: none; }
.plays li.now { background: var(--chip); }
.plays .show { background: none; border: 0; padding: 0; color: inherit; font: inherit; font-weight: 600; text-align: left; cursor: pointer; }
.plays .ext { font-size: 12px; color: var(--muted); text-decoration: none; margin-left: 4px; }

/* Tabs */
.tabs { display: flex; gap: 4px; margin: 32px 0 16px; border-bottom: 1px solid var(--line); }
.tabs button { padding: 6px 10px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; }
.tabs button[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--fg); font-weight: 600; }

/* Mixes well with */
.mix-intro { font-size: 12px; margin: 0 0 10px; }
.mix { list-style: none; margin: 0; padding: 0; }
.mix > li { padding: 10px 0; border-top: 1px solid var(--line); }
.mix .row { display: flex; gap: 10px; align-items: center; }
.mix .name { flex: 1; min-width: 0; }
.mix .name b { font-weight: 600; }
.mix .counts { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 2px; }
.mix .dig { flex: none; padding: 6px 12px; border: 0; border-radius: 8px; background: var(--accent); color: var(--accent-fg); font-family: inherit; font-size: 12px; cursor: pointer; }
.mix details { margin-top: 4px; font-size: 11px; }
.mix summary { cursor: pointer; color: var(--muted); }
.mix details ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; }
.mix details button { background: none; border: 0; padding: 0; color: var(--fg); font: inherit; text-align: left; cursor: pointer; }
.mix details button:hover { text-decoration: underline; }
.mix .links { margin-top: 4px; font-size: 11px; }
.history-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.history-head h2 { margin: 0; }
.player-frame .sc-big { height: 200px; }
.player-frame .tap-hint { margin: 0 0 8px; color: var(--cream); font-size: 12px; }
.track .ph { display: none; } /* no cover art (name searches): keep the text flush left */

/* Hand-drawn dashed outline, so the gaps can be wider than the browser's built-in dashed border.
   --dash is the dash length, --gap the space between dashes. */
input[type=search], .manual input:not([type=file]), .manual button {
  --dash: 4px; --gap: 6px;
  background-image:
    repeating-linear-gradient(90deg, var(--cream) 0 var(--dash), transparent var(--dash) calc(var(--dash) + var(--gap))),
    repeating-linear-gradient(90deg, var(--cream) 0 var(--dash), transparent var(--dash) calc(var(--dash) + var(--gap))),
    repeating-linear-gradient(180deg, var(--cream) 0 var(--dash), transparent var(--dash) calc(var(--dash) + var(--gap))),
    repeating-linear-gradient(180deg, var(--cream) 0 var(--dash), transparent var(--dash) calc(var(--dash) + var(--gap)));
  background-size: 100% 1px, 100% 1px, 1px 100%, 1px 100%;
  background-position: 0 0, 0 100%, 0 0, 100% 0;
  background-repeat: no-repeat;
}
.upload-link { text-decoration: underline; text-underline-offset: 2px; color: inherit; }
.file-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.mix .hear { display: flex; gap: 10px; align-items: center; margin-top: 6px; font-size: 12px; }
.mix .hear button { background: none; border: 0; padding: 0; color: var(--fg); font: inherit; cursor: pointer; }
.mix .hear-btn:hover, .mix .hear-next:hover { text-decoration: underline; }
.mix .hear-next { opacity: 0.7; }
.player-frame .yt-hint { margin: 6px 0 0; font-size: 11px; opacity: 0.7; }
.mix .hear-btn { text-align: left; }
.mix .hear-btn b { font-weight: 600; }
.mix .hear-next { white-space: nowrap; flex: none; }
.dug { margin: 48px 0 0; padding-top: 16px; border-top: 1px solid var(--line); font-size: 12px; text-align: center; opacity: 0.8; }
