/* =========================================================
   Feeling Finder - from TriviKids
   styles.css  ·  dark canvas, colour-and-shape feelings
   ========================================================= */

/* Fonts ship inside the app, never from Google: TriviKids promises
   "no data collected", and a font CDN is a network call that would
   break it (and the Hub build refuses to package one). Same files as
   hub/fonts. Latin subset covers Spanish - á é í ó ú ñ ü ¿ ¡. */
@font-face {
  font-family: "Nunito";
  src: url("fonts/nunito-latin.woff2") format("woff2");
  font-weight: 600 800;            /* one variable file, every weight */
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Spectral";
  src: url("fonts/spectral-400-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Spectral";
  src: url("fonts/spectral-600i-latin.woff2") format("woff2");
  font-weight: 400 600;            /* the only italic we ship; covers <em> */
  font-style: italic;
  font-display: swap;
}

:root {
  /* TriviKids brand - pulled from the logo */
  --navy:        #16254F;
  --brand-blue:  #2E9BE8;
  --brand-orange:#F26A1B;
  --brand-yellow:#FFC928;
  --brand-green: #5CB82E;
  --brand-purple:#7B3FBF;
  --brand-pink:  #EC2E8A;
  --brand-red:   #E63329;

  /* deep navy canvas, so the rainbow still pops but reads as TriviKids */
  --bg:        #0A1124;
  --bg-2:      #131D3A;
  --bg-3:      #1D294C;
  --ink:       #FFFFFF;
  --ink-2:     rgba(255,255,255,.68);
  --ink-3:     rgba(255,255,255,.44);
  --line:      rgba(255,255,255,.14);

  --red:    #F2453D;
  --yellow: #FFC020;
  --blue:   #3B82F6;
  --green:  #4ADE80;

  --r-sm: 14px;
  --r-md: 22px;
  --r-lg: 30px;

  --font-display: "Spectral", Georgia, serif;
  --font-body: "Nunito", system-ui, -apple-system, sans-serif;

  --cell: 108px;          /* one grid cell, overridden by JS */
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  overscroll-behavior: none;
}

button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; padding: 0; }
h1, h2, h3, h4 { margin: 0; line-height: 1.05; font-weight: 400; font-family: var(--font-display); }
p { margin: 0; line-height: 1.5; }

/* ---------- app shell ---------- */
#tk-app {
  position: relative;
  width: 100%;
  max-width: 460px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  /* clip, not just hide: the weather glows below reach 25% past every edge,
     and a hidden box can still be scrolled by a tap or focus, which slid
     whole screens sideways and showed a dark strip down one side */
  overflow: clip;
  background: var(--bg);
  isolation: isolate;
}

/* no phone frame on bigger screens: the app fills the window and each
   screen keeps its content in a centred column (see BIG SCREENS) */

/* ---------- screens ---------- */
.screen {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: none;
  flex-direction: column;
  padding: 26px 22px 24px;
  overflow-y: auto;
}
.screen.is-active { display: flex; animation: screen-in .4s cubic-bezier(.22,1,.36,1) both; }
.screen > * { flex-shrink: 0; }
.screen.flush { padding: 0; overflow: hidden; }

@keyframes screen-in { from { opacity: 0; transform: translateY(18px) scale(.985); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }

/* ---------- type ---------- */
.display   { font-family: var(--font-display); font-size: clamp(34px, 10vw, 46px); line-height: 1.02; letter-spacing: -.01em; text-wrap: balance; }
.display em{ font-style: italic; }
.kicker    { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3); font-weight: 800; }
.subtitle  { font-size: 16px; color: var(--ink-2); margin-top: 14px; font-weight: 600; line-height: 1.45; }
.spacer    { flex: 1; min-height: 16px; }

/* ---------- buttons ---------- */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 60px; padding: 0 24px;
  border-radius: 40px;
  font-family: var(--font-body);
  font-size: 18px; font-weight: 800;
  color: #08080C; background: #fff;
  transition: transform .12s ease, opacity .12s ease;
}
.btn:active { transform: scale(.97); }
.btn.ghost  { background: var(--bg-3); color: #fff; }
.btn-text   { display: block; width: 100%; margin-top: 14px; padding: 12px; font-size: 15px; font-weight: 700; color: var(--ink-3); }
.btn-text:hover { color: #fff; }

.icon-btn {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  backdrop-filter: blur(8px);
  color: #fff;
  flex: 0 0 44px;
}
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; margin-bottom: 14px; }

/* ---------- progress dots ---------- */
.dots { display: flex; gap: 7px; margin-bottom: 20px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.22); transition: all .3s ease; }
.dots i.on { width: 26px; border-radius: 7px; background: #fff; }

/* =========================================================
   THE RAINBOW  -  onboarding preview + the real grid
   ========================================================= */

/* small static rainbow used on the intro screen */
.rainbow-mini {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 5px;
  margin-top: 26px;
}
.rainbow-mini span,
.rainbow-mini .mini-dot {
  aspect-ratio: 1;
  border-radius: 50%;
  padding: 0;
  /* "backwards", not "both" - a finished animation with fill "both"
     keeps owning transform and would beat the .on rule below */
  animation: pop-in .5s cubic-bezier(.22,1.4,.36,1) backwards;
  transition: transform .3s cubic-bezier(.22,1.4,.36,1), opacity .25s ease, box-shadow .25s ease;
}
.rainbow-mini { position: relative; }
.rainbow-mini .mini-dot { position: relative; z-index: 1; }
.rainbow-mini .mini-dot:active { transform: scale(.85); }

/* one colour steps forward, the rest fall back */
.rainbow-mini.has-pick .mini-dot {
  opacity: .18;
  transform: scale(.82);
}
.rainbow-mini.has-pick .mini-dot.on {
  opacity: 1;
  z-index: 3;
  transform: scale(2.6);
  box-shadow: 0 6px 18px rgba(0,0,0,.55);
  transition: transform .42s cubic-bezier(.22,1.6,.36,1), opacity .25s ease;
}

.mini-read {
  margin-top: 18px;
  min-height: 46px;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--ink-2);
}
.mini-read b { font-weight: 800; }
.mini-read.pop { animation: read-in .42s cubic-bezier(.22,1,.36,1) both; }
@keyframes read-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
@keyframes pop-in { from { opacity: 0; transform: scale(.3); } to { opacity: 1; transform: none; } }

/* ---------- the zoomable field ---------- */
.field {
  position: absolute;
  inset: 0;
  overflow: hidden;
  touch-action: none;
  background: var(--bg);
  cursor: grab;
}
.field.dragging { cursor: grabbing; }

.canvas {
  position: absolute;
  top: 0; left: 0;
  transform-origin: 0 0;
  will-change: transform;
}
.canvas.animate { transition: transform .55s cubic-bezier(.22,1,.36,1); }

.bubble {
  position: absolute;
  display: grid;
  place-items: center;
  padding: 6px;
  border-radius: 50%;
  text-align: center;
  font-weight: 800;
  font-size: 15px;
  line-height: 1.1;
  color: rgba(0,0,0,.82);
  transition: transform .4s cubic-bezier(.22,1.3,.36,1),
              border-radius .4s cubic-bezier(.22,1.3,.36,1),
              opacity .3s ease;
  will-change: transform;
}
.bubble span { pointer-events: none; }

.field.has-pick .bubble { opacity: .42; }
.field.has-pick .bubble.picked { opacity: 1; }

/* zoomed far out the words stop fitting, so the colour speaks instead */
.field.tiny .bubble span { opacity: 0; transition: opacity .2s ease; }

/* the pick morphs out of a circle, like the real thing */
.bubble.picked {
  z-index: 5;
  transform: scale(1.3);
  font-size: 18px;
  box-shadow: 0 10px 40px rgba(0,0,0,.6);
}
.bubble.picked.sh-round  { border-radius: 50%; }
.bubble.picked.sh-wide   { border-radius: 50% 50% 50% 50% / 42% 42% 58% 58%; }
.bubble.picked.sh-tall   { border-radius: 44% 44% 44% 44% / 50%; }
.bubble.picked.sh-arch   { border-radius: 50% 50% 22% 22% / 62% 62% 24% 24%; }
.bubble.picked.sh-drop   { border-radius: 58% 42% 50% 50% / 72% 72% 34% 34%; }
.bubble.picked.sh-clover { border-radius: 58% 42% 55% 45% / 45% 55% 42% 58%; }
.bubble.picked.sh-twin   { border-radius: 50% 50% 46% 46% / 64% 64% 38% 38%; }
.bubble.picked.sh-pebble { border-radius: 64% 36% 42% 58% / 52% 48% 52% 48%; }

/* ---------- field chrome ---------- */
.field-top {
  position: absolute;
  z-index: 10;
  top: 0; left: 0; right: 0;
  display: flex; align-items: center; gap: 10px;
  padding: 18px 18px 26px;
  background: linear-gradient(180deg, rgba(8,8,12,.92) 0%, rgba(8,8,12,0) 100%);
}
.field-hint {
  flex: 1;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-2);
  text-align: center;
}

.zoom-pad {
  position: absolute;
  z-index: 10;
  right: 16px; bottom: 150px;
  display: grid; gap: 8px;
}

/* bottom sheet for the picked feeling */
.sheet {
  position: absolute;
  z-index: 12;
  left: 14px; right: 14px; bottom: 16px;
  display: flex; align-items: center; gap: 14px;
  padding: 16px 16px 16px 20px;
  border-radius: 28px;
  background: rgba(28,28,36,.96);
  backdrop-filter: blur(16px);
  box-shadow: 0 16px 50px rgba(0,0,0,.6);
  transform: translateY(140%);
  transition: transform .45s cubic-bezier(.22,1,.36,1);
}
.sheet.up { transform: none; }
.sheet .s-name { font-size: 19px; font-weight: 800; line-height: 1.15; }
.sheet .s-mean { font-size: 13.5px; color: var(--ink-2); font-weight: 600; margin-top: 3px; }
.sheet .s-go {
  flex: 0 0 54px; height: 54px;
  display: grid; place-items: center;
  margin-left: auto;
  border-radius: 50%;
  background: #fff; color: #08080C;
  transition: transform .14s ease;
}
.sheet .s-go:active { transform: scale(.92); }
.sheet .s-go svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- zone picker ---------- */
.zone-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 26px; }
.zone-ball {
  position: relative;
  aspect-ratio: 1;
  display: grid; place-items: center;
  padding: 16px;
  border-radius: 50%;
  text-align: center;
  font-size: 15px; font-weight: 800; line-height: 1.2;
  color: rgba(0,0,0,.84);
  animation: pop-in .5s cubic-bezier(.22,1.4,.36,1) both;
  transition: transform .16s ease;
}
.zone-ball:nth-child(2) { animation-delay: .07s; }
.zone-ball:nth-child(3) { animation-delay: .14s; }
.zone-ball:nth-child(4) { animation-delay: .21s; }
.zone-ball:active { transform: scale(.94); }
.zone-ball small { display: block; font-size: 11.5px; font-weight: 700; opacity: .72; margin-top: 5px; }

/* =========================================================
   SHAPES  (svg blobs used everywhere a feeling is shown)
   ========================================================= */
.blob { display: block; flex: none; }
.blob svg { display: block; width: 100%; height: 100%; }

/* =========================================================
   HOME
   ========================================================= */
#screen-home { padding: 24px 20px 112px; }

.home-head { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.home-hi   { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); font-weight: 800; }
.home-name { font-family: var(--font-display); font-size: 26px; line-height: 1.1; margin-top: 2px; }
.streak {
  margin-left: auto;
  display: flex; align-items: center; gap: 7px;
  padding: 9px 15px;
  font-size: 15px; font-weight: 800;
  border-radius: 30px;
  background: var(--bg-3);
}
.streak b { color: var(--yellow); }

/* the big check-in invitation */
.checkin {
  position: relative;
  margin-top: 20px;
  padding: 26px 22px 24px;
  border-radius: var(--r-lg);
  background: var(--bg-2);
  overflow: hidden;
}
.checkin .c-title { font-family: var(--font-display); font-size: 30px; line-height: 1.05; }
.checkin .c-sub   { font-size: 14px; color: var(--ink-2); font-weight: 600; margin-top: 10px; }
.checkin .btn     { margin-top: 20px; }
.checkin-art {
  position: absolute;
  right: -40px; top: -30px;
  display: grid;
  grid-template-columns: repeat(3, 34px);
  gap: 7px;
  opacity: .5;
  transform: rotate(14deg);
}
.checkin-art span { width: 34px; height: 34px; border-radius: 50%; animation: drift 7s ease-in-out infinite; }
@keyframes drift {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-9px); }
}

.today-row { display: flex; align-items: center; gap: 14px; margin-top: 18px; }
.today-row .t-label { font-size: 13px; color: var(--ink-3); font-weight: 700; }
.today-row .t-name  { font-family: var(--font-display); font-size: 24px; }

/* section heads */
.sec-head { display: flex; align-items: baseline; justify-content: space-between; margin: 30px 2px 14px; }
.sec-head h3 { font-family: var(--font-display); font-size: 23px; }
.sec-head button { font-size: 13px; font-weight: 800; color: var(--ink-3); }
.sec-head button:hover { color: #fff; }

/* week strip */
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.day { text-align: center; }
.day .d-lbl { font-size: 10px; font-weight: 800; color: var(--ink-3); letter-spacing: .04em; }
.day .d-slot {
  width: 100%; aspect-ratio: 1;
  margin-top: 8px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: rgba(255,255,255,.05);
}
.day.today .d-slot { box-shadow: inset 0 0 0 2px rgba(255,255,255,.4); }
.day .blob { width: 76%; animation: pop-in .45s cubic-bezier(.22,1.4,.36,1) both; }

/* feeling of the day */
.fotd {
  display: flex; gap: 16px; align-items: center;
  width: 100%; padding: 18px;
  text-align: left;
  border-radius: var(--r-lg);
  background: var(--bg-2);
}
.fotd .blob { width: 58px; height: 58px; }
.fotd .f-name { font-family: var(--font-display); font-size: 22px; }
.fotd .f-mean { font-size: 13px; color: var(--ink-2); font-weight: 600; margin-top: 4px; }

/* garden */
.garden {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 8px;
  padding: 18px 16px;
  border-radius: var(--r-lg);
  background: var(--bg-2);
}
.garden .cell { aspect-ratio: 1; display: grid; place-items: center; }
.garden .cell.locked { border-radius: 50%; background: rgba(255,255,255,.06); }
.garden .cell .blob { width: 100%; animation: pop-in .5s cubic-bezier(.22,1.4,.36,1) both; }
.garden-caption { margin-top: 12px; font-size: 13px; font-weight: 700; color: var(--ink-3); text-align: center; }

/* bottom nav */
.nav {
  position: absolute;
  z-index: 20;
  left: 12px; right: 12px; bottom: 12px;
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 10px 6px;
  border-radius: 26px;
  background: rgba(18,18,24,.94);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 40px rgba(0,0,0,.5);
}
.nav button { display: grid; justify-items: center; gap: 5px; padding: 6px 0; font-size: 10px; font-weight: 800; color: var(--ink-3); border-radius: 18px; }
.nav button svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nav button.on { color: #fff; }

/* =========================================================
   DETAIL  /  SAVED  /  HISTORY  /  A-Z
   ========================================================= */
.detail-hero { display: grid; place-items: center; padding: 18px 0 6px; }
.detail-hero .blob { width: 132px; height: 132px; animation: pop-in .6s cubic-bezier(.22,1.5,.36,1) both; }
.detail-name { font-family: var(--font-display); font-size: 40px; text-align: center; margin-top: 18px; }
.detail-mean { font-size: 16.5px; color: var(--ink-2); font-weight: 600; text-align: center; margin-top: 10px; }

.fact { display: flex; gap: 14px; margin-top: 12px; padding: 16px; border-radius: var(--r-md); background: var(--bg-2); }
.fact .f-bar { width: 4px; border-radius: 4px; flex: none; }
.fact b { display: block; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 5px; }
.fact p { font-size: 14.5px; font-weight: 600; color: var(--ink); }

.chips { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 14px; }
.chip {
  padding: 12px 18px;
  font-size: 14.5px; font-weight: 700;
  border-radius: 30px;
  background: var(--bg-3);
  color: var(--ink-2);
  transition: transform .14s ease;
}
.chip:active { transform: scale(.94); }
.chip.on { background: #fff; color: #08080C; }

.celebrate { display: grid; place-items: center; text-align: center; margin-top: 8vh; }
.celebrate .blob { width: 150px; height: 150px; animation: pop-in .7s cubic-bezier(.22,1.5,.36,1) both; }
.celebrate .streak { margin-left: 0; }   /* beat the right-aligning rule on home */
.celebrate h1 { font-family: var(--font-display); font-size: 38px; margin-top: 26px; }
.celebrate p  { margin-top: 14px; font-size: 16px; color: var(--ink-2); font-weight: 600; }

/* history rows - "I'm feeling joyful" */
.hist { display: grid; gap: 2px; margin-top: 6px; }
.hist-row {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 4px;
  border-bottom: 1px solid var(--line);
}
.hist-row .h-feel { font-family: var(--font-display); font-size: 21px; font-style: italic; }
.hist-row .h-when { font-size: 12.5px; color: var(--ink-3); font-weight: 700; margin-top: 4px; }
.hist-row .blob { width: 46px; height: 46px; margin-left: auto; }

/* stats */
.stat-row { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; margin-top: 16px; }
.stat { padding: 18px; border-radius: var(--r-md); background: var(--bg-2); }
.stat .s-num { font-family: var(--font-display); font-size: 34px; }
.stat .s-lbl { font-size: 12px; font-weight: 700; color: var(--ink-3); margin-top: 2px; }

.bars { display: grid; gap: 12px; margin-top: 16px; }
.bar { display: flex; align-items: center; gap: 12px; }
.bar .b-name  { font-size: 12.5px; font-weight: 800; width: 92px; flex: 0 0 92px; color: var(--ink-2); }
.bar .b-track { flex: 1; height: 14px; border-radius: 8px; background: rgba(255,255,255,.07); overflow: hidden; }
.bar .b-fill  { display: block; width: 100%; height: 100%; transform-origin: left center; animation: fill-in .8s cubic-bezier(.22,1,.36,1); }
@keyframes fill-in { from { transform: scaleX(0); } }
.bar .b-num { font-size: 13px; font-weight: 800; width: 24px; text-align: right; color: var(--ink-3); }

/* A-Z */
.az-group { margin-top: 26px; }
.az-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.az-head .az-dot { width: 13px; height: 13px; border-radius: 50%; }
.az-head h4 { font-family: var(--font-display); font-size: 20px; }
.az-list { display: grid; gap: 1px; }
.az-item { display: flex; align-items: center; gap: 14px; width: 100%; padding: 13px 2px; text-align: left; border-bottom: 1px solid var(--line); }
.az-item .blob { width: 34px; height: 34px; }
.az-item .a-name { font-size: 16px; font-weight: 800; }
.az-item .a-mean { font-size: 12.5px; color: var(--ink-3); font-weight: 600; margin-top: 2px; }

/* notes + empty states */
.note { display: flex; gap: 14px; margin-top: 22px; padding: 18px; border-radius: var(--r-md); background: var(--bg-2); border: 1px solid var(--line); }
.note .n-bar { width: 4px; border-radius: 4px; background: var(--green); flex: none; }
.note p { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.note b { color: #fff; }

.empty { padding: 34px 20px; text-align: center; border-radius: var(--r-lg); background: var(--bg-2); }
.empty p { font-size: 14px; color: var(--ink-3); font-weight: 600; }

/* name + avatar */
.field-input { margin-top: 24px; }
.field-input label { display: block; font-size: 13px; font-weight: 800; color: var(--ink-3); margin-bottom: 10px; letter-spacing: .08em; text-transform: uppercase; }
.field-input input {
  width: 100%; min-height: 62px; padding: 0 22px;
  font-family: var(--font-body); font-size: 22px; font-weight: 800;
  color: #fff; background: var(--bg-2);
  border: 2px solid var(--line); border-radius: var(--r-md);
  outline: none; transition: border-color .2s ease;
}
.field-input input::placeholder { color: var(--ink-3); }
.field-input input:focus { border-color: #fff; }

.shape-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 12px; }
.shape-pick {
  aspect-ratio: 1; padding: 9px;
  border-radius: 18px;
  background: var(--bg-2);
  transition: transform .14s ease;
}
.shape-pick:active { transform: scale(.9); }
.shape-pick.on { background: rgba(255,255,255,.14); box-shadow: inset 0 0 0 2px #fff; }

/* =========================================================
   BRAND  ·  logo lockup
   Drop the sticker PNG at assets/logo.png and it appears.
   If the file is missing the wordmark below carries it.
   ========================================================= */
.brand { display: grid; justify-items: center; gap: 10px; }
/* the heart is drawn on white paper, so it sits on a white plate -
   the same sticker treatment as the TriviKids circle */
.brand .ff-mark {
  width: 116px; height: 116px; display: block;
  padding: 7px;
  border-radius: 50%;
  background: #fff;
  object-fit: contain;
  box-shadow: 0 8px 26px rgba(0,0,0,.35);
}
.brand.no-logo .ff-mark { display: none; }
.ff-name {
  font-family: var(--font-display);
  font-size: 32px;
  line-height: 1;
}
.ff-from {
  font-size: 11px; font-weight: 800; letter-spacing: .2em;
  text-transform: uppercase; color: var(--ink-3);
}
.wordmark {
  font-family: var(--font-body);
  font-size: 26px; font-weight: 800; letter-spacing: -.02em;
}
.wordmark .t1 { color: var(--brand-blue); }
.wordmark .t2 { color: var(--brand-orange); }
.wordmark .t3 { color: var(--brand-yellow); }
.wordmark .t4 { color: var(--brand-green); }
.wordmark .t5 { color: var(--brand-purple); }
.wordmark .t6 { color: var(--brand-pink); }
.tagline {
  font-size: 11px; font-weight: 800; letter-spacing: .22em;
  text-transform: uppercase; color: var(--ink-3);
}

/* =========================================================
   FOLLOW-UP  ·  what were you doing, and where
   ========================================================= */
.ctx-hero { display: grid; place-items: center; padding: 4px 0 0; }
.ctx-hero .blob { animation: pop-in .55s cubic-bezier(.22,1.5,.36,1) both; }
.q-group { margin-top: 22px; }
.q-group h3 { font-family: var(--font-display); font-size: 24px; line-height: 1.2; margin-bottom: 12px; }
/* the feeling named inside the question, in its own colour */
.feel-word { font-style: italic; font-weight: 600; }
.q-group .q-hint { font-size: 13px; color: var(--ink-3); font-weight: 700; margin-bottom: 12px; }

/* =========================================================
   GROWN-UP GATE
   ========================================================= */
.gate { display: grid; place-items: center; text-align: center; margin-top: 10vh; }
.gate .g-lock { font-size: 13px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.gate h1 { font-family: var(--font-display); font-size: 34px; margin-top: 14px; }
.gate p  { font-size: 15px; color: var(--ink-2); font-weight: 600; margin-top: 12px; }
.gate .g-sum {
  font-family: var(--font-display);
  font-size: 44px; margin-top: 26px;
}
.gate input {
  width: 160px; min-height: 64px; margin-top: 16px;
  text-align: center;
  font-family: var(--font-body); font-size: 26px; font-weight: 800;
  color: #fff; background: var(--bg-2);
  border: 2px solid var(--line); border-radius: var(--r-md);
  outline: none;
}
.gate input:focus { border-color: var(--brand-blue); }
.gate .g-err { color: var(--brand-red); font-size: 14px; font-weight: 800; margin-top: 12px; min-height: 20px; }

/* =========================================================
   GROWN-UP FLAG
   ========================================================= */
.flag {
  display: flex; gap: 14px;
  margin-top: 18px; padding: 18px;
  border-radius: var(--r-md);
  background: rgba(230,51,41,.10);
  border: 1px solid rgba(230,51,41,.42);
}
.flag.is-watch {
  background: rgba(255,201,40,.10);
  border-color: rgba(255,201,40,.42);
}
.flag.is-clear {
  background: rgba(92,184,46,.10);
  border-color: rgba(92,184,46,.38);
}
.flag .fl-bar { width: 4px; border-radius: 4px; background: var(--brand-red); flex: none; }
.flag.is-watch .fl-bar { background: var(--brand-yellow); }
.flag.is-clear .fl-bar { background: var(--brand-green); }
.flag h4 { font-family: var(--font-display); font-size: 21px; }
.flag p  { font-size: 14px; color: var(--ink-2); font-weight: 600; margin-top: 7px; }
.flag ul { margin: 10px 0 0; padding-left: 18px; }
.flag li { font-size: 13.5px; color: var(--ink-2); font-weight: 600; margin-top: 5px; }
.flag b { color: #fff; }

.io-msg {
  min-height: 22px;
  margin-top: 12px;
  text-align: center;
  font-size: 14px;
  font-weight: 800;
}
.io-msg.ok  { color: var(--brand-green); }
.io-msg.err { color: var(--brand-red); }

.starter {
  margin-top: 10px; padding: 14px 16px;
  border-radius: var(--r-sm);
  background: rgba(255,255,255,.06);
  font-size: 14px; font-weight: 600; color: var(--ink);
  font-style: italic;
}

/* gentlest alert level: some red or blue this week */
.flag.is-notice { background: rgba(46,155,232,.10); border-color: rgba(46,155,232,.42); }
.flag.is-notice .fl-bar { background: var(--brand-blue); }

/* =========================================================
   CALENDAR  ·  grown-ups only, black on black.
   The only color on it is the feelings themselves.
   ========================================================= */
.cal {
  padding: 16px 12px 14px;
  border-radius: var(--r-lg);
  background: #000;
  border: 1px solid #161616;
}
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cal-head h4 { font-family: var(--font-display); font-size: 21px; }
.cal-arrow {
  width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 50%; background: #0d0d0d; color: #fff;
}
.cal-arrow svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.cal-arrow:disabled { opacity: .25; }
.cal-dow, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-dow span { text-align: center; font-size: 11px; font-weight: 800; color: #4a4a4a; padding-bottom: 6px; }
.cal-cell {
  min-height: 50px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 6px 2px 5px;
  border-radius: 12px;
  background: #000;
  border: 1px solid #141414;
}
.cal-cell.blank { border-color: transparent; }
.cal-cell:disabled { opacity: .35; }
.cal-num { font-size: 12px; font-weight: 800; color: #5c5c5c; line-height: 1; }
.cal-cell.today .cal-num { color: #fff; }
.cal-cell.sel { border-color: #5c5c5c; }
.cal-dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; max-width: 34px; }
.cal-dots i { width: 9px; height: 9px; border-radius: 50%; }
.cal-dots b { font-size: 9px; color: #8a8a8a; }
.cal-detail { margin-top: 14px; padding-top: 12px; border-top: 1px solid #161616; }
.cal-hint { font-size: 13.5px; color: #7a7a7a; font-weight: 600; }
.cal-hint b { color: #bdbdbd; }
.cal-day-title { font-size: 13px; font-weight: 800; color: #bdbdbd; margin-bottom: 8px; }
.cal-entry { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; }
.cal-entry > i { width: 12px; height: 12px; border-radius: 50%; flex: none; margin-top: 4px; }
.cal-entry b { font-size: 15px; }
.cal-entry small { font-size: 12px; color: #6a6a6a; font-weight: 700; margin-left: 4px; }
.cal-where { display: block; font-size: 12.5px; color: #8a8a8a; font-weight: 600; margin-top: 2px; }

/* "something new for grown-ups" - a dot, never a detail */
.nav button { position: relative; }
.nav-dot {
  position: absolute; top: 2px; left: calc(50% + 7px);
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--brand-pink);
  box-shadow: 0 0 0 2px rgba(18,18,24,.94);
}

/* =========================================================
   LANGUAGE  ·  one small pill that names the other language
   ========================================================= */
.lang-pill {
  padding: 8px 13px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: .02em;
  color: var(--ink-2);
  background: var(--bg-3);
  white-space: nowrap;
}
.lang-pill:hover { color: #fff; }

/* "Not now", top left, on the screens a child lands on when a game sends them
   here. The pill is 44 px tall; the ::after stretches the tap area to 58 px.
   The same button also sits at the bottom of those screens, which is below the
   fold on a short phone - this one never is. */
.skip-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 22px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .01em;
  color: var(--ink-2);
  background: var(--bg-3);
  white-space: nowrap;
}
.skip-pill::after { content: ""; position: absolute; inset: -7px -6px; }
.skip-pill:hover { color: #fff; }
.home-tools {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.home-tools .streak { margin-left: 0; }

/* ---------- accessibility ---------- */
:focus-visible { outline: 3px solid #fff; outline-offset: 3px; border-radius: 8px; }
.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; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

/* =========================================================
   MOTION  ·  everything drifts, breathes and springs a little.
   Individual `translate` / `scale` / `rotate` properties are used
   for the endless loops, so they stack on top of the `transform`
   that taps and picks already own instead of fighting it.
   ========================================================= */

/* slow colour weather behind every screen */
#tk-app::before,
#tk-app::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: -25%;
  pointer-events: none;
}
#tk-app::before {
  background:
    radial-gradient(38% 30% at 18% 22%, rgba(242,69,61,.20), transparent 70%),
    radial-gradient(34% 28% at 82% 18%, rgba(255,192,32,.16), transparent 70%);
  animation: weather-a 28s ease-in-out infinite alternate;
}
#tk-app::after {
  background:
    radial-gradient(36% 30% at 20% 82%, rgba(59,130,246,.20), transparent 70%),
    radial-gradient(34% 30% at 84% 78%, rgba(74,222,128,.15), transparent 70%);
  animation: weather-b 34s ease-in-out infinite alternate;
}
@keyframes weather-a { to { transform: translate(6%, 5%) rotate(8deg) scale(1.08); } }
@keyframes weather-b { to { transform: translate(-6%, -4%) rotate(-7deg) scale(1.1); } }

/* each screen arrives piece by piece */
.screen.is-active:not(.flush) > *:not(.hero):not(.nav):not(.spacer):not(.ctx-glow),
.hero-copy > *,
.hero-art {
  animation: rise-in .65s cubic-bezier(.22,1,.36,1) backwards;
}
.screen.is-active > :nth-child(2),  .hero-copy > :nth-child(2) { animation-delay: .05s; }
.screen.is-active > :nth-child(3),  .hero-copy > :nth-child(3) { animation-delay: .10s; }
.screen.is-active > :nth-child(4),  .hero-copy > :nth-child(4) { animation-delay: .15s; }
.screen.is-active > :nth-child(5)  { animation-delay: .20s; }
.screen.is-active > :nth-child(6)  { animation-delay: .25s; }
.screen.is-active > :nth-child(7)  { animation-delay: .30s; }
.screen.is-active > :nth-child(8)  { animation-delay: .35s; }
.screen.is-active > :nth-child(n+9){ animation-delay: .40s; }
.hero-art { animation-delay: .12s; }
@keyframes rise-in {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}
.nav { animation: nav-in .7s cubic-bezier(.22,1.3,.36,1) .25s backwards; }
@keyframes nav-in { from { opacity: 0; transform: translateY(120%); } }
/* the menu stays at the bottom while the page scrolls under it */
.nav { position: sticky; left: auto; right: auto; bottom: 12px; margin-top: 26px; }
#tk-app #screen-home { padding-bottom: 14px; }

/* ---------- the logo: twice the size, floating on a rainbow halo ---------- */
.brand { position: relative; isolation: isolate; --logo: min(232px, 58vw); }
.brand .ff-mark {
  width: var(--logo);
  height: var(--logo);
  padding: 12px;
  box-shadow: 0 14px 40px rgba(0,0,0,.45);
  animation:
    logo-in .9s cubic-bezier(.22,1.5,.36,1) backwards,
    logo-float 6s ease-in-out 1s infinite;
}
.brand::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: calc(var(--logo) * -.07);
  left: 50%;
  width: calc(var(--logo) * 1.14);
  height: calc(var(--logo) * 1.14);
  margin-left: calc(var(--logo) * -.57);
  border-radius: 50%;
  background: conic-gradient(#F2453D, #FFC020, #4ADE80, #3B82F6, #A855F7, #F2453D);
  filter: blur(24px);
  opacity: .5;
  animation: halo 12s linear infinite, logo-float 6s ease-in-out 1s infinite;
}
.brand.no-logo::before { display: none; }
.ff-name { font-size: 40px; margin-top: 8px; }
@keyframes logo-in { from { opacity: 0; transform: scale(.4) rotate(-16deg); } }
@keyframes logo-float {
  0%, 100% { translate: 0 0;    rotate: -2deg; }
  50%      { translate: 0 -9px; rotate: 2deg; }
}
@keyframes halo { to { transform: rotate(360deg); } }

/* ---------- the welcome rainbow ripples like a wave ---------- */
.rainbow-mini .mini-dot {
  animation:
    pop-in .5s cubic-bezier(.22,1.4,.36,1) backwards,
    wave 3.4s ease-in-out infinite;
  animation-delay: var(--d, 0ms), calc(.8s + var(--w, 0ms));
}
@keyframes wave {
  0%, 100% { translate: 0 0;    scale: 1; }
  50%      { translate: 0 -5px; scale: 1.07; }
}

/* ---------- zone balls: liquid, never quite round ---------- */
.zone-ball {
  overflow: hidden;
  animation:
    pop-in .55s cubic-bezier(.22,1.4,.36,1) backwards,
    morph 9s ease-in-out infinite,
    bob 5.5s ease-in-out infinite;
}
.zone-ball:nth-child(2) { animation-delay: .07s, -2.2s, -1.4s; }
.zone-ball:nth-child(3) { animation-delay: .14s, -4.5s, -2.8s; }
.zone-ball:nth-child(4) { animation-delay: .21s, -6.7s, -4.1s; }
@keyframes morph {
  0%, 100% { border-radius: 50%; }
  25%      { border-radius: 56% 44% 52% 48% / 47% 55% 45% 53%; }
  50%      { border-radius: 46% 54% 45% 55% / 54% 46% 54% 46%; }
  75%      { border-radius: 53% 47% 56% 44% / 45% 52% 48% 55%; }
}
@keyframes bob {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -6px; }
}

/* ---------- the big rainbow ---------- */
.bubble { animation: bubble-in .6s cubic-bezier(.22,1.4,.36,1) backwards; }
.bubble.picked {
  animation:
    bubble-in .6s cubic-bezier(.22,1.4,.36,1) backwards,
    breathe 2.6s ease-in-out infinite;
}
.field.has-pick .bubble:not(.picked) { opacity: .34; transform: scale(.9); }
@keyframes bubble-in { from { opacity: 0; transform: scale(.2); } }
@keyframes breathe {
  0%, 100% { scale: 1; }
  50%      { scale: 1.05; }
}
.sheet { transition: transform .55s cubic-bezier(.22,1.25,.36,1); }
.sheet.up .s-go { animation: pop-in .5s cubic-bezier(.22,1.6,.36,1) .15s backwards; }

/* ---------- blobs that sit on their own breathe and turn ---------- */
.detail-hero .blob svg,
.ctx-hero .blob svg,
.celebrate .blob svg,
.fotd .blob svg {
  animation: blob-life 5s ease-in-out infinite;
  transform-origin: 50% 50%;
}
@keyframes blob-life {
  0%, 100% { scale: 1;    rotate: 0deg; }
  50%      { scale: 1.06; rotate: 6deg; }
}

/* the celebration flings confetti in the feeling's colour */
.burst-wrap { position: relative; display: grid; place-items: center; }
.burst { position: absolute; inset: 0; pointer-events: none; }
.burst i {
  position: absolute;
  left: 50%; top: 50%;
  width: 14px; height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  opacity: 0;
  animation: burst 1.2s cubic-bezier(.12,.8,.3,1) forwards;
}
@keyframes burst {
  0%   { opacity: 1; transform: translate(0, 0) scale(.2); }
  65%  { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(var(--s)); }
}

/* the check-in card catches the light now and then */
.checkin::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(110deg, transparent 35%, rgba(255,255,255,.07) 50%, transparent 65%);
  transform: translateX(-100%);
  animation: sheen 7s ease-in-out 1.2s infinite;
}
@keyframes sheen { 0% { transform: translateX(-100%); } 35%, 100% { transform: translateX(100%); } }

.chip.on { animation: chip-pop .4s cubic-bezier(.22,1.7,.36,1); }
@keyframes chip-pop { 40% { transform: scale(1.1); } }
.cal-dots i { animation: pop-in .45s cubic-bezier(.22,1.5,.36,1) backwards; }
.dots i { transition: all .45s cubic-bezier(.22,1.5,.36,1); }
.btn, .chip, .shape-pick, .zone-ball, .icon-btn, .fotd, .az-item, .cal-cell {
  transition: transform .3s cubic-bezier(.22,1.5,.36,1), background-color .2s ease, box-shadow .3s ease, opacity .2s ease;
}

/* a soft ring where a finger lands (added by app.js) */
.btn, .chip, .zone-ball, .fotd, .shape-pick, .az-item, .cal-cell { position: relative; overflow: hidden; }
.ripple {
  position: absolute;
  border-radius: 50%;
  background: currentColor;
  opacity: .22;
  pointer-events: none;
  transform: scale(0);
  animation: ripple .7s cubic-bezier(.22,1,.36,1) forwards;
}
@keyframes ripple { to { transform: scale(1); opacity: 0; } }

/* mouse and trackpad: things lean toward the pointer */
@media (hover: hover) {
  .btn:hover        { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(0,0,0,.35); }
  .btn:active       { transform: scale(.97); }
  .zone-ball:hover  { transform: scale(1.05); box-shadow: 0 18px 44px rgba(0,0,0,.45); }
  .rainbow-mini:not(.has-pick) .mini-dot:hover { transform: scale(1.22); }
  .field:not(.dragging) .bubble:not(.picked):hover { transform: scale(1.07); }
  .field.has-pick:not(.dragging) .bubble:not(.picked):hover { transform: scale(.95); opacity: .7; }
  .chip:hover:not(.on), .az-item:hover, .fotd:hover { background-color: rgba(255,255,255,.08); }
  .chip:hover       { transform: translateY(-2px); }
  .icon-btn:hover   { transform: scale(1.08); background: rgba(255,255,255,.18); }
  .shape-pick:hover { transform: scale(1.06); }
  .cal-cell:not(:disabled):not(.blank):hover { border-color: #3a3a3a; }
}

/* =========================================================
   BIG SCREENS  ·  phone, tablet and desktop from one layout.
   Screens fill the window; their content sits in a centred
   column (--col) that widens with the screen.
   ========================================================= */

/* phones: the welcome screen reads top to bottom */
.hero, .hero-copy { display: contents; }
.hero-art    { order: 2; }
.spacer-mid  { order: 3; }
.hero-actions{ order: 4; }

/* ...but on a phone the big button comes straight after the question, and the
   rainbow preview follows it. With the button last it sat about 890 px down, off
   the bottom of every phone (beta walkthrough, 19 Oct 2026). The logo is a
   little smaller so the button is on screen even at 360 x 640. */
@media (max-width: 1023px) and (max-height: 1100px) {
  .hero-actions { order: 1; margin-top: 20px; }
  .hero-art     { order: 2; }
  .spacer-mid   { order: 3; }
  .brand        { --logo: min(150px, 42vw); }
}
/* a phone on its side is about 375 px tall: the logo steps aside so the
   question and the button are what is on screen */
@media (max-height: 480px) and (orientation: landscape) and (max-width: 1023px) {
  .hero .brand    { display: none; }
  .hero .display  { font-size: 38px; }
  .hero .subtitle { margin-top: 8px; }
  .hero-actions   { margin-top: 14px; }
  #tk-app #screen-w1 { padding-top: 22px; }
}

@media (min-width: 700px) {
  #tk-app { --col: 600px; max-width: none; height: 100vh; height: 100dvh; }
  #tk-app .screen:not(.flush) {
    padding: 40px max(32px, calc((100% - var(--col)) / 2)) 44px;
  }
  #tk-app #screen-home { padding-bottom: 20px; }
  /* content sits in the middle of the window when it is short */
  .screen:not(.flush)::before,
  .screen:not(.flush)::after { content: ""; flex: 1 1 0; }
  .spacer { flex: 0 0 28px; min-height: 0; }

  .display   { font-size: 54px; }
  .subtitle  { font-size: 18px; }
  .btn       { max-width: 460px; margin-left: auto; margin-right: auto; min-height: 64px; font-size: 19px; }
  .btn-text  { font-size: 16px; }
  .rainbow-mini { gap: 8px; width: 100%; max-width: 440px; margin-left: auto; margin-right: auto; }
  .mini-read { width: 100%; max-width: 440px; margin-left: auto; margin-right: auto; }
  .mini-read { font-size: 16px; }
  .zone-grid { gap: 22px; }
  .zone-ball { font-size: 18px; }
  .zone-ball small { font-size: 13px; }

  .nav  { width: 100%; max-width: 460px; margin: 30px auto 0; bottom: 18px; }
  .nav button { font-size: 12px; }
  .sheet { max-width: 580px; margin: 0 auto; bottom: 22px; }
  .sheet .s-name { font-size: 22px; }
  .sheet .s-mean { font-size: 15px; }
  .field-hint { font-size: 15px; }
  .zoom-pad { right: 24px; bottom: auto; top: 50%; margin-top: -76px; }

  .detail-name, .celebrate h1 { font-size: 50px; }
  .detail-mean { font-size: 18px; }
  .q-group h3 { font-size: 28px; }
  .chip { font-size: 16px; padding: 13px 20px; }
  .cal { padding: 22px 20px 18px; }
  .cal-cell { min-height: 68px; padding-top: 9px; }
  .cal-num { font-size: 14px; }
  .cal-dots { max-width: 52px; gap: 4px; }
  .cal-dots i { width: 12px; height: 12px; }
}

@media (min-width: 1024px) {
  #tk-app { --col: 720px; }
  .display { font-size: 62px; }
  .zone-grid { grid-template-columns: repeat(4, 1fr); }

  /* welcome: the words on the left, the rainbow on the right */
  #tk-app #screen-w1 { --col: 1140px; }
  .brand { --logo: 260px; }
  .hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
    gap: 80px;
    align-items: center;
  }
  .hero-copy { display: block; }
  .hero .brand { justify-items: start; }
  .hero .brand::before { left: calc(var(--logo) * -.07); margin-left: 0; }
  .hero .display { font-size: 70px; }
  .hero .subtitle { font-size: 20px; max-width: 30em; }
  .hero-actions { margin-top: 36px; }
  .hero-actions .btn { margin-left: 0; }
  .hero-actions .btn-text { width: auto; padding: 12px 24px; }
  .hero-art .rainbow-mini { margin-top: 0; gap: 12px; max-width: none; }
  .hero-art .mini-read { max-width: none; }
  .spacer-mid { display: none; }
}

/* laptops with short screens: keep the welcome on one screen */
@media (min-width: 1024px) and (max-height: 860px) {
  .brand { --logo: 232px; }
  .hero .display { font-size: 56px; }
  .hero-actions { margin-top: 26px; }
}

/* =========================================================
   FLOW  ·  the follow-up after a feeling is picked, modelled on
   How We Feel: a big serif question with the feeling in its own
   colour, a slow glow of that colour behind it, rows of tags, and
   a round white arrow to move on. The old screen melts away below.
   ========================================================= */
.screen.leaving {
  display: flex;
  z-index: 0;
  pointer-events: none;
  animation: screen-out .5s cubic-bezier(.4,0,.2,1) forwards;
}
@keyframes screen-out { to { opacity: 0; filter: blur(10px); transform: scale(1.04); } }

/* the glow: the feeling's colour, breathing behind the questions */
.ctx-glow {
  position: fixed;
  z-index: -1;
  left: 50%;
  top: 46%;
  width: min(120vw, 960px);
  height: min(115vh, 1000px);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--feel, #3B82F6), transparent);
  opacity: .34;
  filter: blur(36px);
  pointer-events: none;
  animation:
    glow-in 1.1s cubic-bezier(.22,1,.36,1) backwards,
    glow-drift 13s ease-in-out infinite alternate;
}
@keyframes glow-in { from { opacity: 0; scale: .55; } }
@keyframes glow-drift {
  from { translate: -7% 5%;  scale: 1; }
  to   { translate: 8% -6%;  scale: 1.14; }
}

.flow-bar { position: relative; }
.flow-dots { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); margin: 0; }
.flow-dots i.on { width: 24px; background: var(--feel, #fff); }
.flow-feel { width: 44px; height: 44px; display: grid; place-items: center; }
.flow-feel .blob svg { animation: blob-life 5s ease-in-out infinite; transform-origin: 50% 50%; }

.flow-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 9vw, 44px);
  line-height: 1.08;
  letter-spacing: -.01em;
  margin-top: 10px;
  text-wrap: balance;
}

.tag-group { margin-top: 28px; }
.tag-group h3 {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 12px;
}
.tag-group .chips { margin-top: 0; gap: 10px; }
.flow .chip {
  background: rgba(255,255,255,.09);
  color: #fff;
  font-size: 16px;
  padding: 13px 20px;
  backdrop-filter: blur(6px);
}
.flow .chip.on { background: var(--feel, #fff); color: var(--feel-ink, #08080C); }
.flow .btn { color: var(--feel-ink, #08080C); }
.chip-add { width: 48px; padding: 0 !important; display: inline-grid; place-items: center; }
.chip-add svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.chip-input {
  width: 180px;
  border: 2px solid var(--feel, #fff);
  outline: none;
  font-family: var(--font-body);
  font-weight: 700;
  animation: pop-in .35s cubic-bezier(.22,1.5,.36,1);
}
.chip-input::placeholder { color: var(--ink-3); }

/* "how did your body feel?" - the way into step 3 */
.body-row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  margin-top: 30px;
  padding: 16px 18px;
  border-radius: 24px;
  background: rgba(255,255,255,.08);
  text-align: left;
}
.body-row b { display: block; font-size: 16.5px; font-weight: 800; }
.body-row small { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink-2); margin-top: 3px; }
.body-row > svg { width: 22px; height: 22px; margin-left: auto; flex: none; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.body-ico {
  width: 46px; height: 46px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--feel, #fff);
  color: var(--feel-ink, #08080C);
}
.body-ico svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* the round white arrow, always within reach */
.fab-row {
  position: sticky;
  bottom: 18px;
  display: flex;
  justify-content: flex-end;
  margin-top: 24px;
  pointer-events: none;
}
.fab {
  pointer-events: auto;
  width: 68px; height: 68px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: #fff;
  color: #08080C;
  box-shadow: 0 14px 36px rgba(0,0,0,.5);
  animation: pop-in .6s cubic-bezier(.22,1.6,.36,1) .35s backwards;
  transition: transform .3s cubic-bezier(.22,1.5,.36,1);
}
.fab svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.fab:active { transform: scale(.92); }
.body-row, .fab { position: relative; overflow: hidden; }
@media (hover: hover) {
  .fab:hover { transform: scale(1.08); }
  .body-row:hover { background: rgba(255,255,255,.13); }
  .flow .chip:hover:not(.on) { background: rgba(255,255,255,.16); }
}

/* zone balls: a darker twin drifts behind each one, and they huddle
   together like the How We Feel cluster */
.zone-grid { gap: 8px; }
.zone-ball {
  scale: 1.06;
  box-shadow: 10px -8px 0 -3px color-mix(in srgb, var(--c, #555) 60%, #000);
  animation:
    pop-in .55s cubic-bezier(.22,1.4,.36,1) backwards,
    morph 9s ease-in-out infinite,
    bob 5.5s ease-in-out infinite,
    twin 7s ease-in-out infinite;
}
.zone-ball:nth-child(2) { animation-delay: .07s, -2.2s, -1.4s, -1.8s; }
.zone-ball:nth-child(3) { animation-delay: .14s, -4.5s, -2.8s, -3.6s; }
.zone-ball:nth-child(4) { animation-delay: .21s, -6.7s, -4.1s, -5.2s; }
@keyframes twin {
  0%, 100% { box-shadow: 10px -8px 0 -3px color-mix(in srgb, var(--c, #555) 60%, #000); }
  50%      { box-shadow: -8px 9px 0 -3px color-mix(in srgb, var(--c, #555) 60%, #000); }
}

@media (min-width: 700px) {
  .flow-title { font-size: 52px; }
  .tag-group h3 { font-size: 17px; }
  .flow .chip { font-size: 17px; padding: 14px 22px; }
}
@media (min-width: 1024px) {
  .flow-title { font-size: 58px; }
}

/* =========================================================
   CALM CORNER  ·  breathe with the rainbow (drone-show sky)
   ========================================================= */
#screen-breathe { background: #03050d; }
.sky {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  background: radial-gradient(120% 85% at 50% 40%, #0b1432 0%, #050816 55%, #03050d 100%);
}
.br-top { background: linear-gradient(180deg, rgba(3,5,13,.85), rgba(3,5,13,0)); }
.br-panel,
.br-live {
  position: absolute;
  z-index: 6;
  left: 0; right: 0; bottom: 0;
  padding: 30px 24px max(30px, env(safe-area-inset-bottom));
  text-align: center;
}
.br-panel {
  background: linear-gradient(180deg, rgba(3,5,13,0), rgba(3,5,13,.94) 40%);
  animation: rise-in .7s cubic-bezier(.22,1,.36,1) backwards;
}
.br-panel h1 { font-family: var(--font-display); font-size: clamp(32px, 8.5vw, 50px); line-height: 1.05; text-wrap: balance; }
.br-panel p { max-width: 30em; margin: 12px auto 24px; font-size: 16px; font-weight: 600; line-height: 1.5; color: var(--ink-2); }
.br-panel .btn { max-width: 420px; margin: 0 auto; }
.br-live { bottom: 5%; pointer-events: none; }
.br-label {
  font-family: var(--font-display);
  font-size: clamp(42px, 12vw, 72px);
  line-height: 1;
  text-shadow: 0 4px 30px rgba(0,0,0,.6);
}
.br-label.swap { animation: br-swap .9s cubic-bezier(.22,1,.36,1); }
@keyframes br-swap { from { opacity: 0; transform: translateY(14px) scale(.96); filter: blur(8px); } }
.br-count { margin-top: 10px; font-size: 26px; font-weight: 800; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.br-bar { width: min(240px, 60vw); height: 4px; margin: 14px auto 0; border-radius: 4px; overflow: hidden; background: rgba(255,255,255,.14); }
.br-bar i { display: block; height: 100%; background: #fff; transform: scaleX(0); transform-origin: left center; }
.br-panel[hidden], .br-live[hidden] { display: none; }

/* the way in: a card on home and after a hard feeling */
.calm-card {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  margin-top: 14px;
  padding: 16px 18px;
  text-align: left;
  border-radius: var(--r-lg);
  background: linear-gradient(120deg, rgba(59,130,246,.16), rgba(74,222,128,.10));
  border: 1px solid rgba(255,255,255,.08);
}
.calm-card b { display: block; font-family: var(--font-display); font-size: 21px; font-weight: 400; }
.calm-card small { display: block; margin-top: 3px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.calm-card > svg { width: 22px; height: 22px; margin-left: auto; flex: none; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.calm-dots {
  display: grid;
  grid-template-columns: repeat(5, 7px);
  gap: 4px;
  flex: none;
  padding: 6px;
  animation: calm-breathe 10s ease-in-out infinite;
}
.calm-dots i { width: 7px; height: 7px; border-radius: 50%; box-shadow: 0 0 6px currentColor; }
@keyframes calm-breathe {
  0%, 100% { transform: scale(.82); opacity: .7; }
  50%      { transform: scale(1.2);  opacity: 1; }
}
@media (hover: hover) { .calm-card:hover { border-color: rgba(255,255,255,.2); transform: translateY(-2px); } }
.calm-card { transition: transform .3s cubic-bezier(.22,1.5,.36,1), border-color .2s ease; position: relative; overflow: hidden; }
/* How We Feel's breathing look: small calm italic word, a nose or mouth below */
.br-label { font-style: italic; }
.br-how {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 10px;
  font-size: 15px; font-weight: 700; color: var(--ink-2);
}
.br-how svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.br-count { font-size: 20px; }
.br-shapes { justify-content: center; margin: 0 0 20px; }
.br-shapes .chip { background: rgba(255,255,255,.1); color: #fff; }
.br-shapes .chip.on { background: #fff; color: #08080C; }
.br-label.small { font-size: clamp(28px, 8vw, 44px); line-height: 1.12; max-width: 14em; margin: 0 auto; text-wrap: balance; }
.br-sub { margin-top: 6px; min-height: 1.4em; font-family: var(--font-display); font-style: italic; font-size: 18px; color: var(--ink-2); }
.br-label, .br-how { transition: color .8s ease; }

/* =========================================================
   CALM CORNER  ·  float with Tiki  (the scene is pool.js)
   ========================================================= */
#screen-pool { background: #45ADE8; }
.pool {
  position: absolute;
  inset: 0;
  overflow: hidden;
  touch-action: none;             /* a finger on the water moves Tiki, not the page */
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.pool > * { position: absolute; left: 0; top: 0; display: block; pointer-events: none; }
.pool-shadow, .pool-light, .pool-foam, .pool-tiki { will-change: transform; }
.pool-shadow { border-radius: 50%; }
.pool-tiki { max-width: none; -webkit-user-drag: none; }
/* on bright water the usual dark fade behind the top bar looks like a band */
.pool-top { background: none; }
.pool-top .icon-btn { background: rgba(9,58,104,.32); }
.pool-top .field-hint { color: #fff; text-shadow: 0 1px 8px rgba(9,58,104,.55); }
.pool-bottom {
  position: absolute;
  z-index: 6;
  left: 0; right: 0; bottom: 0;
  padding: 0 22px max(18px, env(safe-area-inset-bottom));
}
.pool-bottom .btn { max-width: 420px; margin: 0 auto; color: #15324A; box-shadow: 0 6px 18px rgba(11,62,107,.22); }

/* the way in: a card on home and after a hard feeling, beside Breathe */
.pool-card { background: linear-gradient(120deg, rgba(93,192,241,.18), rgba(43,140,209,.10)); }
.pool-thumb {
  flex: none;
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(180deg, #5DC0F1, #2B8CD1);
}
.pool-thumb img { width: 36px; height: auto; max-width: none; animation: pool-bob 7s ease-in-out infinite; }
@keyframes pool-bob {
  0%, 100% { transform: translate(0, 0) rotate(-3deg); }
  50%      { transform: translate(1px, -1.5px) rotate(3deg); }
}
@media (prefers-reduced-motion: reduce) { .pool-thumb img { animation: none; } }

/* =========================================================
   LOADING SCREEN  ·  Tiki in the pool
   ========================================================= */
.splash {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: linear-gradient(180deg, #5DC0F1, #45ADE8 55%, #2B8CD1);
  transition: opacity .75s ease, transform .75s cubic-bezier(.22,1,.36,1), filter .75s ease;
}
.splash.out { opacity: 0; transform: scale(1.06); filter: blur(8px); pointer-events: none; }
.splash-tiki {
  position: absolute;
  left: 50%; top: 32%;
  width: min(34vw, 190px);
  transform: translate(-50%, -50%);
  animation: splash-bob 4.5s ease-in-out infinite;
}
.splash.live .splash-tiki { display: none; }
@keyframes splash-bob { 50% { translate: 0 -8px; rotate: 3deg; } }
.splash-card {
  position: absolute;
  left: 50%;
  bottom: max(9vh, 40px);
  width: min(320px, 82vw);
  transform: translateX(-50%);
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 22px 26px 20px;
  border-radius: 30px;
  background: rgba(255,255,255,.9);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 16px 50px rgba(11,62,107,.28);
  color: #15324A;
  text-align: center;
  animation: splash-card-in .9s cubic-bezier(.22,1,.36,1) .15s backwards;
}
@keyframes splash-card-in { from { opacity: 0; translate: 0 24px; } }
.splash-heart { width: 64px; height: 64px; padding: 4px; border-radius: 50%; background: #fff; box-shadow: 0 4px 14px rgba(11,62,107,.2); }
.splash-name { font-family: var(--font-display); font-size: 30px; line-height: 1; }
.splash-line { min-height: 1.3em; font-size: 15px; font-weight: 700; color: #3C6584; }
.splash-dots { display: flex; gap: 7px; }
.splash-dots i { width: 8px; height: 8px; border-radius: 50%; background: #2B8CD1; animation: splash-dot 1.2s ease-in-out infinite; }
.splash-dots i:nth-child(2) { animation-delay: .15s; }
.splash-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes splash-dot { 0%, 80%, 100% { opacity: .25; transform: scale(.8); } 40% { opacity: 1; transform: scale(1.15); } }

/* =========================================================
   INSTALL screen + the grown-up switch for games
   ========================================================= */
.inst-hero { display: grid; place-items: center; margin-top: 8px; }
.inst-icon { width: 112px; height: 112px; border-radius: 26px; box-shadow: 0 14px 40px rgba(0,0,0,.45); animation: logo-in .9s cubic-bezier(.22,1.5,.36,1) backwards; }
.inst-steps { margin: 26px auto 0; padding: 0; max-width: 420px; list-style: none; counter-reset: step; display: grid; gap: 12px; }
.inst-steps li { counter-increment: step; display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--r-md); background: var(--bg-2); font-size: 15.5px; font-weight: 600; color: var(--ink-2); }
.inst-steps li::before { content: counter(step); flex: none; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: #fff; color: #08080C; font-weight: 800; }
.inst-steps b { color: #fff; }
.inst-share { width: 20px; height: 20px; vertical-align: -4px; fill: none; stroke: #2E9BE8; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.toggle-row { display: flex; align-items: center; gap: 16px; width: 100%; padding: 16px 18px; text-align: left; border-radius: var(--r-md); background: var(--bg-2); }
.toggle-row b { display: block; font-size: 15.5px; }
.toggle-row small { display: block; margin-top: 4px; font-size: 13px; font-weight: 600; color: var(--ink-3); }
.switch { flex: none; margin-left: auto; width: 52px; height: 30px; padding: 3px; border-radius: 30px; background: rgba(255,255,255,.18); transition: background .25s ease; }
.switch i { display: block; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .3s cubic-bezier(.22,1.5,.36,1); }
.switch.on { background: var(--brand-green); }
.switch.on i { transform: translateX(22px); }
/* five breathing shapes: they wrap onto two rows on a phone */
.br-shapes { gap: 8px; max-width: 460px; margin-left: auto; margin-right: auto; }
.br-shapes .chip { padding: 10px 16px; font-size: 15px; }
.br-top .icon-btn[aria-pressed="false"] { opacity: .6; }

/* =========================================================
   MINDFULNESS  ·  breathing picker (Breathwrk-style), Calm hub,
   guided-track player (Headspace-style) and Feelings School
   ========================================================= */

/* ---------- breathing picker ---------- */
.br-picker { padding-top: 40px; }
.tech-row { display: flex; align-items: center; gap: 6px; max-width: 520px; margin: 0 auto; }
.tech-arrow { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; color: var(--ink-2); }
.tech-arrow svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.tech-arrow:hover { color: #fff; background: rgba(255,255,255,.08); }
.tech-card { flex: 1; min-width: 0; text-align: center; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.tech-card.swap { animation: br-swap .55s cubic-bezier(.22,1,.36,1); }
.tech-card h2 { font-family: var(--font-display); font-size: clamp(28px, 7.5vw, 40px); line-height: 1.05; }
.tech-tag { display: inline-block; margin-top: 10px; padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.tech-card p { margin: 10px auto 0; max-width: 26em; font-size: 15px; font-weight: 600; line-height: 1.45; color: var(--ink-2); }
.tech-card .tech-rhythm { margin-top: 8px; font-size: 13px; font-weight: 800; letter-spacing: .04em; color: var(--ink-3); }
.tech-dots { display: flex; justify-content: center; gap: 7px; margin: 14px 0 18px; }
.tech-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.22); transition: all .35s cubic-bezier(.22,1.5,.36,1); }
.tech-dots i.on { width: 22px; border-radius: 6px; background: var(--c); }
.br-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 460px; margin: 0 auto; }
.br-tile { display: grid; gap: 3px; padding: 12px 8px; border-radius: 18px; background: rgba(255,255,255,.08); text-align: center; }
.br-tile small { font-size: 11.5px; font-weight: 800; letter-spacing: .06em; color: var(--ink-3); }
.br-tile b { font-size: 15px; font-weight: 800; }
.br-tile:hover { background: rgba(255,255,255,.13); }
.br-play {
  width: 76px; height: 76px; margin: 18px auto 0;
  display: grid; place-items: center;
  border-radius: 50%; border: 2px solid rgba(255,255,255,.85);
  color: #fff;
  animation: play-pulse 3.2s ease-in-out infinite;
}
.br-play svg { width: 30px; height: 30px; margin-left: 4px; }
@keyframes play-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255,255,255,.18); } 50% { box-shadow: 0 0 0 14px rgba(255,255,255,0); } }

/* end of a round: the ring of breaths */
.br-end { text-align: center; }
.br-ring { position: relative; width: 190px; height: 190px; margin: 0 auto 6px; display: grid; place-content: center; }
.br-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: rgba(255,255,255,.4); stroke-width: .7; animation: halo 40s linear infinite; }
.br-ring b { font-family: var(--font-body); font-size: 58px; font-weight: 800; line-height: 1; }
.br-ring small { font-size: 14px; font-weight: 700; color: var(--ink-2); }
.br-end h1 { font-size: clamp(24px, 6vw, 32px); }
.br-stats { display: grid; grid-template-columns: 1fr 1fr; max-width: 360px; margin: 16px auto 20px; border-radius: 20px; background: rgba(255,255,255,.08); }
.br-stats div { padding: 12px 8px; display: grid; gap: 4px; }
.br-stats div + div { border-left: 1px solid rgba(255,255,255,.12); }
.br-stats small { font-size: 12px; font-weight: 700; color: var(--ink-2); }
.br-stats b { font-size: 26px; font-weight: 800; }

/* the option sheet */
.br-sheet { position: absolute; inset: 0; z-index: 30; display: flex; align-items: flex-end; justify-content: center; background: rgba(3,5,13,.55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.br-sheet[hidden] { display: none; }
.br-sheet-card { width: 100%; max-width: 560px; max-height: 80%; overflow-y: auto; padding: 18px 20px max(24px, env(safe-area-inset-bottom)); border-radius: 30px 30px 0 0; background: rgba(28,30,44,.97); animation: sheet-up .45s cubic-bezier(.22,1.2,.36,1); }
@keyframes sheet-up { from { transform: translateY(100%); } }
.br-sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.br-sheet-head b { font-family: var(--font-display); font-size: 24px; font-weight: 400; }
.br-sheet-body h4 { margin: 16px 0 10px; font-size: 14px; font-weight: 800; color: var(--ink-2); }
.opt-row { display: flex; flex-wrap: wrap; gap: 10px; }
.opt { flex: 1 1 0; min-width: 72px; display: grid; justify-items: center; gap: 8px; padding: 14px 6px 12px; border-radius: 20px; background: rgba(255,255,255,.06); border: 2px solid transparent; }
.opt.on { border-color: rgba(255,255,255,.75); background: rgba(255,255,255,.12); }
.opt small { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.opt-big { font-size: 30px; font-weight: 800; line-height: 1; }
.opt-orb { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 -6px 12px rgba(0,0,0,.25); }
.opt-orb svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.orb-ocean { background: radial-gradient(circle at 35% 30%, #9be3ff, #2B8CD1 70%); }
.orb-rain  { background: radial-gradient(circle at 35% 30%, #d9e4f2, #6b7f99 70%); }
.orb-space { background: radial-gradient(circle at 35% 30%, #9575CD, #1b1435 70%); }
.orb-off   { background: rgba(255,255,255,.12); box-shadow: none; position: relative; }
.orb-off::after { content: ""; width: 20px; height: 2.5px; border-radius: 2px; background: #fff; }
.tone-orb  { background: rgba(255,255,255,.12); box-shadow: none; }
.shape-orb { background: #0b1432; position: relative; overflow: hidden; }
.shape-orb::before { content: ""; position: absolute; inset: 9px; }
.shape-ball::before   { border-radius: 50%; background: radial-gradient(circle, #FFC020 0 1.5px, transparent 2px) 0 0 / 6px 6px, radial-gradient(circle at 40% 35%, #3B82F6, #F2453D); opacity: .9; }
.shape-grid::before   { background: radial-gradient(circle, #fff 0 1.3px, transparent 1.8px) 0 0 / 7px 7px; }
.shape-waves::before  { inset: 14px 6px; background: repeating-linear-gradient(170deg, #4ADE80 0 2px, transparent 2px 6px); border-radius: 40% 40% 0 0; }
.shape-flower::before { border-radius: 50%; background: conic-gradient(#F2453D, #FFC020, #4ADE80, #3B82F6, #A855F7, #F2453D); -webkit-mask: radial-gradient(circle, transparent 0 3px, #000 3.5px); mask: radial-gradient(circle, transparent 0 3px, #000 3.5px); }
.shape-galaxy::before { border-radius: 50%; background: conic-gradient(from 30deg, transparent, #F2453D, transparent 25%, #FFC020, transparent 50%, #4ADE80, transparent 75%, #3B82F6, transparent); }
.br-sheet .toggle-row { margin-top: 16px; background: rgba(255,255,255,.06); }

/* ---------- the Calm hub ---------- */
.calm-hero { position: relative; overflow: hidden; display: flex; align-items: flex-end; min-height: 190px; margin-top: 6px; padding: 20px; border-radius: var(--r-lg); background: linear-gradient(180deg, #FFD36E, #F7A33A); color: #3a1f00; isolation: isolate; }
.calm-waves i { position: absolute; z-index: -1; left: -25%; right: -25%; border-radius: 48% 52% 0 0 / 40% 40% 0 0; animation: wave-drift 9s ease-in-out infinite alternate; }
.calm-waves i:nth-child(1) { top: 46%; height: 70%; background: #F98E3A; animation-duration: 11s; }
.calm-waves i:nth-child(2) { top: 62%; height: 60%; background: #F26A1B; animation-delay: -3s; }
.calm-waves i:nth-child(3) { top: 80%; height: 50%; background: #E2531A; animation-delay: -6s; animation-duration: 13s; }
@keyframes wave-drift { from { transform: translateX(-6%) rotate(-1.5deg); } to { transform: translateX(6%) rotate(1.5deg); } }
.calm-tiki { position: absolute; z-index: -1; right: 12px; top: 10px; width: min(34%, 150px); animation: splash-bob 5s ease-in-out infinite; }
.calm-hero-text .display { color: #fff; font-size: clamp(34px, 9vw, 52px); text-shadow: 0 2px 12px rgba(120,40,0,.25); }
.calm-stats { margin-top: 6px; font-size: 14px; font-weight: 700; color: #fff; }
.calm-stats b { font-weight: 800; }

.today-path { position: relative; display: grid; gap: 12px; }
.today-path::before { content: ""; position: absolute; left: 17px; top: 20px; bottom: 20px; border-left: 2px dashed rgba(255,255,255,.18); }
.path-step { position: relative; display: flex; align-items: center; gap: 14px; text-align: left; width: 100%; }
.path-dot { position: relative; z-index: 1; flex: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: var(--bg-3); font-weight: 800; border: 2px solid rgba(255,255,255,.25); }
.path-step.done .path-dot { background: var(--brand-green); border-color: var(--brand-green); color: #08080C; }
.path-dot svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.path-card { flex: 1; display: grid; gap: 3px; padding: 14px 16px; border-radius: 20px; background: var(--bg-2); }
.path-card b { font-size: 16px; }
.path-card small { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.path-step.done .path-card { opacity: .75; }

.cat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }
.cat { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: 20px; background: var(--bg-2); text-align: left; }
.cat svg { flex: none; width: 34px; height: 34px; padding: 7px; border-radius: 50%; background: var(--c); color: #08080C; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.cat b { font-size: 16px; }

.course-card { padding: 20px; border-radius: var(--r-lg); background: linear-gradient(140deg, rgba(124,140,248,.25), rgba(43,182,115,.18)); border: 1px solid rgba(255,255,255,.08); }
.course-card h4 { font-family: var(--font-display); font-size: 26px; font-weight: 400; margin-top: 6px; }
.course-card p { margin-top: 6px; font-size: 14.5px; font-weight: 600; color: var(--ink-2); }
.course-dots { display: flex; gap: 8px; margin: 16px 0; }
.course-dots i { flex: 1; height: 8px; border-radius: 6px; background: rgba(255,255,255,.14); }
.course-dots i.done { background: var(--c); }
.course-dots i.on { background: rgba(255,255,255,.5); }

.track-list { display: grid; gap: 10px; }
.track { display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 14px 12px 12px; border-radius: 20px; background: var(--bg-2); text-align: left; }
.track-art { position: relative; flex: none; width: 58px; height: 58px; border-radius: 16px; overflow: hidden; background: var(--c); }
.track-art i { position: absolute; left: -30%; right: -30%; border-radius: 50% 50% 0 0; background: rgba(255,255,255,.35); }
.track-art i:nth-child(1) { top: 45%; height: 80%; }
.track-art i:nth-child(2) { top: 68%; height: 60%; background: rgba(0,0,0,.18); }
.track-txt { flex: 1; display: grid; gap: 3px; }
.track-txt b { font-size: 16px; }
.track-txt small { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.track > svg, .track-done svg { flex: none; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.track-done { color: var(--brand-green); }
@media (hover: hover) { .track:hover, .cat:hover, .path-card:hover { background: var(--bg-3); } }

/* ---------- the guided-track player ---------- */
.med { position: absolute; inset: 0; overflow: hidden; display: flex; flex-direction: column; align-items: center; color: var(--ink); background: linear-gradient(180deg, color-mix(in srgb, var(--c) 45%, #fff), var(--c) 70%); isolation: isolate; }
.med-waves i { position: absolute; z-index: -1; left: -30%; right: -30%; border-radius: 48% 52% 0 0 / 34% 34% 0 0; animation: wave-drift 10s ease-in-out infinite alternate; }
.med-waves i:nth-child(1) { top: 22%; height: 90%; background: color-mix(in srgb, var(--c) 60%, #fff); }
.med-waves i:nth-child(2) { top: 55%; height: 70%; background: var(--c); animation-delay: -4s; animation-duration: 12s; }
.med-waves i:nth-child(3) { top: 76%; height: 50%; background: color-mix(in srgb, var(--c) 78%, #000); animation-delay: -7s; animation-duration: 14s; }
.med.playing .med-waves i { animation-duration: 6s; }
.med-top { width: 100%; display: flex; justify-content: space-between; padding: 18px 18px 0; }
.med-top .icon-btn { background: rgba(255,255,255,.28); color: var(--ink); }
.med-top .icon-btn[aria-pressed="false"] { opacity: .65; }
.med-head { text-align: center; padding: 10px 24px 0; max-width: 560px; }
.med-head .kicker { color: var(--ink); opacity: .75; }
.med-head h1 { font-family: var(--font-display); font-size: clamp(32px, 8.5vw, 50px); line-height: 1.05; margin-top: 8px; }
.med-about { margin-top: 8px; font-size: 15px; font-weight: 600; opacity: .85; }
.med-tiki { width: min(36vw, 170px); margin-top: 18px; filter: drop-shadow(0 12px 18px rgba(0,0,0,.18)); animation: splash-bob 5s ease-in-out infinite; }
.med.playing .med-tiki { animation-duration: 8s; }
.med-line { min-height: 4.4em; max-width: 30em; margin: 16px 24px 0; padding: 0 8px; text-align: center; font-family: var(--font-display); font-size: clamp(19px, 5vw, 25px); line-height: 1.35; color: #fff; text-shadow: 0 1px 10px rgba(0,0,0,.25); }
.med-line.swap { animation: br-swap .9s cubic-bezier(.22,1,.36,1); }
.med-bottom { width: 100%; max-width: 520px; margin-top: auto; padding: 0 28px max(28px, env(safe-area-inset-bottom)); display: grid; justify-items: center; gap: 12px; color: #fff; }
.med-play { width: 78px; height: 78px; display: grid; place-items: center; border-radius: 50%; background: #2a2a2e; color: #fff; box-shadow: 0 12px 30px rgba(0,0,0,.25); }
.med-play svg { width: 32px; height: 32px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; }
.med-bar { width: 100%; height: 5px; border-radius: 4px; overflow: hidden; background: rgba(255,255,255,.35); }
.med-bar i { display: block; height: 100%; background: #fff; transform: scaleX(0); transform-origin: left center; }
.med-times { width: 100%; display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.med-note { font-size: 13px; font-weight: 700; opacity: .9; text-align: center; }
.med-done { position: absolute; inset: 0; z-index: 5; display: grid; place-content: center; justify-items: center; gap: 10px; padding: 24px; text-align: center; background: color-mix(in srgb, var(--c) 88%, #000); color: #fff; animation: rise-in .6s cubic-bezier(.22,1,.36,1); }
.med-done[hidden] { display: none; }
.med-done h2 { font-family: var(--font-display); font-size: 40px; font-weight: 400; }
.med-done p { font-size: 17px; font-weight: 600; max-width: 22em; }
.med-done .btn { margin-top: 14px; min-width: 240px; }

/* ---------- Feelings School ---------- */
.stars { display: inline-flex; gap: 4px; }
.stars i { width: 16px; height: 16px; background: rgba(255,255,255,.18); clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.stars i.on { background: #FFC020; }
.stars.big { gap: 10px; }
.stars.big i { width: 52px; height: 52px; animation: pop-in .6s cubic-bezier(.22,1.6,.36,1) backwards; }
.stars.big i:nth-child(2) { animation-delay: .15s; }
.stars.big i:nth-child(3) { animation-delay: .3s; }
.lesson-list { display: grid; gap: 10px; margin-top: 24px; }
.lesson-card { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px; border-radius: 20px; background: var(--bg-2); text-align: left; }
.lesson-num { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; background: var(--c); color: #08080C; font-size: 19px; font-weight: 800; }
.lesson-txt { flex: 1; display: grid; gap: 6px; }
.lesson-txt b { font-size: 16.5px; }
.lesson-card > svg { flex: none; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) { .lesson-card:hover { background: var(--bg-3); } }
.learn-all { margin-top: 20px; }
.learn-thumb { display: grid; grid-template-columns: repeat(2, 14px); gap: 5px; flex: none; padding: 4px; }
.learn-thumb i { width: 14px; height: 14px; border-radius: 50%; animation: calm-breathe 10s ease-in-out infinite; }
.learn-card { background: linear-gradient(120deg, rgba(255,192,32,.16), rgba(242,69,61,.10)); }

.lesson-head .kicker { color: var(--c); }
.lesson-head .display { margin-top: 8px; }
.lesson-progress { display: flex; gap: 6px; margin: 18px 0 8px; }
.lesson-progress i { flex: 1; height: 6px; border-radius: 4px; background: rgba(255,255,255,.12); transition: background .4s ease; }
.lesson-progress i.done { background: rgba(255,255,255,.55); }
.lesson-progress i.on { background: #fff; }
.lesson-stage { margin-top: 10px; }
.ls-card, .ls-quiz, .ls-done { padding: 26px 22px; border-radius: var(--r-lg); background: var(--bg-2); border-top: 4px solid var(--c); }
.swap.ls-card, .swap.ls-quiz, .swap.ls-done { animation: rise-in .55s cubic-bezier(.22,1,.36,1); }
.ls-card { display: grid; justify-items: center; gap: 18px; text-align: center; }
.ls-card .blob svg { animation: blob-life 5s ease-in-out infinite; transform-origin: 50% 50%; }
.ls-card p { font-family: var(--font-display); font-size: clamp(22px, 5.6vw, 30px); line-height: 1.3; }
.ls-quiz h2 { font-family: var(--font-display); font-size: clamp(22px, 5.6vw, 30px); line-height: 1.25; margin-top: 8px; }
.ls-opts { display: grid; gap: 10px; margin-top: 18px; }
.ls-opt { display: flex; align-items: center; gap: 12px; padding: 15px 18px; border-radius: 18px; background: rgba(255,255,255,.07); border: 2px solid transparent; font-size: 16.5px; font-weight: 800; text-align: left; transition: transform .25s cubic-bezier(.22,1.5,.36,1), background .2s ease, border-color .2s ease; }
.ls-opt:not(:disabled):hover { background: rgba(255,255,255,.12); transform: translateY(-2px); }
.ls-opt.right { border-color: var(--brand-green); background: rgba(92,184,46,.18); animation: chip-pop .45s cubic-bezier(.22,1.7,.36,1); }
.ls-opt.wrong { border-color: rgba(255,255,255,.35); opacity: .7; }
.ls-opt:disabled:not(.right):not(.wrong) { opacity: .45; }
.ls-dot { flex: none; width: 18px; height: 18px; border-radius: 50%; }
.ls-dot.big { width: 26px; height: 26px; }
.ls-why { margin-top: 16px; padding: 14px 16px; border-radius: 16px; background: rgba(255,255,255,.06); font-size: 15px; font-weight: 600; line-height: 1.45; color: var(--ink-2); animation: rise-in .45s cubic-bezier(.22,1,.36,1); }
.ls-why b { color: #fff; }
.ls-done { display: grid; justify-items: center; gap: 10px; text-align: center; }
.ls-done h2 { font-family: var(--font-display); font-size: 34px; font-weight: 400; margin-top: 8px; }
.ls-done p { font-size: 16px; font-weight: 600; color: var(--ink-2); }
.lesson-actions { display: grid; }

@media (min-width: 700px) {
  .cat-grid { grid-template-columns: repeat(4, 1fr); }
  .cat { flex-direction: column; text-align: center; }
  .calm-hero { min-height: 230px; padding: 28px; }
}

/* the round is over: the lights dim behind the ring of breaths */
.sky { transition: opacity 1s ease; }
.br-ended .sky { opacity: .2; }
