:root {
  color-scheme: light;
  --bg: #f7f7f4;
  --surface: #ffffff;
  --surface-strong: #171717;
  --text: #1d1d1f;
  --muted: #6b6b72;
  --line: #dfdfd8;
  --accent: #1f7a68;
  --accent-strong: #14594c;
  --warn: #9a4f12;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  min-height: 44px;
  padding: 0 16px;
}

button:disabled {
  opacity: 0.5;
}

.danger-button {
  background: #9a3412;
}

.top-actions,
.topbar form {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.ghost-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  padding: 0 14px;
  text-decoration: none;
}

.compact-link {
  min-height: 36px;
  padding: 0 12px;
}

.compact-button {
  min-height: 34px;
  padding: 0 12px;
}

.ghost-button {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}

.topbar,
.app-shell {
  width: min(980px, calc(100% - 32px));
  max-width: calc(100% - 32px);
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 0 12px;
}

.topbar-title,
.login-heading {
  display: grid;
  gap: 8px;
}

.instance-badge {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid #a8d4c8;
  border-radius: 999px;
  background: #eaf7f2;
  color: #14594c;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
  padding: 0 10px;
  white-space: nowrap;
}

.instance-badge-production {
  border-color: #e0b58c;
  background: #fff3e8;
  color: #8a3b0f;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: clamp(26px, 6vw, 42px);
  line-height: 1.05;
}

h2 {
  font-size: 22px;
  line-height: 1.2;
}

h3 {
  font-size: 17px;
  line-height: 1.3;
}

.eyebrow {
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.app-shell {
  display: grid;
  gap: 16px;
  padding: 12px 0 40px;
}

.player-surface,
.queue-section,
.login-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 0;
}

.notice {
  background: #edf7f4;
  border: 1px solid #b8d8ce;
  border-radius: 8px;
  color: var(--accent-strong);
  padding: 12px 14px;
}

.notice-error {
  background: #fff4ef;
  border-color: #efc3ad;
  color: #9a3412;
}

.player-surface {
  display: grid;
  gap: 18px;
  padding: 18px;
}

.topbar > *,
.app-shell > *,
.player-surface > *,
.queue-section > * {
  min-width: 0;
}

.now-playing {
  display: grid;
  gap: 8px;
}

.now-playing p:last-child,
.script-card p,
.episode-item small,
.voice-card p {
  color: var(--muted);
}

audio {
  display: block;
  max-width: 100%;
  min-width: 0;
  width: 100%;
}

.playback-row,
.button-row,
.toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.waiting-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #b8d8ce;
  border-radius: 8px;
  background: #edf7f4;
  padding: 12px;
}

.waiting-panel p:last-child,
.waiting-actions span {
  color: var(--muted);
}

.waiting-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.waiting-actions button[data-waiting-audio-button] {
  background: #f3f0e8;
  color: #101010;
}

.toggle-row {
  min-height: 44px;
  color: var(--muted);
}

.timer-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.timer-grid section {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.timer-state {
  margin-top: 10px;
  color: var(--muted);
}

.queue-section {
  padding: 16px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.section-heading span {
  color: var(--muted);
  min-width: 0;
}

.episode-list,
.script-list {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.voice-list {
  display: grid;
  gap: 12px;
}

.episode-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 76px;
  background: #f4f4ef;
  color: var(--text);
  text-align: left;
}

.episode-item.is-active {
  outline: 2px solid var(--accent);
  background: #edf7f4;
}

.episode-item span:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.episode-meta {
  display: grid;
  gap: 4px;
  justify-items: end;
  color: var(--muted);
  font-size: 13px;
}

.episode-meta em {
  color: var(--warn);
  font-style: normal;
}

.script-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  min-width: 0;
}

.script-card > *,
.script-card dl,
.script-card dl div,
.inline-action {
  min-width: 0;
}

.episode-chip-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.episode-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  padding: 0 9px;
}

.refill-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.refill-status-grid > div {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbf7;
  padding: 12px;
  min-width: 0;
}

.refill-status-grid small,
.muted-inline {
  color: var(--muted);
}

.muted-inline {
  font-size: 12px;
  font-weight: 600;
}

.auto-log {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbf7;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  margin: 0;
  padding: 12px;
  white-space: pre-wrap;
}

.stock-card-list {
  display: grid;
  gap: 10px;
}

.stock-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbf7;
}

.stock-card summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 72px;
  padding: 12px;
  cursor: pointer;
  list-style: none;
}

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

.stock-card summary span:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.stock-card small,
.stock-card-body p {
  color: var(--muted);
}

.stock-counts {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  white-space: nowrap;
}

.stock-counts b {
  color: var(--text);
}

.stock-counts em {
  color: var(--accent-strong);
  font-style: normal;
  font-size: 13px;
}

.stock-card-body {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding: 12px;
}

.stock-control,
.stock-control form {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.stock-control span {
  color: var(--muted);
  font-weight: 700;
}

.stock-control strong {
  min-width: 2ch;
  text-align: center;
}

.order-list {
  display: grid;
  gap: 10px;
}

.order-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfbf7;
}

.order-row > div:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.order-row small {
  color: var(--muted);
}

.compact-spec-form {
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbf7;
  padding: 12px;
}

.advanced-panel {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.advanced-panel > summary {
  cursor: pointer;
  color: var(--accent-strong);
  font-weight: 700;
}

.proposal-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.proposal-preview-grid article {
  display: grid;
  gap: 10px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfbf7;
}

.proposal-preview-grid pre,
.json-preview {
  overflow: auto;
  max-height: 420px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f4f4ef;
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
  padding: 12px;
  white-space: pre-wrap;
  word-break: break-word;
}

.script-summary {
  display: grid;
  gap: 12px;
}

.script-summary p {
  color: var(--muted);
  line-height: 1.6;
}

.human-summary {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbf7;
  padding: 12px;
}

.human-summary ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 20px;
}

.human-summary li {
  line-height: 1.6;
}

.safety-summary {
  background: #edf7ef;
  border-color: #bdd7c2;
}

.script-summary dl,
.script-card dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.script-summary dl div,
.script-card dl div {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 10px;
}

.script-summary dt,
.script-summary dd,
.script-card dt,
.script-card dd {
  margin: 0;
}

.script-summary dt,
.script-card dt {
  color: var(--muted);
  font-weight: 700;
}

.script-turn-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.script-turn {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.script-turn-list p {
  line-height: 1.8;
}

.script-turn-list p,
.script-turn-list .turn-meta {
  margin: 0;
}

.script-turn-list .turn-meta,
.turn-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.turn-meta {
  color: var(--muted);
  font-size: 13px;
}

.turn-meta strong {
  color: var(--text);
}

.turn-meta em {
  font-style: normal;
}

.script-turn-list .script-turn-listener {
  border-left-color: #8b6f47;
  background: #fbfaf7;
}

.turn-tags span {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  padding: 3px 8px;
}

.sample-text {
  color: var(--muted);
  line-height: 1.7;
}

.voice-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.voice-card-main {
  display: grid;
  gap: 12px;
}

.voice-card dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.voice-card dl div {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.voice-card dt,
.voice-card dd {
  margin: 0;
}

.voice-card dt {
  font-weight: 700;
}

.voice-actions {
  display: grid;
  align-content: start;
  gap: 10px;
}

.voice-actions audio {
  min-width: 0;
}

.sample-state {
  color: var(--muted);
  font-size: 13px;
}

.empty-state {
  color: var(--muted);
  padding: 14px 0;
}

.status-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  background: #f7f7f2;
}

.status-card.success {
  border-color: #bdd7c2;
  background: #edf7ef;
}

.voice-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  gap: 12px;
  align-items: end;
}

.voice-form label,
.preset-form label,
.preset-edit-form label,
.script-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
}

.voice-form select,
.preset-form select,
.preset-form input,
.preset-edit-form select,
.preset-edit-form input,
.script-form input,
.script-form select,
.script-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.voice-form select,
.preset-form select,
.preset-form input,
.preset-edit-form select,
.preset-edit-form input,
.script-form input,
.script-form select {
  min-height: 44px;
  padding: 0 10px;
}

.script-form textarea {
  min-height: 180px;
  resize: vertical;
  padding: 10px;
  line-height: 1.6;
}

.script-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.theme-suggestion-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.theme-suggestion {
  display: grid;
  gap: 4px;
  align-content: start;
  min-height: 92px;
  background: #f4f4ef;
  color: var(--text);
  text-align: left;
}

.theme-suggestion small {
  color: var(--muted);
  line-height: 1.4;
}

.spec-focus-card {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f7f7f2;
}

.spec-focus-card small,
.spec-focus-card span {
  color: var(--muted);
}

.spec-focus-card strong {
  color: var(--text);
  font-size: 20px;
}

.script-form-wide,
.script-form-actions {
  grid-column: 1 / -1;
}

.script-form .inline-check {
  display: flex;
  align-items: center;
  gap: 8px;
}

.script-form .inline-check input {
  width: auto;
  min-height: auto;
}

.script-form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.preset-form {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
}

.preset-list {
  display: grid;
  gap: 12px;
}

.preset-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.preset-edit-form {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr) repeat(2, minmax(0, 1fr)) auto;
  gap: 10px;
  align-items: end;
}

.preset-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.filter-form fieldset {
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 0;
  padding: 12px 14px 14px;
}

.filter-form fieldset {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 10px 14px;
  align-items: center;
}

.filter-form legend {
  color: var(--muted);
  font-size: 13px;
  padding: 0 4px;
}

.filter-form .filter-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  min-height: 28px;
  white-space: nowrap;
}

.filter-form .filter-check input {
  flex: 0 0 auto;
  margin: 0;
}

.filter-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.filter-favorite {
  justify-self: start;
}

.favorite-mark {
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 700;
}

.inline-action {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.inline-action span {
  color: var(--muted);
  font-size: 13px;
}

.script-card dl {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.script-card dt,
.script-card dd {
  display: inline;
  margin: 0;
  overflow-wrap: anywhere;
}

.script-card dt {
  font-weight: 700;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-panel {
  width: min(420px, 100%);
  display: grid;
  gap: 18px;
  padding: 22px;
}

.login-heading {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.login-form {
  display: grid;
  gap: 10px;
}

.login-form input {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
}

.error-text {
  color: #b42318;
}

.hint {
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 680px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .timer-grid {
    grid-template-columns: 1fr;
  }

  .voice-form {
    grid-template-columns: 1fr;
  }

  .filter-form {
    grid-template-columns: 1fr;
  }

  .preset-form,
  .preset-edit-form,
  .script-form {
    grid-template-columns: 1fr;
  }

  .proposal-preview-grid {
    grid-template-columns: 1fr;
  }

  .refill-status-grid {
    grid-template-columns: 1fr;
  }

  .stock-card summary {
    grid-template-columns: 1fr;
  }

  .voice-card {
    grid-template-columns: 1fr;
  }

  .episode-item {
    grid-template-columns: 1fr;
  }

  .waiting-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .waiting-actions {
    justify-content: flex-start;
  }

  .episode-meta {
    justify-items: start;
  }
}

.radio-home {
  --bg: #050505;
  --surface: #1f2022;
  --surface-strong: #f8f8f2;
  --text: #f6f3ec;
  --muted: #aaa7a1;
  --line: rgba(255, 255, 255, 0.14);
  --accent: #f4f1e8;
  --accent-strong: #ffffff;
  background: #050505;
  color: var(--text);
}

.radio-home .topbar,
.radio-home .app-shell {
  width: min(1120px, calc(100% - 32px));
  max-width: calc(100% - 32px);
}

.radio-home .topbar {
  padding: 28px 0 16px;
}

.radio-home .topbar form,
.radio-home .top-actions {
  gap: 8px;
}

.radio-home .brand-title {
  color: #ffffff;
  font-size: clamp(18px, 3.8vw, 26px);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  text-transform: uppercase;
}

.radio-home .ghost-link,
.radio-home .ghost-button {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.radio-home .instance-badge {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.radio-home .notice {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(43, 95, 83, 0.34);
  color: #ddfff4;
}

.radio-home .notice-error {
  background: rgba(127, 44, 24, 0.34);
  color: #ffe4d8;
}

.radio-home .pane-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.radio-home .pane-tabs button {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.74);
  font-weight: 900;
}

.radio-home .pane-tabs button.is-active {
  background: #f3f0e8;
  color: #101010;
}

.radio-home .home-pane {
  display: grid;
  gap: 16px;
}

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

.radio-home .player-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(260px, 0.78fr) minmax(0, 1.22fr);
  gap: 0;
  overflow: hidden;
  min-height: 430px;
  border: 0;
  border-radius: 30px;
  background: #161719;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.36);
  padding: 0;
}

.radio-home .hero-art {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 100%;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.10), rgba(0, 0, 0, 0.28)),
    radial-gradient(circle at 38% 28%, rgba(249, 225, 151, 0.92), transparent 26%),
    radial-gradient(circle at 68% 42%, rgba(89, 153, 143, 0.9), transparent 30%),
    linear-gradient(135deg, #446a73 0%, #9b8c5b 42%, #283726 100%);
  padding: 24px;
}

.radio-home .hero-primary-controls {
  display: flex;
  width: min(100%, 360px);
  gap: 12px;
}

.radio-home .hero-primary-controls button {
  flex: 1;
  min-height: 60px;
  border-radius: 999px;
  background: #f3f0e8;
  color: #101010;
  font-size: 18px;
  font-weight: 900;
}

.radio-home .hero-primary-controls .ghost-button {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(10, 10, 10, 0.46);
  color: #ffffff;
}

.radio-home .player-hero[data-current-category="tech_cafe"] .hero-art,
.radio-home .episode-card[data-program-category="tech_cafe"] .episode-art {
  background:
    radial-gradient(circle at 70% 28%, rgba(255, 117, 115, 0.86), transparent 24%),
    radial-gradient(circle at 24% 36%, rgba(247, 221, 137, 0.94), transparent 28%),
    linear-gradient(135deg, #1f4f63 0%, #243b52 48%, #111820 100%);
}

.radio-home .player-hero[data-current-category="space_romance"] .hero-art,
.radio-home .episode-card[data-program-category="space_romance"] .episode-art {
  background:
    radial-gradient(circle at 60% 34%, rgba(198, 192, 255, 0.92), transparent 22%),
    radial-gradient(circle at 28% 72%, rgba(119, 203, 223, 0.72), transparent 26%),
    linear-gradient(135deg, #151b3f 0%, #2f315f 46%, #0b0c17 100%);
}

.radio-home .player-hero[data-current-category="morning_brief"] .hero-art,
.radio-home .episode-card[data-program-category="morning_brief"] .episode-art {
  background:
    radial-gradient(circle at 34% 30%, rgba(255, 255, 255, 0.88), transparent 22%),
    radial-gradient(circle at 74% 72%, rgba(236, 181, 89, 0.9), transparent 30%),
    linear-gradient(135deg, #8ab6c5 0%, #d8bd79 48%, #596f4d 100%);
}

.radio-home .player-hero[data-current-category="personal_radio_devlog"] .hero-art,
.radio-home .episode-card[data-program-category="personal_radio_devlog"] .episode-art {
  background:
    radial-gradient(circle at 26% 70%, rgba(111, 190, 255, 0.72), transparent 28%),
    radial-gradient(circle at 70% 30%, rgba(231, 227, 177, 0.9), transparent 23%),
    linear-gradient(135deg, #112332 0%, #25495f 54%, #0d1116 100%);
}

.radio-home .hero-content {
  display: grid;
  align-content: center;
  gap: 22px;
  min-width: 0;
  padding: 34px;
}

.radio-home .now-playing {
  gap: 12px;
}

.radio-home .now-playing h2 {
  font-size: clamp(34px, 7vw, 58px);
  letter-spacing: 0;
  line-height: 1.02;
}

.radio-home .now-playing p:last-child {
  color: rgba(255, 255, 255, 0.78);
  font-size: 17px;
  line-height: 1.7;
}

.radio-home .hero-meta,
.radio-home .episode-chip-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.radio-home .hero-meta span,
.radio-home .episode-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  padding: 0 10px;
}

.radio-home audio {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
}

.radio-home .playback-row button,
.radio-home .button-row button {
  border-radius: 999px;
  background: #f3f0e8;
  color: #101010;
  font-weight: 800;
}

.radio-home .playback-row .ghost-button {
  background: rgba(255, 255, 255, 0.10);
  color: #ffffff;
}

.radio-home .timer-panel,
.radio-home .feedback-panel,
.radio-home .briefing-card,
.radio-home .pane-panel {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  padding: 16px;
}

.radio-home .timer-panel {
  display: grid;
  gap: 14px;
}

.radio-home .feedback-panel {
  display: grid;
  gap: 14px;
}

.radio-home .feedback-group {
  display: grid;
  gap: 8px;
}

.radio-home .feedback-group h3 {
  font-size: 17px;
}

.radio-home .feedback-help {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
  line-height: 1.5;
}

.radio-home .feedback-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.radio-home .feedback-chip-row button {
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
  font-weight: 900;
  padding: 0 12px;
}

.radio-home .feedback-chip-row button.is-sending {
  opacity: 0.62;
}

.radio-home .feedback-chip-row button.is-selected {
  border-color: rgba(243, 240, 232, 0.86);
  background: rgba(243, 240, 232, 0.20);
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(243, 240, 232, 0.22);
}

.radio-home .feedback-chip-row button.is-selected::after {
  content: "✓";
  margin-left: 7px;
}

.radio-home .feedback-chip-row button.is-saved {
  background: #f3f0e8;
  color: #101010;
}

.radio-home .feedback-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.radio-home .feedback-actions button {
  background: #f3f0e8;
  color: #101010;
}

.radio-home .feedback-state {
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
}

.radio-home .deep-dive-panel {
  display: grid;
  gap: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 14px;
}

.radio-home .deep-dive-panel[hidden] {
  display: none;
}

.radio-home .deep-dive-form {
  display: grid;
  gap: 12px;
}

.radio-home .deep-dive-form textarea {
  width: 100%;
  min-width: 0;
  resize: vertical;
}

.radio-home .timer-panel p:last-child,
.radio-home .briefing-card p:not(.eyebrow),
.radio-home .settings-card p:not(.eyebrow) {
  color: rgba(255, 255, 255, 0.70);
  line-height: 1.7;
}

.radio-home .timer-control-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  gap: 12px;
  align-items: end;
}

.radio-home .timer-control-grid label {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.radio-home .timer-control-grid span,
.radio-home .timer-actions span {
  color: rgba(255, 255, 255, 0.70);
  font-size: 13px;
  font-weight: 800;
}

.radio-home .timer-control-grid input[type="range"] {
  width: 100%;
  accent-color: #f3f0e8;
}

.radio-home .timer-number-label input {
  min-height: 44px;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.10);
  color: #ffffff;
  padding: 0 10px;
}

.radio-home .timer-actions,
.radio-home .settings-card-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.radio-home .timer-actions button {
  border-radius: 999px;
  background: #f3f0e8;
  color: #101010;
  font-weight: 900;
}

.radio-home .timer-actions .ghost-button {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.radio-home .briefing-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.radio-home .toggle-row,
.radio-home .timer-state,
.radio-home .waiting-panel p:last-child,
.radio-home .waiting-actions span {
  color: rgba(255, 255, 255, 0.72);
}

.radio-home .timer-grid section,
.radio-home .waiting-panel {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
}

.radio-home .queue-section {
  border: 0;
  background: transparent;
  padding: 10px 0 0;
}

.radio-home .section-heading {
  align-items: center;
  margin-bottom: 14px;
}

.radio-home .section-heading h2,
.radio-home .library-drawer summary strong {
  font-size: clamp(28px, 5vw, 44px);
  line-height: 1.05;
}

.radio-home .section-heading span,
.radio-home .library-drawer summary em {
  color: rgba(255, 255, 255, 0.64);
  font-style: normal;
}

.radio-home .queue-heading-meta {
  display: grid;
  justify-items: end;
  gap: 4px;
  min-width: 96px;
}

.radio-home .queue-card-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.radio-home .episode-card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  align-content: start;
  gap: 0;
  overflow: hidden;
  min-height: 286px;
  border-radius: 24px;
  background: #252628;
  color: #ffffff;
  padding: 0;
}

.radio-home .episode-card.is-active {
  outline: 3px solid rgba(255, 255, 255, 0.86);
  background: #2f3032;
}

.radio-home .episode-card.is-previewed {
  box-shadow: 0 0 0 2px rgba(245, 230, 187, 0.58);
}

.radio-home .episode-card.is-dragging {
  cursor: grabbing;
  opacity: 0.58;
  transform: scale(0.98);
}

.radio-home .queue-card-grid.is-reordering .episode-card {
  transition: transform 160ms ease, opacity 160ms ease;
}

.radio-home .drag-grip {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.86) 0 2px, transparent 2.5px) 9px 8px / 8px 8px,
    rgba(0, 0, 0, 0.28);
  cursor: grab;
  touch-action: none;
}

.radio-home .episode-art {
  display: block;
  min-height: 126px;
  background:
    radial-gradient(circle at 30% 30%, rgba(235, 221, 140, 0.9), transparent 24%),
    radial-gradient(circle at 70% 62%, rgba(117, 190, 160, 0.78), transparent 28%),
    linear-gradient(135deg, #384d55 0%, #7d7047 48%, #20261e 100%);
}

.radio-home .episode-card-body {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 16px 16px 4px;
}

.radio-home .episode-card strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 22px;
  line-height: 1.16;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.radio-home .episode-card small {
  display: -webkit-box;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.64);
  font-size: 14px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.radio-home .episode-card .episode-meta {
  justify-items: start;
  align-self: end;
  color: rgba(255, 255, 255, 0.7);
  padding: 0 16px 16px;
}

.radio-home .episode-card .episode-meta em {
  color: #f5d2a7;
}

.radio-home .queue-detail-card {
  grid-column: 1 / -1;
  display: grid;
  gap: 16px;
  margin-top: 0;
  border-radius: 22px;
  background: #202123;
  color: #ffffff;
  padding: 20px;
}

.radio-home .queue-detail-card[hidden] {
  display: none;
}

.radio-home .queue-detail-card h3 {
  font-size: clamp(24px, 4vw, 36px);
  line-height: 1.12;
}

.radio-home .queue-detail-card p {
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.7;
}

.radio-home .queue-detail-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.radio-home .queue-detail-chips span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  padding: 0 10px;
}

.radio-home .queue-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.radio-home .queue-detail-grid div {
  min-width: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  padding: 12px;
}

.radio-home .queue-detail-grid dt {
  color: rgba(255, 255, 255, 0.48);
  font-size: 12px;
}

.radio-home .queue-detail-grid dd {
  overflow-wrap: anywhere;
  color: rgba(255, 255, 255, 0.82);
  font-size: 15px;
}

.radio-home .queue-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.radio-home .queue-detail-actions button,
.radio-home .queue-detail-actions .ghost-link {
  min-height: 42px;
}

.radio-home .queue-detail-actions button {
  background: #f3f0e8;
  color: #101010;
  font-weight: 800;
}

.radio-home .queue-detail-actions .ghost-button,
.radio-home .queue-detail-actions .ghost-link {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.radio-home .library-drawer {
  margin-top: 10px;
}

.radio-home .library-drawer summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 76px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  cursor: pointer;
  list-style: none;
}

.radio-home .library-drawer summary::-webkit-details-marker {
  display: none;
}

.radio-home .library-drawer summary > span {
  display: grid;
  gap: 4px;
}

.radio-home .library-list {
  padding-top: 8px;
}

.radio-home .settings-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.radio-home .settings-card {
  display: grid;
  align-content: space-between;
  gap: 18px;
  min-height: 210px;
  border-radius: 20px;
  background: #202123;
  color: #ffffff;
  padding: 18px;
}

.radio-home .settings-card h3 {
  font-size: 22px;
}

.radio-home .settings-card-actions span {
  color: rgba(255, 255, 255, 0.64);
}

.radio-home .settings-stack {
  display: grid;
  gap: 18px;
}

.radio-home .settings-tab-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.radio-home .settings-tab-row button {
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-weight: 900;
}

.radio-home .settings-tab-row button.is-active {
  border-color: #f3f0e8;
  background: #f3f0e8;
  color: #101010;
}

.radio-home .settings-section,
.radio-home .settings-voice-card,
.radio-home .settings-bgm-card,
.radio-home .settings-proposal-card {
  border-radius: 18px;
  background: #202123;
  color: #ffffff;
}

.radio-home .settings-section {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.radio-home .settings-section[hidden] {
  display: none;
}

.radio-home .compact-heading h3 {
  font-size: 25px;
}

.radio-home .settings-filter-form,
.radio-home .settings-cast-form,
.radio-home .settings-tag-form {
  display: grid;
  gap: 12px;
}

.radio-home .settings-filter-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.radio-home .settings-filter-form fieldset,
.radio-home .settings-tag-form fieldset {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 12px;
}

.radio-home .settings-filter-form legend,
.radio-home .settings-tag-form legend {
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.radio-home .settings-favorite-check,
.radio-home .settings-filter-actions,
.radio-home .settings-cast-form,
.radio-home .settings-tag-form fieldset,
.radio-home .settings-wide-label {
  grid-column: 1 / -1;
}

.radio-home .settings-filter-actions,
.radio-home .settings-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.radio-home .settings-filter-actions button,
.radio-home .settings-inline-actions button,
.radio-home .settings-cast-form button,
.radio-home .settings-tag-form button {
  min-height: 38px;
  background: #f3f0e8;
  color: #101010;
  font-weight: 900;
}

.radio-home .settings-filter-actions .ghost-link,
.radio-home .settings-inline-actions .ghost-link,
.radio-home .settings-inline-actions .ghost-button {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.radio-home .settings-filter-actions button:disabled,
.radio-home .settings-inline-actions button:disabled,
.radio-home .settings-cast-form button:disabled,
.radio-home .settings-tag-form button:disabled {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.58);
  opacity: 1;
}

.radio-home .settings-cast-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  padding: 12px;
}

.radio-home .settings-cast-form label,
.radio-home .settings-wide-label {
  display: grid;
  gap: 6px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
}

.radio-home .settings-cast-form select,
.radio-home .settings-wide-label textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.radio-home .settings-cast-form select {
  min-height: 42px;
  padding: 0 10px;
}

.radio-home .settings-cast-form select option {
  color: #101010;
}

.radio-home .settings-wide-label textarea {
  min-height: 74px;
  padding: 10px;
  line-height: 1.55;
  resize: vertical;
}

.radio-home .settings-voice-list,
.radio-home .settings-bgm-list,
.radio-home .settings-proposal-list {
  display: grid;
  gap: 12px;
}

.radio-home .settings-voice-card,
.radio-home .settings-bgm-card,
.radio-home .settings-proposal-card {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 14px;
  scroll-margin-top: 16px;
}

.radio-home .settings-bgm-card:target {
  border-color: rgba(243, 240, 232, 0.7);
  box-shadow: 0 0 0 3px rgba(243, 240, 232, 0.12);
}

.radio-home .settings-card-main {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.radio-home .settings-card-main h4,
.radio-home .settings-proposal-card h4 {
  font-size: 18px;
}

.radio-home .settings-card-main p,
.radio-home .settings-proposal-card p,
.radio-home .settings-muted {
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.65;
}

.radio-home .settings-voice-card audio,
.radio-home .settings-bgm-card audio {
  width: 100%;
}

.radio-home .settings-bgm-meta {
  margin-top: 6px;
}

.radio-home .settings-proposal-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.radio-home .settings-proposal-card dl div {
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  padding: 10px;
}

.radio-home .settings-proposal-card dt {
  color: rgba(255, 255, 255, 0.54);
  font-size: 12px;
}

.radio-home .settings-proposal-card dd {
  margin: 4px 0 0;
  font-weight: 900;
}

.radio-home .library-dashboard,
.radio-home .library-stock-panel,
.radio-home .library-browser {
  border: 0;
  background: transparent;
  padding: 0;
}

.radio-home .inventory-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.radio-home .inventory-strip a,
.radio-home .library-action-card,
.radio-home .library-stock-card,
.radio-home .library-detail-card {
  border-radius: 18px;
  background: #202123;
  color: #ffffff;
}

.radio-home .inventory-strip a {
  display: grid;
  gap: 5px;
  min-width: 0;
  min-height: 76px;
  padding: 10px 12px;
  text-decoration: none;
}

.radio-home .inventory-strip small,
.radio-home .inventory-strip em,
.radio-home .library-action-card small,
.radio-home .library-stock-card small,
.radio-home .library-stock-counts em {
  color: rgba(255, 255, 255, 0.62);
}

.radio-home .inventory-strip strong {
  font-size: 24px;
  line-height: 1;
}

.radio-home .inventory-strip em {
  overflow: hidden;
  font-size: 12px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.radio-home .library-action-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.radio-home .library-stock-panel {
  margin-bottom: 14px;
}

.radio-home .library-action-card {
  display: grid;
  gap: 8px;
  min-height: 134px;
  padding: 16px;
  text-decoration: none;
  text-align: left;
}

.radio-home .library-action-card strong {
  font-size: 23px;
}

.radio-home .library-schedule-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 48px;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 12px 16px;
  background: #f4f1e8;
  color: #101010;
  text-decoration: none;
}

.radio-home .library-schedule-button span {
  font-weight: 800;
}

.radio-home .library-schedule-button small {
  min-width: 0;
  overflow: hidden;
  color: rgba(16, 16, 16, 0.62);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.radio-home .library-manual-panel,
.radio-home .library-schedule-panel {
  display: grid;
  gap: 12px;
  border-radius: 18px;
  padding: 16px;
  background: #202123;
  color: #ffffff;
}

.radio-home .library-manual-panel[hidden],
.radio-home .library-schedule-panel[hidden] {
  display: none;
}

.radio-home .library-settings-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.radio-home .library-settings-form label {
  display: grid;
  gap: 6px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 13px;
}

.radio-home .library-settings-form input,
.radio-home .library-settings-form select,
.radio-home .library-settings-form textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.radio-home .library-settings-form input,
.radio-home .library-settings-form select {
  min-height: 42px;
  padding: 0 10px;
}

.radio-home .library-settings-form textarea {
  min-height: 116px;
  padding: 10px;
  line-height: 1.55;
  resize: vertical;
}

.radio-home .library-settings-form select option {
  color: #101010;
}

.radio-home .library-settings-wide,
.radio-home .library-settings-actions {
  grid-column: 1 / -1;
}

.radio-home .library-settings-actions {
  display: flex;
  justify-content: flex-end;
}

.radio-home .library-settings-actions button {
  background: #f3f0e8;
  color: #101010;
  font-weight: 800;
}

.radio-home .library-schedule-card {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.05);
}

.radio-home .library-schedule-card[hidden] {
  display: none;
}

.radio-home .library-schedule-card h3 {
  font-size: 22px;
}

.radio-home .library-schedule-card p {
  color: rgba(255, 255, 255, 0.68);
}

.radio-home .library-config-detail {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.radio-home .library-config-detail summary {
  cursor: pointer;
  color: #ffffff;
  font-weight: 800;
}

.radio-home .library-config-detail[open] summary {
  margin-bottom: 12px;
}

.radio-home .library-schedule-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.radio-home .library-schedule-controls .inline-action {
  width: auto;
}

.radio-home .library-schedule-controls button {
  min-height: 40px;
  background: #f3f0e8;
  color: #101010;
  font-weight: 800;
}

.radio-home .library-schedule-controls .ghost-button {
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.radio-home .library-schedule-controls button:disabled {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.58);
  opacity: 1;
}

.radio-home .library-stock-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.radio-home .library-stock-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 14px;
  text-align: left;
  cursor: pointer;
}

.radio-home .library-stock-card.needs-stock {
  box-shadow: inset 0 0 0 1px rgba(245, 210, 167, 0.36);
}

.radio-home .library-stock-card.is-selected {
  border-color: rgba(245, 230, 187, 0.72);
  background: #2a2925;
}

.radio-home .library-stock-card > div:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.radio-home .library-stock-card strong,
.radio-home .library-stock-card small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.radio-home .library-stock-counts {
  display: grid;
  justify-items: end;
  flex: 0 0 auto;
  gap: 4px;
}

.radio-home .library-stock-counts span {
  color: #ffffff;
  font-weight: 900;
}

.radio-home .script-card {
  border: 0;
  background: #202123;
  border-radius: 20px;
  color: #ffffff;
}

.radio-home .library-episode-card {
  width: 100%;
  cursor: pointer;
  text-align: left;
}

.radio-home .library-episode-card[hidden] {
  display: none;
}

.radio-home .library-episode-card.is-previewed {
  box-shadow: 0 0 0 2px rgba(245, 230, 187, 0.58);
}

.radio-home .library-episode-card.is-queued {
  background: #252a27;
}

.radio-home .library-played-list .library-episode-card {
  background: #1b1c1e;
}

.radio-home .library-empty-state {
  grid-column: 1 / -1;
}

.radio-home .library-empty-state[hidden] {
  display: none;
}

.radio-home .script-card p,
.radio-home .script-card dl,
.radio-home .inline-action span {
  color: rgba(255, 255, 255, 0.64);
}

.radio-home .script-card .ghost-link {
  min-height: 38px;
}

.radio-home .script-card .danger-button {
  background: #783016;
  color: #fff;
}

.radio-home .library-detail-card {
  grid-column: 1 / -1;
  display: grid;
  gap: 16px;
  padding: 20px;
}

.radio-home .library-detail-card[hidden] {
  display: none;
}

.radio-home .library-detail-card h3 {
  font-size: clamp(24px, 4vw, 36px);
  line-height: 1.12;
}

.radio-home .library-detail-card p {
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.7;
}

.radio-home .library-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.radio-home .library-detail-actions .inline-action {
  width: auto;
}

.radio-home .library-detail-actions button,
.radio-home .library-detail-actions .ghost-link {
  min-height: 40px;
}

.radio-home .library-detail-actions button {
  background: #f3f0e8;
  color: #101010;
  font-weight: 800;
}

.radio-home .library-detail-actions button:disabled {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.58);
  opacity: 1;
}

.radio-home .library-detail-actions .ghost-link {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.radio-home .library-detail-actions .danger-button {
  background: #783016;
  color: #ffffff;
}

@media (max-width: 760px) {
  .radio-home .topbar form {
    justify-content: flex-start;
  }

  .radio-home .player-hero {
    grid-template-columns: 1fr;
    min-height: 0;
    border-radius: 24px;
  }

  .radio-home .hero-art {
    min-height: 180px;
    padding: 18px;
  }

  .radio-home .hero-primary-controls button {
    min-height: 54px;
    font-size: 16px;
  }

  .radio-home .hero-content {
    padding: 18px;
  }

  .radio-home .now-playing h2 {
    font-size: 28px;
  }

  .radio-home .now-playing p:last-child {
    font-size: 15px;
  }

  .radio-home .queue-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .radio-home .episode-card {
    min-height: 252px;
    border-radius: 20px;
  }

  .radio-home .episode-art {
    min-height: 96px;
  }

  .radio-home .episode-card-body {
    padding: 12px 12px 4px;
  }

  .radio-home .episode-card strong {
    font-size: 18px;
  }

  .radio-home .episode-card small {
    font-size: 13px;
  }

  .radio-home .episode-card .episode-meta {
    padding: 0 12px 12px;
  }

  .radio-home .queue-detail-grid {
    grid-template-columns: 1fr;
  }

  .radio-home .timer-control-grid,
  .radio-home .settings-card-grid,
  .radio-home .settings-filter-form,
  .radio-home .settings-cast-form,
  .radio-home .settings-proposal-card dl {
    grid-template-columns: 1fr;
  }

  .radio-home .settings-card-main {
    align-items: flex-start;
    flex-direction: column;
  }

  .radio-home .settings-tab-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .radio-home .settings-tab-row button {
    min-height: 40px;
    padding: 0 8px;
  }

  .radio-home .briefing-card {
    align-items: stretch;
    flex-direction: column;
  }

  .radio-home .inventory-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .radio-home .library-action-grid {
    grid-template-columns: 1fr;
  }

  .radio-home .library-settings-form {
    grid-template-columns: 1fr;
  }

  .radio-home .library-stock-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .radio-home .library-stock-counts {
    justify-items: start;
  }
}
