:root {
  --bg-top: #150f10;
  --bg-bottom: #39211f;
  --panel: rgba(34, 18, 18, 0.88);
  --panel-border: rgba(255, 214, 160, 0.18);
  --text-main: #fff7ea;
  --text-muted: #e4cda9;
  --accent: #ffb24d;
  --accent-strong: #ff8f1f;
  --accent-soft: rgba(255, 178, 77, 0.16);
  --danger: #ff6b5a;
  --success: #8ee59a;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text-main);
  font-family: "Avenir Next", "Trebuchet MS", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255, 165, 89, 0.28), transparent 34%),
    radial-gradient(circle at top right, rgba(255, 115, 92, 0.18), transparent 24%),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 100% 14px;
  opacity: 0.4;
}

.page {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0 72px;
}

.hero {
  margin-bottom: 24px;
}

.hero-card,
.panel {
  border: 1px solid var(--panel-border);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 32px;
  padding: 34px;
  overflow: hidden;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.8rem;
}

h1,
h2 {
  margin: 0;
  font-family: "Baskerville", "Palatino Linotype", serif;
  letter-spacing: 0.02em;
}

h1 {
  font-size: clamp(2.6rem, 6vw, 4.9rem);
  line-height: 0.98;
}

.subtitle {
  max-width: 44rem;
  margin: 18px 0 0;
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

.api-note {
  margin: 26px 0 0;
  color: var(--text-main);
  font-weight: 700;
}

.api-note code {
  padding: 0.24rem 0.52rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--accent);
  font-family: "SFMono-Regular", "Menlo", monospace;
  font-size: 0.95em;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: -12% auto auto 48%;
  width: 320px;
  height: 320px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 178, 77, 0.16), transparent 68%);
  pointer-events: none;
}

.hero-card__copy,
.hero-card__player {
  position: relative;
  z-index: 1;
}

.hero-card__player {
  padding-left: 32px;
  border-left: 1px solid rgba(255, 255, 255, 0.09);
}

.dial {
  width: 126px;
  aspect-ratio: 1;
  margin-bottom: 24px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.25), transparent 16%),
    conic-gradient(from 220deg, #915a18, #f6c07a, #87510d, #f3c279, #915a18);
  box-shadow:
    inset 0 0 0 12px rgba(32, 20, 14, 0.36),
    inset 0 0 24px rgba(0, 0, 0, 0.3),
    0 18px 36px rgba(0, 0, 0, 0.35);
}

.status-row,
.queue-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
}

.status-led {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #6e4532;
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.03);
}

.status-led.is-live {
  background: var(--success);
  box-shadow:
    0 0 0 6px rgba(142, 229, 154, 0.08),
    0 0 22px rgba(142, 229, 154, 0.5);
}

.status-led.is-error {
  background: var(--danger);
  box-shadow:
    0 0 0 6px rgba(255, 107, 90, 0.08),
    0 0 22px rgba(255, 107, 90, 0.5);
}

.now-playing {
  margin-top: 18px;
}

.label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
}

.player-card__actions {
  position: relative;
  z-index: 1;
  margin-top: 26px;
}

.listen-button,
.submit-button {
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #26150a;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    opacity 160ms ease;
}

.listen-button:hover,
.submit-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(255, 143, 31, 0.28);
}

.listen-button:disabled,
.submit-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.listen-button {
  min-width: 180px;
  padding: 14px 22px;
  font-size: 1rem;
}

audio {
  display: block;
  width: 100%;
  margin-top: 14px;
  opacity: 0.92;
}

.content-stack {
  display: grid;
  gap: 24px;
}

.panel {
  padding: 28px;
}

.panel__header--split {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.panel__header p {
  margin: 10px 0 0;
  color: var(--text-muted);
  line-height: 1.55;
}

.greeting-form {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

.form-hint {
  min-height: 1.4em;
  margin: 18px 0 0;
  color: var(--text-muted);
  line-height: 1.45;
}

.form-hint.is-error {
  color: var(--danger);
}

.greeting-form label {
  display: grid;
  gap: 8px;
}

.greeting-form span {
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  padding: 14px 16px;
  background: rgba(255, 247, 234, 0.06);
  color: var(--text-main);
  font: inherit;
}

input:focus,
textarea:focus {
  outline: 2px solid rgba(255, 178, 77, 0.34);
  border-color: rgba(255, 178, 77, 0.3);
}

textarea {
  resize: vertical;
  min-height: 130px;
}

small {
  color: var(--text-muted);
}

.submit-button {
  justify-self: start;
  padding: 13px 22px;
}

.panel--full {
  width: 100%;
}

.form-notice {
  min-height: 1.3em;
  margin: 0;
  color: var(--text-muted);
}

.form-notice.is-success {
  color: var(--success);
}

.form-notice.is-error {
  color: var(--danger);
}

.hidden {
  display: none !important;
}

.greetings-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.greeting-item,
.empty-state {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.035);
}

.greeting-item__top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.greeting-item__name {
  margin: 0;
  font-weight: 700;
}

.greeting-item__meta {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.greeting-item__message {
  margin: 14px 0 0;
  line-height: 1.55;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--accent-soft);
  color: var(--accent);
}

.badge.is-playing {
  background: rgba(142, 229, 154, 0.14);
  color: var(--success);
}

.badge.is-played {
  background: rgba(255, 255, 255, 0.09);
  color: var(--text-main);
}

.badge.is-failed {
  background: rgba(255, 107, 90, 0.12);
  color: var(--danger);
}

@media (max-width: 860px) {
  .page {
    width: min(100% - 24px, 1120px);
    padding-top: 24px;
    padding-bottom: 40px;
  }

  .hero-card,
  .content-stack {
    grid-template-columns: 1fr;
  }

  .hero-card,
  .panel {
    padding: 22px;
    border-radius: 24px;
  }

  .hero-card__player {
    padding-left: 0;
    padding-top: 22px;
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.09);
  }

  .panel__header--split {
    flex-direction: column;
    align-items: flex-start;
  }

  .dial {
    width: 108px;
  }
}
