:root {
  --bg: #f6efe4;
  --bg-deep: #efe5d7;
  --surface: rgba(255, 255, 255, 0.92);
  --ink: #18243a;
  --muted: #667085;
  --navy: #16345f;
  --navy-soft: #edf4ff;
  --yellow: #ffdb4d;
  --yellow-deep: #f3bc00;
  --purple-soft: #f4efff;
  --green-soft: #e8f7ee;
  --green: #24935d;
  --warn-bg: #fff4cf;
  --warn-ink: #8a6000;
  --danger-bg: #ffe5de;
  --danger-ink: #a14532;
  --line: rgba(22, 52, 95, 0.08);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Open Sans", system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, #fff1a4 0%, transparent 22%),
    radial-gradient(circle at top right, #eee4ff 0%, transparent 18%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button { font: inherit; }
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 24px 16px 32px;
}
.phone-wrap {
  position: relative;
  width: min(100vw - 40px, 390px);
  height: 720px;
}
.device-shadow {
  position: absolute;
  inset: 24px 16px -10px 16px;
  border-radius: 48px;
  background: rgba(18, 22, 30, 0.18);
  filter: blur(28px);
}
.phone-shell {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 10px;
  border-radius: 38px;
  background: linear-gradient(180deg, #21252f 0%, #080a10 100%);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.28);
}
.phone-notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 132px;
  height: 24px;
  border-radius: 0 0 16px 16px;
  background: #080a0f;
}
.screen {
  height: 100%;
  overflow-y: hidden;
  border-radius: 28px;
  padding: 12px 12px 14px;
  background: linear-gradient(180deg, #fffbf4 0%, #f6efe4 100%);
  scrollbar-width: none;
}
.screen::-webkit-scrollbar { display: none; }
.statusbar,
.topbar,
.clip-meta,
.coach-head,
.section-head,
.focus-header,
.button-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.statusbar {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 14px;
}
.status-icons { display: flex; gap: 6px; }
.topbar { margin-bottom: 10px; }
.topbar-copy { text-align: center; }
.topbar-copy p {
  margin: 0 0 4px;
  font-size: 12px;
  color: var(--muted);
}
.topbar-copy strong {
  font-size: 14px;
  color: var(--navy);
}
.icon-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,0.86);
  color: var(--navy);
}
.lesson-card,
.coach-card,
.timeline-card {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.9);
  box-shadow: 0 10px 28px rgba(42,49,69,0.08);
  border-radius: 24px;
  padding: 12px;
  margin-bottom: 8px;
}
.minimal-screen {
  padding: 10px;
}
.compact-hero h1 {
  font-size: 21px;
  margin-bottom: 6px;
}
.compact-hero .subcopy {
  font-size: 13px;
}
.minimal-screen h1 {
  font-size: 24px;
  margin-bottom: 8px;
}
.lesson-card {
  background: linear-gradient(180deg, #fff8cf 0%, #fff2bc 100%);
  border-color: rgba(255, 219, 77, 0.45);
}
.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 11px;
  font-weight: 800;
  color: var(--navy);
}
.eyebrow.soft { color: #6e59c4; }
h1, h2, h3 {
  font-family: "Fredoka", "Open Sans", system-ui, sans-serif;
  letter-spacing: -0.02em;
}
h1 {
  margin: 0 0 10px;
  font-size: 30px;
  line-height: 1.02;
}
h2 {
  margin: 2px 0 0;
  font-size: 18px;
  line-height: 1.05;
}
h3 {
  margin: 2px 0 0;
  font-size: 22px;
  line-height: 1.1;
}
.subcopy,
.coach-copy,
.translation,
.recovery-copy,
.caption-text {
  margin: 0;
  color: var(--muted);
  line-height: 1.35;
  font-size: 13px;
}
.video-card {
  margin-top: 14px;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(22,52,95,0.08);
  border-radius: 20px;
  overflow: hidden;
}
.minimal-video-card {
  margin-top: 8px;
}
.video-frame {
  position: relative;
  min-height: 124px;
  padding: 10px;
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,0.18), transparent 25%),
    linear-gradient(160deg, #173764 0%, #355f9e 55%, #7b5cff 100%);
}
.video-overlay {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.video-persona {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding-top: 2px;
}
.avatar-ring {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.16);
  border: 3px solid rgba(255,255,255,0.22);
}
.avatar-face {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 24px;
  background: linear-gradient(180deg, #ffeec8 0%, #f7dca3 100%);
}
.caption-chip {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.9);
  color: var(--navy);
  font-weight: 700;
  font-size: 12px;
}
.video-play {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 54px;
  height: 54px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  color: var(--navy);
  font-size: 20px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.18);
}
.clip-support {
  padding: 10px;
}
.minimal-clip-support {
  display: grid;
  gap: 8px;
  padding: 10px;
}
.single-cta {
  width: 100%;
}
.micro-reassurance {
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
  color: var(--muted);
}
.pill,
.state-badge,
.focus-chip {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  border-radius: 999px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 700;
}
.pill.active {
  background: var(--navy-soft);
  color: var(--navy);
}
.tiny-meta {
  color: var(--muted);
  font-size: 12px;
}
.phrase {
  display: block;
  margin: 6px 0 2px;
  font-size: 16px;
  line-height: 1.25;
}
.button-row {
  margin-top: 12px;
  justify-content: flex-start;
  flex-wrap: wrap;
}
.mini-btn,
.cta {
  border: none;
  border-radius: 16px;
  font-weight: 700;
}
.mini-btn {
  min-height: 40px;
  padding: 10px 12px;
  background: #f3f6fa;
  color: var(--ink);
}
.mini-btn.dark {
  background: var(--navy);
  color: white;
}
.coach-card {
  background: linear-gradient(180deg, #fffef8 0%, #fff7de 100%);
}
.state-badge {
  background: #f5f1ff;
  color: #5d47cb;
}
.wave-shell {
  margin-top: 8px;
  border-radius: 16px;
  padding: 10px 10px;
  background: #fffaf3;
  border: 1px solid #f0e2c5;
  text-align: center;
}
.wave-bars {
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 6px;
  height: 32px;
  margin-bottom: 8px;
}
.wave-bars span {
  width: 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, #a7c3ff 0%, #4f7ae6 100%);
  height: 16px;
  transition: height .2s ease, opacity .2s ease;
}
.wave-bars.active span:nth-child(1) { height: 24px; }
.wave-bars.active span:nth-child(2) { height: 38px; }
.wave-bars.active span:nth-child(3) { height: 30px; }
.wave-bars.active span:nth-child(4) { height: 46px; }
.wave-bars.active span:nth-child(5) { height: 34px; }
.wave-bars.active span:nth-child(6) { height: 40px; }
.wave-bars.active span:nth-child(7) { height: 22px; }
.wave-label {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}
.focus-note {
  margin-top: 8px;
  border-radius: 14px;
  padding: 10px;
  background: rgba(255,255,255,0.82);
  border: 1px solid rgba(22,52,95,0.08);
}
.focus-status {
  font-size: 12px;
  color: var(--muted);
}
#focusText {
  margin: 8px 0 0;
  color: var(--ink);
  line-height: 1.45;
}
.recovery-card {
  margin-top: 14px;
  padding: 14px;
  border-radius: 18px;
  background: #fffaf4;
  border: 1px solid #f1e1c7;
}
.recovery-title {
  margin: 0 0 6px;
  font-weight: 700;
  color: var(--danger-ink);
}
.peek-panel {
  margin-top: 10px;
  padding: 12px;
  border-radius: 14px;
  background: var(--purple-soft);
  color: var(--ink);
}
.button-stack {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}
.cta {
  min-height: 40px;
  padding: 8px 12px;
  font-size: 14px;
}
.cta.primary {
  background: linear-gradient(180deg, var(--yellow) 0%, var(--yellow-deep) 100%);
  color: #4d3900;
  box-shadow: 0 10px 22px rgba(241, 187, 0, 0.26);
}
.cta.secondary {
  background: var(--navy-soft);
  color: var(--navy);
}
.cta.ghost {
  background: var(--purple-soft);
  color: #5849bb;
}
.timeline {
  margin: 14px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 10px;
}
.timeline li {
  color: var(--muted);
}
.timeline li.active,
.timeline li.done {
  color: var(--ink);
  font-weight: 700;
}
.external-timeline,
.feedback-preview {
  width: min(100vw - 32px, 390px);
  background: rgba(255,255,255,0.88);
  border: 1px solid rgba(255,255,255,0.9);
  box-shadow: 0 10px 28px rgba(42,49,69,0.08);
  border-radius: 24px;
  padding: 18px;
}
.preview-phone {
  margin-top: 14px;
  border-radius: 26px;
  padding: 10px;
  background: linear-gradient(180deg, #20242d 0%, #0b0d12 100%);
}
.preview-screen {
  border-radius: 18px;
  padding: 14px;
  background: linear-gradient(180deg, #fffaf3 0%, #f7efe2 100%);
}
.preview-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.feedback-screen-card {
  border-radius: 22px;
  padding: 18px;
  background: linear-gradient(180deg, #fffef8 0%, #fff7de 100%);
  border: 1px solid #f0dfb8;
}
.feedback-label {
  margin: 0 0 8px;
  color: #6e59c4;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.feedback-screen-card h4 {
  margin: 0 0 8px;
  font-family: "Fredoka", "Open Sans", system-ui, sans-serif;
  font-size: 24px;
  line-height: 1.08;
}
.feedback-body,
.feedback-tip {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}
.feedback-word-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 0 8px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(22,52,95,0.08);
}
.feedback-word {
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
}
.feedback-tag {
  border-radius: 999px;
  padding: 8px 10px;
  background: var(--danger-bg);
  color: var(--danger-ink);
  font-size: 12px;
  font-weight: 700;
}
.feedback-actions {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}
.notes {
  width: min(100vw - 32px, 390px);
  text-align: center;
  color: #5e6676;
}
.caption-kicker {
  margin: 0 0 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 800;
  color: #6a63b8;
}
.hidden { display: none; }
.success {
  background: var(--green-soft);
  border-color: rgba(36, 147, 93, 0.16);
}
.warn {
  background: var(--warn-bg);
  color: var(--warn-ink);
}
@media (max-width: 420px) {
  h1 { font-size: 20px; }
  .phone-wrap { height: 680px; }
}
