:root {
  color-scheme: light;
  --bg: #f4efe4;
  --panel: rgba(255, 250, 241, 0.88);
  --ink: #1a2233;
  --muted: #526077;
  --line: rgba(26, 34, 51, 0.12);
  --accent: #c84d2f;
  --accent-strong: #9d3118;
  --shadow: 0 24px 60px rgba(32, 23, 16, 0.12);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(200, 77, 47, 0.14), transparent 28%),
    radial-gradient(circle at top right, rgba(40, 92, 127, 0.14), transparent 24%),
    linear-gradient(180deg, #f9f3e7 0%, #efe5d2 100%);
}

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

.hero,
.feed-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.hero {
  padding: 18px 22px 20px;
  text-align: center;
}

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

h1,
h2 {
  margin: 0;
  font-weight: 700;
}

h1 {
  font-size: clamp(38px, 7vw, 64px);
  line-height: 0.92;
  letter-spacing: -0.04em;
}

.hero-subtitle {
  margin: 8px 0 0;
  font-size: clamp(16px, 2.4vw, 22px);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

.summary,
#feedHint {
  color: var(--muted);
  max-width: 720px;
  font-size: 18px;
  line-height: 1.5;
}

.summary {
  margin: 10px auto 0;
  max-width: 640px;
  font-size: 16px;
}

.controls {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

button {
  border: 0;
  border-radius: 999px;
  padding: 14px 22px;
  font: inherit;
  font-size: 15px;
  cursor: pointer;
  transition: transform 120ms ease, opacity 120ms ease, background 120ms ease;
}

button:hover {
  transform: translateY(-1px);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  transform: none;
}

.primary {
  background: var(--accent);
  color: #fff7f0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.secondary {
  background: rgba(255, 255, 255, 0.76);
  color: var(--ink);
  border: 1px solid var(--line);
}

.button-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  font-size: 14px;
  line-height: 1;
  font-family: "Segoe UI Symbol", "Arial Unicode MS", sans-serif;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

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

.label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}

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

.feed-panel {
  margin-top: 20px;
  padding: 24px;
}

.feed-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-bottom: 20px;
}

.story-list {
  display: grid;
  gap: 16px;
}

.story-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 18px;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.74);
}

.story-card.is-current {
  border-color: rgba(200, 77, 47, 0.45);
  box-shadow: inset 0 0 0 1px rgba(200, 77, 47, 0.2);
}

.story-image {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(200, 77, 47, 0.16), rgba(40, 92, 127, 0.16));
}

.story-copy h3 {
  margin: 0 0 8px;
  font-size: 28px;
  font-family: "Segoe UI", "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
  unicode-bidi: plaintext;
  word-break: break-word;
}

.story-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.story-copy p {
  margin: 0 0 12px;
  line-height: 1.55;
  font-family: "Segoe UI", "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
  unicode-bidi: plaintext;
  word-break: break-word;
}

.inline-flag {
  display: inline-block;
  width: 1.15em;
  height: 1.15em;
  vertical-align: -0.15em;
}

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

.pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(26, 34, 51, 0.07);
  color: var(--ink);
}

.pill.ready {
  background: rgba(41, 124, 77, 0.14);
  color: #1d6e43;
}

.pill.missing {
  background: rgba(127, 62, 40, 0.12);
  color: #7a3d20;
}

@media (max-width: 820px) {
  .shell {
    width: min(100vw - 20px, 100%);
    padding-top: 12px;
  }

  .hero,
  .feed-panel {
    padding: 18px;
  }

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

  .feed-header,
  .story-card {
    grid-template-columns: 1fr;
    display: grid;
  }

  .story-image {
    max-width: 220px;
  }
}
