/* MindQuest visitor app: bright, playful, game-like */
:root {
  --bg: #F3F4FF;
  --surface: #FFFFFF;
  --soft: #ECEBFF;
  --ink: #1E1B3A;
  --muted: #59567A;
  --line: #DAD8F2;

  --grape: #5B4BDB;   --grape-dark: #3D2FB0;
  --coral: #E0522F;   --coral-dark: #B23A1D;
  --teal: #0B8A73;    --teal-dark: #066352;
  --sun: #FFC23D;     --sun-dark: #D89A12;
  --sky: #1F7FD6;     --sky-dark: #145EA3;
  --pink: #FF5FA2;
  --leaf: #2E9E57;

  --on-color: #FFFFFF;
  --focus: #FFC23D;
  --j: var(--grape);
  --j-dark: var(--grape-dark);

  --display: "Baloo 2", "Baloo Da 2", "Noto Sans Devanagari", "Noto Sans Bengali", system-ui, sans-serif;
  --body: "Noto Sans", "Noto Sans Devanagari", "Noto Sans Bengali", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not(.mq-contrast) {
    --bg: #14122B;
    --surface: #211E40;
    --soft: #2B2753;
    --ink: #F1EFFF;
    --muted: #B9B5DA;
    --line: #3A3566;
    color-scheme: dark;
  }
}

.mq-contrast {
  --bg: #FFFFFF; --surface: #FFFFFF; --soft: #F0F0F0; --ink: #000000; --muted: #1A1A1A; --line: #000000;
  --grape: #3A2BB8; --coral: #A8300F; --teal: #055C4C; --sky: #0F5AA0;
}
.mq-large { font-size: 118%; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh;
  background:
    radial-gradient(circle at 105% -5%, rgba(255, 95, 162, 0.16) 0 9rem, transparent 9.1rem),
    radial-gradient(circle at -10% 30%, rgba(255, 194, 61, 0.18) 0 7rem, transparent 7.1rem),
    var(--bg);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--body); font-size: 1rem; line-height: 1.6;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.15; margin: 0 0 0.5rem; }
h1 { font-size: 1.9rem; }
h2 { font-size: 1.3rem; margin-top: 1.5rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1rem; }
h1:focus { outline: none; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

/* Header + seeds display */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 0.6rem;
  max-width: 36rem; margin: 0 auto; padding: 0.7rem 1rem;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
@supports not (background: color-mix(in srgb, red 50%, blue)) { .top { background: var(--bg); } }
.brand {
  display: flex; align-items: center; gap: 0.4rem; margin-right: auto;
  background: none; border: 0; padding: 0.2rem 0; cursor: pointer;
  color: var(--grape); font: 700 1.25rem/1 var(--display);
}
.brand svg { width: 1.7rem; height: 1.7rem; }
.hud {
  display: flex; align-items: center; gap: 0.35rem;
  background: var(--surface); border-radius: 999px; padding: 0.2rem 0.75rem 0.2rem 0.25rem;
  box-shadow: 0 2px 0 var(--line);
}
.hud-ring { width: 2rem; height: 2rem; transform: rotate(-90deg); }
.hud-ring text { transform: rotate(90deg); transform-origin: 18px 18px; font: 700 13px var(--display); fill: var(--ink); }
.hud-track { fill: none; stroke: var(--soft); stroke-width: 4; }
.hud-fill { fill: none; stroke: var(--leaf); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 94.25; stroke-dashoffset: 94.25; transition: stroke-dashoffset 0.6s ease; }
.hud-seeds { font-weight: 700; font-size: 0.95rem; white-space: nowrap; }
.hud.pop { animation: pop 0.5s ease; }
.support-btn {
  background: var(--sun); color: #1E1B3A; border: 0; border-radius: 999px;
  padding: 0.5rem 0.95rem; min-height: 2.6rem; box-shadow: 0 3px 0 var(--sun-dark);
  font: 700 0.92rem/1.2 var(--body); cursor: pointer;
}
@media (max-width: 400px) { .brand span { display: none; } }

main { max-width: 36rem; margin: 0 auto; padding: 0.5rem 1rem 2rem; }
.loading { color: var(--muted); padding: 3rem 0; text-align: center; }
.lede { font-size: 1.06rem; color: var(--muted); }
.note { font-size: 0.9rem; color: var(--muted); }

/* Game buttons: chunky, with a pressable bottom edge */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  width: 100%; min-height: 3.4rem; padding: 0.75rem 1.25rem;
  border: 0; border-radius: 1.1rem;
  font: 700 1.08rem/1.25 var(--body); text-align: center; text-decoration: none; cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
.btn.primary { background: var(--grape); color: var(--on-color); box-shadow: 0 5px 0 var(--grape-dark); }
.btn.jcolor { background: var(--j); color: var(--on-color); box-shadow: 0 5px 0 var(--j-dark); }
.btn.ghost { background: var(--surface); color: var(--ink); box-shadow: 0 4px 0 var(--line), inset 0 0 0 2px var(--line); }
.btn.call { background: var(--sun); color: #1E1B3A; box-shadow: 0 5px 0 var(--sun-dark); }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--grape-dark); }
.btn.ghost:active { box-shadow: 0 1px 0 var(--line), inset 0 0 0 2px var(--line); }
.btn.call:active { box-shadow: 0 2px 0 var(--sun-dark); }
.stack { display: grid; gap: 0.85rem; margin: 1.25rem 0; }
.link {
  background: none; border: 0; padding: 0.6rem 0; cursor: pointer;
  color: var(--grape); font: 700 1rem/1.4 var(--body);
  text-decoration: underline; text-underline-offset: 0.2em;
}
@media (prefers-color-scheme: dark) { :root:not(.mq-contrast) .link, :root:not(.mq-contrast) .brand { color: #A99FFF; } }

/* Mascot and speech bubbles */
.mascot { display: block; flex: none; overflow: visible; }
.mascot.bob { animation: bob 3.2s ease-in-out infinite; }
.say { display: flex; align-items: flex-end; gap: 0.6rem; margin: 0.5rem 0 1rem; }
.say .mascot { width: 4.5rem; height: 4.5rem; }
.bubble {
  position: relative; flex: 1;
  background: var(--surface); color: var(--ink);
  border-radius: 1.2rem 1.2rem 1.2rem 0.3rem;
  padding: 0.75rem 1rem; font-weight: 600;
  box-shadow: 0 3px 0 var(--line);
}
.bubble p:last-child { margin-bottom: 0; }

/* Welcome */
.hero {
  position: relative; display: grid; place-items: center;
  height: 13.5rem; margin: 0.25rem 0 0.5rem; border-radius: 2rem; overflow: hidden;
  background: linear-gradient(160deg, #6E5CF0, #9B6CF4 55%, #FF7DB4);
}
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; }
.hero::before { width: 9rem; height: 9rem; left: -2.5rem; bottom: -3rem; background: rgba(255, 194, 61, 0.55); }
.hero::after { width: 6rem; height: 6rem; right: -1rem; top: -1.5rem; background: rgba(61, 190, 107, 0.55); }
.hero .mascot { position: relative; z-index: 1; width: 9.5rem; height: 9.5rem; }
.hero .spark { position: absolute; z-index: 1; font-size: 1.4rem; }
.hero .s1 { top: 1.2rem; left: 1.4rem; } .hero .s2 { top: 2.2rem; right: 2.2rem; } .hero .s3 { bottom: 1.4rem; right: 1.5rem; }
.display { font-size: clamp(2.2rem, 9.5vw, 3rem); line-height: 1.04; letter-spacing: -0.01em; margin: 0.75rem 0 0.5rem; }
.field { margin: 1.4rem 0; }
.label { font-weight: 700; margin-bottom: 0.5rem; }
.pills { display: flex; flex-wrap: wrap; gap: 0.55rem; }
.pill {
  min-height: 2.8rem; padding: 0.4rem 1.15rem; border: 0; border-radius: 999px;
  background: var(--surface); color: var(--ink); box-shadow: 0 3px 0 var(--line), inset 0 0 0 2px var(--line);
  font: 700 1.05rem/1.2 var(--body); cursor: pointer;
}
.pill[aria-pressed="true"] { background: var(--teal); color: #fff; box-shadow: 0 3px 0 var(--teal-dark); }
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.mode {
  display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 0.6rem;
  padding: 0.8rem 0.9rem; min-height: 4.4rem; text-align: left;
  border: 0; border-radius: 1.1rem; background: var(--surface); color: var(--ink);
  box-shadow: 0 4px 0 var(--line), inset 0 0 0 2px var(--line);
  font: 1rem/1.3 var(--body); cursor: pointer;
}
.mode .m-ico { grid-row: span 2; font-size: 1.6rem; }
.mode strong { font-weight: 700; }
.mode span { color: var(--muted); font-size: 0.9rem; }
.mode[aria-pressed="true"] { background: #FFF4D6; color: #1E1B3A; box-shadow: 0 4px 0 var(--sun-dark), inset 0 0 0 3px var(--sun); }
.mode[aria-pressed="true"] span { color: #59567A; }
.settings { margin: 1rem 0 1.5rem; }
.settings summary { cursor: pointer; font-weight: 700; padding: 0.5rem 0; color: var(--grape); }
.check { display: flex; align-items: center; gap: 0.75rem; min-height: 2.75rem; cursor: pointer; }
.check input { width: 1.35rem; height: 1.35rem; accent-color: var(--grape); }

/* Quest tiles (journeys, exercises) */
.tiles { list-style: none; padding: 0; margin: 1rem 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem; }
.tiles li:first-child.wide, .tiles li.wide { grid-column: 1 / -1; }
.tile {
  position: relative; overflow: hidden; width: 100%; height: 100%; min-height: 11rem;
  display: flex; flex-direction: column; align-items: flex-start; gap: 0.35rem;
  padding: 1rem; text-align: left; border: 0; border-radius: 1.5rem;
  background: var(--j); color: var(--on-color); box-shadow: 0 6px 0 var(--j-dark);
  font: inherit; cursor: pointer; transition: transform 0.08s ease, box-shadow 0.08s ease;
}
.tile:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--j-dark); }
.tile::after {
  content: ""; position: absolute; right: -2.5rem; bottom: -2.5rem;
  width: 8rem; height: 8rem; border-radius: 50%; background: rgba(255, 255, 255, 0.14);
}
.tile .art { position: absolute; right: 0.6rem; top: 0.6rem; width: 4.2rem; height: 4.2rem; }
.wide .tile { min-height: 9.5rem; padding-right: 6rem; }
.wide .tile .art { width: 5.4rem; height: 5.4rem; top: 50%; transform: translateY(-50%); right: 0.9rem; }
.tile .chip {
  background: rgba(255, 255, 255, 0.92); color: #1E1B3A;
  border-radius: 999px; padding: 0.1rem 0.6rem; font-size: 0.82rem; font-weight: 700;
}
.tile .t-title { font: 700 1.25rem/1.15 var(--display); margin-top: 0.15rem; max-width: 12rem; }
.tile .t-blurb { font-size: 0.9rem; opacity: 0.95; line-height: 1.35; position: relative; z-index: 1; }
.tile .pips { display: flex; gap: 0.25rem; margin-top: auto; padding-top: 0.4rem; position: relative; z-index: 1; }
.pip { width: 0.85rem; height: 0.85rem; border-radius: 0.55rem 0.1rem 0.55rem 0.1rem; background: rgba(255, 255, 255, 0.35); }
.pip.on { background: #FFFFFF; }
.tile.sun { --j: var(--sun); --j-dark: var(--sun-dark); color: #1E1B3A; }
.tile.sun .pip { background: rgba(30, 27, 58, 0.2); }

/* Story player */
.band {
  background: var(--j); color: #fff; border-radius: 1.5rem; padding: 0.9rem 1rem 1rem;
  box-shadow: 0 5px 0 var(--j-dark); margin-bottom: 1rem;
}
.band-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; font-weight: 700; font-size: 0.92rem; }
.band .link { color: #fff; padding: 0; font-size: 0.92rem; }
.bar { height: 0.7rem; border-radius: 999px; background: rgba(255, 255, 255, 0.3); margin-top: 0.55rem; overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 999px; background: var(--sun); transition: width 0.5s ease; }
.story { background: var(--surface); border-radius: 1.5rem; padding: 1.1rem 1.1rem 0.25rem; box-shadow: 0 4px 0 var(--line); }
.story-head { display: flex; gap: 0.75rem; align-items: center; margin-bottom: 0.5rem; }
.story-head .mascot { width: 3.5rem; height: 3.5rem; }
.story-head h1 { margin: 0; font-size: 1.6rem; }
.story p { font-size: 1.1rem; }
.section-title { font: 700 1.15rem/1.2 var(--display); margin: 1.4rem 0 0.6rem; }

.feelings { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.feel {
  display: inline-flex; align-items: center; gap: 0.35rem;
  min-height: 2.6rem; padding: 0.3rem 0.85rem 0.3rem 0.6rem; border: 0; border-radius: 999px;
  background: var(--surface); color: var(--ink); box-shadow: 0 3px 0 var(--line), inset 0 0 0 2px var(--line);
  font: 600 0.98rem/1.2 var(--body); cursor: pointer;
}
.feel .e { font-size: 1.25rem; }
.feel[aria-pressed="true"] { background: #FFE3EF; color: #1E1B3A; box-shadow: 0 3px 0 #E0478A, inset 0 0 0 2px var(--pink); }
.feel-ok { margin-top: 0.75rem; color: var(--teal); font-weight: 700; }
@media (prefers-color-scheme: dark) { :root:not(.mq-contrast) .feel-ok { color: #5FE0C4; } }

.choices { display: grid; gap: 0.75rem; }
.choice {
  display: flex; align-items: flex-start; gap: 0.75rem; width: 100%; text-align: left;
  padding: 0.85rem 1rem; min-height: 3.6rem; border: 0; border-radius: 1.2rem;
  background: var(--surface); color: var(--ink); box-shadow: 0 4px 0 var(--line), inset 0 0 0 2px var(--line);
  font: 600 1.02rem/1.4 var(--body); cursor: pointer; transition: transform 0.08s ease;
}
.choice:active { transform: translateY(3px); }
.choice .n {
  flex: none; display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 0.7rem;
  color: #fff; font: 700 1.05rem/1 var(--display); background: var(--c, var(--grape)); box-shadow: 0 3px 0 rgba(0,0,0,0.2);
}
.choice:nth-child(3n+1) { --c: var(--grape); }
.choice:nth-child(3n+2) { --c: var(--coral); }
.choice:nth-child(3n+3) { --c: var(--teal); }
.choice .tick { margin-left: auto; flex: none; opacity: 0; color: var(--leaf); font-weight: 700; }
.choice.tried .tick { opacity: 1; }
.choice[aria-pressed="true"] { box-shadow: 0 4px 0 var(--c), inset 0 0 0 3px var(--c); }

.feedback:empty { display: none; }
.feedback { margin-top: 1.25rem; scroll-margin-top: 5rem; }
.feedback .bubble { font-weight: 400; }
.fb-choice { font-weight: 700; }
.reward {
  display: inline-flex; align-items: center; gap: 0.35rem; margin-top: 0.25rem;
  background: #E3F7EA; color: #1B6B3B; border-radius: 999px; padding: 0.2rem 0.75rem; font-weight: 700; font-size: 0.92rem;
}
.foot-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1.5rem; margin-top: 1rem; }
.warn { background: var(--surface); border-radius: 1.5rem; padding: 1.25rem; box-shadow: 0 4px 0 var(--line); }

/* Celebration banner */
.celebrate {
  display: flex; gap: 0.75rem; align-items: center;
  background: linear-gradient(135deg, var(--sun), #FF9F5A); color: #1E1B3A;
  border-radius: 1.5rem; padding: 0.9rem 1rem; margin-bottom: 1.25rem; box-shadow: 0 5px 0 var(--sun-dark);
}
.celebrate .mascot { width: 4.2rem; height: 4.2rem; }
.celebrate strong { font: 700 1.3rem/1.15 var(--display); display: block; }
.celebrate p { margin: 0.15rem 0 0; font-size: 0.95rem; }

/* Breathing */
.breath { position: relative; display: grid; place-items: center; height: 18rem; margin: 0.25rem 0; }
.ring { position: absolute; width: 15rem; height: 15rem; border-radius: 50%; border: 3px dashed var(--line); }
.bloom {
  display: grid; place-items: center; width: 15rem; height: 15rem; border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, #FFE08A 0%, var(--sun) 40%, #FF8FB1 100%);
  box-shadow: 0 0 0 1rem rgba(255, 194, 61, 0.18), 0 0 0 2rem rgba(255, 95, 162, 0.08);
  transform: scale(0.45); will-change: transform;
}
.bloom .mascot { width: 7rem; height: 7rem; }
.phase { text-align: center; font: 700 1.7rem/1.3 var(--display); color: var(--grape); margin: 0; min-height: 2.2rem; }
@media (prefers-color-scheme: dark) { :root:not(.mq-contrast) .phase { color: #B7ADFF; } }
.time { text-align: center; color: var(--muted); font-weight: 600; }

/* Grounding */
.ground-step {
  display: flex; gap: 1.1rem; align-items: center;
  background: var(--surface); border-radius: 1.5rem; padding: 1.1rem; margin: 1rem 0; box-shadow: 0 4px 0 var(--line);
}
.big-num {
  flex: none; display: grid; place-items: center; width: 5rem; height: 5rem; border-radius: 1.4rem;
  font: 700 3rem/1 var(--display); color: #fff; background: var(--c); box-shadow: 0 5px 0 rgba(0,0,0,0.22);
}
.ground-step p { margin: 0; font-size: 1.2rem; font-weight: 600; }
.steps-pips { display: flex; gap: 0.4rem; justify-content: center; }
.steps-pips span { width: 2.2rem; height: 0.5rem; border-radius: 999px; background: var(--line); }
.steps-pips span.on { background: var(--c, var(--grape)); }

/* Garden + progress */
.level-card {
  display: flex; gap: 0.85rem; align-items: center;
  background: linear-gradient(135deg, var(--grape), #8A63F0); color: #fff;
  border-radius: 1.5rem; padding: 1rem; box-shadow: 0 5px 0 var(--grape-dark); margin: 0.75rem 0 1rem;
}
.level-card .mascot { width: 4.5rem; height: 4.5rem; }
.level-card .lv { font: 700 1.35rem/1.1 var(--display); }
.level-card .bar { background: rgba(255,255,255,0.28); }
.level-card .sub { font-size: 0.9rem; margin: 0.4rem 0 0; opacity: 0.95; }
.level-card .grow-flex { flex: 1; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; margin: 1rem 0; }
.stats div { background: var(--surface); border-radius: 1.1rem; padding: 0.7rem; text-align: center; box-shadow: 0 3px 0 var(--line); }
.stats b { display: block; font: 700 1.6rem/1.1 var(--display); color: var(--grape); }
@media (prefers-color-scheme: dark) { :root:not(.mq-contrast) .stats b { color: #B7ADFF; } }
.stats span { font-size: 0.85rem; color: var(--muted); }
.garden-svg { display: block; width: 100%; height: auto; }
.garden-box {
  position: relative; border-radius: 1.5rem; padding: 2.5rem 0.5rem 0; margin: 0.5rem 0;
  background: linear-gradient(#BFE6FF, #E9F7FF 70%, #F4FFF6); box-shadow: 0 4px 0 var(--line); overflow: hidden;
}
.garden-box::before { content: ""; position: absolute; right: 1.25rem; top: 0.9rem; width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--sun); box-shadow: 0 0 0 0.5rem rgba(255, 194, 61, 0.3); }
.garden-box::after { content: ""; position: absolute; left: 1.5rem; top: 1.3rem; width: 4.5rem; height: 1.2rem; border-radius: 999px; background: #fff; box-shadow: 1.5rem -0.5rem 0 -0.1rem #fff; }
.empty { background: var(--surface); border-radius: 1.5rem; padding: 1.5rem; text-align: center; color: var(--muted); box-shadow: 0 4px 0 var(--line); }
.badges { list-style: none; padding: 0; margin: 0.75rem 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: 0.7rem; }
.badges li {
  display: grid; justify-items: center; text-align: center; gap: 0.2rem;
  background: var(--surface); border-radius: 1.2rem; padding: 0.85rem 0.6rem; box-shadow: 0 3px 0 var(--line);
}
.medal {
  display: grid; place-items: center; width: 3.4rem; height: 3.4rem; border-radius: 50%;
  font-size: 1.6rem; background: var(--c); box-shadow: 0 4px 0 rgba(0,0,0,0.18), inset 0 0 0 4px rgba(255,255,255,0.45);
}
.badges strong { font-size: 0.95rem; line-height: 1.25; }
.badges small { font-size: 0.82rem; color: var(--muted); line-height: 1.3; }
.badges li.locked .medal { background: var(--soft); filter: grayscale(1); opacity: 0.55; }
.badges li.locked strong { color: var(--muted); }
.fact {
  display: flex; gap: 0.75rem; align-items: flex-start;
  background: #FFF4D6; color: #1E1B3A; border-radius: 1.5rem; padding: 1rem 1.1rem; margin: 1.5rem 0; box-shadow: 0 4px 0 #F1D48A;
}
.fact .bulb { font-size: 1.8rem; line-height: 1; }
.fact h2 { margin: 0 0 0.25rem; font-size: 1.1rem; }
.fact p { margin: 0; }

/* Next step tiles */
.step-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; }
.step {
  display: grid; gap: 0.35rem; align-content: start; text-align: left; min-height: 7rem;
  padding: 0.85rem; border: 0; border-radius: 1.3rem;
  background: var(--surface); color: var(--ink); box-shadow: 0 4px 0 var(--line), inset 0 0 0 2px var(--line);
  font: 600 0.98rem/1.35 var(--body); cursor: pointer;
}
.step .s-ico { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 0.9rem; font-size: 1.4rem; background: var(--c); }
.step[aria-pressed="true"] { box-shadow: 0 4px 0 var(--grape-dark), inset 0 0 0 3px var(--grape); background: var(--soft); }
.card-area:empty { display: none; }
.card-area { margin: 1.25rem 0; display: grid; gap: 0.75rem; }
.card-img { width: 100%; max-width: 22rem; justify-self: center; border-radius: 1.25rem; box-shadow: 0 6px 0 var(--line); }

/* Support */
.support h2 { margin-top: 0.5rem; }
.sup-block { background: var(--surface); border-radius: 1.2rem; padding: 1rem 1.1rem 0.1rem; margin: 0.85rem 0; box-shadow: 0 3px 0 var(--line); }
.sup-block .stack { margin: 0.75rem 0 1rem; }
.sup-block > .btn { margin-bottom: 1rem; }
.urgent { box-shadow: 0 3px 0 var(--line), inset 5px 0 0 var(--pink); }
main > .support { margin: 1.5rem 0; }
.kiosk { text-align: center; margin-top: 1.5rem; }
dialog#support {
  width: calc(100% - 1.5rem); max-width: 32rem; max-height: calc(100vh - 2rem);
  border: 0; border-radius: 1.5rem; padding: 0.75rem 1.1rem 1rem;
  background: var(--bg); color: var(--ink); overflow: auto;
}
dialog#support::backdrop { background: rgba(20, 18, 43, 0.65); }
.dlg-head { display: flex; justify-content: flex-end; }

/* Garden strip, toast, confetti */
.strip { max-width: 36rem; margin: 0 auto; padding: 0 1rem 1rem; }
.strip[hidden] { display: none; }
.toast {
  position: fixed; left: 50%; top: 4.6rem; z-index: 40;
  transform: translate(-50%, -1rem); opacity: 0; pointer-events: none;
  background: var(--leaf); color: #fff; border-radius: 999px; padding: 0.45rem 1.1rem;
  font: 700 1.05rem/1.2 var(--display); box-shadow: 0 4px 0 #1E7440;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 30; overflow: hidden; }
.confetti i {
  position: absolute; top: -1rem; width: 0.6rem; height: 0.9rem; border-radius: 0.15rem;
  animation: fall var(--d, 1.6s) cubic-bezier(.25,.6,.5,1) forwards;
}

.grow { transform-box: fill-box; transform-origin: 50% 100%; animation: grow 0.9s cubic-bezier(.2,.8,.3,1.2) both; }
@keyframes grow { from { transform: scale(0.1, 0); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.15); } 100% { transform: scale(1); } }
@keyframes fall { to { transform: translate(var(--x, 0), 105vh) rotate(var(--r, 540deg)); } }

.mq-still *, .mq-still *::before, .mq-still *::after { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media (max-width: 360px) {
  .modes, .step-grid { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: 1fr; }
  .top { padding-inline: 0.7rem; gap: 0.4rem; }
  main { padding-inline: 0.75rem; }
}

.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.bubble.up { border-radius: 1.2rem; margin: -0.4rem 0 0.25rem; }
.bubble.up::before {
  content: ""; position: absolute; left: 50%; top: -0.6rem; transform: translateX(-50%);
  border: 0.65rem solid transparent; border-top: 0; border-bottom-color: var(--surface);
}
.level-medal {
  flex: none; display: grid; place-items: center; width: 4rem; height: 4rem; border-radius: 50%;
  background: var(--sun); color: #1E1B3A; font: 700 1.9rem/1 var(--display);
  box-shadow: 0 4px 0 var(--sun-dark), inset 0 0 0 4px rgba(255,255,255,0.5);
}

/* Half-width tiles: icon sits bottom-right so it never covers the title */
.tiles li:not(.wide) .tile { padding-bottom: 4.6rem; }
.tiles li:not(.wide) .tile .art { top: auto; bottom: 0.75rem; right: 0.75rem; width: 3.4rem; height: 3.4rem; }
.tiles li:not(.wide) .tile .pips { position: absolute; left: 1rem; bottom: 1.2rem; margin: 0; padding: 0; }
.tiles li:not(.wide) .tile .t-title { max-width: none; }

/* Reward toast sits at the bottom, clear of headings */
.toast { top: auto; bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 1rem); }
.toast.show { transform: translate(-50%, 0); }

/* Calm music toggle on the 60-second reset */
.music { text-align: center; margin: 0.25rem 0 0.5rem; }
.music .note { margin: 0.4rem 0 0; font-size: 0.85rem; }
.music-btn {
  display: inline-flex; align-items: center; gap: 0.45rem; min-height: 2.75rem; padding: 0.4rem 1.1rem;
  border: 0; border-radius: 999px; cursor: pointer; font: 700 1rem/1.2 var(--body);
  background: var(--surface); color: var(--ink); box-shadow: 0 3px 0 var(--line), inset 0 0 0 2px var(--line);
}
.music-btn[aria-pressed="true"] { background: var(--teal); color: #fff; box-shadow: 0 3px 0 var(--teal-dark); }
.music-btn .m-on, .music-btn[aria-pressed="true"] .m-off { display: none; }
.music-btn[aria-pressed="true"] .m-on { display: inline; }
