:root {
  --bg: #f2ecdf;
  --panel: rgba(255, 251, 242, 0.88);
  --ink: #1e1a16;
  --muted: #6b635b;
  --line: rgba(30, 26, 22, 0.12);
  --accent: #9f2f22;
  --accent-strong: #7a1f18;
  --shadow: 0 20px 60px rgba(63, 43, 24, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(159, 47, 34, 0.14), transparent 28%),
    radial-gradient(circle at bottom right, rgba(119, 92, 47, 0.16), transparent 30%),
    linear-gradient(180deg, #efe6d6 0%, #f8f4eb 100%);
  font-family: "Trebuchet MS", "Gill Sans", sans-serif;
}

a {
  color: var(--accent-strong);
}

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

.hero {
  padding: 12px 0 18px;
}

.compact-hero {
  padding-bottom: 8px;
}

.eyebrow {
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
  color: var(--muted);
}

h1, h2 {
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: -0.02em;
  margin: 0;
}

h1 {
  font-size: clamp(2.4rem, 4vw, 4.6rem);
  line-height: 0.96;
  max-width: 12ch;
}

h2 {
  font-size: 1.45rem;
}

.hero-copy,
.latest-text,
.audio-card p {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
  max-width: 72ch;
}

.panel {
  background: var(--panel);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 22px;
  margin-top: 18px;
}

.panel-header,
.form-row,
.card-head,
.card-meta,
.detail-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.generate-form {
  display: grid;
  gap: 12px;
}

.progress-panel {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
}

.progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 0.95rem;
}

.progress-track {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(30, 26, 22, 0.1);
}

.progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  transition: width 0.35s ease;
}

.progress-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

label {
  font-weight: 700;
  letter-spacing: 0.03em;
}

select,
textarea {
  width: 100%;
  border: 1px solid rgba(30, 26, 22, 0.18);
  border-radius: 20px;
  padding: 18px;
  font: inherit;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
}

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

.card-title {
  display: grid;
  gap: 4px;
}

button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 14px 22px;
  font: inherit;
  font-weight: 700;
  color: #fffaf2;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  cursor: pointer;
}

button:disabled {
  opacity: 0.65;
  cursor: wait;
}

.delete-button {
  padding: 10px 14px;
  background: transparent;
  color: var(--accent-strong);
  border: 1px solid rgba(159, 47, 34, 0.24);
}

.status-text,
.card-meta,
.panel-header span {
  color: var(--muted);
  font-size: 0.95rem;
}

.audio-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.audio-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.74);
}

.card-head {
  align-items: flex-start;
}

.card-head a {
  font-weight: 700;
  text-decoration: none;
}

audio {
  width: 100%;
  margin-top: 12px;
}

.latest-panel audio {
  margin-top: 8px;
}

.big-meta {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-top: 18px;
}

.detail-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-top: 12px;
}

.is-hidden {
  display: none;
}

.empty-state {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 20px, 1120px);
    padding-top: 24px;
  }

  .panel,
  select,
  textarea {
    border-radius: 18px;
  }

  .panel-header,
  .form-row,
  .card-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .progress-row {
    flex-direction: column;
    align-items: flex-start;
  }
}
