:root {
  --bg: #fff7ef;
  --ink: #26180f;
  --muted: #6e5a4f;
  --panel: rgba(255, 252, 248, 0.9);
  --line: rgba(58, 34, 17, 0.12);
  --orange: #ff8c42;
  --coral: #ff5f6d;
  --teal: #17b6a4;
  --yellow: #ffd34d;
  --sea: #49b7ff;
  --success: #13795b;
  --success-bg: #dff8ec;
  --warn: #9a5a00;
  --warn-bg: #ffe7b8;
  --verify: #9f295b;
  --verify-bg: #ffd6e7;
  --shadow: 0 18px 40px rgba(93, 51, 21, 0.12);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(circle at top left, #fff2b4 0, transparent 24%),
    radial-gradient(circle at top right, #ffd3c7 0, transparent 22%),
    linear-gradient(180deg, #fff9f4 0%, var(--bg) 46%, #fff2e4 100%);
  color: var(--ink);
  font-family: Inter, system-ui, sans-serif;
}

button {
  font: inherit;
  border: 0;
  cursor: pointer;
}

.app-shell {
  width: min(1180px, calc(100% - 24px));
  margin: 0 auto;
  padding: 18px 0 48px;
}

.hero-panel,
.panel {
  background: var(--panel);
  border: 3px solid rgba(57, 30, 15, 0.08);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.hero-panel {
  padding: 28px 22px;
  position: relative;
  overflow: hidden;
}

.hero-panel::after {
  content: "";
  position: absolute;
  inset: auto -18px -30px auto;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(255, 140, 66, 0.24), transparent 70%);
}

.eyebrow,
.section-kicker {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 800;
  font-size: 0.74rem;
  color: var(--coral);
}

h1, h2, h3 {
  margin: 0;
  text-wrap: pretty;
}

h1 {
  margin-top: 8px;
  font-family: "Baloo 2", system-ui, sans-serif;
  font-size: clamp(2.5rem, 7vw, 4.4rem);
  line-height: 0.95;
}

.hero-copy {
  max-width: 52rem;
  font-size: 1.04rem;
  line-height: 1.7;
  color: var(--muted);
}

.hero-actions,
.hero-stats,
.filter-row,
.scene-grid,
.split-panel {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-actions { margin-top: 18px; }
.hero-stats { margin-top: 18px; }

.primary-btn,
.ghost-btn,
.verify-btn,
.quiz-choice,
.pill {
  min-height: 46px;
  border-radius: 999px;
  padding: 0 16px;
  font-weight: 800;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.primary-btn {
  background: linear-gradient(135deg, var(--orange), var(--coral));
  color: white;
  box-shadow: 0 12px 22px rgba(255, 95, 109, 0.28);
}

.ghost-btn,
.pill {
  background: white;
  color: var(--ink);
  border: 2px solid rgba(39, 24, 15, 0.1);
}

.primary-btn:hover,
.ghost-btn:hover,
.verify-btn:hover,
.quiz-choice:hover,
.pill:hover {
  transform: translateY(-1px);
}

.stat-chip {
  background: white;
  border: 2px solid rgba(39, 24, 15, 0.08);
  border-radius: 20px;
  padding: 10px 14px;
  min-width: 132px;
}

.stat-chip strong {
  display: block;
  font-size: 1.1rem;
}

.panel {
  padding: 22px 18px;
  margin-top: 16px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-bottom: 18px;
}

.section-head h2 {
  font-family: "Baloo 2", system-ui, sans-serif;
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  line-height: 1;
}

.section-note {
  color: var(--muted);
  max-width: 26rem;
  font-size: 0.95rem;
}

.compact { margin-bottom: 14px; }

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

.scene-card,
.phrase-card,
.quiz-box,
.mini-card {
  background: white;
  border-radius: var(--radius-lg);
  border: 3px solid rgba(39, 24, 15, 0.08);
  box-shadow: 0 14px 28px rgba(86, 47, 18, 0.08);
}

.scene-card { overflow: hidden; }
.scene-copy { padding: 14px; }
.scene-copy p { color: var(--muted); margin: 6px 0 0; }

.scene-art {
  position: relative;
  height: 220px;
  background: linear-gradient(180deg, #bde9ff 0%, #fef4cc 100%);
  overflow: hidden;
}

.sun, .mountain, .sea, .sand, .stall, .counter, .bus, .road, .person, .wheel, .snack {
  position: absolute;
}

.sun {
  width: 72px;
  height: 72px;
  right: 18px;
  top: 16px;
  border-radius: 50%;
  background: #ffd146;
  box-shadow: 0 0 0 10px rgba(255, 209, 70, 0.25);
}
.mountain {
  width: 180px;
  height: 86px;
  left: 12px;
  top: 74px;
  background: #6ac17c;
  border-radius: 80px 80px 14px 14px;
}
.sea {
  inset: auto 0 42px 0;
  height: 68px;
  background: linear-gradient(180deg, #72d4ff, #309ee2);
}
.sand {
  inset: auto 0 0 0;
  height: 48px;
  background: #f7cd7b;
}
.person {
  width: 34px;
  height: 82px;
  border-radius: 20px;
  background: linear-gradient(180deg, #372318 0%, #ffa655 30%, #0d263f 31%, #0d263f 100%);
  bottom: 30px;
}
.person-a { left: 48px; }
.person-b { right: 28px; background: linear-gradient(180deg, #372318 0%, #f2b36e 30%, #ff6d75 31%, #ff6d75 100%); bottom: 20px; }

.bubble {
  position: absolute;
  max-width: 120px;
  padding: 10px 12px;
  background: white;
  border: 3px solid rgba(39, 24, 15, 0.09);
  border-radius: 18px;
  font-weight: 800;
  font-size: 0.88rem;
  line-height: 1.25;
}
.bubble.left { left: 14px; top: 18px; }
.bubble.right { right: 12px; top: 86px; }

.stall {
  left: 20px;
  top: 38px;
  width: 132px;
  height: 84px;
  background: linear-gradient(180deg, #ff8f48 0, #ff5f6d 100%);
  border-radius: 18px 18px 8px 8px;
}
.counter {
  left: 12px;
  bottom: 34px;
  width: 160px;
  height: 50px;
  background: #7d4e28;
  border-radius: 14px;
}
.snack {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ffca54;
  bottom: 64px;
}
.snack-a { left: 34px; }
.snack-b { left: 66px; }

.bus {
  left: 18px;
  top: 70px;
  width: 180px;
  height: 78px;
  background: linear-gradient(180deg, #ffd14e 0, #ff8c42 100%);
  border-radius: 24px 24px 14px 14px;
}
.bus::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 14px;
  width: 110px;
  height: 22px;
  background: rgba(255,255,255,0.75);
  border-radius: 10px;
}
.wheel {
  width: 28px;
  height: 28px;
  background: #1a1a1a;
  border-radius: 50%;
  bottom: 24px;
}
.wheel-one { left: 46px; }
.wheel-two { left: 142px; }
.road {
  inset: auto 0 0 0;
  height: 42px;
  background: #39424f;
}

.filter-row {
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.category-pills {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.pill.active {
  background: var(--ink);
  color: white;
}

.filter-meta {
  color: var(--muted);
  font-weight: 700;
}

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

.phrase-card {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.phrase-topline,
.phrase-footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.confidence-badge,
.category-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
}

.confidence-high { background: var(--success-bg); color: var(--success); }
.confidence-medium { background: var(--warn-bg); color: var(--warn); }
.confidence-verify { background: var(--verify-bg); color: var(--verify); }
.category-badge { background: #fff3e8; color: #a14e1d; }

.phrase-creole {
  font-family: "Baloo 2", system-ui, sans-serif;
  font-size: 1.7rem;
  line-height: 1;
}
.phrase-english { margin: 0; font-weight: 700; }
.phrase-note { margin: 0; color: var(--muted); font-size: 0.92rem; line-height: 1.5; }
.phrase-source { color: var(--muted); font-size: 0.82rem; }

.verify-btn {
  background: #fff4ee;
  color: #a14e1d;
  border: 2px solid rgba(161, 78, 29, 0.12);
}
.verify-btn.is-verified {
  background: var(--success-bg);
  color: var(--success);
  border-color: rgba(19, 121, 91, 0.16);
}

.split-panel {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 14px;
}

.quiz-box {
  padding: 16px;
  min-height: 320px;
}

.quiz-progress,
.quiz-result {
  color: var(--muted);
  font-weight: 700;
}

.quiz-question {
  margin: 8px 0 18px;
  font-family: "Baloo 2", system-ui, sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
}

.quiz-choices {
  display: grid;
  gap: 10px;
}

.quiz-choice {
  background: #fff8f0;
  border: 2px solid rgba(39, 24, 15, 0.08);
  text-align: left;
  padding: 14px 16px;
  border-radius: 18px;
}

.quiz-choice.correct { background: var(--success-bg); border-color: rgba(19, 121, 91, 0.2); }
.quiz-choice.wrong { background: var(--verify-bg); border-color: rgba(159, 41, 91, 0.18); }

.quiz-controls {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.checklist {
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.7;
}

.mini-card {
  padding: 16px;
  background: linear-gradient(180deg, #fff7e7 0, #fff1df 100%);
}

@media (max-width: 980px) {
  .scene-grid,
  .phrase-grid,
  .split-panel {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .app-shell { width: min(100% - 14px, 100%); }
  .hero-panel,
  .panel { border-radius: 24px; }
  .section-head,
  .filter-row { flex-direction: column; align-items: start; }
  .scene-grid,
  .phrase-grid,
  .split-panel {
    grid-template-columns: 1fr;
  }
  .phrase-creole { font-size: 1.5rem; }
  .scene-art { height: 210px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
