:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #17211d;
  background: #f4f2eb;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: radial-gradient(ellipse at 85% 8%, rgba(222, 176, 57, 0.2), transparent 32rem), #f4f2eb;
}

.radio-shell {
  width: min(100% - 2.5rem, 68rem);
  margin: 0 auto;
  padding: clamp(2rem, 8vw, 6rem) 0 2rem;
}

.masthead { max-width: 48rem; margin-bottom: clamp(2rem, 7vw, 5rem); }
.eyebrow { margin: 0 0 0.65rem; color: #9a7421; font-size: 0.72rem; font-weight: 850; letter-spacing: 0.19em; }
h1 { margin: 0; font-size: clamp(3rem, 8vw, 6.8rem); line-height: 0.96; letter-spacing: -0.075em; }
h1 em { color: #1f5b43; font-family: Georgia, serif; font-weight: 500; }
.intro { max-width: 30rem; margin: 1.35rem 0 0; color: #5c6861; font-size: 1.1rem; }

.listening-panel, .broadcaster-panel {
  border: 1px solid rgba(23, 33, 29, 0.12);
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 1rem 3rem rgba(23, 33, 29, 0.06);
}

.listening-panel { padding: clamp(1.25rem, 4vw, 2.5rem); }
.panel-heading { display: flex; align-items: center; gap: 1rem; }
.panel-heading h2, .broadcaster-panel h2 { margin: 0; font-size: clamp(1.5rem, 4vw, 2.1rem); letter-spacing: -0.045em; }
.panel-heading .eyebrow { margin-bottom: 0.25rem; }
.live-indicator { width: 0.85rem; height: 0.85rem; border-radius: 50%; background: #a7aaa6; box-shadow: 0 0 0 0.4rem #e9e9e4; }
.live-indicator.on-air { background: #d34032; box-shadow: 0 0 0 0.4rem #f9e3df; animation: pulse 1.6s infinite; }
#broadcast-state { margin: 1.5rem 0 1rem; color: #505c55; }
audio { width: 100%; }
.listener-count { margin-bottom: 0; color: #69756d; font-size: 0.9rem; }
.live-title { margin: 1rem 0 0.35rem; color: #1f5b43; font-size: clamp(1.15rem, 3vw, 1.6rem); font-weight: 800; }

.broadcaster-panel { display: grid; grid-template-columns: 1fr auto; gap: 1rem 2rem; align-items: center; margin-top: 1rem; padding: clamp(1.25rem, 4vw, 2.5rem); }
.broadcaster-panel .eyebrow { margin-bottom: 0.4rem; }
.broadcaster-panel p { max-width: 42rem; color: #5c6861; }
.broadcast-title-field { grid-column: 1 / -1; display: grid; gap: 0.45rem; color: #35443b; font-size: 0.9rem; font-weight: 750; }
.broadcast-title-field input { width: 100%; min-height: 3rem; padding: 0.7rem 0.9rem; border: 1px solid #c8cec8; border-radius: 0.55rem; background: white; color: #17211d; font: inherit; }
.broadcast-title-field input:focus-visible { outline: 3px solid rgba(31, 91, 67, 0.28); border-color: #1f5b43; }
.broadcast-title-field input:disabled { background: #eeefeb; color: #69756d; }
.actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 0.6rem; }
button { min-height: 2.9rem; padding: 0.7rem 1rem; border: 0; border-radius: 999px; background: #1f5b43; color: white; font: inherit; font-weight: 750; cursor: pointer; }
button:disabled { background: #a5ada7; cursor: not-allowed; }
.notice { grid-column: 1 / -1; margin: 0; padding-top: 1rem; border-top: 1px solid rgba(23, 33, 29, 0.1); font-size: 0.9rem; }
footer { padding: 2rem 0 0.5rem; color: #778078; font-size: 0.8rem; }

@keyframes pulse { 50% { box-shadow: 0 0 0 0.65rem rgba(211, 64, 50, 0.08); } }

@media (max-width: 680px) {
  .radio-shell { width: min(100% - 1.25rem, 38rem); padding-top: 2.25rem; }
  .broadcaster-panel { grid-template-columns: 1fr; }
  .actions { justify-content: flex-start; }
  button { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
