/* LoosenUp - morning sky theme. Display: Fraunces (soft). UI: Nunito. */
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('/fonts/nunito-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/fonts/fraunces-latin.woff2') format('woff2');
}

:root {
  --sky: #EDF7FF;
  --sky-2: #CFE8FF;
  --dawn: #FFF6E3;
  --sun: #FFC857;
  --sun-2: #F2A72B;
  --peach: #FFB088;
  --leaf: #4FA67C;
  --leaf-2: #276E4F;
  --ink: #223038;
  --ink-2: #4A5A63;
  --glass: rgba(255, 255, 255, 0.78);
  --glass-line: rgba(255, 255, 255, 0.95);
  --line: rgba(34, 48, 56, 0.10);
  --tap: 48px;
  --radius: 28px;
  --shadow: 0 1px 2px rgba(34, 48, 56, 0.05), 0 18px 40px -22px rgba(46, 125, 91, 0.35);
  --col: 520px;
  --display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --ui: 'Nunito', ui-rounded, 'SF Pro Rounded', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
/* Nothing may ever push the page sideways on a phone, even mid-animation. */
html, body { max-width: 100%; overflow-x: hidden; }
@supports (overflow: clip) { html, body { overflow-x: clip; } }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--ui);
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink);
  background: linear-gradient(180deg, var(--sky-2) 0%, var(--sky) 40%, var(--dawn) 100%) fixed;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
[hidden] { display: none !important; }
img, svg { display: block; max-width: 100%; }
button, input, textarea { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

:focus-visible {
  outline: 3px solid var(--leaf-2);
  outline-offset: 3px;
  border-radius: 14px;
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip {
  position: absolute; left: 12px; top: -80px; z-index: 70;
  display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 18px;
  background: var(--ink); color: #fff; border-radius: 999px; text-decoration: none; font-weight: 800;
}
.skip:focus { top: calc(8px + var(--safe-top)); }

/* Soft sky backdrop */
.sky { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.cloud { position: absolute; height: 46px; border-radius: 999px; background: rgba(255, 255, 255, 0.72); }
.cloud::before, .cloud::after { content: ''; position: absolute; background: inherit; border-radius: 50%; }
.cloud::before { width: 56px; height: 56px; left: 18%; top: -26px; }
.cloud::after { width: 40px; height: 40px; right: 18%; top: -18px; }
.c1 { width: 160px; top: 12%; left: -40px; animation: drift 60s ease-in-out infinite; }
.c2 { width: 120px; top: 38%; right: -30px; opacity: .7; animation: drift 80s ease-in-out infinite reverse; }
.c3 { width: 200px; top: 74%; left: 8%; opacity: .5; animation: drift 90s ease-in-out infinite; }
@keyframes drift { 50% { transform: translateX(40px); } }
.sky::after {
  content: ''; position: absolute; left: -10%; right: -10%; bottom: -120px; height: 260px; display: none;
  background: radial-gradient(ellipse 40% 60% at 22% 100%, #7AC498 0 70%, transparent 71%),
    radial-gradient(ellipse 45% 55% at 78% 100%, #4FA67C 0 70%, transparent 71%);
  opacity: .5;
}
.sky::before {
  content: ''; position: absolute; width: 240px; height: 240px; right: 7%; top: 8%; border-radius: 50%; display: none;
  background: radial-gradient(circle, #FFE29A 0 38%, rgba(255, 200, 87, .5) 39% 52%, rgba(255, 200, 87, 0) 70%);
}

/* Layout */
.app {
  position: relative; z-index: 1;
  width: 100%; max-width: var(--col); margin: 0 auto;
  padding: calc(6px + var(--safe-top)) calc(20px + var(--safe-right)) calc(120px + var(--safe-bottom)) calc(20px + var(--safe-left));
}
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand { min-width: 0; }
.brand-mark { flex: 0 0 34px; width: 34px; height: 34px; animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-3px); } }
.wordmark { font-family: var(--display); font-weight: 700; font-size: clamp(21px, 6vw, 25px); white-space: nowrap; letter-spacing: -.3px; font-variation-settings: 'SOFT' 100; }
.seed-pill {
  display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); min-width: var(--tap); padding: 0 16px;
  border: 1px solid var(--glass-line); border-radius: 999px; background: var(--glass); box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); font-weight: 800; cursor: pointer;
}
.seed-dot { width: 12px; height: 16px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: var(--leaf); }

.screen { display: flex; flex-direction: column; gap: 16px; padding: 6px 0 12px; animation: rise-in .3s ease-out both; }
@keyframes rise-in { from { opacity: .4; transform: translateY(8px); } to { opacity: 1; transform: none; } }
main:focus { outline: none; }
.bleed { margin-inline: calc(-20px - var(--safe-left)) calc(-20px - var(--safe-right)); }
.welcome .scene { -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 22%); mask-image: linear-gradient(180deg, transparent 0, #000 22%); }

.display { font-family: var(--display); font-size: clamp(34px, 9vw, 46px); line-height: 1.05; font-weight: 650; letter-spacing: -.8px; font-variation-settings: 'SOFT' 100; }
.display.small { font-size: clamp(28px, 7.4vw, 36px); }
.title { font-family: var(--display); font-size: 27px; line-height: 1.15; font-weight: 650; letter-spacing: -.3px; font-variation-settings: 'SOFT' 100; }
.subtitle { font-size: 18px; font-weight: 800; }
.eyebrow { font-size: 13px; font-weight: 900; letter-spacing: 1.4px; text-transform: uppercase; color: var(--leaf-2); }
.lead { font-size: 18px; color: var(--ink-2); }
.muted { color: var(--ink-2); }
.fine { font-size: 14px; color: var(--ink-2); }
.center { text-align: center; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.card {
  background: var(--glass); border: 1px solid var(--glass-line); border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  display: flex; flex-direction: column; gap: 10px; min-width: 0;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-align: center;
  min-height: 54px; min-width: var(--tap); padding: 12px 24px; width: 100%;
  border: 0; border-radius: 999px; font-weight: 800; font-size: 17px; line-height: 1.25;
  cursor: pointer; text-decoration: none; color: var(--ink);
  transition: transform .15s ease, box-shadow .2s ease, background-color .2s ease;
}
.btn:active { transform: scale(.98); }
.btn-sun {
  background: linear-gradient(180deg, #FFD36E 0%, var(--sun) 40%, var(--sun-2) 100%);
  box-shadow: 0 12px 24px -12px rgba(242, 167, 43, .9), inset 0 1px 0 rgba(255, 255, 255, .6), inset 0 -2px 0 rgba(0, 0, 0, .06);
}
.btn-soft { background: rgba(255, 255, 255, .9); box-shadow: inset 0 0 0 2px rgba(79, 166, 124, .4); color: var(--leaf-2); }
.btn-ghost { background: transparent; color: var(--leaf-2); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; min-height: var(--tap); }
.btn[disabled] { opacity: .5; cursor: default; }

/* Inputs */
.field-label { font-weight: 800; }
.text-input {
  width: 100%; min-height: 54px; padding: 10px 20px; border-radius: 18px;
  border: 2px solid rgba(255, 255, 255, .9); background: rgba(255, 255, 255, .92); font-size: 18px;
  box-shadow: inset 0 0 0 1px var(--line);
}
.text-input:focus { border-color: var(--leaf); }
.text-input.time { width: auto; flex: 1 1 140px; }
.row .btn { width: auto; flex: 0 0 auto; }

.range { width: 100%; height: var(--tap); min-height: var(--tap); margin: 0; background: transparent; accent-color: var(--sun-2); cursor: pointer; -webkit-appearance: none; appearance: none; }
.range::-webkit-slider-runnable-track { height: 12px; border-radius: 999px; background: linear-gradient(90deg, var(--sky-2), var(--peach), var(--sun)); }
.range::-moz-range-track { height: 12px; border-radius: 999px; background: linear-gradient(90deg, var(--sky-2), var(--peach), var(--sun)); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 34px; height: 34px; margin-top: -11px; border-radius: 50%; background: #fff; border: 4px solid var(--sun-2); box-shadow: 0 4px 10px rgba(0, 0, 0, .15); }
.range::-moz-range-thumb { width: 28px; height: 28px; border-radius: 50%; background: #fff; border: 4px solid var(--sun-2); }
.slider-card { align-items: center; text-align: center; }
.slider-top { position: relative; width: 132px; height: 132px; display: grid; place-items: center; }
.slider-sun { position: absolute; inset: 0; width: 100%; height: 100%; transition: transform .35s cubic-bezier(.2, .9, .3, 1.2); }
.slider-value { position: relative; font-family: var(--display); font-size: 44px; font-weight: 700; line-height: 1; color: var(--ink); }
.slider-word { font-weight: 800; color: var(--ink-2); min-height: 1.5em; }
.range-ends { width: 100%; display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-2); gap: 8px; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.lang-switch { justify-content: center; margin-bottom: 4px; }
.chip {
  min-height: var(--tap); min-width: var(--tap); padding: 10px 18px; border-radius: 999px;
  border: 1px solid var(--glass-line); background: var(--glass); font-weight: 800; cursor: pointer; text-align: left;
  box-shadow: 0 4px 14px -10px rgba(34, 48, 56, .4);
}
.chip[aria-pressed="true"] { background: var(--leaf-2); color: #fff; border-color: var(--leaf-2); }
.chip[disabled] { background: rgba(255, 255, 255, .45); color: var(--ink-2); cursor: default; box-shadow: none; }
.chip small { display: block; font-size: 12px; font-weight: 700; opacity: .85; }

/* Scenes */
.scene svg, .sunrise svg { width: 100%; height: auto; }
.welcome { gap: 14px; }
.welcome .scene { margin-top: -6px; }
.welcome-sun { transform-box: fill-box; transform-origin: 50% 50%; animation: sun-up 1.6s cubic-bezier(.2, .8, .2, 1) both, spin 50s 1.6s linear infinite; }
.welcome-balloon { animation: balloon-rise 2.2s .4s cubic-bezier(.2, .8, .2, 1) both, float 7s 2.6s ease-in-out infinite; }
@keyframes balloon-rise { from { transform: translateY(150px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes sun-up { from { transform: translateY(70px) rotate(-30deg); } to { transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
.gift { width: min(220px, 62%); margin: 4px auto 0; }
.gift-lid { transform-origin: 100px 78px; animation: lid-open 1.1s .3s cubic-bezier(.2, .9, .3, 1.3) both; }
@keyframes lid-open { to { transform: translateY(-26px) rotate(-12deg); } }
.gift-seeds { animation: seeds-up 1s .9s ease-out both; }
@keyframes seeds-up { from { opacity: 0; transform: translateY(40px); } }
.gift-glow { transform-origin: 100px 92px; animation: glow 2.4s ease-in-out infinite alternate; }
@keyframes glow { from { opacity: .5; transform: scale(.92); } to { opacity: 1; transform: scale(1.05); } }
.gift-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.gift-chip { background: var(--glass); border: 1px solid var(--glass-line); border-radius: 22px; padding: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; text-align: center; }
.gift-chip strong { font-family: var(--display); font-size: 28px; font-weight: 700; color: var(--leaf-2); }
.gift-chip span { font-size: 14px; color: var(--ink-2); }
.level-row { display: flex; justify-content: space-between; font-weight: 800; }
.bar { height: 14px; border-radius: 999px; background: rgba(207, 232, 255, .9); overflow: hidden; }
.bar-fill { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--leaf), var(--sun)); transition: width .8s ease; }

/* Pick */
.pick-card { padding-top: 0; overflow: hidden; }
.pick-head { margin: 0 -20px 4px; height: 92px; display: grid; place-items: center; background: radial-gradient(circle at 50% 120%, var(--badge, var(--sun)) 0 40%, transparent 41%), linear-gradient(180deg, var(--sky-2), var(--dawn)); }
.pick-mark { width: 64px; height: 64px; animation: spin 40s linear infinite; }
.pick-name { font-family: var(--display); font-size: 30px; font-weight: 650; letter-spacing: -.3px; }
.pick-desc { color: var(--ink-2); }
.pick-reason { background: rgba(237, 247, 255, .9); border-radius: 18px; padding: 12px 14px; }
.tag { display: inline-block; font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .8px; color: var(--leaf-2); white-space: nowrap; }

/* Session: the petal sun blooms with each breath */
.session { align-items: stretch; }
.orb-wrap { position: relative; width: min(290px, 78vw); aspect-ratio: 1; margin: 0 auto; display: grid; place-items: center; }
.orb-halo { position: absolute; inset: 6%; border-radius: 50%; background: radial-gradient(circle, rgba(255, 226, 154, .7) 0 30%, rgba(255, 200, 87, .18) 55%, transparent 70%); animation: glow 4s ease-in-out infinite alternate; }
.orb-petals {
  position: absolute; inset: 0; width: 100%; height: 100%;
  transform: scale(.55); transition-property: transform; transition-timing-function: ease-in-out; transition-duration: 4s;
}
.orb {
  position: relative; width: 40%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 40% 34%, #FFF3CF 0%, var(--sun) 50%, var(--sun-2) 100%);
  box-shadow: 0 0 40px 6px rgba(255, 200, 87, .55);
  transform: scale(.62);
  transition-property: transform; transition-timing-function: ease-in-out; transition-duration: 4s;
  will-change: transform;
}
.cue { font-family: var(--display); font-size: 28px; font-weight: 650; text-align: center; min-height: 1.3em; }
.session.steps .orb-wrap, .session.journal .orb-wrap { width: min(160px, 42vw); }
.session.journal .cue, .session.steps .cue { display: none; }
.step-box { text-align: center; align-items: center; }
.step-text { font-size: 20px; font-weight: 800; }
.journal { width: 100%; min-height: 150px; padding: 14px; border-radius: 18px; border: 2px solid var(--line); background: rgba(237, 247, 255, .9); resize: vertical; font-size: 17px; }
.timer { text-align: center; font-family: var(--display); font-size: 34px; font-weight: 650; font-variant-numeric: tabular-nums; }
.session-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* Result: the rising sun, petals unfurl */
.sunrise { border-radius: 0 0 36px 36px; overflow: hidden; margin-top: -6px; box-shadow: 0 20px 40px -26px rgba(242, 167, 43, .8); }
.rs-rise { animation: sunrise 1.8s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes sunrise { from { transform: translateY(110px); } to { transform: none; } }
.rp { transform-box: fill-box; transform-origin: 50% 100%; animation: petal-open .7s cubic-bezier(.2, .9, .3, 1.3) both; animation-delay: calc(1.1s + var(--i) * 80ms); }
@keyframes petal-open { from { transform: scale(.2); opacity: 0; } to { transform: none; opacity: 1; } }
#rs-petals { transform-box: view-box; transform-origin: 180px 132px; animation: spin 40s 2.4s linear infinite; }
.result-headline { text-align: center; font-family: var(--display); font-size: 26px; font-weight: 650; }
.gain { display: flex; flex-direction: column; align-items: center; margin-top: -6px; }
.gain-num { font-family: var(--display); font-size: clamp(76px, 24vw, 104px); font-weight: 700; line-height: 1; color: var(--leaf-2); letter-spacing: -2px; animation: pop .7s .9s cubic-bezier(.2, .9, .3, 1.4) both; }
@keyframes pop { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: none; } }
.gain-label { font-weight: 900; color: var(--ink-2); letter-spacing: 1.4px; text-transform: uppercase; font-size: 13px; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { background: var(--glass); border: 1px solid var(--glass-line); border-radius: 22px; padding: 14px 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.stat.wide { grid-column: 1 / -1; }
.stat-k { font-size: 12px; font-weight: 900; color: var(--ink-2); text-transform: uppercase; letter-spacing: .8px; }
.stat-v { font-family: var(--display); font-size: 22px; font-weight: 650; }
.rewards { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.rewards li { background: rgba(255, 246, 227, .95); border-radius: 18px; padding: 10px 14px; font-weight: 800; display: flex; gap: 10px; align-items: center; }
.rewards li::before { content: ''; flex: 0 0 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle, var(--sun-2) 0 35%, var(--peach) 36% 100%); }
.kind-note { text-align: center; font-family: var(--display); font-size: 20px; color: var(--ink-2); font-weight: 500; }

/* Today: a living sky that follows the time of day */
.sky-card {
  position: relative; overflow: hidden; border-radius: 32px; min-height: 230px; padding: 22px 22px 70px;
  background: linear-gradient(180deg, #FFD9B8 0%, #CFE8FF 70%); box-shadow: var(--shadow);
}
.sky-card[data-time="Afternoons"] { background: linear-gradient(180deg, #8EC9FF 0%, #DDF0FF 75%); }
.sky-card[data-time="Evenings"] { background: linear-gradient(180deg, #FF9F7A 0%, #FFD98A 70%); }
.sky-card[data-time="Quiet nights"] { background: linear-gradient(180deg, #1F2C55 0%, #3D4F86 80%); color: #fff; }
.sky-card[data-time="Quiet nights"] .eyebrow { color: #FFE29A; }
.sky-sun { position: absolute; width: 104px; height: 104px; left: var(--sx, 70%); top: var(--sy, 20%); transform: translate(-50%, -50%); animation: spin 60s linear infinite; }
.sky-moon { position: absolute; display: none; width: 56px; height: 56px; right: 14%; top: 18%; border-radius: 50%; box-shadow: inset -14px 6px 0 0 #FFE29A; transform: rotate(-20deg); }
.sky-stars { position: absolute; inset: 0; display: none; background:
  radial-gradient(2px 2px at 20% 20%, #fff 50%, transparent 51%), radial-gradient(2px 2px at 40% 12%, #fff 50%, transparent 51%),
  radial-gradient(1.5px 1.5px at 62% 30%, #fff 50%, transparent 51%), radial-gradient(2px 2px at 84% 44%, #fff 50%, transparent 51%),
  radial-gradient(1.5px 1.5px at 12% 46%, #fff 50%, transparent 51%), radial-gradient(1.5px 1.5px at 52% 52%, #fff 50%, transparent 51%); }
.sky-card[data-time="Quiet nights"] .sky-sun { display: none; }
.sky-card[data-time="Quiet nights"] .sky-moon, .sky-card[data-time="Quiet nights"] .sky-stars { display: block; }
.sky-hills { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: auto; }
.sky-card[data-time="Quiet nights"] .sky-hills path:first-child { fill: #3E7A63; }
.sky-card[data-time="Quiet nights"] .sky-hills path:nth-child(2) { fill: #2E5E4C; }
.sky-copy { position: relative; display: flex; flex-direction: column; gap: 8px; max-width: 70%; }
.sky-pill { display: inline-flex; align-self: flex-start; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .7); color: var(--ink); font-weight: 800; font-size: 14px; }
.sky-pill-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--sun-2); }
.banner { display: flex; gap: 12px; align-items: center; background: linear-gradient(90deg, #FFE9B8, var(--dawn)); border-radius: 22px; padding: 14px 16px; }
.banner-sun { flex: 0 0 28px; height: 28px; border-radius: 50%; background: var(--sun); box-shadow: 0 0 0 6px rgba(255, 200, 87, .3); }
.recent { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.recent li { background: var(--glass); border: 1px solid var(--glass-line); border-radius: 18px; padding: 12px 16px; display: flex; justify-content: space-between; gap: 10px; box-shadow: var(--shadow); }
.recent .g { font-weight: 900; color: var(--leaf-2); white-space: nowrap; }

/* Garden */
.garden-card { padding: 8px; overflow: hidden; }
#garden-svg { width: 100%; height: auto; border-radius: 22px; }
.flower.new { transform-box: fill-box; transform-origin: 50% 100%; animation: grow 1.2s cubic-bezier(.2, .9, .3, 1.2) both; }
@keyframes grow { from { transform: scaleY(0); opacity: 0; } to { transform: none; opacity: 1; } }
.badges { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.badges li { background: var(--glass); border: 1px solid var(--glass-line); border-radius: 20px; padding: 12px 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 2px; }
.badges li.dim { background: rgba(255, 255, 255, .45); box-shadow: none; color: var(--ink-2); }
.badges strong { font-weight: 900; }
.badges span { font-size: 13px; color: var(--ink-2); }

/* Week */
#week-chart { width: 100%; height: auto; }
.insight p { color: var(--ink-2); }

/* Play */
.games { display: grid; gap: 12px; }
.game-card {
  display: grid; grid-template-columns: 76px 1fr; gap: 14px; align-items: center; text-align: left;
  min-height: 96px; padding: 14px; border-radius: 26px; border: 1px solid var(--glass-line); background: var(--glass);
  box-shadow: var(--shadow); cursor: pointer; width: 100%;
}
.game-card strong { font-family: var(--display); font-size: 21px; font-weight: 650; display: block; }
.game-card span { color: var(--ink-2); font-size: 15px; }
.game-art { width: 76px; height: 76px; border-radius: 20px; display: grid; place-items: center; background: linear-gradient(160deg, var(--sky-2), var(--dawn)); }
.game-art svg { width: 54px; height: 54px; }
.game-stage { position: relative; }
.game-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.game-score { font-family: var(--display); font-size: 22px; font-weight: 650; }
.pairs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.pcard {
  position: relative; aspect-ratio: 3 / 4; min-height: var(--tap); border: 0; border-radius: 18px; cursor: pointer; padding: 0;
  background: linear-gradient(160deg, #FFE29A, var(--peach)); box-shadow: 0 8px 18px -12px rgba(242, 167, 43, .9);
  transition: transform .35s ease, background .35s ease;
}
.pcard::after { content: ''; position: absolute; inset: 26%; border-radius: 50%; border: 3px dashed rgba(255, 255, 255, .8); }
.pcard[data-open="true"], .pcard[data-done="true"] { background: #fff; transform: rotateY(180deg); }
.pcard[data-open="true"]::after, .pcard[data-done="true"]::after { display: none; }
.pcard svg { position: absolute; inset: 14%; width: 72%; height: 72%; opacity: 0; transform: rotateY(180deg); transition: opacity .2s .1s; }
.pcard[data-open="true"] svg, .pcard[data-done="true"] svg { opacity: 1; }
.pcard[data-done="true"] { box-shadow: 0 0 0 3px var(--leaf) inset; }
.catch-field {
  position: relative; height: min(56vh, 460px); border-radius: 28px; overflow: hidden; touch-action: manipulation;
  background: linear-gradient(180deg, #BFE0FF 0%, #FFF6E3 100%); box-shadow: var(--shadow);
}
.beam {
  position: absolute; width: 56px; height: 56px; margin: -28px 0 0 -28px; border: 0; padding: 0; border-radius: 50%; cursor: pointer; background: transparent;
}
.beam svg { width: 100%; height: 100%; pointer-events: none; }
.beam.caught { animation: caught .45s ease-out forwards; pointer-events: none; }
@keyframes caught { to { transform: scale(1.8); opacity: 0; } }
.jar { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); padding: 6px 16px; border-radius: 999px; background: rgba(255, 255, 255, .8); font-weight: 900; }
.pop-field {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; padding: 16px; border-radius: 28px; touch-action: manipulation;
  background: linear-gradient(180deg, #D8EEFF 0%, #FFF6E3 100%); box-shadow: var(--shadow);
}
.bubble {
  aspect-ratio: 1; min-height: 44px; border: 0; padding: 0; border-radius: 50%; cursor: pointer;
  background: radial-gradient(circle at 34% 30%, #FFFFFF 0 14%, rgba(255, 255, 255, .55) 15% 26%, transparent 27%), radial-gradient(circle at 50% 55%, #BFE3FF, #7CC0EE 72%, #5AA6DA);
  box-shadow: inset 0 -4px 8px rgba(30, 90, 140, .25), 0 3px 8px rgba(30, 90, 140, .18); transition: transform .12s ease-out;
}
.bubble:active { transform: scale(.9); }
.bubble.popped { cursor: default; transform: scale(.72); background: radial-gradient(circle, rgba(124, 192, 238, .25), rgba(124, 192, 238, .08)); box-shadow: inset 0 2px 4px rgba(30, 90, 140, .18); animation: popped .22s ease-out; }
@keyframes popped { 0% { transform: scale(1.12); } 100% { transform: scale(.72); } }
html[data-theme="dark"] .pop-field { background: linear-gradient(180deg, #1E3A55 0%, #1A2436 100%); }
@media (prefers-reduced-motion: reduce) { .bubble.popped { animation: none; } }
.bloom-stage { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.bloom-ring { position: relative; width: min(260px, 70vw); aspect-ratio: 1; display: grid; place-items: center; }
.bloom-guide { position: absolute; inset: 0; border-radius: 50%; border: 3px solid rgba(79, 166, 124, .5); transform: scale(.5); transition: transform 4s ease-in-out; }
.bloom-flower { width: 70%; height: 70%; transform: scale(.45); transition: transform .3s ease-out; }
.bloom-hold {
  min-height: 72px; width: min(260px, 80%); border-radius: 999px; border: 0; cursor: pointer; font-weight: 900; font-size: 18px;
  background: linear-gradient(180deg, #FFD36E, var(--sun-2)); box-shadow: 0 12px 24px -12px rgba(242, 167, 43, .9); user-select: none; -webkit-user-select: none; touch-action: none;
}
.bloom-hold[aria-pressed="true"] { background: linear-gradient(180deg, #7AC498, var(--leaf-2)); color: #fff; }
.bloom-row { display: flex; gap: 6px; min-height: 34px; flex-wrap: wrap; justify-content: center; }
.bloom-row svg { width: 30px; height: 30px; }
.game-done { text-align: center; }

/* SOS: always one tap away, warm rather than alarming */
.top-actions { display: flex; gap: 8px; align-items: center; }
.sos-btn {
  min-height: var(--tap); min-width: 64px; padding: 0 16px; border-radius: 999px; cursor: pointer;
  border: 2px solid #F28F6B; background: #FFE6DA; color: #7A2A12; font-weight: 900; letter-spacing: 1.2px; box-shadow: var(--shadow);
}
.btn-sos { background: linear-gradient(180deg, #FFC9B2 0%, #F7A383 55%, #F28F6B 100%); color: #2A1A12; box-shadow: 0 12px 24px -12px rgba(242, 143, 107, .9), inset 0 1px 0 rgba(255, 255, 255, .5); }
.sos-sheet .title { font-size: 26px; }
/* Three large, ranked SOS actions with one grounding line above them. */
.sos-ground { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-radius: 18px; background: rgba(79, 166, 124, .1); }
.sos-ground p { margin: 0; flex: 1 1 180px; font-weight: 700; }
.sos-ground .btn { padding-inline: 12px; }
.sos-action { min-height: 72px; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; text-align: left; padding: 12px 22px; border-radius: 24px; }
.sos-action strong { font-size: 18px; line-height: 1.2; }
.sos-action small { font-size: 14px; font-weight: 700; line-height: 1.3; opacity: .92; }
.sos-sheet .btn-soft.sos-action small { color: var(--ink-2); opacity: 1; }
body.locked #sos-add-trusted, body.lock-sos #sos-add-trusted { display: none; }

/* Folded sections: a heading you tap to open. */
.fold > summary { min-height: var(--tap); display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; font-weight: 800; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::after { content: '+'; margin-left: auto; font-size: 24px; line-height: 1; color: var(--leaf-2); }
.fold[open] > summary::after { content: '\2212'; }
.fold > summary .subtitle { margin: 0; }
.fold-body { display: flex; flex-direction: column; gap: 12px; padding-top: 10px; }
.fold-card { padding-block: 8px; }
.sos-more { border-top: 1px solid var(--line); padding-top: 4px; }

/* Breathe now: the before rating is one optional tap. */
.before-chips { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.before-chips .chip { padding: 10px 0; text-align: center; font-size: 18px; min-width: 0; }

/* Check-in groups */
.context-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
#context-hint { margin-top: -10px; }
.context-groups { display: flex; flex-direction: column; gap: 14px; }
.context-group h3 { font-size: 12px; font-weight: 900; letter-spacing: 1.2px; text-transform: uppercase; color: var(--ink-2); margin: 0 0 8px; }

/* Mood check-in */
.moods { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.mood {
  min-height: 78px; min-width: var(--tap); padding: 6px 2px; border: 1px solid var(--glass-line); border-radius: 18px; cursor: pointer;
  background: rgba(255, 255, 255, .75); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  font-size: 12px; font-weight: 800; color: var(--ink-2); line-height: 1.15; text-align: center;
}
.mood svg { width: 34px; height: 34px; }
.mood[aria-pressed="true"] { background: var(--leaf-2); color: #fff; border-color: var(--leaf-2); }
.jar-memory { background: rgba(255, 246, 227, .95); border-radius: 16px; padding: 12px 14px; font-family: var(--display); font-size: 17px; }
.support-card { background: linear-gradient(160deg, #FFF1EA, #FFFFFF); border-color: #FFD2BF; }

/* Spaces */
.spaces { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.space-card {
  position: relative; overflow: hidden; min-height: 116px; padding: 16px; text-align: left; cursor: pointer;
  border: 1px solid var(--glass-line); border-radius: 24px; background: var(--glass); box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 4px;
}
.space-card strong { font-family: var(--display); font-size: 20px; font-weight: 650; }
.space-card span { font-size: 14px; color: var(--ink-2); line-height: 1.3; }
.space-card::after { content: ''; position: absolute; right: -18px; top: -18px; width: 66px; height: 66px; border-radius: 50%; background: var(--accent); opacity: .4; }
.space-work { --accent: #8CC8F0; }
.space-rel { --accent: #FFB088; }
.space-low { --accent: #FFC857; }
.space-sleep { --accent: #C9A7F2; }

/* Small steps and jar */
.step-idea { font-family: var(--display); font-size: 21px; font-weight: 600; line-height: 1.3; }
.steps-card .row .btn-sun { flex: 1 1 auto; width: auto; }

.ios-tip { background: rgba(255, 255, 255, .85); border: 1px solid var(--glass-line); border-radius: 18px; padding: 12px 14px; font-size: 15px; box-shadow: var(--shadow); }

/* ---------- v1.6 polish: native feel ---------- */
body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
input, textarea, .journal, .step-text, .kind-note { -webkit-user-select: text; user-select: text; }
button, a, .chip, .mood { touch-action: manipulation; }
.app { padding-top: 0; }
.topbar {
  position: sticky; top: 0; z-index: 25;
  margin: 0 calc(-20px - var(--safe-right)) 0 calc(-20px - var(--safe-left));
  padding: calc(6px + env(safe-area-inset-top, 0px)) calc(20px + var(--safe-right)) 6px calc(20px + var(--safe-left));
  background: linear-gradient(180deg, rgba(222, 238, 255, .92), rgba(232, 244, 255, .78));
  -webkit-backdrop-filter: saturate(160%) blur(16px); backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, .7);
}
[data-screen="checkin"], [data-screen="pick"], [data-screen="session"], [data-screen="after"], [data-screen="game"] { animation-name: slide-in; }
@keyframes slide-in { from { opacity: .3; transform: translateX(22px); } to { opacity: 1; transform: none; } }
.btn:active, .chip:active, .mood:active, .space-card:active, .space-tab:active { transform: scale(.97); }

/* Today hero: the main action lives in the sky */
.sky-card.hero { min-height: 330px; padding-bottom: 22px; display: flex; flex-direction: column; justify-content: space-between; gap: 18px; }
.hero .sky-copy { max-width: 74%; }
.hero-actions { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 8px; margin-top: auto; }
.btn-hero { min-height: 58px; font-size: 18px; }
.btn-glass { background: rgba(255, 255, 255, .78); color: var(--ink); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .9); }
.hero .sky-hills { opacity: .95; }
.today { gap: 18px; }
.block { display: flex; flex-direction: column; gap: 10px; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

/* Spaces: a swipeable row */
.spaces.carousel {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(148px, 44%); grid-template-columns: none;
  gap: 12px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; padding: 2px 2px 8px;
  scrollbar-width: none;
}
.spaces.carousel::-webkit-scrollbar { display: none; }
.spaces.carousel .space-card { scroll-snap-align: start; min-height: 150px; justify-content: flex-end; color: var(--ink); }
.space-ic { width: 30px; height: 30px; margin-bottom: auto; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; position: relative; z-index: 1; }
.space-work { background: linear-gradient(160deg, #DDF0FF, #B7DCFA); }
.space-rel { background: linear-gradient(160deg, #FFEDE3, #FFC9AE); }
.space-low { background: linear-gradient(160deg, #FFF6D9, #FFE29A); }
.space-sleep { background: linear-gradient(160deg, #EFE6FF, #CDB8F4); }
.spaces.carousel .space-card::after { opacity: .25; }

/* Little lifts */
.lifts { gap: 14px; }
.lift-row { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: start; }
.lift-row + .lift-row { padding-top: 14px; border-top: 1px solid var(--line); }
.lift-ic { width: 40px; height: 40px; border-radius: 14px; display: block; }
.lift-step { background: radial-gradient(circle at 50% 70%, #4FA67C 0 22%, transparent 23%), radial-gradient(ellipse 28% 18% at 34% 46%, #7AC498 0 98%, transparent 100%), radial-gradient(ellipse 28% 18% at 66% 40%, #4FA67C 0 98%, transparent 100%), #E6F5EC; }
.lift-jar { background: radial-gradient(circle at 50% 58%, #FFC857 0 30%, transparent 31%), linear-gradient(180deg, transparent 18%, #FFF6E3 18%), #FFE9B8; }
.lift-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.lifts .step-idea { font-size: 18px; }
.lift-actions { margin-top: 4px; }
.btn-small { width: auto; min-height: var(--tap); padding: 10px 18px; font-size: 15px; }

/* Progress strip */
.progress-strip { display: grid; grid-template-columns: 1fr 1fr 1.6fr; gap: 12px; align-items: end; padding: 16px; }
.ps-item { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ps-item .stat-v { font-size: 20px; }
.ps-level .bar { height: 10px; }

/* Check-in: space switcher and picked tray */
.space-tabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 2px 4px; }
.space-tabs::-webkit-scrollbar { display: none; }
.space-tab {
  flex: 0 0 auto; min-height: var(--tap); min-width: var(--tap); padding: 0 16px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--glass-line); background: rgba(255, 255, 255, .6); font-weight: 800; color: var(--ink-2); white-space: nowrap;
}
.space-tab[aria-selected="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.picked-tray { display: flex; flex-wrap: wrap; gap: 8px; }
.picked-chip {
  min-height: 40px; min-width: var(--tap); padding: 0 12px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--leaf-2); color: #fff; font-weight: 800; font-size: 14px;
}

/* ---------- Toolkit ---------- */
.toolkit { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tool {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; cursor: pointer;
  min-height: 112px; padding: 14px; border-radius: 22px; border: 1px solid var(--glass-line); background: var(--glass); box-shadow: var(--shadow);
}
.tool strong { font-family: var(--display); font-size: 18px; font-weight: 650; }
.tool span:last-child { font-size: 13px; color: var(--ink-2); line-height: 1.3; }
.tool-ic { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; font-size: 18px; margin-bottom: 4px; }
.tool-support .tool-ic { background: #FFE6DA; color: #8A2E12; }
.tool-safety .tool-ic { background: #DDF0FF; color: #1F5F8B; }
.tool-reframe .tool-ic { background: #E6F5EC; color: var(--leaf-2); }
.tool-sounds .tool-ic { background: #EFE6FF; color: #5B3E96; }
.tool-check .tool-ic { background: #FFF1C9; color: #8A5A00; }
.tool-check { grid-column: 1 / -1; min-height: 88px; }
.check-due { background: linear-gradient(160deg, #FFF8E6, #FFFFFF); }
.tool-screen { gap: 14px; }
.back-btn { width: auto; align-self: flex-start; padding-left: 0; text-decoration: none; }
.back-btn::before { content: '\2039'; font-size: 26px; line-height: 1; margin-right: 6px; }
.help-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.help-line:last-of-type { border-bottom: 0; }
.help-line > div:first-child { min-width: 0; }
.help-line .row { flex-wrap: nowrap; }
.near-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.near-grid .btn { font-size: 15px; padding: 10px 12px; }
.explain { border-top: 1px solid var(--line); padding: 10px 0; }
.explain summary { min-height: var(--tap); display: flex; align-items: center; font-weight: 800; cursor: pointer; list-style: none; }
.explain summary::after { content: '+'; margin-left: auto; font-size: 22px; color: var(--leaf-2); }
.explain[open] summary::after { content: '\2212'; }
.explain p, .ask-list { color: var(--ink-2); margin: 0; }
.ask-list { padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.script { background: var(--dawn); border-radius: 16px; padding: 12px 14px; font-family: var(--display); font-size: 17px; -webkit-user-select: text; user-select: text; }
.care-view { display: flex; flex-direction: column; gap: 6px; }
select.text-input { -webkit-appearance: none; appearance: none; }
.sound-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sound {
  min-height: 110px; padding: 16px; border-radius: 22px; border: 1px solid var(--glass-line); cursor: pointer; text-align: left;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; box-shadow: var(--shadow);
  background: linear-gradient(160deg, #EAF5FF, #CFE8FF);
}
.sound[data-sound="ocean"] { background: linear-gradient(160deg, #E3F7F4, #A8DDD3); }
.sound[data-sound="brown"] { background: linear-gradient(160deg, #F6EEE4, #E2CBAE); }
.sound[data-sound="breeze"] { background: linear-gradient(160deg, #F1FBEF, #C8EBC1); }
.sound strong { font-family: var(--display); font-size: 20px; font-weight: 650; }
.sound span { font-size: 13px; color: var(--ink-2); }
.sound[aria-pressed="true"] { outline: 3px solid var(--leaf-2); outline-offset: 2px; }
.wb-item { gap: 8px; padding: 14px; }
.wb-scale { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.wb-opt { min-height: var(--tap); min-width: var(--tap); border-radius: 14px; border: 1.5px solid rgba(46, 125, 91, .35); background: #F2F8F4; color: var(--leaf-2); font-weight: 900; font-size: 17px; cursor: pointer; }
.wb-opt[aria-pressed="true"] { background: var(--leaf-2); color: #fff; border-color: var(--leaf-2); }
.file-btn { cursor: pointer; }

/* Sheets */
.scrim { position: fixed; inset: 0; background: rgba(34, 48, 56, .38); z-index: 40; animation: fade .2s ease both; }
@keyframes fade { from { opacity: 0; } }
.sheet {
  position: fixed; z-index: 41; left: 0; right: 0; bottom: 0; margin: 0 auto;
  width: 100%; max-width: 560px; max-height: 90vh; max-height: 90dvh; overflow-y: auto; overscroll-behavior: contain;
  background: linear-gradient(180deg, #FFFDF7, var(--sky)); border-radius: 32px 32px 0 0; box-shadow: 0 -10px 40px rgba(34, 48, 56, .2);
  padding: 10px calc(20px + var(--safe-right)) calc(20px + env(safe-area-inset-bottom, 0px)) calc(20px + var(--safe-left));
  display: flex; flex-direction: column; gap: 12px;
  animation: sheet-up .32s cubic-bezier(.2, .9, .3, 1) both;
}
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } }
.sheet-grip { width: 44px; height: 5px; border-radius: 999px; background: rgba(34, 48, 56, .2); margin: 4px auto 6px; }
.demo-flag { background: #FFE9B8; color: var(--ink); border-radius: 16px; padding: 10px 14px; font-weight: 800; }
.plan-card { background: linear-gradient(160deg, #fff, var(--dawn)); }
.plan-name { font-family: var(--display); font-size: 28px; font-weight: 700; }
.price { font-size: 20px; font-weight: 900; }
.price .or { font-weight: 600; color: var(--ink-2); font-size: 16px; }
.packs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pack {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-height: 100px; min-width: var(--tap); padding: 18px 8px 12px; border: 1px solid var(--glass-line); border-radius: 22px; background: #fff; box-shadow: var(--shadow); cursor: pointer;
}
.pack strong { font-family: var(--display); font-size: 20px; font-weight: 700; }
.pack span { font-size: 13px; color: var(--ink-2); text-align: center; }
.ribbon { position: absolute; top: -9px; font-style: normal; font-size: 11px; font-weight: 900; background: var(--leaf-2); color: #fff; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }

/* Toast */
.toast {
  position: fixed; z-index: 60; left: 50%; transform: translateX(-50%);
  bottom: calc(104px + env(safe-area-inset-bottom, 0px));
  width: max-content; max-width: calc(100% - 32px);
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 18px; font-weight: 800;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .2); animation: fade .2s ease both;
}

/* Floating tab bar */
.tabbar {
  position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; pointer-events: none;
  padding: 0 calc(14px + var(--safe-right)) calc(12px + env(safe-area-inset-bottom, 0px)) calc(14px + var(--safe-left));
}
.tabbar-inner {
  pointer-events: auto; max-width: 460px; margin: 0 auto; padding: 6px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px;
  background: rgba(255, 255, 255, .86); border: 1px solid var(--glass-line); border-radius: 999px;
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); box-shadow: 0 16px 40px -18px rgba(34, 48, 56, .45);
}
.tabbar button {
  min-height: 56px; min-width: var(--tap); border: 0; background: transparent; border-radius: 999px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 12px; font-weight: 900; color: var(--ink-2);
}
.tabbar button[aria-selected="true"] { color: var(--leaf-2); background: rgba(79, 166, 124, .14); }
.ti { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tabbar button[aria-selected="true"] .ti circle:first-child { fill: var(--sun); stroke: var(--sun-2); }

.footnote { text-align: center; font-size: 13px; color: var(--ink-2); margin-top: 18px; }

/* Wider screens: the column stays phone sized and centered */
@media (min-width: 760px) {
  body { font-size: 18px; }
  .app { padding-top: calc(22px + var(--safe-top)); }
  .c1 { width: 260px; left: 6%; }
  .c2 { width: 200px; right: 8%; }
  .c3 { width: 300px; left: 64%; }
  .sky::after, .sky::before { display: block; }
  .bleed { margin-inline: 0; }
  .welcome .scene, .sunrise { border-radius: 32px; overflow: hidden; box-shadow: var(--shadow); }
  .welcome .scene { -webkit-mask-image: none; mask-image: none; }
}

@media (max-width: 430px) {
  .seed-word { display: none; }
  .seed-pill { padding: 0 14px; }
}

@media (max-width: 360px) {
  .toolkit, .near-grid, .sound-grid { grid-template-columns: 1fr; }
  .wb-scale { gap: 4px; }
  .packs { grid-template-columns: 1fr; }
  .session-controls { grid-template-columns: 1fr; }
  .tabbar button { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .orb { transform: scale(.8) !important; }
  .orb-petals { transform: scale(.85) !important; }
  .cloud, .brand-mark, .welcome-balloon, .pick-mark, .sky-sun, .rs-rise, #rs-petals, .welcome-sun, .gift-glow, .orb-halo { animation: none !important; }
}

/* Learn */
.lesson-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.lesson-item { width: 100%; min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left; cursor: pointer;
  padding: 14px 16px; border-radius: 20px; border: 1px solid var(--glass-line); background: var(--glass); box-shadow: var(--shadow); color: var(--ink); }
.lesson-item strong { font-family: var(--display); font-size: 18px; font-weight: 650; }
.lesson-item span { flex: 0 0 auto; font-size: 13px; font-weight: 800; color: var(--ink-2); }
.lesson-item.done span { color: var(--leaf-2); }
.lesson-body p { font-size: 18px; line-height: 1.6; -webkit-user-select: text; user-select: text; }
.takeaway { background: linear-gradient(160deg, #FFF8E6, #FFFFFF); }
.tool-learn .tool-ic { background: #E7F0FF; color: #2C5BA8; }
.tool-programs .tool-ic { background: #E3F4EC; color: #276E4F; }
html[data-theme="dark"] .takeaway { background: rgba(255, 226, 154, .08); }

/* App lock */
.lock { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: calc(24px + var(--safe-top)) 24px calc(24px + var(--safe-bottom));
  background: linear-gradient(180deg, var(--sky-2), var(--sky) 55%, var(--dawn)); overflow-y: auto; }
.lock-inner { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 12px; text-align: center; }
.lock-logo { width: 64px; height: 64px; margin: 0 auto; }
.pin-input { text-align: center; font-size: 28px; letter-spacing: 10px; font-weight: 900; }
body.lock-sos .sheet { z-index: 91; }
body.lock-sos .scrim { z-index: 90; }
body.locked #support-sheet [data-tool] { display: none; }

/* ---------- Calm: breathing, games and sounds as tabs in one screen ---------- */
.calm-studio { gap: 14px; }
.seg {
  position: sticky; top: calc(var(--safe-top) + 70px); z-index: 6;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 5px; margin: 4px 0 2px;
  border-radius: 999px; background: var(--glass); border: 1px solid var(--glass-line);
  -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: 0 10px 30px -18px rgba(34, 48, 56, .45);
}
.seg-thumb {
  position: absolute; top: 5px; bottom: 5px; left: 5px; width: calc((100% - 10px) / 3); border-radius: 999px;
  background: linear-gradient(135deg, var(--sun) 0%, var(--peach) 100%);
  box-shadow: 0 6px 16px -6px rgba(242, 167, 43, .65), inset 0 1px 0 rgba(255, 255, 255, .6);
  transition: transform .42s cubic-bezier(.32, 1.28, .52, 1);
}
.seg[data-active="games"] .seg-thumb { transform: translateX(100%); }
.seg[data-active="sounds"] .seg-thumb { transform: translateX(200%); }
.seg-btn {
  position: relative; z-index: 1; min-height: var(--tap); display: flex; align-items: center; justify-content: center; gap: 7px;
  border: 0; border-radius: 999px; background: none; color: var(--ink-2); font: 800 15px/1 var(--ui); cursor: pointer;
  transition: color .25s;
}
.seg-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.seg-btn[aria-selected="true"] { color: #3B2A0E; }
.seg-btn:focus-visible { outline: 3px solid var(--leaf); outline-offset: 2px; }
.seg-panel { display: flex; flex-direction: column; gap: 12px; animation: seg-in .38s cubic-bezier(.2, .8, .2, 1) both; }
.seg-panel[hidden] { display: none; }
@keyframes seg-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.panel-head { margin: 10px 2px -2px; font: 800 12.5px/1.2 var(--ui); letter-spacing: .09em; text-transform: uppercase; color: var(--ink-2); }
.practice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 720px) { .practice-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.practice {
  --c: var(--sky-2);
  position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: flex-start; gap: 12px;
  min-height: 176px; padding: 16px 15px 15px; text-align: left; cursor: pointer;
  border-radius: 24px; border: 1px solid var(--glass-line); color: var(--ink); font: inherit;
  background: linear-gradient(165deg, color-mix(in srgb, var(--c) 34%, #fff) 0%, rgba(255, 255, 255, .92) 62%);
  box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .2s ease;
}
.practice::after {
  content: ""; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--c) 45%, transparent) 0%, transparent 70%); pointer-events: none;
}
.practice:hover { transform: translateY(-2px); }
.practice:active { transform: scale(.97); }
.practice:focus-visible { outline: 3px solid var(--leaf); outline-offset: 3px; }
.practice[disabled] { cursor: default; filter: saturate(.55); opacity: .72; transform: none; }
.practice-orb {
  flex: 0 0 auto; width: 46px; height: 46px; border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #fff 0%, color-mix(in srgb, var(--c) 70%, #fff) 38%, var(--c) 100%);
  box-shadow: 0 0 0 7px color-mix(in srgb, var(--c) 22%, transparent), 0 8px 18px -8px var(--c);
  animation: orb-breathe 7s ease-in-out infinite;
}
@keyframes orb-breathe { 0%, 100% { transform: scale(.86); } 45% { transform: scale(1.06); } }
.practice-body { display: flex; flex-direction: column; gap: 5px; min-width: 0; flex: 1; }
.practice-body strong { font-family: var(--display); font-size: 18.5px; font-weight: 650; line-height: 1.15; }
.practice-desc { color: var(--ink-2); font-size: 13.5px; line-height: 1.38; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.practice-meta {
  margin-top: auto; padding-top: 4px; font-size: 12.5px; font-weight: 800; letter-spacing: .02em;
  color: color-mix(in srgb, var(--c) 35%, var(--ink));
}
.practice.featured { grid-column: 1 / -1; flex-direction: row; align-items: center; min-height: 0; gap: 16px; }
.practice.featured .practice-orb { width: 58px; height: 58px; }
.calm-studio .games { gap: 12px; }
.calm-studio .game-card { border-radius: 24px; }
@media (prefers-reduced-motion: reduce) {
  .practice-orb, .seg-panel { animation: none; }
  .seg-thumb, .practice { transition: none; }
}

/* ---------- Guided programmes ---------- */
.program-list { display: grid; gap: 12px; }
.program-card, .program-today {
  --c: var(--sky-2);
  position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; width: 100%;
  padding: 18px; text-align: left; font: inherit; color: var(--ink); cursor: pointer; border-radius: 24px;
  border: 1px solid var(--glass-line); box-shadow: var(--shadow);
  background: linear-gradient(150deg, color-mix(in srgb, var(--c) 32%, #fff) 0%, rgba(255, 255, 255, .94) 70%);
}
.program-today[hidden] { display: none; }
.program-card strong, .program-today strong { font-family: var(--display); font-size: 21px; font-weight: 650; line-height: 1.15; }
.program-desc { color: var(--ink-2); font-size: 15px; }
.program-meta { font-size: 13px; font-weight: 800; color: color-mix(in srgb, var(--c) 40%, var(--ink)); }
.program-bar { width: 100%; height: 6px; border-radius: 99px; background: rgba(34, 48, 56, .08); overflow: hidden; }
.program-bar i { display: block; height: 100%; border-radius: inherit; background: var(--c); }
.program-screen .program-day { border-top: 4px solid var(--c, var(--sun)); }
.program-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.pday {
  display: grid; place-items: center; aspect-ratio: 1; border-radius: 14px; font-weight: 800; font-size: 14px;
  background: var(--glass); border: 1px solid var(--line); color: var(--ink-2);
}
.pday.done { background: var(--c, var(--leaf)); color: #1F2A30; border-color: transparent; }
.pday.today { outline: 3px solid var(--c, var(--sun)); outline-offset: 1px; color: var(--ink); }
.pday.paid { color: #5E6E79; border-style: dashed; }
.plan-perks { margin: 4px 0 6px; padding-left: 20px; display: grid; gap: 4px; color: var(--ink-2); }
.save { font-style: normal; font-size: 12px; font-weight: 800; color: var(--leaf-2); margin-left: 6px; }

/* ---------- Real services: online booking and in person ---------- */
.partner-list { display: grid; gap: 10px; }
.partner { display: grid; gap: 6px; padding: 14px; border-radius: 18px; background: var(--glass); border: 1px solid var(--line); }
.partner-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 10px; }
.partner-head strong { font-family: var(--display); font-size: 17px; font-weight: 650; line-height: 1.2; }
.partner-type { font-size: 12px; font-weight: 800; letter-spacing: .03em; color: var(--leaf-2); background: color-mix(in srgb, var(--leaf) 14%, transparent); padding: 3px 9px; border-radius: 99px; }
.partner-desc { margin: 0; color: var(--ink-2); font-size: 14.5px; }
.partner-meta { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13.5px; font-weight: 700; }
.partner-price { color: var(--ink); }
.partner-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.partner-actions .btn { flex: 1 1 auto; }
.select { min-height: var(--tap); width: 100%; border-radius: 14px; border: 1px solid var(--line); padding: 0 12px; font: inherit; background: var(--glass); color: var(--ink); }

/* ---------- Mood check: a living sky that clears as calm rises (--v from 0 to 1) ---------- */
.mood-sky {
  --v: .44;
  position: relative; overflow: hidden; width: 100%; height: 168px; border-radius: 22px; margin-bottom: 4px;
  background: linear-gradient(180deg, #CFE8FF 0%, #FFE9C2 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .6), 0 14px 30px -20px rgba(46, 80, 120, .6);
  isolation: isolate;
}
.mood-sky::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(180deg, #7D8DA3 0%, #A9B7C6 70%, #C9D2DB 100%);
  opacity: calc(1 - var(--v) * 1.35); transition: opacity .5s ease;
}
.ms-glow {
  position: absolute; z-index: 1; left: 50%; top: 18%; width: 190px; height: 190px; margin-left: -95px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 214, 120, .85) 0%, rgba(255, 200, 87, .25) 45%, transparent 70%);
  opacity: calc(var(--v) * var(--v)); transform: scale(calc(.6 + var(--v) * .6)); transition: opacity .5s ease, transform .6s ease;
}
.ms-sun {
  position: absolute; z-index: 2; left: 50%; top: 50%; width: 92px; height: 92px; margin: -46px 0 0 -46px;
  transform: translateY(calc((1 - var(--v)) * 46px)) scale(calc(.62 + var(--v) * .42)) rotate(calc(var(--v) * 90deg));
  opacity: calc(.35 + var(--v) * .65); filter: saturate(calc(.4 + var(--v) * .8));
  transition: transform .6s cubic-bezier(.2, .9, .3, 1.2), opacity .5s ease, filter .5s ease;
}
.ms-cloud {
  position: absolute; z-index: 3; height: 34px; border-radius: 40px; background: #fff;
  box-shadow: 18px -12px 0 4px #fff, 44px -2px 0 0 #fff;
  opacity: calc(1 - var(--v) * .78); transition: transform .7s cubic-bezier(.2, .8, .2, 1), opacity .6s ease, filter .6s ease;
  filter: brightness(calc(.72 + var(--v) * .28));
}
.ms-c1 { width: 92px; left: 14%; top: 34%; transform: translateX(calc(var(--v) * -110px)); animation: ms-drift 9s ease-in-out infinite; }
.ms-c2 { width: 78px; right: 18%; top: 22%; transform: translateX(calc(var(--v) * 120px)); animation: ms-drift 11s ease-in-out infinite reverse; }
.ms-c3 { width: 70px; left: 42%; top: 58%; transform: translateY(calc(var(--v) * 70px)); animation: ms-drift 13s ease-in-out infinite; }
@keyframes ms-drift { 0%, 100% { margin-left: 0; } 50% { margin-left: 10px; } }
.ms-rain { position: absolute; inset: 40% 12% 0; z-index: 2; opacity: clamp(0, calc((.45 - var(--v)) * 3), 1); transition: opacity .5s ease; pointer-events: none; }
.ms-rain i {
  position: absolute; top: -10%; width: 2px; height: 14px; border-radius: 2px; background: linear-gradient(transparent, rgba(225, 238, 255, .95));
  animation: ms-fall 1.1s linear infinite;
}
.ms-rain i:nth-child(1) { left: 6%; animation-delay: -.2s; } .ms-rain i:nth-child(2) { left: 16%; animation-delay: -.7s; }
.ms-rain i:nth-child(3) { left: 27%; animation-delay: -.4s; } .ms-rain i:nth-child(4) { left: 37%; animation-delay: -.9s; }
.ms-rain i:nth-child(5) { left: 48%; animation-delay: -.1s; } .ms-rain i:nth-child(6) { left: 58%; animation-delay: -.6s; }
.ms-rain i:nth-child(7) { left: 68%; animation-delay: -.3s; } .ms-rain i:nth-child(8) { left: 78%; animation-delay: -.8s; }
.ms-rain i:nth-child(9) { left: 88%; animation-delay: -.5s; } .ms-rain i:nth-child(10) { left: 96%; animation-delay: -1s; }
@keyframes ms-fall { from { transform: translateY(0); opacity: 0; } 20% { opacity: 1; } to { transform: translateY(120px); opacity: .2; } }
.ms-value {
  position: absolute; z-index: 4; right: 14px; bottom: 10px; min-width: 52px; padding: 6px 12px; border-radius: 999px;
  font: 700 26px/1 var(--display); color: var(--ink); background: rgba(255, 255, 255, .82);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: 0 6px 16px -8px rgba(34, 48, 56, .45);
}
.ms-value.pop { animation: ms-pop .32s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes ms-pop { 0% { transform: scale(.82); } 100% { transform: scale(1); } }
.slider-card .slider-word { font: 650 20px/1.2 var(--display); margin: 6px 0 2px; transition: color .4s ease; }
.mood-range {
  --fill: 44%;
  -webkit-appearance: none; appearance: none; height: 48px; background: transparent; cursor: pointer;
}
.mood-range::-webkit-slider-runnable-track {
  height: 12px; border-radius: 99px;
  background: linear-gradient(90deg, #8E9CB0 0%, #B9C6D3 30%, #FFD58A 70%, #FFB347 100%) 0 / var(--fill) 100% no-repeat, rgba(34, 48, 56, .1);
}
.mood-range::-moz-range-track { height: 12px; border-radius: 99px; background: rgba(34, 48, 56, .1); }
.mood-range::-moz-range-progress { height: 12px; border-radius: 99px; background: linear-gradient(90deg, #8E9CB0, #FFB347); }
.mood-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 34px; height: 34px; margin-top: -11px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0%, #FFF3D6 55%, #FFC857 100%);
  border: 3px solid #fff; box-shadow: 0 0 0 4px rgba(255, 200, 87, .35), 0 6px 16px -4px rgba(242, 167, 43, .8);
  transition: transform .2s ease;
}
.mood-range:active::-webkit-slider-thumb { transform: scale(1.12); }
.mood-range::-moz-range-thumb { width: 30px; height: 30px; border-radius: 50%; background: #FFE3A8; border: 3px solid #fff; box-shadow: 0 6px 16px -4px rgba(242, 167, 43, .8); }
.mood-range:focus-visible { outline: none; }
.mood-range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px var(--leaf), 0 6px 16px -4px rgba(242, 167, 43, .8); }
@media (prefers-reduced-motion: reduce) {
  .ms-rain i, .ms-cloud, .ms-value.pop { animation: none; }
  .ms-sun, .ms-cloud, .ms-glow, .mood-sky::before { transition: none; }
}

/* ---------- Mood faces and the five-level scale ---------- */
.moods .mood { --mc: #F2DC9B; transition: transform .25s cubic-bezier(.3, 1.5, .5, 1), opacity .2s ease, background .2s ease; }
.moods .mood svg { width: 42px; height: 42px; overflow: visible; }
.mood .face { fill: var(--mc); stroke: color-mix(in srgb, var(--mc) 70%, #223038); stroke-width: 1.2; }
.mood .fx { fill: none; stroke: #2B3540; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mood .fx.thin { stroke-width: 1.5; }
.mood .fe { fill: #2B3540; }
.mood .fm { fill: #2B3540; }
.mood .tear { fill: #5FA8E8; }
.mood .cheek { fill: #FF8E7A; opacity: .55; }
.moods.has-pick .mood[aria-pressed="false"] svg { opacity: .55; }
.moods .mood[aria-pressed="true"] { background: color-mix(in srgb, var(--mc) 30%, #fff); color: var(--ink); border-color: color-mix(in srgb, var(--mc) 80%, #223038); transform: translateY(-3px) scale(1.06); }
.moods .mood[aria-pressed="true"] svg { animation: face-pop .45s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes face-pop { 0% { transform: scale(.8) rotate(-6deg); } 100% { transform: scale(1) rotate(0); } }
.mood-scale { --lv: 0; position: relative; height: 24px; margin: 10px 6% 0; }
.mood-track { position: absolute; left: 0; right: 0; top: 9px; height: 6px; border-radius: 99px; background: linear-gradient(90deg, #9DB4D6, #B8C7DA 25%, #F2DC9B 50%, #FFD27A 75%, #FFB547); opacity: .45; }
.mood-fill { display: block; height: 100%; width: calc(var(--lv) * 100%); border-radius: inherit; background: linear-gradient(90deg, #9DB4D6, #F2DC9B 50%, #FFB547); transition: width .45s cubic-bezier(.2, .8, .2, 1); }
.mood-scale[data-level="0"] .mood-fill { width: 0; }
.mood-ticks { position: absolute; left: 0; right: 0; top: 7px; display: flex; justify-content: space-between; }
.mood-ticks b { width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2px solid rgba(34, 48, 56, .18); }
.mood-knob {
  position: absolute; top: 2px; left: calc(var(--lv) * 100%); width: 20px; height: 20px; margin-left: -10px; border-radius: 50%;
  background: #fff; border: 3px solid #FFB547; box-shadow: 0 4px 10px -3px rgba(242, 167, 43, .8);
  transition: left .45s cubic-bezier(.3, 1.4, .5, 1), opacity .2s ease;
}
.mood-scale[data-level="0"] .mood-knob { opacity: 0; }
.mood-scale-ends { display: flex; justify-content: space-between; margin: 4px 4% 0; font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
@media (prefers-reduced-motion: reduce) { .moods .mood, .mood-fill, .mood-knob { transition: none; } .moods .mood[aria-pressed="true"] svg { animation: none; } }

/* ---------- Hero readability: the greeting always reads clearly over the sky ---------- */
.sky-card .sky-sun { width: 84px; height: 84px; opacity: .92; }
.sky-card .sky-copy { position: relative; z-index: 2; max-width: 64%; }
.sky-card .sky-copy h1, .sky-card .sky-copy .eyebrow {
  text-shadow: 0 1px 0 rgba(255, 255, 255, .7), 0 0 14px rgba(255, 255, 255, .9), 0 0 28px rgba(255, 255, 255, .7);
}
.sky-card .sky-copy h1 { overflow-wrap: anywhere; }
@media (max-width: 360px) { .sky-card .sky-copy { max-width: 70%; } .sky-card .sky-sun { width: 68px; height: 68px; } }

/* ---------- Follow-along session: timed circle, phase ring, rounds, step guides ---------- */
.pattern-strip { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.pattern-strip[hidden] { display: none; }
.pchip { padding: 6px 12px; border-radius: 999px; font: 800 13px/1 var(--ui); color: var(--ink-2); background: var(--glass); border: 1px solid var(--line); transition: all .3s ease; }
.pchip.on { color: #2B1E05; background: linear-gradient(135deg, var(--sun), var(--peach)); border-color: transparent; transform: scale(1.08); box-shadow: 0 6px 14px -8px rgba(242, 167, 43, .9); }
.phase-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); pointer-events: none; }
.pr-track { fill: none; stroke: rgba(34, 48, 56, .08); stroke-width: 2.4; }
.pr-fill { fill: none; stroke: var(--sun-2); stroke-width: 2.6; stroke-linecap: round; stroke-dasharray: 289.03; stroke-dashoffset: 289.03; }
.session[data-phase="out"] .pr-fill { stroke: #6FB3E0; }
.session[data-phase="hold"] .pr-fill { stroke: #9ED3C4; }
.orb-count {
  position: absolute; z-index: 3; font: 700 64px/1 var(--display); color: #2B1E05; font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 10px rgba(255, 255, 255, .7); pointer-events: none;
}
.session.steps .orb-count { display: none; }
.session.steps .cue, .session.steps .round-count { display: none; }
.round-count { text-align: center; font-weight: 800; font-size: 14px; color: var(--ink-2); margin: -6px 0 0; min-height: 1.2em; }
.how-list { margin: 0; padding: 12px 16px 12px 34px; border-radius: 18px; background: var(--glass); border: 1px solid var(--line); display: grid; gap: 6px; font-size: 15px; color: var(--ink-2); }
.how-list[hidden] { display: none; }
.session.steps .orb-wrap { width: min(150px, 40vw); }
.step-progress { display: flex; gap: 6px; justify-content: center; }
.step-progress i { width: 26px; height: 6px; border-radius: 99px; background: rgba(34, 48, 56, .12); transition: background .3s ease; }
.step-progress i.done { background: var(--leaf); }
.step-progress i.on { background: var(--sun-2); }
.step-visual { position: relative; width: 132px; height: 132px; display: grid; place-items: center; margin: 4px auto; }
.step-icon { font-size: 54px; line-height: 1; }
.step-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.step-left { position: absolute; right: -6px; bottom: 2px; min-width: 38px; padding: 4px 8px; border-radius: 999px; background: var(--ink); color: #fff; font: 800 14px/1 var(--ui); font-variant-numeric: tabular-nums; }
.step-left:empty { display: none; }
.step-sub { font: 700 24px/1.2 var(--display); color: var(--leaf-2); margin: 0; }
.step-dots { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.step-dots[hidden] { display: none; }
.sdot { width: 48px; height: 48px; border-radius: 50%; border: 2px dashed rgba(34, 48, 56, .3); background: transparent; cursor: pointer; transition: all .2s ease; }
.sdot[aria-pressed="true"] { background: var(--leaf); border: 2px solid var(--leaf); transform: scale(1.06); }
.sdot[aria-pressed="true"]::after { content: "✓"; color: #fff; font-weight: 900; font-size: 20px; }
@media (prefers-reduced-motion: reduce) { .pchip, .sdot, .step-progress i { transition: none; } }

/* ---------- Emotion meter ---------- */
.emo-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.emo-title { margin: 0; font: 800 16px/1.3 var(--ui); }
.emotions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.emo {
  display: grid; justify-items: center; gap: 2px; min-height: 76px; padding: 8px 4px 6px; border-radius: 16px; cursor: pointer;
  border: 1px solid var(--line); background: var(--glass); color: var(--ink); font: inherit; transition: transform .2s ease, background .2s ease;
}
.emo:active { transform: scale(.95); }
.emo-face { font-size: 26px; line-height: 1.1; }
.emo-name { font-size: 12px; font-weight: 800; line-height: 1.15; text-align: center; overflow-wrap: anywhere; }
.emo-dots { display: flex; gap: 3px; }
.emo-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(34, 48, 56, .15); }
.emo.hard[aria-pressed="true"] { background: #FFE6DD; border-color: #F2A18A; }
.emo.hard .emo-dots i.on { background: #E0704F; }
.emo.good[aria-pressed="true"] { background: #DFF3E8; border-color: #7CC49E; }
.emo.good .emo-dots i.on { background: var(--leaf-2); }
.emo-suggest { margin-top: 10px; padding: 12px; border-radius: 16px; background: var(--dawn); display: grid; gap: 8px; }
.emo-suggest[hidden] { display: none; }
.emo-suggest p { margin: 0; font-weight: 700; }
.emo-stats { display: grid; gap: 10px; }
.emo-row { display: grid; grid-template-columns: 7.2em 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; }
.emo-row-name { grid-row: span 2; font-weight: 800; font-size: 14px; }
.emo-bar { height: 10px; border-radius: 99px; background: rgba(34, 48, 56, .08); overflow: hidden; }
.emo-bar i { display: block; height: 100%; border-radius: inherit; }
.emo-row.hard .emo-bar i { background: linear-gradient(90deg, #F2A18A, #E0704F); }
.emo-row.good .emo-bar i { background: linear-gradient(90deg, #9ED3B4, var(--leaf-2)); }
.emo-row-meta { font-size: 12px; color: var(--ink-2); font-weight: 700; }
@media (max-width: 340px) { .emotions { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- Today: games one tap away ---------- */
.game-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.game-tile {
  display: grid; justify-items: center; gap: 4px; padding: 14px 6px 12px; border-radius: 20px; cursor: pointer; text-align: center;
  border: 1px solid var(--glass-line); color: var(--ink); font: inherit; box-shadow: var(--shadow);
  transition: transform .2s ease;
}
.game-tile:active { transform: scale(.96); }
.gt-pairs { background: linear-gradient(160deg, #FFE3D3, #FFFFFF 75%); }
.gt-catch { background: linear-gradient(160deg, #FFF0C4, #FFFFFF 75%); }
.gt-ring { background: linear-gradient(160deg, #D8EEFF, #FFFFFF 75%); }
.gt-ic { font-size: 30px; line-height: 1.1; }
.game-tile strong { font-size: 14px; line-height: 1.15; }
.game-tile span:last-child { font-size: 12px; color: var(--ink-2); font-weight: 700; }

/* ---------- How LoosenUp helps (first open) ---------- */
.how-steps { list-style: none; counter-reset: how; margin: 8px 0; padding: 0; display: grid; gap: 12px; }
.how-steps li { counter-increment: how; position: relative; display: grid; gap: 2px; padding: 14px 16px 14px 60px; border-radius: 20px; background: var(--glass); border: 1px solid var(--glass-line); box-shadow: var(--shadow); }
.how-steps li::before { content: counter(how); position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font: 800 16px/1 var(--ui); color: #2B1E05; background: linear-gradient(135deg, var(--sun), var(--peach)); }
.how-steps strong { font-size: 17px; }
.how-steps span { color: var(--ink-2); font-size: 14.5px; }

/* ---------- Dark mode (html[data-theme="dark"], set from Auto, Light or Dark) ---------- */
html[data-theme="dark"] {
  --sky: #0E1626; --sky-2: #14213A; --dawn: #1E2232;
  --ink: #ECF2F7; --ink-2: #A8B6C3;
  --glass: rgba(26, 36, 52, 0.84); --glass-line: rgba(255, 255, 255, 0.08); --line: rgba(255, 255, 255, 0.12);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 18px 40px -24px rgba(0, 0, 0, 0.9);
  color-scheme: dark;
}
html[data-theme="dark"] body { background: linear-gradient(180deg, #0B1322 0%, #121C30 45%, #1C1A2E 100%) fixed; }
html[data-theme="dark"] .cloud { background: rgba(255, 255, 255, 0.045); }
html[data-theme="dark"] .sky::before { opacity: .35; }
html[data-theme="dark"] .topbar { background: linear-gradient(180deg, rgba(11, 19, 34, .94), rgba(14, 22, 38, .8)); border-bottom-color: rgba(255, 255, 255, .06); }
/* The bar sits over dark cards, so it gets its own lighter surface, a visible edge and a fade behind it. */
html[data-theme="dark"] .tabbar::before {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: calc(100% + 28px); z-index: -1; pointer-events: none;
  background: linear-gradient(to top, rgba(11, 19, 34, .94) 45%, rgba(11, 19, 34, 0));
}
html[data-theme="dark"] .tabbar-inner {
  background: rgba(38, 52, 76, .97); border-color: rgba(255, 255, 255, .16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 18px 40px -12px rgba(0, 0, 0, .85);
}
html[data-theme="dark"] .tabbar button { color: #C9D4DE; }
html[data-theme="dark"] .tabbar button[aria-selected="true"] { color: #A8E6C4; background: rgba(143, 211, 174, .2); }
html[data-theme="dark"] .eyebrow, html[data-theme="dark"] .tag, html[data-theme="dark"] .gain-num { color: #8FD3AE; }
html[data-theme="dark"] .btn-soft { background: rgba(255, 255, 255, .06); color: #8FD3AE; box-shadow: inset 0 0 0 2px rgba(122, 196, 152, .4); }
html[data-theme="dark"] .btn-ghost, html[data-theme="dark"] a:not(.btn) { color: #8FD3AE; }
html[data-theme="dark"] .text-input, html[data-theme="dark"] .journal { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .12); color: var(--ink); box-shadow: none; }
html[data-theme="dark"] .sheet { background: linear-gradient(180deg, #152033, #0F1726); }
html[data-theme="dark"] .toast { background: #ECF2F7; color: #102030; }
html[data-theme="dark"] .mood, html[data-theme="dark"] .space-tab, html[data-theme="dark"] .chip { background: var(--glass); }
html[data-theme="dark"] .space-tab[aria-selected="true"] { background: #ECF2F7; color: #0E1626; }
html[data-theme="dark"] .pick-reason, html[data-theme="dark"] .jar-memory { background: rgba(255, 255, 255, .05); }
html[data-theme="dark"] .rewards li { background: rgba(255, 226, 154, .08); }
html[data-theme="dark"] .support-card { background: rgba(242, 143, 107, .1); border-color: rgba(242, 143, 107, .3); }
html[data-theme="dark"] .check-due, html[data-theme="dark"] .plan-card, html[data-theme="dark"] .pack { background: var(--glass); }
html[data-theme="dark"] .wb-opt { background: rgba(122, 196, 152, .1); color: #8FD3AE; border-color: rgba(122, 196, 152, .35); }
html[data-theme="dark"] .wb-opt[aria-pressed="true"] { background: var(--leaf-2); color: #fff; }
html[data-theme="dark"] .gift-chip strong { color: #8FD3AE; }
/* Pastel and sky surfaces keep dark text in both themes */
.btn-sun, .btn-glass, .sky-pill, .space-card, .sound, .demo-flag, .banner, .sky-card { color: #223038; }
.sky-card[data-time="Quiet nights"] { color: #fff; }
.space-ic { stroke: #223038; }
.sound span, .space-card span { color: #4A5A63; }

/* Calm screen in dark mode */
html[data-theme="dark"] .practice { background: linear-gradient(165deg, color-mix(in srgb, var(--c) 26%, #1A2436) 0%, #172033 70%); border-color: rgba(255, 255, 255, .08); }
html[data-theme="dark"] .practice-meta { color: color-mix(in srgb, var(--c) 70%, #fff); }
html[data-theme="dark"] .seg-btn[aria-selected="true"] { color: #2A1D06; }
html[data-theme="dark"] .program-card, html[data-theme="dark"] .program-today { background: linear-gradient(150deg, color-mix(in srgb, var(--c) 24%, #1A2436) 0%, #172033 70%); border-color: rgba(255, 255, 255, .08); }
html[data-theme="dark"] .program-bar { background: rgba(255, 255, 255, .1); }
html[data-theme="dark"] .mood-sky { background: linear-gradient(180deg, #24365A 0%, #3B3A5C 100%); }
html[data-theme="dark"] .mood-sky::before { background: linear-gradient(180deg, #151D2C 0%, #222C3D 100%); }
html[data-theme="dark"] .ms-cloud { background: #C9D3E0; box-shadow: 18px -12px 0 4px #C9D3E0, 44px -2px 0 0 #C9D3E0; }
html[data-theme="dark"] .ms-value { background: rgba(23, 32, 51, .8); }
html[data-theme="dark"] .sky-card .sky-copy h1, html[data-theme="dark"] .sky-card .sky-copy .eyebrow { text-shadow: 0 0 14px rgba(10, 16, 28, .9), 0 0 28px rgba(10, 16, 28, .7); }
html[data-theme="dark"] .pr-track { stroke: rgba(255, 255, 255, .12); }
html[data-theme="dark"] .step-left { background: #ECF2F7; color: #101826; }
html[data-theme="dark"] .sdot { border-color: rgba(255, 255, 255, .35); }
html[data-theme="dark"] .step-progress i:not(.on):not(.done) { background: rgba(255, 255, 255, .15); }
html[data-theme="dark"] .step-sub { color: #9EE0BE; }
html[data-theme="dark"] .emo.hard[aria-pressed="true"] { background: #4A2A22; border-color: #B8644E; }
html[data-theme="dark"] .emo.good[aria-pressed="true"] { background: #1F3D2E; border-color: #4FA67C; }
html[data-theme="dark"] .emo-dots i { background: rgba(255, 255, 255, .2); }
html[data-theme="dark"] .emo-suggest { background: #2A2A3A; }
html[data-theme="dark"] .emo-bar { background: rgba(255, 255, 255, .1); }
html[data-theme="dark"] .gt-pairs { background: linear-gradient(160deg, #4A3026, #1A2436 75%); }
html[data-theme="dark"] .gt-catch { background: linear-gradient(160deg, #4A3F1E, #1A2436 75%); }
html[data-theme="dark"] .gt-ring { background: linear-gradient(160deg, #1E3A55, #1A2436 75%); }
html[data-theme="dark"] .game-tile { border-color: rgba(255, 255, 255, .08); }

/* ---------- Dark mode readability pass (2.1) ---------- */
/* Light pills and buttons always carry dark text, whatever the theme. */
.jar { color: #223038; }
.bloom-hold { color: #2B1E05; }
.bloom-hold[aria-pressed="true"] { color: #fff; }
/* The Today sky becomes a real night-time palette, with light text. */
html[data-theme="dark"] .sky-card { background: linear-gradient(180deg, #2A3A63 0%, #3E3A5C 100%); color: #F3F6FA; }
html[data-theme="dark"] .sky-card[data-time="Afternoons"] { background: linear-gradient(180deg, #1D3A5F 0%, #2C4C70 100%); }
html[data-theme="dark"] .sky-card[data-time="Evenings"] { background: linear-gradient(180deg, #4A2E44 0%, #5E3F35 100%); }
html[data-theme="dark"] .sky-card[data-time="Quiet nights"] { background: linear-gradient(180deg, #141C38 0%, #253360 100%); }
html[data-theme="dark"] .sky-card .eyebrow { color: #FFD98A; }
html[data-theme="dark"] .sky-card h1 { color: #F7F9FC; }
html[data-theme="dark"] .sky-card .sky-copy h1, html[data-theme="dark"] .sky-card .sky-copy .eyebrow { text-shadow: 0 1px 12px rgba(10, 14, 30, .6); }
html[data-theme="dark"] .sky-card .sky-hills path { fill: rgba(255, 255, 255, .08); opacity: 1; }
html[data-theme="dark"] .sky-pill { background: rgba(255, 255, 255, .12); color: #F3F6FA; }
html[data-theme="dark"] .btn-glass { background: rgba(255, 255, 255, .12); color: #F3F6FA; border-color: rgba(255, 255, 255, .2); }
/* Space cards: deep tinted cards instead of pastel ones. */
html[data-theme="dark"] .space-work { background: linear-gradient(160deg, #1E3A55, #26496B); }
html[data-theme="dark"] .space-rel { background: linear-gradient(160deg, #4A2E2A, #5C3A33); }
html[data-theme="dark"] .space-low { background: linear-gradient(160deg, #4A3F1E, #5C4D25); }
html[data-theme="dark"] .space-sleep { background: linear-gradient(160deg, #362B52, #46386A); }
html[data-theme="dark"] .spaces.carousel .space-card { color: #F3F6FA; }
html[data-theme="dark"] .space-card span { color: #C9D4DE; }
/* Dimmed items stay readable. */
html[data-theme="dark"] .badges li.dim { background: rgba(255, 255, 255, .05); color: #B9C5D0; }
html[data-theme="dark"] .badges li.dim strong { color: #DCE4EB; }
html[data-theme="dark"] .pday.paid { color: #A9B7C4; }
html[data-theme="dark"] .moods.has-pick .mood[aria-pressed="false"] svg { opacity: .7; }
html[data-theme="dark"] .mood span { color: #DCE4EB; }
html[data-theme="dark"] .recent .g, html[data-theme="dark"] .save { color: #8FDCB2; }
html[data-theme="dark"] .tool-ic { color: #223038; }
html[data-theme="dark"] .partner-type { color: #8FDCB2; background: rgba(79, 166, 124, .18); }
html[data-theme="dark"] .sos-ground { background: rgba(122, 196, 152, .12); }
html[data-theme="dark"] .sos-sheet .btn-soft.sos-action small { color: #C9D4DE; }
html[data-theme="dark"] .fold > summary::after { color: #8FD3AE; }
html[data-theme="dark"] .chip[aria-pressed="true"] { background: var(--leaf-2); color: #fff; border-color: #4FA67C; }
