:root {
  --bg: #f6f7f9;
  --card: #ffffff;
  --text: #1c2230;
  --muted: #667085;
  --line: #dde1e8;
  --accent: #2f7d4f;
  --accent-text: #ffffff;
  --locked: #c4c9d2;
  --wrong: #c2492c;
  --right-bg: #e9f6ee;
  --wrong-bg: #fdeeea;
  --streak: #94600F;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151a22;
    --card: #1f2631;
    --text: #e8ebf0;
    --muted: #98a2b3;
    --line: #313a48;
    --accent: #4caf73;
    --accent-text: #0d1a12;
    --locked: #4a5262;
    --wrong: #ff8a6b;
    --right-bg: #16301f;
    --wrong-bg: #3a1d17;
    --streak: #B9741A;
    --butterfly-body: #E6DFD2; /* the butterfly kit's body and antennae */
  }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.4 system-ui, sans-serif;
}
#app { position: relative; max-width: 520px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; }
button { font: inherit; color: inherit; cursor: pointer; }
/* One focus ring for every control, in the text colour so it reads on both themes. */
:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; }
/* Headings take focus when a screen opens, for screen readers; they aren't controls. */
[tabindex="-1"]:focus { outline: none; }
/* Fixed footers cover the bottom of the page: keep a focused control clear of them. */
html { scroll-padding-bottom: calc(160px * var(--text-scale, 1)); }

.bar {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; padding-top: max(12px, env(safe-area-inset-top));
}
.bar h1 { font-size: 1.3rem; margin: 0; flex: 1; }
.close, .sound, .menu, .back { background: none; border: 0; font-size: 1.3rem; padding: 4px 8px; }
.close { position: relative; }
.close::after { content: ''; position: absolute; inset: -5px; } /* a 44px target at the same size */
.meter { flex: 1; height: 12px; border-radius: 6px; background: var(--line); overflow: hidden; }
.fill { height: 100%; width: 0; background: var(--accent); transition: width .3s; }

.home { padding: 0 16px calc(120px * var(--text-scale, 1)); }
.street h2 {
  margin: 28px auto 12px; width: fit-content; padding: 6px 16px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line); font-size: 1rem;
}
.trailhead { position: relative; width: 320px; margin: 0 auto; }
.trail { position: absolute; top: 0; left: 0; }
.trail path { fill: none; stroke-width: 12; stroke-linecap: round; }
.trail .ahead { stroke: var(--line); }
.trail .walked { stroke: var(--accent); opacity: .55; }
.path { position: relative; list-style: none; margin: 0; padding: 0; }
.path li { position: relative; width: fit-content; margin-inline: auto; height: calc(112px * var(--text-scale, 1)); display: flex; flex-direction: column; align-items: center; transform: translateX(var(--x)); }
/* Quest markers: a raised round button, "!" until done, then a tick. */
.node {
  /* Grows with the phone's font size (--text-scale, app.js), so its mark stays inside it. The WebView's text zoom
     already scales a px line-height, so that one stays as it is. */
  width: calc(64px * var(--text-scale, 1)); height: calc(64px * var(--text-scale, 1)); flex: none; border-radius: 50%; border: 0; padding: 0;
  font-size: 32px; font-weight: 900; line-height: 64px;
  background: var(--card); color: #B9741A; box-shadow: inset 0 0 0 4px #F5A524, 0 5px 0 #C77B2F;
}
.node.done { background: var(--accent); color: var(--accent-text); box-shadow: 0 5px 0 #1f5a37; }
.node.here { background: #F5A524; color: #1E1B2E; box-shadow: 0 5px 0 #B9741A; animation: beckon 1.8s ease-in-out infinite; }
.node.locked { background: var(--line); color: var(--locked); box-shadow: 0 5px 0 var(--locked); cursor: default; }
.node:active:not(:disabled) { transform: translateY(4px); box-shadow: none; }
@keyframes beckon { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-5px) scale(1.05); } } /* the next node gently bobs */
@media (prefers-reduced-motion: reduce) { .node.here { animation: none; } }
.path .label { margin-top: 10px; max-width: calc(120px * var(--text-scale, 1)); /* as wide as its text is big: the same lines, so the row holds it */ padding: 1px 6px; border-radius: 6px; background: var(--bg); font-size: .8rem; color: var(--muted); text-align: center; }
.path li:has(.here) .label { color: var(--text); font-weight: 700; }
.guide { position: absolute; top: -6px; width: 72px; }
.guide.left { right: 50%; margin-right: calc(32px * var(--text-scale, 1) + 8px); } /* half a node, and 8px */
.guide.right { left: 50%; margin-left: calc(32px * var(--text-scale, 1) + 8px); }
.guide svg { display: block; width: 100%; transform-origin: 50% 100%; }
.due {
  display: block; margin: 0 auto 8px; padding: 6px 12px; border-radius: 999px; font-size: .85rem; font-weight: 600;
  background: var(--card); border: 2px solid var(--accent); color: var(--text);
}
.streak-bright { color: var(--streak); }
.streak-ember { opacity: .75; }
.cta {
  position: fixed; left: 0; right: 0; bottom: 0; max-width: 520px; margin: 0 auto;
  padding: 24px 16px max(12px, env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--bg) 40%);
}
.cta .next { margin: 0; }

.next {
  display: block; width: 100%; padding: 14px; margin: 12px 0;
  border: 0; border-radius: 12px; background: var(--accent); color: var(--accent-text); font-weight: 700;
}

.play { padding: 0 16px calc(220px * var(--text-scale, 1)); display: flex; flex-direction: column; }
.topic { font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 4px 0 8px; }
.coach { display: flex; align-items: flex-end; gap: 10px; margin-bottom: 12px; }
.who { flex: none; width: 64px; padding: 0; border: 0; background: none; }
/* A coach the learner copies (Move): drawn large, with its line underneath. */
.coach.demonstrates { flex-direction: column; align-items: center; }
.coach.demonstrates .who { width: min(150px, 40vw); }
.coach.demonstrates .bubble { align-self: stretch; min-height: 0; }
.coach.demonstrates .bubble::before { left: calc(50% - 7px); top: -9px; bottom: auto; border-width: 2px 0 0 2px; }
.who svg, .hero svg { display: block; width: 100%; transform-origin: 50% 100%; }
/* Reserved height: a longer line must never push the board down. */
.bubble {
  flex: 1; position: relative; margin: 0 0 18px; padding: 10px 12px; min-height: 4.4em;
  background: var(--card); border: 2px solid var(--line); border-radius: 14px;
}
.bubble::before {
  content: ''; position: absolute; left: -9px; bottom: 12px; width: 14px; height: 14px;
  background: var(--card); border: 2px solid var(--line); border-width: 0 0 2px 2px; transform: rotate(45deg);
}
.board { width: 100%; aspect-ratio: 1; }
/* Answer buttons sit in the thumb zone, exactly where Continue will appear: no reaching. */
.choices {
  position: fixed; left: 0; right: 0; bottom: 0; max-width: 520px; margin: 0 auto; display: flex; gap: 8px;
  padding: 16px; padding-bottom: max(16px, env(safe-area-inset-bottom)); background: var(--bg);
}
.choices:empty { display: none; }
.choice {
  flex: 1; padding: 12px 8px; line-height: 1.4; border-radius: 12px; border: 2px solid var(--line); background: var(--card);
  font-weight: 600;
}
.choice:disabled { cursor: default; }
.choice.right { border-color: var(--accent); background: var(--accent); color: var(--accent-text); opacity: 1; }
.choice.wrong { border-color: var(--wrong); color: var(--wrong); }
/* The answer banner rides over the bottom of the screen, so the board never moves. */
.foot {
  position: fixed; left: 0; right: 0; bottom: 0; max-width: 520px; margin: 0 auto;
  padding: 16px; padding-bottom: max(16px, env(safe-area-inset-bottom));
  background: var(--card); border-top: 2px solid var(--line);
  transform: translateY(110%); transition: transform .22s ease-out, visibility 0s .22s; visibility: hidden;
}
.foot.show { transform: none; visibility: visible; transition: transform .22s ease-out; }
.foot.right { background: var(--right-bg); border-color: var(--accent); }
.foot.wrong { background: var(--wrong-bg); border-color: var(--wrong); }
.foot.right strong { color: var(--accent); }
.foot.wrong strong { color: var(--wrong); }
.foot.plain .verdict { display: none; }
.verdict strong { display: block; font-size: 1.2rem; }
.verdict p { margin: 6px 0 0; }
.foot.wrong .next { background: var(--wrong); }
.foot .next { margin-bottom: 0; }
@media (prefers-reduced-motion: reduce) { .foot, .foot.show, .fill { transition: none; } }

.summary { padding: 32px 16px; text-align: center; }
.hero { width: 150px; margin: 0 auto 8px; }
.kicker { margin: 8px 0 0; font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); }
.summary h1 { margin: 2px 0 4px; }
.said { color: var(--muted); margin: 0 0 20px; }
/* ---- Feel: petal-and-leaf confetti (petals() in feel.js) ---- */
.petals { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 5; }
.petals i { position: absolute; top: -16px; width: 11px; height: 9px; border-radius: 60% 60% 50% 50% / 80% 80% 30% 30%; opacity: .9; }
.petals i.leaf { width: 9px; height: 14px; border-radius: 0 100% 0 100%; }

/* ---- Board skin: Wingbeat's board, pieces (assets/pieces/wingbeat.svg) and markers ---- */
:root {
  --sq-light: #E9F4EC; --sq-dark: #86C8A9; --sq-frame: #3A7F62; --sq-coord: #F4FBF6; --sq-ledge: #2C6650;
  --sq-hl: #F5C542; --sq-good: #155c34; --sq-bad: #a8361f;
}
@media (prefers-color-scheme: dark) {
  :root {
    --sq-light: #8496AC; --sq-dark: #5B6B80; --sq-frame: #2B3443; --sq-coord: #C9D3E0; --sq-ledge: #4E5D73;
    --sq-hl: #F5B83D; --sq-good: #5AD08A; --sq-bad: #d0583c;
  }
}
/* Rounded and raised on a solid ledge, like the quest markers. */
.board .cm-chessboard { display: block; border-radius: 14px; box-shadow: 0 5px 0 var(--sq-ledge); }
.cm-chessboard.wingbeat .board .square.white { fill: var(--sq-light); }
.cm-chessboard.wingbeat .board .square.black { fill: var(--sq-dark); }
.cm-chessboard.wingbeat .board .border { fill: var(--sq-frame); stroke: none; rx: 14px; }
.cm-chessboard.wingbeat .board .border-inner { fill: none; stroke: none; }
/* The frame's a-h and 1-8 are taught in the first lesson, so they must be easy to read. */
.cm-chessboard.wingbeat .coordinates { pointer-events: none; user-select: none; }
.cm-chessboard.wingbeat .coordinates .coordinate { fill: var(--sq-coord); font-size: 7px; font-weight: 800; }
/* Markers strong enough to read on a phone in sunlight, on both palettes. */
.cm-chessboard .markers .marker.marker-square { fill: var(--sq-hl); opacity: .55; }
.cm-chessboard .markers .marker.marker-circle { stroke: #3b6fd6; stroke-width: 4px; opacity: .85; }
.cm-chessboard .markers .marker.marker-frame,
.cm-chessboard .markers .marker.marker-frame-primary { stroke: var(--sq-good); stroke-width: 4px; opacity: 1; }
.cm-chessboard .markers .marker.marker-circle-danger { stroke: var(--sq-bad); stroke-width: 4px; opacity: .95; }
.cm-chessboard .markers .marker.marker-circle-primary { stroke: var(--sq-good); stroke-width: 4px; opacity: .95; }
/* The keyboard cursor: dark ink reads on every square of both palettes. */
.cm-chessboard .keyboard-focus-indicator .keyboard-focus { stroke: #101820; stroke-width: 4px; }
.cm-chessboard .keyboard-focus-indicator .keyboard-from-square { fill: rgba(16, 24, 32, .25); stroke: #101820; }
/* The extension draws the cursor on any focus, and the lesson focuses the board when a question
   starts. Show it only to keyboard players (:focus-visible), never after a tap. */
.cm-chessboard:not(:focus-visible) .keyboard-focus-indicator { display: none; }
.cm-chessboard:focus { outline: none; }
.cm-chessboard:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; }
/* ---- end board skin ---- */

.survey { padding: 32px 16px; text-align: center; }
.survey .hero { width: 130px; }
.survey .choice { display: block; width: 100%; margin: 10px 0; padding: 14px 16px; text-align: left; }
.survey .next { margin-top: 8px; }
.survey [data-first] { text-align: center; }

/* ---- Lesson juice: the warming meter and the end screen. Kept apart from the board rules. ---- */
:root {
  --heat-gold: #F5A524;
  --heat-ember: #F0772A;
  --chip-acc: #2f7d4f;
  --chip-time: #3b62c4;
  --chip-fire: #a8540a;
  --chip-ink: #ffffff;
}
@media (prefers-color-scheme: dark) {
  :root { --chip-acc: #4caf73; --chip-time: #86a2f0; --chip-fire: #f59a3c; --chip-ink: #10141b; }
}
.meter { position: relative; overflow: visible; }
.fill {
  position: relative; overflow: hidden; border-radius: inherit; width: var(--at, 0);
  transition: width .3s, background-color .4s, box-shadow .4s;
}
.meter[data-heat="1"] .fill { background: var(--heat-gold); }
.meter[data-heat="2"] .fill {
  background: linear-gradient(90deg, var(--heat-gold), var(--heat-ember));
  box-shadow: 0 0 10px 2px color-mix(in srgb, var(--heat-ember) 60%, transparent);
  animation: ember 1.4s ease-in-out infinite;
}
@keyframes ember { 50% { box-shadow: 0 0 16px 4px color-mix(in srgb, var(--heat-ember) 75%, transparent); } }
.shine {
  position: absolute; top: 0; bottom: 0; left: 0; width: 40%; transform: translateX(-100%);
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .7), transparent);
}
/* "3 in a row" rides just under the front of the fill, then fades. */
.flare {
  position: absolute; top: 16px; left: clamp(3em, var(--at, 0), calc(100% - 3em)); z-index: 2; opacity: 0; visibility: hidden;
  transform: translateX(-50%); padding: 2px 8px; border-radius: 999px; white-space: nowrap; pointer-events: none;
  font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
  background: var(--heat-gold); color: #1E1B2E;
}
.meter[data-heat="2"] .flare { background: var(--heat-ember); }

.summary { padding-bottom: calc(110px * var(--text-scale, 1)); }
.duo { position: relative; display: flex; justify-content: center; align-items: flex-end; gap: 4px; margin: 8px auto 4px; }
.duo .hero { margin: 0; }
.duo .rosa { width: 132px; }
.duo .lumi { width: 104px; }
.spark { position: absolute; left: 50%; top: 18%; margin-left: -12px; font-size: 28px; font-style: normal; color: var(--heat-gold); opacity: 0; pointer-events: none; }
.cheer {
  position: absolute; right: calc(50% - 128px); top: -6px; margin: 0; padding: 3px 10px; border-radius: 12px;
  background: var(--card); border: 2px solid var(--line); font-size: .85rem; font-weight: 700; white-space: nowrap;
}
.summary h1 { font-size: 1.45rem; line-height: 1.25; margin: 4px 0 8px; text-wrap: balance; }
.chips { display: flex; gap: 10px; margin: 0 0 12px; }
.chip { flex: 1; min-width: 0; border-radius: 14px; border: 2px solid var(--c); background: var(--c); overflow: hidden; }
.chip span { display: block; padding: 4px 2px; font-size: .7rem; font-weight: 800; letter-spacing: .05em; color: var(--chip-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip b { display: block; padding: 10px 4px; border-radius: 12px; background: var(--card); color: var(--c); font-size: 1.3rem; }
.chip.acc { --c: var(--chip-acc); }
.chip.time { --c: var(--chip-time); }
.chip.fire { --c: var(--chip-fire); }
.learned { margin: 0; font-size: .85rem; color: var(--muted); }
/* .fill's transition is redefined above, after the earlier reduced-motion rule, so it is repeated here. */
@media (prefers-reduced-motion: reduce) { .meter[data-heat="2"] .fill { animation: none; } .fill { transition: none; } }

/* ---- Habit chips and the habit view ---- */
.habit { padding: 0 16px 40px; }
.habit h1 { margin: 0 0 2px; font-size: 1.6rem; }
.habit .said { margin: 0; }
.habit h2 { margin: 28px 0 10px; font-size: 1.05rem; }
.week, .month { display: grid; grid-template-columns: repeat(7, 1fr); }
.week { list-style: none; margin: 0 0 8px; padding: 0; gap: 6px; text-align: center; font-size: .75rem; color: var(--muted); }
.week b {
  display: grid; place-items: center; aspect-ratio: 1; max-width: 44px; margin: 4px auto 0; border-radius: 50%;
  border: 2px solid var(--line); background: var(--card); color: var(--text); font-size: .9rem;
}
.week .on b { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
/* A rest day the streak forgave: a soft dashed ring, not a mark against the day. */
.week .rest b { border-style: dashed; border-color: var(--accent); }
.day h3 { margin: 16px 0 6px; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.day ul { list-style: none; margin: 0; padding: 0; }
.day li { margin-bottom: 6px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); }
.day .quiet { margin: 0; color: var(--muted); font-size: .9rem; }
.month { gap: 4px; max-width: 280px; margin-top: 10px; }
.month i { aspect-ratio: 1; border-radius: 4px; background: var(--line); }
.month i.on { background: var(--accent); }

/* ---- Home's habit switcher, and Calm's practice screens ---- */
:root { --calm: #5E8F5A; --calm-soft: #E3EFE0; --chip-calm: #4E8049; }
@media (prefers-color-scheme: dark) {
  :root { --calm: #8CC487; --calm-soft: #22331F; --chip-calm: #8CC487; }
}
.paths {
  display: flex; gap: 8px; margin: 4px -16px 0; padding: 2px 16px 4px;
  overflow-x: auto; scrollbar-width: none; position: relative; /* offsetLeft is measured from here */
  /* A swipe settles with a tab just clear of the fade, never cut at the screen edge or faded. */
  scroll-snap-type: x mandatory; scroll-padding-inline: 40px;
  /* An edge with more tabs past it fades out (app.js sets .more-start/.more-end on scroll), so a
     cut tab reads as "more this way"; an edge with nothing past it stays sharp. */
  --fade-start: 0px; --fade-end: 0px;
  mask-image: linear-gradient(to right, transparent, #000 var(--fade-start), #000 calc(100% - var(--fade-end)), transparent);
}
.paths.more-start { --fade-start: 36px; }
.paths.more-end { --fade-end: 36px; }
.path-tab { flex: none; scroll-snap-align: start; }
.paths::-webkit-scrollbar { display: none; }
/* A tab's streak, in a small pill so today's light reads on the pressed tab too. */
/* One pill on every tab, pressed or not. */
.path-tab b { display: inline-block; min-width: 1.6em; padding: 0 7px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font-size: .9em; }
.path-tab b.streak-bright { color: var(--streak); }
/* A quiet habit's number is hidden: a dot in today's light instead. */
.path-tab b:empty { min-width: 0; width: .55em; height: .55em; padding: 0; border: 0; background: currentColor; vertical-align: middle; }
/* On the pressed tab's green the dot keeps a ring of the page, as the number keeps its pill, so it shows in both themes. */
.path-tab[aria-pressed="true"] b:empty { box-shadow: 0 0 0 2px var(--bg); }
.streak-line, .link {
  display: block; margin: 10px auto 0; padding: 6px 12px; border: 0; border-radius: 999px; background: none;
  color: var(--muted); font-size: .9rem; text-decoration: underline; text-underline-offset: 3px;
}
.path-tab {
  padding: 8px 16px; border-radius: 999px; border: 2px solid var(--line); background: var(--card); font-weight: 600; white-space: nowrap;
}
.path-tab[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: var(--accent-text); }

.practice-teach p { margin: 0 0 12px; }
.help { padding: 10px 12px; border-radius: 12px; background: var(--card); border: 2px solid var(--line); font-size: .95rem; }
.help a { color: inherit; font-weight: 700; white-space: nowrap; }
.choices .next { margin: 0; }

.breath { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 8px; }
.orb {
  width: min(64vw, 240px); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 40% 35%, #E3EFE0, #6FA86A); transform: scale(.55);
}
/* Under reduced motion the orb stays still; the words and the count carry the breath. */
@media (prefers-reduced-motion: reduce) { .orb { transform: none; } .orb[data-phase="out"] { opacity: .7; } }
.count { font-size: 2.4rem; font-weight: 800; }
.orb .count { color: #10241a; }
.which { margin: 0; color: var(--muted); font-weight: 600; }
/* The butterfly hug: the side to tap lights up, one a second. */
.hug { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 8px; }
.sides { display: flex; gap: 12px; }
.sides span {
  width: min(36vw, 130px); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center;
  background: var(--card); border: 2px solid var(--line); font-weight: 700; color: var(--muted); transition: background .3s, color .3s;
}
.choice:is([data-pref], [data-remind])::after { content: ' · Off'; color: var(--muted); }
.choice:is([data-pref], [data-remind])[aria-pressed="true"] { border-color: var(--calm); }
.choice:is([data-pref], [data-remind])[aria-pressed="true"]::after { content: ' · On'; color: inherit; }
.sides span.on { background: #6FA86A; border-color: #6FA86A; color: #10241a; }

@property --fill { syntax: '<percentage>'; inherits: false; initial-value: 0%; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.steps.rising { flex-direction: column-reverse; }
.steps li {
  padding: 8px 12px; border-radius: 10px; border: 2px solid var(--line); color: var(--muted);
  background: linear-gradient(90deg, var(--calm-soft) var(--fill), var(--card) var(--fill));
}
.steps li.past { color: var(--text); border-color: var(--calm); }
.steps li.now { color: var(--text); font-weight: 700; border-color: var(--calm); --fill: 100%; }
.scan-left { text-align: center; color: var(--muted); margin: 10px 0 0; }

.ground { text-align: center; }
.ground h2 { margin: 0 0 4px; font-size: 1.3rem; }
.bubbles { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 24px; }
.bubble-tap { width: 60px; height: 60px; border-radius: 50%; border: 3px dashed var(--calm); background: var(--card); }
.bubble-tap[aria-pressed="true"] { border-style: solid; background: var(--calm); }

/* Smaller and higher than a lesson's, so two arrival lines and all three feelings sit above Continue at 412x786. */
.practice-end { padding-top: 12px; }
.practice-end .hero { width: 100px; }
.chip.calm { --c: var(--chip-calm); flex: 0 1 180px; margin: 0 auto; }

/* ---- Screen break: the step list in its own blue ---- */
:root { --break: #3E6E9C; --break-soft: #DDE8F3; --chip-break: #3A6895; }
@media (prefers-color-scheme: dark) {
  :root { --break: #8FB6DD; --break-soft: #1E2C3B; --chip-break: #8FB6DD; }
}
.scan.break { --calm: var(--break); --calm-soft: var(--break-soft); }
.chip.break { --c: var(--chip-break); flex: 0 1 180px; margin: 0 auto; }
/* Under a demonstrating coach the list is compact and the seconds sit in the current row. */
.scan.inline .steps { gap: 4px; }
.scan.inline .steps li { display: flex; padding: 5px 12px; }
.step-left { margin-left: auto; font-weight: 700; }
.step-left .count { font-size: inherit; }
.feel h2 { font-size: 1.05rem; margin: 16px 0 8px; }
.feels { display: flex; flex-direction: column; gap: 8px; }
.feel .said { margin: 8px 0; }
.feels .choice { flex: none; }

/* ---- Reflect: three lines, and the learner's own lines in the habit view ---- */
:root { --chip-reflect: #4F5F8A; }
@media (prefers-color-scheme: dark) {
  :root { --chip-reflect: #A3B3D9; }
}
.chip.reflect { --c: var(--chip-reflect); flex: 0 1 180px; margin: 0 auto; }
.reflect h2 { margin: 8px 0 12px; font-size: 1.3rem; }
.reflect textarea {
  display: block; width: 100%; padding: 14px 12px; font: inherit; color: var(--text); background: var(--card);
  border: 2px solid var(--line); border-radius: 12px; resize: none; line-height: 1.5;
  field-sizing: content; min-height: calc(1.5em + 32px); max-height: calc(6 * 1.5em + 32px); overflow-y: auto; /* then it scrolls */
}
.reflect textarea:focus { outline: none; border-color: var(--chip-reflect); }
.reflect textarea::placeholder { color: var(--muted); }
.reflect-tip { margin: 8px 2px 0; font-size: .85rem; color: var(--muted); }
.reflect .choices .choice { flex: 0 0 34%; }
.journal { margin-top: 6px; }
.day .journal li { background: none; }
.journal span { display: block; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }

/* ---- Move's practice screens ---- */
:root { --chip-move: #8A4A86; --move-soft: #F1E2F0; }
@media (prefers-color-scheme: dark) { :root { --chip-move: #E0A6DA; --move-soft: #33233A; } }
.chip.move { --c: var(--chip-move); flex: 0 1 180px; margin: 0 auto; }
.scan.move { --calm: var(--chip-move); --calm-soft: var(--move-soft); }

/* ---- The garden: a strip on home, the full view, and what arrived on an end screen ---- */
/* The strip on home shows its ground and plants, its sky cut off: the next lesson's node stays on the first screen. */
.garden-link { display: flex; align-items: flex-end; width: 100%; height: 84px; margin: 0 0 8px; padding: 0; border: 0; border-radius: 16px; overflow: hidden; background: none; }
.garden-link svg.garden-scene, .garden-view svg.garden-scene { display: block; width: 100%; height: auto; }
.garden-page { padding: 0 16px 40px; }
.garden-page h1 { margin: 0 0 12px; font-size: 1.6rem; }
.garden-view { border-radius: 16px; overflow: hidden; }
.garden-view svg.plant { cursor: pointer; }
.garden-link { position: relative; }
.event-tag { position: absolute; top: 6px; left: 8px; padding: 1px 8px; border-radius: 999px; background: var(--accent); color: var(--accent-text); font-size: .7rem; font-weight: 800; }
.event-card { display: block; margin-top: 16px; cursor: default; }
.event-card p { margin: 4px 0 10px; }
.plant-cards { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; }
.plant-card {
  display: block; width: 100%; text-align: left; padding: 12px 14px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--card);
}
.plant-card > span:not(.arrival) { display: block; }
.plant-card .kicker { margin: 0; font-size: .75rem; }
.plant-card b { display: block; font-size: 1.1rem; margin: 2px 0; }
.plant-card .hint { color: var(--muted); font-size: .9rem; }
.plant-card .arrival { margin-top: 6px; font-size: .9rem; }
.arrival { display: flex; align-items: center; gap: 8px; }
.arrival svg { height: 22px; width: auto; flex: none; }
.landmark-card .arrival svg { width: 38px; }
.arrivals { list-style: none; margin: 14px auto 0; padding: 0; display: grid; gap: 6px; justify-content: center; color: var(--muted); font-size: .95rem; }

/* ---- Self-reported habits: one tap a day, the "+ Habit" sheet and a habit of your own ---- */
:root { --chip-log: #2F6F8F; }
@media (prefers-color-scheme: dark) { :root { --chip-log: #8CC6E0; } }
.chip.log { --c: var(--chip-log); flex: 0 1 180px; margin: 0 auto; }
.log-habit { text-align: center; margin-top: 24px; }
.log-habit h2 { margin: 8px 0 4px; font-size: 1.4rem; overflow-wrap: anywhere; }
.log-habit .chips { margin-top: 12px; }
.link {
  display: block; margin: 10px auto 0; min-height: 44px; padding: 10px 14px; border: 0; background: none;
  color: var(--muted); font-size: .95rem; text-decoration: underline; text-underline-offset: 3px;
}
.look-back { max-width: 100%; margin-top: 4px; padding: 6px 14px; text-align: center; text-decoration: none; overflow-wrap: anywhere; }
.look-back q { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.add-tab { border-style: dashed; }
.add-habit .choice, .own-habit .choice { overflow-wrap: anywhere; }
/* Nine presets and any hidden habits, two to a row, so the sheet fits a small phone. */
.add-habit .offers { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0 8px; }
.add-habit .offers .choice { margin: 0; }
/* A habit's "when" (app.js whenView), under its name on the panel and in the habit view. */
.when { margin: 0 0 4px; color: var(--muted); overflow-wrap: anywhere; }
.habit .when { margin-top: 4px; }
.when-ask .choice { margin: 0; }
.when-ask .choice[aria-pressed="true"] { border-color: var(--accent); }
.own-habit form, .when-ask form { text-align: left; }
.field { display: block; margin: 16px 0; font-weight: 700; }
.field input {
  display: block; box-sizing: border-box; width: 100%; margin-top: 6px; padding: 12px 14px; border-radius: 12px;
  border: 2px solid var(--line); background: var(--card); color: var(--text); font: inherit; font-weight: 400;
}
.field input:focus { outline: none; border-color: var(--accent); }
.pick { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; padding: 0; border: 0; }
.pick legend { margin-bottom: 8px; padding: 0; font-weight: 700; }
.pick label { position: relative; }
.pick input { position: absolute; opacity: 0; }
.pick label > span {
  display: grid; place-items: center; min-width: 48px; min-height: 48px; border-radius: 12px;
  border: 2px solid var(--line); background: var(--card); font-size: 1.4rem;
}
.pick input:checked + span { border-color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }
.pick input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.pick-plant { display: grid; grid-template-columns: repeat(5, 1fr); }
.pick-plant label > span { min-width: 0; padding: 4px 0; font-size: .7rem; }
.pick-plant svg { width: 44px; height: 53px; }
.welcome { margin: 8px 0 0; text-align: center; }
.street:not(.street ~ .street) h2 { margin-top: 12px; }
.offer {
  display: flex; width: fit-content; max-width: 100%; align-items: center; margin: 8px auto 0; padding-left: 14px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--card);
}
.offer button { min-height: 40px; padding: 0; border: 0; background: none; color: var(--muted); font-size: .9rem; }
.offer .dismiss { width: 44px; min-height: 44px; margin: -2px 0; font-size: 1.2rem; } /* a 44px target in a 40px pill */
.survey .link { display: block; margin: 16px auto 0; }

/* The first-visit intro (app.js intro, want): a list of what Wingbeat does, then two branches of picks. */
.intro { padding-bottom: calc(150px * var(--text-scale, 1)); } /* room to scroll the last line above the button bar */
/* A solid bar, so a long list scrolls under it instead of showing through the fade. */
.intro + .cta { padding-top: 12px; background: var(--bg); border-top: 1px solid var(--line); }
.does { margin: 0; padding: 0; list-style: none; text-align: left; }
.does li { display: flex; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.does li:last-child { border: 0; }
.branch { margin: 0 0 12px 16px; text-align: left; }
.branch h2 { margin: 10px 0 0; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.intro .choice[aria-pressed] { position: relative; padding-right: 48px; }
.intro .choice[aria-pressed]::after {
  content: ''; position: absolute; right: 14px; top: calc(50% - 12px); width: 20px; height: 20px; border-radius: 6px;
  border: 2px solid var(--line); display: grid; place-items: center; font-size: .8rem; line-height: 1;
}
.intro .choice[aria-pressed="true"] { border-color: var(--accent); }
.intro .choice[aria-pressed="true"]::after { content: '✓' / ''; background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.branch .choice:disabled { color: var(--muted); border-style: dashed; }

/* Your timings (app.js timingsView): a − and + stepper per value, thumb-sized, the default beside it. */
.habit :is(.timings-link, .when-link) { margin: 8px 0 0; padding-left: 0; }
.steppers { margin: 20px 0; padding: 0; list-style: none; }
.steppers li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.steppers li > span { display: block; font-weight: 600; }
.stepper { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.stepper output { flex: 1; text-align: center; }
.stepper output small { display: block; color: var(--muted); font-size: .8rem; }
.steppers li.own output b { color: var(--accent); }
.step {
  flex: none; width: 56px; height: 48px; border-radius: 12px; border: 2px solid var(--line); background: var(--card);
  font-size: 1.4rem; font-weight: 700; line-height: 1;
}
.step:disabled { opacity: .4; cursor: default; }
.timings-reset { display: block; width: 100%; padding: 14px; }
.timings-reset:disabled { color: var(--muted); border-style: dashed; }

/* ---- Coding (src/coding/exercise.js): the grid Fennel walks, the block program, the tiles ---- */
:root { --grass: #E6F1DA; --grass-line: #D2E4C2; --rock: #858A96; --rock-shine: #B7BBC4; --code: #6A4FCF; --code-text: #ffffff; }
@media (prefers-color-scheme: dark) {
  :root { --grass: #22301F; --grass-line: #2D3E29; --rock: #7C8190; --rock-shine: #A9AEBA; --code: #B4A3F4; --code-text: #19122E; }
}
/* Reserved for the longest thing Fennel says while a plan runs: feedback must not move the grid. */
.play:has(.grid-world) .bubble { min-height: 6.5em; }
.grid-world {
  position: relative; display: grid; grid-template-columns: repeat(var(--w), 1fr);
  width: min(100%, calc(var(--w) * 52px), calc(var(--w) * 30vh / var(--h))); margin: 0 auto 10px; border-radius: 12px; overflow: hidden; background: var(--grass);
}
.grid-world .cell { position: relative; aspect-ratio: 1; display: grid; place-items: center; box-shadow: inset 0 0 0 1px var(--grass-line); }
.grid-world .cell > svg { width: 68%; }
.grid-world .cell.right { box-shadow: inset 0 0 0 4px var(--accent); }
.grid-world .cell.wrong { box-shadow: inset 0 0 0 4px var(--wrong); }
.grid-world .cell.target { background: color-mix(in srgb, var(--code) 22%, transparent); }
.grid-world .cell.target.trail, .grid-world .cell.trail { background: var(--code); }
.grid-world .cell.picked > svg { opacity: .25; }
.vars { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 12px; min-height: 1.5em; margin: 0 0 6px; font-size: .95rem; line-height: 1.5; }
.var i { font-style: normal; color: var(--muted); }
.var i::after { content: ' ='; }
.var b { font-variant-numeric: tabular-nums; }
.cell-pick { position: absolute; inset: 0; border: 0; background: none; cursor: pointer; }
.walker { position: absolute; left: 0; top: 0; width: calc(100% / var(--w)); aspect-ratio: 1; pointer-events: none; }
.walker svg { display: block; width: 100%; height: 100%; }
.program { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: 6px; }
.block {
  display: inline-grid; place-items: center; min-width: 44px; height: 44px; padding: 0 8px; border-radius: 10px;
  border: 2px solid var(--code); background: var(--code); color: var(--code-text); font: inherit; font-size: 1.3rem; font-weight: 800;
}
.block.hole { border-style: dashed; border-color: var(--muted); background: transparent; }
.block.hole.fill-next { border-color: var(--code); }
.drop-target, .block[data-hole].drop-target { border-style: solid; border-color: var(--code); background: color-mix(in srgb, var(--code) 35%, transparent); }
/* A block sits on one row when it fits: heads beside what they hold, so long programs stay above the tiles. */
.block.loop, .block.if, .block.stmt { display: flex; flex-wrap: wrap; align-items: center; column-gap: 8px; height: auto; padding: 4px 8px; background: var(--card); color: var(--text); font-size: 1rem; }
.block .head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 40px; font-weight: 700; }
.block .head .list { display: inline-flex; flex-wrap: wrap; gap: 3px; }
.block .head .list .block { min-width: 30px; height: 30px; padding: 0 4px; font-size: 1rem; border-radius: 7px; }
/* A value to tap stays compact in its line, but answers a thumb in up to 44px around it. */
.program button.block { position: relative; }
.program button.block::after { /* reachOf() in src/builder.js sets how far, short of any other tappable thing */
  content: ''; position: absolute; inset: calc(-1 * var(--up, 0px)) calc(-1 * var(--right, 0px)) calc(-1 * var(--down, 0px)) calc(-1 * var(--left, 0px));
}
.block .head b { display: inline-grid; place-items: center; min-width: 36px; height: 36px; border-radius: 8px; background: var(--code); color: var(--code-text); }
.block .head b { padding: 0 6px; }
.block.go.call { font-size: 1rem; }
.block.look, .block.count, .block.op { font-size: 1rem; }
.block.loop.def { border-style: dashed; }
.block .inner { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0; padding-left: 8px; border-left: 3px solid var(--code); }
/* Several small repeats side by side: the number alone says it, the words stay for a screen reader. */
.inner:has(> .loop ~ .loop) .loop > .head > i { position: absolute; clip-path: inset(50%); }
.block .head > i { font-style: normal; }
.block.if .inner { padding-left: 0; border-left: 0; }
.program.shown .block.filled { border-color: var(--accent); background: var(--accent); color: var(--accent-text); }
.tiles .tile { font-size: 1.5rem; padding: 10px 4px; color: var(--text); }
.tiles .tile:disabled { opacity: .4; }
.tiles .tile.word { font-size: 1.05rem; }
.tiles .tile.code-tile { font: 600 .85rem ui-monospace, Menlo, Consolas, monospace; overflow-wrap: anywhere; }
.code {
  width: 100%; margin: 0; padding: 10px 12px; border-radius: 10px; border: 2px solid var(--line); background: var(--card); color: var(--text);
  font: 600 min(.875rem, 3.6vw)/1.5 ui-monospace, Menlo, Consolas, monospace; text-align: left; white-space: pre; overflow: hidden;
}
.code .block { display: inline-grid; vertical-align: middle; height: 28px; min-width: 52px; padding: 0 6px; border-radius: 6px; font: inherit; line-height: 1; }
/* The builder (src/builder.js): placed blocks wrap like a program, the tray and Run stay in the thumb zone. */
.answer { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 6px; width: 100%; min-height: 44px; }
.block.slot { min-width: 28px; width: 28px; border: 2px dashed var(--line); background: transparent; padding: 0; cursor: pointer; }
.block.slot.here { min-width: 40px; width: 40px; border-color: var(--code); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--code) 35%, transparent); }
.caret { align-self: stretch; width: 4px; min-height: 36px; border-radius: 2px; background: var(--code); }
.block .take { border: 0; padding: 0 4px; background: none; color: inherit; font: inherit; font-weight: 700; cursor: pointer; }
/* Laying out needs the room: a smaller map, and the answer scrolls inside its own space when it is long. */
.play:has(.answer) .grid-world { width: min(100%, calc(var(--w) * 44px), calc(var(--w) * 22vh / var(--h))); margin-bottom: 6px; }
.program:is(:has(.answer), .scrolls) { overflow-y: auto; }
/* Coding's program in its own box (fit() in src/coding/exercise.js) scrolls without moving the page, and fades out at
   the bottom while there is more below. */
@property --more { syntax: '<length>'; inherits: false; initial-value: 0px; }
@keyframes more-below { 0%, 90% { --more: 20px; } to { --more: 0px; } }
.program.scrolls {
  overscroll-behavior: contain; animation: more-below linear both; animation-timeline: scroll(self);
  mask-image: linear-gradient(#000 calc(100% - var(--more)), transparent);
}
/* A program too tall for the screen: the coach and the gaps give it room, as on a short phone. */
.play:has(.program.tall) .topic { position: absolute; clip-path: inset(50%); }
.play:has(.program.tall) .who { width: 44px; }
.play:has(.program.tall) .coach { margin-bottom: 4px; }
.play:has(.program.tall) .bubble { min-height: 5.5em; margin-bottom: 6px; padding: 6px 10px; }
.play:has(.program.tall) .grid-world { margin-bottom: 4px; }
.choices.tray { flex-wrap: wrap; gap: 6px; padding-top: 8px; }
.tray .tile { flex: 1 1 auto; min-width: 22%; min-height: 44px; padding: 4px 8px; white-space: nowrap; }
/* A tile drawn shorter (a short phone) still answers a thumb across 44px: its rows are 6px apart. */
.tray .tile { position: relative; }
.tray .tile::after { content: ''; position: absolute; inset: min(0px, calc(50% - 22px)) 0; }
.tray .tile.word { font-size: .95rem; }
.tray .run { flex: 1 0 100%; margin: 2px 0 0; padding: 10px; }
.tray .run:disabled { opacity: .45; }
.meter-line { flex: 1 0 100%; margin: 0; text-align: center; color: var(--muted); font-size: .9rem; font-variant-numeric: tabular-nums; }
.program.shown .block.go { border-color: var(--accent); background: var(--accent); color: var(--accent-text); }
.tile-ghost { user-select: none; position: fixed; left: 0; top: 0; z-index: 50; margin: 0; pointer-events: none; opacity: .9; }

@media (max-height: 700px) {
  .grid-world { width: min(100%, calc(var(--w) * 52px), calc(var(--w) * max(28px, 23vh / var(--h)))); }
  /* A square to tap keeps a thumb-sized target, whatever the map's height. */
  .grid-world.picking { width: min(100%, calc(var(--w) * 52px), calc(var(--w) * max(36px, 23vh / var(--h)))); }
  .play:has(.grid-world) .bubble { margin-bottom: 8px; }
}

/* ---- Focus: what it's for, then a calm timer that fills a ring ---- */
:root { --chip-focus: #7A5230; --focus-ring: #9A6038; --focus-soft: #F1E4D3; }
@media (prefers-color-scheme: dark) { :root { --chip-focus: #DDB088; --focus-ring: #DDB088; --focus-soft: #33271C; } }
.chip.focus { --c: var(--chip-focus); flex: 0 1 180px; margin: 0 auto; }
.focus-ask h2 { margin: 4px 0 12px; font-size: 1.3rem; }
.focus-presets { display: flex; flex-wrap: wrap; gap: 8px; }
.focus-presets .choice { flex: 1 1 40%; }
.focus-ask input {
  display: block; box-sizing: border-box; width: 100%; margin-top: 10px; padding: 14px 12px; font: inherit;
  color: var(--text); background: var(--card); border: 2px solid var(--line); border-radius: 12px;
}
.focus-ask input:focus { outline: none; border-color: var(--chip-focus); }
.focus-ask input::placeholder { color: var(--muted); }
.focus-timer { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 4px; }
.focus-on { margin: 0; max-width: 100%; color: var(--muted); font-weight: 600; overflow-wrap: anywhere; text-align: center; }
.focus-dial {
  width: min(56vw, 210px); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--focus-ring) var(--fill), var(--focus-soft) var(--fill));
  position: relative;
}
.focus-dial::before { content: ''; position: absolute; inset: 10px; border-radius: 50%; background: var(--bg); }
.focus-dial .count { position: relative; font-variant-numeric: tabular-nums; }

/* ---- Wide screens: tablets and desktop browsers. Nothing here applies below 768px, so the phone
   layout is untouched. Same DOM at every width: home's .rail and .pane are display: contents on a
   phone and become two panes here. ---- */
.rail, .pane { display: contents; }
@media (min-width: 768px) {
  :root { --wide: 720px; --rail: 260px; }
  #app, .cta, .choices, .foot { max-width: var(--wide); }
  /* Home: the garden and the habit tabs in a rail, the path or panel beside it. */
  #app:has(> .home) { --wide: 1040px; }
  .home { display: flex; gap: 32px; align-items: flex-start; }
  /* Capped at the screen's height and scrolling inside itself, so + Habit is always in reach. The
     6px inset keeps the focus ring clear of the scroll clip. */
  .rail {
    display: block; flex: none; width: calc(var(--rail) + 12px); margin: -6px; padding: 6px;
    position: sticky; top: 10px; max-height: calc(100dvh - 76px); overflow-y: auto; /* 76px: the bar above it */
  }
  .pane { display: block; flex: 1; min-width: 0; }
  .rail .paths { flex-direction: column; margin: 0; padding: 0; overflow: visible; mask-image: none; }
  .rail .path-tab { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 16px; }
  /* Home's Continue bar spans the pane only, so its fade never covers the rail. */
  .home + .cta {
    left: calc(max(0px, 50% - var(--wide) / 2) + 16px + var(--rail) + 32px); right: max(0px, 50% - var(--wide) / 2);
    max-width: none; margin: 0; padding-left: 0;
  }
  /* A lesson: a bigger board and coach, the board kept clear of the buttons at the bottom. */
  div.board { width: min(100%, max(240px, 100dvh - 320px)); margin-inline: auto; }
  .who { width: 84px; }
  .coach.demonstrates .who { width: min(220px, 26dvh); }
  .orb { width: min(36dvh, 300px); }
  .sides span { width: min(22dvh, 160px); }
  /* The garden beside its cards, as large as the screen's height allows (the tall scene is 360x390). */
  #app:has(> .garden-page) { --wide: 1040px; }
  .garden-page { display: grid; grid-template-columns: min(60%, (100dvh - 140px) * .92) 1fr; gap: 0 24px; align-items: start; }
  .garden-page h1 { grid-column: 1 / -1; }
  .garden-view { position: sticky; top: 16px; }
  .garden-page .plant-cards { margin: 0; }
}
/* A landscape desktop has no thumb zone: an end screen's Continue and a practice's buttons follow
   the content instead of sitting far below it. A lesson's answer buttons and banner stay put. */
@media (min-width: 1024px) and (orientation: landscape) {
  .summary { padding-bottom: 0; }
  .summary + .cta { position: static; width: 100%; padding: 8px 16px 32px; background: none; }
  .play:not(:has(div.board)) { padding-bottom: 32px; }
  .play:not(:has(div.board)) .choices { position: static; padding: 24px 0 0; background: none; }
}
@media (min-width: 1200px) {
  #app:has(> .home), #app:has(> .garden-page) { --wide: 1200px; --rail: 400px; }
}
/* ---- end wide screens ---- */

/* ---- Wind down: the night palette ----
   A Wind down session and its end screen (main.night) are dim and warm in either theme: low amber
   light on a brown-black, no bright white. :has() puts the tokens on body, so the bar, the page and
   the fixed button bar follow too. */
:root { --chip-winddown: #8A5A1E; }
@media (prefers-color-scheme: dark) { :root { --chip-winddown: #E0B070; } }
body:has(main.night) {
  --bg: #18140f; --card: #241e17; --text: #e8dcc8; --muted: #b5a58c; --line: #3a3127;
  --accent: #d9a35b; --accent-text: #18140f; --calm: #d9a35b; --calm-soft: #3d2e1c;
  --chip-ink: #18140f; --chip-winddown: #e0b070;
  color-scheme: dark;
}
.night .orb { background: radial-gradient(circle at 40% 35%, #f2d9a6, #a8733f); }
.night .orb .count { color: #2a1d10; }
.chip.winddown { --c: var(--chip-winddown); flex: 0 1 180px; margin: 0 auto; }

/* --- Courses on the Learning tab, and the tap-and-match quiz items (src/quiz/) --- */
/* One row that scrolls inside itself once there are more courses than fit. */
.courses { display: flex; gap: 6px; justify-content: safe center; margin: 0 -16px -4px; padding: 6px 16px; overflow-x: auto; scrollbar-width: none; }
.course::after { content: ''; position: absolute; inset: -6px 0; } /* a 44px target; the row keeps its height */
.course { position: relative; flex: none; min-height: 36px; padding: 4px 10px; border-radius: 999px; border: 2px solid var(--line); background: var(--card); font-weight: 600; font-size: .85rem; white-space: nowrap; }
.course[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
/* Japanese uses the system's own font for it (Noto Sans JP on Android): nothing is downloaded. */
:lang(ja) { font-family: system-ui, "Noto Sans JP", "Noto Sans CJK JP", "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif; }
.quiz .card {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-height: 190px; padding: 16px; background: var(--card); border: 2px solid var(--line); border-radius: 18px; text-align: center;
}
/* One glyph is huge; a word shrinks to fit the card. */
.quiz .glyph { margin: 0; font-size: clamp(28px, calc(250px / var(--len, 1)), 110px); line-height: 1.15; font-weight: 500; }
.quiz .reading { margin: 0; font-size: 1.3rem; font-weight: 700; color: var(--muted); }
.quiz .meaning { margin: 0; padding: 0 48px; font-size: 1.1rem; font-weight: 700; } /* clear of the speaker */
.quiz .slots { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 8px 0 0; }
.quiz .slot {
  display: grid; place-items: center; min-width: min(64px, 11vw); height: 72px; padding: 0 4px; font-size: min(44px, 9vw); white-space: nowrap;
  border-bottom: 4px solid var(--line); border-radius: 6px;
}
.quiz .slot:not(:empty) { border-color: var(--accent); }
.quiz .slot.shown { border-color: var(--wrong); color: var(--muted); }
.quiz .hear { position: absolute; top: 8px; right: 8px; width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--line); background: var(--bg); font-size: 1.3rem; }
.quiz .hear.big { position: static; width: 112px; height: 112px; font-size: 3rem; }
.quiz .choices .choice { font-size: 1.6rem; padding: 14px 6px; min-height: 64px; }
.quiz .quiz-pairs { display: grid; grid-template-columns: 1fr 1fr; }
.quiz .quiz-pairs .choice { font-size: 1.4rem; padding: 10px 6px; min-height: 56px; }
.quiz .quiz-build { flex-wrap: wrap; justify-content: center; }
.quiz .quiz-build .choice { flex: 0 0 auto; min-width: calc(25% - 6px); }
.quiz .choice[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; }
.quiz .choice.used { visibility: hidden; }
.quiz-star { position: absolute; top: 12px; left: calc(50% - 12px); font-size: 28px; font-style: normal; color: #F5A524; pointer-events: none; }

/* --- Maths (src/maths/): its pictures and sums on the quiz card, and the quiz number line ---
   Ada's violet marks what is shaded. */
:root { --maths: #6f4fc4; }
@media (prefers-color-scheme: dark) {
  :root { --maths: #b49cf5; }
}
.quiz.maths .glyph, .quiz.maths .meaning { font-size: 2.4rem; font-weight: 800; }
.quiz.maths .slots { font-size: 2rem; font-weight: 800; }
.pic { display: block; width: 100%; max-width: 300px; }
.pic + .pic { margin-top: 6px; }
.pic.grid { max-width: 200px; }
.pic .cell { fill: var(--card); stroke: var(--line); stroke-width: 1.5; }
.pic .cell.on { fill: var(--maths); }
.pic .dot { fill: var(--maths); }
.pic .track { stroke: var(--line); stroke-width: 3; }
.pic .hop { stroke: var(--muted); stroke-width: 2; }
.pic text { fill: var(--muted); font-size: 13px; font-weight: 700; }
.numline { align-self: stretch; position: relative; min-height: 96px; margin-top: 16px; padding: 30px 16px 0; touch-action: none; cursor: pointer; }
.numline:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 12px; }
.track { position: relative; height: 6px; border-radius: 3px; background: var(--line); }
.track i { position: absolute; top: -9px; width: 3px; height: 24px; margin-left: -1.5px; border-radius: 2px; background: var(--muted); }
.marker {
  position: absolute; top: -13px; width: 32px; height: 32px; margin-left: -16px; border-radius: 50%; background: var(--maths);
  border: 3px solid var(--card); box-shadow: 0 2px 6px rgba(0, 0, 0, .3);
}
.marker.right, .marker.spot { background: var(--accent); }
.marker.wrong { background: var(--wrong); }
.numline .end { position: absolute; bottom: 8px; font-weight: 700; color: var(--muted); }
.numline .end:first-of-type { left: 6px; }
.numline .end:last-of-type { right: 6px; }
.track .zero { position: absolute; top: 20px; transform: translateX(-50%); font-style: normal; font-weight: 700; color: var(--muted); }

/* Fitting the person (src/fitting.js): the comeback card on home, the shorter-one offer, the usual hours. */
.comeback { position: relative; margin: 12px 0 4px; padding: 14px 16px 10px; border: 2px solid var(--line); border-radius: 16px; background: var(--card); }
.comeback .visitor { position: absolute; top: 10px; right: 12px; width: 32px; height: 32px; }
.comeback .kicker { margin: 0 40px 4px 0; }
.comeback p { margin: 0 40px 12px 0; line-height: 1.45; }
.comeback .choice { width: 100%; margin: 0; }
.comeback .link { margin: 4px auto 0; }
.cta .links { display: flex; flex-wrap: wrap; justify-content: center; column-gap: 8px; }
.cta .links .link { margin: 4px 0 0; }
.habit .usual { margin: 4px 0 0; color: var(--muted); }
.paused { margin-top: 16px; }
.home:has(~ .cta :is(.short, .offer, .choose)) { padding-bottom: calc(170px * var(--text-scale, 1)); } /* room for the offer under Continue */

/* ---- Sync and friends (src/sync/ui.js): pairing and recovery codes, the friend list. ---- */
.survey.sync { text-align: left; }
.sync h1, .sync .code { text-align: center; }
.sync h2 { font-size: 1.05rem; margin: 24px 0 8px; }
.sync .said a { color: inherit; }
.sync .code { font: 700 2.4rem/1.2 ui-monospace, monospace; letter-spacing: .08em; margin: 16px 0 4px; }
.sync .pair-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 16px; margin-top: 12px; }
.sync .pair-row .code { margin: 0; font-size: 1.9rem; width: auto; flex: none; padding: 0; background: none; border: 0; }
.sync .qr { width: 132px; height: 132px; border-radius: 8px; flex: none; }
.sync .code.recovery { font-size: 1.15rem; letter-spacing: .04em; padding: 14px 8px; border-radius: 12px; background: var(--card); border: 2px solid var(--line); overflow-wrap: anywhere; }
.sync .code-input {
  display: block; width: 100%; margin: 8px 0; padding: 14px 16px; border-radius: 12px; border: 2px solid var(--line);
  background: var(--card); color: var(--text); font: 600 1.3rem ui-monospace, monospace; letter-spacing: .12em; text-align: center; text-transform: uppercase;
}
.sync .code-input:focus { outline: none; border-color: var(--accent); }
.sync .me { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 1.15rem; margin: 8px 0; }
.sync .avatar { font-size: 2rem; line-height: 1; flex: none; }
.sync .look { margin: 0 0 16px; }
.sync .look summary { text-align: center; color: var(--muted); cursor: pointer; padding: 6px; }
.sync .opts { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.sync .opt { min-height: 44px; padding: 8px 12px; border-radius: 999px; border: 2px solid var(--line); background: var(--card); }
.sync .opt[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: var(--accent-text); }
.sync .friend-code { font-family: ui-monospace, monospace; letter-spacing: .08em; color: var(--text); user-select: all; }
.sync .friend { padding: 12px; margin: 10px 0; border-radius: 14px; background: var(--card); border: 2px solid var(--line); }
.sync .friend > p, .sync .cheers li { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; }
.sync .friend small { color: var(--muted); }
.sync .friend .row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sync .friend .row .next, .sync .friend .row .choice { flex: 1; margin: 0; width: auto; text-align: center; }
.sync .friend .row .link { margin: 0; }
.sync .cheers { list-style: none; padding: 0; margin: 0; }
.sync .danger { background: var(--wrong); color: var(--bg); }
/* ---- end sync and friends ---- */
.meet h2 { margin: 20px 0 4px; font-size: 1rem; text-align: left; }
.cast { overflow: visible; } /* a pose may reach past the 100-wide viewBox: Ada's presenting arm */
/* Short phones: tighter blocks, so a long program stays clear of the tiles in a wide font too. */
@media (max-height: 700px) {
  .program { gap: 4px; }
  .block { min-width: 36px; height: 36px; font-size: 1.15rem; }
  .block.loop, .block.if, .block.stmt { padding: 1px 5px; font-size: .95rem; }
  .answer { gap: 4px; min-height: 36px; }
  .answer .head { min-height: 30px; }
  .code { line-height: 1.35; }
  /* A map and a program, or laying out with its tall tray: the coach gives way, or the program has no room.
     A tall map shrinks before the answer does, but its squares stay big enough to see Fennel on. */
  .play:has(.answer) .grid-world { width: min(100%, calc(var(--w) * 44px), calc(var(--w) * max(24px, 14vh / var(--h)))); margin-bottom: 2px; }
  .play:is(:has(.answer), :has(.grid-world)) .topic { position: absolute; clip-path: inset(50%); }
  .play:is(:has(.answer), :has(.grid-world)) .who { width: 44px; }
  .play:is(:has(.answer), :has(.grid-world)) .coach { margin-bottom: 4px; }
  .play:is(:has(.answer), :has(.grid-world)) .bubble { min-height: 80px; margin-bottom: 6px; padding: 6px 10px; font-size: .9rem; }
  .tray .tile { min-height: 38px; }
  /* The count of blocks shares Run's row, so the answer keeps the room. */
  .choices.tray:has(> .meter-line)::after { content: ''; order: 1; flex-basis: 100%; margin-top: -6px; }
  .tray > .meter-line, .tray:has(> .meter-line) .run { order: 2; }
  .tray > .meter-line { flex: none; align-self: center; }
  .tray:has(> .meter-line) .run { flex: 1 1 0; }
  .block .head { min-height: 28px; gap: 4px; }
  .block .head b { min-width: 26px; height: 26px; }
  .block .head .block { min-width: 28px; height: 28px; }
  .block .inner { gap: 4px; margin: 0; }
  .vars { min-height: 1.3em; margin-bottom: 2px; font-size: .85rem; line-height: 1.3; }
}
/* A coach the learner copies: the X beside them and no header, so the words below get the room. */
.bar:has(+ .play .coach.demonstrates) { position: absolute; top: 0; left: 0; z-index: 1; }
.play:has(.coach.demonstrates) { padding-top: max(12px, env(safe-area-inset-top)); }
.play:has(.coach.demonstrates) .topic { position: absolute; clip-path: inset(50%); }
/* The screen break: the step in progress, how to do it, and what's next. */
.scan.detailed .steps li:not(.now) { display: none; }
.how-now { margin: 10px 0 0; padding-left: 20px; }
.how-now li { margin-bottom: 6px; }
.next-step { margin: 8px 0 0; color: var(--muted); }
/* A timed routine's pause: small and round, beside the coach. Nothing waits at the bottom of the screen. */
.play:has(.practice-pause) { position: relative; padding-bottom: 16px; }
.play:has(.focus-early) { padding-bottom: calc(90px * var(--text-scale, 1)); } /* its "I'm done" stays in the thumb zone */
.play:has(.practice-pause) .coach:not(.demonstrates) { padding-right: 54px; }
.practice-pause { position: absolute; top: 32px; right: 16px; z-index: 1; width: 44px; height: 44px; margin: 0; padding: 0; border-radius: 50%; font-size: 1rem; }
/* Level with the X, on the other side of a coach the learner copies. */
.play:has(.coach.demonstrates) .practice-pause { top: max(12px, env(safe-area-inset-top)); }
.play:has(.practice-pause) .coach:not(.demonstrates) .bubble { min-height: 5.8em; }
.play:has(.practice-pause) .coach.demonstrates .bubble { min-height: 4.4em; } /* a longer line must not move what's under it */
.room { margin: 4px 0 0; color: var(--muted); font-size: .9rem; }

/* Chess games (chess/games.js): a small row on chess's home, then the session frame. */
.games { align-items: center; }
.games > span { font-size: .8rem; font-weight: 700; color: var(--muted); }
.play:has(.game-note) .bubble, .play:has(.hud) .bubble { min-height: 7.4em; }
.cm-chessboard.wingbeat .markers .marker.marker-frame-danger { stroke: var(--wrong); stroke-width: 3px; opacity: 1; } /* Scramble's hunted piece */
.game-tabs { display: flex; gap: 8px; justify-content: center; margin-bottom: 10px; }
.game-tabs .course { padding: 4px 12px; }
.hud { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; font-weight: 700; color: var(--muted); }
.hud-clock { min-width: 4em; font-variant-numeric: tabular-nums; font-size: 1.15rem; color: var(--text); }
.hud-score { font-size: 1.6rem; font-variant-numeric: tabular-nums; color: var(--accent); }
.hud-best { min-width: 4em; text-align: right; font-size: .9rem; }
.game-actions { flex-direction: row; flex-wrap: nowrap; }
.game-actions .choice { flex: 1; padding-inline: 4px; }
.game-actions.game-levels { flex-wrap: wrap; }
.game-actions.game-levels .choice { flex: 1 1 40%; }
.game-note { margin: 10px 0 0; min-height: 4.2em; font-size: .95rem; }

/* ---- The code courses (src/code/exercise.js): word chips laid out as lines of code ---- */
:root { --mono: ui-monospace, Menlo, Consolas, "DejaVu Sans Mono", monospace; }
.play:has(.code-item) .bubble { min-height: 5.9em; margin-bottom: 8px; font-size: .95rem; }
.code-item .grid-world { width: min(100%, calc(var(--w) * 40px), calc(var(--w) * 16vh / var(--h))); margin-bottom: 6px; }
.code-goal { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; margin: 0 0 6px; font-size: .85rem; color: var(--muted); }
.code-goal code { flex: 1 1 auto; max-height: 4.6em; overflow-y: auto; padding: 2px 8px; border-radius: 6px; background: var(--card); border: 1px solid var(--line); color: var(--text); font: 600 .85rem/1.4 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.code-given { max-height: 22vh; overflow: auto; margin-bottom: 6px; font-size: .78rem; }
.code-program { display: block; overflow-y: auto; }
.code-program .code { overflow: auto; max-height: 100%; font-size: .8rem; }
.code-program.shown .code { border-color: var(--accent); }
.code-answer { align-items: center; gap: 4px; padding: 6px; min-height: 52px; border-radius: 10px; border: 2px solid var(--line); background: var(--card); }
.line-break { flex: 0 0 100%; height: 0; }
.line-indent { flex: none; width: calc(var(--indent) * 14px); margin-right: -4px; }
.block.token { min-width: 26px; height: 32px; padding: 0 6px; border-radius: 7px; font: 700 .85rem var(--mono); max-width: 100%; overflow-wrap: anywhere; }
.code-answer .block.hole { min-width: 44px; height: 32px; }
.code-answer .block.slot { height: 32px; }
.code-answer .caret { min-height: 28px; }
.fixed-word { font: 600 .85rem/32px var(--mono); }
/* The reserved line for what it printed sits just over the tray, so a run moves nothing. */
.code-out { position: fixed; left: 16px; right: 16px; max-width: 488px; margin: 0 auto; height: 3.4em; overflow-y: auto; padding: 4px 8px; border-radius: 8px; background: var(--card); border: 1px dashed var(--line); font: 600 .78rem/1.5 var(--mono); white-space: pre-wrap; }
.code-out:empty::before { content: 'What it prints shows here'; color: var(--muted); font-weight: 400; }
.code-tray { display: block; padding-top: 6px; }
.code-tray .chips { display: flex; flex-wrap: wrap; gap: 6px; max-height: min(32vh, 208px); overflow-y: auto; }
.code-tray .chips:empty { display: none; }
.tray .tile.code-chip { flex: 1 1 auto; min-width: 44px; min-height: 44px; max-width: 100%; padding: 2px 8px; font: 700 .95rem var(--mono); white-space: normal; overflow-wrap: anywhere; }
.code-tray .run { margin: 8px 0 0; padding: 12px; }
.code-tray .run:disabled { opacity: .45; }
.quiz.code-look .card { min-height: 0; align-items: stretch; padding: 10px; }
.quiz.code-look .card:not(:has(*)) { display: none; }
.quiz.code-look .glyph { font: 600 .9rem/1.5 var(--mono); text-align: left; white-space: pre; overflow-x: auto; max-height: 38vh; overflow-y: auto; }
.quiz.code-look .reading { font: 600 .85rem/1.4 var(--mono); text-align: left; white-space: pre-wrap; }
.quiz.code-look .choices { flex-wrap: wrap; }
.quiz.code-look .choices .choice { flex: 1 1 40%; min-height: 48px; padding: 8px; font: 700 .95rem/1.3 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.quiz.code-look .choices { max-height: 46vh; overflow-y: auto; }
.quiz.code-check .choices .choice { flex: 1 1 28%; min-height: 44px; padding: 6px; font-size: .85rem; }
.play:has(.code-look) .bubble { min-height: 4.4em; }
@media (max-height: 700px) {
  .code-given { max-height: 14vh; }
  .code-tray .chips { max-height: 24vh; }
  .quiz.code-look .glyph { max-height: 28vh; }
}

/* ---- Raised butterflies: home's line, the garden's cards and the field guide (src/guide.js) ---- */
.raising {
  display: flex; align-items: center; gap: 8px; margin: 8px auto 0; max-width: 100%; padding: 2px 14px 2px 4px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--text); font-size: .85rem; text-align: left;
}
.raising svg { width: 40px; height: 34px; flex: none; }
.raising + .street h2 { margin-top: 10px; }
.log-habit .raising { margin-bottom: 8px; }
.arrival svg.creature { height: 30px; }
.arrivals .arrival > span { text-align: left; }
.bar .guide-link { margin: 0 0 0 auto; }
.field-guide { padding: 0 16px 40px; }
.field-guide h1 { margin: 0 0 12px; font-size: 1.6rem; }
.guide-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.guide-tile {
  display: grid; justify-items: center; gap: 2px; width: 100%; height: 100%; padding: 8px 8px 10px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--card); color: var(--text); text-align: center; font-size: .85rem;
}
.guide-tile b { font-size: .95rem; }
.guide-tile span { color: var(--muted); }
.guide-art { width: 100%; max-width: 120px; height: auto; }
.silhouette * { fill: var(--line); stroke: none; }
.guide-page .guide-arts { display: flex; justify-content: center; gap: 8px; }
.guide-page .guide-art { max-width: 160px; }
.guide-page .latin { margin: -8px 0 12px; font-style: italic; color: var(--muted); }
.guide-page .said { margin-bottom: 12px; }
.guide-page .source { color: var(--muted); font-size: .9rem; }
.guide-page .source a { color: inherit; }

/* ---- Your butterfly (app.js yours, yoursView, wingbeat): beside home's streak line, its own screen, the end screens' moment ---- */
.streak-row { display: flex; align-items: center; justify-content: center; gap: 2px; margin-top: 6px; }
.streak-row .streak-line, .streak-row .link { margin: 0; }
.yours-link { flex: none; width: 48px; height: 40px; padding: 0; border: 0; border-radius: 12px; background: none; }
.yours-link svg { display: block; width: 100%; height: 100%; }
.chip b svg { height: 1em; width: auto; margin-right: 4px; vertical-align: -.1em; }
.yours-page { padding: 24px 16px 48px; text-align: center; }
.yours-page h2 { margin: 24px 0 8px; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.yours-page p { margin: 0 auto; max-width: 30em; }
.yours-page .said { margin-top: 4px; }
.yours-wings { display: block; width: 200px; margin: 8px auto 0; }
.legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; margin: 0; padding: 0; list-style: none; }
.legend i { display: inline-block; width: 14px; height: 14px; margin-right: 6px; border-radius: 4px; vertical-align: -2px; }
.states li { align-items: center; }
.states svg { flex: none; width: 60px; }
.wingbeat-moment { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 14px auto 0; max-width: 340px; }
.wingbeat-moment > svg { flex: none; width: 64px; }
.wingbeat-moment p { margin: 0; text-align: left; font-weight: 600; }
.wing-lumi { flex: none; width: 52px; }
.wing-lumi svg { width: 100%; }
.intro .tagline { margin: -4px 0 12px; font-style: italic; color: var(--muted); }
.does li > span:first-child svg { width: 1.6em; vertical-align: middle; }
.hero.perched svg { overflow: visible; }
.survey .hero.perched { margin-top: 24px; }

/* Lumi's wardrobe: a grid of Lumi in every skin; one not given yet is dimmed, with what gives it. */
.bar .wardrobe-link { margin: 0; }
.wardrobe { padding: 0 16px 40px; }
.wardrobe h1 { margin: 0 0 4px; font-size: 1.6rem; }
.skins { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.skin-card { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 100%; height: 100%; padding: 10px 8px; text-align: center; font-weight: 600; }
li.skin-card { border-radius: 12px; border: 2px dashed var(--line); color: var(--muted); }
.skin-card svg { width: 84px; height: auto; }
.skin-card small { font-weight: 400; color: var(--muted); font-size: .85rem; }
.skin-card[aria-pressed="true"] { border-color: var(--accent); }
.skin-card[aria-pressed="true"] > span::after { content: ' ✓'; color: var(--accent); }
/* Not given yet: quiet but still itself. Muted colour, never faded, so Lumi keeps 3:1 against the card in the dark too. */
.skin-card.later svg { filter: saturate(.35); }
.arrival svg.cast { height: 34px; }
/* Choosing another routine (CHOOSE_WORDS): the sheet's unit headings, and the quiet "counted" line with its Undo. */
.add-habit h2 { margin: 20px 0 0; font-size: 1rem; text-align: left; color: var(--muted); }
.add-habit .away-row { margin-top: 40px; }
.away-line .link { display: inline; min-height: 0; margin: 0; padding: 0 4px; }
