:root {
  color-scheme: light;
  --ink: #18343d;
  --muted: #5d7278;
  --sky: #dff4ff;
  --paper: #fffdf6;
  --pine: #1f665d;
  --pine-dark: #12443f;
  --coral: #ef6a53;
  --coral-dark: #a43b2f;
  --gold: #f5bd3f;
  --blue: #2d7f9e;
  font-family: "Avenir Next", "Trebuchet MS", system-ui, sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { width: 100%; height: 100%; min-width: 720px; min-height: 620px; overflow: hidden; }
body { margin: 0; color: var(--ink); background: var(--sky); }
button { color: inherit; font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 4px solid #075e86; outline-offset: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.lesson { height: 100%; padding: 14px; }
.mountain { position: relative; height: 100%; min-height: 590px; overflow: hidden; isolation: isolate; border: 1px solid #a9d1df; border-radius: 24px; background: linear-gradient(#cfefff 0 60%, #a9d8c9 60% 100%); box-shadow: 0 8px 0 #9fc4cf, 0 24px 50px rgba(25,67,78,.16); }
.mountain::after { position: absolute; z-index: -1; inset: auto -5% -22% 18%; height: 68%; content: ""; transform: rotate(-4deg); border-radius: 50% 50% 0 0; background: linear-gradient(155deg,#78a896 0 28%,#4b8375 28% 100%); }
.peak { position: absolute; z-index: -2; bottom: 28%; width: 0; height: 0; border-left: 250px solid transparent; border-right: 250px solid transparent; border-bottom: 390px solid #94b9ad; }
.peak::after { position: absolute; left: -77px; top: 123px; width: 155px; height: 110px; content: ""; transform: rotate(45deg); background: #f7fcfb; }
.peak-far { left: 8%; opacity: .55; transform: scale(.8); }
.peak-near { right: -70px; bottom: 19%; border-bottom-color: #699989; }
.cloud { position: absolute; z-index: -1; width: 110px; height: 31px; opacity: .76; border-radius: 999px; background: white; }
.cloud::before,.cloud::after { position: absolute; bottom: 0; content: ""; border-radius: 50%; background: white; }
.cloud::before { left: 17px; width: 48px; height: 48px; }.cloud::after { right: 15px; width: 61px; height: 61px; }
.cloud-one { left: 30%; top: 12%; }.cloud-two { right: 9%; top: 19%; transform: scale(.7); }

.trail-hud { position: absolute; z-index: 10; left: 20px; right: 20px; top: 18px; height: 68px; display: grid; grid-template-columns: 205px 1fr auto; align-items: center; gap: 18px; }
.mode-chip,.difficulty-card,.scoreboard { border: 1px solid rgba(27,74,82,.17); background: rgba(255,253,246,.93); box-shadow: 0 5px 0 rgba(40,90,91,.13); backdrop-filter: blur(8px); }
.mode-chip { align-self: stretch; display: flex; flex-direction: column; justify-content: center; padding: 11px 16px; border-radius: 14px; }
.mode-chip span,.difficulty-card span,.scoreboard span,.altitude span { color: var(--muted); font-size: 10px; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.mode-chip strong { margin-top: 3px; font-size: 16px; }
.difficulty-card { justify-self: center; width: min(330px,100%); display: grid; grid-template-columns: 1fr auto; gap: 5px 12px; padding: 9px 14px; border-radius: 14px; }
.difficulty-card span b { color: var(--ink); font-size: 15px; }.difficulty-card strong { font-size: 12px; }
.difficulty-card > i { grid-column: 1 / -1; height: 7px; overflow: hidden; border-radius: 999px; background: #dce6df; }
.difficulty-card > i b { display: block; width: 20%; height: 100%; border-radius: inherit; background: linear-gradient(90deg,var(--gold),var(--coral)); transition: width 240ms ease-out; }
.scoreboard { height: 68px; display: flex; align-items: stretch; padding: 7px; border-radius: 14px; }
.scoreboard > div { min-width: 66px; display: grid; place-content: center; padding: 0 10px; text-align: center; }
.scoreboard > div + div { border-left: 1px solid #d5dfdc; }
.scoreboard strong { display: block; margin-top: 2px; font-size: 21px; line-height: 1; }.scoreboard strong i { color: #df8b12; font-style: normal; font-size: 15px; }

.ladder-side { position: absolute; left: 22px; top: 104px; bottom: 24px; width: 205px; overflow: hidden; border: 1px solid rgba(22,69,69,.18); border-radius: 19px; background: linear-gradient(rgba(255,255,255,.22),rgba(17,87,75,.13)); }
.altitude { position: absolute; z-index: 5; left: 12px; right: 12px; top: 12px; padding: 9px 12px; border-radius: 10px; background: rgba(255,255,255,.82); text-align: center; }
.altitude strong { display: block; margin-top: 2px; font-size: 13px; }
.ladder { position: absolute; inset: 74px 10px 8px; }
.rail { position: absolute; z-index: 1; top: 0; bottom: -30px; width: 17px; border: 3px solid #784c2e; border-radius: 9px; background: #b87842; box-shadow: inset 3px 0 rgba(255,255,255,.25); }
.rail-left { left: 34px; }.rail-right { right: 34px; }
.rungs { position: absolute; z-index: 2; inset: 0 38px; display: flex; flex-direction: column-reverse; justify-content: space-between; padding: 11px 0; }
.rungs i { height: 10px; border: 3px solid #704328; border-radius: 7px; background: #d59859; box-shadow: 0 3px 0 rgba(67,42,25,.23); }
.climber { position: absolute; z-index: 4; left: 51px; bottom: 6px; width: 90px; height: 108px; filter: drop-shadow(0 6px 3px rgba(24,52,61,.22)); transition: bottom 360ms cubic-bezier(.2,.85,.3,1.15), transform 180ms ease-out; }
.climber svg { display: block; width: 100%; height: 100%; overflow: visible; }.face { fill: #f1ad78; stroke: #18343d; stroke-width: 3; }.hat { fill: var(--coral); stroke: #18343d; stroke-width: 3; }.pom { fill: var(--gold); stroke: #18343d; stroke-width: 3; }.body { fill: #f4c647; stroke: #18343d; stroke-width: 3; }.pack { fill: var(--blue); stroke: #18343d; stroke-width: 3; }.eye { fill: #18343d; }.smile,.limb,.rope { fill: none; stroke: #18343d; stroke-width: 4; stroke-linecap: round; }
.mountain.is-climbing .climber { transform: rotate(-4deg) scale(1.07); }
.best-marker { position: absolute; z-index: 3; right: 2px; bottom: 11px; display: flex; align-items: center; gap: 4px; padding: 5px 7px; border: 2px solid #9b5f12; border-radius: 8px; color: #6d4008; background: #ffd96f; box-shadow: 0 3px 0 rgba(71,48,18,.18); font-size: 10px; font-weight: 1000; transition: bottom 260ms ease-out; }

.challenge-card { position: absolute; z-index: 3; left: 246px; right: 24px; top: 105px; bottom: 24px; display: grid; grid-template-rows: auto minmax(150px,1fr) auto auto auto; align-content: start; padding: 24px 30px 25px; overflow: hidden; border: 1px solid #d9d4c6; border-radius: 20px; background: rgba(255,253,246,.96); box-shadow: 0 8px 0 rgba(50,90,76,.16), 0 22px 44px rgba(30,67,58,.16); }
.challenge-heading { text-align: center; }.challenge-heading span { color: var(--coral-dark); font-size: 10px; font-weight: 1000; letter-spacing: .12em; text-transform: uppercase; }
.challenge-heading h1 { margin: 5px 0 5px; font-size: clamp(27px,3.1vw,42px); line-height: 1; letter-spacing: -.045em; }.challenge-heading p { margin: 0; color: var(--muted); font-size: 14px; }
.group-stage { min-height: 0; display: flex; align-items: center; justify-content: center; gap: 18px; padding: 14px 8px 8px; }
.group-box { min-width: 124px; max-width: 230px; min-height: 126px; flex: 1; display: grid; align-content: center; justify-items: center; gap: 9px; padding: 15px; border: 2px dashed #9bb6b1; border-radius: 18px; background: #f1f8f3; transition: transform 320ms ease-out, opacity 250ms ease-out; }
.group-box span { color: var(--muted); font-size: 11px; font-weight: 900; text-transform: uppercase; }.group-box strong { font-size: 15px; }
.counters { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 7px; max-width: 170px; }
.counter-dot { width: 30px; height: 30px; display: grid; place-items: center; border: 2px solid #18343d; border-radius: 50%; background: var(--gold); box-shadow: 0 3px 0 rgba(24,52,61,.22); color: #6a3b00; font-size: 10px; font-weight: 1000; animation: dot-in 250ms ease-out both; }
.group-box:nth-child(2n) .counter-dot { background: #75c8b2; color: #113f3a; }.plus { flex: 0 0 auto; width: 44px; height: 44px; display: grid; place-items: center; border: 2px solid var(--ink); border-radius: 50%; background: white; font-size: 25px; font-weight: 1000; }
.group-stage.is-combined .group-box { max-width: 420px; transform: scale(1.03); border-style: solid; border-color: var(--pine); background: #e7f7ee; }.group-stage.is-pointing .group-box { animation: point-pulse 550ms ease-out 2; }
.equation { min-height: 38px; display: grid; place-items: center; font-size: 30px; font-weight: 1000; letter-spacing: .02em; }.equation b { color: var(--coral-dark); }
.feedback { min-height: 28px; display: grid; place-items: center; color: var(--pine-dark); font-size: 14px; font-weight: 900; text-align: center; }
.feedback.is-error { color: var(--coral-dark); }
.action-area { min-height: 84px; display: flex; align-items: center; justify-content: center; gap: 11px; }
.choice-grid { width: min(590px,100%); display: grid; grid-template-columns: repeat(3,1fr); gap: 11px; }
.choice,.primary { min-height: 64px; border: 2px solid #b9c9c4; border-radius: 14px; background: white; box-shadow: 0 5px 0 #d5dfda; font-weight: 1000; transition: transform 140ms ease-out, box-shadow 140ms ease-out, border-color 140ms ease-out; }
.choice { font-size: 26px; }.choice small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; font-weight: 800; }.choice:hover { transform: translateY(-2px); border-color: var(--blue); box-shadow: 0 7px 0 #c9dfe5; }.choice:active { transform: translateY(4px); box-shadow: 0 1px 0 #c9dfe5; }
.primary { min-width: 220px; padding: 0 24px; border-color: var(--pine-dark); color: white; background: var(--pine); box-shadow: 0 6px 0 var(--pine-dark); font-size: 16px; }.primary:hover { transform: translateY(-2px); box-shadow: 0 8px 0 var(--pine-dark); }.primary:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--pine-dark); }
.primary.is-coral { border-color: var(--coral-dark); background: var(--coral); box-shadow: 0 6px 0 var(--coral-dark); }
.explain-grid .choice { padding: 8px 12px; font-size: 14px; }
.practice-expression { min-width: 320px; padding: 18px 28px; border: 2px solid #8eb3ad; border-radius: 18px; background: #eff9f4; box-shadow: 0 6px 0 #c7ddd6; text-align: center; }
.practice-expression span { display: block; color: var(--muted); font-size: 10px; font-weight: 1000; letter-spacing: .12em; text-transform: uppercase; }.practice-expression strong { display: block; margin-top: 5px; font-size: clamp(43px,6vw,72px); line-height: 1; letter-spacing: -.035em; }
.skill-chip { display: inline-flex; margin-top: 7px; padding: 5px 9px; border-radius: 999px; color: #285751; background: #d7ece5; font-size: 11px; font-weight: 900; }
.sparkles { position: absolute; z-index: 20; left: 100px; top: 50%; pointer-events: none; }.sparkles i { position: absolute; width: 13px; height: 13px; opacity: 0; transform: rotate(45deg); border-radius: 3px; background: var(--gold); }.mountain.is-celebrating .sparkles i { animation: sparkle 650ms ease-out both; }.sparkles i:nth-child(1){--x:-60px;--y:-75px}.sparkles i:nth-child(2){--x:70px;--y:-95px;animation-delay:60ms}.sparkles i:nth-child(3){--x:94px;--y:2px;animation-delay:100ms}.sparkles i:nth-child(4){--x:-82px;--y:28px;animation-delay:140ms}.sparkles i:nth-child(5){--x:20px;--y:72px;animation-delay:180ms}.sparkles i:nth-child(6){--x:-18px;--y:-118px;animation-delay:220ms}
.toast { position: absolute; z-index: 30; left: 50%; bottom: 34px; max-width: 76%; padding: 10px 17px; opacity: 0; transform: translate(-50%,12px); border-radius: 999px; color: white; background: var(--ink); pointer-events: none; font-size: 13px; font-weight: 900; transition: opacity 150ms ease-out, transform 150ms ease-out; }.toast.is-showing { opacity: 1; transform: translate(-50%,0); }

@keyframes dot-in { from { opacity: 0; transform: translateY(8px) scale(.7); } }
@keyframes point-pulse { 50% { transform: scale(1.045); box-shadow: 0 0 0 8px rgba(45,127,158,.14); } }
@keyframes sparkle { 0% { opacity: 0; transform: translate(0,0) rotate(45deg) scale(.2); } 35% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--x),var(--y)) rotate(170deg) scale(1.2); } }
@media (max-height: 730px) { .trail-hud { top: 12px; }.ladder-side,.challenge-card { top: 90px; bottom: 17px; }.challenge-card { padding-top: 18px; padding-bottom: 17px; }.group-box { min-height: 105px; }.counter-dot { width: 27px; height: 27px; }.action-area { min-height: 72px; }.choice,.primary { min-height: 56px; } }
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
