/* RaiseSteady Routines: raisesteady.com's design language (library.css, the Games app's home.css) and direction A,
   "Steady cards" (P2-158/directions/A.html). Text sizes in rem, so they grow with the device's text size; no fixed
   heights on boxes with words. Motion: things fade in and rise a little; with Reduce Motion the same timing, a fade. */
:root {
  --navy: #282858; --ink: #1a1a1a; --muted: #4a4a68; --paper: #f5f5f0; --yellow: #fedb71; --yellow-tint: #fffbea;
  --mint: #75c5a8; --mint-tint: #bfffe6; --lavender: #e9d9ff;
  --edge: 2px solid var(--navy); --lift: 4px 4px 0 var(--navy);
  --display: Orbitron, Geist, Inter, system-ui, sans-serif;
  --text: Geist, Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --emoji: 'RS Emoji', Geist, sans-serif;
  --in: 360ms;
  --gutter: 1rem;
  --tap: max(44px, 3rem);   /* P2-219: a control is never under 44 px, whatever the text size */
}
* { box-sizing: border-box; }
html { font-size: 100%; -webkit-text-size-adjust: 100%; }
/* on the iPhone and iPad, follow Dynamic Type: always inside the app (the shell sets html.in-app; an iPad with a
   keyboard or trackpad reports a fine pointer), and in a phone or tablet browser; a desktop browser keeps its own text size */
@media (hover: none) and (pointer: coarse) {
  @supports (font: -apple-system-body) { html { font: -apple-system-body; } }
}
@supports (font: -apple-system-body) { html.in-app { font: -apple-system-body; } }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh; background: var(--paper); color: var(--ink);
  font-family: var(--text); font-size: 1rem; line-height: 1.35; font-weight: 500;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  -webkit-touch-callout: none; -webkit-user-select: none; user-select: none;
}
a, img, svg { -webkit-user-drag: none; }
button { font: inherit; color: inherit; cursor: pointer; margin: 0; }
h1, h2, p { margin: 0; }
img { display: block; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.tk { width: 1em; height: 1em; flex: none; fill: none; stroke: currentColor; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.chev { width: 1.1em; height: 1.1em; flex: none; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; margin-left: -0.25em; }
/* P2-219: the focus ring is navy with a 2 px gap that shows the paper (or the white card) behind it */
:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
h1:focus, h1:focus-visible { outline: none; }

/* ---------- the screen ---------- */
.screen {
  min-height: 100vh; min-height: 100dvh;
  padding: max(env(safe-area-inset-top), 1rem) max(env(safe-area-inset-right), var(--gutter)) max(env(safe-area-inset-bottom), 1rem) max(env(safe-area-inset-left), var(--gutter));
  animation: rs-in var(--in) ease-out both;
}
@media (min-width: 700px) { :root { --gutter: 2.5rem; } .screen { padding-top: max(env(safe-area-inset-top), 1.75rem); padding-bottom: max(env(safe-area-inset-bottom), 1.25rem); } }
@keyframes rs-in { from { opacity: 0; transform: translateY(0.75rem); } to { opacity: 1; transform: none; } }
@keyframes rs-fade { from { opacity: 0; } to { opacity: 1; } }
/* out, then in again: the element takes its new place while it is hidden (two names, so a second change plays it again) */
@keyframes rs-swap-a { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
@keyframes rs-swap-b { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
@keyframes rs-star { from { opacity: 0; transform: scale(0.88); } to { opacity: 1; transform: none; } }

/* ---------- shared pieces ---------- */
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: var(--tap); padding: 0.5rem 1.125rem;
  border: var(--edge); border-radius: 999px; background: #fff; color: var(--navy); font-size: 1rem; font-weight: 700;
  line-height: 1.2; text-decoration: none; box-shadow: var(--lift); text-align: center;
}
.pill:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--navy); }
.pill:disabled { opacity: 0.45; cursor: default; box-shadow: none; }
.pill:disabled:active { transform: none; }
.chip {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.3em; min-height: 1.875rem; padding: 0.125rem 0.75rem;
  border-radius: 999px; border: 1.5px solid var(--navy); background: #fff; color: var(--navy);
  font-size: 1.125rem; font-weight: 800; line-height: 1.15; white-space: nowrap;
}
.chip .tk { width: 1.1em; height: 1.1em; stroke-width: 3.6; }
.chip.is-done { background: var(--mint); }
.chip.is-now { background: var(--yellow); }
.foot { text-align: center; font-size: 0.875rem; font-weight: 600; color: var(--muted); }
.note { margin-top: 1rem; padding: 0.75rem 1rem; border: var(--edge); border-radius: 14px; background: var(--yellow-tint); color: var(--ink); font-size: 1rem; font-weight: 600; }
.note[hidden] { display: none; }
.big-btn, .done-btn {
  display: flex; align-items: center; justify-content: center; gap: 0.75rem; width: 100%; min-height: 4.5rem; padding: 0.75rem 1.5rem;
  border: var(--edge); border-radius: 999px; background: var(--navy); color: var(--yellow); font-size: 1.375rem; font-weight: 800;
  line-height: 1.3; text-decoration: none; text-align: center; box-shadow: 6px 6px 0 var(--navy);
}
.big-btn:active, .done-btn:active { transform: translate(3px, 3px); box-shadow: 3px 3px 0 var(--navy); }
.big-btn:focus-visible, .done-btn:focus-visible { outline-offset: 4px; }

/* ---------- Routines (home) ---------- */
.home { display: flex; flex-direction: column; gap: 1.5rem; max-width: 76rem; margin: 0 auto; }
.home-top { display: grid; gap: 0.375rem; padding-top: 0.5rem; }
.home-title { font: 700 2.25rem/1.25 var(--display); color: var(--navy); }
.home-lead { font-size: 1.25rem; font-weight: 600; color: var(--muted); }
/* P2-239: the small way back to raisesteady.com (web only; site.js), at the end of the title row so the screen gets no
   taller; the link keeps a 44 px tap, the pill shows small */
.home-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 0.75rem; }
.home-head .home-title { min-width: 0; }
.rs-back { display: inline-flex; align-items: center; min-height: 44px; color: var(--navy); text-decoration: none; }
.rs-pill { display: inline-flex; align-items: center; gap: 0.25rem; min-height: 1.75rem; padding: 0.1rem 0.75rem 0.1rem 0.5rem; border: var(--edge); border-radius: 999px; background: var(--mint-tint); font-weight: 800; font-size: 0.875rem; line-height: 1.2; letter-spacing: 0.02em; }
.rs-pill .chev { width: 1em; height: 1em; margin-left: 0; }
.rs-back:hover .rs-pill { box-shadow: 2px 2px 0 var(--navy); }
.rs-back:focus-visible { outline: none; }
.rs-back:focus-visible .rs-pill { outline: 3px solid var(--navy); outline-offset: 2px; }
.cards { list-style: none; margin: 0; padding: 0 8px 8px 0; display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
.rcard {
  display: flex; align-items: center; gap: 1rem; height: 100%; padding: 1rem; border: var(--edge); border-radius: 24px;
  background: #fff; color: var(--navy); text-decoration: none; box-shadow: 6px 6px 0 var(--navy);
}
.rcard:active { transform: translate(3px, 3px); box-shadow: 3px 3px 0 var(--navy); }
.rcard-pic { flex: none; width: min(6.5rem, 24vw); aspect-ratio: 1; display: grid; place-items: center; border: var(--edge); border-radius: 22px; background: var(--yellow-tint); }
.rcard-pic img { width: 74%; height: 74%; object-fit: contain; }
.rcard-words { display: flex; flex-direction: column; align-items: flex-start; gap: 0.375rem; min-width: 0; }
.rcard-name { font: 700 1.5rem/1.3 var(--display); color: var(--navy); overflow-wrap: anywhere; max-width: 100%; }
.rcard-meta { font-size: 1.125rem; font-weight: 700; color: var(--muted); }
.rcard-words .chip { white-space: normal; text-align: left; max-width: 100%; }   /* "Done today" wraps at large text on a small phone */
.home-foot { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1.5rem; padding: 0.5rem 4px 0 0; }
.home-foot .foot { text-align: left; }
@media (min-width: 700px) {
  .home { gap: 2rem; }
  .home-title { font-size: 2.75rem; }
  .rcard { gap: 1.5rem; padding: 1.25rem; border-radius: 26px; }
  .rcard-pic { width: 9rem; }
  .rcard-name { font-size: 2rem; }
}
@media (min-width: 1000px) {
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.75rem; }
  .rcard { flex-direction: column; align-items: stretch; padding: 1.25rem 1.25rem 1.5rem; box-shadow: 8px 8px 0 var(--navy); }
  .rcard-pic { width: 100%; aspect-ratio: 4 / 3; }
  .rcard-pic img { width: 56%; height: 74%; }
  .rcard-name { font-size: 1.875rem; }
  .cards { padding: 0 10px 10px 0; }
}
/* a tall portrait screen (iPad): bigger cards fill it */
@media (min-width: 700px) and (max-width: 999px) and (min-height: 1000px) {
  .cards { gap: 1.75rem; }
  .rcard { padding: 1.5rem; gap: 2rem; box-shadow: 8px 8px 0 var(--navy); }
  .rcard-pic { width: 12rem; }
  .rcard-name { font-size: 2.25rem; }
  .rcard-meta { font-size: 1.25rem; }
}
/* a tall enough landscape screen: square picture tiles, so the cards fill the screen */
@media (min-width: 1000px) and (min-height: 760px) {
  .rcard-pic { aspect-ratio: 1; }
  .rcard-pic img { width: 62%; height: 62%; }
}

/* ---------- Run ---------- */
.run { display: flex; flex-direction: column; gap: 0.875rem; height: 100vh; height: 100dvh; }
.run > * { flex-shrink: 0; }
.run > .now { flex-shrink: 1; }
/* (P2-219: the now card no longer shrinks below its words; the picture and the strip give way instead, below) */
.run-top { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.875rem; }
.run-title { flex: 1 1 auto; min-width: 0; font: 700 1.5rem/1.3 var(--display); color: var(--navy); overflow-wrap: anywhere; }
.count { margin-left: auto; font-size: 1.125rem; font-weight: 800; color: var(--muted); white-space: nowrap; }
.ready { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; padding: 0.625rem 1.125rem; border: var(--edge); border-radius: 22px; background: #fff; }
.ready[hidden] { display: none; }
.ready-by { font-size: 1.125rem; font-weight: 800; color: var(--navy); }
.track { order: 3; flex: 1 0 100%; height: 1rem; border: var(--edge); border-radius: 999px; background: var(--paper); overflow: hidden; }
.fill { display: block; height: 100%; background: var(--mint); border-right: var(--edge); transition: width var(--in) ease-out; }
.left { margin-left: auto; font-size: 1rem; font-weight: 700; color: var(--muted); }

.now {
  flex: 1 1 auto; display: flex; flex-direction: column; gap: 0.75rem; padding: 1rem; margin-right: 6px;
  border: var(--edge); border-radius: 26px; background: #fff; box-shadow: 6px 6px 0 var(--navy);
}
.now.is-new .now-pic, .now.is-new .now-words { animation: rs-in var(--in) ease-out both; }
.now-pic { position: relative; flex: 1 1 11rem; min-height: 4rem; border: var(--edge); border-radius: 22px; background: var(--yellow-tint); }
.now-pic img { position: absolute; left: 8%; top: 8%; width: 84%; height: 84%; object-fit: contain; }
.now-words { display: flex; flex-direction: column; gap: 0.75rem; min-width: 0; }
.now-label { font-size: 0.9375rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.now-word { font-size: 2.25rem; font-weight: 800; line-height: 1.25; color: var(--navy); overflow-wrap: anywhere; hyphens: auto; }
.done-btn { font-size: 2rem; min-height: 4.5rem; }
.done-btn .tk { width: 0.9em; height: 0.9em; stroke-width: 3.4; }
.back { align-self: flex-start; }

.strip {
  position: relative; list-style: none; margin: 0; padding: 0.5rem 8px 8px 0.375rem; display: flex; gap: 0.75rem;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scrollbar-width: none;
}
.strip::-webkit-scrollbar { display: none; }
.st {
  flex: 1 0 7.5rem; min-width: 7.5rem; scroll-snap-align: center; display: flex; flex-direction: column; align-items: center; gap: 0.375rem;
  padding: 0.625rem 0.375rem; border: var(--edge); border-radius: 14px; background: #fff; text-align: center;
  box-shadow: 3px 3px 0 var(--navy); transition: background-color var(--in) ease-out;
}
.st img { width: 3rem; height: 3rem; }
.st-name { flex: 1 0 auto; font-size: 1.125rem; font-weight: 700; line-height: 1.15; color: var(--navy); overflow-wrap: break-word; hyphens: auto; max-width: 100%; }
.st.is-done { background: var(--mint-tint); }
.st.is-done .chip { background: var(--mint); }
.st.is-now { background: var(--yellow); box-shadow: 4px 4px 0 var(--navy), inset 0 0 0 1px var(--navy); }
.st.is-now .chip { background: var(--navy); color: var(--yellow); border-color: var(--navy); }
.st.is-next .chip { background: var(--yellow-tint); }

/* iPad portrait: the same stack, larger */
@media (min-width: 700px) {
  .run { gap: 1rem; }
  .run-title { font-size: 2rem; }
  .now { padding: 1.5rem; gap: 1rem; box-shadow: 8px 8px 0 var(--navy); }
  .now-pic { flex-basis: 16rem; }
  .now-word { font-size: 3.25rem; }
  .done-btn { font-size: 2.25rem; min-height: 5.5rem; }
  .st { flex-basis: 8.5rem; min-width: 8.5rem; }
  .st img { width: 3.5rem; height: 3.5rem; }
  .track { order: 0; flex: 1 1 8rem; min-width: 6rem; }
  .left { margin-left: 0; }
}
/* landscape: the picture beside the words, at least half the card's width and most of its height; Done beside it */
@media (min-aspect-ratio: 5/4) {
  .now { flex-direction: row; align-items: stretch; }
  .now-pic { flex: 1 1 50%; min-height: 11rem; }
  .now-words { flex: 1 1 50%; justify-content: center; padding: 0.5rem 1rem 0.5rem 0.75rem; }
}
@media (min-aspect-ratio: 5/4) and (min-width: 1000px) {
  .now { padding: 1.75rem; gap: 2.5rem; }
  .now-pic { min-height: 16rem; }
  .now-words { gap: 1.125rem; }
}

/* ---------- All done, For grown-ups ---------- */
.fin { display: flex; flex-direction: column; align-items: center; gap: 1.25rem; max-width: 40rem; margin: 0 auto; text-align: center; }
.fin-card {
  margin-top: auto; width: 100%; padding: 2rem 1.25rem 1.75rem; display: flex; flex-direction: column; align-items: center; gap: 1rem;
  border: var(--edge); border-radius: 26px; background: #fff; box-shadow: 8px 8px 0 var(--navy);
}
.fin > :first-child { margin-right: 8px; width: calc(100% - 8px); }
.star {
  width: 8rem; height: 8rem; display: grid; place-items: center; border: var(--edge); border-radius: 26px; background: var(--yellow-tint);
  font-family: var(--emoji); font-size: 5rem; line-height: 1; animation: rs-star 600ms ease-out 120ms both;
}
.fin-h { font: 700 2rem/1.3 var(--display); color: var(--navy); overflow-wrap: anywhere; max-width: 100%; }
.fin-p { font-size: 1.25rem; font-weight: 600; line-height: 1.4; color: var(--muted); }
.fin .big-btn { margin-top: 0.5rem; width: calc(100% - 6px); margin-right: 6px; }
.fin .foot { margin-top: auto; padding-top: 1rem; }
.gu .fin-card { gap: 1.125rem; }
.gu .chip { white-space: normal; }

/* ---------- For grown-ups: the gate, the grown-ups home, the editor, the picker, the chart, More, About ---------- */
.no-in { animation: none; }
.home-empty { font-size: 1.25rem; font-weight: 600; color: var(--muted); }
.adult { display: flex; flex-direction: column; gap: 1.25rem; max-width: 52rem; margin: 0 auto; }
.adult-top { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1rem; }
.adult-words { display: grid; gap: 0.125rem; min-width: 0; flex: 1 1 12rem; }
.eyebrow { font-size: 0.875rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); overflow-wrap: anywhere; }
.adult-h { font: 700 1.75rem/1.3 var(--display); color: var(--navy); overflow-wrap: anywhere; }
.lead { font-size: 1.125rem; font-weight: 600; color: var(--muted); }
.card { border: var(--edge); border-radius: 18px; background: #fff; box-shadow: 4px 4px 0 var(--navy); margin-right: 4px; }
.hint { font-size: 0.9375rem; font-weight: 500; line-height: 1.4; color: var(--muted); }
.lbl { font-size: 0.875rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.field { display: grid; gap: 0.5rem; padding: 0.875rem 1rem 1rem; }
.input {
  width: 100%; min-width: 0; min-height: var(--tap); padding: 0.5rem 0.75rem; border: var(--edge); border-radius: 14px; background: #fff;
  color: var(--ink); font: 600 1.0625rem/1.3 var(--text); -webkit-user-select: text; user-select: text;
}
.input:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
.input:disabled { background: var(--paper); color: var(--muted); }
.pill.go { background: var(--navy); color: var(--yellow); }
.pill.add { background: var(--yellow); }
.pill .ic { width: 1.25em; height: 1.25em; }
.ic { width: 1.375rem; height: 1.375rem; flex: none; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn {
  flex: none; display: inline-grid; place-items: center; width: 2.75rem; height: 2.75rem; min-width: 44px; min-height: 44px; padding: 0;
  border: var(--edge); border-radius: 999px; background: #fff; color: var(--navy); box-shadow: 2px 2px 0 var(--navy);
}
.icon-btn:disabled { opacity: 0.35; box-shadow: none; cursor: default; }
.icon-btn:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--navy); }
.gu-sec { display: grid; gap: 0.75rem; }
.gu-h2 { font-size: 1.25rem; font-weight: 800; line-height: 1.3; color: var(--navy); }
.gu-list, .gu-charts, .more-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.875rem; }
.gu-row { display: grid; gap: 0.75rem; padding: 0.75rem 0.875rem; }
.gu-main { display: flex; align-items: center; gap: 0.875rem; min-width: 0; }
.gu-pic { flex: none; width: 3.5rem; height: 3.5rem; display: grid; place-items: center; border: var(--edge); border-radius: 14px; background: var(--yellow-tint); overflow: hidden; }
.gu-pic img { width: 76%; height: 76%; object-fit: contain; }
.gu-pic img.is-photo, .srow-pic img.is-photo { width: 100%; height: 100%; object-fit: cover; }
.gu-words { display: grid; gap: 0.125rem; min-width: 0; }
.gu-name { font-size: 1.1875rem; font-weight: 800; color: var(--navy); overflow-wrap: anywhere; }
.gu-meta { font-size: 0.9375rem; font-weight: 600; color: var(--muted); }
.gu-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.625rem; }
.gu-acts .pill { min-height: 44px; }
.gu-confirm { display: grid; gap: 0.625rem; padding: 0.75rem 0.875rem; border: var(--edge); border-radius: 14px; background: var(--yellow-tint); }
.gu-confirm-p { font-size: 1rem; font-weight: 600; line-height: 1.4; color: var(--ink); }
.gu-confirm-acts { display: flex; flex-wrap: wrap; gap: 0.625rem; }
.gu-new { justify-self: start; }
.gu-langs { display: flex; flex-wrap: wrap; gap: 0.625rem; }
.pill.lang[aria-checked="true"] { background: var(--navy); color: var(--yellow); }
.pill.lang[aria-checked="true"]::before { content: ''; width: 0.55em; height: 0.55em; border-radius: 50%; background: var(--yellow); }
.switch-row { display: flex; align-items: center; padding: 0.5rem 0.875rem; }
.switch-btn { display: inline-flex; align-items: center; gap: 0.75rem; min-height: var(--tap); padding: 0.25rem 0.5rem 0.25rem 0; border: 0; background: none; color: var(--navy); font-size: 1.0625rem; font-weight: 800; text-align: left; }
.switch-track { position: relative; flex: none; width: 3.375rem; height: 1.875rem; border: var(--edge); border-radius: 999px; background: var(--paper); transition: background-color var(--in) ease-out; }
.switch-knob { position: absolute; top: 0.1875rem; left: 0.1875rem; width: 1.25rem; height: 1.25rem; border: var(--edge); border-radius: 50%; background: #fff; transition: transform var(--in) ease-out; }
.switch-btn[aria-checked="true"] .switch-track { background: var(--mint); }
.switch-btn[aria-checked="true"] .switch-knob { transform: translateX(1.5rem); }
.switch-word { overflow-wrap: anywhere; min-width: 0; }
.gu-charts { display: flex; flex-wrap: wrap; gap: 0.625rem; }
/* For grown-ups' menu (review 2): one big row per page, the words left, the arrow right */
.gu-menu-list { list-style: none; margin: 0; padding: 0 4px 4px 0; display: grid; gap: 0.75rem; }
.nav-card.gu-menu-row { min-height: max(56px, 4rem); font-size: 1.1875rem; }
.gu-menu-row:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--navy); }
.nav-card { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3.5rem; padding: 0.75rem 1rem; color: var(--navy); font-size: 1.125rem; font-weight: 800; text-decoration: none; }
.nav-card span { min-width: 0; overflow-wrap: anywhere; }
.adult .foot { margin-top: auto; padding-top: 0.5rem; }

/* the gate */
.gate { display: grid; justify-items: center; gap: 0.75rem; width: 100%; max-width: 28rem; margin: 0.5rem auto 0; padding: 1.5rem 1.25rem; text-align: center;
  border: var(--edge); border-radius: 26px; background: #fff; box-shadow: 8px 8px 0 var(--navy); }
.gate-page .gate { width: calc(100% - 8px); margin-right: auto; }
.gate-h { font: 700 1.75rem/1.3 var(--display); color: var(--navy); }
.gate-lead { font-size: 1.0625rem; font-weight: 600; color: var(--muted); }
.gate-q { font-size: 1.375rem; font-weight: 800; line-height: 1.35; color: var(--navy); }
.gate-a { min-width: 8rem; min-height: 3.5rem; padding: 0.375rem 0.75rem; border: var(--edge); border-radius: 16px; background: var(--paper); font: 700 1.875rem/1.4 var(--display); color: var(--navy); }
.gate-pad { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.625rem; width: 100%; max-width: 20rem; padding: 0 3px 3px 0; }
.gate-key { min-height: 3.75rem; border: var(--edge); border-radius: 16px; background: #fff; color: var(--navy); font-size: 1.5rem; font-weight: 800; box-shadow: 3px 3px 0 var(--navy); display: grid; place-items: center; }
.gate-key .tk { width: 1.1em; height: 1.1em; }
.gate-key.is-soft { background: var(--paper); }
.gate-key.is-go { background: var(--mint); }
.gate-key:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--navy); }
.gate-note { min-height: 1.5rem; font-size: 1rem; font-weight: 700; color: #a3261e; }

/* the editor */
.ready-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1rem; padding: 0.75rem 1rem; }
.ready-words { display: grid; gap: 0.25rem; flex: 1 1 14rem; min-width: 0; }
.sw-name { font-size: 1.125rem; font-weight: 800; color: var(--navy); }
.ready-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.875rem; }
.input.time { width: auto; min-width: 7.5rem; background: var(--yellow-tint); font-weight: 800; color: var(--navy); }
.input.time:disabled { background: var(--paper); color: var(--muted); }
.steps-h { display: grid; gap: 0.25rem; margin-top: 0.25rem; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.srow { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 0.625rem 0.75rem; padding: 0.625rem 0.75rem; }
.srow-pic { width: 3.5rem; height: 3.5rem; min-width: 44px; padding: 0; display: grid; place-items: center; border: var(--edge); border-radius: 14px; background: var(--yellow-tint); overflow: hidden; }
.srow-pic img { width: 76%; height: 76%; object-fit: contain; }
.srow-acts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 0.5rem; }
.handle { display: inline-grid; place-items: center; width: max(44px, 2.75rem); height: max(44px, 2.75rem); color: var(--navy); cursor: grab; touch-action: none; border-radius: 12px; }
.handle .ic { width: 1.5rem; height: 1.5rem; }
.srow.is-dragging { background: var(--yellow-tint); box-shadow: 6px 6px 0 var(--navy); position: relative; z-index: 2; }
.ed-bar { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.ed-bar .pill { flex: 1 1 12rem; min-height: 3.25rem; }
@media (min-width: 700px) {
  .adult-h { font-size: 2rem; }
  .srow { grid-template-columns: auto minmax(0, 1fr) auto; }
  .srow-acts { grid-column: auto; }
  .gu-row { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .gu-confirm { grid-column: 1 / -1; }
}

/* the picture picker: a sheet over the editor */
.sheet {
  width: min(46rem, calc(100% - 1.5rem)); max-width: none; max-height: calc(100dvh - 1.5rem); padding: 0; margin: auto;
  border: var(--edge); border-radius: 26px; background: var(--paper); color: var(--ink); box-shadow: 6px 6px 0 var(--navy); overflow: hidden;
}
.sheet[open] { display: flex; flex-direction: column; animation: rs-in var(--in) ease-out both; }
.sheet::backdrop { background: rgba(40, 40, 88, 0.4); }
.sheet-top { flex: none; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; padding: 1rem 1rem 0.75rem; background: var(--paper); border-bottom: var(--edge); }
.sheet-h { font: 700 1.375rem/1.3 var(--display); color: var(--navy); }
.pick-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(6rem, 1fr)); gap: 0.625rem; padding: 1rem; }
.pick {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 0.375rem; min-height: 44px; min-width: 0; padding: 0.625rem 0.25rem;
  border: 1.5px solid var(--navy); border-radius: 14px; background: #fff; color: var(--navy); text-align: center;
}
.pick img { width: 3rem; height: 3rem; }
.pick-cam { display: grid; place-items: center; height: 3.15rem; color: var(--navy); }   /* P2-219: a drawn camera, not an emoji */
.pick-cam svg { width: 2.5rem; height: 2.5rem; stroke-width: 1.75; }
.pick-word { font-size: 0.9375rem; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; max-width: 100%; }
.pick[aria-pressed="true"] { background: var(--yellow); border-width: 3px; }
.pick-photo { background: var(--lavender); }

/* the chart */
.chart-frame { margin: 0 4px 0 0; padding: 0.75rem; display: grid; place-items: center; min-height: 12rem; }
.chart-img { display: block; width: auto; height: auto; max-width: 100%; max-height: 70vh; border: 1.5px solid var(--navy); border-radius: 6px; background: #fff; }
.chart-save { width: calc(100% - 6px); }

/* More, About */
.more-card { display: flex; align-items: center; gap: 1rem; padding: 1rem; color: var(--navy); text-decoration: none; }
.more-pic { flex: none; width: 4rem; height: 4rem; display: grid; place-items: center; border: var(--edge); border-radius: 16px; background: var(--yellow-tint); font-family: var(--emoji); font-size: 2.5rem; line-height: 1; }
.more-words { display: grid; gap: 0.25rem; min-width: 0; }
.more-name { font-size: 1.1875rem; font-weight: 800; overflow-wrap: anywhere; }
.more-line { font-size: 1rem; font-weight: 500; line-height: 1.4; color: var(--ink); }
.about-sec { display: grid; gap: 0.625rem; padding: 1rem 1.125rem; }
.about-sec p { font-size: 1rem; line-height: 1.5; }
.about-link { justify-self: start; }
.about-name { font: 700 1.5rem/1.3 var(--display); color: var(--navy); }
.about-from { font-weight: 700; color: var(--navy); }
.licence summary { display: flex; align-items: center; min-height: 44px; font-weight: 800; color: var(--navy); cursor: pointer; }
.licence-text { margin: 0.5rem 0 0; max-height: 20rem; overflow: auto; padding: 0.75rem; border: 1.5px solid var(--navy); border-radius: 12px; background: var(--paper);
  font-size: 0.8125rem; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; -webkit-user-select: text; user-select: text; }

/* Reduce Motion: every movement becomes a fade with the same timing */
@media (prefers-reduced-motion: reduce) {
  .screen, .now.is-new .now-pic, .now.is-new .now-words { animation-name: rs-fade; }
  .star, .sheet[open] { animation-name: rs-fade; }
  /* the knob and the ready-by fill still change place, but by a fade at the same timing: out, moved while hidden, in */
  .switch-knob, .fill { transition: none; }
  .switch-btn[aria-checked="false"] .switch-knob { animation: rs-swap-a var(--in) ease-out; }
  .switch-btn[aria-checked="true"] .switch-knob { animation: rs-swap-b var(--in) ease-out; }
  .fill[data-p="1"] { animation: rs-swap-a var(--in) ease-out; }
  .fill[data-p="2"] { animation: rs-swap-b var(--in) ease-out; }
  .pill:active, .big-btn:active, .done-btn:active, .rcard:active { transform: none; opacity: 0.8; }
}

/* ---------- Rewards (brief, "Rewards"): stickers, the sticker book, the family reward ---------- */
/* a round sticker, as raisesteady.com's (css/nx-rewards.css): white, a white rim, the navy edge and the offset shadow;
   gold ones a gold rim; an outline is the one still to come */
.stk { position: relative; flex: none; display: inline-grid; place-items: center; width: 4.5rem; height: 4.5rem; }
.stk.is-s { width: 2rem; height: 2rem; }
.stk.is-m { width: 3.25rem; height: 3.25rem; }
.stk.is-l { width: 5.25rem; height: 5.25rem; }
.stk.is-xl { width: 9rem; height: 9rem; }
.stk-disc {
  display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; background: #fff;
  border: 4px solid #fff; box-shadow: 0 0 0 2px var(--navy), 3px 4px 0 2px var(--navy);
}
.stk.is-s .stk-disc { border-width: 2px; box-shadow: 0 0 0 1.5px var(--navy), 1px 2px 0 1.5px var(--navy); }
.stk.is-xl .stk-disc { border-width: 6px; box-shadow: 0 0 0 2px var(--navy), 6px 7px 0 2px var(--navy); }
.stk-disc img { width: 72%; height: 72%; }
.stk.is-gold .stk-disc { border-color: #ffd23f; box-shadow: 0 0 0 2px var(--navy), 0 0 0 5px var(--yellow-tint), 3px 5px 0 4px var(--navy); }
.stk.is-todo .stk-disc { background: #fff; border: 3px dashed #a9a9be; box-shadow: none; }
.stk.is-todo .stk-disc img { opacity: 0.28; filter: grayscale(1); }
.stk.is-gold.is-todo .stk-disc { border-color: #e9c660; }

/* the done card lifts a little on Done; with Reduce Motion it fades in again, the same timing */
@keyframes rs-lift { 0% { transform: none; } 40% { transform: translateY(-0.375rem) scale(1.04); box-shadow: 5px 7px 0 var(--navy); } 100% { transform: none; } }
@keyframes rs-glow { from { opacity: 0.35; } to { opacity: 1; } }
.st.is-lift { animation: rs-lift var(--in) ease-out; }

/* home: the sticker book button, the good news, the family reward */
.home-rewards { display: flex; flex-wrap: wrap; align-items: stretch; gap: 1rem 1.25rem; }
.book-card {
  flex: 1 1 18rem; display: flex; align-items: center; gap: 1.125rem; min-height: 4.5rem; padding: 0.875rem 1.25rem 0.875rem 1rem; margin-right: 6px;
  border: var(--edge); border-radius: 24px; background: var(--yellow); color: var(--navy); text-decoration: none; box-shadow: 6px 6px 0 var(--navy);
}
.book-card:active { transform: translate(3px, 3px); box-shadow: 3px 3px 0 var(--navy); }
.book-words { display: grid; gap: 0.25rem; min-width: 0; }
.book-name { font: 700 1.375rem/1.25 var(--display); overflow-wrap: break-word; min-width: 0; }
.book-card .stk { width: 4.25rem; height: 4.25rem; }
.book-meta { font-size: 1.0625rem; font-weight: 700; line-height: 1.3; color: var(--navy); overflow-wrap: anywhere; }
.home-news { flex: 1 1 18rem; display: grid; align-content: center; gap: 0.75rem; min-width: 0; }
.row-line { font-size: 1.25rem; font-weight: 800; line-height: 1.3; color: var(--navy); }
.goal { display: grid; gap: 0.5rem; padding: 0.75rem 1rem; border: 2px dashed #a9a9be; border-radius: 18px; background: #fff; }
.goal-text { font-size: 1.0625rem; font-weight: 700; line-height: 1.35; color: var(--navy); overflow-wrap: anywhere; }
.goal-bar { display: block; height: 0.75rem; border: 1.5px solid var(--navy); border-radius: 999px; background: var(--paper); overflow: hidden; }
.goal-bar i { display: block; height: 100%; border-radius: inherit; background: var(--mint); }
.goal.is-reached { border: var(--edge); border-style: solid; background: var(--mint-tint); }
.goal.is-reached .goal-text { font-size: 1.1875rem; font-weight: 800; }

/* All done: the sticker is the one picture */
/* the sticker on a yellow sun, like the site's yellow accents */
.fin-stk { display: grid; place-items: center; padding: 1rem 1.25rem 1.25rem 1rem; border-radius: 50%; background: var(--yellow); animation: rs-star 600ms ease-out 120ms both; }
.fin.is-new .fin-stk { animation-name: rs-pop; animation-duration: 640ms; }
@keyframes rs-pop { 0% { opacity: 0; transform: scale(0.6) rotate(-10deg); } 70% { opacity: 1; transform: scale(1.06) rotate(2deg); } 100% { opacity: 1; transform: none; } }
.fin-sticker { font-size: 1.25rem; font-weight: 800; line-height: 1.4; color: var(--navy); }
.fin-gold { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.625rem; justify-items: center; }
.fin-gold li { display: flex; align-items: center; gap: 0.875rem; text-align: left; font-size: 1.125rem; font-weight: 800; line-height: 1.35; color: var(--navy); }
.fin-goal { width: 100%; text-align: left; }
.fin-acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem 1rem; }
.book-btn { background: var(--yellow); }

/* the sticker book */
.book { display: flex; flex-direction: column; gap: 1.25rem; max-width: 60rem; margin: 0 auto; }
.bk-head { display: grid; gap: 0.75rem; padding: 1.125rem 1.25rem; margin-right: 6px; border: var(--edge); border-radius: 24px; background: #fff; box-shadow: 6px 6px 0 var(--navy); }
.bk-count { font: 700 1.375rem/1.3 var(--display); color: var(--navy); overflow-wrap: anywhere; }
.bk-sec { display: grid; gap: 0.75rem; }
.bk-h2 { font: 700 1.375rem/1.3 var(--display); color: var(--navy); }
.bk-sub { margin-top: -0.25rem; font-size: 1rem; font-weight: 600; line-height: 1.4; color: var(--muted); }
.bk-grid { list-style: none; margin: 0; padding: 0.5rem 0.375rem 0.25rem 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr)); gap: 1.25rem 0.75rem; }
.bk-tile { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; min-width: 0; text-align: center; }
.bk-word { font-size: 1.0625rem; font-weight: 800; line-height: 1.25; color: var(--navy); overflow-wrap: anywhere; max-width: 100%; }
.bk-tile.is-todo .bk-word { color: var(--muted); font-weight: 700; }
.bk-tile .chip { font-size: 1rem; min-height: 1.625rem; }
/* a sticker with its labels at its corners: room is kept around the sticker so they stay inside its tile */
.bk-stk { position: relative; display: inline-grid; place-items: center; padding: 0.625rem 1rem 0.5rem; }
.bk-times, .bk-new {
  position: absolute; padding: 0.0625rem 0.4375rem; border: 2px solid var(--navy); border-radius: 999px;
  font-size: 0.875rem; font-weight: 800; line-height: 1.25; white-space: nowrap;
}
.bk-times { right: 0; bottom: 0; background: var(--navy); color: var(--yellow); }
.bk-new { right: 0; top: 0; background: var(--yellow); color: var(--navy); }

/* For grown-ups: the family reward */
.gu-goal { gap: 0.625rem; }
.gu-need { display: flex; align-items: center; gap: 0.875rem; }
.gu-need-n { min-width: 2.5rem; text-align: center; font: 700 1.5rem/1.2 var(--display); color: var(--navy); }
.gu-goal-note:empty, .kid-note:empty { display: none; }
.gu-goal-note, .kid-note { font-size: 1rem; font-weight: 700; color: #a3261e; }
.gu-goal-acts { display: flex; flex-wrap: wrap; gap: 0.625rem; }
.gu-goal-now { margin-right: 4px; }
@media (min-width: 700px) {
  .book-name { font-size: 1.75rem; }
  .book-card .stk { width: 5.25rem; height: 5.25rem; }
  .bk-grid { grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); }
  .stk.is-l { width: 6rem; height: 6rem; }
  .stk.is-xl { width: 11rem; height: 11rem; }
  .bk-count { font-size: 1.625rem; }
}
@media (prefers-reduced-motion: reduce) {
  .fin-stk, .fin.is-new .fin-stk { animation-name: rs-fade; }
  .st.is-lift { animation-name: rs-glow; }
  .book-card:active { transform: none; opacity: 0.8; }
}

/* ---------- several children (A5): the site's colours, always with the name beside them ---------- */
.is-yellow { --kid: var(--yellow); }
.is-mint { --kid: var(--mint); }
.is-lavender { --kid: var(--lavender); }
.is-coral { --kid: #fb7d7e; }
.kid-dot { flex: none; display: inline-grid; place-items: center; width: 2rem; height: 2rem; border: var(--edge); border-radius: 50%; background: var(--kid); color: var(--navy); font: 800 1rem/1 var(--text); }
.kid-dot.is-m { width: 3rem; height: 3rem; font-size: 1.375rem; }
.kid-dot.is-l { width: 5rem; height: 5rem; font: 700 2.25rem/1 var(--display); box-shadow: 3px 3px 0 var(--navy); }
.who-list { list-style: none; margin: 0; padding: 0 8px 8px 0; display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
.who-card {
  display: flex; align-items: center; gap: 1.25rem; width: 100%; height: 100%; min-height: 7rem; padding: 1.25rem 1.5rem; border: var(--edge); border-radius: 26px;
  background: #fff; color: var(--navy); box-shadow: 6px 6px 0 var(--navy); text-align: left; font: inherit;
}
.who-card:active { transform: translate(3px, 3px); box-shadow: 3px 3px 0 var(--navy); }
.who-name { min-width: 0; font: 700 1.75rem/1.25 var(--display); overflow-wrap: anywhere; }
.who-pill { justify-self: start; max-width: 100%; gap: 0.625rem; padding-left: 0.375rem; }
.who-pill-name { min-width: 0; font-weight: 800; overflow-wrap: anywhere; }
.who-pill-change { padding-left: 0.625rem; border-left: 1.5px solid var(--navy); color: var(--muted); font-weight: 700; }
@media (min-width: 700px) {
  .who-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.75rem; }
  .who-card { min-height: 9rem; }
  .who-name { font-size: 2.25rem; }
}
@media (min-width: 1000px) { .who-list { grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); } }
.gu-kids { display: flex; flex-wrap: wrap; gap: 0.625rem; }
.pill.kid-pick { max-width: 100%; padding-left: 0.375rem; }
.pill.kid-pick span:last-child { min-width: 0; overflow-wrap: anywhere; }
.pill.kid-pick[aria-checked="true"] { background: var(--navy); color: var(--yellow); }
.kid-row { display: grid; gap: 0.75rem; padding: 0.75rem 0.875rem; }
.kid-main { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.kid-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; }
.kid-acts .lbl { flex-basis: 100%; overflow-wrap: anywhere; }
.kid-acts .pill { min-height: 44px; margin-left: auto; }
.kid-colours { display: flex; flex-wrap: wrap; gap: 0.625rem; padding: 4px; }
.kid-colour { display: inline-grid; place-items: center; width: 2.75rem; height: 2.75rem; min-width: 44px; min-height: 44px; padding: 0; border: var(--edge); border-radius: 50%; background: #fff; }
.kid-swatch { width: 1.75rem; height: 1.75rem; border: 1.5px solid var(--navy); border-radius: 50%; background: var(--kid); }
.kid-colour[aria-checked="true"] { box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--navy); }
.kid-colour[aria-checked="true"] .kid-swatch { width: 2.125rem; height: 2.125rem; border-width: 2px; }
.kid-form { gap: 0.625rem; }
.kid-form[hidden] { display: none; }
.gu-h3 { font-size: 1.125rem; font-weight: 800; line-height: 1.3; color: var(--navy); }
.kid-add { justify-self: start; }
.kid-add[hidden] { display: none; }
.kid-from .pill { text-align: left; }

/* ---------- ready-made routines (A6) ---------- */
.gu-adds { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.gu-adds .gu-new { justify-self: auto; }
.rg-card { display: grid; gap: 0.75rem; padding: 0.875rem; }
.rg-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.rg-step { display: inline-flex; align-items: center; gap: 0.375rem; max-width: 100%; padding: 0.25rem 0.625rem 0.25rem 0.25rem; border: 1.5px solid var(--navy); border-radius: 999px; background: var(--yellow-tint); font-size: 0.9375rem; font-weight: 700; color: var(--navy); }
.rg-step img { flex: none; width: 1.75rem; height: 1.75rem; }
.rg-step span { min-width: 0; overflow-wrap: anywhere; }
.rg-status:empty { display: none; }
.gu-acts .pill[hidden] { display: none; }
@media (min-width: 1000px) { .rg-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- skip for today and copies (B12) ---------- */
.st { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.st.is-skip { background: var(--paper); border-style: dashed; }
.st.is-skip img { filter: grayscale(1); opacity: 0.55; }
.st.is-skip .chip { background: var(--paper); color: var(--muted); border-color: var(--muted); }
.skip-box { display: grid; gap: 0.625rem; padding: 0.75rem 0.875rem; border: var(--edge); border-radius: 14px; background: var(--yellow-tint); margin-right: 4px; }
.skip-box[hidden] { display: none; }
.skip-q { font-size: 1.0625rem; font-weight: 700; line-height: 1.4; color: var(--ink); overflow-wrap: anywhere; }
.skip-box .pill[hidden] { display: none; }
.ed-today { list-style: none; margin: 0; padding: 0 4px 4px 0; display: flex; flex-wrap: wrap; gap: 0.625rem; }
.pill.ed-skip { max-width: 100%; padding-left: 0.375rem; }
.pill.ed-skip img { flex: none; width: 2rem; height: 2rem; object-fit: contain; border-radius: 8px; }
.pill.ed-skip img.is-photo { object-fit: cover; }
.ed-skip-word { min-width: 0; overflow-wrap: anywhere; }
.pill.ed-skip[aria-pressed="true"] { background: var(--paper); border-style: dashed; box-shadow: none; color: var(--muted); }
.pill.ed-skip[aria-pressed="true"] img { filter: grayscale(1); opacity: 0.55; }
.pill.ed-skip .chip { font-size: 0.875rem; min-height: 1.5rem; background: #fff; color: var(--muted); border-color: var(--muted); }
.gu-sec[hidden] { display: none; }
.hint:empty { display: none; }

/* ---------- save or load a copy (A7) ---------- */
.copy-sum { gap: 0.625rem; }
.copy-sum[hidden], .copy-confirm[hidden] { display: none; }
.copy-list { margin: 0; padding-left: 1.25rem; display: grid; gap: 0.25rem; font-size: 1.0625rem; font-weight: 700; color: var(--navy); }
.copy-list li { overflow-wrap: anywhere; }
.copy-save { margin-right: 6px; width: calc(100% - 6px); }

/* ---------- history for grown-ups (B7): calm, no scores, no red ---------- */
.hist-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.875rem; }
.hist-day { display: grid; gap: 0.625rem; padding: 0.75rem 0.875rem; }
.hist-date { font-size: 1.125rem; font-weight: 800; line-height: 1.3; color: var(--navy); overflow-wrap: anywhere; }
.hist-routines { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; }
.hist-r { display: inline-flex; align-items: center; gap: 0.625rem; min-width: 0; max-width: 100%; }
.hist-r .gu-pic { width: 2.75rem; height: 2.75rem; border-radius: 12px; }
.hist-name { min-width: 0; font-size: 1.0625rem; font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.hist-empty { padding: 1rem; font-size: 1.0625rem; font-weight: 600; color: var(--muted); }
.hist-share { margin-right: 6px; width: calc(100% - 6px); }
@media (min-width: 1000px) { .hist-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- stage 1b (brief, "Improvements"): the quiet timer (A2) ---------- */
.qtimer { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.qt-disc { flex: none; width: 4.5rem; height: 4.5rem; }
.qt-face { fill: #fff; stroke: var(--navy); stroke-width: 3; }
.qt-part { fill: var(--mint); stroke: var(--navy); stroke-width: 2.5; stroke-linejoin: round; }
.qt-pin { fill: var(--navy); }
.qt-line { min-width: 0; font-size: 1.375rem; font-weight: 800; line-height: 1.25; color: var(--navy); overflow-wrap: anywhere; }
.qtimer.is-over .qt-line { font-size: 1.125rem; color: var(--ink); }
@media (min-width: 700px) { .qt-disc { width: 5.5rem; height: 5.5rem; } .qt-line { font-size: 1.625rem; } .qtimer.is-over .qt-line { font-size: 1.25rem; } }
@media (prefers-reduced-motion: reduce) {
  .qtimer[data-p="1"] .qt-part { animation: rs-swap-a var(--in) ease-out; }
  .qtimer[data-p="2"] .qt-part { animation: rs-swap-b var(--in) ease-out; }
}
/* the editor: each step's extras (timer, small steps, choices), a row per step that opens a panel under it */
.ed-extras { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.ex-row { display: grid; overflow: hidden; }
.ex-open { display: flex; align-items: center; gap: 0.875rem; width: 100%; min-height: 3.5rem; padding: 0.625rem 0.875rem; border: 0; border-radius: 16px; background: none; color: var(--navy); text-align: left; }
.ex-open > .ic { margin-left: auto; transition: transform var(--in) ease-out; }
.ex-open[aria-expanded="true"] > .ic { transform: rotate(180deg); }
.ex-words { display: grid; gap: 0.125rem; min-width: 0; }
.ex-name { font-size: 1.125rem; font-weight: 800; overflow-wrap: anywhere; }
.ex-sum { font-size: 0.9375rem; font-weight: 600; color: var(--muted); overflow-wrap: anywhere; }
.ex-panel { display: grid; gap: 1rem; padding: 0.875rem 0.875rem 1rem; border-top: 1.5px solid var(--navy); background: var(--paper); }
@media (prefers-reduced-motion: reduce) {
  /* the arrow turning over is a movement: it fades out and back in its new way instead */
  .ex-open > .ic { transition: none; }
  .ex-open[aria-expanded="true"] > .ic { animation: rs-swap-a var(--in) ease-out; }
  .ex-open[aria-expanded="false"] > .ic { animation: rs-swap-b var(--in) ease-out; }
}
.ex-sec { display: grid; gap: 0.5rem; }
.ex-h { font-size: 1.0625rem; font-weight: 800; color: var(--navy); }
.ex-step { display: flex; flex-wrap: wrap; align-items: center; gap: 0.625rem; }
.ex-val { min-width: 7rem; font-size: 1.125rem; font-weight: 800; color: var(--navy); text-align: center; }

/* read it to me (A3) */
.read-btn { align-self: flex-start; background: var(--lavender); }
.read-btn .ic { width: 1.4em; height: 1.4em; }

/* Now and Next (B2): the one after Now, small, under the big card */
.nn-next { display: flex; align-items: center; gap: 1rem; margin-right: 6px; padding: 0.875rem 1rem; border: var(--edge); border-radius: 22px; background: var(--yellow-tint); box-shadow: 4px 4px 0 var(--navy); }
.nn-pic { flex: none; width: 4.5rem; height: 4.5rem; display: grid; place-items: center; border: var(--edge); border-radius: 16px; background: #fff; overflow: hidden; }
.nn-pic img { width: 76%; height: 76%; object-fit: contain; }
.nn-pic img.is-photo { width: 100%; height: 100%; object-fit: cover; }
.nn-words { display: grid; gap: 0.25rem; min-width: 0; }
.nn-word { font-size: 1.5rem; font-weight: 800; line-height: 1.25; color: var(--navy); overflow-wrap: anywhere; }
@media (min-width: 700px) { .nn-pic { width: 6rem; height: 6rem; } .nn-word { font-size: 1.875rem; } }
/* the grown-up check (B3): a calm question under Done; the hold button's ring fills in a second */
.check-box { display: grid; gap: 0.625rem; padding: 0.875rem 1rem 1rem; border: var(--edge); border-radius: 18px; background: var(--yellow-tint); }
.check-q { font-size: 1.375rem; font-weight: 800; line-height: 1.3; color: var(--navy); overflow-wrap: anywhere; }
.check-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 0.625rem 0.875rem; }
.hold-btn { min-height: 3.5rem; padding: 0.375rem 1.25rem 0.375rem 0.5rem; gap: 0.625rem; background: var(--navy); color: var(--yellow); font-size: 1.125rem; }
.hold-ring { flex: none; width: 2.5rem; height: 2.5rem; transform: rotate(-90deg); }
.hr-back { fill: none; stroke: rgba(254, 219, 113, 0.4); stroke-width: 5; }
.hr-fill { fill: none; stroke: var(--yellow); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 113.1; stroke-dashoffset: 113.1; }
.hold-btn.is-holding .hr-fill { stroke-dashoffset: 0; transition: stroke-dashoffset 1s linear; }
@media (prefers-reduced-motion: reduce) {
  .hr-fill { stroke-dashoffset: 0; opacity: 0; }
  .hold-btn.is-holding .hr-fill { opacity: 1; transition: opacity 1s linear; }
}
.done-btn[aria-disabled="true"] { opacity: 0.55; }

/* small steps (B4): a checklist inside the now-card */
.subs { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.sub { display: flex; align-items: center; gap: 0.75rem; width: 100%; min-height: 3.25rem; padding: 0.5rem 0.875rem 0.5rem 0.625rem; border: var(--edge); border-radius: 16px; background: #fff; color: var(--navy); text-align: left; }
.sub img { flex: none; width: 2.5rem; height: 2.5rem; }
.sub-box { flex: none; display: grid; place-items: center; width: 2rem; height: 2rem; border: var(--edge); border-radius: 10px; background: #fff; }
.sub-box .tk { width: 1.4rem; height: 1.4rem; stroke-width: 3.6; }
.sub[aria-checked="true"] { background: var(--mint-tint); }
.sub[aria-checked="true"] .sub-box { background: var(--mint); }
.sub-word { min-width: 0; font-size: 1.25rem; font-weight: 800; line-height: 1.25; overflow-wrap: break-word; hyphens: auto; }
.sub[aria-checked="true"] .sub-word { text-decoration: line-through; text-decoration-thickness: 2px; }
/* choices (B10): up to four pictures to pick from */
.choice-box { display: grid; gap: 0.5rem; }
.choice-q { font-size: 1.25rem; font-weight: 800; color: var(--navy); }
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr)); gap: 0.625rem; padding: 0 4px 4px 0; }
.choice { display: flex; flex-direction: column; align-items: center; gap: 0.375rem; min-width: 0; padding: 0.625rem 0.375rem; border: var(--edge); border-radius: 16px; background: #fff; color: var(--navy); box-shadow: 3px 3px 0 var(--navy); }
.choice img { width: 3.5rem; height: 3.5rem; }
.choice-word { font-size: 1.125rem; font-weight: 800; line-height: 1.2; overflow-wrap: break-word; hyphens: auto; max-width: 100%; text-align: center; }
.choice[aria-checked="true"] { background: var(--yellow); box-shadow: 3px 3px 0 var(--navy), inset 0 0 0 2px var(--navy); }
@media (min-width: 700px) { .sub-word { font-size: 1.375rem; } .choice img { width: 4.5rem; height: 4.5rem; } }
/* the editor's small steps and choices */
.ex-subs, .ex-choices { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.ex-sub { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0.5rem; }
.ex-sub-pic { width: max(44px, 3rem); height: max(44px, 3rem); color: var(--navy); }   /* P2-219: never under 44 px */
.ex-sub-pic .ic { width: 1.5rem; height: 1.5rem; }
.ex-add { display: grid; gap: 0.375rem; }
.ex-add-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.ex-add-row .input { flex: 1 1 10rem; }
.ex-choice { display: flex; align-items: center; gap: 0.75rem; }
.ex-choice-word { flex: 1 1 auto; min-width: 0; font-weight: 800; color: var(--navy); overflow-wrap: anywhere; }
.ex-choice-add { justify-self: start; }
.ex-msg:empty { display: none; }
.pick-none { background: var(--paper); justify-content: center; }
/* the history: the choices under a routine's name */
.hist-words { display: grid; gap: 0.125rem; min-width: 0; }
.hist-choice { font-size: 0.9375rem; font-weight: 600; color: var(--muted); overflow-wrap: anywhere; }

/* the waiting board (B8) and the feelings board (B9) */
.home-tools { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; }
.pill.tool { gap: 0.625rem; padding-left: 0.625rem; }
.pill.tool img { width: 2rem; height: 2rem; }
.wait-page, .feel-page { display: flex; flex-direction: column; gap: 1.25rem; max-width: 52rem; margin: 0 auto; }
.wait-body, .feel-body { display: grid; gap: 1.25rem; }
.wait-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr)); gap: 0.625rem; padding: 0 3px 3px 0; }
.wait-pick[aria-checked="true"] { background: var(--yellow); border-width: 3px; }
.wait-go { width: calc(100% - 6px); }
.wait-card, .feel-card {
  display: flex; flex-direction: column; align-items: center; gap: 1rem; margin-right: 8px; padding: 1.5rem 1.25rem 1.75rem; text-align: center;
  border: var(--edge); border-radius: 26px; background: #fff; box-shadow: 8px 8px 0 var(--navy);
}
.wait-pic, .feel-big { width: min(12rem, 50vw); aspect-ratio: 1; display: grid; place-items: center; border: var(--edge); border-radius: 26px; background: var(--yellow-tint); }
.wait-pic img, .feel-big img { width: 76%; height: 76%; }
.wait-for, .feel-line { font: 700 1.75rem/1.3 var(--display); color: var(--navy); overflow-wrap: anywhere; max-width: 100%; }
.wait-for:focus, .feel-line:focus { outline: none; }
.wait-card .qtimer { justify-content: center; }
.wait-card .qt-disc { width: 7rem; height: 7rem; }
.wait-glass { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 0.75rem; }
.wait-glass img { width: 4rem; height: 4rem; }
.wait-open { font-size: 1.25rem; font-weight: 700; color: var(--muted); }
.wait-card .big-btn { width: calc(100% - 6px); margin-right: 6px; }
.wait-change, .wait-again { justify-self: start; }
.feel-grid { list-style: none; margin: 0; padding: 0 6px 6px 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.875rem; }
.feel-face {
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem; width: 100%; height: 100%; min-height: 7rem; padding: 0.875rem 0.5rem;
  border: var(--edge); border-radius: 22px; background: #fff; color: var(--navy); box-shadow: 4px 4px 0 var(--navy);
}
.feel-face img { width: 4.5rem; height: 4.5rem; }
.feel-word { font-size: 1.25rem; font-weight: 800; line-height: 1.2; overflow-wrap: anywhere; max-width: 100%; }
.feel-thanks { font-size: 1.375rem; font-weight: 700; color: var(--ink); }
.feel-acts { flex-wrap: wrap; }
/* let's breathe: the disc grows for 4 seconds (in) and shrinks for 4 (out); Reduce Motion: it fades in and out instead */
.breath { display: grid; justify-items: center; gap: 0.75rem; width: 100%; padding-top: 0.5rem; border-top: 1.5px solid var(--navy); }
.breath-h { font-size: 1.375rem; font-weight: 800; color: var(--navy); padding-top: 0.75rem; }
.breath-ring { width: 10rem; height: 10rem; display: grid; place-items: center; border-radius: 50%; border: 3px dashed var(--mint); }
.breath-disc { width: 100%; height: 100%; display: grid; place-items: center; border: var(--edge); border-radius: 50%; background: var(--mint-tint); animation: rs-breathe 8s ease-in-out infinite; }
.breath-disc img { width: 60%; height: 60%; }
.breath-word { font-size: 1.5rem; font-weight: 800; color: var(--navy); }
@keyframes rs-breathe { 0%, 100% { transform: scale(0.62); } 50% { transform: scale(1); } }
@keyframes rs-breathe-fade { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }
@media (min-width: 700px) {
  .feel-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.125rem; }
  .feel-face img { width: 5.5rem; height: 5.5rem; }
  .wait-for, .feel-line { font-size: 2.25rem; }
}
@media (prefers-reduced-motion: reduce) { .breath-disc { animation-name: rs-breathe-fade; } }

/* ---------- Larger Text (A8): at the largest sizes the words grow, the side room does not; titles stop at the
   screen's width; rows of a picture and words wrap; nothing is wider than the screen ---------- */
:root { --gutter: min(1rem, 4.5vw); }
@media (min-width: 700px) { :root { --gutter: min(2.5rem, 5vw); } }
.gu-sec, .wait-body, .feel-body, .ex-panel, .ex-sec, .check-box, .field, .gu-row, .gu-confirm { grid-template-columns: minmax(0, 1fr); }
.home-title { font-size: min(2.25rem, 10vw); }
.adult-h, .run-title, .gate-h, .about-name, .who-name { font-size: min(1.75rem, 8vw); overflow-wrap: anywhere; }
.fin-h, .wait-for, .feel-line { font-size: min(2rem, 9vw); }
.rcard-name { font-size: min(1.5rem, 8vw); }
.now { padding: min(1rem, 4vw); }
.now-word { font-size: min(2.25rem, 11vw); line-height: 1.3; }
.done-btn { font-size: min(2rem, 11vw); flex-wrap: wrap; padding-inline: min(1.5rem, 4vw); }
.big-btn { flex-wrap: wrap; padding-inline: min(1.5rem, 4vw); }
.pill { line-height: 1.3; }
.chip { line-height: 1.3; }
.st-name { line-height: 1.25; }
.ex-open, .more-card, .gu-main, .rcard, .nn-next, .qtimer, .sub, .ex-choice { flex-wrap: wrap; }
.ex-words, .more-words, .gu-words, .nn-words { flex: 1 1 8rem; }
.sub-word { flex: 1 1 6rem; }
.feel-grid { grid-template-columns: repeat(auto-fill, minmax(min(9rem, 100%), 1fr)); }
.feel-face img { width: min(4.5rem, 100%); height: auto; aspect-ratio: 1; }
.feel-word { line-height: 1.3; }
.about-from, .about-sec p { overflow-wrap: anywhere; }
@media (min-width: 700px) {
  .home-title { font-size: min(2.75rem, 8vw); }
  .adult-h, .run-title { font-size: min(2rem, 6vw); }
  .now { padding: min(1.5rem, 3vw); }
  .now-word { font-size: min(3.25rem, 8vw); }
  .done-btn { font-size: min(2.25rem, 7vw); }
  .rcard-name { font-size: min(2rem, 6vw); }
  .feel-grid { grid-template-columns: repeat(auto-fill, minmax(min(10rem, 100%), 1fr)); }
  .fin-h, .wait-for, .feel-line { font-size: min(2.25rem, 6vw); }
}
@media (min-aspect-ratio: 5/4) and (min-width: 1000px) { .now { padding: min(1.75rem, 3vw); } }
.gu-need, .ex-step, .check-acts, .gu-acts, .fin-acts { flex-wrap: wrap; }
/* the accessibility text sizes (html.text-xl, from about 30 px; set in app.js): any long word may break, and the
   side room inside pills, cards and rows stays small, so a word as big as the screen still fits */
html.text-xl body { overflow-wrap: anywhere; }
html.text-xl .pill, html.text-xl .big-btn, html.text-xl .done-btn { padding-inline: 0.5rem; gap: 0.25rem; max-width: 100%; }
html.text-xl .card, html.text-xl .field, html.text-xl .ready-row, html.text-xl .gu-row, html.text-xl .about-sec, html.text-xl .rcard, html.text-xl .now,
html.text-xl .wait-card, html.text-xl .feel-card, html.text-xl .fin-card, html.text-xl .ex-panel, html.text-xl .ex-open, html.text-xl .check-box, html.text-xl .nn-next { padding-inline: 0.375rem; }
html.text-xl .ready-words, html.text-xl .adult-words { flex-basis: 100%; }
html.text-xl .chip, html.text-xl .count { white-space: normal; }
.choices { grid-template-columns: repeat(auto-fit, minmax(min(7rem, 100%), 1fr)); }
.bk-grid { grid-template-columns: repeat(auto-fill, minmax(min(7.5rem, 100%), 1fr)); }
.bk-sec, .home-rewards, .home-news { grid-template-columns: minmax(0, 1fr); }
.input.time { min-width: min(7.5rem, 100%); }
html.text-xl .stk { width: min(4.5rem, 24vw); height: min(4.5rem, 24vw); }
html.text-xl .stk.is-l { width: min(5.25rem, 28vw); height: min(5.25rem, 28vw); }
html.text-xl .stk.is-xl { width: min(9rem, 50vw); height: min(9rem, 50vw); }
html.text-xl .qt-disc, html.text-xl .rcard-pic, html.text-xl .gu-pic, html.text-xl .nn-pic { max-width: 30vw; max-height: 30vw; }
html.text-xl .pick-word, html.text-xl .gu-need-n, html.text-xl .bk-word { line-height: 1.35; }
html.text-xl .book-card, html.text-xl .who-card { flex-wrap: wrap; padding-inline: 0.375rem; }
html.text-xl .choice-word, html.text-xl .st-name, html.text-xl .qt-line { line-height: 1.35; }
html.text-xl .ready-ctl { flex-wrap: wrap; min-width: 0; max-width: 100%; }
html.text-xl .switch-btn { flex-wrap: wrap; max-width: 100%; }
/* at these sizes the titles and Done stay at least a little bigger than the words around them */
html.text-xl .home-title, html.text-xl .adult-h, html.text-xl .run-title, html.text-xl .now-word, html.text-xl .fin-h, html.text-xl .wait-for,
html.text-xl .feel-line, html.text-xl .rcard-name, html.text-xl .who-name, html.text-xl .gate-h, html.text-xl .about-name, html.text-xl .done-btn { font-size: 1.15rem; }
.bk-tile .chip { white-space: normal; max-width: 100%; overflow-wrap: anywhere; text-align: center; }
/* the strip's chips (review 2, should 9): "Не сегодня" wraps at its space, a word never breaks inside ("Hecho");
   a little less side room so a one-word chip fits the narrow card */
.st .chip { white-space: normal; max-width: 100%; overflow-wrap: normal; hyphens: manual; text-align: center; padding-inline: 0.5rem; gap: 0.2em; }
/* the small-step and choice tiles at the accessibility sizes (review 2, should 8): their words stop at about a
   quarter of the phone's width, so "Stretch" or "Sandwich" stays whole beside or under its picture; the now-card's
   word above them still grows fully */
html.text-xl .sub-word, html.text-xl .choice-word { font-size: min(1.25rem, 6.5vw); }

/* stage 2 (in the app): the step's voice and video, the reminder, the player, For grown-ups' new parts */
.now-media { display: flex; flex-wrap: wrap; gap: 0.625rem; }
.now-media:not(:has(> :not([hidden]))) { display: none; }
.now-media .read-btn { align-self: auto; }
.watch-btn { background: var(--mint-tint); }
.watch-btn .ic, .ex-acts .ic { width: 1.3em; height: 1.3em; }
.ex-acts { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.ex-rec { display: flex; align-items: center; gap: 0.5rem; }
.ex-rec.is-rec { color: var(--navy); font-weight: 800; }
.ex-rec.is-rec::before { content: ''; flex: none; width: 0.75rem; height: 0.75rem; border-radius: 50%; background: #c2412d; animation: rs-rec 1.2s ease-in-out infinite alternate; }
@keyframes rs-rec { from { opacity: 1; } to { opacity: 0.35; } }
.ex-vrow { display: flex; align-items: center; gap: 0.75rem; }
.ex-vrow .hint { flex: 1 1 auto; min-width: 0; }
.ex-poster img { width: 100%; height: 100%; object-fit: cover; }
.ed-remind { display: grid; padding: 0; }
.ed-remind > .ready-row { padding: 0.75rem 1rem; }
.ed-days-box { display: grid; gap: 0.5rem; padding: 0 1rem 0.875rem; }
.ed-days-box[hidden] { display: none; }
.ed-remind > .kid-note { padding: 0 1rem 0.875rem; }
.pill.day[aria-pressed="true"] { background: var(--navy); color: var(--yellow); }
.pill.day[aria-pressed="true"]::before { content: ''; width: 0.55em; height: 0.55em; border-radius: 50%; background: var(--yellow); }
.player-box { padding: 1rem 1rem 0.5rem; }
.player-video { display: block; width: 100%; max-height: 62dvh; border: var(--edge); border-radius: 14px; background: var(--navy); }
.player-acts { display: flex; justify-content: center; padding: 0.5rem 1rem 1rem; }
.player-play { min-width: 9rem; justify-content: center; }
.gu-steps { margin: 0; padding-left: 1.5rem; display: grid; gap: 0.375rem; font-size: 0.9375rem; font-weight: 500; line-height: 1.4; color: var(--ink); }
.gu-reminds { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.gu-remind { padding: 0; }
.gu-remind-link { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; min-height: 44px; padding: 0.75rem 1rem; color: var(--navy); font-weight: 700; text-decoration: none; overflow-wrap: anywhere; }
.gu-remind-link > span { min-width: 0; }
.gu-remind-words { display: block; padding: 0.75rem 1rem; font-weight: 700; color: var(--navy); overflow-wrap: anywhere; }

/* P2-179: apps do not scroll unless they must. Short screens (iPhone SE, iPad landscape) get tighter children screens. */
@media (max-height: 740px) {
  .home { gap: 0.75rem; }
  .home-title { font-size: 1.75rem; }
  .home-lead { font-size: 1.0625rem; }
  .cards { gap: 0.75rem; }
  .rcard { padding: 0.5rem 0.75rem; gap: 0.75rem; box-shadow: 4px 4px 0 var(--navy); }
  .rcard-pic { width: 3.5rem; border-radius: 16px; }
  .rcard-name { font-size: 1.25rem; }
  .rcard-meta { font-size: 1rem; }
  .feel-page, .wait-page { gap: 0.75rem; }
  .feel-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; }
  .feel-face { min-height: 5rem; padding: 0.5rem 0.25rem; gap: 0.25rem; }
  .feel-face img { width: 3rem; height: 3rem; }
  .feel-word { font-size: 1rem; }
}
@media (min-width: 1000px) and (max-height: 900px) {
  .rcard-pic { aspect-ratio: 16 / 9; }
  .cards { gap: 1.25rem; }
  .home { gap: 1rem; }
}
@media (min-height: 741px) and (max-height: 860px) and (max-width: 699px) {
  .home { gap: 1rem; }
  .cards { gap: 0.875rem; }
  .rcard { padding: 0.625rem 0.875rem; box-shadow: 4px 4px 0 var(--navy); }
  .rcard-pic { width: min(5rem, 22vw); }
}

/* ---------- P2-219: Run at large text and in short windows ----------
   The picture is the message, so it keeps its room: the strip and the word give way first. Back one step is a small
   round button in the top corner, away from Done. On a phone, Read it to me and Watch are round picture buttons beside
   the word (their words stay for VoiceOver). The step's timer sits beside Done. While a grown-up answers the check,
   the strip steps aside. Under about 500 px of height: the picture on the left, the word, timer and Done on the right. */
.run-top .back { flex: none; }
.now-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; min-width: 0; }
.now-head .now-word { flex: 1 1 10rem; min-width: 0; }
.now-head .now-media { flex: none; }
.now-go { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.now-go .done-btn { flex: 1 1 9rem; width: auto; min-width: 0; }
.now-go .qtimer { flex: none; }
@media (max-aspect-ratio: 5/4) { .now-pic { flex: 1 1 0; min-height: 6rem; } }
.run.is-asking .strip, .run.is-asking .nn-next { display: none; }
/* a step with small steps or choices on a phone: its own list is the strip for now */
@media (max-width: 699px), (max-height: 900px) { .run.is-busy .strip { display: none; } }
.check-acts .skip-step { background: var(--paper); }
@media (max-width: 699px) {
  .now-media .pill { width: var(--tap); height: var(--tap); padding: 0; border-radius: 50%; }
  .now-media .pill .ic { width: 1.5rem; height: 1.5rem; }
  .media-word { display: none; }
  .now-go .qtimer { flex-direction: column; gap: 0.25rem; max-width: 6.5rem; text-align: center; }
  .now-go .qt-disc { width: min(4.5rem, 11dvh); height: min(4.5rem, 11dvh); }
  .now-go .qt-line { font-size: 1rem; line-height: 1.2; }
  .now-go .qtimer.is-over .qt-line { font-size: 0.9375rem; }
  .st { flex: 1 0 5.75rem; min-width: 5.75rem; padding: 0.375rem 0.25rem; gap: 0.25rem; }
  .st img { width: min(2.5rem, 6dvh); height: min(2.5rem, 6dvh); }
  .st-name { font-size: 0.9375rem; }
  .st .chip { font-size: 0.875rem; min-height: 1.5rem; }
  .now-word { font-size: min(2.25rem, 11vw, 6dvh); }
  .run { gap: 0.625rem; }
}
/* a phone at large text or a short phone: the strip shows pictures and marks only (its words stay for VoiceOver) */
@media (max-width: 699px) and (max-height: 760px), (max-width: 380px) and (min-resolution: 1.05dppx) {
  .now-label { display: none; }
}
/* iPad: the timer disc scales with the card (Time Timer style), a third of the words' width */
@media (min-width: 700px) {
  .now-go { gap: 1.25rem; }
  .now-go .qtimer { flex: 0 0 34%; flex-direction: column; gap: 0.5rem; text-align: center; }
  .now-go .qt-disc { width: min(100%, 32dvh); height: auto; aspect-ratio: 1; }
}
/* short windows (a phone on its side, iPad Split View or Stage Manager): picture left; word, timer and Done right;
   the strip shows small pictures only */
@media (max-height: 500px) and (min-aspect-ratio: 5/4) {
  .screen.run { padding-top: max(env(safe-area-inset-top), 0.5rem); padding-bottom: max(env(safe-area-inset-bottom), 0.5rem); }
  .run { gap: 0.5rem; }
  .run-title { font-size: min(1.25rem, 6vh); }
  .now { flex-direction: row; padding: 0.625rem; gap: 1rem; box-shadow: 4px 4px 0 var(--navy); }
  .now-pic { flex: 0 1 38%; min-height: 0; }
  .now-words { flex: 1 1 62%; gap: 0.5rem; justify-content: center; padding: 0; }
  .now-label, .check-hint { display: none; }
  .now-word { font-size: min(2rem, 9vh); }
  .now-media .pill { width: var(--tap); height: var(--tap); padding: 0; border-radius: 50%; }
  .media-word { display: none; }
  .now-go .qtimer { flex: none; flex-direction: row; max-width: none; text-align: left; }
  .now-go .qt-disc { width: min(4rem, 15vh); height: min(4rem, 15vh); }
  .done-btn { min-height: max(64px, 3.5rem); font-size: min(1.75rem, 8vh); }
  .subs { grid-template-columns: repeat(auto-fit, minmax(min(9rem, 100%), 1fr)); }
  .sub { min-height: 44px; padding-block: 0.25rem; }
  .sub img { width: 2rem; height: 2rem; }
  .check-box { padding: 0.5rem 0.75rem; gap: 0.375rem; }
  .check-q { font-size: 1.125rem; }
  .strip { padding: 0.25rem 6px 6px 0.25rem; gap: 0.5rem; }
  .st { flex: 0 0 auto; min-width: 3.5rem; padding: 0.25rem; box-shadow: 2px 2px 0 var(--navy); }
  .st img { width: 2.25rem; height: 2.25rem; }
  .st-name, .st .chip { display: none; }
  .ready { padding-block: 0.25rem; }
}

/* P2-219: the grown-ups menu fits a small phone, a phone on its side and font 20 without scrolling: the rows become
   tiles, two across on phones and four across on wide short screens; the language pills sit tighter */
@media (max-width: 699px), (max-height: 900px) {
  .gu-home { gap: 0.875rem; }
  .gu-home .gu-menu-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.625rem; }
  .gu-home .nav-card.gu-menu-row { min-height: max(56px, 3.5rem); padding: 0.5rem 0.625rem 0.5rem 0.875rem; gap: 0.375rem; font-size: 1rem; line-height: 1.25; }
  .gu-home .nav-card.gu-menu-row svg { flex: none; width: 1.125rem; height: 1.125rem; }
  .gu-home .gu-sec { gap: 0.5rem; }
  .gu-home .gu-langs { gap: 0.5rem; }
  .gu-home .pill.lang { min-height: 44px; padding: 0.25rem 0.875rem; }
  .gu-home .adult-top { gap: 0.5rem 1rem; }
}
@media (min-width: 700px) and (max-height: 900px) { .gu-home .gu-menu-list { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-height: 500px) and (min-width: 700px) {
  .gu-home .adult-top { flex-wrap: nowrap; }
  .gu-home .adult-h { font-size: 1.5rem; }
}

/* P2-219: Home fits without scrolling at a larger text size on a phone, and on a phone on its side */
@media (max-width: 699px) and (min-height: 741px) and (max-height: 900px) {
  html.text-l .home { gap: 0.875rem; }
  html.text-l .cards { gap: 0.75rem; }
  html.text-l .rcard { padding: 0.5rem 0.75rem; gap: 0.875rem; box-shadow: 4px 4px 0 var(--navy); }
  html.text-l .rcard-pic { width: min(4.25rem, 20vw); border-radius: 18px; }
  html.text-l .book-card { min-height: 0; padding: 0.5rem 1rem 0.5rem 0.75rem; gap: 0.875rem; }
  html.text-l .book-card .stk { width: 3.5rem; height: 3.5rem; }
  html.text-l .home-foot { gap: 0.5rem 1rem; padding-top: 0; }
}
@media (max-width: 699px) and (max-height: 740px) {
  html.text-l .home-top { padding-top: 0; }
  html.text-l .book-card { min-height: 0; padding: 0.5rem 1rem 0.5rem 0.75rem; gap: 0.875rem; }
  html.text-l .book-card .stk { width: 3.25rem; height: 3.25rem; }
  html.text-l .home-foot { gap: 0.375rem 1rem; padding-top: 0; }
}
@media (max-height: 500px) and (min-width: 700px) {
  .home { gap: 0.625rem; }
  .home-top { padding-top: 0; gap: 0.125rem; }
  .home-title { font-size: 1.5rem; }
  .home-lead { font-size: 1rem; }
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; }
  .rcard { flex-direction: row; align-items: center; padding: 0.375rem 0.625rem; gap: 0.625rem; box-shadow: 4px 4px 0 var(--navy); }
  .rcard-pic { width: 3rem; aspect-ratio: 1; border-radius: 14px; }
  .rcard-pic img { width: 74%; height: 74%; }
  .rcard-name { font-size: 1.1875rem; }
  .rcard-meta { font-size: 0.9375rem; }
  .home-rewards { gap: 0.625rem 1rem; }
  .book-card { min-height: 0; padding: 0.375rem 1rem 0.375rem 0.625rem; gap: 0.75rem; box-shadow: 4px 4px 0 var(--navy); }
  .book-card .stk { width: 3rem; height: 3rem; }
  .book-name { font-size: 1.25rem; }
  .home-foot { padding-top: 0; }
}

/* ---- P2-219 stage 4: one step list. Each row opens the step's sheet (Up5); Remove keeps an Undo (8 s); several
   pictures at once in the picker; the whole routine's timers on Run (Up7); the guided first run (Up4) */
.srow > .ex-open { grid-column: 1 / -1; min-height: var(--tap); padding: 0.375rem 0.75rem; gap: 0.625rem; border: 1.5px solid var(--navy); border-radius: 14px; background: var(--paper); }
.srow > .ex-open > .ic { width: 1.375rem; height: 1.375rem; flex: none; }
.srow > .ex-open > .ic:first-child { margin-left: 0; }
.srow > .ex-open > .ic:last-child { margin-left: auto; }
.srow > .ex-open[aria-expanded] > .ic { transform: none; animation: none; }
.srow > .ex-open .ex-name { font-size: 1rem; }
.srow > .ex-open .ex-words { flex: 1 1 8rem; }
.chip.ex-off { min-height: 1.75rem; font-size: 0.875rem; background: #fff; color: var(--muted); border-color: var(--muted); border-style: dashed; }
.step-sheet { width: min(40rem, calc(100% - 1.5rem)); }
.step-sheet .ex-panel { border-top: 0; padding: 1rem; }
.step-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.75rem 1rem; }
.srow-pic.step-pic { width: 5rem; height: 5rem; border-radius: 18px; box-shadow: 3px 3px 0 var(--navy); }
.step-name { flex: 1 1 12rem; min-width: 0; display: grid; gap: 0.375rem; }
.step-today .pill.ed-skip { justify-self: start; padding-left: 1.125rem; }
.step-today .pill.ed-skip .tk { width: 1.25rem; height: 1.25rem; }
.ed-undo { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; padding: 0.5rem 0.5rem 0.5rem 1rem; background: var(--yellow-tint); }
.ed-undo[hidden] { display: none; }
.ed-undo-word { flex: 1 1 10rem; min-width: 0; font-weight: 700; overflow-wrap: anywhere; }
.pick-bar { flex: none; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; padding: 0.75rem 1rem; border-top: var(--edge); background: var(--paper); }
.pick-bar[hidden] { display: none; }
.pick-many-word { flex: 1 1 10rem; margin: 0; }
.pick-add:disabled { opacity: 0.45; }
.pick { position: relative; }
.pick[data-n]::after {
  content: attr(data-n); position: absolute; top: 0.25rem; right: 0.25rem; min-width: 1.5rem; height: 1.5rem; padding: 0 0.25rem;
  display: grid; place-items: center; border-radius: 999px; background: var(--navy); color: var(--yellow); font-size: 0.875rem; font-weight: 800;
}
.ready.is-timers .fill { background: var(--yellow); }

/* the guided first run: a card on Home under the routines, and its page behind the gate */
.welcome-card { display: grid; gap: 0.5rem; padding: 0.875rem 1rem; background: var(--yellow-tint); }
.welcome-h { font: 700 1.125rem/1.3 var(--display); color: var(--navy); }
.welcome-line { margin: 0; color: var(--muted); font-weight: 600; }
.welcome-acts { display: flex; flex-wrap: wrap; gap: 0.5rem 0.75rem; }
.welcome-acts .pill { flex: 1 1 8rem; }
/* wide screens: the words on the left, the two buttons on their right, so the card is one button tall and Home still fits */
@media (min-width: 700px) {
  .welcome-card { grid-template-columns: minmax(0, 1fr) auto; column-gap: 1.5rem; align-items: center; }
  .welcome-h, .welcome-line { grid-column: 1; }
  .welcome-acts { grid-column: 2; grid-row: 1 / span 2; flex-wrap: nowrap; }
  .welcome-acts .pill { flex: 0 0 auto; min-width: 9rem; }
}
/* small phones: the line under the heading is kept for VoiceOver only (as .sr); Set up opens a page that says it all */
@media (max-width: 699px) and (max-height: 740px) {
  .welcome-card { padding-block: 0.625rem; }
  .welcome-line { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
}
.su-list { list-style: none; margin: 0; padding: 0 4px 4px 0; display: grid; gap: 0.625rem; }
.su-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 0.75rem; padding: 0.5rem 0.75rem; }
.su-tick { flex: 1 1 12rem; min-width: 0; min-height: var(--tap); display: flex; align-items: center; gap: 0.75rem; padding: 0.25rem 0; border: 0; background: none; color: var(--navy); font-size: 1.0625rem; font-weight: 800; text-align: left; }
.su-tick .gu-pic { width: 2.75rem; height: 2.75rem; }
.su-tick .gu-pic img { width: 76%; height: 76%; object-fit: contain; }
.su-box { flex: none; width: 1.75rem; height: 1.75rem; display: grid; place-items: center; border: var(--edge); border-radius: 8px; background: #fff; }
.su-box .tk { width: 1.25rem; height: 1.25rem; visibility: hidden; }
.su-tick[aria-pressed="true"] .su-box { background: var(--mint); }
.su-tick[aria-pressed="true"] .su-box .tk { visibility: visible; }
.su-tick[aria-pressed="false"] .su-word, .su-tick[aria-pressed="false"] .gu-pic { opacity: 0.55; }
.su-word { min-width: 0; overflow-wrap: anywhere; }
.su-time { display: flex; align-items: center; gap: 0.5rem; }
.su-time .lbl { font-size: 0.9375rem; }
.su-time .input.time:disabled { opacity: 0.45; }
.su-acts { display: grid; gap: 0.5rem; }
.su-acts .pill { justify-self: stretch; min-height: 3.25rem; }
/* the skip question on Run (a grown-up's press and hold): the now-card steps aside while it is asked, so it fits.
   Only the skip question: the grown-up check sits inside the now-card, under Done */
.run.is-skip-ask .now { display: none; }

/* P2-219 fix round: the waiting card and the quick set-up fit a phone without scrolling, up to the largest
   Chrome/Dynamic Type size the tests use (font 20). A phone shows each routine on one line: tick, name, then
   its ready-by time with a small label above it */
@media (max-width: 699px) {
  .su-row { flex-wrap: nowrap; gap: 0.5rem; padding: 0.375rem 0.625rem; }
  .su-tick { flex: 1 1 0; gap: 0.5rem; }
  .su-tick .gu-pic { width: 2rem; height: 2rem; }
  .su-time { flex: none; flex-direction: column; align-items: stretch; gap: 0.125rem; max-width: 9rem; }
  .su-time .lbl { font-size: 0.75rem; letter-spacing: 0.04em; overflow-wrap: anywhere; }
  .su-time .input.time { min-width: 6.75rem; }
}
/* short phones (iPhone SE) and phones at large text: tighter gaps; the name hint is kept for VoiceOver only (as .sr) */
@media (max-width: 699px) and (max-height: 760px) {
  .su-page, .wait-page { gap: 0.75rem; }
  .su-page .field { gap: 0.375rem; padding: 0.625rem 0.875rem 0.75rem; }
  .su-page .gu-sec, .wait-body { gap: 0.5rem; }
  .su-list { gap: 0.5rem; }
  .su-acts .pill { min-height: 3rem; }
  #su-name-hint { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  .wait-card { gap: 0.5rem; padding: 0.875rem 1rem 1rem; }
  .wait-pic { width: min(12rem, 50vw, 21dvh); border-radius: 22px; }
  .wait-for { font-size: 1.5rem; }
  .wait-card .qt-disc { width: min(7rem, 14dvh); height: min(7rem, 14dvh); }
  .wait-glass img { width: 3rem; height: 3rem; }
  .su-page { gap: 0.5rem; }
  .su-row { padding: 0.25rem 0.625rem; }
  .su-list { gap: 0.375rem; }
  .su-time .input.time { min-height: 44px; padding-block: 0.25rem; }
  html.text-l .home, html.text-l .cards { gap: 0.5rem; }
  html.text-l .rcard { padding-block: 0.375rem; }
  html.text-l .welcome-card { padding-block: 0.375rem; }
}
/* phones: the two tools share one line, and the foot line sits beside its button (both wrapped to a second
   line at large text, found by the honest font-20 noscroll in the P2-219 fix round) */
@media (max-width: 699px) {
  .home-tools { flex-wrap: nowrap; gap: 0.5rem; }
  .home-tools .pill { flex: 1 1 auto; min-width: 0; padding-inline: 0.625rem; }
  .home-tools .pill img { flex: none; }
  .home-tools .pill span { min-width: 0; overflow-wrap: anywhere; }
  .home-foot { flex-wrap: nowrap; }
  .home-foot .foot { flex: 1 1 auto; min-width: 0; }
  .home-foot .pill { flex: none; }
}
/* taller phones at large text: the feelings fit on one screen */
@media (max-width: 699px) and (min-height: 761px) {
  html.text-l .feel-grid { gap: 0.625rem; }
  html.text-l .feel-face { min-height: 6rem; padding: 0.625rem 0.375rem; gap: 0.375rem; }
  html.text-l .feel-face img { width: min(3.5rem, 100%); }
}
/* iPad portrait at large text: the three routine cards fit with a smaller picture */
@media (min-width: 700px) and (max-width: 999px) and (min-height: 1000px) {
  html.text-l .cards { gap: 1.25rem; }
  html.text-l .rcard-pic { width: 9rem; }
}
