/* Osmo design system
   Type: Fredoka (rounded, playful) for anything you tap or scan; Lexend for
   reading, a face designed to make reading easier.
   Shape: big radii, chunky "pressable" buttons with a coloured base. */
:root {
  --cream: #fff8ef;
  --paper: #ffffff;
  --ink: #241a4f;
  --ink-2: #4f4878;
  --muted: #8e88ad;
  --line: #efe7f6;
  --violet: #6e4bff;
  --violet-d: #4a2fcf;
  --sun: #ffc233;
  --sun-d: #e09200;
  --mint: #1fbf87;
  --mint-d: #0f9466;
  --coral: #ff5c6c;
  --space: #170f3d;
  --space-2: #2c1b74;
  --shadow: 0 12px 30px rgba(36, 26, 79, .10);
  --shadow-s: 0 4px 14px rgba(36, 26, 79, .08);
  --display: "Fredoka", "Baloo 2", ui-rounded, system-ui, sans-serif;
  --read: "Lexend", "Baloo 2", system-ui, sans-serif;
  /* status bar / navigation bar sizes. In the Android app Capacitor injects
     --safe-area-inset-*; browsers provide env(). Android 15+ draws apps edge to edge. */
  --safe-t: var(--safe-area-inset-top, env(safe-area-inset-top, 0px));
  --safe-b: var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px));
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--read); color: var(--ink); background: #0d0826; overscroll-behavior: none; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input { font: inherit; }
[hidden] { display: none !important; }
svg { display: block; }
.osmo { overflow: visible; }
.osmo-wave { transform-origin: 82px 86px; transform-box: view-box; animation: wave 1.4s ease-in-out infinite; }
@keyframes wave { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-16deg); } 60% { transform: rotate(6deg); } }

#app { position: relative; height: 100%; height: 100dvh; max-width: 440px; margin: 0 auto; overflow: hidden; background: var(--cream); }
@media (min-width: 600px) {
  body { background: radial-gradient(1200px 700px at 30% 10%, #3a2391, #0d0826 70%); }
  #app { height: min(100dvh - 40px, 920px); margin-top: max(20px, calc((100dvh - 920px) / 2)); border-radius: 44px;
         box-shadow: 0 0 0 10px #1a1240, 0 0 0 12px #2f2470, 0 40px 90px rgba(0,0,0,.5); }
}
#view { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; }
#view::-webkit-scrollbar { display: none; }
#view.has-tabs { padding-bottom: calc(110px + var(--safe-b)); }

/* ------------------------------------------------------------------ buttons */
.btn {
  --c: var(--violet); --d: var(--violet-d);
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
  min-height: 60px; padding: 0 22px; border-radius: 20px;
  background: var(--c); color: #fff; font: 600 19px var(--display); letter-spacing: .01em;
  box-shadow: 0 6px 0 var(--d); transform: translateY(0); transition: transform .08s, box-shadow .08s, filter .15s;
}
.btn:active { transform: translateY(5px); box-shadow: 0 1px 0 var(--d); }
.btn svg { width: 24px; height: 24px; }
.btn.sun { --c: var(--sun); --d: var(--sun-d); color: #3a2400; }
.btn.mint { --c: var(--mint); --d: var(--mint-d); }
.btn.white { --c: #fff; --d: #dcd3ee; color: var(--ink); }
.btn.ghost { --c: transparent; --d: transparent; color: var(--ink-2); box-shadow: none; min-height: 48px; font-size: 16px; }
.btn.small { min-height: 46px; font-size: 16px; border-radius: 16px; width: auto; box-shadow: 0 4px 0 var(--d); }
.btn.small:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--d); }
.btn[disabled] { filter: grayscale(.7) opacity(.55); pointer-events: none; }
.icon-btn { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; background: #fff; color: var(--ink);
  box-shadow: 0 4px 0 #e2dbef; flex: none; }
.icon-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #e2dbef; }
.icon-btn svg { width: 24px; height: 24px; }
.icon-btn.dark { background: rgba(255,255,255,.14); color: #fff; box-shadow: none; backdrop-filter: blur(8px); }

/* ------------------------------------------------------------------ space backdrop */
.space {
  position: relative; color: #fff; overflow: hidden;
  background:
    radial-gradient(500px 300px at 10% 0%, rgba(140, 90, 255, .45), transparent 70%),
    radial-gradient(400px 300px at 100% 60%, rgba(255, 90, 170, .22), transparent 70%),
    linear-gradient(180deg, #1c1150, #170f3d 60%, #120b33);
}
.stars, .stars::after { position: absolute; inset: 0; pointer-events: none; }
.stars { background-image:
    radial-gradient(1.6px 1.6px at 12% 18%, #fff, transparent), radial-gradient(1.2px 1.2px at 34% 8%, #fff, transparent),
    radial-gradient(1.4px 1.4px at 58% 22%, #fff, transparent), radial-gradient(1px 1px at 76% 12%, #fff, transparent),
    radial-gradient(1.6px 1.6px at 88% 34%, #fff, transparent), radial-gradient(1.2px 1.2px at 22% 46%, #fff, transparent),
    radial-gradient(1px 1px at 46% 58%, #fff, transparent), radial-gradient(1.4px 1.4px at 68% 66%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 8% 72%, #fff, transparent), radial-gradient(1.6px 1.6px at 92% 78%, #fff, transparent),
    radial-gradient(1px 1px at 30% 88%, #fff, transparent), radial-gradient(1.3px 1.3px at 62% 92%, #fff, transparent);
  opacity: .8; }
.stars::after { content: ""; background-image:
    radial-gradient(2px 2px at 20% 30%, #ffe9a8, transparent), radial-gradient(2px 2px at 80% 20%, #c9b8ff, transparent),
    radial-gradient(2px 2px at 64% 48%, #fff, transparent), radial-gradient(2px 2px at 40% 76%, #ffd0ec, transparent),
    radial-gradient(2px 2px at 86% 62%, #fff, transparent);
  animation: twinkle 3.2s ease-in-out infinite alternate; }
@keyframes twinkle { from { opacity: .2; } to { opacity: 1; } }

/* ------------------------------------------------------------------ splash */
.splash { position: absolute; inset: 0; display: grid; place-items: center; }
.splash .scene { position: relative; width: 260px; height: 400px; }
.splash .moon-wrap { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); filter: drop-shadow(0 0 40px rgba(255, 190, 50, .35)); }
.splash .osmo-wrap { position: absolute; left: 50%; bottom: 168px; transform: translateX(-50%); animation: land 1s cubic-bezier(.3, 1.4, .5, 1) both; }
@keyframes land { from { transform: translate(-50%, -260px) rotate(-12deg); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
.wordmark-big { position: absolute; left: -40px; right: -40px; bottom: 82px; display: flex; justify-content: center; gap: 14px; }
.wordmark-big span { font: 700 52px/1 var(--display); color: #fff; text-shadow: 0 4px 0 #8a4d00, 0 10px 24px rgba(0,0,0,.35);
  opacity: 0; animation: pop .5s cubic-bezier(.3, 1.6, .5, 1) forwards; }
.wordmark-big span:nth-child(1) { animation-delay: .9s; } .wordmark-big span:nth-child(2) { animation-delay: 1.02s; }
.wordmark-big span:nth-child(3) { animation-delay: 1.14s; } .wordmark-big span:nth-child(4) { animation-delay: 1.26s; }
@keyframes pop { from { opacity: 0; transform: scale(.3) translateY(20px); } to { opacity: 1; transform: none; } }
.float-p { position: absolute; animation: drift 7s ease-in-out infinite; filter: drop-shadow(0 8px 16px rgba(0,0,0,.3)); }
@keyframes drift { 50% { transform: translateY(-12px) rotate(6deg); } }
.bob { animation: bob 3.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-8px); } }

/* ------------------------------------------------------------------ welcome */
.welcome { min-height: 100%; display: flex; flex-direction: column; background: var(--space); }
.welcome .hero { position: relative; height: 47%; min-height: 330px; flex: none; }
.welcome .hero .osmo-wrap { position: absolute; left: 50%; bottom: 66px; transform: translateX(-50%); z-index: 2; }
.welcome .hero .moon-wrap { position: absolute; left: 50%; bottom: -96px; transform: translateX(-50%); }
.welcome .panel { position: relative; z-index: 3; flex: 1; margin-top: -28px; background: var(--cream); border-radius: 36px 36px 0 0;
  padding: 30px 24px calc(24px + var(--safe-b)); display: flex; flex-direction: column; }
/* the app-icon wordmark: chunky yellow letters with a deep violet 3D edge */
.logo { display: inline-block; font: 700 46px/1 var(--display); letter-spacing: -.02em; color: #ffc93a; transform: rotate(-5deg); transform-origin: left center;
  text-shadow: .5px 1px 0 #3b1aa8, 1px 2px 0 #3b1aa8, 1.5px 3px 0 #3b1aa8, 2px 4px 0 #3b1aa8, 2.5px 5px 0 #3b1aa8, 3px 6px 0 #3b1aa8, 3.5px 7px 0 #3b1aa8;
  -webkit-text-stroke: 1px #fff2b0; margin-bottom: 6px; }
.logo .o { display: inline-block; width: 34px; height: 34px; margin: 0 1px; transform: translateY(2px); }
.welcome h1 { font: 600 27px/1.2 var(--display); margin: 12px 0 18px; color: var(--ink); }
.perks { display: grid; gap: 12px; margin-bottom: 24px; }
.perk { display: flex; gap: 14px; align-items: center; font-size: 15px; line-height: 1.4; color: var(--ink-2); }
.perk i { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; flex: none; }
.perk i svg { width: 22px; height: 22px; }
.welcome .actions { margin-top: auto; display: grid; gap: 14px; }
.fine { text-align: center; font-size: 12.5px; color: var(--muted); line-height: 1.5; margin: 6px 0 0; }
.fine a { color: var(--ink-2); }
#gbtn { display: flex; justify-content: center; min-height: 44px; }

/* ------------------------------------------------------------------ onboarding */
.ob { min-height: 100%; display: flex; flex-direction: column; padding: 18px 22px calc(26px + var(--safe-b)); background: var(--cream); }
.ob-top { display: flex; align-items: center; gap: 14px; }
.ob-bar { flex: 1; height: 14px; border-radius: 99px; background: #ece4f7; overflow: hidden; }
.ob-bar b { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--sun), #ff9d2e); transition: width .4s cubic-bezier(.3, 1.3, .5, 1);
  box-shadow: inset 0 -3px 0 rgba(0,0,0,.08), inset 0 3px 0 rgba(255,255,255,.4); }
.ob-body { flex: 1; display: flex; flex-direction: column; padding-top: 18px; animation: stepIn .35s ease-out; }
@keyframes stepIn { from { opacity: 0; transform: translateX(24px); } }
.say { display: flex; align-items: flex-end; gap: 6px; margin: 4px 0 20px; }
.say .osmo { flex: none; }
.bubble { position: relative; background: #fff; border-radius: 24px; padding: 16px 18px; font: 600 20px/1.3 var(--display); color: var(--ink);
  box-shadow: var(--shadow-s); border: 2px solid var(--line); margin-bottom: 64px; }
.bubble::after { content: ""; position: absolute; left: -10px; bottom: 18px; width: 18px; height: 18px; background: #fff;
  border-left: 2px solid var(--line); border-bottom: 2px solid var(--line); transform: rotate(45deg); border-radius: 0 0 0 4px; }
.bubble small { display: block; font: 400 14px/1.4 var(--read); color: var(--muted); margin-top: 4px; }
.ob .field { width: 100%; height: 66px; border-radius: 20px; border: 3px solid #e6def4; background: #fff; padding: 0 20px;
  font: 600 24px var(--display); color: var(--ink); outline: none; transition: border-color .15s; }
.ob .field:focus { border-color: var(--violet); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 0; }
.chip { padding: 10px 16px; border-radius: 99px; background: #fff; font: 500 16px var(--display); color: var(--ink-2); box-shadow: 0 3px 0 #e6def4; }
.chip:active { transform: translateY(2px); box-shadow: none; }
.ob .grow { flex: 1; min-height: 20px; }
.grades { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.grade { aspect-ratio: 1; border-radius: 20px; background: #fff; box-shadow: 0 5px 0 #e6def4; font: 700 28px var(--display); color: var(--ink);
  display: grid; place-items: center; transition: transform .1s; }
.grade.on { background: var(--violet); color: #fff; box-shadow: 0 5px 0 var(--violet-d); transform: scale(1.06); }
.grade-note { text-align: center; color: var(--muted); font: 500 16px var(--display); margin-top: 16px; min-height: 22px; }
.suit-stage { display: grid; place-items: center; margin: 4px 0 18px; position: relative; }
.suit-stage::before { content: ""; position: absolute; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, #fff 30%, transparent 70%); }
.suit-stage .osmo { position: relative; }
.suits { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.suit { aspect-ratio: 1; border-radius: 50%; border: 4px solid #fff; box-shadow: 0 4px 0 rgba(0,0,0,.12), 0 0 0 2px #ece4f7; transition: transform .12s; }
.suit.on { transform: scale(1.15); box-shadow: 0 4px 0 rgba(0,0,0,.12), 0 0 0 4px var(--ink); }
.suit-name { text-align: center; font: 600 18px var(--display); color: var(--ink-2); margin-top: 16px; }
.pick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pick { position: relative; display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 8px; border-radius: 22px; background: #fff;
  box-shadow: 0 4px 0 #ebe3f6; text-align: left; border: 3px solid transparent; transition: transform .1s; min-height: 76px; }
.pick b { font: 600 15.5px/1.2 var(--display); color: var(--ink); }
.pick .planet { flex: none; }
.pick.on { border-color: var(--tc); background: var(--tbg); box-shadow: 0 4px 0 var(--tc); }
.pick .tick { position: absolute; top: -8px; right: -6px; width: 28px; height: 28px; border-radius: 50%; background: var(--tc); color: #fff;
  display: none; place-items: center; box-shadow: 0 2px 0 rgba(0,0,0,.15); }
.pick .tick svg { width: 16px; height: 16px; }
.pick.on .tick { display: grid; animation: pop .3s ease-out; }
.pick-count { text-align: center; font: 500 15px var(--display); color: var(--muted); margin: 14px 0; }
.consent-card { background: #fff; border-radius: 28px; padding: 22px; box-shadow: var(--shadow-s); }
.consent-card h2 { font: 600 24px/1.2 var(--display); margin: 14px 0 8px; }
.consent-card p { color: var(--ink-2); line-height: 1.55; font-size: 15px; margin: 0 0 10px; }
.consent-card ul { margin: 0 0 6px; padding: 0; list-style: none; display: grid; gap: 10px; }
.consent-card li { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; color: var(--ink-2); line-height: 1.45; }
.consent-card li i { color: var(--mint); flex: none; width: 22px; height: 22px; }
.check { display: flex; gap: 14px; align-items: flex-start; margin: 18px 0 0; padding: 16px; border-radius: 20px; background: var(--cream);
  font-size: 15px; line-height: 1.45; color: var(--ink); cursor: pointer; }
.check input { appearance: none; width: 28px; height: 28px; border-radius: 9px; border: 3px solid #cfc5e6; flex: none; margin: 0; display: grid; place-items: center; background: #fff; }
.check input:checked { background: var(--mint); border-color: var(--mint); }
.check input:checked::after { content: ""; width: 12px; height: 7px; border: 3.5px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.launch { flex: 1; display: grid; place-items: center; text-align: center; }
.launch h2 { font: 700 34px/1.1 var(--display); margin: 0 0 6px; color: var(--ink); }
.launch p { color: var(--ink-2); margin: 0; font-size: 16px; }
.launch .stage { position: relative; height: 290px; width: 240px; margin: 0 auto 10px; }
.launch .stage .moon-wrap { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); }
.launch .stage .osmo-wrap { position: absolute; bottom: 104px; left: 50%; transform: translateX(-50%); }
.blastoff .osmo-wrap { animation: blast 1s cubic-bezier(.6, -.3, .8, .4) forwards; }
@keyframes blast { 20% { transform: translate(-50%, 6px); } to { transform: translate(-50%, -700px) rotate(8deg); } }

/* ------------------------------------------------------------------ tabs */
#tabs { position: absolute; z-index: 30; left: 14px; right: 14px; bottom: calc(14px + var(--safe-b)); height: 78px; border-radius: 28px;
  background: rgba(255,255,255,.92); backdrop-filter: blur(16px); box-shadow: 0 12px 34px rgba(36, 26, 79, .16), 0 0 0 1px rgba(36,26,79,.04);
  display: grid; grid-template-columns: repeat(3, 1fr); padding: 8px; }
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border-radius: 22px; color: var(--muted);
  font: 600 13.5px var(--display); transition: background .2s, color .2s; }
.tab svg { width: 28px; height: 28px; }
.tab.on { color: var(--violet); background: #f1ecff; }
.tab.on svg { animation: pop .35s ease-out; }
#tabs.dark { background: rgba(33, 22, 90, .82); box-shadow: 0 12px 34px rgba(0,0,0,.4), 0 0 0 1px rgba(255,255,255,.08); }
#tabs.dark .tab { color: #a99fd8; }
#tabs.dark .tab.on { color: #fff; background: rgba(255,255,255,.12); }

/* ------------------------------------------------------------------ home */
.home-band { padding: 18px 20px 120px; border-radius: 0 0 40px 40px; }
.hello { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; }
.hello .av { width: 54px; height: 54px; border-radius: 50%; box-shadow: 0 0 0 3px rgba(255,255,255,.25); flex: none; }
.hello .who { flex: 1; min-width: 0; }
.hello .who small { display: block; font: 500 14px var(--display); color: #bfb4ef; }
.hello .who b { display: block; font: 700 24px/1.1 var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill-stat { display: flex; align-items: center; gap: 6px; padding: 8px 12px 8px 8px; border-radius: 99px; background: rgba(255,255,255,.13);
  font: 600 16px var(--display); color: #fff; }
.pill-stat svg { width: 26px; height: 26px; }
.home-title { position: relative; z-index: 1; margin: 26px 0 0; }
.home-title small { font: 500 14px var(--display); color: var(--sun); letter-spacing: .06em; text-transform: uppercase; }
.home-title h2 { font: 700 30px/1.1 var(--display); margin: 4px 0 0; }
.home-band .moon-peek { position: absolute; right: -60px; top: 70px; opacity: .95; }
.edition { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 20px 20px; margin-top: -102px;
  position: relative; z-index: 2; scrollbar-width: none; }
.edition::-webkit-scrollbar { display: none; }
.ed-card { flex: none; width: 82%; scroll-snap-align: center; background: #fff; border-radius: 30px; box-shadow: var(--shadow); overflow: hidden;
  text-align: left; transition: transform .15s; }
.ed-card:active { transform: scale(.98); }
.ed-img { position: relative; height: 178px; background: #e9e3f6 center/cover; }
.ed-img .num { position: absolute; left: 14px; top: 14px; width: 38px; height: 38px; border-radius: 13px; background: rgba(23, 15, 61, .72);
  backdrop-filter: blur(6px); color: #fff; display: grid; place-items: center; font: 700 18px var(--display); }
.done-badge { position: absolute; right: 12px; top: 12px; display: flex; align-items: center; gap: 5px; padding: 6px 12px 6px 8px; border-radius: 99px;
  background: var(--mint); color: #fff; font: 600 14px var(--display); box-shadow: 0 3px 0 var(--mint-d); }
.done-badge svg { width: 18px; height: 18px; }
.ed-body { padding: 14px 18px 18px; }
.tchip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px 4px 4px; border-radius: 99px; background: var(--tbg); color: var(--td);
  font: 600 14px var(--display); }
.tchip .planet { margin: -2px 0; }
.ed-body h3 { font: 600 20px/1.25 var(--display); margin: 10px 0 10px; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.meta { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.meta svg { width: 16px; height: 16px; }
.meta .dot { width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .6; }
.mission { margin: 0 20px; padding: 18px; border-radius: 28px; background: #fff; box-shadow: var(--shadow-s); }
.mission-row { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.mission-row .label { flex: 1; }
.mission-row b { font: 700 19px var(--display); display: block; }
.mission-row span { font-size: 14px; color: var(--muted); }
.trail { display: flex; align-items: center; gap: 4px; }
.trail .stop { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #f1ecfa; transition: transform .2s; }
.trail .stop.done { background: none; }
.trail .stop:not(.done) .planet { filter: grayscale(1) opacity(.35); }
.trail .link { width: 6px; height: 3px; border-radius: 3px; background: #e5dcf3; }
.section-h { display: flex; align-items: baseline; justify-content: space-between; margin: 30px 20px 12px; }
.section-h h3 { font: 700 22px var(--display); margin: 0; }
.section-h button { font: 600 15px var(--display); color: var(--violet); }
.planet-rail { display: flex; gap: 10px; overflow-x: auto; padding: 4px 20px 10px; scrollbar-width: none; }
.planet-rail::-webkit-scrollbar { display: none; }
.rail-p { flex: none; width: 92px; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px 12px; border-radius: 24px;
  background: #fff; box-shadow: 0 4px 0 #eee6f7; position: relative; }
.rail-p:active { transform: translateY(3px); box-shadow: 0 1px 0 #eee6f7; }
.rail-p b { font: 600 13px/1.15 var(--display); text-align: center; color: var(--ink); }
.rail-p .new { position: absolute; top: 6px; right: 8px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; background: var(--coral);
  color: #fff; font: 600 12px/22px var(--display); text-align: center; }
.list { display: grid; gap: 12px; padding: 0 20px; }
.row { display: flex; gap: 14px; align-items: center; padding: 10px; border-radius: 24px; background: #fff; box-shadow: var(--shadow-s); text-align: left; }
.row:active { transform: scale(.985); }
.row .thumb { position: relative; width: 96px; height: 96px; border-radius: 18px; background: #e9e3f6 center/cover; flex: none; }
.row .thumb .planet { position: absolute; left: -6px; bottom: -6px; filter: drop-shadow(0 3px 4px rgba(0,0,0,.2)); }
.row .rt { flex: 1; min-width: 0; }
.row h4 { font: 600 17px/1.25 var(--display); margin: 0 0 6px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.row.read { opacity: .72; }
.row .tick-s { color: var(--mint); width: 22px; height: 22px; flex: none; }

/* ------------------------------------------------------------------ galaxy */
.galaxy { min-height: 100%; padding-bottom: calc(120px + var(--safe-b)); }
.galaxy-head { position: relative; z-index: 2; padding: 22px 22px 6px; }
.galaxy-head h2 { font: 700 30px/1.1 var(--display); margin: 0; }
.galaxy-head p { margin: 6px 0 0; color: #c2b8ef; font-size: 15px; }
.stamp-meter { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 12px 16px; border-radius: 20px; background: rgba(255,255,255,.08); }
.stamp-meter .bar { flex: 1; height: 12px; border-radius: 99px; background: rgba(255,255,255,.12); overflow: hidden; }
.stamp-meter .bar b { display: block; height: 100%; background: linear-gradient(90deg, var(--sun), #ff8f3a); border-radius: 99px; }
.stamp-meter span { font: 600 15px var(--display); white-space: nowrap; }
.orbit-map { position: relative; margin-top: 8px; }
.orbit-map svg.path { position: absolute; inset: 0; width: 100%; height: 100%; }
.gp { position: absolute; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; width: 150px; }
.gp .planet { filter: drop-shadow(0 14px 22px rgba(0,0,0,.35)); }
.gp .pl-wrap { position: relative; animation: bob 4s ease-in-out infinite; }
.gp .pl-wrap::before { content: ""; position: absolute; inset: 14%; border-radius: 50%; background: var(--tc); filter: blur(26px); opacity: .45; }
.gp .pl-wrap .planet { position: relative; }
.gp .label { padding: 7px 14px; border-radius: 99px; background: rgba(255,255,255,.12); backdrop-filter: blur(6px); font: 600 15px var(--display);
  white-space: nowrap; border: 1.5px solid rgba(255,255,255,.12); }
.gp .label small { color: var(--sun); font-weight: 600; margin-left: 4px; }
.gp .got { position: absolute; right: 6px; top: 6px; width: 32px; height: 32px; border-radius: 50%; background: var(--mint); color: #fff;
  display: grid; place-items: center; border: 3px solid var(--space); z-index: 2; }
.gp .got svg { width: 16px; height: 16px; }
.gp:active .pl-wrap { transform: scale(.94); }
.you-here { position: absolute; z-index: 3; transform: translate(-50%, -100%); pointer-events: none; }

/* ------------------------------------------------------------------ planet page */
.pp-band { position: relative; padding: 18px 20px 30px; border-radius: 0 0 40px 40px; color: #fff; overflow: hidden;
  background: radial-gradient(400px 260px at 80% 20%, rgba(255,255,255,.28), transparent 70%), linear-gradient(160deg, var(--tc), var(--td)); }
.pp-band .stars { opacity: .5; }
.pp-hero { position: relative; display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.pp-hero .planet { flex: none; filter: drop-shadow(0 16px 24px rgba(0,0,0,.25)); }
.pp-hero h2 { font: 700 32px/1.05 var(--display); margin: 0; }
.pp-hero p { margin: 6px 0 0; font-size: 15px; line-height: 1.45; opacity: .9; }
.pp-stamp { position: relative; display: flex; align-items: center; gap: 12px; margin-top: 18px; padding: 12px 14px; border-radius: 22px; background: rgba(255,255,255,.18); }
.pp-stamp .bar { height: 10px; border-radius: 99px; background: rgba(255,255,255,.3); overflow: hidden; margin-top: 6px; }
.pp-stamp .bar b { display: block; height: 100%; background: #fff; border-radius: 99px; }
.pp-stamp div { flex: 1; font: 600 15px/1.3 var(--display); }
.empty { text-align: center; padding: 30px 30px; color: var(--ink-2); }
.empty h3 { font: 700 22px var(--display); margin: 10px 0 6px; color: var(--ink); }
.empty .osmo { margin: 0 auto; }

/* ------------------------------------------------------------------ passport */
.pass-head { position: relative; padding: 18px 20px 26px; border-radius: 0 0 40px 40px; text-align: center; }
.pass-head .top { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: center; }
.pass-head .top h2 { font: 700 22px var(--display); margin: 0; }
.pass-stage { position: relative; height: 230px; margin-top: 4px; }
.pass-stage .moon-wrap { position: absolute; left: 50%; bottom: -130px; transform: translateX(-50%); }
.pass-stage .osmo-wrap { position: absolute; left: 50%; bottom: 36px; transform: translateX(-50%); }
.pass-name { position: relative; z-index: 2; font: 700 30px var(--display); margin: 0; }
.rank { position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; padding: 8px 16px; border-radius: 99px;
  background: var(--sun); color: #3a2400; font: 600 16px var(--display); box-shadow: 0 4px 0 var(--sun-d); }
.rank svg { width: 20px; height: 20px; }
.rank-next { position: relative; z-index: 2; margin: 16px auto 0; max-width: 300px; }
.rank-next .bar { height: 12px; border-radius: 99px; background: rgba(255,255,255,.15); overflow: hidden; }
.rank-next .bar b { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--sun), #ff8f3a); }
.rank-next p { margin: 8px 0 0; font-size: 13.5px; color: #c9bff2; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: -18px 20px 0; position: relative; z-index: 3; }
.stat { background: #fff; border-radius: 22px; padding: 14px 10px; text-align: center; box-shadow: var(--shadow-s); }
.stat i { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; margin: 0 auto 6px; }
.stat i svg { width: 22px; height: 22px; }
.stat b { display: block; font: 700 26px/1 var(--display); }
.stat span { font: 500 12.5px var(--display); color: var(--muted); }
.stamps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 8px; margin: 0 20px; padding: 18px 12px; border-radius: 28px; background: #fff;
  box-shadow: var(--shadow-s); background-image: repeating-linear-gradient(0deg, transparent 0 29px, #f6f1fb 29px 30px); }
.stamp-cell { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.stamp-cell b { font: 600 13px/1.2 var(--display); color: var(--ink); }
.stamp-cell small { font-size: 11.5px; color: var(--muted); }
.stamp-cell .stamp.earned { transform: rotate(-8deg); }
.grown { margin: 26px 20px 0; }

/* ------------------------------------------------------------------ reader */
#reader { position: absolute; inset: 0; z-index: 40; background: var(--cream); overflow: hidden; animation: readerIn .35s cubic-bezier(.2, .8, .2, 1); }
@keyframes readerIn { from { transform: translateY(40px); opacity: 0; } }
.rd-top { position: absolute; z-index: 5; top: 0; left: 0; right: 0; padding: 12px 14px 0; display: flex; align-items: center; gap: 10px; pointer-events: none; }
.rd-top > * { pointer-events: auto; }
.segs { flex: 1; display: flex; gap: 5px; }
.segs i { flex: 1; height: 6px; border-radius: 99px; background: rgba(255,255,255,.45); overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.segs i.done, .segs i.cur { background: #fff; }
.segs i.cur { background: linear-gradient(90deg, #fff 60%, rgba(255,255,255,.55)); }
.rd-stage { position: absolute; inset: 0; touch-action: pan-y; }
.rd-card { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; background: var(--cream); scrollbar-width: none; will-change: transform; }
.rd-card::-webkit-scrollbar { display: none; }
.rd-card.anim { transition: transform .3s cubic-bezier(.2, .8, .2, 1), opacity .3s; }
.rd-hero { position: relative; height: 330px; background: #2c1b74 center/cover; }
.rd-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,5,40,.55) 0%, transparent 28%, transparent 70%, rgba(10,5,40,.25)); }
.rd-hero .credit { position: absolute; right: 14px; bottom: 44px; z-index: 1; font-size: 11px; color: #fff; opacity: .85; padding: 3px 8px; border-radius: 8px; background: rgba(0,0,0,.35); }
.rd-body { position: relative; margin-top: -32px; background: var(--cream); border-radius: 34px 34px 0 0; padding: 0 22px 40px; }
.rd-badge { position: absolute; top: -46px; left: 18px; filter: drop-shadow(0 10px 14px rgba(0,0,0,.25)); }
.rd-head { padding-top: 46px; }
.rd-head .meta { margin: 10px 0 0; }
.rd-title { font: 700 27px/1.2 var(--display); margin: 10px 0 0; color: var(--ink); letter-spacing: -.005em; }
.listen { display: flex; align-items: center; gap: 12px; margin: 18px 0 6px; padding: 8px 18px 8px 8px; border-radius: 99px; background: #fff;
  box-shadow: 0 4px 0 #ebe3f6; font: 600 17px var(--display); color: var(--ink); }
.listen:active { transform: translateY(3px); box-shadow: 0 1px 0 #ebe3f6; }
.listen .pb { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--tc); color: #fff; box-shadow: 0 3px 0 var(--td); }
.listen .pb svg { width: 20px; height: 20px; }
.eq { display: none; gap: 3px; align-items: center; height: 18px; margin-left: auto; }
.eq i { width: 4px; border-radius: 2px; background: var(--tc); animation: eq .8s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: .15s; } .eq i:nth-child(3) { animation-delay: .3s; } .eq i:nth-child(4) { animation-delay: .45s; }
@keyframes eq { 0%, 100% { height: 5px; } 50% { height: 18px; } }
.listen.playing .eq { display: flex; }
.story { font: 400 19px/1.75 var(--read); color: #2f2856; margin: 16px 0 0; }
.lv-k2 .story { font-size: 23px; line-height: 1.7; }
.lv-k2 .rd-title { font-size: 29px; }
.story .w { border-radius: 6px; transition: background .12s; }
.story .w.hl { background: var(--tbg); box-shadow: 0 0 0 3px var(--tbg); color: var(--td); }
.bw { font: inherit; color: var(--td); background: var(--tbg); border-radius: 8px; padding: 0 5px; border-bottom: 3px dotted var(--tc); cursor: pointer; }
.bw-hint { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); margin: 10px 0 0; }
.bw-hint span { color: var(--td); font-weight: 600; }
.osmo-says { display: flex; gap: 6px; align-items: flex-end; margin: 26px 0 0; }
.osmo-says .bubble { margin-bottom: 26px; font: 500 17px/1.45 var(--read); padding: 14px 16px; flex: 1; }
.osmo-says .bubble em { display: block; font: 600 13px var(--display); font-style: normal; letter-spacing: .06em; text-transform: uppercase; color: var(--tc); margin-bottom: 2px; }
.block { margin: 24px 0 0; padding: 20px; border-radius: 28px; background: #fff; box-shadow: var(--shadow-s); }
.block h3 { display: flex; align-items: center; gap: 10px; font: 700 20px var(--display); margin: 0 0 4px; }
.block h3 i { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--tbg); color: var(--tc); }
.block h3 i svg { width: 20px; height: 20px; }
.quiz-q { font: 500 18px/1.4 var(--read); margin: 10px 0 14px; color: var(--ink); }
.ans { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 10px 14px; margin-top: 10px; border-radius: 20px; text-align: left;
  background: #fff; border: 3px solid #ece4f6; box-shadow: 0 4px 0 #ece4f6; font: 500 17px/1.3 var(--read); color: var(--ink); transition: transform .08s; }
.ans:active { transform: translateY(3px); box-shadow: 0 1px 0 #ece4f6; }
.ans .k { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: #f3eefc; font: 700 17px var(--display); color: var(--ink-2); flex: none; }
.ans.right { background: #e3f9ef; border-color: var(--mint); box-shadow: 0 4px 0 var(--mint); }
.ans.right .k { background: var(--mint); color: #fff; }
.ans.wrong { background: #fff0f1; border-color: #ffb3bb; box-shadow: 0 4px 0 #ffb3bb; animation: shake .4s; }
.ans.wrong .k { background: var(--coral); color: #fff; }
.ans.hint { animation: pulse 1s ease-in-out 2; }
.ans[disabled] { pointer-events: none; }
@keyframes shake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }
@keyframes pulse { 50% { transform: scale(1.03); } }
.quiz-out { display: flex; align-items: center; gap: 10px; margin-top: 14px; font: 600 17px var(--display); min-height: 28px; }
.quiz-out .star { width: 30px; height: 30px; color: var(--sun); animation: pop .4s ease-out; }
.feels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.feel { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 0 8px; border-radius: 20px; font: 500 13px var(--display); color: var(--ink-2);
  border: 3px solid transparent; transition: transform .12s; }
.feel:active { transform: scale(.92); }
.feel.on { background: var(--tbg); border-color: var(--tc); color: var(--td); }
.feel.on svg { animation: pop .35s ease-out; }
.src { display: flex; gap: 12px; align-items: center; margin: 24px 0 0; padding: 14px 16px; border-radius: 20px; background: #f3eefa; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.src svg { width: 22px; height: 22px; flex: none; color: var(--muted); }
.src button { color: var(--violet); font-weight: 600; font-size: 13.5px; text-decoration: underline; }
.next-wrap { margin-top: 26px; }
.next-wrap small { display: block; text-align: center; color: var(--muted); font: 500 14px var(--display); margin-bottom: 10px; }
.swipe-tip { position: absolute; z-index: 6; left: 50%; bottom: calc(26px + var(--safe-b)); transform: translateX(-50%); display: flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 99px; background: rgba(23, 15, 61, .86); color: #fff; font: 500 14px var(--display); white-space: nowrap;
  animation: tipIn .4s ease-out, tipOut .4s 4s ease-in forwards; pointer-events: none; }
.swipe-tip .hand { display: inline-block; animation: swipeHand 1.2s ease-in-out infinite; }
@keyframes swipeHand { 0%, 100% { transform: translateX(6px); } 50% { transform: translateX(-6px); } }
@keyframes tipIn { from { opacity: 0; transform: translate(-50%, 10px); } }
@keyframes tipOut { to { opacity: 0; transform: translate(-50%, 10px); } }

/* ------------------------------------------------------------------ sheets */
#sheet-wrap { position: absolute; inset: 0; z-index: 60; }
.sheet-bg { position: absolute; inset: 0; background: rgba(17, 10, 46, .5); animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
#sheet { position: absolute; left: 0; right: 0; bottom: 0; max-height: 88%; overflow-y: auto; background: var(--cream); border-radius: 34px 34px 0 0;
  padding: 12px 22px calc(26px + var(--safe-b)); animation: sheetUp .32s cubic-bezier(.2, .9, .3, 1.1); }
#sheet::before { content: ""; display: block; width: 48px; height: 5px; border-radius: 9px; background: #ddd3ee; margin: 0 auto 14px; }
@keyframes sheetUp { from { transform: translateY(100%); } }
.sheet-h { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.sheet-h h3 { flex: 1; font: 700 24px var(--display); margin: 0; }
.word-card { text-align: center; padding: 6px 0 4px; }
.word-card .word { font: 700 40px var(--display); color: var(--td); margin: 4px 0; }
.word-card p { font: 400 19px/1.6 var(--read); color: var(--ink); margin: 6px 0 20px; }
.gate-q { text-align: center; font: 700 44px var(--display); margin: 10px 0 18px; color: var(--ink); }
.gate-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.gate-opts .btn { font-size: 24px; }
.gate-opts.shake { animation: shake .4s; }
.set-list { display: grid; gap: 10px; }
.set-item { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; border-radius: 20px; background: #fff; box-shadow: var(--shadow-s);
  font: 600 17px var(--display); color: var(--ink); text-align: left; }
.set-item i { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; background: #f1ecff; color: var(--violet); flex: none; }
.set-item i svg { width: 22px; height: 22px; }
.set-item span { flex: 1; }
.set-item small { display: block; font: 400 13px var(--read); color: var(--muted); margin-top: 2px; }
.set-item.danger { color: #c62f42; }
.set-item.danger i { background: #fff0f1; color: var(--coral); }
.toggle { width: 54px; height: 32px; border-radius: 99px; background: #ddd5ec; position: relative; transition: background .2s; flex: none; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.2); transition: transform .2s; }
.toggle.on { background: var(--mint); }
.toggle.on::after { transform: translateX(22px); }
.info-body { color: var(--ink-2); line-height: 1.6; font-size: 15px; }
.info-body h4 { font: 600 17px var(--display); color: var(--ink); margin: 18px 0 4px; }

/* ------------------------------------------------------------------ celebrate */
.celebrate { position: absolute; inset: 0; z-index: 70; display: grid; place-items: center; text-align: center; padding: 30px; animation: fade .3s; }
.celebrate .inner { position: relative; z-index: 1; width: 100%; }
.celebrate h2 { font: 700 34px/1.1 var(--display); margin: 10px 0 8px; }
.celebrate p { color: #d6ccff; font-size: 16px; margin: 0 0 26px; line-height: 1.5; }
.celebrate .stamp { margin: 0 auto; animation: stampIn .6s cubic-bezier(.3, 1.6, .5, 1) .2s both; }
@keyframes stampIn { from { transform: scale(2.4) rotate(20deg); opacity: 0; } to { transform: scale(1) rotate(-8deg); opacity: 1; } }
.rays { position: absolute; left: 50%; top: 42%; width: 560px; height: 560px; transform: translate(-50%, -50%); pointer-events: none;
  background: repeating-conic-gradient(rgba(255,255,255,.07) 0 10deg, transparent 10deg 20deg); border-radius: 50%; animation: spin 18s linear infinite;
  mask: radial-gradient(circle, #000 20%, transparent 65%); }
@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
#fx { position: absolute; inset: 0; z-index: 80; pointer-events: none; overflow: hidden; }
.confetti { position: absolute; top: -20px; width: 10px; height: 14px; border-radius: 3px; animation: fall linear forwards; }
@keyframes fall { to { transform: translate(var(--dx), 110vh) rotate(var(--r)); } }
.fly-star { position: absolute; width: 36px; height: 36px; color: var(--sun); animation: flyStar .9s cubic-bezier(.5, 0, .5, 1) forwards; }
@keyframes flyStar { 0% { transform: scale(.4); opacity: 0; } 20% { transform: scale(1.4); opacity: 1; } 100% { transform: translate(var(--tx), var(--ty)) scale(.6); opacity: 0; } }

#toast { position: absolute; left: 50%; top: 18px; z-index: 90; transform: translate(-50%, -30px); opacity: 0; transition: .3s cubic-bezier(.3, 1.4, .5, 1);
  padding: 12px 18px; border-radius: 18px; background: var(--ink); color: #fff; font: 600 15px var(--display); box-shadow: var(--shadow); max-width: 86%; text-align: center; pointer-events: none; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .wordmark-big span { opacity: 1; }
}

/* reader top bar turns solid once the story scrolls under it */
.rd-top { transition: background .2s, box-shadow .2s; padding-bottom: 10px; }
#reader.scrolled .rd-top { background: rgba(255, 248, 239, .94); backdrop-filter: blur(14px); box-shadow: 0 6px 18px rgba(36, 26, 79, .08); }
#reader.scrolled .rd-top .icon-btn.dark { background: #fff; color: var(--ink); box-shadow: 0 3px 0 #e2dbef; }
#reader.scrolled .segs i { background: #e8e0f5; box-shadow: none; }
#reader.scrolled .segs i.done, #reader.scrolled .segs i.cur { background: var(--violet); }
.swipe-tip svg { width: 18px; height: 18px; }
.suits { padding: 6px 4px; }
.row .thumb .planet { left: 6px; bottom: 6px; }
.fine a, .consent-card a { color: var(--violet); font-weight: 500; }

/* passport: Osmo stands on the top of the moon; the name sits on dark sky */
.pass-stage { height: 196px; }
.pass-stage .moon-wrap { left: 0; right: 0; bottom: 0; height: 64px; transform: none; overflow: hidden; display: flex; justify-content: center; }
.pass-stage .moon-wrap svg { flex: none; }
.pass-stage .osmo-wrap { bottom: 40px; }
.pass-name { margin-top: 8px; }
.stamps { grid-template-columns: 1fr 1fr; background-image: none; gap: 16px 10px; }
.word-card .osmo { margin: 0 auto; }
.pass-stage .moon-wrap { -webkit-mask-image: linear-gradient(#000 45%, transparent); mask-image: linear-gradient(#000 45%, transparent); }
.set-item .toggle { flex: 0 0 54px; }
.report-link { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 14px; padding: 10px;
  font: 500 14px var(--display); color: var(--muted); }
.report-link svg { width: 18px; height: 18px; }

/* ------------------------------------------------------------------ Osmo Plus */
.plus-mark { display: inline-grid; place-items: center; border-radius: 30%; flex: none; color: #fff;
  background: linear-gradient(135deg, #ffd24a, #ff8a1f); box-shadow: 0 4px 0 #d86a00, inset 0 2px 0 rgba(255,255,255,.5); }
.plus-mark svg { width: 56%; height: 56%; }
.plus-banner { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; margin-bottom: 12px; border-radius: 22px; text-align: left;
  background: linear-gradient(135deg, #2c1b74, #5b36d6); color: #fff; box-shadow: 0 5px 0 #1d1150; }
.plus-banner span { flex: 1; } .plus-banner b { display: block; font: 700 18px var(--display); }
.plus-banner small { display: block; font-size: 13px; color: #d6ccff; margin-top: 2px; }
.lock-card { text-align: center; padding: 6px 4px 4px; }
.lock-card .osmo { margin: 0 auto; }
.lock-card h3 { font: 700 23px/1.25 var(--display); margin: 12px 0 6px; }
.lock-card p { color: var(--ink-2); margin: 0 0 18px; }
.lock-card .btn + .btn { margin-top: 10px; }
.plus-hero { text-align: center; margin-top: -10px; }
.plus-hero .osmo { margin: 0 auto; }
.plus-hero h3 { font: 700 26px/1.2 var(--display); margin: 8px 0 4px; }
.plus-hero p { margin: 0 0 16px; color: var(--ink-2); font-size: 15px; }
.perks-list { display: grid; gap: 10px; margin-bottom: 16px; }
.perks-list > div { display: flex; gap: 12px; align-items: center; background: #fff; border-radius: 18px; padding: 10px 12px; box-shadow: var(--shadow-s); }
.perks-list i { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; background: #fff3d4; color: #e08a00; flex: none; }
.perks-list i svg { width: 22px; height: 22px; }
.perks-list b { display: block; font: 600 16px var(--display); }
.perks-list small { color: var(--muted); font-size: 13px; }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.plans .fine { grid-column: 1 / -1; }
.plan { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 20px 10px 14px; border-radius: 22px; background: #fff;
  border: 3px solid #ece4f6; box-shadow: 0 4px 0 #ece4f6; }
.plan.on { border-color: var(--violet); box-shadow: 0 4px 0 var(--violet); background: #f6f2ff; }
.plan b { font: 600 16px var(--display); color: var(--ink-2); }
.plan .price { font: 700 24px var(--display); color: var(--ink); }
.plan .price small { font: 500 13px var(--display); color: var(--muted); }
.plan .tag { position: absolute; top: -12px; padding: 3px 10px; border-radius: 99px; background: var(--mint); color: #fff; font: 600 12px var(--display); }
.plan .trial { font: 600 12px var(--display); color: var(--mint-d); }
#sheet .btn.ghost { margin-top: 6px; }
.plus-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 20px 0; }
.plus-card { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 14px; border-radius: 24px; text-align: left;
  background: #fff; box-shadow: 0 4px 0 #eee6f7; }
.plus-card:active { transform: translateY(3px); box-shadow: 0 1px 0 #eee6f7; }
.plus-card .pc-icon { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; background: var(--tc); color: #fff; margin-bottom: 6px; box-shadow: 0 3px 0 var(--td); }
.plus-card .pc-icon svg { width: 22px; height: 22px; }
.plus-card b { font: 600 16px var(--display); }
.plus-card small { color: var(--muted); font-size: 12.5px; }
.plus-card .lock { position: absolute; top: 10px; right: 10px; width: 26px; height: 26px; border-radius: 50%; background: #f3eefc; color: var(--muted); display: grid; place-items: center; }
.plus-card .lock svg { width: 15px; height: 15px; }
.worksheet-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 12px; padding: 12px; border-radius: 16px;
  border: 2px dashed #e0d6f2; font: 600 15px var(--display); color: var(--ink-2); }
.worksheet-btn svg { width: 18px; height: 18px; }
.challenge { position: absolute; inset: 0; overflow-y: auto; background: var(--cream); }
.challenge .rd-top { padding: 14px; }
.segs.dark i { background: #e8e0f5; box-shadow: none; }
.segs.dark i.done, .segs.dark i.cur { background: var(--tc); }
.ch-body { padding: 10px 22px 40px; }
.ch-story { color: var(--muted); font-size: 14px; margin: 14px 0 4px; }
.ch-q { font: 700 25px/1.3 var(--display); margin: 0 0 8px; }
.challenge .quiz { margin-bottom: 18px; }

/* ------------------------------------------------------------------ Today: just the news cards */
.today { height: 100%; display: flex; flex-direction: column; }
.today-top { position: relative; z-index: 2; display: flex; align-items: center; gap: 12px; padding: 14px 20px 10px; }
.today-top .av { width: 44px; height: 44px; border-radius: 50%; box-shadow: 0 0 0 3px rgba(255,255,255,.22); flex: none; }
.today-top .tt { flex: 1; }
.today-top .tt b { display: block; font: 700 26px/1 var(--display); }
.today-top .tt small { font: 500 13px var(--display); color: var(--sun); letter-spacing: .04em; text-transform: uppercase; }
.deck { position: relative; z-index: 1; flex: 1; min-height: 0; display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 6px 8% 8px; scrollbar-width: none; overscroll-behavior-x: contain; }
.deck::-webkit-scrollbar { display: none; }
.ncard { flex: none; width: 100%; height: 100%; scroll-snap-align: center; display: flex; flex-direction: column; overflow: hidden;
  border-radius: 34px; background: #fff; color: var(--ink); box-shadow: 0 24px 50px rgba(0,0,0,.35); cursor: pointer; transition: transform .15s; }
.ncard:active { transform: scale(.985); }
.nc-img { position: relative; flex: 1 1 52%; min-height: 150px; background: #2c1b74 center/cover; }
.nc-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,5,40,.35), transparent 30%, transparent 75%, rgba(10,5,40,.18)); }
.nc-img .num { position: absolute; z-index: 1; left: 16px; top: 16px; padding: 6px 12px; border-radius: 14px; background: rgba(23,15,61,.7);
  backdrop-filter: blur(6px); color: #fff; font: 700 18px var(--display); }
.nc-img .num small { font-size: 13px; opacity: .7; }
.nc-img .done-badge { z-index: 1; }
.nc-planet { position: absolute; z-index: 1; left: 14px; bottom: -30px; filter: drop-shadow(0 8px 10px rgba(0,0,0,.28)); }
.nc-body { flex: 0 1 auto; display: flex; flex-direction: column; padding: 38px 22px 20px; }
.nc-body .tchip { align-self: flex-start; }
.nc-body h3 { font: 700 23px/1.22 var(--display); margin: 10px 0 8px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.nc-body p { margin: 0 0 14px; font: 400 15px/1.5 var(--read); color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nc-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.nc-go { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--tc); color: #fff; box-shadow: 0 4px 0 var(--td); flex: none; }
.nc-go svg { width: 26px; height: 26px; }
.ncard.read .nc-go { background: var(--mint); box-shadow: 0 4px 0 var(--mint-d); }
.done-card { align-items: center; justify-content: center; text-align: center; padding: 28px; background: linear-gradient(180deg, #fff, #fff6e6); }
.done-card h3 { font: 700 26px var(--display); margin: 10px 0 6px; }
.done-card p { color: var(--ink-2); margin: 0 0 20px; line-height: 1.5; }
.done-card .btn { width: auto; }
.done-card .empty { padding: 0; }
.dots { position: relative; z-index: 1; display: flex; justify-content: center; gap: 7px; padding: 6px 0 12px; }
.dots i { width: 8px; height: 8px; border-radius: 99px; background: rgba(255,255,255,.28); transition: width .25s, background .25s; }
.dots i.read { background: rgba(31,191,135,.75); }
.dots i.on { width: 26px; background: #fff; }
@media (max-height: 700px) { .nc-body h3 { font-size: 20px; -webkit-line-clamp: 2; } .nc-body p { -webkit-line-clamp: 1; } }

/* Galaxy: discovery shelf above the planet map */
.galaxy .plus-row { margin: 18px 20px 0; position: relative; z-index: 2; }
.section-h.light { position: relative; z-index: 2; color: #fff; }
.more-rail { position: relative; z-index: 2; display: flex; gap: 12px; overflow-x: auto; padding: 0 20px 6px; scrollbar-width: none; }
.more-rail::-webkit-scrollbar { display: none; }
.mini { flex: none; width: 150px; text-align: left; color: #fff; }
.mini-img { position: relative; height: 100px; border-radius: 18px; background: #2c1b74 center/cover; margin-bottom: 8px; box-shadow: 0 8px 18px rgba(0,0,0,.3); }
.mini-img .tick { position: absolute; right: 8px; top: 8px; width: 26px; height: 26px; border-radius: 50%; background: var(--mint); display: grid; place-items: center; }
.mini-img .tick svg { width: 15px; height: 15px; }
.mini b { font: 600 14px/1.25 var(--display); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.plus-card { color: var(--ink); }
#view.dark-bg { background: #120b33; }

/* ------------------------------------------------------------------ keep clear of the status bar */
.today-top { padding-top: calc(14px + var(--safe-t)); }
.galaxy-head { padding-top: calc(22px + var(--safe-t)); }
.pp-band { padding-top: calc(18px + var(--safe-t)); }
.pass-head { padding-top: calc(18px + var(--safe-t)); }
.ob { padding-top: calc(18px + var(--safe-t)); }
.welcome .hero { padding-top: var(--safe-t); }
.rd-top { padding-top: calc(12px + var(--safe-t)); }
.challenge .rd-top { padding-top: calc(14px + var(--safe-t)); }
.rd-body { padding-bottom: calc(40px + var(--safe-b)); }
.ch-body { padding-bottom: calc(40px + var(--safe-b)); }
.splash .scene, .celebrate .inner { margin-top: var(--safe-t); }
#toast { top: calc(18px + var(--safe-t)); }
.info-body.legal h2 { font: 600 18px var(--display); color: var(--ink); margin: 20px 0 4px; }
.info-body.legal table { width: 100%; border-collapse: collapse; font-size: 13.5px; background: #fff; border-radius: 14px; overflow: hidden; }
.info-body.legal td, .info-body.legal th { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.info-body.legal .card { background: #fff; border-radius: 16px; padding: 12px 14px; }
.info-body.legal .lead { font-size: 16px; color: var(--ink); }
.info-body.legal li { margin: 4px 0; }

/* access code (app reviewers, pilots) */
#plus-code .code-row { display: flex; gap: 8px; margin-top: 8px; }
#plus-code input { flex: 1; min-width: 0; min-height: 48px; padding: 0 14px; border-radius: 14px; border: 2px solid var(--line, rgba(0,0,0,.12));
  font: inherit; font-size: 16px; letter-spacing: .06em; text-transform: uppercase; background: var(--card, #fff); color: var(--ink, inherit); }
#plus-code .btn { flex: none; width: auto; padding: 0 20px; }
