:root {
  --bg-deep: #14110f;
  --bg-surface: #1d1815;
  --bg-card: rgba(34, 28, 24, 0.76);
  --bg-card-hover: rgba(46, 38, 32, 0.88);
  --border-warm: rgba(242, 184, 107, 0.14);
  --border-bright: rgba(242, 184, 107, 0.42);
  --amber: #f2b86b;
  --amber-deep: #d99543;
  --amber-glow: rgba(242, 184, 107, 0.26);
  --ink-primary: #f6ecd9;
  --ink-secondary: #b9a892;
  --ink-muted: #7f705e;
  --sage: #8ea88e;
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --font-serif: "Noto Serif SC", "Songti SC", "STSong", Georgia, serif;
  --font-sans: "Nunito", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  min-height: 100%;
  background-color: var(--bg-deep);
  color: var(--ink-primary);
  font-family: var(--font-sans);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Subtle warm paper & candlelight ambient background */
.ambient-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 22% 18%, rgba(242, 184, 107, 0.08), transparent 46%),
    radial-gradient(circle at 82% 80%, rgba(142, 168, 142, 0.06), transparent 48%),
    linear-gradient(180deg, #171310 0%, #120f0d 100%);
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
}
.orb-1 {
  width: 340px;
  height: 340px;
  top: -80px;
  left: -60px;
  background: rgba(232, 155, 72, 0.14);
}
.orb-2 {
  width: 380px;
  height: 380px;
  bottom: -120px;
  right: -80px;
  background: rgba(114, 144, 134, 0.11);
}

.app-shell {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  min-height: 100dvh;
  padding: max(14px, env(safe-area-inset-top)) 18px max(22px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Topbar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(242, 184, 107, 0.2), rgba(242, 184, 107, 0.06));
  border: 1px solid rgba(242, 184, 107, 0.25);
  color: var(--amber);
  display: grid;
  place-items: center;
  box-shadow: 0 4px 16px rgba(242, 184, 107, 0.1);
}
.brand-mark svg {
  width: 20px;
  height: 20px;
}

.brand-title {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink-primary);
  line-height: 1.2;
}
.brand-sub {
  display: block;
  font-size: 11px;
  color: var(--ink-muted);
  margin-top: 1px;
  white-space: nowrap;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.icon-pill {
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border-warm);
  color: var(--ink-secondary);
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.22s ease;
  backdrop-filter: blur(10px);
}
.icon-pill svg {
  width: 16px;
  height: 16px;
  color: var(--amber);
}
.icon-pill:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-bright);
  color: var(--ink-primary);
}

/* Main Stage Layout */
.stage {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
}

.player-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

/* Arched Treehouse Window */
.window-frame {
  width: 100%;
  max-width: 340px;
  padding: 8px;
  border-radius: 176px 176px 28px 28px;
  background: linear-gradient(180deg, rgba(242, 184, 107, 0.22) 0%, rgba(242, 184, 107, 0.05) 100%);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.55),
    0 0 40px rgba(242, 184, 107, 0.07);
}

.window-arch {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 4.4;
  border-radius: 168px 168px 22px 22px;
  overflow: hidden;
  background: #14110f;
}

.hero-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 46%;
  display: block;
  transition: transform 8s ease;
}
.is-playing .hero-art {
  transform: scale(1.035);
}

/* Breathing Nightlight Glow near brass lamp */
.lamp-glow {
  position: absolute;
  right: 14%;
  bottom: 14%;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 206, 122, 0.42) 0%, rgba(242, 166, 74, 0.14) 45%, transparent 72%);
  pointer-events: none;
  opacity: 0.45;
  mix-blend-mode: screen;
  transition: opacity 0.6s ease;
}
.is-playing .lamp-glow {
  animation: lampBreathe 5.5s ease-in-out infinite;
}

@keyframes lampBreathe {
  0%, 100% { transform: scale(0.94); opacity: 0.48; }
  50% { transform: scale(1.18); opacity: 0.88; }
}

.window-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(20, 17, 15, 0.18) 0%, transparent 24%, transparent 66%, rgba(20, 17, 15, 0.84) 100%);
}

/* Gentle Fireflies */
.fireflies {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1s ease;
}
.is-playing .fireflies {
  opacity: 1;
}
.ff {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #ffe09e;
  box-shadow: 0 0 10px 2px rgba(255, 214, 126, 0.75);
  animation: floatFirefly 8s ease-in-out infinite;
}
.ff-1 { left: 22%; top: 55%; animation-delay: 0s; animation-duration: 7.5s; }
.ff-2 { left: 68%; top: 44%; animation-delay: 1.8s; animation-duration: 9s; }
.ff-3 { left: 46%; top: 38%; animation-delay: 3.1s; animation-duration: 8.2s; }
.ff-4 { left: 78%; top: 62%; animation-delay: 4.5s; animation-duration: 7.2s; }
.ff-5 { left: 32%; top: 68%; animation-delay: 2.2s; animation-duration: 9.6s; }

@keyframes floatFirefly {
  0%, 100% { transform: translate(0, 0) scale(0.7); opacity: 0.15; }
  40% { transform: translate(8px, -18px) scale(1.15); opacity: 0.9; }
  75% { transform: translate(-6px, -28px) scale(0.85); opacity: 0.4; }
}

.window-overlay-meta {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.unit-tag {
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(20, 17, 15, 0.72);
  border: 1px solid rgba(242, 184, 107, 0.24);
  backdrop-filter: blur(8px);
  font-size: 11px;
  font-weight: 700;
  color: var(--amber);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.audio-status-dot {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--ink-secondary);
  background: rgba(20, 17, 15, 0.68);
  padding: 3px 9px;
  border-radius: 999px;
  backdrop-filter: blur(8px);
  white-space: nowrap;
}
.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sage);
  display: inline-block;
}
.is-playing .pulse-dot {
  background: var(--amber);
  box-shadow: 0 0 8px var(--amber);
  animation: dotPulse 1.8s ease-in-out infinite;
}
@keyframes dotPulse {
  0%, 100% { opacity: 0.5; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.25); }
}

/* Episode Title & Track Switcher */
.episode-header {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}

.episode-title {
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 700;
  color: var(--ink-primary);
  letter-spacing: 0.03em;
}
.episode-desc {
  font-size: 12.5px;
  color: var(--ink-secondary);
  margin-top: 2px;
}

.track-switcher {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 245, 230, 0.05);
  border: 1px solid var(--border-warm);
  width: 100%;
  max-width: 280px;
}

.track-tab {
  height: 36px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-secondary);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.25s ease;
}
.track-tab svg {
  width: 14px;
  height: 14px;
}
.track-tab.active {
  background: linear-gradient(135deg, rgba(242, 184, 107, 0.26), rgba(217, 149, 67, 0.16));
  color: var(--amber);
  box-shadow: inset 0 0 0 1px rgba(242, 184, 107, 0.36);
}

/* Compact Live Caption for Mobile */
.mobile-caption-box {
  width: 100%;
  max-width: 400px;
  min-height: 62px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-warm);
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
}
.caption-en {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--amber);
  min-height: 0;
}
.caption-en:empty {
  display: none;
}
.caption-zh {
  font-size: 13px;
  color: var(--ink-secondary);
}

/* Progress Bar */
.progress-wrap {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.progress-track {
  height: 20px;
  display: flex;
  align-items: center;
  cursor: pointer;
  position: relative;
}
.progress-track::before {
  content: "";
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: rgba(246, 236, 217, 0.12);
}

.progress-fill {
  position: absolute;
  left: 0;
  height: 4px;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--amber-deep), var(--amber));
  box-shadow: 0 0 12px rgba(242, 184, 107, 0.45);
  pointer-events: none;
}

.progress-knob {
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #fff3da;
  box-shadow: 0 0 10px rgba(242, 184, 107, 0.8);
}

.time-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

.timer-badge {
  color: var(--amber);
  background: rgba(242, 184, 107, 0.12);
  padding: 1px 8px;
  border-radius: 999px;
  font-weight: 700;
}

/* Blind-Tap Primary Controls */
.controls-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  margin-top: 2px;
}

.ctrl-btn {
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.18s ease, box-shadow 0.22s ease, background 0.22s ease;
}
.ctrl-btn:active {
  transform: scale(0.94);
}

.ctrl-secondary {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 245, 230, 0.05);
  border: 1px solid var(--border-warm);
  color: var(--ink-secondary);
  position: relative;
}
.ctrl-secondary svg {
  width: 21px;
  height: 21px;
}
.ctrl-secondary:hover {
  color: var(--ink-primary);
  border-color: var(--border-bright);
}
.ctrl-mini-label {
  position: absolute;
  font-size: 9px;
  font-weight: 800;
  bottom: -15px;
  color: var(--ink-muted);
}

.ctrl-play {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: linear-gradient(145deg, #f7ca86 0%, #df9842 100%);
  color: #1c1510;
  box-shadow:
    0 10px 28px rgba(223, 152, 66, 0.36),
    inset 0 2px 3px rgba(255, 250, 235, 0.55);
}
.ctrl-play svg {
  width: 28px;
  height: 28px;
}
.ctrl-play:hover {
  box-shadow:
    0 12px 34px rgba(242, 184, 107, 0.52),
    inset 0 2px 3px rgba(255, 250, 235, 0.65);
}
.ctrl-play.is-loading {
  opacity: 0.85;
  animation: loadingPulse 1.2s ease-in-out infinite;
}
@keyframes loadingPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(242, 184, 107, 0.5); }
  50% { box-shadow: 0 0 0 12px rgba(242, 184, 107, 0); }
}

/* Sleep Utility Dock */
.sleep-dock {
  width: 100%;
  max-width: 400px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 8px;
}

.dock-btn {
  height: 44px;
  padding: 0 8px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-warm);
  color: var(--ink-secondary);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.dock-btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  color: var(--ink-muted);
}
.dock-btn.active {
  background: rgba(242, 184, 107, 0.14);
  border-color: var(--border-bright);
  color: var(--amber);
}
.dock-btn.active svg {
  color: var(--amber);
}

/* Right Column: Firefly Word Cards + Transcript */
.story-column {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.panel-card {
  background: var(--bg-card);
  border: 1px solid var(--border-warm);
  border-radius: var(--radius-lg);
  padding: 16px;
  backdrop-filter: blur(12px);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}
.panel-head-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.panel-head h3 {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-primary);
}
.panel-hint {
  font-size: 11.5px;
  color: var(--ink-muted);
}
.head-svg {
  width: 16px;
  height: 16px;
  color: var(--amber);
}
.firefly-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 10px var(--amber);
}

/* Firefly Word Pills */
.word-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.word-pill {
  padding: 8px 13px;
  border-radius: 14px;
  background: rgba(255, 248, 236, 0.04);
  border: 1px solid rgba(242, 184, 107, 0.14);
  color: var(--ink-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  transition: all 0.3s ease;
  font-family: var(--font-sans);
}
.word-pill .w-en {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--ink-primary);
}
.word-pill .w-cn {
  font-size: 12px;
  color: var(--ink-muted);
}
.word-pill:hover {
  border-color: var(--border-bright);
  background: rgba(242, 184, 107, 0.1);
}
.word-pill.lit {
  background: linear-gradient(135deg, rgba(242, 184, 107, 0.24), rgba(217, 149, 67, 0.12));
  border-color: rgba(242, 184, 107, 0.72);
  box-shadow: 0 0 18px rgba(242, 184, 107, 0.28);
  transform: translateY(-1px);
}
.word-pill.lit .w-en {
  color: #ffe3b0;
}
.word-pill.lit .w-cn {
  color: var(--ink-primary);
}

/* Synchronized Transcript List */
.transcript-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 4px;
  scroll-behavior: smooth;
}
.transcript-list::-webkit-scrollbar {
  width: 5px;
}
.transcript-list::-webkit-scrollbar-thumb {
  background: rgba(242, 184, 107, 0.18);
  border-radius: 999px;
}

.t-line {
  padding: 11px 13px;
  border-radius: 13px;
  border: 1px solid transparent;
  background: rgba(255, 248, 236, 0.02);
  cursor: pointer;
  transition: all 0.25s ease;
}
.t-line:hover {
  background: rgba(255, 248, 236, 0.05);
}
.t-line.active {
  background: rgba(242, 184, 107, 0.12);
  border-color: rgba(242, 184, 107, 0.34);
}
.t-line-en {
  font-size: 15px;
  font-weight: 800;
  color: var(--amber);
  margin-bottom: 2px;
}
.t-line-zh {
  font-size: 13.5px;
  color: var(--ink-secondary);
}
.t-line.active .t-line-zh {
  color: var(--ink-primary);
}
.t-line-meta {
  font-size: 11px;
  color: var(--ink-muted);
  margin-top: 3px;
}

/* Episode Bookshelf Drawer */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(8, 6, 5, 0.72);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
}
.drawer-sheet {
  width: 100%;
  max-width: 560px;
  max-height: 82dvh;
  background: #1d1815;
  border: 1px solid var(--border-warm);
  border-radius: 24px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7);
}
.drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.drawer-header h3 {
  font-family: var(--font-serif);
  font-size: 17px;
  color: var(--ink-primary);
}
.drawer-header p {
  font-size: 12.5px;
  color: var(--ink-muted);
  margin-top: 2px;
}
.drawer-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border-warm);
  background: transparent;
  color: var(--ink-secondary);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.drawer-close svg {
  width: 16px;
  height: 16px;
}

.episode-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  padding-right: 4px;
}

.ep-item {
  width: 100%;
  text-align: left;
  padding: 13px 15px;
  border-radius: 16px;
  background: rgba(255, 248, 236, 0.03);
  border: 1px solid var(--border-warm);
  color: var(--ink-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: all 0.2s ease;
  font-family: var(--font-sans);
}
.ep-item:hover {
  background: rgba(242, 184, 107, 0.08);
  border-color: var(--border-bright);
}
.ep-item.current {
  background: rgba(242, 184, 107, 0.14);
  border-color: rgba(242, 184, 107, 0.55);
}
.ep-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ep-code {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(242, 184, 107, 0.12);
  color: var(--amber);
  font-weight: 800;
  font-size: 14px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.ep-item-title {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 700;
}
.ep-item-sub {
  font-size: 12px;
  color: var(--ink-muted);
  margin-top: 2px;
}
.ep-badge {
  font-size: 11px;
  padding: 4px 9px;
  border-radius: 999px;
  font-weight: 700;
  flex-shrink: 0;
}
.ep-badge.ready {
  background: rgba(142, 168, 142, 0.18);
  color: #b7d4b7;
}
.ep-badge.preview {
  background: rgba(255, 248, 236, 0.06);
  color: var(--ink-muted);
}

/* Bedside Nightlight Dim Mode */
.dim-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: #080605;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  cursor: pointer;
  animation: fadeIn 0.45s ease;
}
.dim-orb {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(242, 184, 107, 0.42) 0%, rgba(217, 149, 67, 0.12) 48%, transparent 74%);
  animation: lampBreathe 6.5s ease-in-out infinite;
}
.dim-info {
  text-align: center;
}
.dim-title {
  font-family: var(--font-serif);
  font-size: 16px;
  color: rgba(246, 236, 217, 0.48);
}
.dim-sub {
  font-size: 12px;
  color: rgba(185, 168, 146, 0.34);
  margin-top: 6px;
}

/* Soft Toast */
.soft-toast {
  position: fixed;
  left: 50%;
  bottom: max(28px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 90;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(34, 28, 24, 0.94);
  border: 1px solid rgba(242, 184, 107, 0.36);
  color: var(--ink-primary);
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
  white-space: nowrap;
}

.hidden {
  display: none !important;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Desktop & iPad Landscape: Cinematic 2-Column Layout */
@media (min-width: 920px) {
  .app-shell {
    padding: 22px 36px 28px;
    gap: 22px;
  }

  .stage {
    grid-template-columns: 400px 1fr;
    gap: 32px;
    align-items: start;
  }

  .window-frame {
    max-width: 356px;
  }

  .mobile-caption-box {
    display: none;
  }

  .transcript-list {
    max-height: 490px;
  }

  .drawer-backdrop {
    align-items: center;
  }
}

/* Compact mobile viewport height polish */
@media (max-width: 480px) {
  .window-frame {
    max-width: 264px;
  }
  .window-arch {
    aspect-ratio: 4 / 4.15;
  }
  .episode-title {
    font-size: 19px;
  }
}

/* Multi-grade switcher bar */
.radio-grade-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 14px;
}
.radio-grade-pill {
  border: 1px solid rgba(242, 184, 107, 0.22);
  background: rgba(34, 28, 24, 0.72);
  color: rgba(245, 232, 214, 0.8);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
}
.radio-grade-pill:hover {
  border-color: rgba(242, 184, 107, 0.55);
  color: #fff6e8;
}
.radio-grade-pill.active {
  background: linear-gradient(135deg, #e59a47, #cc7628);
  color: #1a130e;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(229, 154, 71, 0.28);
}
