/* ===========================================================
   matcha — onboarding flow design system
   Light & creamy "matcha latte" theme
   =========================================================== */

:root {
  /* Surfaces */
  --cream:      #F4EFE1;   /* page background           */
  --cream-2:    #ECE5D2;   /* subtle panel              */
  --foam:       #FBF8EF;   /* lightest card surface     */
  --line:       #E0D8C2;   /* hairline borders          */
  --line-soft:  #EAE3D0;

  /* Matcha greens */
  --matcha:       #8BAE5D;
  --matcha-deep:  #6E9244;  /* button under-shadow      */
  --matcha-dark:  #51702F;  /* emphasis text            */
  --matcha-tint:  #E6EDD6;  /* fill behind matcha       */

  /* Ink / text */
  --ink:        #41402F;
  --ink-soft:   #8A876F;
  --ink-faint:  #B6B19A;

  /* Tile accents (warm, earthy, varied hue) */
  --clay:    #D08A5E;
  --gold:    #E0B252;
  --teal:    #5FA8A0;
  --plum:    #A57BA5;
  --sky:     #6E9BC9;

  /* Status */
  --heart:  #E06D6D;
  --gem:    #4FA6A6;
  --flame:  #E0A23C;

  --bamboo:      #C9A87A;
  --bamboo-dark: #B8946A;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: 'Nunito', system-ui, sans-serif;
  background: #DED6C2;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

/* ---------- Scaling stage ---------- */
.viewport {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(120% 120% at 50% 0%, #E6DEC9 0%, #D6CDB6 100%);
  overflow: hidden;
}
.stage {
  width: 1920px;
  height: 1080px;
  position: relative;
  transform-origin: center center;
  background: var(--cream);
  overflow: hidden;
  box-shadow: 0 40px 120px rgba(60,55,30,.25);
}

/* ---------- Screens ---------- */
.screen {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity .4s ease;
}
.screen.active { opacity: 1; pointer-events: auto; }

/* faint matcha-foam texture on cream screens */
.screen-pad { padding: 0 120px; }

/* ===========================================================
   Typography helpers
   =========================================================== */
.display {
  font-family: 'Baloo 2', sans-serif;
  font-weight: 800;
  letter-spacing: -.01em;
  line-height: 1.05;
  color: var(--ink);
}
.h-question {
  font-family: 'Baloo 2', sans-serif;
  font-weight: 700;
  font-size: 46px;
  color: var(--ink);
  text-align: center;
}

/* ===========================================================
   Buttons (chunky 3D, Duolingo-style but matcha)
   =========================================================== */
.btn {
  font-family: 'Baloo 2', sans-serif;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
  border: none;
  border-radius: 18px;
  cursor: pointer;
  user-select: none;
  transition: transform .06s ease, box-shadow .06s ease, filter .15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.btn:active { transform: translateY(3px); }

.btn-primary {
  background: var(--matcha);
  color: #fff;
  box-shadow: 0 6px 0 var(--matcha-deep);
  text-shadow: 0 1px 0 rgba(0,0,0,.12);
}
.btn-primary:hover { filter: brightness(1.04); }
.btn-primary:active { box-shadow: 0 3px 0 var(--matcha-deep); }

.btn-secondary {
  background: var(--foam);
  color: var(--matcha-dark);
  box-shadow: 0 5px 0 var(--line);
  border: 2px solid var(--line);
}
.btn-secondary:hover { background: #fff; }
.btn-secondary:active { box-shadow: 0 2px 0 var(--line); }

.btn-disabled {
  background: var(--cream-2);
  color: var(--ink-faint);
  box-shadow: 0 5px 0 var(--line-soft);
  cursor: not-allowed;
  pointer-events: none;
}

.btn-lg { font-size: 26px; padding: 22px 40px; min-width: 380px; }
.btn-md { font-size: 21px; padding: 16px 34px; }

/* ===========================================================
   Top bar (progress + back / close)
   =========================================================== */
.topbar {
  position: absolute;
  top: 46px;
  left: 70px;
  right: 70px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink-soft);
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 10px;
  flex: 0 0 auto;
}
.icon-btn:hover { background: rgba(0,0,0,.05); color: var(--ink); }
.icon-btn svg { width: 30px; height: 30px; }

.progress {
  flex: 1 1 auto;
  height: 20px;
  background: var(--cream-2);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--matcha);
  border-radius: 999px;
  position: relative;
  transition: width .5s cubic-bezier(.4,0,.2,1);
}
.progress-fill::after {
  content: "";
  position: absolute;
  top: 4px; left: 8px; right: 8px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255,255,255,.45);
}

/* ===========================================================
   Mascot (whisk / chasen) + speech bubble
   =========================================================== */
.whisk { display: block; }

/* Icon coloring: drive fill/stroke from inherited color (resolved at the
   svg element, i.e. the use-site) so it crosses the <use> boundary reliably.
   Whisk mascot svgs (viewBox 0 0 200 220) keep their own explicit colors. */
.stage svg:not([viewBox="0 0 200 220"]) { fill: currentColor; stroke: currentColor; }

.mascot-row {
  display: flex;
  align-items: flex-start;
  gap: 26px;
}
.bubble {
  position: relative;
  background: var(--foam);
  border: 2px solid var(--line);
  border-radius: 22px;
  padding: 26px 34px;
  font-family: 'Baloo 2', sans-serif;
  font-weight: 600;
  font-size: 30px;
  color: var(--ink);
  max-width: 720px;
  align-self: center;
}
.bubble::before, .bubble::after {
  content: "";
  position: absolute;
  left: -18px; top: 50%;
  transform: translateY(-50%);
  border-style: solid;
}
.bubble::before {
  border-width: 14px 18px 14px 0;
  border-color: transparent var(--line) transparent transparent;
}
.bubble::after {
  left: -14px;
  border-width: 12px 16px 12px 0;
  border-color: transparent var(--foam) transparent transparent;
}

/* speech bubble pointing DOWN (welcome / home) */
.bubble-down::before, .bubble-down::after { top: auto; left: 50%; }
.bubble-down::before {
  bottom: -18px; transform: translateX(-50%);
  border-width: 18px 14px 0 14px;
  border-color: var(--line) transparent transparent transparent;
}
.bubble-down::after {
  bottom: -14px; transform: translateX(-50%);
  border-width: 16px 12px 0 12px;
  border-color: var(--foam) transparent transparent transparent;
}

/* ===========================================================
   Choice cards (skill level / generic option lists)
   =========================================================== */
.choice-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 760px;
}
.choice {
  display: flex;
  align-items: center;
  gap: 26px;
  background: var(--foam);
  border: 2px solid var(--line);
  border-bottom-width: 5px;
  border-radius: 20px;
  padding: 26px 34px;
  cursor: pointer;
  transition: border-color .12s, background .12s, transform .06s;
  text-align: left;
}
.choice:hover { background: #fff; border-color: var(--matcha); }
.choice:active { transform: translateY(2px); }
.choice.selected {
  border-color: var(--matcha);
  background: var(--matcha-tint);
}
.choice-title {
  font-family: 'Baloo 2', sans-serif;
  font-weight: 700;
  font-size: 27px;
  color: var(--ink);
}
.choice.selected .choice-title { color: var(--matcha-dark); }

/* signal bars icon */
.bars { display: flex; align-items: flex-end; gap: 5px; height: 38px; flex: 0 0 auto; }
.bars i { width: 9px; border-radius: 3px; background: var(--ink-faint); display: block; }
.bars i:nth-child(1) { height: 30%; }
.bars i:nth-child(2) { height: 55%; }
.bars i:nth-child(3) { height: 78%; }
.bars i:nth-child(4) { height: 100%; }
.choice[data-level="1"] .bars i:nth-child(-n+1),
.choice[data-level="2"] .bars i:nth-child(-n+2),
.choice[data-level="3"] .bars i:nth-child(-n+3),
.choice[data-level="4"] .bars i:nth-child(-n+4) { background: var(--matcha); }

/* ===========================================================
   Topic tiles (what to learn)
   =========================================================== */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  width: 1080px;
}
.tile {
  background: var(--foam);
  border: 2px solid var(--line);
  border-bottom-width: 6px;
  border-radius: 22px;
  padding: 30px 26px 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  cursor: pointer;
  transition: transform .08s, border-color .12s, box-shadow .12s;
  text-align: center;
}
.tile:hover { transform: translateY(-3px); border-color: var(--matcha); box-shadow: 0 10px 24px rgba(80,90,50,.12); }
.tile:active { transform: translateY(0); }
.tile-ico {
  width: 96px; height: 96px;
  border-radius: 24px;
  display: grid; place-items: center;
  color: #fff;
  box-shadow: inset 0 -6px 0 rgba(0,0,0,.12);
}
.tile-ico svg { width: 54px; height: 54px; color: #fff; }
.tile-name { font-family: 'Baloo 2', sans-serif; font-weight: 700; font-size: 26px; color: var(--ink); }
.tile-sub  { font-weight: 700; font-size: 18px; color: var(--ink-soft); margin-top: -8px; }

.bg-green { background: var(--matcha); }
.bg-clay  { background: var(--clay); }
.bg-gold  { background: var(--gold); }
.bg-teal  { background: var(--teal); }
.bg-plum  { background: var(--plum); }
.bg-sky   { background: var(--sky); }

/* ===========================================================
   Achievement rows
   =========================================================== */
.ach-list { display: flex; flex-direction: column; width: 720px; }
.ach {
  display: flex; align-items: center; gap: 30px;
  padding: 34px 6px;
}
.ach + .ach { border-top: 2px solid var(--line); }
.ach-ico {
  width: 84px; height: 84px; border-radius: 20px;
  display: grid; place-items: center; flex: 0 0 auto;
  box-shadow: inset 0 -5px 0 rgba(0,0,0,.10);
}
.ach-ico svg { width: 46px; height: 46px; color: #fff; }
.ach-title { font-family: 'Baloo 2', sans-serif; font-weight: 700; font-size: 30px; color: var(--ink); }
.ach-desc  { font-weight: 600; font-size: 22px; color: var(--ink-soft); margin-top: 2px; }

/* ===========================================================
   Lesson — fill in the blanks
   =========================================================== */
.lesson-wrap { position: absolute; top: 150px; left: 0; right: 0; bottom: 150px; padding: 0 160px; }
.lesson-title { font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 50px; color: var(--ink); margin-bottom: 50px; }
.sentence {
  font-family: 'Baloo 2', sans-serif;
  font-weight: 600;
  font-size: 42px;
  line-height: 2.0;
  color: var(--ink);
  max-width: 1300px;
}
.blank {
  display: inline-block;
  min-width: 190px;
  height: 62px;
  vertical-align: middle;
  border-bottom: 3px solid transparent;
  margin: 0 6px;
  text-align: center;
  border-radius: 12px;
  background: rgba(0,0,0,.045);
  transition: background .12s;
  cursor: pointer;
}
.blank.filled {
  border: 2px solid var(--line);
  border-bottom-width: 4px;
  background: var(--foam);
  min-width: 170px;
  padding: 0 18px;
  height: 64px;
  line-height: 60px;
}
.blank.filled:hover { border-color: var(--clay); }

.chip-tray {
  position: absolute;
  left: 50%; bottom: 240px;
  transform: translateX(-50%);
  display: flex; gap: 22px; flex-wrap: wrap;
  justify-content: center;
  max-width: 1100px;
}
.chip {
  font-family: 'Baloo 2', sans-serif;
  font-weight: 600;
  font-size: 34px;
  color: var(--ink);
  background: var(--foam);
  border: 2px solid var(--line);
  border-bottom-width: 5px;
  border-radius: 16px;
  padding: 16px 30px;
  cursor: pointer;
  transition: transform .06s, opacity .15s;
}
.chip:hover { border-color: var(--matcha); }
.chip:active { transform: translateY(2px); }
.chip.used { opacity: 0; pointer-events: none; }

/* lesson footer */
.lesson-foot {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 150px;
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 0 80px;
  border-top: 2px solid var(--line);
  background: var(--cream);
  transition: background .2s, border-color .2s;
}
.lesson-foot.correct { background: #EAF1DC; border-color: #CADBA5; }
.foot-feedback { display: none; align-items: center; gap: 22px; }
.lesson-foot.correct .foot-feedback { display: flex; }
.check-badge {
  width: 80px; height: 80px; border-radius: 50%;
  background: #fff; display: grid; place-items: center;
}
.check-badge svg { width: 44px; height: 44px; color: var(--matcha); }
.foot-feedback b { font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 38px; color: var(--matcha-dark); }

/* ===========================================================
   Home — simplified course view
   =========================================================== */
.brand { display: flex; align-items: center; gap: 14px; }
.brand-name { font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 40px; color: var(--matcha); letter-spacing: -.01em; }

.home-simple {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  padding: 54px 0 0;
}
.home-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 100px;
  flex: 0 0 auto;
}
.home-head .brand { padding: 0; }
.ghost-link {
  font-family: 'Baloo 2',sans-serif; font-weight: 700; font-size: 20px;
  letter-spacing: .03em;
  color: var(--matcha-dark);
  background: none; border: 2px solid var(--line);
  border-radius: 999px; padding: 12px 28px; cursor: pointer;
  transition: background .12s, border-color .12s;
}
.ghost-link:hover { background: var(--foam); border-color: var(--matcha); }

.course {
  flex: 1 1 auto;
  width: 940px;
  margin: 0 auto;
  padding-top: 50px;
}
.course-intro { margin-bottom: 42px; }
.course-eyebrow {
  display: inline-flex; align-items: center; gap: 14px; white-space: nowrap;
  font-family: 'Baloo 2',sans-serif; font-weight: 700; font-size: 21px;
  letter-spacing: .03em; color: var(--ink-soft);
  margin-bottom: 20px;
}
.course-chip {
  width: 44px; height: 44px; border-radius: 13px;
  display: grid; place-items: center; color: #fff;
  box-shadow: inset 0 -4px 0 rgba(0,0,0,.12);
}
.course-title {
  font-family: 'Baloo 2',sans-serif; font-weight: 800; font-size: 58px;
  color: var(--ink); letter-spacing: -.01em; line-height: 1.04;
}
.course-sub {
  font-weight: 600; font-size: 25px; color: var(--ink-soft);
  margin-top: 18px; max-width: 760px; line-height: 1.5;
}

.steps { list-style: none; position: relative; }
.steps::before {
  content: ""; position: absolute;
  left: 35px; top: 46px; bottom: 46px; width: 3px;
  background: var(--line); border-radius: 2px;
}
.step {
  position: relative;
  display: flex; align-items: center; gap: 28px;
  padding: 14px 0;
  border-radius: 22px;
}
.step + .step { margin-top: 4px; }
.step.active {
  cursor: pointer;
  background: var(--foam);
  border: 2px solid var(--line);
  padding: 22px 30px;
  box-shadow: 0 6px 0 var(--line);
  transition: transform .06s, box-shadow .06s, border-color .12s;
}
.step.active:hover { border-color: var(--matcha); }
.step.active:active { transform: translateY(3px); box-shadow: 0 3px 0 var(--line); }

.step-mark {
  width: 70px; height: 70px; flex: 0 0 auto;
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: 'Baloo 2',sans-serif; font-weight: 800; font-size: 30px;
  background: var(--cream-2); color: var(--ink-faint);
  border: 5px solid var(--cream);
  z-index: 1;
}
.step.active .step-mark {
  background: var(--matcha); color: #fff;
  box-shadow: 0 5px 0 var(--matcha-deep);
  border-color: var(--foam);
}
.step-mark svg { width: 26px; height: 26px; }
.step-body { flex: 1 1 auto; }
.step-title {
  font-family: 'Baloo 2',sans-serif; font-weight: 700; font-size: 30px;
  color: var(--ink);
}
.step.locked .step-title { color: var(--ink-soft); }
.step-meta {
  font-weight: 700; font-size: 19px; color: var(--ink-faint);
  margin-top: 5px;
}
.step-cta {
  font-family: 'Baloo 2',sans-serif; font-weight: 800; font-size: 20px;
  letter-spacing: .08em; text-transform: uppercase;
  color: #fff; background: var(--matcha);
  box-shadow: 0 5px 0 var(--matcha-deep);
  border-radius: 14px; padding: 14px 30px;
  flex: 0 0 auto;
}

/* ===========================================================
   Guide — how to use Claude Design
   =========================================================== */
.guide-crumb {
  font-family: 'Baloo 2',sans-serif; font-weight: 700; font-size: 21px;
  letter-spacing: .03em; color: var(--ink-soft); white-space: nowrap;
}
.guide {
  position: absolute; inset: 122px 120px 60px;
  display: grid; grid-template-columns: 700px 1fr;
  align-items: center; gap: 90px;
}
.guide-copy { align-self: center; }

/* video-hero variant: centered column, large prominent walkthrough */
.guide.guide-video {
  inset: 96px 60px 48px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 22px; text-align: center;
}
.guide-video .guide-head {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.guide-video .course-eyebrow,
.guide-video .guide-title { margin-bottom: 0; }
.guide-video .guide-title { font-size: 44px; }
.guide-video .guide-lede { margin-bottom: 2px; max-width: 1000px; font-size: 21px; line-height: 1.4; }
.guide-video .flow-steps { justify-content: center; margin-bottom: 0; margin-top: 4px; }
.video-slot-big {
  width: 1240px; max-width: 1240px; margin-bottom: 0;
}
.video-slot-big .video-play {
  width: 124px; height: 124px;
  box-shadow: 0 12px 0 var(--matcha-deep), 0 26px 50px rgba(80,90,50,.30);
}
.video-slot-big .video-meta b { font-size: 34px; }
.video-slot-big .video-meta span { font-size: 21px; }
.guide-title {
  font-family: 'Baloo 2',sans-serif; font-weight: 800; font-size: 48px;
  color: var(--ink); letter-spacing: -.01em; line-height: 1.05;
  margin-bottom: 14px;
}
.guide-lede {
  font-weight: 600; font-size: 23px; color: var(--ink-soft);
  line-height: 1.5; max-width: 660px; margin-bottom: 30px;
}
.guide-steps { list-style: none; display: flex; flex-direction: column; gap: 22px; margin-bottom: 32px; }
.guide-steps li { display: flex; align-items: flex-start; gap: 22px; }
.gnum {
  width: 50px; height: 50px; flex: 0 0 auto;
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: 'Baloo 2',sans-serif; font-weight: 800; font-size: 24px;
  background: var(--matcha-tint); color: var(--matcha-dark);
  margin-top: 2px;
}
.gtext b {
  font-family: 'Baloo 2',sans-serif; font-weight: 700; font-size: 26px;
  color: var(--ink); display: block; margin-bottom: 4px;
}
.gtext p { font-weight: 600; font-size: 21px; color: var(--ink-soft); line-height: 1.45; max-width: 600px; }

/* demo window mock */
.guide-demo { align-self: center; display: flex; flex-direction: column; gap: 26px; align-items: flex-start; }
.demo-window {
  width: 100%; max-width: 760px;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(60,55,30,.18);
}
.demo-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 22px;
  background: var(--foam);
  border-bottom: 2px solid var(--line);
}
.tl { width: 14px; height: 14px; border-radius: 50%; }
.tl-r { background: #E0958A; } .tl-y { background: #E6C27A; } .tl-g { background: #A9C081; }
.demo-url {
  margin-left: 14px;
  font-family: 'Baloo 2',sans-serif; font-weight: 700; font-size: 18px;
  color: var(--ink-faint); white-space: nowrap;
}
/* video walkthrough slot (user uploads their video here) */
.flow-steps {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 28px;
}
.flow-step {
  display: inline-flex; align-items: center; gap: 11px;
  background: var(--foam); border: 2px solid var(--line);
  border-radius: 999px; padding: 9px 18px 9px 10px;
  font-family: 'Baloo 2',sans-serif; font-weight: 700; font-size: 18px; color: var(--ink);
}
.flow-step span {
  width: 28px; height: 28px; flex: 0 0 auto;
  border-radius: 50%; background: var(--matcha); color: #fff;
  display: grid; place-items: center; font-size: 16px; font-weight: 800;
}
.flow-arrow { color: var(--ink-faint); display: inline-grid; place-items: center; }

.video-slot {
  width: 100%; max-width: 560px;
  aspect-ratio: 16 / 9;
  border-radius: 22px;
  overflow: hidden;
  border: 2px solid var(--line);
  box-shadow: 0 22px 50px rgba(60,55,30,.16);
  cursor: pointer;
  margin-bottom: 26px;
}
.video-slot video { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-poster {
  width: 100%; height: 100%;
  background:
    radial-gradient(120% 120% at 50% 30%, #EAF1DC 0%, #DCE7C4 60%, #CFDDB2 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 22px; position: relative;
}
.video-play {
  width: 92px; height: 92px; border-radius: 50%;
  background: var(--matcha); color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 10px 0 var(--matcha-deep), 0 22px 40px rgba(80,90,50,.28);
  transition: transform .12s;
}
.video-play svg { margin-left: 5px; }
.video-slot:hover .video-play { transform: scale(1.06); }
.video-meta { text-align: center; }
.video-meta b {
  display: block;
  font-family: 'Baloo 2',sans-serif; font-weight: 800; font-size: 26px; color: var(--matcha-dark);
}
.video-meta span { font-weight: 700; font-size: 18px; color: var(--ink-soft); }

.demo-canvas {
  position: relative;
  background: var(--cream);
  padding: 0;
}
.demo-stage {
  position: relative;
  height: 360px;
  display: grid; place-items: center;
  padding: 30px;
}
.build-shimmer {
  display: none;
  align-items: center; gap: 16px;
  font-family: 'Baloo 2',sans-serif; font-weight: 700; font-size: 24px; color: var(--matcha-dark);
}
.build-shimmer.on { display: flex; }
.spinner {
  width: 36px; height: 36px; border-radius: 50%;
  border: 5px solid var(--matcha-tint); border-top-color: var(--matcha);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pop { from { opacity: 0; transform: translateY(18px) scale(.96); } to { opacity: 1; transform: none; } }

/* BEFORE — pasted reference (intentionally dated) */
.ref-site {
  position: relative;
  width: 440px;
  background: #fff;
  border: 2px solid #d8d8d8;
  border-radius: 8px;
  overflow: hidden;
  font-family: Georgia, 'Times New Roman', serif;
  box-shadow: 0 8px 24px rgba(60,55,30,.08);
}
.paste-tag {
  position: absolute; top: 12px; right: 12px;
  background: var(--ink); color: #fff;
  font-family: 'Baloo 2',sans-serif; font-weight: 700; font-size: 12px; letter-spacing: .04em;
  padding: 5px 11px; border-radius: 7px;
}
.ref-top {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px; background: #ededed; border-bottom: 1px solid #dcdcdc;
}
.ref-dot { width: 20px; height: 20px; border-radius: 50%; background: #c2c2c2; flex: 0 0 auto; }
.ref-lines { display: flex; gap: 10px; }
.ref-lines i { width: 44px; height: 8px; background: #cdcdcd; border-radius: 3px; display: block; }
.ref-hero { padding: 30px 28px 34px; }
.ref-h1 { font-size: 27px; font-weight: 700; color: #3a3a3a; margin-bottom: 18px; }
.ref-p { height: 9px; background: #dedede; border-radius: 3px; margin-bottom: 10px; }
.ref-p.short { width: 58%; }
.ref-btn {
  margin-top: 22px; display: inline-block;
  background: #9aa0a6; color: #fff;
  font-family: Arial, sans-serif; font-size: 13px;
  padding: 9px 18px; border-radius: 4px;
}

/* AFTER — generated redesign */
.after-site {
  display: none;
  position: relative;
  width: 440px;
  padding: 46px 42px 44px;
  border-radius: 22px;
  border: 2px solid var(--line);
  background: radial-gradient(130% 130% at 50% 0%, #EFF4E3 0%, #E4EDD0 100%);
  box-shadow: 0 16px 40px rgba(80,90,50,.16);
  transition: background .25s;
}
.after-site.on { display: block; animation: pop .5s cubic-bezier(.2,.9,.3,1.2) both; }
.after-badge {
  position: absolute; top: 18px; right: 18px;
  background: var(--matcha); color: #fff;
  font-family: 'Baloo 2',sans-serif; font-weight: 800; font-size: 13px; letter-spacing: .04em;
  padding: 5px 13px; border-radius: 999px;
}
.after-h1 {
  font-family: 'Baloo 2',sans-serif; font-weight: 800; font-size: 40px; line-height: 1.04;
  color: var(--ink); margin-bottom: 14px;
}
.after-sub { font-weight: 600; font-size: 18px; color: var(--ink-soft); line-height: 1.45; margin-bottom: 28px; max-width: 320px; }
.after-btn {
  display: inline-block;
  background: var(--matcha); color: #fff;
  font-family: 'Baloo 2',sans-serif; font-weight: 800; font-size: 18px; letter-spacing: .06em; text-transform: uppercase;
  padding: 15px 32px; border-radius: 14px;
  box-shadow: 0 5px 0 var(--matcha-deep);
  transition: border-radius .25s, padding .2s, background .25s, box-shadow .25s;
}
.after-site.round .after-btn { border-radius: 999px; }
.after-site.warm {
  background: radial-gradient(130% 130% at 50% 0%, #FBEEDD 0%, #F5E1C9 100%);
}
.after-site.warm .after-btn { background: #D8924F; box-shadow: 0 5px 0 #b9743f; }

/* built badge in title bar */
.built-badge {
  margin-left: auto;
  display: none; align-items: center; gap: 9px;
  background: #fff; border: 2px solid #CADBA5;
  border-radius: 999px; padding: 7px 16px 7px 12px;
  font-family: 'Baloo 2',sans-serif; font-weight: 800; font-size: 17px; color: var(--matcha-dark);
}
.built-badge.on { display: inline-flex; animation: pop .4s ease both; }
.built-badge svg { color: var(--matcha); }

/* prompt area: change chips + redesign */
.demo-prompt {
  display: flex; align-items: center; gap: 18px;
  padding: 18px 22px;
  border-top: 2px solid var(--line);
  background: #fff;
}
.prompt-field { flex: 1 1 auto; }
.prompt-label {
  display: block; margin-bottom: 10px;
  font-family: 'Baloo 2',sans-serif; font-weight: 700; font-size: 16px;
  letter-spacing: .03em; color: var(--ink-faint);
}
.change-chips { display: flex; gap: 10px; flex-wrap: wrap; }
.chchip {
  font-family: 'Baloo 2',sans-serif; font-weight: 700; font-size: 17px;
  color: var(--ink-soft);
  background: var(--foam); border: 2px solid var(--line);
  border-radius: 999px; padding: 9px 18px; cursor: pointer;
  transition: border-color .12s, background .12s, color .12s;
}
.chchip:hover { border-color: var(--matcha); }
.chchip.selected { background: var(--matcha-tint); border-color: var(--matcha); color: var(--matcha-dark); }
.build-go {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 10px;
  font-family: 'Baloo 2',sans-serif; font-weight: 800; font-size: 20px;
  letter-spacing: .06em; text-transform: uppercase;
  color: #fff; background: var(--matcha);
  border: none; border-radius: 14px; padding: 14px 28px;
  box-shadow: 0 5px 0 var(--matcha-deep); cursor: pointer;
  transition: transform .06s, box-shadow .06s, filter .12s;
}
.build-go:hover { filter: brightness(1.04); }
.build-go:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--matcha-deep); }
.build-go:disabled { opacity: .55; pointer-events: none; }

/* edit bar (after redesign) */
.demo-edit {
  display: none; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 18px 22px;
  border-top: 2px solid var(--line);
  background: #fff;
}
.demo-edit.on { display: flex; }
.edit-label {
  font-family: 'Baloo 2',sans-serif; font-weight: 800; font-size: 18px; color: var(--ink);
}
.editchip {
  font-family: 'Baloo 2',sans-serif; font-weight: 700; font-size: 17px;
  color: var(--matcha-dark);
  background: var(--foam); border: 2px solid var(--line);
  border-radius: 999px; padding: 9px 18px; cursor: pointer;
  transition: border-color .12s, background .12s;
}
.editchip:hover { border-color: var(--matcha); }
.editchip.selected { background: var(--matcha-tint); border-color: var(--matcha); }
.edit-reset {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'Baloo 2',sans-serif; font-weight: 700; font-size: 17px;
  color: var(--ink-soft);
  background: none; border: none; cursor: pointer;
}
.edit-reset:hover { color: var(--ink); }
.demo-mascot-row { display: flex; align-items: center; gap: 18px; padding-left: 6px; }
.demo-tip {
  font-family: 'Baloo 2',sans-serif; font-weight: 600; font-size: 20px;
  color: var(--ink-soft); max-width: 520px; line-height: 1.4;
}

/* ===========================================================
   Welcome screen
   =========================================================== */
.welcome-top {
  position: absolute; top: 46px; left: 80px; right: 80px;
  display: flex; align-items: center; justify-content: space-between;
}
.welcome-main {
  position: absolute; inset: 0;
  display: grid; grid-template-columns: 620px 1fr;
  align-items: center; padding: 0 110px; gap: 70px;
}
.welcome-art { position: relative; width: 600px; height: 560px; }
.doodle { position: absolute; }
.welcome-copy { display: flex; flex-direction: column; align-items: center; gap: 26px; }
.welcome-copy .display { font-size: 56px; text-align: center; max-width: 620px; margin-bottom: 14px; }
.welcome-chips {
  position: absolute; left: 0; right: 0; bottom: 44px;
  display: flex; justify-content: center; gap: 16px; flex-wrap: wrap;
  border-top: 2px solid var(--line); padding-top: 30px; margin: 0 80px;
}
.wchip { display:flex; align-items:center; gap:11px; font-family:'Baloo 2',sans-serif; font-weight:700; font-size:20px; color: var(--ink-soft); }
.wchip .dot { width: 34px; height: 26px; border-radius: 7px; display:grid; place-items:center; color:#fff; }
.wchip .dot svg { width: 18px; height: 18px; }

.site-lang { font-family:'Baloo 2',sans-serif; font-weight:700; font-size:18px; letter-spacing:.1em; color: var(--ink-soft); text-transform: uppercase; display:flex; align-items:center; gap:8px; cursor:pointer; }

/* "Meet with me" booking CTA */
.top-actions { display: flex; align-items: center; gap: 22px; }
.meet-link {
  font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 18px;
  letter-spacing: .04em; text-transform: uppercase;
  color: #fff; background: var(--matcha);
  border: none; border-radius: 999px; padding: 13px 28px;
  box-shadow: 0 4px 0 var(--matcha-deep);
  text-decoration: none; cursor: pointer; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 8px;
  transition: filter .12s, transform .06s, box-shadow .06s;
}
.meet-link:hover { filter: brightness(1.04); }
.meet-link:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--matcha-deep); }

/* centered helpers */
.center-col { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap: 50px; }
.screen-foot {
  position:absolute; left:0; right:0; bottom:0; height: 140px;
  border-top: 2px solid var(--line);
  display:flex; align-items:center; justify-content:flex-end; padding: 0 80px;
}
.screen-foot.between { justify-content: space-between; }

.entrance { animation: rise .5s cubic-bezier(.2,.8,.2,1) both; }
@keyframes rise { from { transform: translateY(26px); } to { transform: none; } }
@media (prefers-reduced-motion: reduce){ .entrance{ animation:none; } }

/* ===========================================================
   Step navigation (prev / dots / next) — outside the stage
   =========================================================== */
.stepnav {
  position: fixed;
  left: 50%; bottom: 26px;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 22px;
  padding: 12px 18px;
  background: rgba(251,248,239,.92);
  border: 2px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(60,55,30,.18);
  z-index: 50;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.navbtn {
  width: 46px; height: 46px; flex: 0 0 auto;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: #fff;
  color: var(--matcha-dark);
  display: grid; place-items: center;
  cursor: pointer;
  transition: background .12s, transform .06s, opacity .12s;
}
.navbtn svg { width: 24px; height: 24px; }
.navbtn:hover { background: var(--matcha-tint); }
.navbtn:active { transform: scale(.94); }
.navbtn:disabled { opacity: .3; cursor: default; pointer-events: none; }
.navdots { display: flex; align-items: center; gap: 11px; }
.navdots i {
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--line);
  transition: background .2s, transform .2s;
}
.navdots i.on { background: var(--matcha); transform: scale(1.35); }

/* ===========================================================
   Mobile / responsive
   Reflow the fixed 1920×1080 stage into a fluid, scrollable
   single-column layout on phones and small tablets.
   =========================================================== */
@media (max-width: 860px) {
  html, body { height: auto; overflow-x: hidden; }
  body { overflow-y: auto; background: var(--cream); }

  .viewport {
    position: static; display: block;
    height: auto; min-height: 100vh;
    background: var(--cream); overflow: visible;
  }
  .stage {
    width: 100% !important; height: auto !important;
    min-height: 100vh;
    transform: none !important;
    box-shadow: none; overflow: visible;
  }

  /* show one screen at a time in normal flow */
  .screen {
    position: relative; inset: auto;
    display: none; opacity: 1; pointer-events: auto;
    min-height: 100vh;
    padding: 24px 20px 112px;
  }
  .screen.active { display: block; }

  /* top bars → static rows */
  .welcome-top {
    position: static; left: auto; right: auto; top: auto;
    flex-wrap: wrap; gap: 14px; margin-bottom: 24px;
  }
  .brand svg { width: 38px !important; height: 42px !important; }
  .brand-name { font-size: 28px; }
  .top-actions { gap: 12px; flex-wrap: wrap; }
  .meet-link { font-size: 14px; padding: 10px 18px; }
  .site-lang { font-size: 12px; }

  .topbar {
    position: static; left: auto; right: auto; top: auto;
    margin-bottom: 26px; gap: 16px;
  }

  /* buttons → full width, smaller */
  .btn-lg { font-size: 18px; padding: 17px 22px; min-width: 0; width: 100%; }
  .btn-md { font-size: 17px; padding: 15px 24px; }

  /* WELCOME */
  .welcome-main {
    position: static; inset: auto;
    display: flex; flex-direction: column;
    padding: 0; gap: 26px;
  }
  .welcome-art {
    width: 100%; height: auto; min-height: 190px;
    display: flex; align-items: center; justify-content: center;
  }
  .welcome-art > div.doodle { display: none; }      /* hide scattered decals */
  .welcome-art svg.doodle {
    position: static !important;
    left: auto !important; top: auto !important;
    width: 158px !important; height: 174px !important;
  }
  .welcome-copy { gap: 16px; }
  .welcome-copy .display { font-size: 30px; max-width: 100%; margin-bottom: 2px; }
  .welcome-chips {
    position: static; left: auto; right: auto; bottom: auto;
    margin: 26px 0 0; padding-top: 22px; gap: 10px 16px;
  }
  .wchip { font-size: 14px; }

  /* centered helper columns */
  .center-col {
    position: static !important; inset: auto !important; top: auto !important;
    padding: 0 !important; gap: 26px !important;
    align-items: stretch !important; justify-content: flex-start !important;
  }
  .h-question { font-size: 27px; }

  /* topic tiles → 2-up */
  .tile-grid { width: 100%; grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .tile { padding: 20px 12px 18px; gap: 12px; }
  .tile-ico { width: 64px; height: 64px; border-radius: 18px; }
  .tile-ico svg { width: 36px; height: 36px; }
  .tile-name { font-size: 17px; }

  /* SKILL LEVEL */
  .mascot-row { gap: 14px; margin-bottom: 22px !important; }
  .mascot-row > svg { width: 68px !important; height: 75px !important; }
  .bubble { font-size: 18px; padding: 16px 18px; max-width: 100%; }
  .choice-list { width: 100%; margin-left: 0 !important; gap: 14px; }
  .choice { padding: 18px; gap: 16px; }
  .choice-title { font-size: 18px; }
  .bars { height: 30px; }

  /* ACHIEVEMENTS */
  .ach-list { width: 100%; margin-left: 0 !important; }
  .ach { gap: 18px; padding: 20px 2px; }
  .ach-ico { width: 58px; height: 58px; border-radius: 16px; }
  .ach-ico svg { width: 30px; height: 30px; }
  .ach-title { font-size: 20px; }
  .ach-desc { font-size: 15px; }
  .screen-foot {
    position: static; height: auto; border-top: none;
    padding: 26px 0 0; justify-content: stretch;
  }
  .screen-foot .btn { width: 100%; }

  /* HOME / COURSE */
  .home-simple { position: static; inset: auto; padding: 0; }
  .home-head { padding: 0; margin-bottom: 22px; }
  .ghost-link { font-size: 14px; padding: 10px 18px; }
  .course { width: 100%; padding-top: 6px; }
  .course-intro { margin-bottom: 24px; }
  .course-eyebrow { font-size: 15px; white-space: normal; }
  .course-title { font-size: 32px; }
  .course-sub { font-size: 17px; }
  .steps::before { left: 26px; }
  .step { gap: 16px; }
  .step.active { padding: 16px; }
  .step-mark { width: 52px; height: 52px; font-size: 22px; border-width: 4px; }
  .step-mark svg { width: 20px !important; height: 20px !important; }
  .step-title { font-size: 18px; }
  .step-meta { font-size: 14px; }
  .step-cta { font-size: 14px; padding: 10px 16px; }

  /* GUIDE / VIDEO HERO */
  .guide.guide-video {
    position: static !important; inset: auto !important;
    gap: 18px; padding: 0;
  }
  .guide-crumb { font-size: 14px; white-space: normal; }
  .guide-video .guide-title { font-size: 27px; }
  .guide-video .guide-lede { font-size: 16px; max-width: 100%; }
  .flow-steps { gap: 6px; }
  .flow-step { font-size: 13px; padding: 7px 12px 7px 7px; }
  .flow-step span { width: 22px; height: 22px; font-size: 13px; }
  .flow-arrow svg { width: 14px !important; height: 14px !important; }
  .video-slot-big { width: 100% !important; max-width: 100% !important; }
  .video-slot-big .video-play { width: 70px; height: 70px; }
  .video-slot-big .video-play svg { width: 28px !important; height: 28px !important; }
  .video-slot-big .video-meta b { font-size: 20px; }
  .video-slot-big .video-meta span { font-size: 14px; }

  /* compact step-nav */
  .stepnav { bottom: 14px; gap: 14px; padding: 8px 12px; }
  .navbtn { width: 38px; height: 38px; }
  .navbtn svg { width: 20px; height: 20px; }
  .navdots { gap: 8px; }
  .navdots i { width: 9px; height: 9px; }
}

/* very narrow phones → single-column tiles */
@media (max-width: 480px) {
  .tile-grid { grid-template-columns: 1fr; }
  .welcome-copy .display { font-size: 27px; }
  .course-title { font-size: 28px; }
}
