:root {
  color-scheme: dark;
  --bg: #050506;
  --panel: #111114;
  --panel-2: #17181d;
  --text: #ffffff;
  --muted: #c8c8c8;
  --soft: #8f929b;
  --border: #2a2b31;
  --accent: #ff6268;
  --accent-2: #ff7272;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.45);
}

:root[data-theme="light"] {
 color-scheme: light;
 --bg: #f3f3f3;
  --panel: #ffffff;
  --panel-2: #f7f7f7;
  --text: #161616;
  --muted: #484848;
  --soft: #6a6d75;
  --border: #d8d8d8;
  --accent: #800000;
  --accent-2: #aa1717;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.14);
}

:root[data-theme="dim"] {
  color-scheme: dark;
  --bg: #242b32;
  --panel: #242b32;
  --panel-2: #1f252c;
  --text: #ffffff;
  --muted: #c9ced4;
  --soft: #aeb6bf;
  --border: rgba(255, 255, 255, 0.13);
  --accent: #ff6268;
  --accent-2: #ff7272;
  --shadow: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Libre Franklin", "Inter", Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.topbar {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 22px;
  background: rgba(26, 26, 26, 0.94);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(14px);
  z-index: 10;
}

.brand {
  color: var(--accent);
  font-family: Cinzel, Georgia, serif;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
}

.brand:hover,
.brand:focus {
  color: var(--accent);
}

.topbarMeta {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.audio-shell {
	min-height: 100vh;
	padding: 0;
  display: grid;
  justify-items: stretch;
  align-items: start;
  background: var(--bg);
}

:root[data-theme="light"] .audio-shell {
  background: var(--bg);
}

.player-panel {
  width: 100%;
  max-height: none;
  min-height: 100vh;
  overflow: auto;
  background: var(--panel);
  border: 0;
  border-radius: 0;
  box-shadow: none;
	padding: 12px 0 0;
	margin-bottom: 0;
}

.eyebrow,
.track-label,
.resume-label {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(30px, 4.4vw, 54px);
  line-height: 1;
  letter-spacing: 0;
}

.now-playing {
  padding: 0 0 26px;
}

.disc-mark {
  display: none;
  width: 128px;
  aspect-ratio: 1;
  border: 1px solid var(--border);
  place-items: center;
  background:
    radial-gradient(circle, var(--panel) 0 16%, transparent 17%),
    repeating-radial-gradient(circle, rgba(255,255,255,0.08) 0 1px, transparent 1px 10px),
    linear-gradient(145deg, #23242a, #070708);
}

:root[data-theme="light"] .disc-mark {
  background:
    radial-gradient(circle, #ffffff 0 16%, transparent 17%),
    repeating-radial-gradient(circle, rgba(0,0,0,0.08) 0 1px, transparent 1px 10px),
    linear-gradient(145deg, #f2f2f2, #d9d9d9);
}

.disc-mark span {
  width: 18px;
  aspect-ratio: 1;
  background: var(--accent);
}

.track-copy h2 {
  margin-bottom: 0;
  font-size: 18px;
  line-height: 1.18;
}

#trackMeta {
  display: none;
}

.track-copy p:last-child,
.resume-card p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.5;
}

.resume-card {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
  padding: 16px 18px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.resume-card[hidden] {
  display: none;
}

.resume-card button,
.quick-load button {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #ffffff;
  padding: 10px 16px;
  font-weight: 750;
  border-radius: 6px;
}

.audio-selectors {
  display: grid;
  gap: 9px;
  padding: 0 0 16px;
}

.audio-selectors[hidden] {
  display: none;
}

.audio-selectors:empty {
  display: none;
}

.mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-2);
}

.mode-switch[hidden] {
  display: none;
}

.mode-switch button {
  min-height: 34px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.mode-switch button[aria-pressed="true"] {
  background: var(--accent);
  color: #ffffff;
}

.audio-choice {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.audio-choice[hidden] {
  display: none;
}

.audio-choice-nested {
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 6px;
}

.choice-mark {
  color: var(--soft);
  font-size: 17px;
  line-height: 1;
  text-align: center;
}

.audio-choice-plain {
  grid-template-columns: minmax(0, 1fr);
}

.audio-choice-plain select {
  width: 100%;
}

.radio-options-panel {
  display: grid;
  gap: 9px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.radio-options-panel[hidden] {
  display: none;
}

.radio-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.radio-option[hidden] {
  display: none;
}

.radio-option input {
  min-height: 0;
  padding: 0;
}

.audio-choice select {
  min-height: 34px;
  padding: 6px 30px 6px 10px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.audio-choice select:focus,
.audio-choice select:focus-visible {
  outline: none;
}

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

.controls {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.time-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.seek-bar {
  width: 100%;
  margin: 0;
  accent-color: var(--accent);
  display: block;
  appearance: none;
  background: transparent;
  height: 22px;
}

.seek-bar::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--muted) 56%, transparent);
}

.seek-bar::-webkit-slider-thumb {
  appearance: none;
  width: 16px;
  height: 16px;
  margin-top: -6px;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
}

.seek-bar::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--muted) 56%, transparent);
}

.seek-bar::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
}

.seek-bar:focus,
.seek-bar:focus-visible {
  outline: none;
}

.button-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding-top: 14px;
}

.audio-shell.is-radio-mode .button-row {
  justify-content: flex-start;
}

.audio-shell.is-radio-mode #backButton,
.audio-shell.is-radio-mode #previousButton,
.audio-shell.is-radio-mode #forwardButton,
.audio-shell.is-radio-mode .utility-row,
.audio-shell.is-radio-mode .playlist-panel {
  display: none;
}

.icon-button,
.play-button,
.text-button {
  border: 1px solid var(--border);
  color: var(--text);
  background: var(--panel-2);
}

.icon-button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 8px;
}

.icon-button svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
}

.play-button {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  border-radius: 8px;
}

.play-button svg {
  width: 27px;
  height: 27px;
  fill: currentColor;
}

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

.is-playing .pause-icon {
  display: block;
}

.utility-row {
  display: flex;
  align-items: end;
  gap: 12px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.speed-control {
  display: none !important;
}

.utility-row label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

select,
input {
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
  padding: 10px 12px;
  min-height: 42px;
  outline: none;
  border-radius: 8px;
}

select:focus,
input:focus,
button:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}

.text-button {
  min-height: 42px;
  padding: 0 14px;
  font-weight: 750;
  border-radius: 8px;
}

.text-button[aria-pressed="true"] {
  color: #ffffff;
  background: var(--accent);
  border-color: var(--accent);
}

.disclosure-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.disclosure-mark {
  width: 12px;
  height: 12px;
  position: relative;
  flex: 0 0 12px;
}

.disclosure-mark::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 1px;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid currentColor;
}

.disclosure-button[aria-expanded="false"] .disclosure-mark::before {
  top: 1px;
  left: 4px;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 6px solid currentColor;
  border-right: 0;
}

.quick-load {
  display: none !important;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.quick-load label {
  display: none;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.quick-load-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.playlist-panel {
  padding-top: 18px;
}

.playlist-panel[hidden] {
  display: none;
}

.playlist-panel ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.track-item {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  padding: 12px 14px;
  text-align: left;
  border-radius: 8px;
}

.track-item:hover,
.track-item.is-current {
  border-color: color-mix(in srgb, var(--accent) 62%, var(--border));
  background: color-mix(in srgb, var(--accent) 13%, transparent);
}

.track-number {
  color: var(--accent);
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.track-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 550;
}

.track-status {
  color: var(--soft);
  font-size: 13px;
}

@media (max-width: 680px) {
  .topbar {
    display: none;
    min-height: 54px;
    padding: 10px 16px;
  }

  .brand {
    font-size: 18px;
  }

  .topbarMeta {
    display: none;
  }

  .audio-shell {
    padding: 0;
    justify-items: stretch;
    align-items: start;
  }

  .player-panel {
    max-height: none;
    min-height: 100vh;
    padding: 12px 0 0;
  }

  .now-playing {
    grid-template-columns: 1fr;
  }

  .disc-mark {
    width: min(112px, 42vw);
  }

  .button-row {
    gap: 8px;
  }

  .icon-button {
    width: 40px;
    height: 40px;
  }

  .play-button {
    width: 58px;
    height: 58px;
  }

  .utility-row,
  .resume-card {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .quick-load-row {
    grid-template-columns: 1fr;
  }
}
