/* Pip the Pup: Pantry palette, ink outlines, 1930s title-card type. Flat colour only: no gradients, no glow, no glass. */

/* Type is served from this site (fonts/), not from a font service: nothing is sent to a third party and it works offline.
   Both files are variable fonts, so one file covers every weight in the range. Fraunces also carries the optical-size axis. */
@font-face { font-family: 'Fraunces'; font-style: normal; font-weight: 700 900; font-display: swap;
  src: url(../fonts/fraunces-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Fraunces'; font-style: normal; font-weight: 700 900; font-display: swap;
  src: url(../fonts/fraunces-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Instrument Sans'; font-style: normal; font-weight: 400 600; font-stretch: 100%; font-display: swap;
  src: url(../fonts/instrument-sans-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Instrument Sans'; font-style: normal; font-weight: 400 600; font-stretch: 100%; font-display: swap;
  src: url(../fonts/instrument-sans-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
/* Russian: Fraunces and Instrument Sans have no Cyrillic. On a Russian page every line is set in a family that has both alphabets (see html:lang(ru) below):
   Literata (a warm book serif, for headings) and Golos Text (a friendly sans, for text), Cyrillic and Latin each in its own file, so a heading never changes
   face for a Latin word ("Pip") or a digit. In English and Spanish they are only the fallback for a Cyrillic name someone typed, and they are fetched only when
   a page has such letters. */
@font-face { font-family: 'Literata'; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url(../fonts/literata-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Literata'; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url(../fonts/literata-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Golos Text'; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url(../fonts/golos-text-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Golos Text'; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url(../fonts/golos-text-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --cream-50: #FFFBF2; --cream-100: #FFF4DE; --cream-200: #F8E8C6; --cream-300: #EBD6A6;
  --ink-900: #14261C; --ink-700: #2E4438; --ink-500: #566B5E; --ink-300: #9DAEA3; --ink-100: #DCE4DC;
  --basil-900: #0E3B27; --basil-700: #136B3D; --basil-600: #1B8049; --basil-400: #4FBF7A; --basil-200: #A9E3BC; --basil-100: #DDF3E1;
  --butter-100: #FFF0BD; --butter-300: #FFDB6E; --butter-400: #FFC93C; --butter-600: #E0A100; --butter-800: #7A5400;
  --tomato-100: #FFE0D3; --tomato-500: #F2552C; --tomato-700: #BF3818;
  --font-display: 'Fraunces', 'Literata', Georgia, 'Times New Roman', serif;
  --font-body: 'Instrument Sans', 'Golos Text', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 24px;
  --gap: 16px;
}
*, *::before, *::after { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }   /* no grey flash over what is tapped: every control has its own pressed look */
html { touch-action: manipulation; -webkit-text-size-adjust: 100%; overflow-wrap: break-word; }   /* a very long word (a name someone typed) breaks only when it cannot fit on a line of its own */
/* paper: a very light grain on the cream, like a printed page; cards stay clean, like cut-out paper laid on top */
body { margin: 0; background-color: var(--cream-100); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .33  0 0 0 0 .25  0 0 0 0 .1  0 0 0 .38 -.13'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E"); color: var(--ink-900); font: 400 16px/1.5 var(--font-body); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 900; letter-spacing: -0.02em; line-height: 1.1; margin: 0; text-wrap: balance; }
h1:focus { outline: none; }
p { margin: 0; }
p, li { text-wrap: pretty; }
.nw { white-space: nowrap; }   /* a small piece that must stay whole: "10–11 años", "3 de 5" */
a { color: var(--basil-700); text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { max-width: 100%; }
#app { overflow-x: clip; }
.mobile-only { display: block; }
@media (min-width: 900px) { .mobile-only { display: none; } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--ink-900); outline-offset: 3px; border-radius: 6px; }
.iris :focus-visible, .fact-back :focus-visible { outline-color: var(--butter-400); }   /* the dark screens: an ink ring would not show */
[hidden] { display: none !important; }

/* type */
.display { font-family: var(--font-display); font-weight: 900; letter-spacing: -0.03em; line-height: 1.02; }
.h1 { font-size: clamp(1.7rem, 7.4vw, 2.4rem); } .h2 { font-size: 1.6rem; } .h3 { font-size: 1.25rem; letter-spacing: -0.01em; }
.pick-alt { color: var(--basil-700); }   /* the language page: the title again in the other languages, under the first */
.eyebrow { font: 600 12px/16px var(--font-body); text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-500); }
.muted { color: var(--ink-500); } .lead { font-size: 1.125rem; color: var(--ink-500); }
.num { font-family: var(--font-display); font-weight: 900; font-variant-numeric: tabular-nums; }
.center-text { text-align: center; }

/* layout */
.page { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 520px; margin: 0 auto; padding: 24px 20px 48px; }
.stack > strong { display: block; }   /* a bold line that is a block of the stack: inline, the gap of the stack (a margin) would not apply to it */
.stack > * + * { margin-top: var(--gap); } .stack-lg { --gap: 28px; } .stack-sm { --gap: 8px; }
.row { display: flex; align-items: center; } .between { justify-content: space-between; } .end { justify-content: flex-end; } .center { justify-content: center; }
.gap { gap: 12px; } .gap-lg { gap: 24px; } .wrap { flex-wrap: wrap; } .grow { flex: 1; min-width: 0; }
.fill { flex: 1 1 auto; }   /* in a row that wraps: take the free room on the line, but wrap to a new line instead of being squeezed */
.fit { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }   /* something that carries a child's name: a long name without spaces breaks instead of leaving the screen */
.chip.fit { white-space: normal; text-align: center; }
.grid2 { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .grid2 { grid-template-columns: 1fr 1fr; } }

/* surfaces */
/* "printed" look: a hard offset shadow in ink, no blur */
:root { --print: 4px 4px 0 var(--ink-900); --print-sm: 3px 3px 0 var(--ink-900); --spring: cubic-bezier(.3, 2.2, .5, 1); }
.card { background: var(--cream-50); border: 3px solid var(--ink-900); border-radius: var(--r-lg); padding: 18px; box-shadow: var(--print); }
.card-quiet { background: var(--cream-50); border: 2px solid var(--cream-300); border-radius: var(--r-lg); padding: 16px; }
.card-now { background: var(--butter-100); }
.card-brand { background: var(--basil-100); }
.notice { display: flex; gap: 10px; align-items: flex-start; background: var(--butter-100); border: 2px solid var(--ink-900); border-radius: var(--r-md); padding: 12px 14px; font-size: 15px; }
.ico { flex: none; }   /* an icon beside a long text keeps its size (the check marks on the landing page were squeezed to 15 px and the text no longer lined up) */
.notice .ico { margin-top: 2px; }
.notice > .grow, .notice > .stack, .notice > .stack-sm { flex: 1; min-width: 0; }
.empty { text-align: center; padding: 28px 16px; }
.empty .pip { width: 130px; height: auto; margin: 0 auto 8px; display: block; }
.center-text > .pip { display: block; margin-inline: auto; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 18px; border: 2.5px solid var(--ink-900); border-radius: var(--r-md); background: var(--cream-50); color: var(--ink-900); font-weight: 600; font-size: 16px; line-height: 1.2; cursor: pointer; text-decoration: none; text-align: center; text-wrap: balance; transition: background-color .15s, transform .46s var(--spring), box-shadow .46s var(--spring); }
.btn { box-shadow: var(--print-sm); }
@media (hover: hover) { .btn:hover { background: var(--cream-200); } }
.btn:active { transform: translate(2px, 2px) scale(.96, .93); box-shadow: 1px 1px 0 var(--ink-900); }
.btn-primary { background: var(--basil-600); color: var(--cream-50); } @media (hover: hover) { .btn-primary:hover { background: var(--basil-700); } }
.btn-reward { background: var(--butter-400); } @media (hover: hover) { .btn-reward:hover { background: var(--butter-600); } }
.btn-secondary { background: var(--cream-50); }
.btn-quiet { border-color: transparent; background: transparent; text-decoration: underline; text-underline-offset: 3px; min-height: 40px; box-shadow: none; }
.btn-quiet:active { box-shadow: none; transform: scale(.95); }
.btn-danger { background: var(--tomato-100); } @media (hover: hover) { .btn-danger:hover { background: #ffc9b5; } }
.btn-l { min-height: 64px; border-width: 3px; border-radius: var(--r-lg); font-size: 18px; padding: 12px 24px; }
.btn-block { display: flex; width: 100%; }
.btn-sm { min-height: 44px; padding: 6px 12px; font-size: 15px; }
.btn[disabled], .btn[aria-disabled="true"] { background: var(--ink-100); border-color: var(--ink-300); color: var(--ink-500); cursor: not-allowed; transform: none; box-shadow: none; }
.icon-btn { width: 44px; height: 44px; padding: 0; border-radius: 12px; }

/* forms */
.field { display: grid; gap: 6px; }
.field > label, legend { font-weight: 600; font-size: 15px; }
.input { width: 100%; min-height: 48px; padding: 10px 14px; border: 2.5px solid var(--ink-900); border-radius: var(--r-md); background: var(--cream-50); }
.input:focus-visible { outline: 3px solid var(--ink-900); outline-offset: 2px; }
.pin-input { -webkit-text-security: disc; text-security: disc; letter-spacing: .35em; font-variant-numeric: tabular-nums; }
textarea.input { min-height: 84px; resize: vertical; }
.form-error { display: flex; gap: 8px; align-items: flex-start; color: var(--tomato-700); font-weight: 600; font-size: 15px; background: var(--tomato-100); border: 2px solid var(--tomato-700); border-radius: var(--r-md); padding: 10px 12px; }
.check { display: flex; gap: 12px; align-items: flex-start; min-height: 44px; padding: 6px 0; cursor: pointer; }
.check input { width: 24px; height: 24px; margin: 2px 0 0; accent-color: var(--basil-600); flex: none; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.choice-grid { display: grid; gap: 10px; }
.choice { position: relative; display: block; }
.choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.choice span { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 12px 16px; border: 2.5px solid var(--ink-900); border-radius: var(--r-md); background: var(--cream-50); font-weight: 600; }
.choice input:checked + span { background: var(--butter-300); }
.choice input:focus-visible + span { outline: 3px solid var(--ink-900); outline-offset: 3px; }
.daypick { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }   /* the seven days always share one line, evenly */
.daypick .choice span { min-height: 44px; padding: 8px 0; justify-content: center; font-size: min(15px, 3.9vw); }
.timepick { display: flex; align-items: center; gap: 8px; }
.timepick .input { flex: 1 1 0; min-width: 0; }
.timepick-colon { font: 700 20px/1 var(--font-display); }
@media (min-width: 600px) { .daypick { max-width: 480px; } .timepick { max-width: 320px; } }   /* a wide card: the days and the time keep a size that suits them */
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; cursor: pointer; }
.toggle input { position: absolute; opacity: 0; }
.toggle .sw { flex: none; width: 52px; height: 30px; border-radius: 15px; border: 2.5px solid var(--ink-300); background: var(--ink-100); position: relative; transition: background-color .15s; }
.toggle .sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--cream-50); border: 2px solid var(--ink-500); transition: transform .15s; }
.toggle input:checked + .sw { background: var(--basil-600); border-color: var(--ink-900); }
.toggle input:checked + .sw::after { transform: translateX(22px); border-color: var(--ink-900); }
.toggle input:focus-visible + .sw { outline: 3px solid var(--ink-900); outline-offset: 3px; }

/* chips, language switch, progress */
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 2px 12px; border-radius: 14px; font-size: 14px; font-weight: 600; white-space: nowrap; }
.chip-neutral { background: var(--cream-200); } .chip-brand { background: var(--basil-100); color: var(--basil-700); }
.chip-reward { background: var(--butter-100); color: var(--butter-800); } .chip-accent { background: var(--tomato-100); } .chip-ink { background: var(--ink-900); color: var(--cream-50); }
.lang { --lang-w: 44px; display: inline-flex; padding: 3px; border: 2.5px solid var(--ink-900); border-radius: 20px; background: var(--cream-50); }
.lang button { box-sizing: border-box; flex: none; min-width: var(--lang-w); min-height: 44px; border: 0; border-radius: 16px; background: transparent; font-weight: 600; font-size: 14px; cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--basil-600); color: var(--cream-50); }
/* folded: only the language that is on is there (a green button). Open: the other ones slide out to its left. They are folded to nothing, not just hidden, so that the
   group is as narrow as one button, and "visibility" takes them out of the tab order and away from screen readers until they are there. In the side menu the green one
   stays where it is and the others come out to its right. */
.lang button:not([aria-pressed="true"]) { width: 0; min-width: 0; padding: 0; opacity: 0; overflow: hidden; visibility: hidden; transition: width .3s cubic-bezier(.3, 0, .2, 1), opacity .15s, visibility 0s .3s; }
.lang.is-open button:not([aria-pressed="true"]) { width: var(--lang-w); opacity: 1; visibility: visible; transition: width .38s var(--spring), opacity .22s .04s, visibility 0s, transform .46s var(--spring), box-shadow .46s var(--spring), background-color .15s; }
.side .lang button[aria-pressed="true"] { order: -1; }
/* Opened, the group grows to the left OVER whatever is beside it and does not move it: the negative margin takes back the room that the two languages
   take, so the title next to the switch does not jump while they slide out. (In the side menu there is room: nothing to take back.) */
.lang { position: relative; z-index: 3; transition: margin-left .3s cubic-bezier(.3, 0, .2, 1); }
.lang.is-open { margin-left: calc(-2 * var(--lang-w)); transition: margin-left .38s var(--spring); }
.side .lang, .side .lang.is-open { margin-left: 0; }
.segments { display: inline-flex; gap: 6px; max-width: 100%; }   /* seven segments (a six-card lesson) do not fit a 320 px phone at 44 px each: they shrink */
.seg { display: block; width: 44px; height: 12px; border-radius: 6px; border: 2px solid var(--ink-300); background: var(--ink-100); }
.seg.is-done { background: var(--basil-600); border-color: var(--ink-900); } .seg.is-now { background: var(--butter-400); border-color: var(--ink-900); }
.bar { height: 14px; border-radius: 7px; background: var(--ink-100); border: 2px solid var(--ink-300); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--basil-600); border-right: 2px solid var(--ink-900); }
.avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 2.5px solid var(--ink-900); background: var(--butter-300); font-family: var(--font-display); font-weight: 900; font-size: 18px; flex: none; overflow: hidden; }
.avatar-lg { width: 64px; height: 64px; font-size: 28px; }
.avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.avatar-pick { position: relative; display: inline-flex; flex: none; border-radius: 50%; cursor: pointer; -webkit-tap-highlight-color: transparent; }   /* the circle that opens the gallery */
.avatar-pick input:focus-visible + .avatar { outline: 3px solid var(--ink-900); outline-offset: 3px; }
.avatar-pick::before { content: ''; position: absolute; inset: -4px; border-radius: 50%; }   /* the place to tap is a little larger than the circle */
.avatar-badge { position: absolute; right: -4px; bottom: -4px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--cream-50); border: 2px solid var(--ink-900); color: var(--ink-900); pointer-events: none; }
@media (max-width: 380px) { .kid-head .avatar-pick .avatar-lg { width: 48px; height: 48px; font-size: 20px; } .kid-head .avatar-badge { width: 20px; height: 20px; right: -5px; bottom: -5px; } }   /* the child's own circle stays easy to tap on a small phone */
.brand { display: inline-flex; align-items: center; gap: 8px; font-family: 'Fraunces', Georgia, 'Times New Roman', serif; font-weight: 900; font-size: 1.5rem; letter-spacing: -0.03em; color: var(--ink-900); text-decoration: none; }
.brand svg { width: 34px; height: 40px; }

/* task / routine rows */
.trow { display: flex; align-items: center; gap: 14px; min-height: 76px; padding: 14px 16px; border: 3px solid var(--ink-900); border-radius: var(--r-lg); background: var(--cream-50); color: inherit; text-decoration: none; width: 100%; text-align: left; cursor: pointer; }
.trow { box-shadow: var(--print); }
.trow.is-now { background: var(--butter-100); }
.trow.is-done { background: var(--basil-100); }
.trow.is-paused { background: var(--cream-100); box-shadow: none; border-style: dashed; color: var(--ink-500); cursor: default; }
.trow.is-paused .avatar { opacity: .6; }
.trow.is-paused:active { transform: none; }
.trow .t { font-family: var(--font-display); font-weight: 700; font-size: clamp(1rem, 4.6vw, 1.2rem); letter-spacing: -0.01em; line-height: 1.15; }
@media (max-width: 400px) { .trow { gap: 10px; padding: 12px; } }
.disc { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 2.5px solid var(--ink-900); background: transparent; }
.disc.now { background: var(--butter-400); } .disc.done { background: var(--basil-600); color: var(--cream-50); } .disc.wait { background: var(--butter-100); }

/* shells */
.shell { min-height: 100vh; min-height: 100dvh; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; }
.topbar > :first-child { flex: 1 1 auto; min-width: 0; }
.shell-parent .topbar { max-width: 640px; margin-inline: auto; }   /* the title lines up with the page column, which is centered on a tablet standing up; the desktop layout below puts both at the left */
.topbar .eyebrow { margin-bottom: 4px; }
@media (max-width: 400px) { .topbar .eyebrow { font-size: 11px; letter-spacing: 0.08em; } }   /* the date beside the language button: a long one ("miércoles, 28 de septiembre") keeps to one line on a phone */
.h1-long { font-size: clamp(1.4rem, 6vw, 1.9rem); }   /* a long title (a lesson's name) is set smaller, so it does not need five lines */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--cream-50); border-top: 3px solid var(--ink-900); padding: 8px 4px calc(8px + env(safe-area-inset-bottom)); }
.tab { display: grid; justify-items: center; gap: 2px; min-width: 0; min-height: 52px; padding: 4px 2px; color: var(--ink-900); text-decoration: none; font-size: 12px; font-weight: 600; letter-spacing: 0.01em; }
.tab .pill { display: grid; place-items: center; width: min(56px, 100%); height: 32px; border-radius: 16px; border: 2.5px solid transparent; transition: transform .14s ease-out; }
/* feels like a soft button: it gives under the finger, and the tab that was just chosen springs back fatter for a moment (squash and stretch) */
.tab:active .pill { transform: scale(.88, .84); }
.tab .pill .ico { transform-origin: 50% 60%; }
.tab.is-pop .pill { animation: tabJelly .6s cubic-bezier(.3, 1.45, .5, 1) both; }
.tab.is-pop .pill .ico { animation: tabIcon .6s cubic-bezier(.3, 1.45, .5, 1) both; }
@keyframes tabJelly { 0% { transform: scale(.88, .84); } 30% { transform: scale(1.22, .88); } 55% { transform: scale(.94, 1.12); } 78% { transform: scale(1.04, .98); } 100% { transform: scale(1); } }
@keyframes tabIcon { 0% { transform: scale(.9) rotate(0); } 30% { transform: scale(1.5) rotate(-9deg); } 56% { transform: scale(.92) rotate(5deg); } 78% { transform: scale(1.14) rotate(-2deg); } 100% { transform: scale(1) rotate(0); } }
@media (max-width: 359px) { .tab { font-size: 11px; letter-spacing: 0; } }
.tab[aria-current="page"] .pill { background: var(--butter-400); border-color: var(--ink-900); }
.main { padding: 0 20px calc(110px + env(safe-area-inset-bottom)); max-width: 640px; margin: 0 auto; }
.side { display: none; }
@media (min-width: 900px) {
  .shell-parent { display: grid; grid-template-columns: 260px 1fr; }
  .shell-parent .side { display: flex; flex-direction: column; gap: 6px; padding: 24px 16px; border-right: 3px solid var(--ink-900); background: var(--cream-50); min-height: 100vh; position: sticky; top: 0; align-self: start; }
  .shell-parent .tabbar { display: none; }
  .shell-parent .main { max-width: 760px; padding-bottom: 48px; margin: 0; width: 100%; }
  .shell-parent .topbar { padding: 24px 20px 8px; max-width: none; margin-inline: 0; }
  .side a.nav { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 8px 14px; border-radius: 14px; border: 2.5px solid transparent; font-weight: 600; text-decoration: none; color: var(--ink-900); }
  .side a.nav[aria-current="page"] { background: var(--butter-400); border-color: var(--ink-900); }
  @media (hover: hover) { .side a.nav:hover { background: var(--cream-200); } }
}
.kid-main { max-width: 520px; margin: 0 auto; padding: 0 20px calc(148px + env(safe-area-inset-bottom)); }   /* the last block of a page ends well above the tab bar (it is the "Today" list when there are no bonus jobs) */
.kid-main.focus { padding-bottom: 32px; }
.kid-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 22px 0 6px; }
.kid-head > .pip { flex: none; }
.kid-name { font-size: clamp(1.2rem, 6.2vw, 2.2rem); overflow-wrap: anywhere; }
.kid-head .kid-name.kid-name-long { font-size: clamp(1.05rem, 4.9vw, 1.7rem); }   /* ten letters or more (Russian too, where the h1 rule is stronger): smaller, so that the name stays in one piece beside the picture */   /* a name next to a picture: a long one gets a smaller size instead of pushing the picture out */
@media (max-width: 380px) { .kid-head .avatar-lg { width: 40px; height: 40px; font-size: 18px; } }

/* focus mode */
.focus-top { display: flex; align-items: center; gap: 10px; padding: 18px 0 8px; }
.focus-prog { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.focus-prog > strong { flex: none; white-space: nowrap; }
.focus-prog .segments { min-width: 0; flex: 1 1 auto; }
.focus-prog .seg { width: auto; flex: 1 1 0; min-width: 8px; max-width: 44px; }
.focus-card { position: relative; text-align: center; background: var(--cream-50); border: 3px solid var(--ink-900); border-radius: var(--r-xl); padding: 14px 20px 22px; }
.focus-card .pip { width: 150px; height: auto; margin: 0 auto -2px; display: block; }
@media (max-height: 640px) {   /* short screens (an old iPhone SE, small Androids): the big Done button stays in view */
  .focus-top { padding: 10px 0 4px; }
  .focus-card { padding: 8px 16px 16px; }
  .focus-card .pip { width: 108px; }
}
.focus-title { font-size: clamp(1.9rem, 8vw, 2.2rem); }
.focus-hint { font-size: 1.2rem; color: var(--ink-500); margin-top: 10px; }
.timer { margin: 18px auto 0; display: inline-flex; align-items: center; gap: 12px; padding: 8px 12px; border: 2.5px solid var(--ink-900); border-radius: var(--r-md); background: var(--cream-200); }
.timer .num { font-size: 2rem; line-height: 1; min-width: 4.2ch; }
.timer-quiet { background: var(--basil-100); }
.help-panel { text-align: left; margin-top: 16px; border: 2.5px solid var(--ink-900); border-radius: var(--r-md); background: var(--butter-100); padding: 14px 16px; }

/* routine complete: an iris closes on Pip, like the end of an old cartoon */
.iris { position: fixed; inset: 0; z-index: 30; background: var(--ink-900); color: var(--cream-50); display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 4px; padding: 24px 20px calc(24px + env(safe-area-inset-bottom)); text-align: center; overflow: auto; }
.iris > .stack { width: 100%; max-width: 440px; }
.iris > * { flex-shrink: 0; }   /* nothing is squeezed (the circle was, to a strip with ears and eyebrows); what does not fit is scrolled to */
.iris::before, .iris::after { content: ''; flex: 1 0 0; }   /* two springs: the content sits in the middle when there is room and starts at the top when there is not */
.iris .circle { position: relative; width: min(86vw, 420px, 44vh); width: min(86vw, 420px, 44dvh); aspect-ratio: 1; margin: 12px auto 0; border-radius: 50%; background: var(--cream-100); display: grid; place-items: end center; overflow: hidden; }
.iris .circle .pip { width: 72%; height: auto; margin-bottom: 4%; }
.iris h1 { color: var(--cream-50); font-size: clamp(2rem, 8vw, 2.4rem); }
.xp { color: var(--butter-400); font-weight: 600; font-size: 1.25rem; }
.iris .btn-reward { max-width: 420px; margin: 16px auto 0; width: 100%; }

/* progress and rewards */
.skillrow { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; align-items: end; height: 150px; }
.week .col { display: grid; justify-items: center; align-items: end; gap: 6px; height: 100%; grid-template-rows: 1fr auto; }
.week .b { width: 100%; max-width: 38px; border: 2.5px solid var(--ink-900); border-radius: 10px; background: var(--butter-300); }
.week .b.good { background: var(--basil-600); } .week .b.none { background: transparent; border: 2px dashed var(--ink-300); height: 36px !important; }
.starpill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 10px; border: 2.5px solid var(--ink-900); border-radius: 22px; background: var(--butter-400); font-weight: 600; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { text-align: left; padding: 6px 8px; border-bottom: 1.5px solid var(--cream-300); vertical-align: top; }
/* settings rows: the name of the setting over its value, so a long value (an email, two buttons) never pushes the name around */
.table-data td:first-child { overflow-wrap: anywhere; }   /* the long technical names may break; the button never does */
.table-data td:not(:first-child) { white-space: nowrap; vertical-align: middle; }
.table td:last-child > strong { white-space: nowrap; }
pre.json { margin: 0; max-height: 280px; overflow: auto; padding: 12px; border: 2px solid var(--ink-900); border-radius: var(--r-md); background: var(--cream-50); font: 13px/1.45 ui-monospace, Consolas, monospace; }

/* dialogs and toast */
.dlg { border: 3px solid var(--ink-900); border-radius: var(--r-lg); padding: 22px; background: var(--cream-50); color: var(--ink-900); width: min(92vw, 420px); }
.dlg::backdrop { background: rgba(20, 38, 28, .55); }
.dlg .row.end { flex-wrap: wrap; }   /* the buttons share the line; when they do not fit side by side the second one goes under the first */
.dlg .row.end > .btn:not(.icon-btn) { flex: 1 1 auto; }
@media (max-width: 360px) { .dlg { padding: 16px; } }
.dlg-wide { width: min(94vw, 560px); max-height: 92vh; overflow-y: auto; }
.dlg-body p { margin: 0 0 10px; } .dlg-body .steps { margin: 0; padding-left: 22px; display: grid; gap: 8px; color: var(--ink-900); }
.dlg legend { font-weight: 600; margin-bottom: 8px; padding: 0; }
textarea.input { resize: vertical; min-height: 72px; font: inherit; }
/* more of the printed look */
.focus-card, .dlg { box-shadow: 6px 6px 0 var(--ink-900); }
.starpill, .chip-btn, .mark-btn { box-shadow: 2px 2px 0 var(--ink-900); }
.notice { box-shadow: var(--print-sm); }
.notice p { overflow-wrap: anywhere; }
@media (max-width: 400px) { .notice .row > .btn { flex: 1 1 100%; } }   /* the buttons of a message on a phone: the same width, one under the other (a long label, "Сменить активного ребёнка", then breaks in two on purpose, not as a short button next to a wide one) */
.offline-note { display: none; padding: 8px 14px; border: 2px dashed var(--ink-300); border-radius: var(--r-md); background: var(--butter-100); font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
body.is-offline .offline-note { display: block; }   /* "No connection": stays while the server cannot be reached */   /* a long e-mail address in "Confirm your email" must not leave the box */
/* a rubber stamp, for things that are done */
.stamp { display: inline-block; padding: 1px 10px; border: 2.5px solid var(--basil-700); border-radius: 8px; color: var(--basil-700); background: var(--cream-50); font: 700 12px/20px var(--font-body); letter-spacing: .14em; text-transform: uppercase; transform: rotate(-5deg); box-shadow: inset 0 0 0 2px var(--cream-50), inset 0 0 0 3.5px var(--basil-400); white-space: nowrap; }
.stamp-wait { border-color: var(--butter-800); color: var(--butter-800); background: var(--butter-100); box-shadow: inset 0 0 0 2px var(--butter-100), inset 0 0 0 3.5px var(--butter-600); }
/* halftone dots on coloured bands */
.dots { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18'%3E%3Ccircle cx='4.5' cy='4.5' r='2' fill='%2314261C' fill-opacity='.09'/%3E%3Ccircle cx='13.5' cy='13.5' r='2' fill='%2314261C' fill-opacity='.09'/%3E%3C/svg%3E"); }
/* parent dashboard: two columns on wide screens */
.dash-side { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-content: start; }   /* minmax(0, 1fr): one long word cannot make the whole column wider than the screen */
@media (min-width: 1180px) {
  .shell-parent .main.wide { max-width: 1240px; }
  .dash { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 28px; align-items: start; }
  .dash-main > * + * { margin-top: 28px; }
}
@media (max-width: 1179px) { .dash-side { margin-top: 28px; } .dash-main > * + * { margin-top: 28px; } }
/* a bonus job: the sticker and the words on top, the button (or the stamp) on its own line below, so the title is never squeezed */
.bonus { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 12px; align-items: start; }
.bonus .b-act { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px 12px; text-align: right; }
.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quick a { display: grid; justify-items: center; align-content: start; gap: 6px; padding: 12px 8px; border: 2.5px solid var(--ink-900); border-radius: var(--r-md); background: var(--cream-50); color: var(--ink-900); font-weight: 600; text-align: center; text-decoration: none; box-shadow: 2px 2px 0 var(--ink-900); }
@media (hover: hover) { .quick a:hover { background: var(--butter-100); } }
.quick a > span { line-height: 1.2; text-wrap: balance; }
.activity { list-style: none; margin-inline: 0; margin-bottom: 0; padding: 0; display: grid; gap: 10px; }   /* the top margin is the stack's: the list does not touch its heading */
.activity li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.activity time { margin-left: auto; flex: none; color: var(--ink-500); font-size: 13px; white-space: nowrap; }
@media (max-width: 440px) {   /* on a phone the time goes under the sentence instead of squeezing it */
  .activity li { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; row-gap: 2px; }
  .activity time { grid-column: 2; margin-left: 0; }
}
/* empty states: Pip and a prop */
.empty-pip { position: relative; display: grid; justify-items: center; gap: 6px; }
.empty-pip .prop { position: absolute; right: calc(50% - 112px); bottom: 6px; transform: rotate(8deg); }
/* the prop for the current step sits on the corner of the focus card, like a sticker */
.focus-prop { position: absolute; top: 10px; right: 12px; transform: rotate(9deg); }
.skills { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
@media (min-width: 600px) { .skills { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.skill { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 12px; align-items: center; padding: 12px; min-width: 0; }
.skill .bar { grid-column: 1 / -1; }
/* drawings */
@media (pointer: coarse) {   /* a long press on a button or a link of the app: no callout, no text selection, no dragged picture (see main.js) */
  a[href^="#"], button, [data-action], summary, label.choice, .avatar-pick { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; -webkit-user-drag: none; }
}
.art { display: block; flex: none; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.spot .tag { position: absolute; right: -8px; bottom: -6px; min-width: 24px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--ink-900); color: var(--cream-50); font: 700 12px/22px var(--font-body); text-align: center; letter-spacing: 0; }
.spot { position: relative; flex: none; display: inline-grid; place-items: center; width: var(--s, 52px); height: var(--s, 52px); border: 2.5px solid var(--ink-900); border-radius: 50%; background: var(--tone, var(--butter-100)); }
.emblem { flex: none; position: relative; display: inline-grid; place-items: center; width: var(--s, 56px); height: var(--s, 56px); border: 3px solid var(--ink-900); border-radius: 50%; background: var(--bg, var(--butter-100)); }
.emblem::after { content: ''; position: absolute; inset: 4px; border: 2px dashed rgba(255, 251, 242, .9); border-radius: 50%; pointer-events: none; }
.emblem.is-locked { opacity: .4; filter: grayscale(.6); }
/* the child's level pass on Today: an XP ring, the level, and a paw for each of the last seven days */
.pass { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 16px; align-items: center; padding: 14px 16px; background: var(--cream-50); border: 3px solid var(--ink-900); border-radius: var(--r-lg); box-shadow: var(--print); color: inherit; text-decoration: none; }
.pass .txt { display: grid; gap: 2px; }
.pass .lvl { font: 900 1.3rem/1.1 var(--font-display); letter-spacing: -0.01em; }
.ring { position: relative; display: grid; place-items: center; width: 64px; height: 64px; border: 3px solid var(--ink-900); border-radius: 50%; background: conic-gradient(var(--basil-600) calc(var(--p, 0) * 1%), var(--cream-200) 0); }
.ring::before { content: ''; position: absolute; inset: 6px; border: 2.5px solid var(--ink-900); border-radius: 50%; background: var(--butter-100); }
.ring b { position: relative; font: 900 1.5rem/1 var(--font-display); }
.paws { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; justify-items: center; margin-top: 8px; padding-top: 12px; border-top: 2px dashed var(--cream-300); }
.paws .d { display: grid; justify-items: center; gap: 3px; font-size: 12px; font-weight: 600; color: var(--ink-500); }
.paws .d.is-today { color: var(--ink-900); }
.paws .d.is-today::after { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--ink-900); }
.paw { display: block; color: var(--ink-900); }
.paw path, .paw ellipse { fill: none; stroke: currentColor; stroke-width: 1.9; }
.paw-good path, .paw-good ellipse { fill: var(--butter-400); }
.paw-some path, .paw-some ellipse { fill: var(--butter-100); }
.paw-none { color: var(--ink-300); }
.paw-none path, .paw-none ellipse { stroke-width: 1.6; stroke-dasharray: 2.4 2.6; }
/* the sticker book */
.book { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px 12px; }
.sk { position: relative; display: grid; justify-items: center; align-content: start; gap: 6px; padding: 16px 10px 14px; text-align: center; background: var(--cream-50); border: 3px solid var(--ink-900); border-radius: var(--r-lg); box-shadow: var(--print-sm); transform: rotate(var(--tilt, 0deg)); }
.sk:nth-child(3n+1) { --tilt: -1.4deg; } .sk:nth-child(3n+2) { --tilt: 0.9deg; } .sk:nth-child(3n) { --tilt: -0.5deg; }
.sk .n { font: 700 1rem/1.15 var(--font-display); letter-spacing: -0.01em; }
.sk .h { font-size: 13px; line-height: 1.3; color: var(--ink-500); }
.sk .h:empty { display: none; }
.sk .new { position: absolute; top: -10px; right: -6px; transform: rotate(8deg); border: 2px solid var(--ink-900); }
.sk.is-locked { background: transparent; border: 2.5px dashed var(--ink-300); box-shadow: none; transform: none; }
.sk.is-locked .spot { opacity: 0.4; filter: grayscale(1); }
.sk.is-locked .n { color: var(--ink-500); }
.stack > .newsk { margin-top: 18px; } .stack > .newsk + .newsk { margin-top: 10px; }
/* Pip's clip animated in After Effects, over the drawing */
.pip-moment { position: relative; display: block; width: 100%; aspect-ratio: 240 / 280; }
.pip-moment > .pip { position: absolute; inset: 0; width: 100% !important; height: 100% !important; margin: 0 !important; }
.pip-moment > video { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .35s ease;
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 86%, transparent 100%); mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 86%, transparent 100%); }
.pip-moment > video.ready { opacity: 1; }
.iris .circle .pip-moment { width: 80%; margin-bottom: 1%; }
/* the moment after one step: the same dark screen as the routine-complete one, smaller and quicker */
.iris-step { z-index: 40; cursor: pointer; }
.iris-step .circle { width: min(60vw, 250px); margin-top: 0; }
.iris-step h1 { margin: 6px 0 0; }
.iris-step .stack { gap: 8px; }
.iris-step .xp { margin: 0; }
.iris .segments { justify-content: center; margin-top: 4px; }
.iris .seg { width: 30px; height: 10px; border-color: rgba(255, 244, 222, 0.45); background: rgba(255, 244, 222, 0.16); }
.iris .seg.is-done { background: var(--butter-400); border-color: var(--butter-400); }
/* the fact of the day */
.fact-back { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; background: rgba(20, 38, 28, 0.62); overflow: auto; }
.fact-card { position: relative; width: min(100%, 420px); margin-top: 70px; padding: 78px 22px 22px; text-align: center; background: var(--cream-50); border: 3px solid var(--ink-900); border-radius: var(--r-xl); box-shadow: 6px 6px 0 var(--ink-900); display: grid; justify-items: center; gap: 6px; }
.fact-pip { position: absolute; top: -78px; left: 50%; transform: translateX(-50%); }
.fact-pip .pip { display: block; }
.fact-text { font-size: clamp(1.35rem, 5.5vw, 1.75rem); line-height: 1.2; margin: 6px 0 4px; }
/* Pip says one short thing on Today */
.say { position: relative; margin: 12px 14px 0 0; padding: 8px 12px; background: var(--cream-50); border: 2.5px solid var(--ink-900); border-radius: 14px; box-shadow: var(--print-sm); font-size: 15px; line-height: 1.3; font-weight: 500; }
.say::after { content: ''; position: absolute; right: -9px; top: 50%; width: 14px; height: 14px; margin-top: -7px; background: var(--cream-50); border-top: 2.5px solid var(--ink-900); border-right: 2.5px solid var(--ink-900); transform: rotate(45deg); }
.visitcard.has-pip { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.visitcard .vc-main { display: grid; gap: 10px; min-width: 0; } .visitcard .vc-main p { margin: 0; }
.bar-sm { height: 10px; border-width: 2px; border-radius: 5px; width: 100%; }
.bar-sm > i { border-right-width: 2px; }
.sk .bar-sm { max-width: 110px; }
/* the visit streak: a label, the count to the next achievement and a bar, inside the level pass; and the larger card on Progress */
.pass .visit { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: center; margin-top: 4px; padding-top: 10px; border-top: 2px dashed var(--cream-300); font-size: 14px; }
.pass .visit .vt { grid-area: 1 / 1; display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; } .pass .visit .vt span { color: var(--ink-500); }
.pass .visit .vn { grid-area: 1 / 2; font-weight: 600; font-variant-numeric: tabular-nums; }
.pass .visit .bar { grid-area: 2 / 1 / 3 / 3; }
/* goals (Premium): segments for one good day each, a quiet row on Today, a card on Progress */
.gsegs { display: flex; gap: 4px; width: 100%; }
.gsegs i { flex: 1 1 0; min-width: 6px; height: 12px; border-radius: 6px; border: 2px solid var(--ink-300); background: var(--ink-100); }
.gsegs i.is-done { background: var(--basil-600); border-color: var(--ink-900); }
.goalrow { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--cream-50); border: 3px solid var(--ink-900); border-radius: var(--r-lg); box-shadow: var(--print-sm); color: inherit; text-decoration: none; }
.goalrow.is-done { background: var(--basil-100); }
.goalrow .gl-body { display: grid; gap: 6px; flex: 1; min-width: 0; }
.goalcard { background: var(--cream-50); }
.goalcard.is-done { background: var(--basil-100); }
.goal-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.goalcard .display { font-size: clamp(1.1rem, 5.4vw, 1.35rem); }
/* the drawings that sit beside text get smaller on the narrowest phones, so the words keep their room */
@media (max-width: 380px) {
  .kid-head > .pip { width: 84px; height: auto; flex: none; }
  .goal-grid > .pip, .visitcard > .pip { width: 72px; height: auto; }
  .card-brand > .pip { width: 68px; height: auto; flex: none; }
}
.goalline { display: grid; gap: 6px; color: inherit; text-decoration: none; font-size: 14px; }
.gl-line { display: flex; align-items: center; justify-content: center; gap: 10px; margin-inline: 0; margin-bottom: 0; text-align: left; }   /* the top margin is the stack's: the goal does not touch the line above it */
.iris .gsegs i { border-color: rgba(255, 244, 222, 0.45); background: rgba(255, 244, 222, 0.16); } .iris .gsegs i.is-done { background: var(--butter-400); border-color: var(--butter-400); }
.quick a .chip { margin-top: 2px; } .quick a:last-child:nth-child(odd) { grid-column: 1 / -1; }
.visitcard { display: grid; gap: 10px; }
.visitcard p { margin: 0; }
/* today's plan inside a child's card (parent) */
.dayplan { border-top: 2px solid var(--cream-300); padding-top: 12px; }
.plan-row { background: var(--cream-50); border: 2px solid var(--cream-300); border-radius: var(--r-md); padding: 8px 12px; }
.plan-row summary { display: flex; align-items: center; gap: 10px; cursor: pointer; min-height: 40px; list-style: none; }
/* the title has the whole width; the time (or the stars) and the status sit under it, and wrap among themselves */
.plan-row .grow > strong { display: block; }
.plan-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; margin-top: 2px; font-size: 14px; }
.plan-meta .chip { min-height: 26px; font-size: 13px; }
.plan-row summary::-webkit-details-marker { display: none; }
.plan-row summary:focus-visible { outline: 3px solid var(--ink-900); outline-offset: 2px; }
.plan-bonus { display: flex; min-height: 44px; align-items: center; gap: 10px; }
.plan-steps { list-style: none; margin: 6px 0 4px; padding: 0; display: grid; gap: 6px; }
.plan-steps li { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.ps-mark { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--ink-900); font-weight: 700; }
.ps-done .ps-mark { background: var(--basil-600); color: var(--cream-50); border-color: var(--basil-600); }
.ps-wait .ps-mark { background: var(--butter-300); }
.ps-back .ps-mark { background: var(--tomato-100); }
.ps-todo .ps-mark { border-style: dashed; }
.is-done .t, .card-quiet.is-done strong { text-decoration: none; }
/* calm moments and lessons */
.steps { margin: 6px 0 0; padding-left: 22px; display: grid; gap: 6px; }
a.chip-btn { text-decoration: none; color: inherit; }
.chip-btn[aria-current="page"] { background: var(--butter-300); }
.marks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 349px) { .marks { grid-template-columns: minmax(0, 1fr); } }   /* on the narrowest phones the three marks are one under another: "Спокойно" does not fit a third of the card */
.diary-head { align-items: flex-start; }
@media (max-width: 359px) { .diary-head { flex-wrap: wrap; justify-content: flex-start; } .diary-head > .grow { flex: 1 1 100%; } }   /* the buttons go under the title instead of squeezing it */
.mark-btn { min-height: 48px; padding: 6px 4px; overflow-wrap: anywhere; border: 2.5px solid var(--ink-900); border-radius: 14px; background: var(--cream-50); font: inherit; font-weight: 600; cursor: pointer; }
.mark-btn:focus-visible { outline: 3px solid var(--ink-900); outline-offset: 2px; }
.mark-btn { line-height: 1.2; }   /* after the shorthand `font: inherit` of the rule above, which would reset them */
@media (max-width: 399px) { .mark-btn { font-size: 14px; } }
.mark-btn[aria-pressed="true"].m-calm { background: var(--basil-100); border-color: var(--basil-700); color: var(--basil-700); }
.mark-btn[aria-pressed="true"].m-slow { background: var(--butter-300); }
.mark-btn[aria-pressed="true"].m-hard { background: var(--tomato-100); border-color: var(--tomato-700); color: var(--tomato-700); }
.strip { display: grid; grid-template-columns: repeat(14, 1fr); gap: 4px; }
.strip i { display: block; height: 18px; border-radius: 5px; border: 2px solid var(--cream-300); background: var(--cream-100); }
.strip i.l-calm { background: var(--basil-600); border-color: var(--basil-700); }
.strip i.l-slow { background: var(--butter-400); border-color: var(--ink-900); }
.strip i.l-hard { background: var(--tomato-100); border-color: var(--tomato-700); border-style: dashed; }
.lesson-card { min-height: 220px; justify-content: center; }
/* reward types and filters */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tzbox summary { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; min-height: 44px; cursor: pointer; font-size: 15px; } .tzbox summary span { text-decoration: underline; } .tzbox[open] summary { margin-bottom: 8px; }
.tap { display: inline-flex; align-items: center; min-height: 44px; }   /* a plain link that needs a 44 px target */
.chip-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 6px 14px; border: 2.5px solid var(--ink-900); border-radius: 20px; background: var(--cream-50); font: inherit; font-weight: 600; cursor: pointer; }
.chip-btn[aria-pressed="true"] { background: var(--butter-300); }
/* pressing: everything that can be pressed gives under the finger at once (a squash) and springs back past its place and settles, like the tabs below. When the press redraws
   the screen the pressed button is thrown away with the old screen; its twin on the new one plays the spring back (ui.js, springBack) */
.trow, .pass, .goalrow, .quick a, .chip-btn, .mark-btn, .lang button, .avatar-pick, .tap, .brand, .side a.nav, .lp-nav button, .choice span { transition: transform .46s var(--spring), box-shadow .46s var(--spring), background-color .15s; }
.trow:active, .pass:active, .goalrow:active { transform: translate(2px, 2px) scale(.975, .96); box-shadow: 2px 2px 0 var(--ink-900); }
.quick a:active, .chip-btn:active, .mark-btn:active { transform: translate(1px, 1px) scale(.95, .92); box-shadow: 1px 1px 0 var(--ink-900); }
.lang button:active, .avatar-pick:active, .tap:active, .brand:active, .side a.nav:active, .lp-nav button:active { transform: scale(.92); }
.choice:active span { transform: scale(.96, .92); }
.btn:active, .trow:active, .pass:active, .goalrow:active, .quick a:active, .chip-btn:active, .mark-btn:active, .lang button:active, .avatar-pick:active, .tap:active, .brand:active, .side a.nav:active, .lp-nav button:active, .choice:active span { transition-duration: .07s; transition-timing-function: ease-out; }
.is-spring:is(.btn, .trow, .pass, .goalrow, .quick a, .chip-btn, .mark-btn, .lang button) { animation: springBack .46s var(--spring) backwards; }
@keyframes springBack { from { transform: translate(2px, 2px) scale(.96, .93); } to { transform: none; } }
/* a block button with an icon: the icon stays at the left edge and the words are centered in the button, like the words of the buttons without one */
.btn-block { position: relative; }
/* a card that is one big button ("All set! Open Pip"): it gives under the finger like the other pressable things */
.card-btn { width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; align-items: center; transition: transform .46s var(--spring), box-shadow .46s var(--spring); }
.card-btn:active { transform: translate(2px, 2px) scale(.975, .96); box-shadow: 2px 2px 0 var(--ink-900); transition-duration: .07s; transition-timing-function: ease-out; }
.card-btn .h2 { display: block; font-family: var(--font-display); font-weight: 900; letter-spacing: -0.02em; line-height: 1.1; text-wrap: balance; }   /* a button holds no real heading: the same look as one */
.card-btn.is-spring { animation: springBack .46s var(--spring) backwards; }
.card-btn .stack > span { display: block; }   /* the words under the title of a card that is a button: inline words would ignore the gap of the stack and touch the title */
.card-btn:focus-visible { outline: 3px solid var(--ink-900); outline-offset: 3px; }
.btn-block:not(.icon-btn) > .ico:first-child { position: absolute; left: 16px; top: 50%; translate: 0 -50%; }
.btn-block:not(.icon-btn):has(> .ico:first-child) { padding-inline: 46px; }
.chip-btn:focus-visible { outline: 3px solid var(--ink-900); outline-offset: 2px; }
.rw-ico { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border: 2.5px solid var(--ink-900); border-radius: 14px; background: var(--butter-300); }
.cat-grid { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 560px) { .cat-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); } }
.cat-grid .choice span { min-height: 48px; padding: 8px 12px; }
.choice-pill span { min-height: 44px; padding: 6px 14px; gap: 6px; border-radius: 22px; }
.price-custom { width: 96px; min-height: 44px; border-radius: 22px; text-align: center; }
#toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); opacity: 0; z-index: 50; padding: 12px 18px; border: 2.5px solid var(--ink-900); border-radius: var(--r-md); background: var(--ink-900); color: var(--cream-50); font-weight: 600; transition: opacity .2s, transform .2s; pointer-events: none; width: max-content; max-width: min(90vw, 440px); text-align: center; }
#toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* landing */
.lp-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 18px; }
.lp-head .brand { flex: none; white-space: nowrap; font-size: clamp(1.2rem, 5.6vw, 1.5rem); }
/* on a phone the header only has room for the name and the language switch; "Sign in" moves under the buttons in the hero */
.lp-signin { display: none; }
@media (min-width: 600px) { .lp-signin { display: inline-flex; } .lp-signin-hero { display: none; } }
.lp-install { display: none; }
@media (min-width: 1100px) { .lp-install { display: inline-flex; } }
.lp-nav { display: none; gap: 26px; } .lp-nav button { background: none; border: 0; font-weight: 500; font-size: 16px; cursor: pointer; padding: 8px 2px; min-height: 44px; white-space: nowrap; }
@media (min-width: 1100px) { .lp-nav { display: flex; } }   /* the menu needs room: a phone turned sideways (up to about 930 px) does not get it */
.hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; padding-block: 20px 56px; align-items: center; }
.hero > * { min-width: 0; }
@media (min-width: 900px) { .hero { grid-template-columns: 1.05fr 1fr; padding-top: 28px; } }
.hero h1 { overflow-wrap: break-word; hyphens: auto; font-size: clamp(2.2rem, 8.6vw, 4.6rem); line-height: .98; letter-spacing: -0.035em; }
@media (min-width: 900px) { .hero h1 { font-size: clamp(2.6rem, 5vw, 4.6rem); } }   /* two columns: the headline gets half the width, so it is set smaller than on a phone */
.hero h1 em { font-style: normal; color: var(--basil-600); display: block; }
.hero-block { position: relative; background: var(--basil-600); border: 3px solid var(--ink-900); border-radius: 36px; min-height: 520px; display: grid; place-items: start center; overflow: visible; padding: 28px 28px 176px; }   /* the phone sits at the top and the mascot below it: the room under the phone is the mascot's, so it never lies over the buttons (checked by "covered" in tools/wrap-check.js) */
/* the round "7 days free" sticker hangs on the block's top-left corner and is 124 px wide: when the block is narrower than the phone plus two stickers (every phone, and a laptop window that is narrow), the phone starts below it, so the sticker never lies over its words */
.hero-block { container-type: inline-size; }
@container (max-width: 470px) { .hero-block > .phone { margin-top: 88px; } }
.hero-sun { position: absolute; width: 74%; aspect-ratio: 1; border-radius: 50%; background: var(--butter-400); border: 3px solid var(--ink-900); top: 56%; left: 50%; transform: translate(-50%, -50%); }
.phone { position: relative; width: 240px; border: 4px solid var(--ink-900); border-radius: 34px; background: var(--ink-900); padding: 6px; }
.phone-in { background: var(--cream-100); border-radius: 28px; padding: 14px 12px 14px; font-size: 11px; line-height: 1.3; text-align: center; }
.phone-in .card-mini { background: var(--cream-50); border: 2.5px solid var(--ink-900); border-radius: 16px; padding: 6px 8px 12px; margin: 8px 0; }
.phone-in .pip { width: 70px; height: auto; display: block; margin: 0 auto; }
.phone-in .t { font-family: var(--font-display); font-weight: 900; font-size: 17px; letter-spacing: -0.02em; }
.phone-in .b1 { display: block; padding: 9px; border: 2.5px solid var(--ink-900); border-radius: 12px; background: var(--basil-600); color: var(--cream-50); font-weight: 600; font-size: 13px; margin-bottom: 6px; }
.phone-in .b2 { display: block; padding: 7px; border: 2.5px solid var(--ink-900); border-radius: 12px; background: var(--cream-50); font-weight: 600; font-size: 12px; }
.hero-pip { position: absolute; right: -6px; bottom: -34px; width: 190px; z-index: 2; }
.sticker { position: absolute; left: -18px; top: -22px; width: 124px; height: 124px; display: grid; place-items: center; text-align: center; border-radius: 50%; background: var(--tomato-500); border: 3px solid var(--ink-900); transform: rotate(-12deg); font-family: var(--font-display); font-weight: 900; font-size: 22px; line-height: 1.05; z-index: 3; }
.collect { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px 14px; max-width: 720px; margin-top: 12px; }
.collect .spot { box-shadow: var(--print-sm); }
.collect .spot:nth-child(4n+1) { transform: rotate(-6deg); } .collect .spot:nth-child(4n+2) { transform: rotate(4deg); } .collect .spot:nth-child(4n+3) { transform: rotate(-3deg); } .collect .spot:nth-child(4n) { transform: rotate(7deg); }
.band { padding-block: 56px; }
.band-butter { background: var(--butter-300); border-top: 3px solid var(--ink-900); border-bottom: 3px solid var(--ink-900); }
.steps { display: grid; gap: 0; }
.band .steps { margin: 0; padding-left: 0; }
.step { display: grid; grid-template-columns: 56px 1fr; gap: 12px 16px; padding: 22px 0; border-top: 3px solid var(--ink-900); align-items: start; }
.step:last-child { border-bottom: 3px solid var(--ink-900); }
.step .pic { grid-column: 2; display: flex; } .step .pic .pip { width: 96px; height: auto; }
@media (min-width: 720px) { .step { grid-template-columns: 74px 1fr auto; align-items: center; } .step .pic { grid-column: auto; padding-right: 8px; } }
.step .n { font-family: var(--font-display); font-weight: 900; font-size: 3.6rem; line-height: .9; color: var(--tomato-500); letter-spacing: -0.04em; }
.plans { display: grid; gap: 20px; }
@media (min-width: 820px) { .plans { grid-template-columns: 1fr 1.25fr; } }
.plan { border: 3px solid var(--ink-900); border-radius: var(--r-xl); padding: 24px; background: var(--cream-50); }
.plan-main { background: var(--basil-600); color: var(--cream-50); }
@media (max-width: 359px) { .plan { padding: 14px; } .plan .btn-l { font-size: 16px; } }   /* "Попробовать бесплатно" fits one line on a 320 px phone */
.plan-main .eyebrow { color: var(--cream-50); }   /* the butter colour on the green was 3.7:1 at this small size: under the 4.5:1 for text */
.plan-main li::marker { color: var(--butter-300); }
.plan ul { padding-left: 20px; margin: 14px 0 0; display: grid; gap: 6px; }
/* the plans compared (Plan screen): Free is a plain card, Premium is the green one with the crown; one column on a phone, two when the screen has room */
.cmp { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.cmp-card { display: flex; flex-direction: column; gap: 14px; }
.cmp-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.cmp-head h3 { flex: 1 1 auto; min-width: 0; margin: 0; }
.cmp-art { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border: 2.5px solid var(--ink-900); border-radius: 50%; background: var(--butter-100); }
/* a child on the Family screen: the picture and the name, then what can be done: open Pip (the wide button), and edit and connect a device (two equal ones) */
.kidcard { display: grid; gap: 14px; }
.kidcard-head { display: flex; align-items: center; gap: 14px; min-width: 0; }
.kidcard-who { min-width: 0; display: grid; gap: 6px; justify-items: start; }   /* the name, and under it the note when the plan has paused this child */
.kidcard-who .h3 { font-size: 1.4rem; }
/* the account card: the picture and the e-mail address, then the plan and the way to manage it */
.acc-email { font-size: 1.05rem; line-height: 1.25; }
.acc-plan { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.kidcard-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kidcard-actions > .btn { width: 100%; min-width: 0; }
.kidcard-actions > .kid-open { grid-column: 1 / -1; }
.kidcard-actions > :only-child { grid-column: 1 / -1; }
@media (min-width: 560px) { .kidcard-actions > :only-child:not(.kid-open) { grid-column: auto; } }   /* a lone button (a child the plan has paused) does not stretch across a wide card */
@media (max-width: 349px) { .kidcard-actions { grid-template-columns: 1fr; } }   /* on the narrowest phones a half-width button cannot hold "Подключить устройство": every button gets the whole width */
/* the child's rewards page: the title at the top, the words under it standing on the line of the mascot's feet (its feet are 10 of its 280 units above the picture's bottom edge) */
.kid-head-pip .kh-text { align-self: stretch; display: flex; flex-direction: column; justify-content: space-between; margin-bottom: -1px; }
.kid-head-pip svg.pip { flex: none; }   /* the mascot keeps its size, so its feet stay where the words end */
@media (max-width: 359px) { .kid-head-pip .kh-text p { font-size: 14px; line-height: 1.35; } }   /* on the narrowest phones the words are a little smaller, to fit beside it */
/* the child's profile: what I have, three tiles */
/* the child's Profile: Pip on his stand, and the wardrobe. The things lie on him as pictures placed in his frame (views/corner.js), so his chest does not breathe under them here */
.wear-card { display: grid; gap: 10px; padding: 16px 14px 14px; background: repeating-conic-gradient(from 0deg at 50% 36%, var(--ray) 0 7.5deg, var(--bg) 7.5deg 15deg); }
.wear-stage { position: relative; width: min(62%, 236px); aspect-ratio: 240 / 280; margin-inline: auto; }
.wear-stage.is-dressing { visibility: hidden; }   /* his clothes are on their way: he comes out dressed (views/corner.js) */
.wear-stage > .pip { position: absolute; inset: 0; width: 100%; height: 100%; }
.wear-stage .pip-live [data-part="body"] { animation: none; }
.wear-stage [data-part="shadow"] ellipse { fill: rgba(20, 38, 28, .16); }   /* his shadow lies on any of the backgrounds */
.wear-level { padding: 12px 14px; border: 2.5px solid var(--ink-900); border-radius: 16px; background: var(--cream-50); }
.wear-backs { display: flex; justify-content: center; }
.wear-back { display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 0; background: none; cursor: pointer; }
.wear-back i { display: block; width: 32px; height: 32px; border: 2.5px solid var(--ink-900); border-radius: 50%; background: repeating-conic-gradient(var(--ray) 0 30deg, var(--bg) 30deg 60deg); }
.wear-back[aria-pressed="true"] i { box-shadow: 0 0 0 2px var(--cream-50), 0 0 0 4.5px var(--ink-900); }
.wear-back:focus-visible { outline: 3px solid var(--ink-900); outline-offset: -2px; border-radius: 10px; }
.wear-on { position: absolute; display: block; height: auto; pointer-events: none; }
svg.pip:not([data-ready]) ~ .wear-on { visibility: hidden; }   /* what he wears arrives with him */
svg.pip[data-ready="late"] ~ .wear-on { animation: pipIn .3s ease-out both; }
.wear-new { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 8px 0 4px; }
.wear-new-t { display: grid; min-width: 0; text-align: start; }
.wear-new .eyebrow { color: var(--butter-300); }
.wear-new strong { font-size: 1.2rem; line-height: 1.2; color: var(--cream-50); }
.wear-new-pic { flex: none; display: grid; width: 46px; height: 46px; padding: 5px; border-radius: 12px; background: var(--cream-100); }
.wear-new-pic img { width: 100%; height: 100%; min-width: 0; object-fit: contain; }
.wear-lvl { font-size: clamp(1.5rem, 7vw, 2.1rem); line-height: 1; }
.wear-tabs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.wear-tab { justify-content: center; min-height: 48px; padding: 4px; border-radius: 14px; }
.wear-tab img { width: 100%; height: 34px; object-fit: contain; opacity: .4; }
.wear-tab.is-on img { opacity: 1; }
.wear-name { margin: 14px 0 8px; font-size: 1.1rem; }
.wear-tints { display: flex; margin: 4px -9px 0; }
.wear-tints:empty { display: none; }
.wear-tint { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; background: none; cursor: pointer; }
.wear-tint i { display: block; width: 26px; height: 26px; border: 2.5px solid var(--ink-900); border-radius: 50%; }
.wear-tint[aria-pressed="true"] i { box-shadow: 0 0 0 2px var(--cream-100), 0 0 0 4.5px var(--ink-900); }
.wear-tint:focus-visible { outline: 3px solid var(--ink-900); outline-offset: -2px; border-radius: 10px; }
.wear-shelf { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.wear-tile { position: relative; justify-content: center; aspect-ratio: 1; min-height: 0; padding: 8px; border-radius: 16px; }
.wear-tile img { width: 100%; height: 100%; object-fit: contain; }
.wear-tab img.wear-half, .wear-tile img.wear-half, .wear-new-pic img.wear-half { object-fit: cover; object-position: left; }
.wear-tile.is-shut { padding-bottom: 22px; border-color: var(--cream-300); background: var(--cream-100); cursor: default; }
.wear-tile.is-shut img { filter: grayscale(1); opacity: .3; }
.wear-lv { position: absolute; inset: auto 0 5px; display: flex; align-items: center; justify-content: center; gap: 2px; font-size: 13px; line-height: 1; color: var(--ink-700); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 10px; }
.stat { display: grid; justify-items: center; align-content: start; gap: 4px; padding: 14px 8px; text-align: center; }
.stat-n { font-size: 1.8rem; line-height: 1; }
.stat-l { font-size: 13px; line-height: 1.25; color: var(--ink-500); }
.cmp-until { margin: 0; font-size: 14px; line-height: 1.35; opacity: .9; }   /* the days of the trial that are left, or until when the paid period runs: under the name of the plan the family is on */
.cmp-plus { margin: 0; font-weight: 700; }   /* (the butter colour on the green was 3.7:1, and the lighter butter 4.4:1: under the 4.5:1 that a line of normal text needs; it has the card's own cream now) */
.cmp-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.cmp-list li { display: flex; align-items: flex-start; gap: 10px; }
.cmp-list .ico { flex: none; margin-top: 1px; padding: 2px; border-radius: 50%; background: var(--basil-100); color: var(--basil-700); }
.cmp-premium { background: var(--basil-600); color: var(--cream-50); }
.cmp-premium .cmp-list .ico { background: var(--butter-400); color: var(--ink-900); }
.price { font-family: var(--font-display); font-weight: 900; font-size: 2.6rem; letter-spacing: -0.03em; }
.price-was { font-size: 1.3rem; font-weight: 600; color: var(--ink-500); text-decoration: line-through; margin-right: 4px; }
/* the periods on the plan screen: one card, a row for each (the period and its price, the button beside them), no big boxes */
.terms { display: grid; padding-top: 6px; padding-bottom: 6px; }
.term { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 12px; padding: 14px 0; }
.term + .term { border-top: 2px solid var(--cream-300); }
.term-info { flex: 1 1 auto; min-width: 0; display: grid; gap: 2px; }
.term-name { margin: 0; font: 600 1rem/1.3 var(--font-body); color: var(--ink-700); }
.term-price { font-family: var(--font-display); font-weight: 900; font-size: 1.75rem; line-height: 1.15; letter-spacing: -0.02em; white-space: nowrap; }
.term-price .price-was { font-family: var(--font-body); font-size: .95rem; font-weight: 500; letter-spacing: 0; margin: 0; text-decoration-thickness: 1px; display: block; }   /* always on its own line above the price, so the row does not change shape with the language or the width */
.term .btn { flex: none; }
details.faq { border-top: 3px solid var(--ink-900); padding: 14px 0; }
details.faq:last-of-type { border-bottom: 3px solid var(--ink-900); }
details.faq summary { cursor: pointer; font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; list-style: none; display: flex; justify-content: space-between; gap: 12px; min-height: 44px; align-items: center; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: '+'; font-size: 1.6rem; }
details.faq[open] summary::after { content: '–'; }
details.faq p { margin-top: 8px; color: var(--ink-500); max-width: 62ch; }
/* the end of the page is its own dark band, full width, so it cannot be mistaken for one more empty row of the question list above it */
.footer { background: var(--ink-900); color: var(--cream-100); }
.footer > .page { padding-block: 22px calc(30px + env(safe-area-inset-bottom)); }
.footer a { color: var(--cream-50); text-decoration-color: var(--butter-400); }
.foot-contact { color: var(--cream-300); font-size: 15px; }
.foot-legal { flex: 1 0 100%; margin: 0; color: var(--cream-300); font-size: 12px; line-height: 1.4; opacity: .6; }   /* who runs the service: small print */

/* mascot */
.pip { display: block; overflow: visible; }
svg.pip:not([data-ready]) { visibility: hidden; }   /* its picture is still on its way (see js/mascot.js): the space is kept, nothing jumps */
svg.pip[data-ready="late"] { animation: pipIn .3s ease-out both; }
@keyframes pipIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  .pip-live [data-part="tail"] { animation: wag 1.5s ease-in-out infinite alternate; }
  .pip-live [data-null="eyes"] { animation: blink 5s infinite; }
  .pip-live [data-part="ear-l"], .pip-live [data-part="ear-near"] { animation: sway 3.4s ease-in-out infinite alternate; }
  .pip-live [data-part="ear-r"], .pip-live [data-part="ear-far"] { animation: sway2 3.8s ease-in-out infinite alternate; }
  .pip-live [data-part="body"] { animation: breathe 4s ease-in-out infinite; }
  .pip-live [data-part="z-big"], .pip-live [data-part="z-small"] { animation: drift 3.6s ease-in-out infinite; }
  .pip-live [data-part="z-small"] { animation-delay: 1.8s; }
  .pip-live [data-part="wag-marks"] { animation: flick .5s steps(2) infinite; }
  /* the situation drawings: sparkles flicker, bubbles rise, the flag waves, the free hand waves or scrubs */
  .pip-live [data-part="sparkles"], .pip-live [data-part="rays"], .pip-live [data-part="wave-marks"] { animation: flick .6s steps(2) infinite; }
  .pip-live [data-part="bubbles"] { animation: drift 2.6s ease-in-out infinite; }
  .pip-live [data-part="flag-cloth"] { animation: sway2 1.1s ease-in-out infinite alternate; }
  .pip-trophy.pip-live [data-part="arm-r"] { animation: sway 1.4s ease-in-out infinite alternate; }
  .pip-backpack.pip-live [data-part="arm-r"] { animation: waveArm .55s ease-in-out infinite alternate; }
  .pip-brush.pip-live [data-part="arm-r"] { animation: scrub .3s ease-in-out infinite alternate; }
  .pip-gift.pip-live [data-part="gift"] { animation: offer 1.8s ease-in-out infinite alternate; }
  .pip-hop { animation: hop 1.1s cubic-bezier(.3, 1.4, .5, 1) 1 both; transform-origin: 50% 100%; }
  .pip-live .pip-celebrate-arms { animation: none; }
  .iris .circle { animation: irisIn .6s ease-out both; }
}
@keyframes wag { from { transform: rotate(-9deg); } to { transform: rotate(9deg); } }
@keyframes waveArm { from { transform: rotate(-7deg); } to { transform: rotate(9deg); } }
@keyframes scrub { from { transform: rotate(-3.5deg); } to { transform: rotate(3deg); } }
@keyframes offer { from { transform: translateY(0); } to { transform: translateY(-4px); } }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.07); } }
@keyframes sway { from { transform: rotate(-2.5deg); } to { transform: rotate(3deg); } }
@keyframes sway2 { from { transform: rotate(2.5deg); } to { transform: rotate(-2.5deg); } }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(.992, 1.012); } }
@keyframes drift { 0% { transform: translateY(8px); opacity: 0; } 40% { opacity: 1; } 100% { transform: translateY(-34px); opacity: 0; } }
@keyframes flick { from { opacity: 1; } to { opacity: .35; } }
@keyframes hop { 0% { transform: translateY(0) scale(1.06, .92); } 35% { transform: translateY(-18px) scale(.97, 1.04); } 60% { transform: translateY(0) scale(1.05, .94); } 80% { transform: translateY(-6px) scale(1); } 100% { transform: none; } }
@keyframes irisIn { from { clip-path: circle(0% at 50% 50%); } to { clip-path: circle(72% at 50% 50%); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
@media (forced-colors: active) { .btn, .card, .input { border: 2px solid CanvasText; } }

/* the screens that say something is wrong (views/errors.js): Pip, a big word, and the ways out */
.problem { padding-top: 40px; }
.problem h1 + p { margin-top: 10px; }
.problem-pip { display: grid; justify-items: center; gap: 4px; }
.problem-code { font-size: clamp(3.4rem, 18vw, 5rem); line-height: 1; letter-spacing: -0.04em; color: var(--ink-300); }
.problem-detail { text-align: left; color: var(--ink-500); font-size: 14px; }
.problem-detail summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.problem-detail pre { margin: 6px 0 0; padding: 12px; border: 2px solid var(--cream-300); border-radius: var(--r-md); background: var(--cream-100); white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; font-size: 13px; }
@media (max-height: 640px) { .problem { padding-top: 12px; } .problem-pip svg.pip { width: 120px; height: auto; } }

/* the legal pages: the clauses are numbered, on one card */
.legal { list-style: none; margin-bottom: 0; padding: 4px 18px; }   /* the top margin is the stack's gap above the card */
.legal li { display: grid; grid-template-columns: 34px 1fr; gap: 14px; align-items: start; padding: 16px 0; }
.legal li + li { border-top: 2px dashed var(--cream-300); }
.legal .no { display: grid; place-items: center; width: 34px; height: 34px; border: 2px solid var(--ink-900); border-radius: 50%; background: var(--butter-100); font-family: var(--font-display); font-weight: 900; font-size: 1rem; }
.legal p { margin: 0; font-size: 1.0625rem; line-height: 1.55; color: var(--ink-900); }
@media (max-width: 480px) { .legal-pip { display: none; } }   /* on a phone the title gets the whole width: long titles in Spanish would otherwise take three lines */

/* the agreements on the sign-up form: one box, so it is clear what the two ticks are for */
.consent { border: 2px solid var(--ink-900); border-radius: var(--r-md); background: var(--cream-100); padding: 8px 16px 12px; }
.consent legend { padding: 0 8px; margin-left: -8px; }
.consent .check { padding: 10px 0; }
.consent .check + .check { border-top: 2px dashed var(--cream-300); }
.consent a { font-weight: 700; }

/* ---------------------------------------------------------------- narrow phones: three languages in the switch
   The language switch has three buttons now, so on the smallest phones each one is a little narrower (still 44 tall), the brand never wraps,
   and the landing page's header gets a smaller gap. */
.brand { white-space: nowrap; }
@media (max-width: 380px) { .lang { --lang-w: 40px; } }
@media (max-width: 359px) {
  .lang { --lang-w: 36px; padding: 2px; }
  .lang button { font-size: 13px; }
  .lp-head { gap: 8px; }
  .brand, .lp-head .brand { font-size: 1.15rem; }
}

/* ---------------------------------------------------------------- Russian (html lang="ru")
   Words run about a quarter longer than in English, and Cyrillic in the headings' serif (Literata) is wider than the Latin of Fraunces: so the big type is
   a little smaller and a little less tight. Every line is set in one family (Literata for headings, Golos Text for text), Cyrillic, Latin and digits alike.
   Words are never hyphenated: a hyphen in a heading, a button or a card looks like a fault, and English and Spanish do not hyphenate either. */
html:lang(ru) {
  --font-display: 'Literata', Georgia, 'Times New Roman', serif;
  --font-body: 'Golos Text', system-ui, -apple-system, 'Segoe UI', sans-serif;
  hyphens: manual;
}
html:lang(ru) .hero h1 { hyphens: manual; }
html:lang(ru) .display, html:lang(ru) h1, html:lang(ru) h2, html:lang(ru) h3, html:lang(ru) h4 { letter-spacing: -0.015em; }
html:lang(ru) .h1 { font-size: clamp(1.3rem, 6.4vw, 2.1rem); }   /* "конфиденциальности" (18 letters) has to fit a 320 px phone in one piece */
html:lang(ru) .h1-long { font-size: clamp(1.25rem, 5.6vw, 1.75rem); }
html:lang(ru) .h2 { font-size: clamp(1.3rem, 6.4vw, 1.4rem); }
html:lang(ru) .legal p { font-size: 1rem; }   /* the clauses' column is narrow (the number and a margin take a third of it) and the words are long */
html:lang(ru) .legal-title { font-size: clamp(1.25rem, 5.6vw, 1.7rem); }   /* "Политика конфиденциальности" beside Pip's picture: the long word has to fit in the room that is left */
html:lang(ru) .skills { grid-template-columns: minmax(0, 1fr); }   /* "Самостоятельность" does not fit a half-width card */
html:lang(ru) .hero h1 { font-size: clamp(1.9rem, 7.2vw, 3.9rem); letter-spacing: -0.02em; }
@media (min-width: 900px) { html:lang(ru) .hero h1 { font-size: clamp(2.3rem, 4.3vw, 3.9rem); } }
html:lang(ru) .sticker { font-size: 17px; }   /* the round "7 дней бесплатно": the longer word has to fit the disc */@media (max-width: 374px) { html:lang(ru) .tab { font-size: 10.5px; padding-inline: 0; } }   /* "Прогресс" in six tabs on a 320 px phone */
@media (max-width: 380px) { html:lang(ru) .btn-l { padding-inline: 14px; } }   /* "Попробовать бесплатно 7 дней" in one line on a 360 px phone (every big button, so that the ones side by side stay alike) */

/* a child's own device: the box a code is typed in, and what a parent sees when connecting one (the code, the square to scan) */
.code-input { text-align: center; font: 700 1.7rem/1.2 var(--font-display); letter-spacing: .16em; text-transform: uppercase; font-variant-numeric: tabular-nums; }
.code-input::placeholder { letter-spacing: .12em; opacity: .35; }
.pair-dlg { overflow-x: hidden; }
.pair-grid { display: grid; grid-template-columns: minmax(0, 190px) minmax(0, 1fr); gap: 16px; align-items: center; }
.pair-qr { border: 2.5px solid var(--ink-900); border-radius: var(--r-md); overflow: hidden; background: #fff; line-height: 0; transition: opacity .2s; }
.pair-qr .qr { display: block; width: 100%; height: auto; }
.pair-qr.is-old { opacity: .25; }
.pair-code { font: 900 clamp(1.5rem, 7vw, 2rem)/1.1 var(--font-display); letter-spacing: .1em; word-break: keep-all; }
.pair-ok { display: grid; place-items: center; width: 72px; height: 72px; margin: 0 auto; border-radius: 50%; border: 3px solid var(--basil-700); background: var(--basil-200); color: var(--basil-700); }
@media (max-width: 440px) { .pair-grid { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; } .pair-qr { width: min(100%, 200px); } }
@media (max-width: 519px) { .hero-cta > .btn { flex: 1 1 100%; } }   /* on a phone the two buttons of the hero are the same width, one under the other */
/* under the two buttons of the hero, one quiet line for people who already have something: an account (a phone; on a wider screen the header has "Sign in") or a code from a parent */
.lp-have { display: flex; flex-wrap: wrap; align-items: center; gap: 0 22px; font-size: 15px; }
