/* Lilypad Live · the app's own pages: the home (app.html), and what Learn and My money share with it (the page, the
   tab bar, the tints, the page change). The look: app/design/DESIGN.md section 0. Learn: learn.css. My money: money.css. */

/* ---------- the page: a pale sky-to-mint wash, three slow colour clouds, no lily pad drawings ---------- */
body.apphome { overflow-y: auto; overflow-x: hidden; height: auto; min-height: 100%; isolation: isolate;
  background: linear-gradient(180deg, #E9F0FF 0%, #F4F7FD 42%, #EEF8F2 100%) fixed; }
body.apphome::before { content: ""; position: fixed; inset: -15% -25%; z-index: -1; pointer-events: none;
  background: radial-gradient(38% 26% at 82% 6%, rgba(42, 112, 222, .17), transparent 70%),
    radial-gradient(42% 30% at 6% 52%, rgba(48, 174, 88, .14), transparent 70%),
    radial-gradient(34% 24% at 88% 92%, rgba(242, 179, 61, .16), transparent 70%);
  animation: pg-drift 26s ease-in-out infinite alternate; }
@keyframes pg-drift { to { transform: translate3d(-4%, 3%, 0) rotate(4deg); } }

/* ---------- colour per area: two stops of one hue, lighter where the art sits (top right), darker under the words ---------- */
.t-green { --c1: #41C870; --c2: #1C7F3F; --cs: rgba(28, 127, 63, .34); --on: #fff; }
.t-coral { --c1: #F37B6F; --c2: #C2352B; --cs: rgba(194, 53, 43, .32); --on: #fff; }
.t-blue  { --c1: #5A98F3; --c2: #1F55B8; --cs: rgba(31, 85, 184, .32); --on: #fff; }
.t-navy  { --c1: #4466C2; --c2: #182D66; --cs: rgba(24, 45, 102, .34); --on: #fff; }
.t-gold  { --c1: #FFD36E; --c2: #F2A922; --cs: rgba(201, 138, 18, .3); --on: var(--navy); }
.tinted { background: radial-gradient(120% 90% at 100% 0%, rgba(255, 255, 255, .22), transparent 55%), linear-gradient(205deg, var(--c1) 0%, var(--c2) 72%);
  color: var(--on); box-shadow: 0 16px 34px -10px var(--cs); }

/* the 3D art (img/3d): floats a little, each piece on its own clock (app.js sets --fd and --fl) */
.ah-art { display: block; pointer-events: none; -webkit-user-drag: none; will-change: transform;
  animation: art-in 700ms cubic-bezier(.34, 1.4, .64, 1) calc(var(--ai, 0ms) + 120ms) both, art-float var(--fd, 7s) ease-in-out var(--fl, 0s) infinite; }
/* the pop-in uses scale and translate, the float uses transform: the two run together without fighting */
@keyframes art-in { from { opacity: 0; scale: .82; translate: 0 16px; } }
@keyframes art-float { 0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); } 50% { transform: translate3d(0, -7px, 0) rotate(-1.6deg); } }
@media (prefers-reduced-motion: reduce) { .ah-art, body.apphome::before { animation: none; } }

/* ---------- the home ---------- */
.ah { width: min(560px, 100%); margin: 0 auto; padding: calc(env(safe-area-inset-top, 0px) + 18px) 20px calc(env(safe-area-inset-bottom, 0px) + 40px);
  display: flex; flex-direction: column; gap: 26px; opacity: 0; transform: translateY(10px); transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out); }
.ah.on { opacity: 1; transform: none; }
body.has-tb .ah { padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 124px); }

.ah-top { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.ah-hi { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ah-hi small { font: 600 var(--t-md)/1.2 var(--f-head); color: var(--dim2); }
.ah-hi h1 { font: 800 26px/1.15 var(--f-head); color: var(--navy); letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ah-gear { width: 54px; height: 54px; flex: none; padding: 3px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 8px 20px -6px rgba(33, 62, 140, .3); cursor: pointer; }
.ah-av { width: 100%; height: 100%; display: grid; place-items: center; border-radius: 50%; overflow: hidden; background: linear-gradient(160deg, #EAF1FF, #DCE6FA); color: var(--navy); }
.ah-av svg { width: 100%; height: 100%; display: block; }
.ah-av.none svg { width: 26px; height: 26px; }

/* in class: navy, the classmates waving over the top edge, one round code box */
.ah-card { position: relative; border-radius: 28px; }
.ah-class { padding: 22px 20px 20px; margin-top: 18px; background: radial-gradient(120% 90% at 100% 0%, rgba(255, 255, 255, .16), transparent 55%), linear-gradient(205deg, #3A5DBA 0%, #182D66 75%);
  color: #fff; box-shadow: 0 18px 38px -12px rgba(24, 45, 102, .5); }
.ah-class h2 { position: relative; font: 800 25px/1.12 var(--f-head); color: #fff; letter-spacing: -.02em; max-width: 58%; }
.ah-class-art { position: absolute; right: -10px; top: -46px; width: 178px; }
.ah-join { position: relative; display: flex; align-items: center; gap: 6px; margin-top: 18px; padding: 6px; border-radius: var(--r-pill); background: #fff; box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .35); }
.ah-join .ah-code { flex: 1; min-width: 0; height: 50px; padding: 0 8px 0 16px; border: 0; border-radius: var(--r-pill); background: none; box-shadow: none; text-align: left;
  font: 700 24px var(--f-head); letter-spacing: .22em; color: var(--navy); }
.ah-join .ah-code:focus { box-shadow: none; }
.ah-join .ah-code::placeholder { font: 600 17px var(--f-head); letter-spacing: 0; color: #97A3B8; text-transform: none; }
.ah-join-go { flex: none; min-height: 50px; padding: 0 18px 0 22px; gap: 6px; border-radius: var(--r-pill); }
.ah-join-go span { display: inline-flex; }
.ah-err { color: #FFC2BB; font: 600 var(--t-md)/1.4 var(--f-body); margin-top: 10px; }
.ah-err:empty { display: none; }
.ah-scan { align-self: flex-start; margin-top: 10px; gap: 8px; min-height: var(--tap); color: #fff; border-color: rgba(255, 255, 255, .4); }
.ah-scan .ic { width: 22px; height: 22px; }

/* on your own: the title and the level switch, the next thing (big), the chapters in a row */
.ah-solo { display: flex; flex-direction: column; gap: 16px; }
.ah-sec-hd { display: flex; flex-direction: column; gap: 12px; }
.ah-sec-hd h2, .ah-more-hd { font: 800 22px/1.2 var(--f-head); color: var(--navy); letter-spacing: -.01em; }
.ah-levels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 5px; border-radius: 20px; background: rgba(255, 255, 255, .7); box-shadow: inset 0 0 0 1px rgba(33, 62, 140, .08); }
.ah-lv { min-height: 48px; border: 0; border-radius: 15px; background: none; padding: 5px 4px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; cursor: pointer; color: var(--dim);
  transition: background-color var(--t-base) var(--ease-std), color var(--t-base) var(--ease-std), box-shadow var(--t-base) var(--ease-std); }
.ah-lv b { font: 700 var(--t-md)/1.2 var(--f-head); }
.ah-lv small { font: 600 var(--t-xs)/1.2 var(--f-body); color: var(--dim2); }
.ah-lv.on { background: var(--navy); color: #fff; box-shadow: 0 6px 14px -6px rgba(24, 45, 102, .6); }
.ah-lv.on small { color: rgba(255, 255, 255, .78); }

.ah-hero { position: relative; margin-top: 40px; padding: 22px 20px 20px; border-radius: 28px; min-height: 196px; display: flex; flex-direction: column; justify-content: flex-end; gap: 14px; }
.ah-hero { background: radial-gradient(120% 90% at 100% 0%, rgba(255, 255, 255, .22), transparent 55%), linear-gradient(205deg, var(--c1) 0%, var(--c2) 72%); color: var(--on); box-shadow: 0 18px 36px -12px var(--cs); }
.ah-hero-art { position: absolute; right: -8px; top: -58px; width: 196px; }
.ah-hero.t-coral .ah-hero-art { width: 178px; top: -64px; right: 0; }
.ah-hero-tx { position: relative; display: flex; flex-direction: column; gap: 4px; max-width: 62%; }
.ah-hero-tx small { font: 600 var(--t-md)/1.3 var(--f-head); opacity: .9; }
.ah-hero-tx h3 { font: 800 30px/1.08 var(--f-head); letter-spacing: -.02em; }
.ah-hero-tx p { font: 500 var(--t-md)/1.4 var(--f-body); opacity: .92; }
.ah-hero-where { display: flex; flex-direction: column; gap: 7px; margin-top: 4px; font: 700 var(--t-body)/1.2 var(--f-head); font-variant-numeric: tabular-nums; }
.ah-hero .ah-bar { width: 150px; height: 8px; background: rgba(255, 255, 255, .3); }
.ah-hero .ah-bar i { background: #fff; }
.ah-go { position: relative; align-self: flex-start; min-height: 52px; padding: 0 20px 0 24px; gap: 8px; border-radius: var(--r-pill); background: #fff; color: var(--c2); box-shadow: 0 8px 18px -8px rgba(0, 0, 0, .4); font-weight: 700; }
.ah-go span { display: inline-flex; }
@media (hover: hover) { .ah-go:not(:disabled):hover { background: #F4F7FC; } }
.t-gold .ah-go { color: var(--navy); }

.ah-bar { display: block; height: 6px; border-radius: 4px; background: rgba(33, 62, 140, .12); overflow: hidden; }
.ah-bar i { display: block; height: 100%; min-width: 6px; border-radius: inherit; background: var(--green); }

/* the chapters, side by side: swipe, snap; cards beside the middle lean back a little (--k, app.js tilt) */
.ah-map { list-style: none; display: flex; gap: 14px; margin: 0 -20px; padding: 6px 20px 14px; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scroll-padding: 0 20px; scrollbar-width: none; overscroll-behavior-x: contain; }
.ah-map::-webkit-scrollbar { display: none; }
.ah-stop { flex: 0 0 158px; scroll-snap-align: start; transform: scale(var(--k, 1)); transition: transform var(--t-fast, .15s) linear; }
.ah-ch { width: 100%; height: 100%; display: flex; flex-direction: column; padding: 0 0 14px; border: 0; border-radius: 24px; background: #fff; color: var(--ink); text-align: left; overflow: hidden; cursor: pointer;
  box-shadow: 0 10px 24px -12px rgba(33, 62, 140, .3), inset 0 0 0 1px rgba(33, 62, 140, .05); }
.ah-ch-pic { position: relative; height: 116px; display: grid; place-items: center; background: linear-gradient(160deg, color-mix(in srgb, var(--c1) 34%, #fff), color-mix(in srgb, var(--c1) 14%, #fff)); }
.ah-ch-pic img { width: 124px; height: 124px; object-fit: contain; margin-top: 8px; }
.ah-ch-pic .ic { width: 70px; height: 70px; }
.ah-ch.new .ah-ch-pic img { filter: saturate(.8); opacity: .88; }
.ah-tick { position: absolute; top: 10px; right: 10px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--green-btn); color: #fff; box-shadow: 0 0 0 3px #fff; }
.ah-ch-tx { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px 0; min-width: 0; }
.ah-ch-tx small { font: 600 var(--t-cap)/1.2 var(--f-head); color: var(--dim2); }
.ah-ch-tx b { font: 800 var(--t-lg)/1.2 var(--f-head); color: var(--ink); letter-spacing: -.01em; }
.ah-st-line { font: 600 var(--t-cap)/1.35 var(--f-body); color: var(--dim2); }
.ah-st-res { font: 700 var(--t-md)/1.3 var(--f-head); color: var(--green-d); font-variant-numeric: tabular-nums; }
.ah-st-res.bad { color: var(--coral-l); }
.ah-st-now { display: flex; flex-direction: column; gap: 6px; font: 700 var(--t-md)/1.3 var(--f-head); color: var(--navy); font-variant-numeric: tabular-nums; }
.ah-st-now .ah-bar { width: 100%; }
.ah-st-now .ah-bar i { background: var(--c2); }
.ah-ch.here { box-shadow: 0 12px 26px -12px var(--cs), inset 0 0 0 3px var(--c1); }
.ah-fin div.ah-ch { cursor: default; }
.ah-fin .ah-ch.new .ah-ch-pic .ic { filter: grayscale(1); opacity: .5; }
/* the replay question */
.ah-ask h2 { color: var(--navy); }

/* Learn and My money: two big tiles, art over the top edge, one number each */
.ah-more { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 28px; }
.ah-tile { position: relative; min-height: 170px; padding: 16px; border-radius: 26px; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; text-decoration: none;
  background: radial-gradient(120% 90% at 100% 0%, rgba(255, 255, 255, .24), transparent 55%), linear-gradient(205deg, var(--c1) 0%, var(--c2) 75%); color: var(--on); box-shadow: 0 16px 30px -12px var(--cs); }
.ah-tile-art { position: absolute; right: -6px; top: -40px; width: 128px; }
.ah-tile b { font: 800 21px/1.15 var(--f-head); letter-spacing: -.01em; }
.ah-tile-n { font: 600 var(--t-md)/1.3 var(--f-head); opacity: .92; font-variant-numeric: tabular-nums; }

.ah-foot { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 12px; padding: 4px 0 0; text-align: center; font: 400 var(--t-cap)/1.4 var(--f-body); color: var(--dim2); }
.ah-foot a { color: var(--navy); font-weight: 600; min-height: var(--tap); padding: 0 6px; display: inline-flex; align-items: center; }

/* small phones (iPhone SE, 320 to 375 wide): the art shrinks so the words keep their room */
@media (max-width: 374px) {
  .ah { padding-left: 16px; padding-right: 16px; gap: 22px; }
  .ah-map { margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
  .ah-class-art { width: 150px; top: -36px; }
  .ah-hero-art { width: 164px; top: -48px; }
  .ah-tile-art { width: 108px; top: -32px; }
  .ah-hero-tx h3 { font-size: 26px; }
}
/* tablets and laptops: one wide column with more air; landscape: class and solo side by side */
@media (min-width: 700px) {
  .ah { width: min(680px, 100%); padding-top: calc(env(safe-area-inset-top, 0px) + 32px); gap: 32px; }
  .ah-class-art { width: 220px; top: -60px; }
  .ah-hero { min-height: 230px; }
  .ah-hero-art { width: 250px; top: -76px; }
  .ah-stop { flex-basis: 190px; }
  .ah-ch-pic { height: 140px; }
  .ah-ch-pic img { width: 150px; height: 150px; }
  .ah-tile { min-height: 200px; }
  .ah-tile-art { width: 160px; top: -50px; }
}

/* ---------- a tab page's header (Learn, My money): a big title, one line, its art floating on the right ---------- */
.pg-top { position: relative; display: flex; align-items: center; min-height: 128px; padding-right: 132px; }
.pg-tx { display: flex; flex-direction: column; gap: 6px; }
.pg-tx h1 { font: 800 34px/1.05 var(--f-head); color: var(--navy); letter-spacing: -.02em; }
.pg-tx p { font: 500 var(--t-body)/1.4 var(--f-body); color: var(--dim); }
.pg-art { position: absolute; right: -10px; top: 50%; width: 148px; margin-top: -78px; }
@media (min-width: 700px) { .pg-top { min-height: 160px; padding-right: 200px; } .pg-tx h1 { font-size: 40px; } .pg-art { width: 196px; margin-top: -100px; } }

/* ---------- the tab bar (js/ui/tabbar.js): floats over the bottom, the round Play button in the middle ---------- */
.tb { position: fixed; z-index: calc(var(--z-sheet) - 1); left: 0; right: 0; bottom: calc(env(safe-area-inset-bottom, 0px) + 10px); margin: 0 auto; width: min(520px, calc(100% - 24px)); height: 68px;
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; padding: 0 6px; border-radius: 26px;
  background: rgba(255, 255, 255, .88); -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5);
  box-shadow: 0 14px 34px -10px rgba(33, 62, 140, .3), inset 0 0 0 1px rgba(255, 255, 255, .7); view-transition-name: tabbar; }
.tb-tab { position: relative; z-index: 0; height: 100%; min-width: 44px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 0; border: 0; background: none;
  font: 600 var(--t-xs)/1 var(--f-head); color: #7D8AA3; text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.tb-tab.on { color: var(--navy); }
.tb-ic { width: 52px; height: 30px; display: grid; place-items: center; }
.tb-ic svg { display: block; }
.tb-ind { position: absolute; z-index: -1; top: 7px; left: 50%; width: 52px; height: 30px; margin-left: -26px; border-radius: 15px; background: #E3E9F8; view-transition-name: tab-ind; }
.tb-av { width: 30px; height: 30px; border-radius: 50%; overflow: hidden; background: #E3E9F8; }
.tb-av svg { width: 100%; height: 100%; }
.tb-l { white-space: nowrap; }
.tb-play { position: absolute; left: 50%; top: -22px; width: 66px; height: 66px; margin-left: -33px; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center; cursor: pointer; color: #fff;
  background: radial-gradient(90% 90% at 30% 20%, rgba(255, 255, 255, .3), transparent 60%), linear-gradient(160deg, #41C870, #1C7F3F);
  box-shadow: 0 12px 24px -6px rgba(28, 127, 63, .55), 0 0 0 5px rgba(255, 255, 255, .95); }
.tb-play svg { margin-left: 3px; display: block; }
/* a few soft rings after the page arrives: here is the way to play (transform and opacity only) */
.tb-play::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 50%; background: rgba(65, 200, 112, .5); opacity: 0; animation: fab-ring 2.6s cubic-bezier(.2, .6, .3, 1) 1.6s 3; }
@keyframes fab-ring { 0% { transform: scale(1); opacity: .6; } 100% { transform: scale(1.65); opacity: 0; } }
.tb-tab.on .tb-ic { animation: tab-pop 420ms cubic-bezier(.34, 1.56, .64, 1) 80ms both; }
@keyframes tab-pop { from { scale: .7; } }
.tb-tab .tb-ic { transition: scale 90ms cubic-bezier(.2, 0, 0, 1); }
.tb-tab:active .tb-ic { scale: .88; }
@media (prefers-reduced-motion: reduce) { .tb-play::before, .tb-tab.on .tb-ic { animation: none; } }
@media (max-width: 359px) { .tb-l { font-size: 10.5px; } .tb-ic { width: 44px; } }

/* the Play sheet: two big choices with their art */
.tb-sheet .solo-sheet-in { gap: 12px; }
.tb-sheet h2 { font: 800 var(--t-2xl) var(--f-head); color: var(--navy); }
.tb-opt { position: relative; display: flex; align-items: center; gap: 12px; min-height: 96px; padding: 10px 16px 10px 8px; border: 0; border-radius: 22px; text-align: left; cursor: pointer;
  background: radial-gradient(120% 90% at 100% 0%, rgba(255, 255, 255, .2), transparent 55%), linear-gradient(205deg, var(--c1), var(--c2) 80%); color: #fff; box-shadow: 0 12px 24px -12px var(--cs); }
.tb-opt.tb-class { --c1: #4466C2; --c2: #182D66; --cs: rgba(24, 45, 102, .5); }
.tb-opt.tb-solo { --c1: #41C870; --c2: #1C7F3F; --cs: rgba(28, 127, 63, .45); }
.tb-opt-art { width: 92px; height: 92px; object-fit: contain; flex: none; margin: -14px 0 -6px; }
.tb-opt-tx { display: flex; flex-direction: column; gap: 2px; }
.tb-opt-tx b { font: 800 var(--t-xl)/1.2 var(--f-head); }
.tb-opt-tx small { font: 500 var(--t-md)/1.35 var(--f-body); opacity: .9; }

/* ---------- moving between the tabs: the browser cross-fades the page, the tab bar stays, its pill slides ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: 160ms cubic-bezier(.3, 0, .8, .15) both vt-out; }
::view-transition-new(root) { animation: 300ms cubic-bezier(.05, .7, .1, 1) both vt-in; }
::view-transition-group(tab-ind) { animation-duration: 340ms; animation-timing-function: cubic-bezier(.34, 1.36, .64, 1); }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(12px); } }
@media (prefers-reduced-motion: reduce) { ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation-duration: .01ms !important; } }

/* ---------- Me: your character over the settings ---------- */
.st-me { display: flex; align-items: center; gap: 14px; padding: 4px 0 2px; }
.st-me-av { width: 72px; height: 72px; flex: none; border-radius: 50%; overflow: hidden; background: linear-gradient(160deg, #EAF1FF, #DCE6FA); }
.st-me-av svg { width: 100%; height: 100%; display: block; }
.st-me small { display: block; font: 600 var(--t-cap) var(--f-head); color: var(--dim2); }
.st-me b { font: 800 var(--t-xl)/1.2 var(--f-head); color: var(--navy); }

/* ---------- the welcome: three big pictures from the game's world, swipe or Next, skippable ---------- */
.wl { position: fixed; inset: 0; z-index: calc(var(--z-overlay) + 10); display: flex; align-items: center; opacity: 0; transition: opacity var(--t-exit) var(--ease-exit), background-color var(--t-slow) var(--ease-std);
  background: linear-gradient(180deg, #E9F0FF 0%, #F4F7FD 50%, #EEF8F2 100%); }
.wl.on { opacity: 1; transition: opacity var(--t-enter) var(--ease-enter); }
.wl:focus { outline: none; }
.wl-in { height: 100%; width: min(560px, 100%); margin: 0 auto; display: flex; flex-direction: column; padding: calc(env(safe-area-inset-top, 0px) + 10px) 0 calc(env(safe-area-inset-bottom, 0px) + 22px); }
.wl-top { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); min-height: 52px; padding: 0 12px 0 22px; }
.wl-name { font: 800 var(--t-lg) var(--f-head); color: var(--navy); letter-spacing: -.01em; }
.wl-skip { min-height: var(--tap); min-width: var(--tap); padding: 0 14px; border: 0; border-radius: var(--r-pill); background: none; font: 600 var(--t-md) var(--f-head); color: var(--dim); cursor: pointer; }
.wl-skip.gone { visibility: hidden; }
.wl-track { flex: 1; min-height: 0; display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; }
.wl-track::-webkit-scrollbar { display: none; }
.wl-slide { flex: 0 0 100%; box-sizing: border-box; scroll-snap-align: center; scroll-snap-stop: always; display: flex; flex-direction: column; justify-content: center; gap: 18px; padding: 8px 26px; }
.wl-img { position: relative; display: grid; place-items: center; height: min(52vh, 380px); }
.wl-glow { position: absolute; width: min(78vw, 320px); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 40% 35%, color-mix(in srgb, var(--c1) 55%, #fff), color-mix(in srgb, var(--c1) 22%, #fff) 70%); box-shadow: 0 30px 60px -20px var(--cs); }
.wl-art { position: relative; width: min(86vw, 380px); max-height: 100%; object-fit: contain; }
.wl-tx { display: flex; flex-direction: column; gap: var(--sp-2); text-align: center; }
.wl-tx h2 { font: 800 30px/1.12 var(--f-head); color: var(--navy); letter-spacing: -.02em; }
.wl-tx p { font: 500 var(--t-lg)/1.45 var(--f-body); color: var(--dim); }
.wl-foot { display: flex; flex-direction: column; gap: var(--sp-5); padding: 8px 26px 0; }
.wl-dots { display: flex; justify-content: center; gap: 8px; }
.wl-dots i { width: 8px; height: 8px; border-radius: 4px; background: #C9D2E6; transition: width var(--t-base) var(--ease-std), background-color var(--t-base) var(--ease-std); }
.wl-dots i.on { width: 26px; background: var(--navy); }
@media (min-height: 900px) { .wl-in { width: min(620px, 100%); max-height: 980px; } }
@media (min-width: 700px) { .wl-tx h2 { font-size: 36px; } .wl-tx p { font-size: var(--t-xl); } }

/* ---------- sub-page header (Learn and My money): back chevron and title. The rest of Learn: css/learn.css ---------- */
.lr-top { display: flex; align-items: center; gap: var(--sp-3); padding: 4px 0; }
.lr-top h1 { font: 700 var(--t-2xl)/1.15 var(--f-head); color: var(--navy); letter-spacing: -.01em; }
.lr-back { width: var(--tap); height: var(--tap); flex: none; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 1px solid var(--line); color: var(--navy); box-shadow: var(--shadow-sm); }

/* ---------- the number pad (My money, and the grown-up gate in js/core/native.js) and small text links (Learn too).
   Everything else for My money lives in css/money.css. ---------- */
.mn-pad { align-items: stretch; }
.mn-pad h2 { font: 700 var(--t-xl) var(--f-head); color: var(--navy); }
.mn-pad-v { font: 700 44px/1.1 var(--f-head); color: var(--navy); text-align: center; padding: 8px 0 4px; font-variant-numeric: tabular-nums; }
.mn-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-2); }
.mn-key { min-height: 56px; border: 0; border-radius: var(--r-md); background: var(--bg); font: 600 var(--t-2xl) var(--f-head); color: var(--ink); cursor: pointer; }
.mn-key:active { background: var(--line); }
.mn-key.del { color: var(--dim); font-size: var(--t-xl); }
.mn-link { min-height: var(--tap); border: 0; background: none; padding: 0; font: 600 var(--t-cap) var(--f-head); color: var(--blue); cursor: pointer; }

/* settings sheet: one list, big switches (44 px tall), the whole row is the target */
.st-sheet { gap: var(--sp-4); }
.st-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: #fff; }
.st-row { display: flex; align-items: center; gap: var(--sp-3); width: 100%; min-height: 72px; padding: 12px 14px 12px 16px; border: 0; background: #fff; text-align: left; color: var(--ink); font: inherit; cursor: pointer; }
.st-row + .st-row { border-top: 1px solid var(--line); }
.st-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.st-tx b { font: 600 var(--t-body)/1.3 var(--f-head); color: var(--ink); }
.st-tx small { font: 400 var(--t-cap)/1.4 var(--f-body); color: var(--dim); }
.st-sw { position: relative; flex: none; width: 72px; height: 44px; border-radius: var(--r-pill); background: var(--line2); transition: background-color var(--t-base) var(--ease-std); }
.st-sw::after { content: ""; position: absolute; left: 4px; top: 4px; width: 36px; height: 36px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(16, 24, 40, .22); transition: transform var(--t-base) var(--ease-std); }
.st-row[aria-checked="true"] .st-sw { background: var(--green-btn); }
.st-row[aria-checked="true"] .st-sw::after { transform: translateX(28px); }
.st-row:disabled { cursor: default; }
.st-row:disabled .st-sw { opacity: .55; }
.st-go { flex: none; width: 44px; height: 44px; display: grid; place-items: center; color: var(--dim2); }
.st-reset .st-tx b { color: var(--coral-l); }
.st-reset:disabled .st-tx b, .st-reset:disabled .st-go { color: var(--dim2); }
.st-said { font: 600 var(--t-md)/1.4 var(--f-body); color: var(--green-d); text-align: center; }
.st-said:empty { display: none; }
/* the one red button: a reset that cannot be undone */
.btn.st-danger, .btn.st-danger:not(.ghost):hover { background-color: var(--coral-l); box-shadow: 0 3px 0 #7E1810; }
@media (hover: hover) { .btn.st-danger:not(.ghost):not(:disabled):hover { background-color: #8E1B12; } }

/* offline: a friendly note inside the class card, with Try again */
.ah-off { display: none; }
.ah-off.on { display: grid; grid-template-columns: auto 1fr; gap: 10px 12px; align-items: start; margin-top: 2px; padding: 14px; border-radius: var(--r-lg); background: rgba(255, 255, 255, .1); }
.ah-off-ic { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .14); color: #fff; }
.ah-off-tx { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ah-off-tx b { font: 700 var(--t-lg)/1.3 var(--f-head); color: #fff; }
.ah-off-tx p { font: 400 var(--t-md)/1.45 var(--f-body); color: rgba(255, 255, 255, .86); }
.ah-off-tx small { margin-top: 2px; font: 600 var(--t-cap)/1.4 var(--f-body); color: var(--mint-on-navy); }
.ah-retry { grid-column: 1 / -1; justify-self: start; min-height: var(--tap); }

