/* ==========================================================================
   Reader (family-facing). Its own look, separate from the AI Story Studio admin.
   "Lembut": a warm cream page, white cards, one coral accent, dark ink buttons.
   Everything is scoped under .rd-shell. Touch targets are at least 48px; text is large.
   Fonts are served from wwwroot/fonts (the Content-Security-Policy allows only 'self'); both are SIL OFL.
   ========================================================================== */

/* A page that is loaded again (switching language) fades into the new one instead of flashing white in between. Browsers without
   cross-document view transitions simply load the page as before. */
@media (prefers-reduced-motion: no-preference) {
    @view-transition { navigation: auto; }
    ::view-transition-old(root), ::view-transition-new(root) { animation-duration: .15s; }
}
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 200 1000; font-display: swap; src: url("fonts/nunito-latin-wght.woff2") format("woff2"); }
@font-face { font-family: "Cherry Bomb One"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/cherry-bomb-one-latin-400.woff") format("woff"); }
@font-face { font-family: "Andika"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/andika-latin-400.woff2") format("woff2"); }
@font-face { font-family: "Andika"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/andika-latin-700.woff2") format("woff2"); }

.rd-shell {
    --rd-accent: #7a4fe0;
    --rd-accent-700: #4b2fa8;
    --rd-accent-100: #ece4ff;
    --rd-teal: #157568;
    --rd-teal-100: #d8f3ee;
    --rd-teal-bright: #1f9d8f;
    --rd-sun: #ffd84d;
    --rd-sun-700: #5a4200;
    --rd-sky: #3b6fe0;
    --rd-grape: #8a4fe0;
    --rd-leaf: #2a8a5f;
    --rd-leaf-100: #ddf2e7;
    --rd-berry: #b8323f;
    --rd-berry-100: #fbe4e6;
    --rd-ink: #2b2350;
    --rd-ink-soft: #5a5378;
    --rd-paper: #ffffff;
    --rd-page: #fff6e6;
    --rd-sand: #f3e8d2;
    --rd-line: #eadfc8;
    --rd-radius: 1.5rem;
    --rd-radius-lg: 2.25rem;
    --rd-shadow: 0 6px 0 rgba(43, 35, 80, .1);
    --rd-font: "Nunito", "Trebuchet MS", system-ui, sans-serif;
    --rd-font-read: "Andika", "Nunito", "Trebuchet MS", sans-serif;

    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: var(--rd-page);
    color: var(--rd-ink);
    font-family: var(--rd-font);
    font-size: 1.125rem;
    -webkit-font-smoothing: antialiased;
}

.rd-shell h1, .rd-shell h2, .rd-shell h3 { color: var(--rd-ink); font-family: var(--rd-font); font-weight: 900; letter-spacing: -.015em; }
.rd-shell a { color: var(--rd-teal); }
.rd-shell :focus-visible { outline: 3px solid var(--rd-teal); outline-offset: 3px; border-radius: .75rem; }
/* Blazor moves focus to the page heading after each navigation (for screen readers). The heading is not a control, so it gets no ring; real controls keep theirs. */
.rd-shell h1[tabindex="-1"]:focus, .rd-shell h1[tabindex="-1"]:focus-visible { outline: none; }
.rd-shell .icon { flex: none; }

/* Top bar ------------------------------------------------------------------ */
.rd-top { box-sizing: border-box; width: 100%; display: flex; align-items: center; justify-content: space-between; gap: .75rem 1.5rem; flex-wrap: wrap; max-width: 76rem; margin: 0 auto; padding: 1.1rem clamp(1rem, 3vw, 2.5rem); }
.rd-brand { display: inline-flex; align-items: center; gap: .7rem; white-space: nowrap; font-weight: 900; font-size: 1.35rem; letter-spacing: -.01em; color: var(--rd-ink) !important; text-decoration: none; }
.rd-mark { display: inline-block; flex: none; width: 2.75rem; height: 2.75rem; object-fit: contain; }
.rd-nav { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.rd-nav form { margin: 0; }
.rd-tabs { display: flex; gap: .25rem; padding: .3rem; border-radius: 999px; background: var(--rd-sand); }
.rd-tab { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: 0 1.15rem; border-radius: 999px; color: var(--rd-ink-soft) !important; font-weight: 700; text-decoration: none; }
.rd-tab:hover { color: var(--rd-ink) !important; }
.rd-tab.active { background: var(--rd-paper); color: var(--rd-ink) !important; font-weight: 800; box-shadow: 0 1px 2px rgba(31, 36, 48, .1); }
.rd-logout { display: inline-flex; align-items: center; gap: .4rem; min-height: 48px; padding: 0 1rem; border-radius: 999px; border: 1px solid var(--rd-line); background: var(--rd-paper); color: var(--rd-ink); font: inherit; font-weight: 700; cursor: pointer; }
.rd-logout:hover { background: var(--rd-sand); }

.rd-main { box-sizing: border-box; flex: 1 0 auto; width: 100%; max-width: 76rem; margin: 0 auto; padding: .5rem clamp(1rem, 3vw, 2.5rem) clamp(.75rem, 2vw, 1.25rem); }
.rd-loading { font-size: 1.3rem; text-align: center; padding: 3rem 0; color: var(--rd-ink-soft); }

/* Buttons ------------------------------------------------------------------ */
.rd-btn { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-height: 52px; padding: .5rem 1.4rem; border-radius: 999px; border: 2px solid var(--rd-line); background: var(--rd-paper); color: var(--rd-ink) !important; font: inherit; font-weight: 800; text-decoration: none; cursor: pointer; transition: background-color .12s ease, transform .08s ease; }
.rd-btn:hover { background: var(--rd-sand); }
.rd-btn:active { transform: translateY(1px); }
.rd-btn[disabled] { opacity: .5; cursor: not-allowed; }
.rd-btn-primary { background: var(--rd-ink); border-color: var(--rd-ink); color: #fff !important; }
.rd-btn-primary:hover { background: #343b4d; }
.rd-btn-danger { color: var(--rd-berry) !important; border-color: var(--rd-berry-100); }
.rd-btn-danger:hover { background: var(--rd-berry-100); }
.rd-btn-sm { min-height: 44px; padding: .3rem 1rem; font-size: 1rem; }
.rd-link-btn { border: 0; background: none; padding: .25rem; color: var(--rd-teal); font: inherit; font-weight: 800; text-decoration: underline; cursor: pointer; min-height: 44px; }
.rd-actions { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; margin: 1.25rem 0; }
.rd-hint { color: var(--rd-ink-soft); font-size: 1rem; }
.rd-small-link { font-size: 1rem; font-weight: 800; }
.rd-error { color: var(--rd-berry); font-weight: 800; }
.rd-eyebrow { font-size: .85rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--rd-teal); }

/* Home: who is reading ----------------------------------------------------- */
.rd-welcome { text-align: center; max-width: 52rem; margin: clamp(1rem, 4vw, 2.5rem) auto 0; padding: clamp(1.5rem, 5vw, 3.5rem) clamp(1rem, 4vw, 3rem); border-radius: var(--rd-radius-lg); background: var(--rd-paper); box-shadow: var(--rd-shadow); }
.rd-welcome h1 { font-size: clamp(1.9rem, 5vw, 2.8rem); font-weight: 900; margin-bottom: .75rem; }
.rd-lead { font-size: clamp(1.15rem, 2.5vw, 1.35rem); max-width: 40rem; margin: 0 auto; color: var(--rd-ink-soft); }
.rd-profiles { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(.75rem, 3vw, 1.5rem); margin: 2rem 0; }
.rd-profile { display: flex; flex-direction: column; align-items: center; gap: .7rem; padding: 1.25rem 1rem; min-width: 9.5rem; border-radius: var(--rd-radius); border: 2px solid var(--rd-line); text-decoration: none; color: var(--rd-ink) !important; transition: transform .12s ease, border-color .12s ease; }
.rd-profile:hover { transform: translateY(-3px); border-color: var(--rd-accent); }
.rd-profile-name { font-size: 1.35rem; font-weight: 900; }
.rd-avatar { display: inline-grid; place-items: center; width: clamp(5.5rem, 16vw, 7rem); height: clamp(5.5rem, 16vw, 7rem); border-radius: 50%; background: var(--rd-accent-100); font-size: clamp(2.8rem, 8vw, 3.75rem); line-height: 1; }
.rd-avatar.sm { width: 3.5rem; height: 3.5rem; font-size: 1.9rem; flex: none; }

/* Library ------------------------------------------------------------------ */
.rd-continue { display: grid; grid-template-columns: minmax(0, 22rem) minmax(0, 1fr); gap: clamp(1.25rem, 3vw, 2rem); align-items: center; padding: 1.25rem; margin-bottom: clamp(1.5rem, 4vw, 2.25rem); border-radius: var(--rd-radius-lg); background: var(--rd-paper); box-shadow: var(--rd-shadow); }
.rd-continue-cover { display: block; aspect-ratio: 3 / 2; border-radius: var(--rd-radius); overflow: hidden; background: var(--rd-sand); }
.rd-continue-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rd-continue-body { display: flex; flex-direction: column; gap: .6rem; min-width: 0; }
.rd-continue-body h2 { margin: 0; font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 900; line-height: 1.1; }
.rd-continue-body .rd-actions { justify-content: flex-start; margin: .5rem 0 0; }
.rd-meter { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; color: var(--rd-ink-soft); font-weight: 700; font-size: 1.05rem; }
.rd-bar { display: block; width: min(14rem, 100%); height: 10px; border-radius: 999px; background: var(--rd-sand); overflow: hidden; }
.rd-bar > span, .rd-cover-bar > span { display: block; height: 100%; border-radius: 999px; background: var(--rd-accent); }

.rd-library-back { margin: 0 0 .9rem; }
.rd-library-head { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; margin-bottom: 1.25rem; }
.rd-library-title { display: flex; flex-direction: column; flex: 1; min-width: 10rem; }
.rd-library-head h1 { font-size: clamp(1.5rem, 3.5vw, 1.9rem); font-weight: 900; margin: 0; }
.rd-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.rd-chip { display: inline-flex; align-items: center; min-height: 44px; padding: 0 1.1rem; border-radius: 999px; border: 1px solid var(--rd-line); background: var(--rd-paper); color: var(--rd-ink) !important; font-weight: 700; font-size: 1rem; text-decoration: none; }
.rd-chip:hover { border-color: var(--rd-ink-soft); }
.rd-chip.active { background: var(--rd-ink); border-color: var(--rd-ink); color: #fff !important; font-weight: 800; }

.rd-shelf { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr)); gap: clamp(1rem, 2.5vw, 1.5rem); }
.rd-card { display: flex; flex-direction: column; gap: .3rem; height: 100%; text-decoration: none; color: var(--rd-ink) !important; }
.rd-cover { position: relative; display: block; aspect-ratio: 3 / 2; margin-bottom: .45rem; border-radius: var(--rd-radius); overflow: hidden; background: var(--rd-sand); transition: transform .15s ease, box-shadow .15s ease; }
.rd-card:hover .rd-cover { transform: translateY(-3px); box-shadow: var(--rd-shadow); }
.rd-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rd-cover-blank { display: grid; place-items: center; height: 100%; color: var(--rd-ink-soft); }
.rd-badge { position: absolute; top: .6rem; left: .6rem; display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .75rem; border-radius: 999px; background: var(--rd-paper); font-size: .875rem; font-weight: 800; }
.rd-badge.done { background: var(--rd-sun); color: var(--rd-sun-700); }
.rd-badge.new { color: var(--rd-teal); }
.rd-badge.locked { background: var(--rd-ink); color: #fff; }
.rd-cover-bar { position: absolute; left: .6rem; right: .6rem; bottom: .6rem; height: 6px; border-radius: 999px; background: rgba(255, 255, 255, .8); overflow: hidden; }
/* Stars: a child's rating of a finished book. */
.rd-stars { display: flex; gap: .1rem; font-size: 1.15rem; line-height: 1; color: #d6d2c8; }
.rd-stars .on { color: #f2a900; }
.rd-rate { display: flex; flex-direction: column; align-items: flex-start; gap: .4rem; margin: 1rem 0 1.25rem; }
.rd-rate-label { font-weight: 800; color: var(--rd-ink-soft); }
.rd-stars-input { display: flex; gap: .15rem; }
.rd-star { width: 48px; height: 48px; padding: 0; border: 0; background: none; font-size: 2.4rem; line-height: 1; color: #d6d2c8; cursor: pointer; transition: transform .1s ease; }
.rd-star.on { color: #f2a900; }
.rd-star:hover { transform: scale(1.12); }
/* The shelf's language tabs (Malay | English). */
.rd-langs { display: flex; gap: .4rem; margin: 0; padding: .35rem; width: fit-content; max-width: 100%; border-radius: 999px; background: var(--rd-paper); box-shadow: 0 5px 0 var(--rd-line); }
.rd-langs a { display: inline-flex; align-items: center; gap: .5rem; min-height: 48px; padding: 0 1.3rem; border-radius: 999px; color: var(--rd-ink) !important; font-weight: 800; text-decoration: none; }
.rd-langs a.active { background: var(--rd-accent); color: #fff !important; }
.rd-langs a small { padding: .1rem .6rem; border-radius: 999px; background: var(--rd-sand); font-size: .85rem; font-weight: 800; }
.rd-langs a.active small { background: rgba(255, 255, 255, .28); }
.rd-card-title { font-size: 1.2rem; font-weight: 800; line-height: 1.25; }
.rd-card-meta { color: var(--rd-ink-soft); font-size: .95rem; font-weight: 600; }
.rd-empty { text-align: center; padding: 3rem 1rem; font-size: 1.25rem; color: var(--rd-ink-soft); }
.rd-empty > span { display: block; font-size: 4rem; }
.rd-empty > .icon { display: block; margin: 0 auto .75rem; }

@media (max-width: 700px) {
    .rd-continue { grid-template-columns: 1fr; }
    .rd-shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .rd-card-title { font-size: 1.05rem; }
    .rd-card-meta { font-size: .85rem; }
}

/* Book ---------------------------------------------------------------------
   A storybook: a hard cover, a picture on the left page and the words on the right, with the stack of pages thinning
   on one side and growing on the other as the child reads. reader-book.js turns the pages. Phones show one page at a
   time, picture above words. The background takes a soft tint from the picture (--rd-mood, set by reader-book.js). */
.rd-shell { background: var(--rd-mood, var(--rd-page)); transition: background-color 1s ease; }
.rd-glass { background: rgba(255, 255, 255, .74); -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4); border: 1px solid rgba(255, 255, 255, .9); box-shadow: 0 18px 40px -24px rgba(31, 36, 48, .45); }
.rd-book { position: relative; outline: none; }
.rd-book > :not(.rd-blob) { position: relative; z-index: 1; }
.rd-blob { position: fixed; z-index: 0; border-radius: 50%; filter: blur(80px); opacity: .5; pointer-events: none; background: var(--rd-mood-strong, var(--rd-sand)); transition: background-color 1s ease; }
.rd-blob-a { width: 34rem; height: 34rem; left: -14rem; bottom: -12rem; }
.rd-blob-b { width: 30rem; height: 30rem; right: -12rem; top: 30%; }

/* Two rows: the Bookshelf button and the page progress share the first; the title has the whole second row and wraps when it is long. */
.rd-book-bar { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 1rem .75rem; margin-bottom: 1.25rem; }
.rd-book-bar .rd-back { grid-row: 1; grid-column: 1; }
.rd-book-bar .rd-book-progress { grid-row: 1; grid-column: 3; }
.rd-book-bar .rd-icon-btn { grid-row: 1; grid-column: 4; }
.rd-back { display: inline-flex; align-items: center; gap: .4rem; min-height: 48px; padding: 0 1.1rem 0 .75rem; border-radius: 999px; font-weight: 800; text-decoration: none; color: var(--rd-ink) !important; flex: none; }
.rd-back:hover { background: var(--rd-paper); }
.rd-book-progress { display: inline-flex; align-items: center; gap: .9rem; min-height: 48px; padding: 0 1.1rem; border-radius: 999px; flex: none; }
.rd-dots { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 5px; width: clamp(6rem, 18vw, 14rem); }
.rd-dots span { height: 6px; border-radius: 999px; background: rgba(31, 36, 48, .14); transition: background-color .4s ease; }
.rd-dots span.read { background: var(--rd-accent); }
.rd-dots span.current { background: var(--rd-ink); }
.rd-page-count { font-weight: 900; color: var(--rd-ink); white-space: nowrap; }
.rd-icon-btn { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--rd-line); background: var(--rd-paper); color: var(--rd-ink); cursor: pointer; flex: none; }
.rd-icon-btn:hover { background: var(--rd-paper); }
.rd-icon-btn[aria-expanded="true"] { background: var(--rd-ink); border-color: var(--rd-ink); color: #fff; }

.rd-settings { display: grid; padding: .5rem 1.25rem 1rem; margin-bottom: 1.25rem; border-radius: var(--rd-radius); }
.rd-settings-heading { margin: 1rem 0 .25rem; font-size: .8rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: var(--rd-teal); }
.rd-row { display: grid; grid-template-columns: minmax(0, 17rem) minmax(0, 1fr); align-items: center; gap: .5rem 1rem; min-height: 56px; padding: .4rem 0; border-top: 1px solid var(--rd-line); cursor: default; }
.rd-settings-heading + .rd-row { border-top: 0; }
label.rd-row { cursor: pointer; }
.rd-row > :last-child { justify-self: end; }
.rd-row-label { font-weight: 800; }
.rd-row-child .rd-row-label { padding-left: 1.25rem; color: var(--rd-ink-soft); }
.rd-row-child .rd-row-label::before { content: "\21B3\00A0"; }
.rd-switch { appearance: none; position: relative; width: 52px; height: 30px; margin: 0; border-radius: 999px; background: #c9c3b8; cursor: pointer; transition: background-color .15s ease; }
.rd-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: var(--rd-paper); box-shadow: 0 1px 2px rgba(31, 36, 48, .25); transition: transform .15s ease; }
.rd-switch:checked { background: var(--rd-teal); }
.rd-switch:checked::after { transform: translateX(22px); }
.rd-switch:focus-visible { outline: 3px solid var(--rd-teal); outline-offset: 2px; }
@media (max-width: 600px) {
    .rd-row:not(label) { grid-template-columns: minmax(0, 1fr); }
    .rd-row:not(label) > :last-child { justify-self: start; }
}
.rd-seg { display: inline-flex; padding: .25rem; border-radius: 999px; background: var(--rd-sand); }
.rd-seg button { min-height: 44px; padding: .3rem 1rem; border: 0; border-radius: 999px; background: transparent; font: inherit; font-weight: 700; color: var(--rd-ink-soft); cursor: pointer; }
.rd-seg button.active { background: var(--rd-paper); color: var(--rd-ink); font-weight: 800; box-shadow: 0 1px 2px rgba(31, 36, 48, .12); }
.rd-toggle { display: inline-flex; align-items: center; gap: .55rem; min-height: 44px; font-weight: 700; cursor: pointer; }
.rd-toggle input { width: 1.4rem; height: 1.4rem; accent-color: var(--rd-teal); }
.rd-swatches { display: inline-flex; gap: .5rem; }
.rd-swatch { width: 44px; height: 44px; border-radius: 999px; border: 3px solid var(--rd-paper); background: var(--swatch); box-shadow: 0 0 0 1px var(--rd-line); cursor: pointer; }
.rd-swatch.active { box-shadow: 0 0 0 3px var(--rd-teal); }
.rd-note { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .5rem; padding: .35rem 1.1rem; margin-bottom: 1.25rem; border-radius: 999px; background: var(--rd-teal-100); color: var(--rd-ink); font-weight: 700; }

/* The volume: cover boards, ribbon and pages. */
.rd-stage { display: flex; justify-content: center; padding-bottom: .75rem; }
.rd-volume { --rd-spread: 0; position: relative; isolation: isolate; width: 100%; max-width: 34rem; padding: 8px 14px 8px 8px; border-radius: 8px 24px 24px 8px; background: var(--rd-board, #174f4b); box-shadow: 0 34px 60px -30px rgba(23, 40, 40, .7); transition: transform .8s cubic-bezier(.45, .05, .2, 1); }
.rd-paper { background-color: #fffaf0; background-image: radial-gradient(rgba(120, 90, 40, .05) 1px, transparent 1.2px); background-size: 7px 7px; }
.rd-spread { display: grid; grid-template-columns: minmax(0, 1fr); border-radius: 4px 18px 18px 4px; overflow: hidden; box-shadow: 2px 1px 0 #efe4cf, 4px 2px 0 #ddcfb3, 6px 3px 0 #efe4cf; }
.rd-leaf-left, .rd-leaf-right { position: relative; min-width: 0; }
.rd-leaf-left[hidden] { display: none; }
.rd-picture { position: relative; aspect-ratio: 3 / 2; overflow: hidden; background: var(--rd-sand); display: grid; place-items: center; }
.rd-picture-fill { display: none; }
.rd-picture-main { width: 100%; height: 100%; object-fit: cover; display: block; position: relative; }
.rd-picture-blank { font-size: 4rem; opacity: .5; }
.rd-folio { position: absolute; z-index: 3; left: 1rem; top: 1rem; padding: .15rem .8rem; border-radius: 999px; font-size: .95rem; font-weight: 900; }
.rd-leaf-right { padding: clamp(1.25rem, 4vw, 2rem) clamp(1.25rem, 4vw, 2rem) clamp(1.5rem, 4vw, 2.25rem); }
.rd-page-label { display: block; margin-bottom: .6rem; color: var(--rd-accent-700); font-size: .85rem; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.rd-words { min-width: 0; }
.rd-fs-small { --rd-fs: .8; }
.rd-fs-medium { --rd-fs: 1; }
.rd-fs-big { --rd-fs: 1.3; }
.rd-text { margin: 0; font-family: var(--rd-font-read); font-size: calc(clamp(1.7rem, 6vw, 2.6rem) * var(--rd-fs, 1)); line-height: 1.6; letter-spacing: .01em; font-weight: 700; word-spacing: .12em; }
.rd-text .syl-word { display: inline-block; padding: 0 .06em; border-radius: .5rem; transition: background-color .2s ease, transform .2s ease; }
.rd-text .syllable-text .syl-word.clickable:hover { background: var(--rd-sand); }
.rd-text .syllable-text .syl-word.selected { background: var(--rd-sun); }
.rd-text .syllable-text .syl-word.ra-active { background: #ffe08a; box-shadow: 0 0 0 .14em #ffe08a; transform: translateY(-2px); }
.rd-text .syllable-text .syl.ra-active { background: #ffe08a; border-radius: .35rem; }
.rd-focus { display: inline-flex; align-items: center; gap: 1rem; margin-top: 1.25rem; padding: .5rem 1.25rem; border-radius: var(--rd-radius); background: var(--rd-paper); border: 1px solid var(--rd-line); font-family: var(--rd-font-read); font-size: clamp(2rem, 6vw, 3rem); font-weight: 700; }
.rd-focus .syl + .syl { margin-left: .25em; }

/* The cover, shown before the book is opened. */
.rd-book-cover { position: relative; display: block; width: 100%; min-height: 26rem; height: 100%; margin: 0; padding: 0; border: 0; border-radius: 4px 18px 18px 4px; overflow: hidden; background: var(--rd-teal); color: #fff; font: inherit; text-align: left; cursor: pointer; }
.rd-leaf-right:has(.rd-book-cover) { padding: 0; }
.rd-book-cover-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rd-book-cover::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(to bottom, rgba(16, 40, 52, .62), rgba(16, 40, 52, 0) 55%), linear-gradient(to right, rgba(0, 0, 0, .3), rgba(255, 255, 255, .15) 3%, rgba(0, 0, 0, 0) 6%); }
.rd-book-cover-title { position: absolute; z-index: 2; top: 2rem; left: 2.25rem; right: 1.75rem; font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 900; line-height: 1.05; letter-spacing: -.02em; text-shadow: 0 4px 18px rgba(0, 0, 0, .3); }
.rd-book-cover-open { position: absolute; z-index: 2; right: 1.5rem; bottom: 1.5rem; display: inline-flex; align-items: center; gap: .4rem; min-height: 52px; padding: 0 1.25rem; border-radius: 999px; background: #fff; color: var(--rd-ink); font-weight: 900; box-shadow: 0 12px 26px -12px rgba(0, 0, 0, .5); animation: rd-bob 2.4s ease-in-out infinite; }
@keyframes rd-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }

/* The end of the story, on the last spread. */
.rd-end-art { display: grid; place-items: center; aspect-ratio: 3 / 2; height: 100%; background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, .55) 0 30%, transparent 31%), var(--rd-sun); }
.rd-end-star { display: inline-grid; place-items: center; font-size: clamp(5rem, 14vw, 8rem); line-height: 1; animation: rd-pop .6s ease-out; }
.rd-end h2 { margin: 0 0 .5rem; font-size: clamp(2.5rem, 6vw, 4rem); font-weight: 900; line-height: 1; }
.rd-end .rd-lead { margin: 0; }
.rd-end .rd-actions { justify-content: flex-start; }

/* Turning: copies of the old pages laid over the new ones while a leaf turns (see reader-book.js). */
.rd-turn-layer { position: absolute; inset: 0; z-index: 5; pointer-events: none; perspective: 2600px; }
.rd-flip-under { z-index: 1; overflow: hidden; }
.rd-flip { z-index: 3; transform-style: preserve-3d; animation-name: rd-flip-next; animation-timing-function: cubic-bezier(.45, .05, .2, 1); animation-fill-mode: forwards; }
.rd-flip-prev { animation-name: rd-flip-prev; }
.rd-flip-in { animation-name: rd-flip-in; }
.rd-flip-face { position: absolute; inset: 0; overflow: hidden; -webkit-backface-visibility: hidden; backface-visibility: hidden; box-shadow: 0 0 40px rgba(40, 25, 5, .28); animation-duration: inherit; }
.rd-flip-back { transform: rotateY(180deg); }
.rd-flip-blank { background-color: #fffaf0; background-image: radial-gradient(rgba(120, 90, 40, .05) 1px, transparent 1.2px); background-size: 7px 7px; }
.rd-flip-shade { position: absolute; inset: 0; pointer-events: none; opacity: 0; animation-duration: inherit; animation-fill-mode: forwards; background: linear-gradient(to right, rgba(40, 25, 5, .5), rgba(40, 25, 5, .06) 50%, rgba(255, 255, 255, .3)); }
.rd-flip-back .rd-flip-shade { background: linear-gradient(to left, rgba(40, 25, 5, .5), rgba(40, 25, 5, .06) 50%, rgba(255, 255, 255, .3)); }
.rd-flip-next > .rd-flip-face:not(.rd-flip-back) .rd-flip-shade, .rd-flip-prev > .rd-flip-face:not(.rd-flip-back) .rd-flip-shade { animation-name: rd-shade-up; }
.rd-flip-next > .rd-flip-back .rd-flip-shade, .rd-flip-prev > .rd-flip-back .rd-flip-shade, .rd-flip-in > .rd-flip-face .rd-flip-shade { animation-name: rd-shade-down; }
.rd-flip-cast { z-index: 2; animation: rd-cast-out ease-in forwards; animation-duration: inherit; }
.rd-flip-cast-right { background: linear-gradient(to right, rgba(40, 25, 5, .42), rgba(40, 25, 5, 0) 78%); }
.rd-flip-cast-left { background: linear-gradient(to left, rgba(40, 25, 5, .42), rgba(40, 25, 5, 0) 78%); }
@keyframes rd-flip-next { 0% { transform: rotateY(0deg); } 50% { transform: rotateY(-90deg) skewY(-2.5deg); } 100% { transform: rotateY(-180deg); } }
@keyframes rd-flip-prev { 0% { transform: rotateY(0deg); } 50% { transform: rotateY(90deg) skewY(2.5deg); } 100% { transform: rotateY(180deg); } }
@keyframes rd-flip-in { 0% { transform: rotateY(-180deg); } 50% { transform: rotateY(-90deg) skewY(2.5deg); } 100% { transform: rotateY(0deg); } }
@keyframes rd-shade-up { 0% { opacity: 0; } 100% { opacity: 1; } }
@keyframes rd-shade-down { 0% { opacity: 1; } 100% { opacity: 0; } }
@keyframes rd-cast-out { 0% { opacity: 1; } 100% { opacity: 0; } }

/* The folded corners turn the page too. */
.rd-corner { position: absolute; bottom: 8px; z-index: 6; width: 72px; height: 72px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.rd-corner span { position: absolute; bottom: 0; width: 32px; height: 32px; transition: width .25s ease, height .25s ease; }
.rd-corner-next { right: 14px; }
.rd-corner-next span { right: 0; border-radius: 0 0 18px 0; background: linear-gradient(315deg, transparent 0 49%, #e9dcc2 50%, #fffaf0 100%); box-shadow: -4px -4px 10px rgba(60, 38, 8, .22); }
.rd-corner-prev { left: 8px; display: none; }
.rd-corner-prev span { left: 0; border-radius: 0 0 0 18px; background: linear-gradient(45deg, transparent 0 49%, #e9dcc2 50%, #fffaf0 100%); box-shadow: 4px -4px 10px rgba(60, 38, 8, .22); }
.rd-corner:hover span { width: 52px; height: 52px; }
.rd-ribbon { display: none; }

@media (min-width: 900px) {
    /* Tablets in landscape and computers: the open book, picture on the left page and words on the right. */
    .rd-volume { --rd-spread: 1; max-width: 72rem; padding: 14px; border-radius: 22px; background: transparent; box-shadow: none; }
    .rd-volume::before, .rd-volume::after { content: ""; position: absolute; z-index: -1; top: 0; bottom: 0; width: 50%; background: var(--rd-board, #174f4b); box-shadow: 0 40px 70px -30px rgba(23, 40, 40, .7), inset 0 0 0 2px rgba(255, 255, 255, .07); transition: opacity .5s ease; }
    .rd-volume::before { left: 0; border-radius: 22px 4px 4px 22px; }
    .rd-volume::after { right: 0; border-radius: 4px 22px 22px 4px; }
    .rd-volume.rd-closed { transform: translateX(-25%); }
    .rd-volume.rd-closed::before { opacity: 0; }
    .rd-spread { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); height: min(34rem, 72vh); overflow: visible; border-radius: 0; box-shadow: none; }
    .rd-leaf-left { border-radius: 16px 3px 3px 16px; box-shadow: var(--rd-edge); }
    .rd-leaf-right { grid-column: 2; border-radius: 3px 16px 16px 3px; box-shadow: var(--rd-edge); display: flex; flex-direction: column; justify-content: center; padding: clamp(2rem, 4vw, 3.5rem) clamp(2rem, 4vw, 3.5rem) clamp(2rem, 4vw, 3.5rem) clamp(2.5rem, 4.5vw, 4rem); }
    .rd-leaf-left::after, .rd-leaf-right::before { content: ""; position: absolute; top: 0; bottom: 0; width: 4.5rem; z-index: 2; pointer-events: none; }
    .rd-leaf-left::after { right: 0; background: linear-gradient(to left, rgba(20, 12, 0, .3), rgba(20, 12, 0, .07) 40%, rgba(20, 12, 0, 0)); }
    .rd-leaf-right::before { left: 0; background: linear-gradient(to right, rgba(60, 38, 8, .2), rgba(60, 38, 8, .05) 40%, rgba(60, 38, 8, 0)); }
    .rd-leaf-left { overflow: hidden; }
    .rd-picture { position: absolute; inset: 0; aspect-ratio: auto; border-radius: inherit; }
    .rd-picture-fill { display: block; position: absolute; inset: -10%; width: 120%; height: 120%; object-fit: cover; filter: blur(22px) saturate(1.2); opacity: .9; }
    .rd-picture-main { height: auto; aspect-ratio: 3 / 2; object-fit: contain; box-shadow: 0 18px 40px -22px rgba(0, 0, 0, .55); }
    .rd-end-art { position: absolute; inset: 0; aspect-ratio: auto; border-radius: inherit; }
    .rd-text { font-size: calc(clamp(1.9rem, 3vw, 2.75rem) * var(--rd-fs, 1)); }
    .rd-book-cover { position: absolute; inset: 0; min-height: 0; border-radius: inherit; }
    .rd-corner-prev { display: block; left: 14px; }
    .rd-corner-next { right: 14px; bottom: 14px; }
    .rd-corner-prev { bottom: 14px; }
    .rd-ribbon { display: block; position: absolute; z-index: -2; right: 13%; bottom: -78px; width: 26px; height: 110px; background: var(--rd-accent); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 82%, 0 100%); transition: opacity .5s ease; }
    .rd-closed .rd-ribbon { opacity: 0; }
}

/* The controls float under the book. */
.rd-controls { display: flex; align-items: center; justify-content: center; gap: clamp(.5rem, 2vw, 1rem); width: fit-content; max-width: 100%; box-sizing: border-box; margin: clamp(1.75rem, 4vw, 2.5rem) auto 0; padding: .5rem; border-radius: 999px; }
.rd-turn { display: inline-grid; place-items: center; width: clamp(56px, 12vw, 64px); height: clamp(56px, 12vw, 64px); border-radius: 50%; border: 1px solid var(--rd-line); background: var(--rd-paper); color: var(--rd-ink); cursor: pointer; transition: transform .08s ease, background-color .12s ease; flex: none; }
.rd-turn:hover { background: var(--rd-sand); }
.rd-turn:active { transform: scale(.96); }
.rd-turn-next { background: #ff4f7b; border-color: #ff4f7b; color: #fff; }
.rd-turn-next:hover { background: #e83a67; }
.rd-turn[disabled] { opacity: .35; cursor: not-allowed; }
.rd-play-group { display: flex; align-items: center; justify-content: center; gap: .5rem; flex-wrap: wrap; text-align: center; min-width: 0; }
/* Dengar: a sunset gradient that glows while the story plays. White text stays above 4.5:1 on the darkest stops it sits on. */
.rd-play { display: inline-flex; align-items: center; justify-content: center; gap: .7rem; min-width: 13rem; min-height: 64px; padding: 0 1.9rem 0 1rem; border-radius: 999px; border: 0; background: linear-gradient(135deg, #e8622a 0%, #e0335f 55%, #a83bc0 100%); box-shadow: 0 14px 28px -12px rgba(224, 51, 95, .75), inset 0 2px 0 rgba(255, 255, 255, .3); color: #fff; font: inherit; font-size: 1.3rem; font-weight: 900; cursor: pointer; transition: transform .15s ease, filter .2s ease; }
.rd-play:hover { transform: translateY(-2px); filter: brightness(1.05); }
.rd-play:active { transform: scale(.97); }
.rd-play.on { animation: rd-glow 1.6s ease-in-out infinite; }
.rd-play-icon { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, .25); }
@keyframes rd-glow { 0%, 100% { filter: saturate(1); } 50% { filter: saturate(1.35) brightness(1.06); } }
.rd-wave { display: inline-flex; align-items: flex-end; gap: 3px; height: 18px; }
.rd-wave i { display: block; width: 4px; height: 5px; border-radius: 2px; background: currentColor; opacity: .85; }
.rd-wave.on i { animation: rd-wave .9s ease-in-out infinite; }
.rd-wave.on i:nth-child(2) { animation-delay: .15s; }
.rd-wave.on i:nth-child(3) { animation-delay: .3s; }
.rd-wave.on i:nth-child(4) { animation-delay: .45s; }
@keyframes rd-wave { 0%, 100% { height: 5px; } 50% { height: 18px; } }

/* The end and the questions ------------------------------------------------- */
.rd-questions { text-align: left; max-width: 46rem; margin: 2.5rem auto 0; padding: clamp(1rem, 3vw, 1.75rem); border-radius: var(--rd-radius-lg); }
.rd-questions h2 { font-size: clamp(1.4rem, 3.5vw, 1.8rem); text-align: center; }
.rd-questions > .rd-hint { text-align: center; }
.rd-questions ol { padding-left: 1.5rem; }
.rd-question { margin-bottom: 1rem; padding: 1.1rem 1.25rem; border-radius: var(--rd-radius); background: var(--rd-page); border: 1px solid var(--rd-line); }
.rd-question::marker { font-weight: 900; font-size: 1.3rem; }
.rd-question-text { font-size: clamp(1.25rem, 3.5vw, 1.5rem); font-weight: 800; margin-bottom: .75rem; }
.rd-answer { font-size: 1.15rem; padding: .6rem .9rem; border-radius: 1rem; background: var(--rd-paper); }
.rd-answer-label { font-weight: 900; color: var(--rd-leaf); }
.rd-marks { display: flex; flex-wrap: wrap; gap: .6rem; }
.rd-marks button { display: inline-flex; align-items: center; gap: .4rem; min-height: 52px; padding: .4rem 1.2rem; border-radius: 999px; border: 2px solid var(--rd-line); background: var(--rd-paper); font: inherit; font-weight: 800; cursor: pointer; }
.rd-marks button.active { background: var(--rd-leaf); border-color: var(--rd-leaf); color: #fff; }

@keyframes rd-pop { 0% { transform: scale(.3) rotate(-20deg); opacity: 0; } 70% { transform: scale(1.12) rotate(6deg); opacity: 1; } 100% { transform: scale(1) rotate(0); } }

/* Parents ------------------------------------------------------------------- */
.rd-gate { max-width: 28rem; margin: 2rem auto; text-align: center; padding: 2rem; border-radius: var(--rd-radius-lg); background: var(--rd-paper); box-shadow: var(--rd-shadow); }
.rd-gate-form { display: flex; flex-direction: column; gap: .75rem; align-items: center; font-size: 1.3rem; font-weight: 800; }
.rd-gate .rd-error { margin: 1.25rem 0 0; }
.rd-gate-form input { width: 8rem; min-height: 52px; text-align: center; font: inherit; font-size: 1.5rem; border-radius: 1rem; border: 2px solid var(--rd-line); }
.rd-parents { max-width: 52rem; margin: 0 auto; font-size: 1.05rem; }
.rd-parents > h1 { font-size: clamp(1.8rem, 4vw, 2.3rem); font-weight: 900; margin: .5rem 0 1.25rem; }
.rd-panel { padding: clamp(1.1rem, 3vw, 1.75rem); margin-bottom: 1.25rem; border-radius: var(--rd-radius-lg); background: var(--rd-paper); box-shadow: var(--rd-shadow); }
.rd-panel h2 { font-size: 1.35rem; font-weight: 900; }
.rd-child-list { list-style: none; padding: 0; margin: 0 0 1rem; }
.rd-child-list > li { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; padding: .9rem 0; border-bottom: 1px solid var(--rd-line); }
.rd-child-info { display: flex; flex-direction: column; flex: 1; min-width: 8rem; font-weight: 800; }
.rd-child-info span { color: var(--rd-ink-soft); font-weight: 600; }
.rd-child-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.rd-confirm, .rd-progress { flex-basis: 100%; padding: 1rem; border-radius: 1rem; }
.rd-confirm { background: var(--rd-berry-100); }
.rd-progress { background: var(--rd-page); overflow-x: auto; }
.rd-progress table { width: 100%; border-collapse: collapse; }
.rd-progress th, .rd-progress td { padding: .45rem .6rem; text-align: left; border-bottom: 1px solid var(--rd-line); }
.rd-child-form { display: flex; flex-direction: column; gap: .4rem; padding: 1.1rem; border-radius: 1rem; background: var(--rd-page); }
.rd-child-form h3 { font-size: 1.2rem; font-weight: 900; }
.rd-child-form label { font-weight: 700; margin-top: .5rem; }
.rd-child-form input[type="text"], .rd-child-form input:not([type]), .rd-child-form select { min-height: 48px; padding: .4rem .8rem; border-radius: .75rem; border: 2px solid var(--rd-line); font: inherit; background: #fff; max-width: 24rem; }
.rd-child-form fieldset { border: 0; padding: 0; margin: .5rem 0 0; }
.rd-child-form legend { font-size: 1rem; font-weight: 700; }
.rd-avatar-picker { display: flex; flex-wrap: wrap; gap: .5rem; }
.rd-avatar-choice { width: 56px; height: 56px; border-radius: 50%; border: 2px solid var(--rd-line); background: #fff; font-size: 1.8rem; cursor: pointer; }
.rd-avatar-choice.active { border-color: var(--rd-accent); background: var(--rd-accent-100); }
.rd-consent { margin-top: .75rem; padding: 1rem; border-radius: 1rem; background: var(--rd-teal-100); font-size: 1rem; }
.rd-plain-list { padding-left: 1.25rem; }
.rd-parents .rd-actions { justify-content: flex-start; }

/* Blazor's "something went wrong" bar, hidden until Blazor shows it. The admin styles its own copy in MainLayout. */
#blazor-error-ui { display: none; position: fixed; left: 0; bottom: 0; width: 100%; z-index: 1000; box-sizing: border-box; padding: .75rem 3rem .75rem 1.25rem; background: #fff4d1; box-shadow: 0 -1px 2px rgba(0, 0, 0, .2); font-weight: 700; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 1rem; top: .6rem; }

@media (max-width: 600px) {
    .rd-back-label, .rd-logout span { display: none; }
    .rd-back { padding: 0 .75rem; }
    /* Only the words go on a phone: the button becomes a round play/pause icon the same size as the page-turn buttons. */
    .rd-play-label, .rd-play .rd-wave { display: none; }
    .rd-play { min-width: 0; width: 64px; height: 64px; min-height: 0; padding: 0; gap: 0; flex: none; }
    .rd-play-icon { width: 44px; height: 44px; }
    .rd-dots { display: none; }
    .rd-book-progress { padding: 0 .9rem; }
}

@media (prefers-reduced-motion: reduce) {
    .rd-shell *, .rd-shell *::before, .rd-shell *::after { animation: none !important; transition: none !important; }
}

/* Subscriptions ---------------------------------------------------------------- */
.rd-locked .rd-hint { font-size: 1rem; }
.rd-locked .rd-actions, .rd-payment-result .rd-actions { justify-content: center; }
.rd-payment-result h1 { margin: .5rem 0; }
.ck-receipt .ck-total { padding-top: 0; border-top: 0; }
.ck-done { align-items: stretch; }
.ck-done .ck-result { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ck-receipt { display: flex; flex-direction: column; }
.ck-receipt .ck-body { flex: 1; align-content: start; gap: .5rem; padding-top: 1rem; padding-bottom: 1.1rem; }
.ck-result { padding-top: 1.1rem; padding-bottom: 1.1rem; }
.ck-result h2 { margin: .15rem 0 .3rem; }
.ck-result p { margin: .3rem 0; }
.ck-receipt .ck-plan { padding: 1rem 1.5rem; }
.ck-receipt .ck-lines div { padding: .45rem 0; }
.ck-result { text-align: center; }
.ck-result .rd-actions { justify-content: center; }
.ck-result .rd-btn { min-height: 2.75rem; padding: 0 1.4rem; font-size: 1rem; }
.ck-big { display: block; font-size: 2.5rem; line-height: 1.1; }
.rd-sub-status { display: grid; gap: .3rem; padding: .9rem 1.1rem; margin-bottom: 1rem; border-radius: 1rem; background: var(--rd-sun); }
.rd-sub-status.active { background: var(--rd-leaf-100); }
/* The plans sit in equal columns (two across; the Parents page is a narrow column, so four would be cramped), every card as tall as its row, with the buttons on one line along the bottom. */
.rd-plans { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 520px) { .rd-plans { grid-template-columns: minmax(0, 1fr); } }
.rd-plan { display: flex; flex-direction: column; gap: .5rem; padding: 1.25rem; border: 2px solid var(--rd-line); border-radius: var(--rd-radius); background: var(--rd-page); }
.rd-plan .rd-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 .4em; }
.rd-plan .rd-price small { white-space: nowrap; }
.rd-plan > :nth-last-child(2) { margin-bottom: .6rem; }
.rd-plan .rd-btn { margin-top: auto; width: 100%; justify-content: center; text-align: center; }
.rd-price { font-size: 1.6rem; font-weight: 900; }
.rd-price small { font-size: 1rem; font-weight: 600; color: var(--rd-ink-soft); }
.rd-orders summary { cursor: pointer; font-weight: 800; min-height: 48px; display: flex; align-items: center; }
.rd-orders table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.rd-orders th, .rd-orders td { text-align: left; padding: .4rem .5rem; border-bottom: 1px solid var(--rd-line); }
.rd-orders td { text-align: center; }
.rd-practice { max-width: 32rem; margin: 2rem auto; text-align: center; }
.rd-practice .rd-actions { justify-content: center; }
.rd-practice-flag { display: inline-block; padding: .2rem .8rem; border-radius: 999px; background: var(--rd-berry-100); color: var(--rd-berry); font-weight: 800; font-size: .9rem; }
.rd-nowrap { white-space: nowrap; }

/* ==========================================================================
   Ceria: a cheerful, colourful look. Chunky rounded shapes with a flat "pressed" shadow, bright colours, and a fixed
   colour for each book (--book, set from the book's id). Kept at the end so it overrides the base styles above.
   ========================================================================== */

/* Soft colour blobs behind the shelf, home and parents pages (the book page draws its own from the picture). */
.rd-shell::before, .rd-shell::after { content: ""; position: fixed; z-index: 0; border-radius: 50%; pointer-events: none; }
.rd-shell::before { top: -9rem; right: -8rem; width: 29rem; height: 29rem; background: #ffd84d; opacity: .4; }
.rd-shell::after { bottom: -11rem; left: -9rem; width: 27rem; height: 27rem; background: #9fe3d6; opacity: .35; }
.rd-shell:has(.rd-book)::before, .rd-shell:has(.rd-book)::after { display: none; }
.rd-top, .rd-main { position: relative; z-index: 1; }

/* Top bar */
.rd-brand { font-size: 1.6rem; font-weight: 900; }
.rd-mark { width: 4rem; height: 4rem; }
.rd-tabs { background: var(--rd-paper); box-shadow: 0 4px 0 var(--rd-line); }
.rd-tab { font-weight: 800; }
.rd-tab.active { background: var(--rd-ink); color: #fff !important; box-shadow: none; }
.rd-logout { border: 2px solid var(--rd-ink); background: transparent; font-weight: 800; }
.rd-logout:hover { background: var(--rd-paper); }

/* Buttons */
/* The plain button is a soft yellow pill with a gold edge: it shows on white cards, on the cream page and on lilac rows, and is never the
   colour of the page or of the purple primary button. */
.rd-btn { border: 2px solid #e9b400; background: #fff1b8; color: #6b4a00 !important; box-shadow: 0 5px 0 #e9b400; font-weight: 900; }
.rd-btn:hover { background: #ffe88c; transform: translateY(-1px); }
.rd-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 #e9b400; }
.rd-btn-danger { background: #fff; border-color: var(--rd-berry); color: var(--rd-berry) !important; box-shadow: 0 4px 0 var(--rd-berry); }
.rd-btn-danger:hover { background: #fff0f3; }
.rd-btn-primary { background: var(--rd-accent); border-color: transparent; color: #fff !important; box-shadow: 0 5px 0 var(--rd-accent-700); }
.rd-btn-primary:hover { background: #e63a62; }
.rd-btn-primary:active { box-shadow: 0 2px 0 var(--rd-accent-700); }
.rd-chip { border: 0; box-shadow: 0 3px 0 var(--rd-line); font-weight: 800; }
.rd-chip:hover { box-shadow: 0 3px 0 var(--rd-line); transform: translateY(-1px); }
.rd-chip.active { background: var(--rd-ink); box-shadow: none; }
.rd-eyebrow { color: var(--rd-accent-700); }
.rd-welcome, .rd-panel, .rd-gate { box-shadow: 0 8px 0 var(--rd-line); }
.rd-profile { border: 0; background: var(--rd-paper); box-shadow: 0 5px 0 var(--rd-line); }
.rd-profile:hover { box-shadow: 0 5px 0 var(--rd-accent); }
.rd-avatar { background: var(--rd-sun); }
.rd-library-head h1, .rd-continue-body h2 { font-weight: 900; }

/* Library: the "continue" card is a bright teal hero */
.rd-continue { background: var(--rd-teal-bright); box-shadow: 0 10px 0 var(--rd-teal); color: #fff; }
.rd-continue-body h2, .rd-continue .rd-meter { color: #fff; }
.rd-continue .rd-eyebrow { align-self: flex-start; padding: .3rem 1rem; border-radius: 999px; background: var(--rd-sun); color: var(--rd-ink); }
.rd-continue .rd-bar { background: rgba(255, 255, 255, .3); height: 14px; }
.rd-continue .rd-bar > span { background: var(--rd-sun); }
.rd-continue .rd-btn-primary { background: #fff; color: var(--rd-ink) !important; box-shadow: 0 5px 0 rgba(0, 0, 0, .18); }
.rd-continue-cover { border-radius: var(--rd-radius); box-shadow: 0 6px 0 rgba(0, 0, 0, .15); }

/* Library: each book has its own fixed colour (--book) as a hard cover with a darker spine */
.rd-shelf { gap: clamp(2rem, 4vw, 3rem) clamp(1.5rem, 3.5vw, 2.5rem); }
.rd-cover { box-sizing: border-box; padding: 6px 6px 6px 16px; border-radius: 10px 22px 22px 10px; background: var(--book, var(--rd-sand));
    box-shadow: inset 12px 0 0 rgba(0, 0, 0, .2), 0 8px 0 rgba(43, 35, 80, .14); overflow: hidden; }
.rd-card:hover .rd-cover { transform: translateY(-4px); box-shadow: inset 12px 0 0 rgba(0, 0, 0, .2), 0 12px 0 rgba(43, 35, 80, .14); }
.rd-cover img { border-radius: 6px 16px 16px 6px; }
.rd-cover-blank { color: #fff; }
.rd-badge { top: .85rem; left: 1.7rem; background: var(--rd-paper); color: var(--rd-ink); font-weight: 900; }
.rd-badge.done { background: var(--rd-paper); color: var(--rd-teal); }
.rd-badge.new { background: var(--rd-sun); color: var(--rd-ink); }
.rd-badge.locked { background: var(--rd-ink); color: #fff; }
.rd-cover-bar { left: 1.7rem; right: 1.1rem; bottom: 1rem; height: 8px; background: rgba(255, 255, 255, .7); }
.rd-cover-bar > span { background: #fff; }
.rd-stars { margin-top: .15rem; font-size: 1.45rem; }
.rd-card-title { font-size: 1.3rem; font-weight: 900; }

/* Book page: chunky bar, controls and settings */
.rd-glass { background: var(--rd-paper); -webkit-backdrop-filter: none; backdrop-filter: none; border: 0; box-shadow: 0 5px 0 rgba(43, 35, 80, .12); }
/* The Bookshelf button looks like the filter buttons on the shelf (All, New, Done): white, bold, a flat edge below. */
.rd-book-bar .rd-back.rd-glass { background: #fff; color: #4b2fa3 !important; font-weight: 900; box-shadow: 0 4px 0 rgba(43, 35, 80, .22); }
.rd-book-bar .rd-back.rd-glass:hover { transform: translateY(-1px); }
.rd-back { font-weight: 900; }
.rd-dots span.read { background: var(--rd-teal-bright); }
.rd-dots span.current { background: var(--rd-accent); width: 1.4rem; }
.rd-dots { grid-auto-columns: auto; }
.rd-icon-btn[aria-expanded="true"] { background: var(--rd-ink); }
.rd-settings-heading { color: var(--rd-accent-700); }
.rd-seg { background: var(--rd-sand); }
.rd-seg button.active { background: var(--rd-accent); color: #fff; box-shadow: none; }
.rd-switch:checked { background: var(--rd-teal-bright); }
.rd-turn { border: 0; background: var(--rd-sand); }
.rd-turn-next { background: var(--rd-sun); border: 0; color: var(--rd-ink); box-shadow: 0 4px 0 #d9a900; }
.rd-turn-next:hover { background: #ffe066; }
.rd-play { background: var(--rd-accent); box-shadow: 0 5px 0 var(--rd-accent-700); font-weight: 900; }
.rd-page-label { color: var(--rd-accent-700); }
.rd-text { font-weight: 800; }
.rd-text .syllable-text .syl-word.ra-active { background: #ffe27a; box-shadow: 0 0 0 .14em #ffe27a; }
.rd-text .syllable-text .syl.ra-active { background: #ffe27a; }
.rd-end-art { background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, .6) 0 30%, transparent 31%), var(--rd-sun); }
.rd-end h2 { font-weight: 900; }
.rd-question { background: var(--rd-page); border: 0; box-shadow: 0 4px 0 var(--rd-line); }
.rd-marks button { border: 0; box-shadow: 0 3px 0 var(--rd-line); }

/* Stars on the finish page */
.rd-rate { padding: 1rem 1.25rem; border-radius: 1.5rem; background: var(--rd-page); align-self: stretch; }
.rd-rate-label { color: var(--rd-ink); font-size: 1.1rem; }
.rd-star { width: 56px; height: 56px; font-size: 2.9rem; color: #ddd3bc; }
.rd-star.on { color: #f5a400; }

/* Shelf: the reader's header sits at the very top; room between the language tabs and the books */
.rd-library-head { margin-bottom: 1.5rem; }
.rd-langs { margin-bottom: 1.75rem; }
.rd-shelf-section > .rd-langs:first-child { margin-top: .25rem; }
.rd-shelf > li { display: flex; flex-direction: column; gap: .15rem; }
.rd-shelf > li > .rd-card { height: auto; }
.rd-stars { margin-top: 0; gap: .15rem; color: #d9d3c4; }
.rd-stars button { padding: 0; border: 0; background: none; font: inherit; line-height: 1; color: inherit; cursor: pointer; min-width: 1.6rem; min-height: 1.9rem; transition: transform .1s ease; }
.rd-stars button:hover { transform: scale(1.18); }
.rd-stars button:focus-visible { outline: 3px solid var(--rd-teal); outline-offset: 2px; border-radius: 6px; }
.rd-stars .on { color: #f5a400; }
.rd-stars:not(.can-rate) { opacity: .75; }

/* Reader settings: one line of compact controls, no headings */
.rd-settings { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.25rem; padding: .6rem 1rem; }
.rd-settings .rd-row { display: flex; align-items: center; gap: .5rem; min-height: 0; padding: 0; border-top: 0; }
.rd-settings .rd-row > :last-child { justify-self: auto; }
.rd-settings .rd-row-label { font-size: .95rem; white-space: nowrap; }
.rd-settings .rd-seg button { min-height: 38px; padding: .2rem .8rem; font-size: .95rem; }
.rd-settings .rd-switch { width: 46px; height: 27px; }
.rd-settings .rd-switch::after { width: 21px; height: 21px; }
.rd-settings .rd-switch:checked::after { transform: translateX(19px); }
.rd-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@media (max-width: 700px) {
    .rd-settings .rd-row:not(label) { grid-template-columns: none; }
}

/* Page number: bottom centre of the book */
.rd-folio { left: 50%; top: auto; bottom: .7rem; transform: translateX(-50%); z-index: 6; }

/* Settings: the pink-button choices on top, each under a one-word heading; the switches below */
.rd-settings { display: grid; gap: .9rem; padding: .9rem 1.1rem; }
.rd-set-choices, .rd-set-switches { display: flex; flex-wrap: wrap; align-items: flex-start; gap: .75rem 1.5rem; }
.rd-set-switches { align-items: center; padding-top: .8rem; border-top: 1px solid var(--rd-line); }
.rd-offline { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; padding-top: .8rem; border-top: 1px solid var(--rd-line); }
.rd-offline-note { font-weight: 800; font-size: .95rem; }
.rd-set-group { display: flex; flex-direction: column; gap: .3rem; }
.rd-set-title { font-size: .8rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: var(--rd-accent-700); padding-left: .4rem; }

/* Book page backdrop: a cheerful scene tinted with the book's own colour (soft sky, rolling hill, sun and dots) */
.rd-backdrop { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
    background:
        radial-gradient(rgba(43, 35, 80, .08) 2px, transparent 2.6px) 0 0 / 30px 30px,
        radial-gradient(ellipse 80% 20% at 50% 102%, color-mix(in srgb, var(--book, #1f9d8f) 45%, #ffffff) 0 98%, transparent 100%),
        radial-gradient(ellipse 55% 16% at 12% 104%, color-mix(in srgb, var(--book, #1f9d8f) 70%, #ffffff) 0 98%, transparent 100%),
        linear-gradient(180deg, color-mix(in srgb, var(--book, #1f9d8f) 22%, #ffffff) 0%, #fff3d6 100%); }
.rd-backdrop::before { content: ""; position: absolute; top: -7rem; right: -6rem; width: 23rem; height: 23rem; border-radius: 50%; background: #ffd84d; opacity: .6; }
.rd-backdrop::after { content: ""; position: absolute; top: 38%; left: -6rem; width: 15rem; height: 15rem; border-radius: 50%; background: #ff8fab; opacity: .3; }

/* Page number: bottom centre of the picture page (inside the left page) */
.rd-folio { z-index: 3; }

/* The generic ".rd-book > :not(.rd-blob)" rule made the backdrop position:relative with no height, so it never showed */
.rd-book > .rd-backdrop { position: fixed; z-index: 0; inset: 0; }

/* A word with the punctuation touching it never splits across lines */
.syl-unit { white-space: nowrap; }


/* Pictures of the pages around the open one are all in the page, stacked; turning only changes which one shows,
   so there is nothing to load or decode at the moment of the turn. */
.rd-pic { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; pointer-events: none; }
.rd-pic.current { opacity: 1; pointer-events: auto; }

/* Voucher box and discounted plan prices on the parents page */
.rd-voucher { display: grid; gap: .35rem; margin: 1rem 0 0; max-width: 24rem; }
.rd-voucher-row { display: flex; gap: .5rem; }
.rd-voucher-row input { flex: 1; min-width: 0; text-transform: uppercase; }
.rd-guest { display: grid; gap: .35rem; margin: 1.25rem 0 0; max-width: 24rem; }
.rd-guest input { min-height: 3rem; padding: 0 .9rem; border: 2px solid var(--rd-line, #e6dfd0); border-radius: .8rem; font: inherit; }
.rd-was { color: var(--rd-muted, #6b6b7b); margin-right: .35rem; font-weight: 400; }

/* One page at a time (phones and small tablets): the page number sits at the bottom of the whole page, under the words,
   not on the bottom of the picture. The left leaf stops being the anchor so the number is placed against the spread. */
@media (max-width: 899px) {
    .rd-spread { position: relative; }
    .rd-leaf-left { position: static; }
    .rd-folio { bottom: .6rem; }
    .rd-leaf-right { padding-bottom: 3.1rem; }
}

/* Language switch: BM | EN, a purple pill. The chosen side is solid purple with white text; the other is purple on a light track.
   Colours are set with enough specificity to beat the sign-in pages' own link colours (auth.css), so the text is always readable. */
.rd-langswitch { display: inline-flex; align-items: center; flex: none; gap: 2px; padding: 4px; border-radius: 999px; background: #efe6ff; border: 1px solid #d9c8ff; font-size: .85rem; font-weight: 900; line-height: 1; }
.rd-langswitch::before { content: ""; width: 1.1rem; height: 1.1rem; margin: 0 .2rem 0 .5rem; background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235a2db0' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18M12 3c3 3.5 3 14.5 0 18M12 3c-3 3.5-3 14.5 0 18'/%3E%3C/svg%3E"); }
.rd-langswitch a, .rl-page .rd-langswitch a { display: inline-grid; place-items: center; min-width: 2.75rem; min-height: 2.75rem; padding: 0 .75rem; border-radius: 999px; color: #5a2db0; font-weight: 900; text-decoration: none; }
.rd-langswitch a:hover, .rl-page .rd-langswitch a:hover { background: #e2d3ff; color: #3d1c85; text-decoration: none; }
.rd-langswitch a.active, .rl-page .rd-langswitch a.active { background: linear-gradient(135deg, #8a4fe0, #5b6cf0); color: #fff; box-shadow: 0 3px 8px -2px rgba(90, 45, 176, .55); }
.rd-langswitch a:focus-visible { outline: 3px solid #1f9d8f; outline-offset: 2px; }
.rd-top .rd-langswitch { margin-left: auto; margin-right: .75rem; }
/* On the sign-in pages it sits in the page's top right corner but scrolls away with the page, so it never covers content. */
.rl-page > .rd-langswitch { position: absolute; z-index: 20; top: .75rem; right: .75rem; }

/* Invoice page */

/* Renewal reminder on the shelf */
.rd-renewal { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; margin-bottom: 1.25rem; padding: .75rem 1.1rem; border-radius: var(--rd-radius, 18px); background: #fff3d6; border: 2px solid #ffc94d; color: var(--rd-ink, #1f2430); font-weight: 800; }
.rd-renewal.expired { background: #ffe3e8; border-color: #ff8fab; }

.rd-legal-foot { flex: none; margin-top: auto; display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem 1.25rem; padding: .75rem 1rem 1rem; font-size: .9rem; }
.rd-legal-foot a, .rd-legal a { color: inherit; opacity: .8; }

/* Checkout (subscribe page) ----------------------------------------------------------------------------------------------- */
.ck { max-width: 68rem; margin: 0 auto; padding: 0 0 2rem; }
.ck > h1 { font-size: clamp(2rem, 4.5vw, 2.6rem); font-weight: 900; margin: .5rem 0 .75rem; }
.ck-steps { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.25rem; list-style: none; margin: 0 0 1.5rem; padding: 0; font-size: .95rem; font-weight: 800; color: var(--rd-ink-soft); }
.ck-steps li { display: inline-flex; align-items: center; gap: .5rem; }
.ck-dot { display: inline-grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: 50%; background: #e7dfff; color: #5a2db0; font-size: .85rem; }
.ck-steps .done .ck-dot { background: var(--rd-leaf); color: #fff; }
.ck-steps .now { color: var(--rd-ink); }
.ck-steps .now .ck-dot { background: var(--rd-grape); color: #fff; }
.ck-grid { display: grid; grid-template-columns: minmax(0, 1fr) 22.5rem; gap: 1.5rem; align-items: start; }
.ck-main { display: grid; gap: 1.25rem; }
.ck-card { background: var(--rd-paper); border: 1px solid var(--rd-line); border-radius: 1.75rem; padding: 1.5rem 1.75rem; box-shadow: var(--rd-shadow); }
.ck-card h2 { margin: 0 0 .75rem; font-size: 1.3rem; }
.ck-info p { margin: 0; }
.ck-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: .9rem 1rem; }
.ck-field { display: grid; gap: .35rem; }
.ck-field label, .ck-voucher label { font-size: .95rem; font-weight: 800; }
.ck-opt { font-weight: 600; color: var(--rd-ink-soft); }
.ck-field input, .ck-voucher input { min-height: 3.25rem; padding: 0 1rem; border: 2px solid var(--rd-line); border-radius: 1rem; background: #fffdf8; font: inherit; color: var(--rd-ink); }
.ck-field input:focus, .ck-voucher input:focus { border-color: var(--rd-grape); outline: none; box-shadow: 0 0 0 3px #e4d6ff; }
.ck-note.ck-error { color: var(--rd-berry); font-weight: 800; }
.ck-note { margin: .75rem 0 0; color: var(--rd-ink-soft); font-size: .95rem; line-height: 1.5; }
.ck-methods { list-style: none; margin: .5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: .85rem; }
.ck-method { display: grid; gap: .4rem; align-content: start; padding: 1rem; border: 2px solid var(--rd-line); border-radius: 1.25rem; font-size: .9rem; color: var(--rd-ink-soft); line-height: 1.4; }
.ck-method strong { color: var(--rd-ink); font-size: 1.05rem; }
.ck-ico { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: .9rem; color: #fff; }
.ck-method.bank .ck-ico { background: var(--rd-sky); }
.ck-method.card .ck-ico { background: var(--rd-accent); }
.ck-method.wallet .ck-ico { background: var(--rd-teal-bright); }
.ck-summary { min-width: 0; background: var(--rd-paper); border: 1px solid var(--rd-line); border-radius: 1.75rem; overflow: hidden; box-shadow: 0 8px 0 rgba(43, 35, 80, .1); }
.ck-plan { position: relative; padding: 1.4rem 1.5rem; color: #fff; background: linear-gradient(135deg, #8a4fe0, #5b6cf0); }
.ck-plan h2 { margin: .5rem 0 .1rem; color: #fff !important; font-size: 1.7rem; }
.ck-plan p { margin: 0; color: #e8e0ff; font-size: .95rem; }
.ck-tag { display: inline-block; padding: .2rem .75rem; border-radius: 999px; background: var(--rd-sun); color: var(--rd-ink); font-size: .75rem; font-weight: 900; letter-spacing: .04em; }
.ck-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: .85rem; padding: 1.25rem 1.5rem 1.5rem; }
.ck-body > * { min-width: 0; }
.ck-desc { margin: 0; color: var(--rd-ink-soft); font-size: .95rem; }
.ck-lines { display: grid; margin: 0; }
.ck-lines div { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 0; border-bottom: 2px dashed var(--rd-line); font-size: 1rem; }
.ck-lines dt { color: var(--rd-ink-soft); }
.ck-lines dd { margin: 0; font-weight: 800; }
.ck-lines .ck-save { color: var(--rd-leaf); }
.ck-lines .ck-save dt { color: var(--rd-leaf); }
.ck-voucher { display: grid; grid-template-columns: minmax(0, 1fr); gap: .35rem; }
.ck-voucher-row { display: flex; gap: .5rem; min-width: 0; }
.ck-voucher input { flex: 1; min-width: 0; text-transform: uppercase; border-style: dashed; }
.ck-apply { flex: none; min-height: 3.25rem; padding: 0 1.1rem; border: 0; border-radius: 1rem; background: #efe6ff; color: #5a2db0; font: inherit; font-weight: 900; cursor: pointer; }
.ck-apply[disabled] { opacity: .5; cursor: not-allowed; }
.ck-total { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding-top: .9rem; border-top: 2px dashed var(--rd-line); font-weight: 800; }
.ck-total strong { font-size: 1.9rem; font-weight: 900; }
.ck-pay { min-height: 3.75rem; border: 0; border-radius: 999px; background: linear-gradient(180deg, #ffe27a, #ffc21a); box-shadow: 0 5px 0 #d99a00; color: var(--rd-ink); font: inherit; font-size: 1.15rem; font-weight: 900; cursor: pointer; }
.ck-pay:hover { filter: brightness(1.03); }
.ck-pay:active { transform: translateY(2px); box-shadow: 0 3px 0 #d99a00; }
.ck-pay[disabled] { opacity: .6; cursor: not-allowed; }
.ck-cancel { text-align: center; font-weight: 800; color: var(--rd-ink-soft) !important; text-decoration: none; }
.ck-secure { margin: 0; color: var(--rd-ink-soft); font-size: .85rem; line-height: 1.5; text-align: center; }
.ck-secure a { color: var(--rd-grape); font-weight: 800; }
.ck-secure .icon { display: inline-block; vertical-align: -.25rem; margin-right: .3rem; color: var(--rd-leaf); }
.ck-legal { margin: 1.5rem 0 0; text-align: center; color: var(--rd-ink-soft); font-size: .9rem; }
@media (max-width: 820px) { .ck-grid { grid-template-columns: 1fr; } .ck-summary { order: -1; } }

/* One purple style for every selected tab, chip and segment, and for the sign-out button, so the header and the shelf match the language switch. */
.rd-shell .rd-tab.active, .rd-shell .rd-chip.active, .rd-shell .rd-seg button.active { background: linear-gradient(135deg, #8a4fe0, #5b6cf0); border-color: transparent; color: #fff !important; box-shadow: 0 3px 8px -2px rgba(90, 45, 176, .55); }
.rd-shell .rd-tab, .rd-shell .rd-chip { color: #5a2db0; }
.rd-shell .rd-tab:hover, .rd-shell .rd-chip:hover { background: #efe6ff; color: #3d1c85 !important; }
.rd-shell .rd-tab.active:hover, .rd-shell .rd-chip.active:hover { background: linear-gradient(135deg, #8a4fe0, #5b6cf0); color: #fff !important; }
.rd-shell .rd-seg button { color: #5a2db0; }
.rd-shell .rd-seg button:hover:not(.active) { background: #efe6ff; }
.rd-shell .rd-seg { background: #efe6ff; }
.rd-shell .rd-logout { border: 2px solid #8a4fe0; background: transparent; color: #5a2db0; font-weight: 800; }
.rd-shell .rd-logout:hover { background: #efe6ff; color: #3d1c85; }
.rd-shell .rd-tabs { background: #fff; }


/* Phones: the logo and the BM/EN switch share one row; the signed-in menu drops to its own row below. Without this the
   large logo plus the switch did not fit, so flex-wrap pushed the switch onto a second line. */
@media (max-width: 600px) {
    .rd-top { flex-wrap: wrap; gap: .5rem .5rem; padding-block: .75rem; }
    .rd-top .rd-brand { flex: 1 1 0; min-width: 0; font-size: 1.25rem; gap: .5rem; white-space: nowrap; }
    .rd-top .rd-mark { width: 3.2rem; height: 3.2rem; flex: none; }
    .rd-top .rd-langswitch { margin: 0; flex: none; }
    .rd-top .rd-langswitch a, .rd-top .rd-langswitch button { min-width: 2.5rem; min-height: 2.5rem; padding: 0 .6rem; }
    .rd-top .rd-nav { flex: 1 0 100%; order: 3; justify-content: space-between; }
}

/* Tablets: the name sits at the left end, the Home and Parents tabs in the middle and the profile menu at the right end. The nav wrapper
   steps aside (display: contents) so its two parts are placed by the header's three columns. */
@media (min-width: 601px) and (max-width: 1100px) {
    .rd-top { display: grid; grid-template-columns: auto 1fr auto; align-items: center; }
    .rd-top .rd-nav { display: contents; }
    .rd-top .rd-brand { grid-column: 1; justify-self: start; font-size: 1.3rem; gap: .5rem; white-space: nowrap; }
    .rd-top .rd-mark { width: 3.6rem; height: 3.6rem; }
    .rd-top .rd-tabs { grid-column: 2; justify-self: center; }
    .rd-top .rd-tab { white-space: nowrap; }
    .rd-top .rd-end, .rd-top .rd-langswitch { grid-column: 3; justify-self: end; margin-left: 0; }
}

/* The language switch looks like the other pill controls (the menu tabs): a white pill with the same bottom edge, and the same purple for the chosen side. */
.rd-langswitch { background: #fff; border-color: transparent; box-shadow: 0 4px 0 var(--rd-line, #e6e0d2); }
.rd-langswitch a:hover, .rl-page .rd-langswitch a:hover { background: #efe6ff; }

/* Child profiles ------------------------------------------------------------ */

/* The profile menu in the header: a round avatar (with the name on wide screens) that opens a panel of profile cards. */
.rd-top { z-index: 30; }
.rd-top .pm { position: relative; margin-left: .5rem; }
.pm > summary { list-style: none; cursor: pointer; }
.pm > summary::-webkit-details-marker { display: none; }
.pchip { display: inline-flex; align-items: center; gap: .5rem; min-height: 48px; padding: .25rem .8rem .25rem .3rem; border-radius: 999px; border: 2px solid transparent; background: #fff; box-shadow: 0 4px 0 var(--rd-line, #e6e0d2); color: #5a2db0; font-weight: 800; }
.pchip:hover, .pm[open] > .pchip { background: #efe6ff; }
.pchip:focus-visible { outline: 3px solid #8a4fe0; outline-offset: 2px; }
/* Profile pictures are small figure drawings (wwwroot/avatars), already round on their own yellow disc: they fill whatever holds them. */
.av-img { display: block; width: 100%; height: auto; aspect-ratio: 1; border-radius: 50%; user-select: none; -webkit-user-drag: none; }
.pav, .pa { display: grid; place-items: center; border-radius: 50%; background: var(--rd-sun, #ffd84a); }
.pav { width: 2.4rem; height: 2.4rem; font-size: 1.35rem; }
.pdd { position: absolute; right: 0; top: calc(100% + .6rem); width: 19rem; max-width: calc(100vw - 1.6rem); padding: .8rem; border-radius: 1.2rem; background: #fff; border: 2px solid var(--rd-line, #e6e0d2); box-shadow: 0 14px 30px -12px rgba(30, 20, 60, .35); z-index: 40; font-weight: 700; text-align: left; }
.pdd form { margin: 0; }
.pgrid { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.rd-shell .pc { display: grid; justify-items: center; gap: .35rem; padding: .7rem .4rem; border-radius: 1rem; border: 2px solid var(--rd-line, #e6e0d2); background: #fff; color: var(--rd-ink) !important; text-decoration: none; }
.rd-shell .pc:hover { border-color: #b79cf0; }
.pc .pa { width: 3.4rem; height: 3.4rem; font-size: 1.9rem; }
.pc.cur { border-color: #8a4fe0; background: #f5efff; }
.pc.add { border-style: dashed; color: #5a2db0 !important; }
.pc.add .pa { background: #efe6ff; font-size: 1.8rem; color: #5a2db0; }
.plim { margin: .5rem 0 0; text-align: center; font-size: .8rem; color: var(--rd-ink-soft); }
.pdd hr { border: 0; border-top: 1px solid #efe9fa; opacity: 1; margin: .5rem 0; }
.rd-shell .pact { display: flex; align-items: center; gap: .6rem; width: 100%; padding: .55rem .5rem; border: 0; border-radius: .8rem; background: none; color: var(--rd-ink) !important; font: inherit; font-weight: 700; text-align: left; text-decoration: none; cursor: pointer; }
.rd-shell .pact:hover { background: #efe6ff; }
.pact svg { color: #5a2db0; }

/* "Who is reading?" */
.rd-pick { text-align: center; padding: clamp(1.5rem, 6vw, 3.5rem) 0 2rem; }
.rd-pick h1 { font-size: clamp(1.8rem, 6vw, 2.6rem); font-weight: 900; }
.rd-pick-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(1rem, 4vw, 2.2rem); margin: 2.5rem 0; padding: 0; list-style: none; }
.rd-shell .rd-pick-card { display: grid; justify-items: center; gap: .7rem; color: var(--rd-ink) !important; text-decoration: none; transition: opacity .18s; }
.rd-pick-av { display: grid; place-items: center; box-sizing: border-box; width: clamp(5.5rem, 22vw, 8.5rem); height: clamp(5.5rem, 22vw, 8.5rem); border-radius: 50%; background: var(--rd-sun, #ffd84a); border: 4px solid transparent; font-size: clamp(2.8rem, 11vw, 4.5rem); transition: transform .18s, box-shadow .18s, border-color .18s; }
.rd-pick-name { font-size: 1.2rem; font-weight: 800; transition: color .18s, transform .18s; }
.rd-pick-grid:hover .rd-pick-card:not(:hover):not(:focus-visible) { opacity: .85; }
.rd-shell .rd-pick-card:hover .rd-pick-av, .rd-shell .rd-pick-card:focus-visible .rd-pick-av { transform: translateY(-6px) scale(1.2); border-color: #8a4fe0; box-shadow: 0 14px 26px -10px rgba(90, 45, 176, .55), 0 0 0 6px rgba(138, 79, 224, .16); }
.rd-shell .rd-pick-card:hover .rd-pick-name, .rd-shell .rd-pick-card:focus-visible .rd-pick-name { color: #5a2db0; transform: translateY(6px) scale(1.12); }
.rd-pick-card:focus-visible { outline: none; }
.rd-pick-card:active .rd-pick-av { transform: scale(1.1); } /* phones have no hover: a brief press effect */
.rd-pick-card.add .rd-pick-av { background: #efe6ff; border: 4px dashed #b79cf0; color: #5a2db0; font-size: clamp(2.4rem, 9vw, 3.4rem); }
.rd-pick-card.add .rd-pick-name { color: #5a2db0; }
.rd-shell .rd-pick-card.add:hover .rd-pick-av, .rd-shell .rd-pick-card.add:focus-visible .rd-pick-av { background: #e4d6ff; }
@media (prefers-reduced-motion: reduce) {
    .rd-pick-av, .rd-pick-name { transition: none; }
    .rd-shell .rd-pick-card:hover .rd-pick-av, .rd-shell .rd-pick-card:focus-visible .rd-pick-av, .rd-shell .rd-pick-card:hover .rd-pick-name, .rd-shell .rd-pick-card:focus-visible .rd-pick-name { transform: none; }
}

/* Parents page: the profiles of the account. */
.rd-kids { list-style: none; margin: .75rem 0; padding: 0; display: grid; gap: .6rem; }
.rd-kids li { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem .9rem; padding: .6rem .8rem; border-radius: 1rem; background: #faf7ff; border: 2px solid #efe9fa; }
.rd-kid-av { display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 50%; background: var(--rd-sun, #ffd84a); font-size: 1.7rem; flex: none; }
.rd-kid-info { display: grid; flex: 1 1 8rem; min-width: 0; }
.rd-kid-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.rd-kid-form { display: grid; gap: .5rem; margin-top: .75rem; max-width: 28rem; }
/* Text box and dropdowns share one size. Touch browsers draw a select with their own height and arrow, so both get a fixed height, their own
   look (appearance: none) and a drawn arrow, and they come out the same on an iPad as on a laptop. */
.rd-kid-form input:not([type="checkbox"]), .rd-kid-form select { box-sizing: border-box; width: 100%; height: 52px; min-height: 52px; padding: 0 .9rem; line-height: 1.2; border-radius: .9rem; border: 2px solid #cfc6e8; background-color: #fff; font: inherit; font-weight: 700; -webkit-appearance: none; appearance: none; }
.rd-kid-form select { padding-right: 2.6rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='10' viewBox='0 0 16 10'%3E%3Cpath d='M2 2l6 6 6-6' fill='none' stroke='%235a2db0' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1rem center; background-size: 1rem auto; }
.rd-kid-label { font-weight: 700; }
.rd-kid-pics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .5rem; } /* 10 pictures: five on top, five below */
.rd-kid-pic { display: grid; place-items: center; aspect-ratio: 1; border-radius: 50%; border: 3px solid transparent; background: var(--rd-sun, #ffd84a); font-size: clamp(1.1rem, 4.6vw, 1.7rem); padding: 0; cursor: pointer; }
.rd-kid-pic.on { border-color: #8a4fe0; box-shadow: 0 0 0 4px rgba(138, 79, 224, .18); }
.rd-kid-consent { display: flex; align-items: flex-start; gap: .6rem; margin-top: .4rem; font-size: .95rem; }
.rd-kid-consent input { margin-top: .25rem; flex: none; width: 1.2rem; height: 1.2rem; }

/* Phones: one top row (logo, BM/EN, avatar); the two tabs move to a bar at the bottom, with the book and the people icon in one colour. */
@media (max-width: 600px) {
    .rd-top .rd-nav { flex: none; order: 0; gap: 0; }
    .rd-top .pm { margin-left: 0; }
    .pchip { padding: .25rem; border-width: 3px; border-color: #fff; }
    .pname { display: none; }
    .pdd { position: fixed; right: .8rem; top: 4.2rem; }
    .rd-shell:has(.rd-tabs) { padding-bottom: 5.5rem; }
    .rd-shell .rd-tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(2, 1fr); gap: .4rem; padding: .5rem .8rem calc(.5rem + env(safe-area-inset-bottom)); border-radius: 0; border-top: 2px solid var(--rd-line, #e6e0d2); background: #fff; box-shadow: 0 -8px 20px -14px rgba(30, 20, 60, .4); }
    .rd-shell .rd-tab { display: grid; justify-items: center; gap: .1rem; min-height: 0; padding: .35rem; border-radius: 1rem; font-size: .8rem; font-weight: 800; }
    .rd-shell .rd-tab .icon { width: 22px; height: 22px; }

    /* While reading a book the page has its own controls at the bottom. */
    .rd-shell.rd-reading .rd-tabs { display: none; }
    .rd-shell.rd-reading:has(.rd-tabs) { padding-bottom: 0; }
}

/* The "new profile" window: a card with a purple head and the chosen picture on its edge (a sheet from the bottom on phones). */
.rd-pick-card { padding: 0; border: 0; background: none; font: inherit; cursor: pointer; }
.rd-modal-back { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 1rem; background: rgba(40, 25, 80, .5); }
.rd-modal { box-sizing: border-box; width: min(30rem, 100%); max-height: calc(100dvh - 2rem); overflow: auto; border-radius: 1.8rem; background: #fff; box-shadow: 0 30px 60px -20px rgba(30, 20, 60, .6); text-align: left; }
.rd-modal:focus { outline: none; }
.rd-modal-head { padding: 1.2rem 1rem 3.4rem; background: linear-gradient(135deg, #8a4fe0, #5b6cf0); color: #fff; text-align: center; font-size: 1.3rem; font-weight: 900; }
.rd-modal-big { display: grid; place-items: center; width: 6.2rem; height: 6.2rem; margin: -3rem auto .8rem; border: 5px solid #fff; border-radius: 50%; background: var(--rd-sun, #ffd84a); font-size: 3.4rem; box-shadow: 0 10px 20px -8px rgba(30, 20, 60, .5); }
.rd-modal-pics { display: grid; grid-template-columns: repeat(5, 1fr); gap: .5rem; padding: 0 1.1rem; }
.rd-modal form { padding: 0 1.1rem 1.3rem; }
.rd-modal-label { display: block; margin: .9rem 0 .3rem; font-weight: 800; }
.rd-modal-input { box-sizing: border-box; width: 100%; min-height: 50px; padding: 0 .9rem; border: 2px solid var(--rd-line, #e6e0d2); border-radius: .9rem; font: inherit; font-size: 1.05rem; font-weight: 700; }
.rd-modal-input:focus-visible { outline: 3px solid #b79cf0; outline-offset: 1px; }
.rd-seg-age { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; padding: 4px; border-radius: 999px; background: #efe6ff; }
.rd-seg-age button { min-height: 44px; border: 0; border-radius: 999px; background: none; color: #5a2db0; font: inherit; font-weight: 800; cursor: pointer; }
.rd-seg-age button.on { background: #fff; box-shadow: 0 2px 6px rgba(90, 45, 176, .25); }
.rd-modal-consent { display: flex; align-items: center; gap: .55rem; margin-top: 1rem; font-size: .9rem; font-weight: 700; }
.rd-modal-consent input { flex: none; width: 1.15rem; height: 1.15rem; }
.rd-modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-top: 1.1rem; }
@media (max-width: 600px) {
    .rd-modal-back { align-items: end; padding: 0; }
    .rd-modal { width: 100%; max-height: 92dvh; border-radius: 1.8rem 1.8rem 0 0; }
}

/* The new-profile window inside any reader page: a <dialog> opened by reader-profile.js, drawn like the picker page's window. */
.rd-dialog { width: min(30rem, calc(100% - 2rem)); max-width: none; max-height: none; padding: 0; border: 0; background: transparent; overflow: visible; }
.rd-dialog::backdrop { background: rgba(40, 25, 80, .5); }
.rd-dialog .rd-modal { width: 100%; }
.rd-vh { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.rd-dialog label.rd-kid-pic { position: relative; }
.rd-dialog label.rd-kid-pic:has(input:checked) { border-color: #8a4fe0; box-shadow: 0 0 0 4px rgba(138, 79, 224, .18); }
.rd-dialog label.rd-kid-pic:has(input:focus-visible) { outline: 3px solid #b79cf0; outline-offset: 2px; }
.rd-seg-age label { position: relative; display: grid; place-items: center; min-height: 44px; border-radius: 999px; color: #5a2db0; font-weight: 800; cursor: pointer; }
.rd-seg-age label:has(input:checked) { background: #fff; box-shadow: 0 2px 6px rgba(90, 45, 176, .25); }
.rd-seg-age label:has(input:focus-visible) { outline: 3px solid #b79cf0; outline-offset: 1px; }
@media (max-width: 600px) {
    .rd-dialog { width: 100%; margin: auto 0 0; }
    .rd-dialog .rd-modal { max-height: 92dvh; border-radius: 1.8rem 1.8rem 0 0; }
}

/* Home screen: who is reading, the module tiles (grey with a lock when staff have not opened one) and the book to carry on with. */
/* The greeting: a night-sky banner with the child's picture and a ringed planet, with room above and below it. */
.hm-head { position: relative; display: flex; align-items: center; gap: 1rem; margin: 1.6rem 0 2.4rem; padding: .95rem 1.6rem .95rem 1.2rem; border-radius: 1.8rem; background: radial-gradient(circle at 85% 20%, #4b2fa8, #241a5c 70%); color: #fff; overflow: hidden; box-shadow: 0 12px 22px -12px rgba(20, 10, 60, .8); }
.hm-head::before { content: "✦"; position: absolute; left: 42%; top: .55rem; font-size: .9rem; opacity: .85; }
.hm-head::after { content: "✦"; position: absolute; right: 22%; bottom: .6rem; font-size: .7rem; opacity: .85; }
.hm-me { position: relative; display: grid; place-items: center; flex: none; width: 5rem; height: 5rem; margin: .45rem; border-radius: 50%; background: #ffd84d; }
.hm-me::after { content: ""; position: absolute; inset: -.5rem; border-radius: 50%; border: 2px dashed rgba(255, 255, 255, .4); }
.hm-me .av-img { border: 3px solid #ffd84d; }
.hm-say { flex: 1 1 0; min-width: 0; }
.hm-head h1 { margin: 0; color: #fff; font-family: "Cherry Bomb One", "Nunito", sans-serif; font-weight: 400; font-size: clamp(1.5rem, 3.6vw, 2.1rem); line-height: 1.05; }
.hm-nm { color: #ffd84d; }
.hm-say p { margin: .35rem 0 0; font-weight: 800; font-size: clamp(1rem, 2.4vw, 1.25rem); color: #cdbfff; }
.hm-planet { flex: none; width: 6.4rem; height: 6.4rem; margin-block: -.4rem; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .35)); }
/* The greeting in the colours of the chosen profile picture (HomeScenes); the astronaut keeps the dark space one. */
.hm-th-bomba { background: linear-gradient(115deg, #58b7ff, #2a49c8); }
.hm-th-chef { background: linear-gradient(115deg, #ffb12e, #e5532b); }
.hm-th-pilot { background: linear-gradient(115deg, #38b6ff, #2a56e6); }
.hm-th-polis { background: linear-gradient(115deg, #6a7cff, #3a2fb8); }
.hm-th-doktor { background: linear-gradient(115deg, #2fd3b4, #0f8f9d); }
.hm-th-saintis { background: linear-gradient(115deg, #a874ff, #4a3fd8); }
.hm-th-pelukis { background: linear-gradient(115deg, #9b6bff, #d14cae); }
.hm-th-pramugari { background: linear-gradient(115deg, #34c3d8, #5b6cf0); }
.hm-th-cikgu { background: linear-gradient(115deg, #ff7a96, #d6336c); }
.hm-th::before { content: ""; inset: auto -6% -42% 30%; height: 90%; border-radius: 50%; background: rgba(255, 255, 255, .14); font-size: 0; opacity: 1; }
.hm-th::after { display: none; }
.hm-th .hm-me { background: #fff; box-shadow: 0 0 0 4px rgba(255, 255, 255, .35), 0 8px 18px rgba(0, 0, 0, .25); }
.hm-th .hm-me::after { display: none; }
.hm-th .hm-me .av-img { border: 0; }
.hm-th .hm-say { position: relative; }
.hm-th h1 { text-shadow: 0 2px 0 rgba(0, 0, 0, .18); }
.hm-th .hm-nm { color: #fff; border-bottom: .22rem solid #ffe27a; }
.hm-th .hm-say p { color: #fff; text-shadow: 0 1px 0 rgba(0, 0, 0, .2); }
.hm-scene { position: relative; flex: none; width: 11rem; height: 6.2rem; margin-block: -.3rem; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .28)); animation: hm-bob 4.5s ease-in-out infinite; }
@keyframes hm-bob { 50% { transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .hm-scene { animation: none; } }
.hm-profiles { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .6rem; }
.hm-pf { display: inline-flex; align-items: center; gap: .55rem; padding: .35rem 1.1rem .35rem .35rem; border-radius: 999px; background: #fff; color: #5a2db0 !important; font-weight: 800; text-decoration: none; box-shadow: 0 4px 0 #e6e0d2; opacity: .75; }
.hm-pf:hover { opacity: 1; }
.hm-pf.on { opacity: 1; background: #7a4fe0; color: #fff !important; box-shadow: 0 4px 0 #4b2fa8; }
.hm-pf.add { border: 2px dashed #b9a7e8; box-shadow: none; background: transparent; }
.hm-pa { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 50%; background: #ffe9c7; font-size: 1.5rem; }
.hm-pf.add .hm-pa { background: #fff; color: #7a4fe0; font-weight: 900; }
.hm-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.6rem 2.6rem; max-width: 52rem; margin: 0 auto 1.8rem; padding: 1rem 0 0; list-style: none; }
.hm-tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: .15rem; padding: .7rem .7rem 1rem; border-radius: 1.2rem; background: #fff; color: #2a2150 !important; text-align: center; text-decoration: none; box-shadow: 0 14px 22px -12px rgba(0, 0, 0, .5); transition: transform .18s ease, box-shadow .18s ease; }
.hm-tiles li:nth-child(odd) .hm-tile { transform: rotate(-2.5deg); }
.hm-tiles li:nth-child(even) .hm-tile { transform: rotate(2deg); }
/* Hover or keyboard focus: the tile straightens, grows and gets a bright ring, so a child can see which one is about to open. */
a.hm-tile:hover, a.hm-tile:focus-visible { transform: rotate(0) scale(1.1); z-index: 2; outline: none; box-shadow: 0 0 0 5px #ffd84d, 0 0 0 9px #7b4fe0, 0 22px 30px -12px rgba(0, 0, 0, .6); }
.hm-tape { position: absolute; top: -.7rem; left: 50%; width: 4rem; height: 1.3rem; margin-left: -2rem; background: rgba(255, 226, 122, .85); transform: rotate(-3deg); border-radius: .2rem; }
.hm-art { display: grid; place-items: center; width: 100%; height: clamp(6.5rem, 17vh, 12rem); border-radius: .9rem; background: linear-gradient(160deg, var(--a), var(--b)); font-size: clamp(3rem, 8vh, 5rem); }
.hm-name { margin-top: .6rem; font-size: clamp(1.25rem, 2.6vw, 1.7rem); font-weight: 900; }
.hm-meta { color: #7a6aa8; font-size: 1rem; font-weight: 700; }
/* Coming-soon tiles keep their own colours (the lock badge and the pill say they are not open yet) so the home page looks full of colour. */
.hm-tile.locked { cursor: not-allowed; }
.hm-art { position: relative; overflow: hidden; }
.hm-lockbadge { position: absolute; right: .6rem; bottom: .6rem; display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: rgba(60, 60, 75, .75); color: #fff; font-size: 1rem; }
.hm-soon { display: inline-block; padding: .2rem .9rem; border-radius: 999px; background: linear-gradient(90deg, #c084fc, #f472b6); color: #fff; font-size: .85rem; font-weight: 900; box-shadow: 0 .2rem 0 rgba(150, 40, 140, .35); }
.hm-cont { display: flex; align-items: center; gap: 1rem; padding: .8rem 1rem; border-radius: 1.6rem; background: #fff; box-shadow: 0 10px 24px -14px rgba(60, 40, 120, .45); }
.hm-cont-cover { display: grid; place-items: center; flex: none; width: 3.6rem; height: 4.6rem; border-radius: .7rem; overflow: hidden; background: var(--book, #7a4fe0); color: #fff; }
.hm-cont-cover img { width: 100%; height: 100%; object-fit: cover; }
.hm-cont-body { flex: 1; min-width: 0; }
.hm-cont-body h2 { margin: 0; font-size: 1.1rem; font-weight: 900; }
.hm-soonpage { display: grid; justify-items: center; gap: .8rem; padding: 2rem 1rem; text-align: center; }
.hm-bigart { font-size: 5rem; }
.hm-soonpage h1 { margin: 0; font-weight: 900; }
/* One back link for every page: a white pill with a round chevron, the same as in Maths and Games. */
.hm-back { position: relative; z-index: 4; justify-self: start; display: inline-flex; align-items: center; gap: .55rem; padding: .3rem 1.1rem .3rem .3rem; border-radius: 999px; background: #fff; color: #4b2fa3 !important; font-weight: 900; text-decoration: none; box-shadow: 0 4px 0 #d9cffa; }
.hm-back::before { content: "‹"; display: grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: 50%; background: var(--rd-accent); color: #fff; font-size: 1.7rem; line-height: 1; padding-bottom: .2rem; }
.hm-back:hover { transform: translateY(-2px); }
@media (max-width: 700px) {
    .hm-head { margin: 1.2rem 0 1.8rem; padding: .7rem 1rem .7rem .8rem; gap: .7rem; }
    .hm-head h1 { font-size: min(6vw, 1.5rem); }
    .hm-say p { font-size: min(3.8vw, 1rem); }
    .hm-me { width: 3.6rem; height: 3.6rem; }
    .hm-planet { width: 4.4rem; height: 4.4rem; }
    .hm-scene { width: 7.2rem; height: 4.1rem; }
    .hm-profiles { flex-basis: 100%; justify-content: flex-start; }
    .hm-pf:not(.on) { padding: .35rem; }
    .hm-pf:not(.on) b { display: none; }
    .hm-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hm-art { height: 7rem; font-size: 3.4rem; }
    .hm-cont { flex-wrap: wrap; }
}

/* Maths games (addition and subtraction) */
/* The notebook look is the whole page, not a panel on the usual cream page: the shell takes the background itself (and drops
   its two soft circles), so there is one background, not two. */
.rd-shell:has(.mg), .rd-shell:has(.mgh) { background:
        radial-gradient(circle at 10% 92%, rgba(240, 170, 190, .28) 0 4rem, transparent 4.1rem),
        radial-gradient(circle at 92% 12%, rgba(255, 255, 255, .35) 0 5rem, transparent 5.1rem),
        radial-gradient(circle at 90% 94%, rgba(255, 255, 255, .3) 0 3.2rem, transparent 3.3rem),
        radial-gradient(rgba(255, 255, 255, .4) 2px, transparent 2.6px) 0 0 / 22px 22px,
        linear-gradient(160deg, #fbf1de, #f6e3d3 55%, #efdde6) fixed; }
.rd-shell:has(.mg)::before, .rd-shell:has(.mg)::after, .rd-shell:has(.mgh)::before, .rd-shell:has(.mgh)::after { display: none; }
.mg { position: relative; display: grid; gap: 1.1rem; justify-items: center; padding: 1rem 0 1.6rem; isolation: isolate; }
/* Doodles around the notebook page: pencil, ruler, star, scissors. Decoration only. */
.mg:before, .mg:after { position: absolute; z-index: -1; font-size: 2.6rem; line-height: 1; opacity: .55; pointer-events: none; }
.mg:before { content: "✏️  ⭐"; left: .8rem; bottom: .5rem; transform: rotate(-8deg); letter-spacing: 1.4rem; }
.mg:after { content: "📏  ✂️"; right: .8rem; top: 3.6rem; transform: rotate(10deg); letter-spacing: 1.2rem; }
.mg .hm-back, .mgh .hm-back { position: relative; z-index: 4; justify-self: start; display: inline-flex; align-items: center; gap: .55rem; padding: .3rem 1.1rem .3rem .3rem; border-radius: 999px; background: #fff; color: #4b2fa8 !important; font-weight: 900; text-decoration: none; box-shadow: 0 4px 0 rgba(0, 0, 0, .12); }
.mg .hm-back:before, .mgh .hm-back:before { content: "‹"; display: grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: 50%; background: var(--rd-accent); color: #fff; font-size: 1.7rem; line-height: 1; padding-bottom: .2rem; }
.mg .hm-back:hover, .mgh .hm-back:hover { transform: translateY(-2px); }
.mg-tape { position: absolute; z-index: 3; top: -.8rem; width: 5.5rem; height: 1.6rem; background: rgba(240, 160, 185, .5); }
.mg-tape-a { left: -1rem; transform: rotate(-20deg); }
.mg-tape-b { right: -1rem; transform: rotate(18deg); background: rgba(150, 215, 190, .55); }
.mg-paper { position: relative; width: min(34rem, 100%); padding: 1rem .9rem 1.5rem; border-radius: .7rem; background-color: #fff; background-image: linear-gradient(#d3e2ff 1px, transparent 1px), linear-gradient(90deg, #d3e2ff 1px, transparent 1px); background-size: 22px 22px; text-align: center; box-shadow: 0 12px 24px -12px rgba(0, 0, 0, .45); transform: rotate(-.8deg); }
.mg-head { display: flex; justify-content: space-between; align-items: center; font-weight: 900; color: #5a6aa8; }
.mg-track { display: flex; flex-wrap: nowrap; justify-content: center; gap: .22rem; margin: .7rem 0 0; padding: 0; list-style: none; }
.mg-track li { display: grid; place-items: center; flex: none; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: #fff; border: 2px dashed #9fb1e0; font-size: .72rem; font-weight: 900; color: #7d8bbd; }
.mg-track li.now { border-style: solid; border-color: var(--rd-accent); color: var(--rd-accent-700); }
.mg-track li.ok { background: #ffe066; border: 2px solid #e0a800; color: #7a5600; }
.mg-track li.no { background: #ece4ff; border: 2px solid #cbb9f5; color: #7a4fe0; }
.mg-ask { margin: 1rem 0 0; font-weight: 800; color: #5a6aa8; }
.mg-key { display: inline-block; padding: 0 .5em; border-radius: .6rem; color: #2b2350; }
.mg-key.t { background: linear-gradient(160deg, #ffe27a, #ffb52e); box-shadow: 0 3px 0 #e39a10; }
.mg-key.o { background: linear-gradient(160deg, #b9e0ff, #5aaeff); box-shadow: 0 3px 0 #2f86d9; }
.mg-dir { display: inline-block; padding: .05em .55em; border-radius: .6em; font-weight: 900; font-size: 1.12em; color: #26325f; }
.mg-dir-up { background: #b8f0d2; box-shadow: 0 3px 0 #6fcf9f; }
.mg-dir-down { background: #ffd0e0; box-shadow: 0 3px 0 #f08fb0; }
.mg-eq { display: flex; align-items: center; justify-content: center; gap: .35em; margin: .5rem 0; font-family: var(--rd-font-read); font-size: clamp(2.4rem, 11vw, 3.6rem); font-weight: 900; color: #26325f; }
/* The two numbers and the answer box share one size so the sum reads as a straight row. */
.mg-eq mark, .mg-box { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; min-width: 1.2em; height: 1.4em; padding: 0 .15em; line-height: 1; border-radius: .5rem; }
.mg-eq mark { color: inherit; }
.mg-eq .y { background: #ffe066; }
.mg-eq .p { background: #ffb3d9; }
.mg-box { border: 4px dashed #5a6aa8; border-radius: .6rem; color: var(--rd-accent); }
.mg-sticks { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .6rem 1rem; margin-top: .8rem; padding: .9rem .8rem; border-radius: 1rem; background: #fff; box-shadow: 0 0 0 2px #d3e2ff; }
.mg-sticks > div { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem .7rem; max-width: 18rem; }
.mg-sticks i { width: .7rem; height: 3.2rem; border-radius: .4rem; background: #ff8a3d; box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .15); }
.mg-sticks .two i { background: #2ea5ff; }
.mg-sticks i.out { background: #cfd3e4; position: relative; }
.mg-sticks i.out:after { content: ""; position: absolute; left: -.2rem; right: -.2rem; top: 48%; height: 3px; background: #b8323f; transform: rotate(-20deg); }
.mg-sticks b { font-size: 2rem; color: #5a6aa8; }
/* Shape game: one big shape on the notebook page. */
.mg-shape { display: grid; place-items: center; margin: .8rem 0 .2rem; }
.mg-svg { width: min(11rem, 52vw); height: min(11rem, 52vw); overflow: visible; }
.mg-shapename { min-height: 1.6em; margin: .2rem 0 0; font-weight: 900; color: #26325f; }
/* Rounding game: a number line from one ten to the next, every number marked, the question number lit. */
.mg-ruler { --pad: .6rem; --row: 1.6rem; display: flex; justify-content: space-between; align-items: flex-start; width: min(24rem, 100%); margin: 1rem auto 0; padding: 1rem var(--pad) .7rem; border-radius: 1rem; background: #fff; box-shadow: 0 0 0 2px #d3e2ff; background-image: linear-gradient(#cfd9f5, #cfd9f5); /* the line runs from the first tick's centre to the last one's, at the height of the tick row's middle */ background-size: calc((100% - 2 * var(--pad)) * 10 / 11) 4px; background-position: center calc(1rem + var(--row) / 2 - 2px); background-repeat: no-repeat; }
.mg-ruler i { position: relative; flex: 1 1 0; display: grid; grid-template-rows: var(--row) auto; justify-items: center; gap: .1rem; min-width: 0; font-style: normal; }
.mg-ruler i:before { content: ""; width: 3px; height: .8rem; border-radius: 2px; background: #8d9bd1; align-self: center; }
.mg-ruler i.end:before { height: 1.4rem; width: 5px; background: #34c98a; }
.mg-ruler b { font-size: clamp(.62rem, 2.6vw, .85rem); font-weight: 800; color: #7d8bbd; }
.mg-ruler i.end b { font-size: clamp(1rem, 4.4vw, 1.5rem); font-weight: 900; color: #1f9d6a; }
.mg-ruler i.me:before { width: 1.3rem; height: 1.3rem; border-radius: 50%; background: #ffe066; border: 4px solid #e0a800; box-sizing: border-box; z-index: 1; }
.mg-ruler i.me b { font-size: clamp(.8rem, 3.4vw, 1.1rem); font-weight: 900; color: #7a4fe0; }
.mg-ruler.mini { --pad: .2rem; --row: 1rem; width: min(15rem, 100%); padding: .3rem var(--pad) .2rem; box-shadow: none; background-position: center calc(.3rem + var(--row) / 2 - 2px); }
.mg-ruler.mini i:before { height: .5rem; }
.mg-ruler.mini i.end:before { height: .9rem; }
.mg-ruler.mini i.me:before { width: .8rem; height: .8rem; border-width: 3px; }
.mg-ruler.mini b { display: none; }
.mg-ruler.mini i.end b { display: block; font-size: .85rem; }
.mg-comma { margin: 0 .12em; color: #5a6aa8; }
.mg-clock { width: min(12rem, 56vw); height: min(12rem, 56vw); }
/* Place value: the whole number, an equals badge, then a small chart with the tens and the ones split by a dashed line. */
.mg-split { gap: .5rem; align-items: center; flex-wrap: nowrap; }
.mg-split mark.w { padding: 0 .3em; border-radius: .6rem; background: linear-gradient(160deg, #efeaff, #cdbfff); box-shadow: 0 4px 0 #b3a1f5, inset 0 2px 0 rgba(255, 255, 255, .7); transform: rotate(-3deg); }
.mg-split .mg-comma.eq { display: grid; place-items: center; width: 1.2em; height: 1.2em; margin: 0; border-radius: 50%; background: #7b4fe0; color: #fff; font-size: .6em; line-height: 1; box-shadow: 0 3px 0 #5b36b8; }
.mg-split .chart { display: flex; border-radius: 1.1rem; overflow: hidden; background: #fff; box-shadow: 0 0 0 3px #d3e2ff, 0 6px 0 rgba(90, 106, 168, .25); }
.mg-split .d { display: grid; justify-items: center; gap: .3rem; padding: .45rem clamp(.7rem, 4vw, 1.3rem) .4rem; }
.mg-split .d:first-child { background: #fff5dc; }
.mg-split .d + .d { background: #e6f4ff; border-left: 4px dashed #5a6aa8; }
.mg-split mark.t, .mg-split mark.o { min-width: 1.05em; padding: 0 .15em; border-radius: .5rem; }
.mg-split mark.t { background: linear-gradient(160deg, #ffe27a, #ffb52e); box-shadow: 0 4px 0 #e39a10, inset 0 2px 0 rgba(255, 255, 255, .6); }
.mg-split mark.o { background: linear-gradient(160deg, #b9e0ff, #5aaeff); box-shadow: 0 4px 0 #2f86d9, inset 0 2px 0 rgba(255, 255, 255, .6); }
/* The names are pills; until the child has answered they only say "?", so the answer is not given away. */
.mg-split em { min-width: 3.6rem; padding: .15rem .7rem; border-radius: 999px; font-style: normal; font-weight: 900; font-size: .95rem; letter-spacing: 0; text-align: center; }
.mg-split .d:first-child em { background: #ffe9b0; color: #8a5a00; }
.mg-split .d + .d em { background: #cde8ff; color: #1d5fa8; }
.mg-split em:empty:before { content: "?"; opacity: .6; }
.mgh-card .mg-split.mini { margin: 0; font-size: 1.7rem; }
.mgh-card .mg-split em { margin: 0; box-shadow: none; }
.mg-choices.mg-wide { grid-template-columns: repeat(3, minmax(0, 7rem)); }
.mg-choices.mg-wide .mg-choice { font-size: clamp(1.5rem, 6.4vw, 2rem); }
.mg-choices.mg-words { grid-template-columns: repeat(3, minmax(0, 8.5rem)); }
.mg-choices.mg-words .mg-choice { font-size: clamp(.95rem, 3.6vw, 1.25rem); line-height: 1.15; padding: 0 .4rem; text-align: center; }
.mg-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 6rem)); gap: .8rem; justify-content: center; }
.mg-choice { display: grid; place-items: center; height: 5.4rem; border-radius: 1.1rem; font-family: var(--rd-font-read); font-size: 2.6rem; font-weight: 900; color: #26325f !important; text-decoration: none; box-shadow: 0 7px 0 rgba(0, 0, 0, .18); transform: rotate(-2deg); background: #ffe066; }
.mg-choice:nth-child(2) { background: #a5f0c4; transform: rotate(2deg); }
.mg-choice:nth-child(3) { background: #ffb3d9; }
a.mg-choice:hover { transform: translateY(-3px) rotate(0); }
.mg-choice.right { position: relative; background: #2a8a5f; color: #fff !important; }
.mg-choice.right:after { content: "✓"; position: absolute; top: -.6rem; right: -.6rem; display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: #ffd84d; border: 3px solid #fff; color: #1d6644; font: 900 1.1rem/1 var(--rd-font); box-shadow: 0 3px 0 rgba(0, 0, 0, .2); }
.mg-choice.wrong { background: #b8323f; color: #fff !important; }
.mg-choice.dim { opacity: .45; }
.mg-ok, .mg-no { margin: 0; padding: .3rem .9rem; border-radius: 99px; background: #fff; font-size: clamp(.8rem, 3.9vw, 1.25rem); font-weight: 900; white-space: nowrap; max-width: 100%; }
.mg-ok { color: #1d6644; }
.mg-no { color: #8a2330; }
.mg-end { display: grid; gap: .8rem; justify-items: center; padding: 1rem 0 .4rem; }
.mg-stars { display: flex; gap: .4rem; font-size: 4rem; line-height: 1; color: #d6d2c8; }
.mg-stars .on { color: #f2a900; }
.mg-end h1 { margin: 0; font-weight: 900; }
.mg-end p { margin: 0; font-weight: 700; }

/* Language switch inside the profile menu: two halves, the chosen one raised */
.pdd .plang { padding: .2rem .1rem; }
.rd-langseg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: #efe6ff; }
.rd-shell .rd-langseg a { display: grid; place-items: center; min-height: 2.6rem; padding: 0 .4rem; border-radius: 11px; color: #5a2db0 !important; font-weight: 900; text-decoration: none; }
.rd-shell .rd-langseg a:hover { background: #e2d3ff; }
.rd-shell .rd-langseg a.on { background: #fff; color: #3d1c85 !important; box-shadow: 0 3px 0 #d9c8ff; }
.rd-langseg a:focus-visible { outline: 3px solid #1f9d8f; outline-offset: 2px; }

/* Maths home: notebook title page and one index card per game */
.mgh { position: relative; display: grid; gap: 2.6rem; justify-items: center; padding: 1rem 0 1.6rem; isolation: isolate; }
.mgh .hm-back { justify-self: start; }
.mgh-paper { position: relative; width: min(34rem, 100%); padding: 1.4rem .9rem 1.2rem; border-radius: .7rem; background-color: #fff; background-image: linear-gradient(#d3e2ff 1px, transparent 1px), linear-gradient(90deg, #d3e2ff 1px, transparent 1px); background-size: 22px 22px; text-align: center; box-shadow: 0 12px 24px -12px rgba(0, 0, 0, .45); transform: rotate(-.8deg); }
.mgh-big { display: block; font-size: 3.4rem; line-height: 1; }
.mgh-paper h1 { margin: .3rem 0 .1rem; font-weight: 900; color: #26325f; }
.mgh-paper p { margin: 0; font-weight: 800; color: #5a6aa8; }
.mgh-cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.8rem; width: min(34rem, 100%); }
/* minmax(0, 1fr) keeps every column the same width: a long word in one card can never widen its column past the screen. */
.mgh-card { position: relative; display: grid; justify-items: center; align-content: center; gap: .35rem; padding: 2rem .8rem 1.1rem; border-radius: .9rem; background-color: #fff; background-image: linear-gradient(#d3e2ff 1px, transparent 1px); background-size: 100% 26px; color: #26325f !important; text-decoration: none; box-shadow: 0 9px 0 rgba(0, 0, 0, .14); transition: transform .15s; }
.mgh-card:nth-child(1) { transform: rotate(.8deg); }
.mgh-card:nth-child(2) { transform: rotate(-.8deg); }
.mgh-card:nth-child(3) { transform: rotate(-.6deg); }
.mgh-card:nth-child(4) { transform: rotate(.7deg); }
.mgh-card:nth-child(5) { transform: rotate(.6deg); }
.mgh-card:nth-child(6) { transform: rotate(-.7deg); }
.mgh-card:nth-child(7) { transform: rotate(-.8deg); }
.mgh-card:nth-child(8) { transform: rotate(.6deg); }
.mgh-card:hover { transform: rotate(0) translateY(-3px); }
.mgh-tab { position: absolute; top: -.9rem; left: 1rem; padding: .4rem 1rem; border-radius: .6rem .6rem 0 0; color: #fff; font-size: .85rem; font-weight: 900; letter-spacing: .12em; }
.mgh-tab-add { background: #ff8a3d; }
.mgh-tab-sub { background: #2ea5ff; }
.mgh-tab-round { background: #34c98a; }
.mgh-tab-shape { background: #ec5fa8; }
.mgh-tab-number { background: #8b5cf6; }
.mgh-tab-place { background: #f59e0b; }
.mgh-tab-order { background: #14b8a6; }
.mgh-tab-time { background: #ef5350; }
.mgh-tab-mul { background: #6366f1; }
.mgh-card:nth-child(9) { transform: rotate(-.6deg); }
.mgh-card:nth-child(10) { transform: rotate(.7deg); }
.mgh-tab-mulx { background: #0ea5e9; }
.mgh-note { font-weight: 800; color: #5a6aa8; font-size: .95rem; text-align: center; }
.mgh-clock { display: block; width: 6rem; height: 6rem; }
.mgh-clock .mg-svg { width: 6rem; height: 6rem; }
.mgh-eq { font-family: var(--rd-font-read); font-size: 2.1rem; font-weight: 900; white-space: nowrap; }
.mgh-eq u { text-decoration: none; color: #7a4fe0; }
/* The arrows are drawn, not typed: the font's arrow sits below the middle of the digits. */
.mgh-eq:has(.mgh-ar) { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; line-height: 1; }
.mgh-eq b { font-weight: inherit; }
.mgh-ar { flex: none; width: 1.5rem; height: 1.5rem; color: #5a6aa8; translate: 0 .14rem; }
.mgh-card .mg-sticks { background: none; box-shadow: none; padding: 0; margin: 0; }
.mgh-g { display: flex; flex-wrap: wrap; justify-content: center; gap: .3rem; }
.mgh-g i { width: .65rem; height: 2.6rem; border-radius: .4rem; background: #ff8a3d; box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .15); }
.mgh-g.two i { background: #2ea5ff; }
.mgh-g i.out { background: #cfd3e4; position: relative; }
.mgh-g i.out:after { content: ""; position: absolute; left: -.2rem; right: -.2rem; top: 48%; height: 3px; background: #b8323f; transform: rotate(-20deg); }
.mgh-shapes { display: flex; gap: .7rem; height: 3.2rem; }
.mgh-shapes .mg-svg { width: 3.2rem; height: 3.2rem; }
.mgh-card em { margin-top: .4rem; white-space: nowrap; justify-self: center; align-self: center; padding: .45rem 1.6rem; border-radius: 999px; background: var(--rd-accent); color: #fff; font-style: normal; font-weight: 900; box-shadow: 0 4px 0 var(--rd-accent-700); }
.mg, .mg *, .mgh, .mgh * { box-sizing: border-box; }
.rd-shell:has(.mg), .rd-shell:has(.mgh) { overflow-x: clip; }
/* Darab: groups of dots (B groups of A) under a multiplication question */
.mg-groups { display: flex; flex-wrap: wrap; justify-content: center; gap: .55rem; margin-top: .8rem; padding: .8rem; border-radius: 1rem; background: #fff; box-shadow: 0 0 0 2px #d3e2ff; }
.mg-groups .grp { display: flex; flex-wrap: wrap; justify-content: center; max-width: calc(5 * .8rem + 4 * .25rem + 1.2rem); gap: .25rem; padding: .4rem; border-radius: .7rem; background: #eef2ff; border: 2px dashed #a5b4fc; }
.mg-groups i { width: .8rem; height: .8rem; border-radius: 50%; background: #ff8a3d; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .15); }
.mg-groups .c1 i { background: #2ea5ff; }
.mg-groups .c2 i { background: #34c98a; }
.mg-groups .c3 i { background: #ec5fa8; }
.mg-groups.mini { margin: 0; padding: 0; gap: .35rem; background: none; box-shadow: none; }
.mg-groups.mini .grp { max-width: none; padding: .25rem; gap: .2rem; }
.mg-groups.mini i { width: .6rem; height: .6rem; }
.mg-addup { margin: .6rem 0 0; font-family: var(--rd-font-read); font-size: clamp(1.1rem, 5vw, 1.5rem); font-weight: 900; color: #5a6aa8; }

/* Sifir: pick a table, then learn it by heart */
.sf-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(6.2rem, 1fr)); gap: 1rem; width: min(34rem, 100%); }
.sf-tile { display: grid; justify-items: center; gap: .1rem; padding: .7rem .4rem .8rem; border-radius: 1rem; color: #26325f !important; text-decoration: none; box-shadow: 0 6px 0 rgba(0, 0, 0, .16); transition: transform .15s; }
.sf-tile:hover { transform: translateY(-3px); }
.sf-tile small { font-weight: 900; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; opacity: .75; }
.sf-tile b { font-family: var(--rd-font-read); font-size: 2.6rem; line-height: 1.05; font-weight: 900; }
.sf-tile span { font-size: .8rem; font-weight: 800; opacity: .75; }
.sf-tile.c0 { background: #ffe066; }
.sf-tile.c1 { background: #a5f0c4; }
.sf-tile.c2 { background: #ffb3d9; }
.sf-tile.c3 { background: #b9e0ff; }
.sf-tile.c4 { background: #d9c8ff; }
.sf-mix { display: flex; align-items: center; gap: .8rem; width: min(34rem, 100%); padding: .9rem 1rem; border-radius: 1rem; background: #fff; color: #26325f !important; text-decoration: none; box-shadow: 0 7px 0 rgba(0, 0, 0, .14); }
.sf-mix-ic { font-size: 2.2rem; line-height: 1; }
.sf-mix > span:nth-child(2) { display: grid; flex: 1; min-width: 0; }
.sf-mix b { font-weight: 900; font-size: 1.15rem; }
.sf-mix small { font-weight: 700; color: #5a6aa8; }
.sf-mix em { padding: .45rem 1.1rem; border-radius: 999px; background: var(--rd-accent); color: #fff; font-style: normal; font-weight: 900; box-shadow: 0 4px 0 var(--rd-accent-700); white-space: nowrap; }
.sf-paper { padding-bottom: 1.2rem; }
.sf-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .5rem; margin-top: .3rem; }
.sf-step { padding: .45rem .95rem; border-radius: 999px; background: #fff; color: #4b2fa8 !important; font-weight: 900; text-decoration: none; white-space: nowrap; box-shadow: 0 0 0 2px #e4dbff, 0 4px 0 rgba(0, 0, 0, .12); }
.sf-step.prev { justify-self: start; }
.sf-step.next { justify-self: end; }
.sf-acts { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .8rem; margin-top: 1rem; }
.sf-acts .sc-say.big { margin-top: 0; }
.sf-acts .rd-btn.sf-go { min-height: 3.8rem; font-size: 1.15rem; }
.sf-all .stop { display: none; }
.sf-all.speaking .play { display: none; }
.sf-all.speaking .stop { display: inline; }
.sf-all .ic .stop { display: none; }
.sf-all.speaking .ic .stop { display: grid; place-items: center; }
.sc-say.big.sf-all.speaking { color: #8a2330; }
.sc-say.big.sf-all.speaking .ic { background: linear-gradient(180deg, #ff7a8a, #e0435a); box-shadow: 0 3px 0 #a3243a; }
@media (max-width: 459px) { .sf-step .w { display: none; } }
.sf-title { margin: 0; font-weight: 900; color: #26325f; font-size: clamp(1.8rem, 8vw, 2.4rem); }
.sf-title mark { padding: 0 .3em; border-radius: .6rem; background: #ffe066; color: inherit; }
.sf-mode { display: inline-grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-top: 1rem; padding: 4px; border-radius: 14px; background: #efe6ff; }
.sf-mode a { display: grid; place-items: center; min-height: 2.6rem; padding: 0 .9rem; border-radius: 11px; color: #5a2db0 !important; font-weight: 900; text-decoration: none; white-space: nowrap; }
.sf-mode a.on { background: #fff; color: #3d1c85 !important; box-shadow: 0 3px 0 #d9c8ff; }
.sf-tip { margin: .6rem 0 0; font-weight: 800; color: #5a6aa8; }
.sf-list { display: grid; gap: .55rem; margin: 1rem auto 0; padding: 0; width: min(22rem, 100%); list-style: none; }
.sf-list li { list-style: none; }
/* One box per line holds the fact and its speaker button; the button is outside the <summary>, so pressing it speaks without
   opening or closing a hidden answer. */
.sf-box { display: flex; align-items: center; gap: .5rem; padding: .3rem .35rem .3rem .8rem; border-radius: .9rem; background: #fff; box-shadow: 0 0 0 2px #d3e2ff, 0 4px 0 rgba(90, 106, 168, .2); }
.sf-box:has(details[open]) { background: #e9fbf1; box-shadow: 0 0 0 2px #8fe0b5, 0 4px 0 rgba(31, 157, 106, .25); }
.sf-row { flex: 1; min-width: 0; display: block; font-family: var(--rd-font-read); font-size: clamp(1.5rem, 7vw, 2rem); font-weight: 900; color: #26325f; text-align: left; }
.sf-row summary { display: flex; align-items: center; gap: .35em; cursor: pointer; list-style: none; }
.sf-row summary::-webkit-details-marker { display: none; }
.sf-row .sf-ans { color: #7a4fe0; }
/* The question mark is set in Nunito with a line height of 1: the reading font's "?" sits low in its line and was off centre. */
details.sf-row .sf-hide { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; width: 2.1em; height: 1.55em; padding: 0; border: 3px dashed #5a6aa8; border-radius: .5rem; color: #5a6aa8; font: 900 .8em/1 Nunito, sans-serif; }
details.sf-row .sf-ans { display: none; }
details.sf-row[open] .sf-hide { display: none; }
details.sf-row[open] .sf-ans { display: inline; }
.sf-box .sc-say { flex: none; width: 2.8rem; height: 2.8rem; }
.sf-skiphead { margin: 1.2rem 0 .4rem; font-weight: 900; color: #5a6aa8; }
.sf-skip { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; margin: 0; }
.sf-skip span { display: grid; place-items: center; min-width: 2.6rem; height: 2.6rem; padding: 0 .4rem; border-radius: 50%; background: #ffe066; font-family: var(--rd-font-read); font-weight: 900; color: #26325f; box-shadow: 0 3px 0 #e0a800; }
.sf-skip span:nth-child(even) { background: #ffb3d9; box-shadow: 0 3px 0 #e07aa8; }
.rd-shell:has(.sf) { overflow-x: clip; }

@media (min-width: 700px) {
    .mgh-paper, .mgh-cards { width: min(44rem, 100%); }
    .mgh-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.8rem 2.6rem; }
}

/* Module tile pictures */
.ma { position: absolute; inset: 0; display: block; overflow: hidden; }
.ma-dot { position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .22); }
.ma .d1 { width: 70%; height: 130%; left: -18%; top: -40%; }
.ma .d2 { width: 38%; height: 70%; right: -8%; bottom: -30%; background: rgba(255, 255, 255, .18); }
.ma .d3 { width: 14%; height: 24%; right: 18%; top: 14%; background: rgba(255, 255, 255, .3); }
.ma-fl { position: absolute; font-size: .42em; line-height: 1; filter: drop-shadow(0 .06em .06em rgba(0, 0, 0, .2)); }
.ma .f1 { left: 9%; top: 12%; transform: rotate(-12deg); }
.ma .f2 { right: 10%; top: 14%; transform: rotate(10deg); }
.ma .f3 { right: 12%; bottom: 12%; transform: rotate(-8deg); }
.ma-book { position: absolute; left: 50%; top: 50%; font-size: 1.15em; line-height: 1; transform: translate(-50%, -50%) rotate(-4deg); filter: drop-shadow(0 .08em .08em rgba(0, 0, 0, .25)); }
.ma-stories .f1 { font-size: .5em; }
.ma-chips { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: .1em; }
.ma-chips b { display: grid; place-items: center; width: 1.5em; height: 1.5em; border-radius: .35em; background: #fff; font: 900 .42em/1 var(--rd-font-read, sans-serif); box-shadow: 0 .15em 0 rgba(0, 0, 0, .18); }
.ma-chips .c1 { color: #ff7a3d; transform: rotate(-8deg); }
.ma-chips .c2 { color: #e0488f; transform: rotate(6deg); }
.ma-chips .c3 { color: #1fa971; transform: rotate(-5deg); background: #fff3a8; }
.ma-chips .op { width: auto; height: auto; background: none; box-shadow: none; color: #fff; font-size: .55em; text-shadow: 0 .06em 0 rgba(0, 0, 0, .2); }
.ma-planet { position: absolute; left: 50%; top: 50%; width: .95em; height: .95em; transform: translate(-50%, -50%); }
/* The ring is drawn twice (whole behind the planet, lower half again in front) so the planet sits inside it. */
.ma-planet i.body { position: absolute; inset: 0; z-index: 2; border-radius: 50%; background: radial-gradient(circle at 32% 28%, #fff6, transparent 40%), linear-gradient(150deg, #ffd166, #ef8354); box-shadow: inset -.12em -.12em 0 rgba(0, 0, 0, .15); }
.ma-planet:before, .ma-planet:after { content: ""; position: absolute; left: -.28em; right: -.28em; top: 50%; height: .3em; margin-top: -.15em; border: .06em solid rgba(255, 255, 255, .85); border-radius: 50%; transform: rotate(-18deg); }
.ma-planet:before { z-index: 1; }
.ma-planet:after { z-index: 3; clip-path: inset(50% -20% -20% -20%); }
.ma-science .f1 { font-size: .5em; left: auto; right: 10%; top: 8%; }
.ma-science .f2 { left: 12%; top: 16%; right: auto; }
.ma-science .f3 { left: 12%; right: auto; bottom: 10%; }
.ma-dice { position: absolute; left: 50%; top: 50%; display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); width: .9em; height: .9em; padding: .14em; border-radius: .2em; background: #fff; transform: translate(-50%, -50%) rotate(12deg); box-shadow: 0 .07em 0 rgba(0, 0, 0, .2); }
.ma-dice i { width: .17em; height: .17em; border-radius: 50%; background: #5a2db0; place-self: center; }
.ma-dice i:nth-child(1) { grid-area: 1 / 1; }
.ma-dice i:nth-child(2) { grid-area: 1 / 3; }
.ma-dice i:nth-child(3) { grid-area: 2 / 2; }
.ma-dice i:nth-child(4) { grid-area: 3 / 1; }
.ma-dice i:nth-child(5) { grid-area: 3 / 3; }
.ma-games .f1 { left: 8%; top: 12%; }
.ma-games .f3 { right: auto; left: 14%; }
.ma-games .f1 { left: auto; right: 38%; top: 8%; }
.ma-maths .ma-chips { gap: .12em; }
@media (max-width: 600px) { .ma-chips b { font-size: .34em; } .ma-chips .op { font-size: .42em; } .ma-book { font-size: .95em; } }

/* Text fields: one look for every box a parent types in (voucher code, nickname, sign-in details, the grown-up check). Low specificity (:where) so a
   field with its own rule, such as the nickname window, keeps it. */
.rd-shell :where(input:not([type="checkbox"], [type="radio"], [type="hidden"], [type="range"]), select, textarea) {
    box-sizing: border-box; min-height: 52px; padding: .5rem 1rem; border: 2px solid #cfc6e8; border-radius: .9rem; background: #fff; color: var(--rd-ink);
    font: inherit; font-weight: 700; box-shadow: inset 0 2px 0 rgba(43, 35, 80, .06); transition: border-color .15s, box-shadow .15s;
}
.rd-shell :where(input, select, textarea)::placeholder { color: #9a93b8; font-weight: 600; }
.rd-shell :where(input:not([type="checkbox"], [type="radio"], [type="hidden"], [type="range"]), select, textarea):focus {
    outline: none; border-color: #7b4fe0; box-shadow: 0 0 0 4px rgba(123, 79, 224, .2);
}
.rd-voucher-row { align-items: center; }
.rd-voucher-row input { letter-spacing: .06em; }

/* ---------- Puzzle game (Permainan) ---------- */
.pz, .pz *, .pzh, .pzh * { box-sizing: border-box; }
.rd-shell:has(.pz), .rd-shell:has(.pzh) { background: radial-gradient(circle at 15% 10%, #fff3c4 0, transparent 40%), radial-gradient(circle at 90% 85%, #ffd3ea 0, transparent 45%), #f4f0ff; overflow-x: clip; }
/* The games page is livelier than the puzzle boards: sky to candy colours with a sun, soft clouds and a field of white dots. */
.rd-shell:has(.pzh) { background: radial-gradient(circle at 6% 5%, #fff2a8 0 6.5rem, transparent 6.6rem), radial-gradient(circle at 97% 26%, rgba(255, 255, 255, .6) 0 4rem, transparent 4.1rem), radial-gradient(circle at 3% 58%, rgba(255, 255, 255, .55) 0 3rem, transparent 3.1rem), radial-gradient(circle at 94% 93%, #b9f0d6 0 8rem, transparent 8.1rem), radial-gradient(rgba(255, 255, 255, .6) 2.5px, transparent 3px) 0 0 / 34px 34px, linear-gradient(180deg, #bfe6ff, #e0d9ff 55%, #ffd9ea); }
.rd-shell:has(.pz)::before, .rd-shell:has(.pz)::after, .rd-shell:has(.pzh)::before, .rd-shell:has(.pzh)::after { display: none; }
.pz-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.pz, .pzh { position: relative; display: grid; gap: 1.8rem; justify-items: center; padding: 1rem 0 1.6rem; isolation: isolate; }
.pz .hm-back, .pzh .hm-back { position: relative; z-index: 4; justify-self: start; display: inline-flex; align-items: center; gap: .55rem; padding: .3rem 1.1rem .3rem .3rem; border-radius: 999px; background: #fff; color: #4b2fa3; font-weight: 900; text-decoration: none; box-shadow: 0 4px 0 #d9cffa; }
.pz .hm-back:before, .pzh .hm-back:before { content: "‹"; display: grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: 50%; background: var(--rd-accent); color: #fff; font-size: 1.7rem; line-height: 1; padding-bottom: .15rem; }
.pz-paper { position: relative; width: min(30rem, 100%); padding: 1.4rem 1rem 1.2rem; border-radius: .7rem; text-align: center; background-color: #fff; background-image: linear-gradient(#d3e2ff 1px, transparent 1px), linear-gradient(90deg, #d3e2ff 1px, transparent 1px); background-size: 1.6rem 1.6rem; box-shadow: 0 8px 0 rgba(90, 106, 168, .2); transform: rotate(-.4deg); }
.pz-paper .mg-ask { margin: .6rem 0 0; }
.pz-win { margin: .3rem 0 0; font-size: 1.6rem; font-weight: 900; color: #26325f; }
.pz-board { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 5px; width: min(24rem, 100%); aspect-ratio: 1; margin: 1rem auto 0; padding: 6px; border-radius: 1.1rem; background: #efe9ff; box-shadow: inset 0 0 0 3px #d9cffa; }
.pz-board.done { gap: 0; padding: 6px; background: #fff; box-shadow: 0 0 0 4px #ffd84d, 0 0 24px rgba(255, 216, 77, .7); }
.pz-board.done .pz-piece { border-radius: 0; box-shadow: none; }
.pz-piece { position: relative; display: block; min-width: 0; line-height: 0; border-radius: .6rem; overflow: hidden; background: #fff; box-shadow: 0 3px 0 rgba(90, 106, 168, .3); transition: transform .12s ease, box-shadow .12s ease; text-decoration: none; }
.pz-piece svg { display: block; width: 100%; height: 100%; }
a.pz-piece:hover { transform: translateY(-2px); }
.pz-piece.ok:after { content: ""; position: absolute; inset: 0; border: 3px solid #2ea66f; border-radius: inherit; pointer-events: none; }
.pz-board.done .pz-piece.ok:after { display: none; }
.pz-piece.sel { z-index: 2; transform: scale(.93); box-shadow: 0 0 0 4px #ffd84d, 0 0 0 7px #7b4fe0; }
.pz-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .8rem 1.2rem; width: min(30rem, 100%); font-weight: 800; color: #5a6aa8; }
.pz-peek { width: 5rem; height: 5rem; border-radius: .8rem; border: 3px solid #fff; box-shadow: 0 4px 0 #d9cffa; }
.pz-end { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .8rem; }
.pzh-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.6rem 1.4rem; width: min(26rem, 100%); }
.pzh-card { display: grid; justify-items: center; gap: .7rem; padding: .8rem .8rem 1.1rem; border-radius: 1.2rem; background: #fff; box-shadow: 0 6px 0 #d9cffa; }
.pzh-card:nth-child(odd) { transform: rotate(-.8deg); }
.pzh-card:nth-child(even) { transform: rotate(.8deg); }
.pzh-pic { width: 100%; height: auto; aspect-ratio: 1; border-radius: .9rem; box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .6); }
.pzh-card h2 { margin: 0; font-size: 1.25rem; font-weight: 900; color: #26325f; }
.pzh-levels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; width: 100%; }
.pzh-lv small { text-align: center; }
/* The three pill buttons stay side by side; the card is wide enough (one per row on a phone, two on a tablet, three on a big screen) for the longest name to fit. */
.pzh-lv { display: grid; justify-items: center; gap: .15rem; padding: .65rem .3rem; border-radius: .9rem; color: #fff !important; font-size: clamp(.82rem, 3.4vw, 1rem); font-weight: 900; text-decoration: none; }
.pzh-name { min-width: 0; text-align: center; overflow-wrap: anywhere; }
.pzh-lv small { font-size: .78em; font-weight: 800; opacity: .9; }
.pzh-lv1 { background: #34c98a; box-shadow: 0 3px 0 #1f9a69; }
.pzh-lv2 { background: #ffa63d; box-shadow: 0 3px 0 #d37d0c; }
.pzh-lv3 { background: #ef5b8a; box-shadow: 0 3px 0 #c43c68; }
.pzh-lv:hover { transform: translateY(-2px); }
@media (min-width: 640px) { .pzh-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); width: min(46rem, 100%); } }
@media (min-width: 1280px) { .pzh-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); width: min(68rem, 100%); } }
.pz-paper .mg-stars { justify-content: center; font-size: 2.6rem; margin-top: .4rem; }

/* Signed-in devices: one quiet row per device with a small text button, not a large pill each. */
.rd-devices { list-style: none; padding: 0; margin: .75rem 0; }
.rd-devices li { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem 0; border-top: 1px solid var(--rd-line); }
.rd-devices li:first-child { border-top: 0; }
.rd-device-text { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .6rem; min-width: 0; }
.rd-device-text .rd-hint { flex-basis: 100%; font-size: .9rem; }
.rd-device-here { padding: .05rem .6rem; border-radius: 999px; background: #e6f6ea; color: #1e6b3a; font-size: .8rem; font-weight: 800; }
.rd-linkbtn { flex: none; min-height: 44px; padding: 0 .9rem; border: 0; border-radius: 999px; background: transparent; color: var(--rd-berry) !important; font: inherit; font-size: .95rem; font-weight: 800; cursor: pointer; }
.rd-linkbtn:hover { background: var(--rd-berry-100); }
.rd-linkbtn[disabled] { opacity: .5; cursor: not-allowed; }
.rd-linkbtn-all { border: 2px solid var(--rd-berry-100); margin-top: .25rem; }

/* ---------- Subscription (Parents page): a membership card and pricing cards ---------- */
.rd-sub-status { position: relative; overflow: hidden; display: grid; gap: .35rem; padding: 1.2rem 1.4rem; margin-bottom: 1.25rem; border-radius: 1.4rem; background: #fff4d1; color: var(--rd-ink); }
.rd-sub-status.active { background: radial-gradient(circle at 92% 8%, rgba(255, 216, 77, .55), transparent 38%), linear-gradient(135deg, #5b2db8, #8a4fe0 55%, #c04dff); color: #fff; box-shadow: 0 14px 26px -16px rgba(90, 45, 176, .8); }
.rd-sub-status.active::after { content: "⭐"; position: absolute; right: 1.1rem; top: .6rem; font-size: 2.6rem; opacity: .95; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .25)); }
.rd-sub-status.active strong { font-size: 1.35rem; font-weight: 900; }
.rd-sub-status.active strong em { margin-left: .4rem; padding: .1rem .65rem; border-radius: 999px; background: rgba(255, 255, 255, .22); font-size: .8rem; font-style: normal; font-weight: 800; vertical-align: middle; }
.rd-sub-status.active .rd-hint { color: rgba(255, 255, 255, .8); }

.rd-voucher { max-width: none; padding: .8rem 1rem; border: 2px dashed #cdbaf3; border-radius: 1.2rem; background: #faf6ff; }
.rd-voucher-row input { background: #fff; }

.rd-plans { gap: 1.5rem 1.1rem; align-items: stretch; margin-top: 1.9rem; }
.rd-plan { position: relative; gap: .35rem; padding: 1.5rem 1.3rem 1.3rem; border: 2px solid #eadff9; border-radius: 1.6rem; background: #fff; box-shadow: 0 14px 28px -22px rgba(60, 30, 120, .7); transition: transform .15s ease, box-shadow .15s ease; }
.rd-plan:hover { transform: translateY(-4px); box-shadow: 0 22px 34px -22px rgba(60, 30, 120, .8); }
.rd-plan::before { content: ""; position: absolute; left: 1.3rem; right: 1.3rem; top: 0; height: 6px; border-radius: 0 0 6px 6px; background: #b79cf0; }
.rd-plan-month::before { background: #3fc1b0; }
.rd-plan-year::before { background: #8a4fe0; }
.rd-plan-lifetime::before { background: #ffb020; }
.rd-plan-name { font-size: 1.15rem; font-weight: 900; color: var(--rd-ink); }
.rd-plan .rd-price { font-size: 2.1rem; line-height: 1.1; color: var(--rd-ink); }
.rd-plan .rd-price small { font-size: .95rem; }
.rd-plan .rd-was { font-size: 1rem; }
.rd-plan-per { min-height: 1.3em; color: #5a2db0; font-size: .9rem; font-weight: 800; }
.rd-plan-list { list-style: none; margin: .5rem 0 .4rem; padding: .8rem 0 0; border-top: 1px dashed #e3d8f5; display: grid; gap: .45rem; font-size: .95rem; color: var(--rd-ink-soft, #4a4a62); }
.rd-plan-list li { position: relative; padding-left: 1.6rem; }
.rd-plan-list li::before { content: ""; position: absolute; left: 0; top: .12em; width: 1.1rem; height: 1.1rem; border-radius: 50%; background: #e4f7ee url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%231e8a52' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat; }
.rd-plan .rd-btn { margin-top: auto; border: 2px solid #8a4fe0; background: #fff; color: #5a2db0 !important; box-shadow: none; font-weight: 900; }
.rd-plan .rd-btn:hover { background: #f1e9ff; }
.rd-plan.feat { border: 3px solid transparent; background: linear-gradient(#fff, #fff) padding-box, linear-gradient(135deg, #8a4fe0, #ff7ac8, #ffb020) border-box; box-shadow: 0 24px 40px -22px rgba(138, 79, 224, .85); }
.rd-plan.feat::before { display: none; }
.rd-plan.feat .rd-btn { border-color: transparent; background: linear-gradient(135deg, #6a35d0, #a14bf0 55%, #e65bb8); color: #fff !important; box-shadow: 0 10px 18px -10px rgba(138, 79, 224, .9); }
.rd-plan.feat .rd-btn:hover { filter: brightness(1.07); background: linear-gradient(135deg, #6a35d0, #a14bf0 55%, #e65bb8); }
.rd-plan-flag { position: absolute; left: 50%; top: -.95rem; transform: translateX(-50%); padding: .3rem .9rem; border-radius: 999px; background: linear-gradient(135deg, #ffb020, #ff7a45); color: #fff; font-size: .8rem; font-weight: 900; white-space: nowrap; box-shadow: 0 8px 14px -8px rgba(255, 122, 69, .9); }
@media (prefers-reduced-motion: reduce) { .rd-plan, .rd-plan:hover, .rd-plan.feat, .rd-plan.feat:hover { transition: none; transform: none; } }
.rd-voucher-row .rd-btn { min-height: 52px; border: 2px solid #8a4fe0; background: #fff; color: #5a2db0 !important; box-shadow: none; font-weight: 900; }
.rd-voucher-row .rd-btn:hover:not([disabled]) { background: #f1e9ff; }

/* Susun suku kata: balloons. Each syllable is a balloon; drop it into the next empty place under the picture and the word is whole.
   Few things on screen, very large, and Andika (single-storey a and g, as children are taught to write them). Played by reader-syllables.js. */
.gm-row { display: grid; grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr)); gap: 1rem; width: min(46rem, 100%); }
.gm-tile { position: relative; display: grid; justify-items: center; align-content: start; gap: .3rem; padding: 1.7rem .5rem 1.1rem; border: 3px dashed var(--b); border-radius: 1rem; color: #26325f !important; text-align: center; text-decoration: none; background: #fffdf5 linear-gradient(transparent 94%, rgba(120, 150, 255, .25) 94%) 0 0 / 100% 1.6rem; box-shadow: 0 8px 14px -6px rgba(0, 0, 0, .3); transition: translate .12s; }
.gm-row { gap: 1.4rem; }
.gm-tile::before { content: ""; position: absolute; top: -.9rem; left: 50%; width: 5rem; height: 1.6rem; margin-left: -2.5rem; background: var(--a); opacity: .8; rotate: -3deg; }
.gm-tile:nth-child(odd) { rotate: -1.2deg; }
.gm-tile:nth-child(even) { rotate: 1.2deg; }
.gm-tile:hover { translate: 0 -3px; }
.gm-tile:active { translate: 0 3px; }
.gm-ic { display: grid; place-items: center; width: clamp(4.2rem, 17vw, 5.6rem); aspect-ratio: 1; border-radius: 50%; background: var(--b); font-size: clamp(2.3rem, 9vw, 3.2rem); line-height: 1; box-shadow: 0 5px 0 var(--d); }
.gm-tile b { margin-top: .4rem; color: var(--d); font-size: clamp(1.05rem, 4.4vw, 1.5rem); font-weight: 900; line-height: 1.1; }
.gm-tile small { color: #5a6aa8; font-size: clamp(.78rem, 3vw, .95rem); font-weight: 800; }
.gm-stars { font-size: 1.05rem; letter-spacing: .1rem; }
.gm-go { margin-top: .5rem; padding: .4rem 1.2rem; border-radius: 999px; background: var(--b); color: #fff; font-style: normal; font-weight: 900; box-shadow: 0 3px 0 var(--d); }
.gm-purple { --a: #9b8cff; --b: #6c5ce7; --d: #4a3bb5; }
.gm-pink { --a: #ff8fb8; --b: #ef5b8a; --d: #b83a67; }
.gm-green { --a: #52dba0; --b: #26b57d; --d: #17895d; }
.gm-orange { --a: #ffb85c; --b: #ff8a3d; --d: #c8631b; }
.gm-red { --a: #ff8a8a; --b: #ee5a6f; --d: #b83a4c; }
.sg { --ink: #2d2a4a; font-family: "Andika", "Nunito", system-ui, sans-serif; box-sizing: border-box; position: relative; display: grid; align-content: start; gap: .5rem; width: min(46rem, 100%); min-height: min(37rem, calc(100dvh - 9rem)); margin: 0 auto; padding: 1rem 1rem 2rem; overflow: hidden; border-radius: 2rem; background: radial-gradient(circle, rgba(255, 255, 255, .55) 0 .22rem, transparent .25rem) 0 0 / 1.6rem 1.6rem, linear-gradient(180deg, #ffe9b8, #ffd6d0); box-shadow: 0 9px 0 #eab6a6, 0 22px 36px -22px rgba(150, 60, 40, .5); }
.sg-bar { display: flex; align-items: center; justify-content: space-between; gap: .9rem; }
.sg-back { display: grid; place-items: center; width: 3.6rem; height: 3.6rem; border-radius: 50%; background: #4fc7a8; color: #fff !important; text-decoration: none; box-shadow: 0 4px 0 #2f9d82; }
.sg-back:active { transform: translateY(3px); box-shadow: 0 1px 0 #2f9d82; }
.sg-progress { display: none; }
.sg-sr { padding: .3rem 1.1rem; border-radius: 999px; background: #fff; color: var(--ink); font-size: 1.2rem; font-weight: 700; box-shadow: 0 3px 0 #eab6a6; }
.sg-stage { position: relative; display: grid; justify-items: center; gap: .5rem; }
.sg-stage[hidden], .sg-end[hidden], .sg-hint[hidden] { display: none; }
.sg-board { position: relative; display: grid; place-items: center; width: min(15rem, 66%); height: 11rem; margin: .5rem 0 4.4rem; border: 6px solid #fff; border-radius: 2rem; background: #fffaf0; transform: rotate(-2deg); box-shadow: 0 8px 0 #eab6a6, 0 18px 22px -12px rgba(150, 60, 40, .5); }
.sg-pic span { display: block; font-size: 6.4rem; line-height: 1; filter: drop-shadow(0 8px 5px rgba(100, 50, 30, .2)); }
.sg-pic span.pop { animation: sg-pop .8s; }
.sg-img { display: block; width: 8rem; height: 8rem; object-fit: contain; border-radius: 1.2rem; filter: drop-shadow(0 8px 5px rgba(100, 50, 30, .2)); }
.sg-speak { position: absolute; left: 50%; bottom: -5.5rem; display: flex; align-items: center; gap: .5rem; transform: translateX(-50%) rotate(2deg); padding: .55rem 1.3rem .55rem 1rem; border: 0; border-radius: 999px; background: #5ab0ff; color: #fff; font: inherit; font-size: 1.3rem; font-weight: 700; white-space: nowrap; box-shadow: 0 5px 0 #2f84d6, 0 12px 14px -8px rgba(20, 60, 120, .6); cursor: pointer; }
.sg-speak:active { transform: translateX(-50%) rotate(2deg) translateY(3px); box-shadow: 0 2px 0 #2f84d6; }
.sg-speak.nudge { animation: sg-nudge 1.4s infinite; }
.sg-hint { display: none; }
.sg-train { margin-top: 1.87rem; }
.sg-train.arrive .sg-slot { animation: sg-pop-in .45s backwards; }
.sg-slots { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem 1.5rem; max-width: 100%; }
.sg-slot { box-sizing: border-box; position: relative; display: grid; place-items: center; width: calc(2.6rem + var(--len, 2) * 1.7rem); max-width: 100%; height: 5.8rem; padding: 0 .4rem; border: 4px dashed #f08c5a; border-radius: 1.4rem; background: rgba(255, 255, 255, .75); color: var(--ink); font-size: clamp(2rem, 7.5vw, 2.8rem); font-weight: 700; white-space: nowrap; }
.sg-slot:not(:last-child):after { content: "+"; position: absolute; right: -1.35rem; top: 50%; translate: 0 -55%; color: #f08c5a; font-size: 1.6rem; font-weight: 700; }
.sg-slot.next { border-style: solid; background: #fff; animation: sg-glow 1.1s ease-in-out infinite; }
.sg-slot.next .sg-txt:before { content: "?"; color: #f08c5a; font-size: 2.6rem; display: block; }
.sg-slot.filled { border: 4px solid #fff; background: radial-gradient(circle at 32% 26%, color-mix(in srgb, var(--tile) 45%, #fff), var(--tile) 70%); box-shadow: 0 5px 0 rgba(0, 0, 0, .18); animation: none; }
.sg-slot.filled:after { color: var(--ink); }
.sg-slot.filled .sg-txt { color: var(--ink); text-shadow: 0 0 .3rem rgba(255, 255, 255, .9), 0 2px 0 rgba(255, 255, 255, .7); }
.sg-slots.done .sg-slot { animation: sg-jump .5s; }
.sg-tray { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.2rem 1rem; min-height: 9.5rem; margin-top: 3rem; }
.sg-tile { box-sizing: border-box; position: relative; min-width: min(6.4rem, calc((100vw - 8.5rem) / 3)); height: 7.2rem; padding: 0 1.2rem 0.4rem; border: 0; border-radius: 52% 52% 48% 48% / 60% 60% 40% 40%; background: radial-gradient(circle at 32% 24%, color-mix(in srgb, var(--tile) 40%, #fff) 0 12%, var(--tile) 62%); color: var(--ink); font: inherit; font-size: 3rem; font-weight: 700; text-shadow: 0 0 .35rem rgba(255, 255, 255, .9), 0 2px 0 rgba(255, 255, 255, .7); box-shadow: inset -.4rem -.6rem 0 rgba(0, 0, 0, .1), 0 10px 14px -8px rgba(80, 30, 20, .5); cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; animation: sg-bob 3s ease-in-out infinite; }
.sg-tile:nth-child(2n) { animation-delay: -1s; }
.sg-tile:nth-child(3n) { animation-delay: -2s; }
.sg-tile:before { content: ""; position: absolute; left: 50%; bottom: -.55rem; width: 0; height: 0; margin-left: -.45rem; border: .45rem solid transparent; border-top: 0; border-bottom: .6rem solid var(--tile); }
.sg-tile:after { content: ""; position: absolute; left: 50%; top: 100%; width: 3px; height: 2.1rem; margin-left: -1px; border-radius: 2px; background: #fff; opacity: .85; }
.sg-tile.drag { z-index: 50; cursor: grabbing; animation: none; box-shadow: inset -.4rem -.6rem 0 rgba(0, 0, 0, .1), 0 26px 24px -10px rgba(80, 30, 20, .5); }
.sg-tile.used { display: none; }
.sg-tile.shake { animation: sg-shake .4s; }
.sg-bit { position: absolute; top: 5rem; width: .8rem; height: 1.2rem; border-radius: 2px; background: var(--tile); pointer-events: none; animation: sg-fall 1.7s var(--d) ease-out forwards; }
.sg-end { display: grid; place-items: center; padding: 1rem 0 0; }
.sg-card { box-sizing: border-box; width: min(26rem, 100%); padding: 1.4rem 1rem 1.5rem; border: 6px solid #fff; border-radius: 1.8rem; background: #fffaf0; text-align: center; box-shadow: 0 7px 0 #eab6a6; }
.sg-card p { margin: .2rem 0 1rem; font-weight: 700; color: var(--ink); }
.sg-card .mg-stars { justify-content: center; }
@keyframes sg-pop { 0% { transform: scale(1); } 35% { transform: scale(1.22) rotate(-4deg); } 70% { transform: scale(.95) rotate(3deg); } 100% { transform: scale(1); } }
@keyframes sg-pop-in { from { transform: scale(.3); opacity: 0; } }
@keyframes sg-nudge { 0%, 100% { scale: 1; } 50% { scale: 1.08; } }
@keyframes sg-glow { 0%, 100% { box-shadow: 0 0 0 4px rgba(240, 140, 90, .3); } 50% { box-shadow: 0 0 0 9px rgba(240, 140, 90, .18); } }
@keyframes sg-bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -.55rem; } }
@keyframes sg-jump { 0%, 100% { translate: 0 0; } 50% { translate: 0 -12px; } }
@keyframes sg-shake { 0%, 100% { translate: 0 0; } 20% { translate: -9px 0; } 40% { translate: 8px 0; } 60% { translate: -6px 0; } 80% { translate: 4px 0; } }
@keyframes sg-fall { 0% { transform: translate(0, 0) rotate(0); opacity: 1; } 100% { transform: translate(var(--x), 12rem) rotate(540deg); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .sg *, .sg { animation: none !important; transition: none !important; } }

/* Header: the sound switch sits beside the profile picture, the rest of the bar is unchanged. Scoped to the header: the "The End" page of a book also has a .rd-end box, which must stay a plain column. */
.rd-top .rd-end { display: flex; align-items: center; gap: .6rem; }
.rd-top .rd-end .pm { margin-left: 0; }
.rd-sound { display: grid; place-items: center; flex: none; width: 3rem; height: 3rem; padding: 0; border: 0; border-radius: 50%; background: linear-gradient(180deg, #9a6df0, #7a4fe0); color: #fff; box-shadow: 0 4px 0 #5a2db0; cursor: pointer; }
.rd-sound:active { translate: 0 3px; box-shadow: 0 1px 0 #5a2db0; }
.rd-sound:focus-visible { outline: 3px solid #8a4fe0; outline-offset: 3px; }
.rd-sound .off, html[data-sound="off"] .rd-sound .on { display: none; }
html[data-sound="off"] .rd-sound .off { display: block; }
html[data-sound="off"] .rd-sound { background: #fff; color: #5a2db0; box-shadow: 0 4px 0 var(--rd-line, #e6e0d2); }

/* Belajar suku kata: sound cards and word cards. Tapping a card says it (reader-syllables.js). */
.lc { display: grid; gap: 1rem; width: min(52rem, 100%); margin: 0 auto; }
.lc-title { margin: 0; font-size: clamp(1.7rem, 6vw, 2.4rem); font-weight: 900; color: #3d1c85; }
.lc-sub { margin: -.4rem 0 .4rem; font-weight: 700; color: #6b4fb0; }
:where(.lc) button { font-family: inherit; cursor: pointer; text-align: left; }
.lc-syls { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: 1rem; padding: .4rem 0 .8rem; }
.lc-syl { display: grid; justify-items: center; align-content: center; gap: .5rem; min-height: 8.2rem; padding: .8rem .4rem; border: 0; border-radius: 1.6rem; background: #fff; color: var(--c, #5a2db0); box-shadow: 0 6px 0 color-mix(in srgb, var(--c, #5a2db0) 45%, #fff), 0 10px 18px rgba(80, 50, 160, .12); transition: translate .1s, box-shadow .1s; cursor: pointer; }
.lc-say { font: 800 clamp(2.4rem, 7vw, 3.2rem)/1 Andika, Nunito, sans-serif; }
.lc-say i { font-style: normal; }
.lc-up { color: var(--c); }
.lc-lo { color: #3a6fe0; }
.lc-spk { display: inline-grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--c, #5a2db0); color: #fff; }
.lc-syl:active, .lc-syl.said { translate: 0 5px; box-shadow: 0 1px 0 color-mix(in srgb, var(--c, #5a2db0) 45%, #fff); }
@media (prefers-reduced-motion: reduce) { .lc-syl, .lc-word { transition: none; } }
.lc-jump { display: flex; flex-wrap: wrap; justify-content: center; gap: .45rem; padding: .5rem .2rem .9rem; }
.lc-jump a { display: inline-grid; place-items: center; min-width: 2.7rem; min-height: 2.7rem; padding: 0 .7rem; border-radius: .9rem; background: #fff; color: #5a2db0 !important; font-weight: 900; text-decoration: none; box-shadow: 0 3px 0 #d8c9f2; }
.lc-h { margin: 1rem 0 0; scroll-margin-top: 4.2rem; font-size: 1.6rem; font-weight: 900; color: #5a2db0; }

/* The Games page is in groups, each with its own heading and grid. */
/* The tilted cards sit close to the next heading, so every group keeps extra room below. */
.pzh-group { display: grid; justify-items: center; gap: 1rem; width: 100%; margin-top: 1.4rem; margin-bottom: 2rem; }
.pzh-gh { margin: 0; padding: .35rem 1.3rem; border-radius: 999px; background: #fff; color: #5a2db0; font-size: 1.25rem; font-weight: 900; box-shadow: 0 4px 0 #d9cffa; }
@media (min-width: 601px) and (max-width: 700px) { .rd-top .pname { display: none; } }
.sg-slots.many { gap: 1rem .9rem; }
.sg-slots.many .sg-slot:after { display: none; }

/* Home button: same round style as the sound switch; on the home screen it is white, like the switched-off sound. */
.rd-home { display: grid; place-items: center; flex: none; width: 3rem; height: 3rem; border-radius: 50%; background: linear-gradient(180deg, #9a6df0, #7a4fe0); color: #fff !important; box-shadow: 0 4px 0 #5a2db0; text-decoration: none; }
.rd-home:active { translate: 0 3px; box-shadow: 0 1px 0 #5a2db0; }
.rd-home:focus-visible { outline: 3px solid #8a4fe0; outline-offset: 3px; }
.rd-top .rd-end { flex-wrap: nowrap; }

/* The start button of the syllable game: it covers the first word until the child touches the page (a tablet allows no sound before that). */
.sg-start { position: absolute; inset: 0; z-index: 6; display: grid; place-items: center; border-radius: 2rem; background: rgba(255, 250, 240, .4); }
.sg-go { display: inline-flex; align-items: center; gap: .6rem; min-height: 4.2rem; padding: 0 2.2rem; border: 0; border-radius: 999px; background: linear-gradient(180deg, #9a6df0, #7a4fe0); color: #fff; font: 900 1.7rem/1 Andika, var(--rd-font-read, sans-serif); box-shadow: 0 6px 0 #5a2db0; cursor: pointer; animation: sg-pulse 1.4s ease-in-out infinite; }
.sg-go:active { translate: 0 4px; box-shadow: 0 2px 0 #5a2db0; }
@keyframes sg-pulse { 50% { scale: 1.07; } }
@media (prefers-reduced-motion: reduce) { .sg-go { animation: none; } }

/* Word cards: five equal tabs for the number of syllables (no sideways scrolling), then two or three big cards across, each with a play button. */
.lc-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: .6rem; padding: .3rem 0 .6rem; }
.lc-tab { display: grid; place-items: center; align-content: center; gap: .1rem; min-height: 4.4rem; padding: .3rem .2rem; border-radius: 1.2rem; background: #fff; color: var(--c) !important; text-decoration: none; box-shadow: 0 4px 0 #d8c9f2; }
.lc-tab b { font: 900 clamp(1.4rem, 5vw, 2.1rem)/1 Andika, sans-serif; }
.lc-tab small { font-weight: 800; font-size: clamp(.6rem, 2.1vw, .8rem); color: #7a6aa8; }
.lc-tab.on { background: var(--c); color: #fff !important; box-shadow: 0 4px 0 rgba(0, 0, 0, .22); translate: 0 -2px; }
.lc-tab.on small { color: rgba(255, 255, 255, .92); }
.lc-words { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 1.1rem; }
.lc-word { position: relative; display: grid; justify-items: center; align-content: start; gap: .5rem; padding: 1rem 1rem 1.1rem; border: 0; border-radius: 1.8rem; background: #fff; color: #3d1c85; box-shadow: 0 6px 0 #d8c9f2; }
.lc-word:active, .lc-word.said { translate: 0 4px; box-shadow: 0 2px 0 #d8c9f2; }
/* The picture is laid over its box rather than placed in the grid: a grid row sizes itself to the image's own pixel size (often 1024px),
   which pushed the picture far past the card and under the word on phones and tablets. */
.lc-img { position: absolute; inset: .35rem; width: calc(100% - .7rem); height: calc(100% - .7rem); object-fit: contain; }
.lc-pic { position: relative; overflow: hidden; display: grid; place-items: center; width: 100%; height: 7rem; border-radius: 1.3rem; background: #fff2c9; font-size: 4.6rem; line-height: 1; }
.lc-word:nth-child(4n+2) .lc-pic { background: #e3f6ff; }
.lc-word:nth-child(4n+3) .lc-pic { background: #ffe3ec; }
.lc-word:nth-child(4n) .lc-pic { background: #e6f8e4; }
.lc-name { font: 900 2rem/1.1 Andika, "Nunito", sans-serif; overflow-wrap: anywhere; text-align: center; }
.lc-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: .35rem; }
.lc-chips i { font: 800 1.15rem/1 Andika, sans-serif; font-style: normal; padding: .35rem .8rem; border-radius: 999px; background: #efe6ff; color: #5a2db0; }
.lc-play { display: inline-flex; align-items: center; gap: .45rem; margin-top: .2rem; padding: .55rem 1.3rem; border-radius: 999px; background: #4a9df0; color: #fff; font: 900 1.05rem/1 Nunito, sans-serif; box-shadow: 0 4px 0 #2b73c4; }
.lc-word.said .lc-play { background: #2fb596; box-shadow: 0 4px 0 #1b8a72; }
.lc-more { justify-self: center; display: inline-grid; place-items: center; min-height: 3rem; padding: 0 1.6rem; margin: .4rem auto 0; border-radius: 999px; background: #fff; color: #5a2db0 !important; font-weight: 900; text-decoration: none; box-shadow: 0 4px 0 #d8c9f2; }

/* Science module: the planets, one planet with its layers, and the ordering game. Planet pictures are NASA based (see README). */
.sc, .sc * { box-sizing: border-box; }
.sc { position: relative; display: grid; gap: 1.3rem; justify-items: center; padding: 1rem 0 1.8rem; }
.sc .hm-back { justify-self: start; }
.sc-sky, .sc-stage { position: relative; width: min(46rem, 100%); overflow: hidden; border-radius: 1.8rem; background: radial-gradient(circle at 80% 15%, #3a2a8c, #0e0a35 75%); color: #fff; box-shadow: 0 14px 24px -14px rgba(20, 10, 60, .8); }
.sc-sky { padding: 2.2rem 1.6rem; }
.sc-sky-slim { padding: 1.2rem 1.4rem; }
.sc-sky h1, .sc-stage h1 { margin: 0; color: #fff; font: 400 2.3rem/1 "Cherry Bomb One", Nunito, sans-serif; }
.sc-sky p, .sc-stage p { margin: .4rem 0 0; font-weight: 800; color: #cdbfff; }
.sc-sky .pl-matahari { position: absolute; right: .4rem; top: 50%; width: min(15rem, 42%); height: auto; translate: 0 -50%; pointer-events: none; }
.sc-sky-slim .pl-matahari { display: none; }
.sc-star { position: absolute; color: #fff; opacity: .8; font-size: .8rem; }
.sc-star.s1 { left: 8%; top: 18%; } .sc-star.s2 { left: 50%; top: 12%; font-size: .65rem; } .sc-star.s3 { left: 36%; bottom: 14%; font-size: .6rem; }
.pl-img { display: block; max-width: 100%; height: auto; user-select: none; }
.pl-zuhal { width: 160%; max-width: 160%; margin-inline: -30%; }

.sc-switch { display: inline-flex; gap: .3rem; padding: .3rem; border-radius: 999px; background: #efe6ff; }
.sc-switch a { display: inline-flex; align-items: center; gap: .35rem; min-height: 2.8rem; padding: 0 1.2rem; border-radius: 999px; color: #5a2db0 !important; font-weight: 900; text-decoration: none; }
.sc-switch a.on { background: #fff; box-shadow: 0 3px 0 #d9cffa; }
.sc-switch .sc-ic { flex: none; width: 1.4rem; height: 1.4rem; }

.sc-grid { list-style: none; margin: 0; padding: 0; width: min(46rem, 100%); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 1rem; }
@media (min-width: 640px) { .sc-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.sc-card, .sc-pick { display: grid; height: 100%; align-content: start; justify-items: center; gap: .15rem; padding: .7rem .5rem .8rem; border-radius: 1.4rem; background: #fff; color: #2b2350 !important; text-align: center; text-decoration: none; box-shadow: 0 6px 0 #d9cffa; transition: translate .12s; }
.sc-card:hover, .sc-pick:hover { translate: 0 -3px; }
.sc-card b, .sc-pick b { margin-top: .4rem; font-size: 1.25rem; font-weight: 900; }
.sc-card small { color: #7a6aa8; font-weight: 700; }
.sc-space { display: grid; place-items: center; width: 100%; height: 7.4rem; overflow: hidden; border-radius: 1rem; background: radial-gradient(circle at 50% 40%, #1d1660, #070520); }
.sc-space .pl-img { width: 5.6rem; }
.sc-space .pl-zuhal { width: 5.6rem; max-width: none; margin: 0; scale: 1.5; }

.sc-trail { position: relative; list-style: none; margin: 0; padding: .6rem; width: min(46rem, 100%); border-radius: 1.8rem; background: radial-gradient(circle at 50% 40%, #1d1660, #070520); }
/* The dotted line is one drawing behind the eight rows; every row is the same height so its points land on the planets. */
.sc-trail-line { position: absolute; inset: .6rem; width: calc(100% - 1.2rem); height: calc(100% - 1.2rem); pointer-events: none; }
.sc-trail-line path { fill: none; stroke: rgba(205, 191, 255, .5); stroke-width: 4; stroke-dasharray: 2 9; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.sc-trail li { position: relative; height: 11.5rem; }
.sc-trail a { position: absolute; inset: 0; color: #fff !important; text-decoration: none; }
/* The planet sits on the dotted line (20% from the left on odd rows, 80% on even rows) and its name is under it, away from the line. */
.sc-orb { position: absolute; top: 34%; left: 20%; translate: -50% -50%; display: grid; place-items: center; width: 7.4rem; height: 7.4rem; }
.sc-trail .even .sc-orb { left: 80%; }
.sc-words { position: absolute; top: 62%; left: 20%; translate: -50% 0; width: 40%; display: grid; gap: .1rem; text-align: center; }
.sc-trail .even .sc-words { left: 80%; }
.sc-orb .pl-img { width: 5.4rem; filter: drop-shadow(0 0 14px rgba(160, 140, 255, .45)); }
.sc-orb .pl-zuhal { width: 5.4rem; max-width: none; margin: 0; scale: 1.5; }
.sc-words b { font: 400 1.5rem/1.1 "Cherry Bomb One", Nunito, sans-serif; }
.sc-words small { color: #cdbfff; font-weight: 700; line-height: 1.2; }

.sc-game { box-sizing: border-box; position: relative; display: flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: .6rem 1rem; width: min(34rem, 100%); margin: 0 auto; padding: .9rem 1.1rem; border-radius: 1.8rem; border: 4px solid transparent; background: linear-gradient(120deg, #fbf7ff, #fff3fa) padding-box, linear-gradient(90deg, #ffd84d, #ff7ac8, #8fd0ff, #7dffb8, #ffd84d) border-box; color: #3b2490 !important; text-decoration: none; box-shadow: 0 5px 0 #e3d6fb, 0 14px 22px -12px rgba(75, 47, 163, .45); transition: transform .1s ease, box-shadow .1s ease; overflow: hidden; }
.sc-game:active { transform: translateY(3px); box-shadow: 0 2px 0 #e3d6fb; }
.sc-game-art { flex: none; display: block; }
.sc-game-art svg { display: block; overflow: visible; }
.sc-game .gp { transform-box: fill-box; transform-origin: center; animation: sc-bob 1.6s ease-in-out infinite; }
.sc-game .p2 { animation-delay: .15s; } .sc-game .p3 { animation-delay: .3s; } .sc-game .p4 { animation-delay: .45s; } .sc-game .p5 { animation-delay: .6s; }
@keyframes sc-bob { 50% { transform: translateY(-5px); } }
.sc-game-tx { flex: 1 1 11rem; display: grid; gap: .5rem; min-width: 0; text-align: left; }
.sc-game-tag { justify-self: start; padding: .1rem .6rem; border-radius: 999px; background: #efe6ff; color: #5a2db0; font-style: normal; font-size: .8rem; font-weight: 900; letter-spacing: .02em; }
.sc-game-tx b { font: 400 1.7rem/1.05 "Cherry Bomb One", Nunito, sans-serif; color: #4b2fa3; }
.sc-game-tx small { color: #6b5aa0; font-weight: 800; line-height: 1.25; }
.sc-game-go { flex: none; display: inline-flex; align-items: center; gap: .4rem; min-height: 3.2rem; padding: 0 1.4rem; border-radius: 999px; background: #ffd84d; color: #4b2fa3; font: 900 1.25rem/1 Nunito, sans-serif; box-shadow: 0 4px 0 #c99a12; animation: sc-game-pulse 1.4s ease-in-out infinite; }
.sc-game-go svg { display: block; }
@keyframes sc-game-pulse { 50% { transform: scale(1.07); } }
@media (max-width: 30rem) {
    /* On a phone the card is one slim row: the words on the left, the Main button on the right, no little planets. */
    .sc-game { flex-wrap: nowrap; gap: .6rem; padding: .6rem .7rem .6rem .9rem; border-radius: 1.4rem; }
    .sc-game-art { display: none; }
    .sc-game-tx { flex: 1 1 auto; gap: .3rem; }
    .sc-game-tag { font-size: .7rem; padding: 0 .5rem; }
    .sc-game-tx b { font-size: 1.3rem; }
    .sc-game-tx small { font-size: .78rem; }
    .sc-game-go { min-height: 2.6rem; padding: 0 1rem; font-size: 1.05rem; }
}
@media (prefers-reduced-motion: reduce) { .sc-game .gp, .sc-game-go { animation: none; } }

/* One planet */
.sc-stage { padding: 1.2rem 1.2rem 1.6rem; text-align: center; }
.sc-big { display: grid; place-items: center; margin: .4rem auto 1rem; width: min(16rem, 62%); }
.sc-big .pl-img { width: 100%; filter: drop-shadow(0 0 28px rgba(150, 130, 255, .35)); }
.sc-big .pl-zuhal { width: 100%; max-width: none; margin: 0; scale: 1.5; margin-block: 2rem; }
/* The listen buttons: the same round purple button as the header's sound switch; the big one is a white pill with the same button in it. */
.sc-say { display: inline-grid; place-items: center; flex: none; width: 3.2rem; height: 3.2rem; padding: 0; border: 0; border-radius: 50%; background: linear-gradient(180deg, #9a6df0, #7a4fe0); color: #fff; box-shadow: 0 4px 0 #5a2db0; cursor: pointer; transition: translate .1s; }
.sc-say:active { translate: 0 3px; box-shadow: 0 1px 0 #5a2db0; }
.sc-say:focus-visible { outline: 3px solid #ffd84d; outline-offset: 3px; }
.sc-say .spk { width: 1.6rem; height: 1.6rem; }
.sc-say.big { display: inline-flex; gap: .7rem; width: auto; height: 3.8rem; margin-top: 1rem; padding: 0 1.7rem 0 .55rem; border-radius: 999px; background: #fff; color: #3b2490; box-shadow: 0 5px 0 #c9b9f5; font: 900 1.25rem Nunito, sans-serif; }
.sc-say.big:active { box-shadow: 0 1px 0 #c9b9f5; }
.sc-say.big .ic { display: grid; place-items: center; width: 2.7rem; height: 2.7rem; border-radius: 50%; background: linear-gradient(180deg, #9a6df0, #7a4fe0); color: #fff; box-shadow: 0 3px 0 #5a2db0; }
.sc-say.speaking { background: linear-gradient(180deg, #5eead4, #10b981); box-shadow: 0 4px 0 #0b8a62; }
.sc-say.big.speaking { background: #fff; box-shadow: 0 5px 0 #c9b9f5; }
.sc-say.big.speaking .ic { background: linear-gradient(180deg, #5eead4, #10b981); box-shadow: 0 3px 0 #0b8a62; }
.sc-say.speaking .w1, .sc-say.speaking .w2 { animation: sc-wave .8s ease-in-out infinite; }
.sc-say.speaking .w2 { animation-delay: .25s; }
@keyframes sc-wave { 0%, 100% { opacity: .15; } 50% { opacity: 1; } }
/* Arrows at the sides of the planet: they say the planet can be swiped, and they work as buttons too. */
.sc-bigrow { position: relative; width: min(28rem, 100%); margin: .4rem auto 1rem; }
.sc-bigrow .sc-big { margin: 0 auto; }
.sc-arrow { position: absolute; top: 50%; translate: 0 -50%; display: grid; place-items: center; width: 3.4rem; height: 3.4rem; background: none; border: 0; color: #ffd54a !important; text-decoration: none; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .45)); transition: color .15s, scale .15s; }
.sc-arrow svg { width: 2.6rem; height: 2.6rem; stroke-width: 4; }
.sc-arrow:hover, .sc-arrow:focus-visible { color: #ffe27a !important; scale: 1.12; outline: none; }
.sc-arrow.prev { left: 0; animation: sc-nudge-l 2.4s ease-in-out infinite; }
.sc-arrow.next { right: 0; animation: sc-nudge-r 2.4s ease-in-out infinite; }
@keyframes sc-nudge-l { 0%, 70%, 100% { translate: 0 -50%; } 85% { translate: -.4rem -50%; } }
@keyframes sc-nudge-r { 0%, 70%, 100% { translate: 0 -50%; } 85% { translate: .4rem -50%; } }
@media (prefers-reduced-motion: reduce) { .sc-arrow, .sc-say .w1, .sc-say .w2 { animation: none !important; } }
.sc-facts { list-style: none; margin: 0; padding: 0; width: min(46rem, 100%); display: grid; gap: .8rem; }
.sc-facts li { display: flex; align-items: center; gap: .8rem; padding: .8rem 1rem; border-radius: 1.2rem; background: #fff; font-weight: 800; font-size: 1.1rem; color: #2b2350; box-shadow: 0 5px 0 #d9cffa; }
.sc-facts .t { flex: 1; }
.sc-inside { width: min(46rem, 100%); padding: 1.2rem; border-radius: 1.6rem; background: #fff; text-align: center; box-shadow: 0 6px 0 #d9cffa; }
.sc-inside h2 { margin: 0 0 .8rem; font-size: 1.3rem; font-weight: 900; color: #2b2350; }
.sc-cutwrap { position: relative; width: min(20rem, 82%); margin: 0 auto; }
.sc-cut { display: block; width: 100%; height: auto; margin: 0; filter: drop-shadow(0 10px 14px rgba(40, 20, 90, .35)); }
.sc-pin { position: absolute; left: 0; right: 0; height: 0; text-decoration: none; pointer-events: none; }
.sc-pin::before { content: ""; position: absolute; top: -1px; height: 2px; width: 50%; background: #fff; box-shadow: 0 0 0 1px rgba(30, 15, 80, .5); }
.sc-pin.l::before { left: 0; }
.sc-pin.r::before { left: 50%; }
.sc-pin::after { content: ""; position: absolute; left: 50%; top: 0; width: .8rem; height: .8rem; margin: -.4rem 0 0 -.4rem; border-radius: 50%; background: var(--c); border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(30, 15, 80, .55); }
.sc-pin span { position: absolute; top: 0; transform: translateY(-50%); pointer-events: auto; padding: .12rem .6rem; border-radius: 999px; background: #fff; color: #2b2350; font-size: .85rem; font-weight: 900; white-space: nowrap; box-shadow: 0 2px 0 rgba(30, 15, 80, .35); }
.sc-pin.l span { left: -.3rem; }
.sc-pin.r span { right: -.3rem; }
.sc-pin.on span { background: #4b2fa3; color: #fff; }
.sc-layers { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin: 1rem 0 .8rem; padding: 0; }
.sc-layers a { display: inline-flex; align-items: center; gap: .45rem; min-height: 2.6rem; padding: 0 1rem 0 .7rem; border-radius: 999px; background: #efe6ff; color: #4b2fa3 !important; font-weight: 900; text-decoration: none; }
.sc-layers a.on { background: #4b2fa3; color: #fff !important; }
.sc-layers i { width: 1.1rem; height: 1.1rem; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .2); }
.sc-layer { display: flex; align-items: center; gap: 1rem; padding: .9rem 1rem; border-radius: 1.2rem; background: #f6f1ff; text-align: left; }
.sc-layer > div { flex: 1; }
.sc-layer b { font-size: 1.2rem; font-weight: 900; color: #2b2350; }
.sc-layer p { margin: .2rem 0 0; font-weight: 700; color: #4a4170; }
.sc-pager { display: flex; justify-content: space-between; align-items: center; gap: 1rem; width: min(46rem, 100%); }
.sc-pager a { display: inline-grid; place-items: center; min-height: 3rem; padding: 0 1.4rem; border-radius: 999px; background: #fff; color: #4b2fa3 !important; font-weight: 900; text-decoration: none; box-shadow: 0 4px 0 #d9cffa; }
.sc-pager a.next { background: #4b2fa3; color: #fff !important; box-shadow: 0 4px 0 #2f1c75; }

/* Order the planets */
.sc-slots { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: .35rem; width: min(46rem, 100%); padding: .7rem; border-radius: 1.4rem; background: #161047; }
.sc-slot { display: grid; place-items: center; aspect-ratio: 1; overflow: hidden; border-radius: .9rem; border: 3px dashed #9d8ff0; background: rgba(255, 255, 255, .07); color: #cdbfff; font-weight: 900; }
.sc-slot .pl-img { width: 82%; }
.sc-slot .pl-zuhal { width: 82%; max-width: none; margin: 0; scale: 1.5; }
.sc-slot.sun { border: 0; background: none; overflow: visible; }
.sc-slot.sun .pl-img { width: 100%; }
.sc-slot.full { border-style: solid; border-color: #6ee7b7; background: rgba(110, 231, 183, .14); }
.sc-slot.full { position: relative; }
.sc-slot.full .pl-img, .sc-slot.full .pl-zuhal { width: 64%; translate: 0 -.5rem; }
.sc-slot.full .pl-zuhal { scale: 1.5; }
.sc-slot.full b { position: absolute; left: .15rem; right: .15rem; bottom: .2rem; padding: .05rem 0; border-radius: 999px; background: #fff; color: #4b2fa3; font: 900 .62rem/1.3 Nunito, sans-serif; text-align: center; overflow: hidden; text-overflow: ellipsis; }
.sc-slot.next { border-color: #ffd84d; color: #ffd84d; animation: sc-pulse 1.4s ease-in-out infinite; }
@keyframes sc-pulse { 50% { background: rgba(255, 216, 77, .22); } }
@media (prefers-reduced-motion: reduce) { .sc-slot.next { animation: none; } }
.sc-bank { list-style: none; margin: 0; padding: 0; width: min(46rem, 100%); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .9rem; }
.sc-bank .sc-space { height: 5.6rem; }
.sc-bank .sc-space .pl-img { width: 4rem; }
.sc-bank .sc-space .pl-zuhal { width: 4rem; }
.sc-bank b { font-size: 1.05rem; }
.sc-pick.bad { box-shadow: 0 6px 0 #f08a8a, 0 0 0 4px #f56565; }
.sc-try { margin: 0; font-size: 1.3rem; font-weight: 900; color: #c53030; }
.sc-won { justify-content: center; }
.sc-end { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; }
@media (max-width: 520px) { .sc-bank { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Order the planets, filling the page as one night sky: slots on an arc, planets floating with a name pill, the owl giving a hint */
.sc-order { width: min(46rem, 100%); min-height: calc(100svh - 9rem); margin-inline: auto; padding: 1rem 1rem 1.6rem; align-content: start; border-radius: 1.8rem; color: #fff;
    background:
        radial-gradient(1.5px 1.5px at 12% 22%, #fff, transparent), radial-gradient(1px 1px at 34% 68%, #fff, transparent), radial-gradient(1.5px 1.5px at 58% 14%, #fff, transparent),
        radial-gradient(1px 1px at 78% 46%, #fff, transparent), radial-gradient(1.5px 1.5px at 90% 80%, #fff, transparent), radial-gradient(1px 1px at 22% 90%, #fff, transparent),
        radial-gradient(1px 1px at 66% 84%, #fff, transparent), radial-gradient(circle at 80% 10%, #4a36a8, #150f4a 55%, #0b0730); }
.sc-order .hm-back { justify-self: start; }
.sc-order .sc-sky { background: none; box-shadow: none; padding: .2rem 0 0; text-align: center; overflow: visible; }
.sc-order .sc-sky p { display: inline-block; margin-top: 1.1rem; padding: .35rem 1rem; border-radius: 999px; background: #fff3c2; color: #5a3d00; }
.sc-order .sc-slots { gap: .3rem; padding: 0 0 1.6rem; background: none; }
.sc-order .sc-slot { border-radius: .8rem; }
.sc-order .sc-slot:nth-child(1), .sc-order .sc-slot:nth-child(9) { translate: 0 1.2rem; }
.sc-order .sc-slot:nth-child(2), .sc-order .sc-slot:nth-child(8) { translate: 0 .8rem; }
.sc-order .sc-slot:nth-child(3), .sc-order .sc-slot:nth-child(7) { translate: 0 .35rem; }
.sc-order .sc-slot:nth-child(5) { translate: 0 -.2rem; }
.sc-order .sc-slot.sun { translate: 0 .4rem; }
.sc-order .sc-bank { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem .6rem; }
@media (min-width: 560px) { .sc-order .sc-bank { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.sc-order .sc-pick { padding: .2rem; background: none; box-shadow: none; color: #fff !important; gap: .5rem; }
.sc-order .sc-pick:hover { translate: 0 -4px; }
.sc-order .sc-space { height: 6.4rem; overflow: visible; background: none; }
.sc-order .sc-bank .sc-space .pl-img, .sc-order .sc-bank .sc-space .pl-zuhal { width: 4.6rem; }
.sc-order .sc-pick b { margin: 0; padding: .2rem .9rem; border-radius: 999px; background: #fff; color: #4b2fa3; font-size: 1rem; }
.sc-order .sc-pick.bad { box-shadow: none; }
.sc-order .sc-pick.bad b { background: #f56565; color: #fff; }
.sc-order .sc-pick.bad .sc-space { animation: sc-shake .4s; }
@keyframes sc-shake { 25% { translate: -6px 0; } 75% { translate: 6px 0; } }
.sc-order .sc-try { padding: .45rem 1.6rem; border-radius: 999px; background: #ff4d6d; color: #fff; font-size: 1.6rem; text-align: center; box-shadow: 0 4px 0 #b3203f, 0 0 0 3px #fff; animation: sc-shake .4s; }
@media (prefers-reduced-motion: reduce) { .sc-order .sc-try { animation: none; } }
.sc-owl { display: flex; align-items: center; gap: 1rem; width: 100%; margin: 1.6rem 0 0; padding: 1rem 1.3rem; border: 4px solid transparent; border-radius: 1.4rem; background: linear-gradient(#fff, #fff) padding-box, linear-gradient(90deg, #ffd84d, #ff7ac8, #8fd0ff, #7dffb8, #ffd84d) border-box; color: #4b2fa3; font-weight: 900; box-shadow: 0 5px 0 #e3d6fb, 0 10px 16px -10px rgba(0, 0, 0, .5); opacity: 1; }
.sc-owl i { font-style: normal; font-size: 2.4rem; line-height: 1; }
@media (prefers-reduced-motion: reduce) { .sc-order .sc-pick.bad .sc-space { animation: none; } }

/* The child's stars, in the header next to the name */
.rd-stars-pill { display: inline-flex; align-items: center; gap: .35rem; flex: none; height: 3rem; padding: 0 1rem 0 .65rem; border-radius: 999px; background: linear-gradient(180deg, #3a2a8c, #241a5c); box-shadow: 0 4px 0 #120b3a, inset 0 0 0 2px rgba(255, 216, 77, .55); color: #fff; font-weight: 900; font-size: 1.25rem; line-height: 1; }
.rd-stars-pill i { font-style: normal; font-size: 1.5rem; filter: drop-shadow(0 0 6px rgba(255, 216, 77, .8)); }
.rd-stars-pill.pop { animation: rd-star-pop .7s ease-out; }
@keyframes rd-star-pop { 30% { scale: 1.3; rotate: -6deg; } 60% { scale: .95; rotate: 4deg; } }
@media (prefers-reduced-motion: reduce) { .rd-stars-pill.pop { animation: none; } }
@media (max-width: 600px) { .rd-stars-pill { height: 2.6rem; padding: 0 .7rem 0 .45rem; font-size: 1.05rem; } .rd-stars-pill i { font-size: 1.25rem; } }

/* "+N stars" on the end screens */
.rd-gain { display: inline-flex; align-items: center; gap: .4rem; margin: .3rem auto; padding: .45rem 1.2rem; border-radius: 999px; background: #fff6d6; border: 3px dashed #ffc83d; color: #8a5a00; font-weight: 900; font-size: 1.5rem; }
.rd-gain[hidden] { display: none; }
.rd-gain:not([hidden]) { animation: rd-gain-in .5s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes rd-gain-in { from { transform: scale(.4); opacity: 0; } }
.rd-fly { position: fixed; left: 0; top: 0; z-index: 90; width: 30px; height: 30px; pointer-events: none; filter: drop-shadow(0 0 8px rgba(255, 216, 77, .9)); will-change: transform; }
.rd-fly svg { display: block; }
@media (prefers-reduced-motion: reduce) { .rd-gain:not([hidden]) { animation: none; } }
.mg-stars.five { font-size: 2.6rem; }

/* Science topics: cards tinted in each topic's colour, a glowing round icon, the name, a line about it and a button inside the card. The two
   open topics have a yellow frame; the coming-soon ones are paler. Every card is the same size, the cards are a little tilted and kept well
   apart (the tilt is small enough never to touch the next card). Two columns on a phone, three from 40rem. */
.sc-topics { list-style: none; margin: 0; padding: .4rem .3rem; width: min(46rem, 100%); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 1.5rem 1.2rem; }
@media (min-width: 40rem) { .sc-topics { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem 1.4rem; } }
.sc-topics li { display: grid; rotate: -1.2deg; }
.sc-topics li:nth-child(even) { rotate: 1deg; }
.sc-topics li:nth-child(3n) { rotate: -.8deg; }
.sc-topic { position: relative; display: grid; grid-template-rows: auto auto 1fr auto; /* the description row takes the slack so every button sits at the same height */ align-content: stretch; justify-items: center; gap: .25rem; padding: 1rem .6rem 1rem; border: .3rem solid #fff; border-radius: 2rem; background: radial-gradient(circle at 50% 0, color-mix(in srgb, var(--tc) 30%, #fff), color-mix(in srgb, var(--tc) 14%, #fff) 70%); color: #2b2350 !important; text-align: center; text-decoration: none; box-shadow: 0 6px 0 color-mix(in srgb, var(--tc) 70%, #000), 0 12px 18px -10px rgba(40, 20, 100, .55); transition: translate .12s; }
.sc-topic::before, .sc-topic::after { content: "✦"; position: absolute; color: var(--tc); opacity: .7; pointer-events: none; }
.sc-topic::before { left: .7rem; top: .6rem; font-size: 1rem; }
.sc-topic::after { right: .8rem; top: 2.2rem; font-size: .8rem; }
.sc-topic.open { outline: .25rem solid #ffd84d; outline-offset: .15rem; }
.sc-topic.open:hover, .sc-topic.open:focus-visible { translate: 0 -3px; }
.sc-ti { display: grid; place-items: center; width: 5rem; height: 5rem; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, color-mix(in srgb, var(--tc) 35%, #fff)); box-shadow: 0 0 0 .3rem color-mix(in srgb, var(--tc) 55%, #fff), 0 0 18px color-mix(in srgb, var(--tc) 70%, #fff); font-size: 2.9rem; }
.sc-topic b { margin-top: .4rem; color: color-mix(in srgb, var(--tc) 85%, #000); font: 400 1.6rem/1.1 "Cherry Bomb One", Nunito, sans-serif; }
.sc-topic small { align-self: start; color: #5f4f90; font-weight: 800; font-size: .76rem; line-height: 1.25; }
.sc-topic em { margin-top: .5rem; padding: .35rem 1.1rem; border-radius: 999px; background: linear-gradient(var(--tc), color-mix(in srgb, var(--tc) 70%, #000)); color: #fff; font-style: normal; font-weight: 900; font-size: .95rem; white-space: nowrap; box-shadow: 0 3px 0 rgba(0, 0, 0, .25); }
.sc-topic.soon { filter: saturate(.6); }
.sc-topic.soon em { background: #fff; color: #7a6aa8; box-shadow: 0 3px 0 #d9d2f2; }
.sc-one { touch-action: pan-y; }

/* DuitNow QR: choosing it at checkout, and the page where the buyer scans, pays and sends the receipt. */
.pm-group { display: grid; gap: .6rem; margin-top: .25rem; }
.pm-head { margin-top: .5rem; font-size: .8rem; font-weight: 900; letter-spacing: .05em; color: var(--rd-ink-soft); }
.pm-opt { display: flex; align-items: center; gap: 1rem; width: 100%; text-align: left; font: inherit; color: inherit; padding: .9rem 1.1rem; border: 2px solid var(--rd-line); border-radius: 1.25rem; background: #fffdf8; cursor: pointer; }
.pm-opt.sel { border-color: var(--rd-grape); background: #f6f0ff; box-shadow: 0 0 0 3px #e4d6ff; }
.pm-rb { flex: none; display: grid; place-items: center; width: 1.4rem; height: 1.4rem; border-radius: 50%; border: 2px solid #b9aedd; }
.pm-opt.sel .pm-rb { border-color: var(--rd-grape); }
.pm-opt.sel .pm-rb::after { content: ""; width: .7rem; height: .7rem; border-radius: 50%; background: var(--rd-grape); }
.pm-tx { flex: 1; min-width: 0; display: grid; gap: .15rem; }
.pm-tx strong { font-size: 1.05rem; }
.pm-tx span { font-size: .9rem; color: var(--rd-ink-soft); }
.pm-tag { flex: none; font-size: .75rem; font-weight: 900; padding: .2rem .65rem; border-radius: 999px; background: #e3f6ec; color: #17794a; }
.pm-tag-manual { background: #fff0c9; color: #8a5a00; }
/* On phones the option becomes two columns: the radio, then the text with the badge on its own line under it, so the
   badge no longer squeezes the text into a narrow strip. */
@media (max-width: 600px) {
    .pm-opt { display: grid; grid-template-columns: 1.4rem minmax(0, 1fr); align-items: start; gap: .35rem .8rem; padding: .85rem 1rem; }
    .pm-rb { margin-top: .15rem; }
    .pm-tag { grid-column: 2; justify-self: start; white-space: normal; }
    .pm-tx strong { font-size: 1rem; }
    .pm-head { font-size: .72rem; }
}
/* Small phones: tighter checkout cards and steps that fit on one line (only the current step keeps its label). */
@media (max-width: 600px) {
    .ck-card { padding: 1.15rem 1rem; border-radius: 1.4rem; }
    .ck-steps { flex-wrap: nowrap; gap: .5rem; font-size: .85rem; margin-bottom: 1rem; }
    .ck-steps li { gap: .35rem; white-space: nowrap; }
    .ck-steps li:not(:last-child)::after { content: ""; width: 1rem; height: 2px; margin-left: .15rem; background: var(--rd-line); }
    .ck-steps li:not(.now) { font-size: 0; gap: 0; }
    .ck-steps li:not(.now) .ck-dot { font-size: .8rem; }
    .ck-steps li:not(.now):not(:last-child)::after { margin-left: .5rem; }
    .ck-dot { width: 1.6rem; height: 1.6rem; }
    .ck-methods { grid-template-columns: minmax(0, 1fr); gap: .6rem; }
    .ck-method { grid-template-columns: 2.75rem minmax(0, 1fr); align-items: center; column-gap: .8rem; }
    .ck-method > :not(.ck-ico) { grid-column: 2; }
    .ck-method .ck-ico { grid-row: 1 / span 2; }
}
.ck-pay-manual { background: linear-gradient(135deg, #8a4fe0, #5b6cf0); box-shadow: 0 5px 0 #4a2db0; color: #fff; }
.dn-box { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.dn-qr { border: 2px dashed #c9b8f2; border-radius: 1.25rem; padding: .8rem; text-align: center; background: #fff; display: grid; gap: .35rem; justify-items: center; }
.dn-qr img { width: 100%; height: auto; image-rendering: pixelated; }
.dn-qr strong { font-size: 1.5rem; }
.dn-qr small { color: var(--rd-ink-soft); font-weight: 700; overflow-wrap: anywhere; }
.dn-badge { display: inline-block; background: #e6007e; color: #fff; font-weight: 900; border-radius: .4rem; padding: .1rem .5rem; font-size: .8rem; }
.dn-steps { display: grid; gap: .9rem; margin: 0; padding: 0; list-style: none; counter-reset: dn; }
.dn-steps > li { display: grid; grid-template-columns: 2rem minmax(0, 1fr); gap: .7rem; }
.dn-steps > li::before { counter-increment: dn; content: counter(dn); display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--rd-grape); color: #fff; font-weight: 900; }
.dn-ref { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-top: .4rem; padding: .7rem 1rem; background: #fff7d6; border: 2px dashed #e6b800; border-radius: 1rem; font-weight: 900; font-size: 1.3rem; letter-spacing: .04em; }
.dn-ref button { border: 0; border-radius: .7rem; background: #fff; padding: .35rem .8rem; font: inherit; font-size: .85rem; font-weight: 900; cursor: pointer; }
.dn-send { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .6rem; }
.dn-btn { display: inline-flex; align-items: center; min-height: 3rem; padding: 0 1.1rem; border-radius: 999px; font-weight: 900; color: #fff !important; text-decoration: none; overflow-wrap: anywhere; }
.dn-wa { background: #1fa855; }
.dn-em { background: #5b6cf0; }
.dn-warn { margin: 1rem 0 0; padding: .8rem 1rem; border-radius: 1rem; background: #eef5ff; color: #2c4a8a; font-size: .92rem; }
.dn-wait { display: flex; align-items: center; gap: .6rem; margin: 0; padding: .8rem 1rem; border-radius: 1rem; background: #fff7d6; font-weight: 800; }
@media (max-width: 640px) { .dn-box { grid-template-columns: 1fr; } .dn-qr { max-width: 18rem; margin: 0 auto; } }

/* Install-the-app buttons (components InstallButtons and InstallApp). Both buttons are one fixed size so neither looks bigger.
   Hidden once the app runs installed (display-mode) or the browser reported it installed. */
.app-install { display: grid; grid-template-columns: repeat(2, minmax(0, 11.25rem)); gap: .6rem; justify-content: center; }
.app-install-btn { display: flex; align-items: center; justify-content: center; gap: .55rem; box-sizing: border-box; width: 100%; min-width: 0; height: 3.5rem; padding: 0 .9rem 0 .75rem; border-radius: 999px; border: 3px solid transparent; background: linear-gradient(#140a45, #140a45) padding-box, linear-gradient(90deg,#ffe36b,#ff7ac8,#8fd0ff,#7dffb8,#ffe36b) border-box; color: #fff; box-shadow: 0 0 14px rgba(255, 150, 255, .45); text-decoration: none; white-space: nowrap; text-align: left; transition: transform .15s, box-shadow .15s; }
.app-install-btn:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 0 20px rgba(255, 150, 255, .7); }
.app-install-btn svg { width: 1.6rem; height: 1.6rem; flex: none; fill: #fff; }
.app-install-btn.ios svg { fill: #fff; }
.app-install-btn small { display: block; font-size: .62rem; line-height: 1.1; opacity: .85; font-weight: 800; }
.app-install-btn b { display: block; font-size: .98rem; line-height: 1.15; font-weight: 900; }
@media (max-width: 26rem) { .app-install { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (display-mode: standalone) { .app-install, .inst-lead, .inst-grid { display: none; } }
.app-installed .app-install { display: none; }

/* The install page (InstallApp): bright cream ground, the owl on its yellow app tile, two white step cards. */
/* No box of its own: just the reader's background and the content, small enough to fit one screen without scrolling. */
.inst { display: flex; flex-direction: column; gap: .7rem; padding: .25rem 1rem .75rem; color: #1b1640; }
.inst-hero { display: flex; flex-direction: column; align-items: center; gap: .35rem; text-align: center; }
.inst-tile { display: grid; place-items: center; width: 4rem; height: 4rem; border-radius: 1.2rem; background: #ffd54a; box-shadow: 0 .3rem 0 #e0a800, 0 0 0 .3rem #fff; }
.inst-tile img { width: 2.8rem; height: auto; }
.inst-hero h1 { margin: calc(10px - .05rem) 0 0; font-size: clamp(1.6rem, 5vw, 2.2rem); line-height: 1.05; font-weight: 900; color: #1b1640; }
.inst-lead { margin: 0; max-width: 35rem; font-size: 1rem; line-height: 1.4; font-weight: 600; color: #4a4370; }
.inst-done { display: none; align-items: center; gap: .6rem; margin: .25rem 0 0; padding: .6rem 1.1rem; border-radius: 999px; background: #dcfce7; color: #14532d; font-weight: 800; }
@media (display-mode: standalone) { .inst-done { display: inline-flex; } }
.app-installed .inst-done { display: inline-flex; }
.inst-now { display: none; min-width: min(21rem, 100%); min-height: 3.75rem; margin-top: .4rem; border: 0; border-radius: 999px; background: linear-gradient(180deg, #a855f7, #7c3aed); box-shadow: 0 6px 0 #5b21b6; color: #fff; font: inherit; font-size: 1.25rem; font-weight: 900; cursor: pointer; }
.inst-now:active { transform: translateY(2px); box-shadow: 0 4px 0 #5b21b6; }
.inst-now:focus-visible { outline: 3px solid #f59e0b; outline-offset: 3px; }
.can-install .inst-now { display: block; }
.inst-grid { width: min(30rem, 100%); margin: 1.25rem auto 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: .7rem; }
.inst-card { display: flex; flex-direction: column; gap: 1rem; background: #fff; border: 2px solid #f3ead0; border-radius: 1.4rem; padding: 1.1rem 1.3rem 1.25rem; box-shadow: 0 5px 0 #f0e2b6; }
.inst-card-head { display: flex; align-items: center; gap: .75rem; }
.inst-card-head h2 { margin: 0; font-size: 1.25rem; font-weight: 900; color: #1b1640; }
.inst-card-head p { margin: 0; font-size: .9rem; font-weight: 700; color: #5b5480; }
.inst-icon { display: grid; place-items: center; flex: none; width: 2.6rem; height: 2.6rem; border-radius: .8rem; }
.inst-icon svg { width: 1.5rem; height: 1.5rem; }
.inst-icon-android { background: #e3f9ec; }
.inst-icon-ios { background: #e4f1ff; }
.inst-steps { counter-reset: inst; margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 1rem; }
.inst-steps > li { counter-increment: inst; display: flex; gap: .65rem; align-items: flex-start; font-size: .95rem; line-height: 1.35; font-weight: 700; }
.inst-steps > li > span { padding-top: .15rem; }
.inst-steps > li::before { content: counter(inst); display: grid; place-items: center; flex: none; width: 1.8rem; height: 1.8rem; border-radius: 50%; background: #7c3aed; color: #fff; font-weight: 900; }
.inst-key { display: inline-grid; place-items: center; min-width: 1.6rem; height: 1.6rem; border-radius: .5rem; background: #f1edf9; font-weight: 900; vertical-align: middle; }
@media (display-mode: standalone) { .inst-grid, .inst-pick { display: none; } }
/* One kind of device at a time: the two choices when none was asked for, and the pictures that show where to tap. */
.inst-pick { margin-top: 1.25rem; display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; }
.inst-choice { display: grid; justify-items: center; gap: .3rem; width: min(12.5rem, 44%); min-width: 9rem; padding: 1.2rem .8rem; border: 2px solid #f3ead0; border-radius: 1.4rem; background: #fff; color: #1b1640 !important; text-decoration: none; box-shadow: 0 5px 0 #e7dcb8; }
.inst-choice b { font-size: 1.15rem; font-weight: 900; } .inst-choice small { font-weight: 700; color: #5b5480; }
.inst-choice:active { transform: translateY(2px); box-shadow: 0 3px 0 #e7dcb8; }
.inst-steps-more { margin-top: -.1rem; }
.inst-steps-more > li::before { content: attr(data-n); }
.inst-pic { position: relative; margin: .1rem 0 .1rem 2.45rem; min-height: 6.5rem; border: 2px solid #e4def5; border-radius: 1rem; background: #f4f1fd; overflow: hidden; font-size: .85rem; font-weight: 700; color: #3b3560; }
.inst-hl { outline: 3px solid #ff4d6d; outline-offset: 1px; border-radius: .6rem; background: #ffe9ee; }
.inst-chrome { height: 2.2rem; background: #e8eaed; border-bottom: 1px solid #cfd2d6; }
.inst-dots { position: absolute; right: .5rem; top: .15rem; padding: 0 .55rem; font-size: 1.2rem; line-height: 1.7rem; }
.inst-menu { position: absolute; right: .5rem; top: 2.5rem; display: grid; width: min(15rem, 80%); border-radius: .7rem; background: #fff; box-shadow: 0 4px 12px rgba(0, 0, 0, .25); }
.inst-menu > span { padding: .45rem .7rem; }
.inst-arrow { position: absolute; color: #ff4d6d; font-size: 2.2rem; line-height: 1; animation: inst-bob 1s ease-in-out infinite; }
.inst-arrow-up { right: 3.2rem; top: 1.6rem; }
.inst-arrow-down { left: 50%; bottom: 3.6rem; margin-left: -4.6rem; }
@keyframes inst-bob { 50% { translate: 0 .35rem; } }
.inst-pic-safari { min-height: 8rem; }
.inst-url { display: block; margin: .6rem 1rem; color: #6b6590; }
.inst-tabbar { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-around; align-items: center; height: 3.2rem; background: #f2f2f7; border-top: 1px solid #cfd2d6; font-size: 1.4rem; }
.inst-tabbar .inst-hl { display: grid; place-items: center; padding: .15rem .7rem; color: #007aff; }
.inst-pic-sheet { display: grid; gap: .2rem; padding: .6rem .8rem; min-height: 0; }
.inst-pic-sheet > span { padding: .35rem .6rem; }
.inst-warn { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; padding: .7rem .9rem; border-radius: 1rem; background: #fff3cd; color: #5c4400; font-weight: 800; font-size: .92rem; }
.inst-warn[hidden] { display: none; }
.inst-warn button { padding: .45rem 1rem; border: 0; border-radius: 999px; background: #7c3aed; color: #fff; font: inherit; font-weight: 900; }
@media (prefers-reduced-motion: reduce) { .inst-arrow { animation: none; } }
/* Account security (AccountSecurity, design C): title, a two-part summary card, settings-style rows. */
.rd-sec-ok { margin: 0 0 1.25rem; padding: .8rem 1.1rem; border-radius: 1rem; background: #dcfce7; color: #14532d; font-weight: 800; }
.rd-sec-form { display: flex; flex-direction: column; gap: .4rem; max-width: 26rem; }
.rd-sec-form label { margin-top: .6rem; font-weight: 800; }
.rd-sec-form input { min-height: 3rem; padding: 0 1rem; border: 2px solid #e9d5ff; border-radius: 999px; background: #fff; font: inherit; color: var(--rd-ink); }
.rd-sec-form input:focus-visible { outline: 3px solid #a78bfa; outline-offset: 1px; }
.rd-sec-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.1rem; }
.rd-sec-btn { min-height: 3.2rem; padding: 0 1.6rem; border: 0; border-radius: 999px; background: linear-gradient(180deg, #a855f7, #7c3aed); box-shadow: 0 5px 0 #5b21b6; color: #fff; font: inherit; font-weight: 900; cursor: pointer; }
.rd-sec-btn:active { transform: translateY(2px); box-shadow: 0 3px 0 #5b21b6; }
.rd-sec-btn:focus-visible { outline: 3px solid #f59e0b; outline-offset: 3px; }
.rd-sc { display: flex; flex-direction: column; gap: 1.5rem; max-width: 46rem; margin: 0 auto; }
.rd-sc-head h1 { margin: 0; font-size: clamp(1.9rem, 5vw, 2.4rem); font-weight: 900; letter-spacing: -.01em; }
.rd-sc-head p { margin: .3rem 0 0; font-size: 1.05rem; font-weight: 600; color: var(--rd-ink-soft); }
.rd-sc-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); background: #fff; border: 2px solid #f3ead0; border-radius: 1.4rem; }
.rd-sc-summary > div { display: flex; align-items: center; gap: .85rem; padding: 1.1rem 1.35rem; min-width: 0; }
.rd-sc-summary > div + div { border-left: 2px solid #f6efdb; }
.rd-sc-stat { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.rd-sc-stat small { font-size: .8rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--rd-ink-soft); }
.rd-sc-stat b { display: flex; align-items: center; gap: .5rem; font-size: 1.05rem; font-weight: 900; }
.rd-sc-dot { flex: none; width: .55rem; height: .55rem; border-radius: 50%; background: #16a34a; }
.rd-sc-dot-off { background: #d6cfe6; }
.rd-sc-ico { display: grid; place-items: center; flex: none; width: 2.9rem; height: 2.9rem; border-radius: .8rem; }
.rd-sc-ico-grape { background: #ede4ff; color: #6d28d9; }
.rd-sc-ico-green { background: #e3f9ec; color: #16a34a; }
.rd-sc-group { display: flex; flex-direction: column; gap: .6rem; }
.rd-sc-group h2 { margin: 0 0 0 .75rem; font-size: .9rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: #6d28d9; }
.rd-sc-card { overflow: hidden; background: #fff; border: 2px solid #f3ead0; border-radius: 1.6rem; }
.rd-sc-card > * + * { border-top: 2px solid #f6efdb; }
.rd-sc-card form { margin: 0; }
.rd-sc-row { display: flex; align-items: center; gap: 1rem; box-sizing: border-box; width: 100%; min-height: 4.75rem; padding: .6rem 1.35rem; border: 0; background: none; color: var(--rd-ink) !important; font: inherit; text-align: left; text-decoration: none !important; }
a.rd-sc-row:hover, button.rd-sc-row:hover { background: #fdfaf1; }
a.rd-sc-row:focus-visible, button.rd-sc-row:focus-visible { outline: 3px solid #a78bfa; outline-offset: -3px; }
button.rd-sc-row { cursor: pointer; }
.rd-sc-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rd-sc-text b { font-size: 1.15rem; font-weight: 900; }
.rd-sc-text small { font-size: .9rem; font-weight: 700; color: var(--rd-ink-soft); }
.rd-sc-chev { flex: none; width: 1.4rem; height: 1.4rem; fill: none; stroke: #a79fc7; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.rd-sc-open .rd-sc-chev { transform: rotate(90deg); }
.rd-sc-add .rd-sc-text b { color: #6d28d9; }
.rd-sc-plus { display: grid; place-items: center; flex: none; width: 2.9rem; height: 2.9rem; border-radius: 50%; background: #7c3aed; }
.rd-sc-plus svg { width: 1.4rem; height: 1.4rem; fill: none; stroke: #fff; stroke-width: 2.8; stroke-linecap: round; }
.rd-sc-remove { min-height: 44px; padding: 0 1.1rem; border: 2px solid #fecdd3; border-radius: 999px; background: #fff; color: #be123c; font: inherit; font-weight: 800; cursor: pointer; }
.rd-sc-remove:hover { background: #fff1f2; }
.rd-sc-body { padding: 1.1rem 1.35rem 1.4rem; }
.rd-sc-body .rd-sec-form { max-width: 28rem; }
.rd-sc-meter { margin-top: .4rem; }
.rd-sc-tip { margin: .2rem .75rem 0; font-size: .95rem; font-weight: 700; color: var(--rd-ink-soft); }
.rd-sc-back { align-self: center; display: inline-flex; align-items: center; gap: .45rem; min-height: 48px; padding: 0 1.6rem; border-radius: 999px; background: #fff; border: 2px solid #e9d5ff; box-shadow: 0 3px 0 #e9d5ff; color: #4c1d95 !important; font-weight: 800; text-decoration: none !important; }
.rd-sc-back svg { fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 34rem) {
    .rd-sc-summary { grid-template-columns: 1fr; }
    .rd-sc-summary > div + div { border-left: 0; border-top: 2px solid #f6efdb; }
}

/* A few small stars behind the planet on its page. */
.sc-stage::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; animation: sc-twinkle 4s ease-in-out infinite alternate;
    background-image:
        radial-gradient(1.6px 1.6px at 8% 14%, #fff 60%, transparent 62%), radial-gradient(1.2px 1.2px at 21% 36%, #cdbfff 60%, transparent 62%),
        radial-gradient(2px 2px at 33% 9%, #ffe27a 60%, transparent 62%), radial-gradient(1.2px 1.2px at 44% 24%, #fff 60%, transparent 62%),
        radial-gradient(1.6px 1.6px at 57% 12%, #fff 60%, transparent 62%), radial-gradient(1.2px 1.2px at 69% 31%, #cdbfff 60%, transparent 62%),
        radial-gradient(2px 2px at 82% 8%, #fff 60%, transparent 62%), radial-gradient(1.6px 1.6px at 91% 27%, #ffe27a 60%, transparent 62%),
        radial-gradient(1.2px 1.2px at 12% 58%, #fff 60%, transparent 62%), radial-gradient(1.6px 1.6px at 90% 52%, #fff 60%, transparent 62%),
        radial-gradient(1.2px 1.2px at 6% 78%, #cdbfff 60%, transparent 62%), radial-gradient(2px 2px at 27% 88%, #fff 60%, transparent 62%),
        radial-gradient(1.2px 1.2px at 63% 84%, #ffe27a 60%, transparent 62%), radial-gradient(1.6px 1.6px at 78% 74%, #fff 60%, transparent 62%),
        radial-gradient(1.2px 1.2px at 94% 90%, #cdbfff 60%, transparent 62%), radial-gradient(1.6px 1.6px at 48% 94%, #fff 60%, transparent 62%); }
.sc-stage > * { position: relative; z-index: 1; }
@keyframes sc-twinkle { from { opacity: .55; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sc-stage::before { animation: none; } }

/* Science, the body ("Doktor Kecil"): the body that is cut open with a scalpel, the organ card with its turntable and the doctor's game. */
.bd { display: grid; justify-items: center; gap: 1.5rem; width: min(60rem, 100%); margin-inline: auto; }
/* Calm page: a slim title row, one line of help, the body. The side panel (organ card, game) only appears once the body is open, and the name pins on the body replace the row of organ buttons, which stay only as the no-script fallback. */
.sc.bd { justify-items: center; }
.sc.bd > .hm-back { justify-self: start; }
.bd-sky { width: min(46rem, 100%); box-sizing: border-box; padding: 2.2rem min(10rem, 38%) 2.2rem 1.6rem; display: grid; align-content: center; }
.bd-sky .bd-hint { margin: .5rem 0 0; padding: 0; border-radius: 0; background: none; box-shadow: none; color: #cdbfff; text-align: left; font-weight: 800; }
/* Not outer space: a soft blood pink, with the title in deep crimson. */
.sc-sky.bd-sky { background: radial-gradient(circle at 85% 20%, #fff5f7 0, rgba(255, 245, 247, 0) 45%), linear-gradient(135deg, #ffe0e8, #ffb8cb 60%, #ff97b3); color: #7a1736; box-shadow: 0 14px 24px -14px rgba(160, 30, 70, .55); }
.sc-sky.bd-sky h1 { color: #7a1736; }
.sc-sky.bd-sky .bd-hint { color: #a3274e; }
.sc-sky.bd-sky .sc-star { color: #fff; opacity: .95; }
.bd-sky::after { content: "✚"; position: absolute; left: 62%; top: 14%; color: rgba(255, 255, 255, .75); font-size: 1.6rem; pointer-events: none; }
.bd-sky-pic { position: absolute; right: 1.2rem; top: 50%; translate: 0 -50%; width: min(7.8rem, 30%); aspect-ratio: 1; background: url("body/jantung.webp") no-repeat 0 0 / 1200% 100%; filter: drop-shadow(0 6px 8px rgba(122, 23, 54, .4)); pointer-events: none; }
.bd-top { width: 100%; display: flex; align-items: center; gap: 1rem; }
.bd-top h1 { margin: 0; color: #3b2490; font: 400 2rem/1 "Cherry Bomb One", Nunito, sans-serif; }
.bd-hint { margin: 0; padding: .55rem 1.2rem; border-radius: 999px; background: #fff; color: #4b2fa3; font-weight: 900; text-align: center; box-shadow: 0 3px 0 #d9cffa; }
[data-bd-ready]:not(.bd-opened) .bd-side, [data-bd-ready] .bd-chips { display: none; }
.bd-main { display: grid; grid-template-columns: auto; justify-content: center; gap: 1.4rem; width: 100%; align-items: start; }
.bd-opened .bd-main { grid-template-columns: auto minmax(0, 1fr); justify-content: stretch; }
.bd-stage { position: relative; height: min(calc(100svh - 19rem), 50rem); max-width: 100%; aspect-ratio: 1000 / 1369; border-radius: 1.8rem; overflow: hidden; background: #bfe0e8; touch-action: none; user-select: none; -webkit-user-select: none; box-shadow: 0 14px 24px -14px rgba(20, 10, 60, .8); cursor: crosshair; }
.bd-opened .bd-stage { touch-action: pan-y; cursor: pointer; }
.bd-svg, .bd-glow { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.bd-glow { filter: drop-shadow(0 0 .5rem #ffe55a); animation: bd-pulse 1.4s ease-in-out infinite; }
.bd-line { fill: none; stroke: #ffd84d; stroke-width: 7; stroke-linecap: round; stroke-dasharray: 4 20; animation: bd-march 1s linear infinite; }
.bd-scalpel { position: absolute; width: 1.9rem; height: 7.9rem; translate: -50% -100%; rotate: 18deg; transform-origin: 50% 100%; pointer-events: none; filter: drop-shadow(0 5px 4px rgba(0, 0, 0, .45)); }
.bd-scalpel > svg { display: block; width: 100%; height: 100%; }
.bd-scalpel[hidden] { display: none; }
.bd-art { position: absolute; }
.bd-skip { position: absolute; left: 50%; bottom: .8rem; translate: -50% 0; padding: .55rem 1.1rem; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .92); color: #3b2490; font: 900 .95rem/1 Nunito, sans-serif; box-shadow: 0 3px 0 #c9b9f5; }
.bd-opened .bd-line { display: none; }
@keyframes bd-march { to { stroke-dashoffset: -24; } }
@keyframes bd-pulse { 50% { opacity: .55; } }

/* The scissors cue: starts at the top of the cut line (294 of 1369), bobs down the line and goes once the cut has begun. */
.bd-cue { position: absolute; left: 50%; top: 21.5%; display: grid; justify-items: center; gap: .2rem; translate: -50% 0; pointer-events: none; animation: bd-cue 1.3s ease-in-out infinite; }
.bd-cue-ico { width: 1.6rem; height: 6.4rem; filter: drop-shadow(0 4px 3px rgba(0, 0, 0, .4)); }
.bd-cue-txt { position: absolute; left: calc(50% + 1.7rem); top: .5rem; padding: .3rem .8rem; border-radius: 999px; background: #ffd84d; color: #3b2490; font: 900 .95rem/1 Nunito, sans-serif; white-space: nowrap; box-shadow: 0 3px 0 #c99a12; }
.bd-started .bd-cue, .bd-opened .bd-cue { display: none; }
@keyframes bd-cue { 50% { translate: -50% 1.6rem; } }

/* Names on the opened body, the same look as the pins on the planets. */
.bd-leaders, .bd-labels { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; display: none; }
.bd-opened:not(.bd-playing) .bd-leaders, .bd-opened:not(.bd-playing) .bd-labels { display: block; }
.bd-lead { stroke: #2b2350; stroke-width: 3; stroke-linecap: round; }
.bd-lead-halo { stroke: #fff; stroke-width: 8; stroke-linecap: round; opacity: .85; }
.bd-dot { stroke: #fff; stroke-width: 4; }
.bd-lab { position: absolute; translate: 0 -50%; pointer-events: auto; display: flex; align-items: center; gap: .4rem; padding: .15rem .7rem .15rem .15rem; border: 2px solid var(--c, #7a4fe0); border-radius: 999px; background: #fff; color: #2b2350; font: 900 .85rem/1.2 Nunito, sans-serif; white-space: nowrap; box-shadow: 0 2px 0 rgba(30, 15, 80, .35); cursor: pointer; }
.bd-lab.r { flex-direction: row-reverse; padding: .15rem .15rem .15rem .7rem; }
/* A small picture of the organ, the first frame of its turntable strip. */
.bd-lab-pic { flex: none; width: 2.1rem; height: 2.1rem; border-radius: 50%; background: radial-gradient(circle at 50% 40%, #2a2070, #0e0a35) no-repeat; background-size: 1200% 100%; background-position: 0 0; }
.bd-lab.l { left: .4rem; }
.bd-lab.r { right: .4rem; }
.bd-lab.on { background: var(--c, #4b2fa3); color: #fff; }

.bd-side { display: grid; gap: 1rem; min-width: 0; }
.bd-left { display: grid; gap: .8rem; justify-items: center; min-width: 0; }
/* The two doctor buttons sit under the body, not on it, so they never cover an organ. */
.bd-tools { display: flex; flex-wrap: nowrap; justify-content: center; gap: .5rem; width: 100%; }
.bd-tools .bd-tool { flex: 0 1 auto; min-width: 0; justify-content: center; white-space: nowrap; }
.bd-tool { display: inline-flex; align-items: center; gap: .45rem; min-height: 3.2rem; padding: 0 1rem 0 .35rem; border: 4px solid transparent; border-radius: 999px; background: linear-gradient(#fff, #fff) padding-box, linear-gradient(90deg, #ffd84d, #ff7ac8, #8fd0ff, #7dffb8, #ffd84d) border-box; color: #4b2fa3; font: 400 1.05rem/1 "Cherry Bomb One", Nunito, sans-serif; box-shadow: 0 5px 0 #e3d6fb, 0 10px 16px -10px rgba(75, 47, 163, .45); cursor: pointer; transition: transform .1s ease, box-shadow .1s ease; }
.bd-tool:active { transform: translateY(3px); box-shadow: 0 2px 0 #e3d6fb; }
.bd-tool-ic svg { display: block; }
.bd-tool .bd-ic-list { display: none; }
.bd-tool.as-list .bd-ic-list { display: block; }
.bd-tool.as-list .bd-tool-ic svg:not(.bd-ic-list) { display: none; }
.bd-tool-ic { display: grid; place-items: center; flex: none; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: #efe6ff; color: #2b2350; font-style: normal; font-size: 1.35rem; line-height: 1; }
.bd-tool[data-bd-tool="game"] .bd-tool-ic { background: #ffe1e6; }
.bd-tool[data-bd-tool="again"] .bd-tool-ic { background: #d9f3ff; }
.bd-tool.on { background: linear-gradient(#fff6c9, #fff6c9) padding-box, linear-gradient(90deg, #ffd84d, #ff7ac8, #8fd0ff, #7dffb8, #ffd84d) border-box; box-shadow: 0 5px 0 #e8c64a, 0 10px 16px -10px rgba(201, 154, 18, .8); }
.bd-say-txt { display: none; }
.bd-tool[hidden], .bd-steth[hidden], .bd-game[hidden], .bd-card[hidden], .bd-empty[hidden], .bd-skip[hidden] { display: none; }
.bd-game { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem; padding: .9rem 1.1rem; border-radius: 1.2rem; background: #161047; color: #fff; }
.bd-game b { font: 400 1.5rem/1.1 "Cherry Bomb One", Nunito, sans-serif; }
.bd-score { flex: 1 1 100%; min-height: 1.4rem; font-weight: 800; color: #cdbfff; }
.bd-game.good { animation: bd-good .6s; } .bd-game.bad { animation: bd-bad .4s; }
.bd-game.good .bd-score { color: #7dffb0; } .bd-game.bad .bd-score { color: #ffb3b3; }
@keyframes bd-good { 40% { background: #137a47; } }
@keyframes bd-bad { 25%, 75% { translate: -4px 0; } 50% { translate: 4px 0; } }
.sc-say.bd-replay { background: linear-gradient(180deg, #ffe27a, #ffc400); color: #3b2490; box-shadow: 0 4px 0 #c99a12; display: inline-flex; align-items: center; gap: .5rem; width: auto; height: 3.2rem; padding: 0 1.3rem 0 .9rem; border-radius: 999px; font: 900 1.05rem/1 Nunito, sans-serif; }
.bd-again { padding: .5rem 1.2rem; border: 0; border-radius: 999px; background: #ffd84d; color: #3b2490; font: 900 1rem/1 Nunito, sans-serif; box-shadow: 0 3px 0 #c99a12; }

.bd-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.bd-chip { display: inline-flex; align-items: center; gap: .35rem; min-height: 2.6rem; padding: 0 1rem; border-radius: 999px; background: #efe6ff; color: #5a2db0 !important; font-weight: 900; text-decoration: none; border: 3px solid transparent; }
.bd-chip.on { background: #fff; border-color: var(--c, #7a4fe0); box-shadow: 0 3px 0 #d9cffa; }

.bd-card { display: grid; gap: .6rem; padding: 1rem; border-radius: 1.6rem; background: #fff; border-top: .5rem solid var(--c, #7a4fe0); box-shadow: 0 12px 22px -14px rgba(40, 20, 100, .6); }
.bd-card h2 { margin: 0; color: var(--c, #3b2490); font: 400 1.7rem/1 "Cherry Bomb One", Nunito, sans-serif; }
.bd-spin { width: min(100%, 11rem); aspect-ratio: 1; margin-inline: auto; border-radius: 1.4rem; background: radial-gradient(circle at 50% 40%, #2a2070, #0e0a35) no-repeat; background-origin: border-box; touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none; }
.bd-spin:active { cursor: grabbing; }
/* The ear card shows a picture of the real outer ear and a cut-through of the ear, with numbered buttons on the parts (a tap says what the
   part does) and a short list that explains each number. */
.bd-ear { position: relative; display: block; width: min(100%, 24rem); margin-inline: auto; border-radius: 1.2rem; background: #eaf6fb; }
.bd-ear img { display: block; width: 100%; height: auto; border-radius: inherit; }
.bd-ear-n { position: absolute; translate: -50% -50%; display: grid; place-items: center; width: 2.1rem; height: 2.1rem; padding: 0; border: 3px solid #fff; border-radius: 50%; background: #7a4fe0; color: #fff; font: 900 1rem/1 Nunito, sans-serif; box-shadow: 0 3px 0 #4b2fa3; }
.bd-ear-n.on, .bd-ear-n.speaking { background: #ff8a3d; box-shadow: 0 3px 0 #c2570f; }
.bd-ear-list { counter-reset: ear; display: grid; gap: .3rem; margin: 0; padding: 0; list-style: none; font-size: .88rem; font-weight: 700; color: #4a3a8a; }
.bd-ear-list li { counter-increment: ear; position: relative; padding-left: 1.8rem; line-height: 1.3; }
.bd-ear-list li::before { content: counter(ear); position: absolute; left: 0; top: .05rem; width: 1.3rem; height: 1.3rem; border-radius: 50%; background: #7a4fe0; color: #fff; font-size: .8rem; font-weight: 900; text-align: center; line-height: 1.3rem; }
.bd-ear-list b { font-weight: 900; color: #2b1f73; }
.bd-turn { margin: -.3rem 0 0; text-align: center; font-size: .75rem; font-weight: 800; color: #8a78c0; }
.bd-steth { justify-self: center; margin-top: .5rem; min-height: 3rem; padding: 0 1.3rem; border: 0; border-radius: 999px; background: #ff6b6b; color: #fff; font: 900 1.05rem/1 Nunito, sans-serif; box-shadow: 0 4px 0 #c24444; }
.bd-steth { transition: transform .08s, box-shadow .08s; -webkit-tap-highlight-color: transparent; cursor: pointer; }
.bd-steth:active { transform: translateY(3px) scale(.97); box-shadow: 0 1px 0 #c24444; }
.bd-steth.on { background: #ff4d4d; animation: bd-steth-on .6s ease-in-out infinite; }
@keyframes bd-steth-on { 0%, 100% { box-shadow: 0 4px 0 #c24444, 0 0 0 0 rgba(255, 107, 107, .65); } 50% { box-shadow: 0 4px 0 #c24444, 0 0 0 .7rem rgba(255, 107, 107, 0); } }
@media (prefers-reduced-motion: reduce) { .bd-steth.on { animation: none; box-shadow: 0 4px 0 #c24444, 0 0 0 .3rem rgba(255, 107, 107, .5); } }
.bd-card.beat .bd-spin { animation: bd-beat .26s; }
.bd-card.breathe .bd-spin { animation: bd-breathe 3.2s ease-in-out 3; }
@keyframes bd-beat { 50% { scale: 1.07; } }
@keyframes bd-breathe { 50% { scale: 1.08; } }
.bd-card { justify-items: center; text-align: center; }
.bd-card .bd-bubble { position: relative; width: 100%; margin-bottom: .9rem; background: #fff7f0; border: 3px solid var(--c, #7a4fe0); text-align: left; }
.bd-card .bd-bubble::after { content: ""; position: absolute; left: 50%; bottom: -.85rem; translate: -50% 0; border: .6rem solid transparent; border-top-color: var(--c, #7a4fe0); border-bottom: 0; }
.bd-card .bd-bubble b { color: var(--c, #3b2490); font: 400 1.35rem/1.2 "Cherry Bomb One", Nunito, sans-serif; }
.bd-card .bd-bubble p { margin-top: .3rem; font-weight: 800; color: #2b2350; }
.bd-fstars { display: flex; justify-content: center; gap: .6rem; margin-top: 1rem; }
.bd-fstar { position: relative; display: grid; place-items: center; width: 4.6rem; height: 4.6rem; padding: 0; border: 0; border-radius: 50%; background: none; box-shadow: none; line-height: 1; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.bd-fstar:focus:not(:focus-visible) { outline: none; }
.bd-fstar:active { translate: 0 2px; }
.bd-fstar.on, .bd-fstar.speaking { background: none; box-shadow: none; }
.bd-ftext { margin: .8rem 0 0; padding: .7rem 1rem; border-radius: 1.1rem; background: #fff6c9; color: #2b2350; font-weight: 800; line-height: 1.35; }
.bd-ftext[hidden] { display: none; }
.bd-fstar .bd-star { position: absolute; inset: 0; width: 100%; height: 100%; fill: url(#bd-star-g); stroke: #ffb100; stroke-width: .8; stroke-linejoin: round; filter: drop-shadow(0 3px 2px rgba(150, 90, 0, .35)); transition: scale .15s; }
.bd-fnum { position: relative; margin-top: .2rem; color: #fff; font: 400 1.5rem/1 "Cherry Bomb One", Nunito, sans-serif; text-shadow: 0 2px 0 #c97a00; pointer-events: none; }
.bd-fstar.on .bd-star { scale: 1.22; filter: drop-shadow(0 0 8px rgba(255, 196, 0, .9)) drop-shadow(0 3px 2px rgba(150, 90, 0, .35)); }
.bd-fstar:not(.on) .bd-star { filter: drop-shadow(0 3px 2px rgba(150, 90, 0, .3)); opacity: .9; }
.bd-verdict { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; pointer-events: none; }
.bd-verdict[hidden] { display: none; }
.bd-verdict span { display: grid; place-items: center; width: 38%; aspect-ratio: 1; border-radius: 50%; animation: bd-verdict-pop 1s ease-out forwards; box-shadow: 0 10px 0 rgba(0, 0, 0, .18), 0 0 0 .5rem #fff; }
.bd-verdict .good { background: radial-gradient(circle at 40% 30%, #7dffb0, #17b26a); }
.bd-verdict .bad { background: radial-gradient(circle at 40% 30%, #ff9a9a, #e5484d); animation-name: bd-verdict-shake; }
.bd-verdict svg { width: 62%; height: 62%; filter: drop-shadow(0 3px 0 rgba(0, 0, 0, .2)); }
@keyframes bd-verdict-pop { 0% { scale: .2; opacity: 0; rotate: -20deg; } 25% { scale: 1.2; opacity: 1; rotate: 6deg; } 40% { scale: 1; rotate: 0deg; } 80% { opacity: 1; } 100% { scale: 1.05; opacity: 0; } }
@keyframes bd-verdict-shake { 0% { scale: .3; opacity: 0; } 20% { scale: 1.1; opacity: 1; } 30% { translate: -14px 0; } 40% { translate: 14px 0; } 50% { translate: -10px 0; } 60% { translate: 10px 0; } 70% { translate: 0 0; scale: 1; } 80% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .bd-verdict span { animation: none; } }
.sc-order .sc-pick.go-ok .sc-space { animation: sc-pick-pop .38s ease-out; }
.sc-order .sc-pick.go-ok b { background: #7dffb0; color: #0b5d3a; }
.sc-order .sc-pick.go-bad .sc-space { animation: sc-shake .4s; }
.sc-order .sc-pick.go-bad b { background: #f56565; color: #fff; }
@keyframes sc-pick-pop { 40% { scale: 1.25; } 100% { scale: 1; } }
.bd-more summary { cursor: pointer; padding: .5rem .9rem; border-radius: 999px; background: #efe6ff; color: #5a2db0; font-weight: 900; list-style: none; text-align: center; }
.bd-more summary::-webkit-details-marker { display: none; }
.bd-more[open] summary { margin-bottom: .6rem; }
.bd-empty { margin: 0; padding: 1.2rem; border-radius: 1.2rem; background: #efe6ff; color: #5a2db0; font-weight: 800; }

@media (max-width: 820px) {
    .bd-main, .bd-opened .bd-main { grid-template-columns: 1fr; justify-items: center; }
    .bd-left { width: min(26rem, 100%); }
    .bd-stage { width: 100%; height: auto; }
    .bd-side { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    .bd-line, .bd-glow, .bd-cue, .bd-card.beat .bd-spin, .bd-card.breathe .bd-spin, .bd-game.good, .bd-game.bad, .bd-won { animation: none; }
}

/* Order the planets: the dashed path with the planets on it. */
.sc-path { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); grid-template-rows: 1fr 1fr; width: 100%; height: 26rem; margin: .4rem 0 .6rem; }
.sc-path svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.sc-path svg path { fill: none; stroke: #9d8ff0; stroke-width: 5; stroke-dasharray: 3 14; stroke-linecap: round; vector-effect: non-scaling-stroke; opacity: .8; }
.sc-nd { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.1rem; min-width: 0; }
.sc-nd .orb { display: grid; place-items: center; width: min(5.6rem, 100%); aspect-ratio: 1; border-radius: 50%; border: 4px dashed #9d8ff0; background: #1a1356; color: #cdbfff; font: 900 2rem Nunito, sans-serif; }
.sc-nd.next .orb { border-style: solid; border-color: #ffd84d; color: #fff; background: radial-gradient(circle, #6a58c9, #3a2f7a); box-shadow: 0 0 18px 6px rgba(255, 216, 77, .7), 0 0 44px 14px rgba(255, 216, 77, .35); animation: sc-glow 1.3s ease-in-out infinite; }
@keyframes sc-glow { 50% { box-shadow: 0 0 10px 2px rgba(255, 216, 77, .4), 0 0 24px 6px rgba(255, 216, 77, .15); } }
.sc-nd.full .orb, .sc-nd.sun .orb { border: 0; background: none; width: min(6rem, 100%); }
.sc-nd .orb .pl-img { width: 100%; }
.sc-nd.sun .orb .pl-img { width: 80%; }
/* Saturn's picture is mostly rings, so it is drawn larger to make the planet itself as big as the others. */
.sc-nd .orb .pl-zuhal { width: 100%; max-width: none; margin: 0; scale: 1.95; }
.sc-nd b { padding: .2rem .9rem; border-radius: 999px; background: #fff; color: #4b2fa3; font: 900 .95rem/1.3 Nunito, sans-serif; }
.sc-nd.sun b { background: #ffd84d; color: #6b3d00; }
.sc-nd i { height: 1.6rem; }
/* Eight planets: four above and four below. */
.sc-order .sc-bank { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 559px) {
    .sc-path { height: 18rem; }
    .sc-nd .orb { font-size: 1.3rem; border-width: 3px; }
    .sc-nd b { padding: .1rem .45rem; font-size: .7rem; }
    .sc-nd i { height: 1.1rem; }
    .sc-order .sc-bank { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) { .sc-nd.next .orb { animation: none; } }

/* The finished round: chunky 3D stars and two big buttons. */
.sc-won { gap: .7rem; font-size: 0; filter: drop-shadow(0 5px 0 rgba(120, 70, 0, .55)) drop-shadow(0 10px 10px rgba(0, 0, 0, .35)); }
.sc-won span { position: relative; width: 4.2rem; height: 4.2rem; color: transparent; font-size: 0; background: linear-gradient(145deg, #e7e3f7, #9a94c4 70%); clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.sc-won span::before { content: ""; position: absolute; inset: 0; clip-path: inherit; transform: scale(.72) translateY(-3%); background: linear-gradient(160deg, #fbfaff, #c9c5e6); }
.sc-won span.on { background: linear-gradient(145deg, #ffcf3a, #e48a00 75%); }
.sc-won span.on::before { background: linear-gradient(160deg, #fff3a8, #ffc21f 70%); }
.sc-end { gap: 1.1rem; }
.sc-btn { display: inline-flex; align-items: center; gap: .7rem; padding: .8rem 1.8rem .8rem 1rem; border-radius: 1.5rem; font: 900 1.3rem Nunito, sans-serif; text-decoration: none; box-shadow: 0 6px 0 var(--edge), 0 12px 18px rgba(0, 0, 0, .3); transition: translate .12s, box-shadow .12s; }
.sc-btn:active { translate: 0 4px; box-shadow: 0 2px 0 var(--edge); }
.sc-btn i { display: grid; place-items: center; flex: none; width: 2.6rem; height: 2.6rem; border-radius: 50%; background: rgba(255, 255, 255, .92); font-style: normal; font-size: 1.5rem; line-height: 1; }
.sc-btn.again { --edge: #14804a; background: linear-gradient(#5be38f, #22b866); color: #fff; }
.sc-btn.again i { color: #14804a; font-weight: 900; }
.sc-btn.see { --edge: #b86f00; background: linear-gradient(#ffd84d, #ffab1f); color: #5a3300; }
/* The bottom row of the path is spread over the full width, from under the Sun to under Mars. */
.sc-nd.low { position: absolute; top: 50%; width: 20%; height: 50%; translate: -50% 0; }
/* The dashed line runs through the middle of each row, but a stop is its orb with the name (or an empty spacer of the same height)
   under it, so the orb sat above the line. Each stop is lowered by half of the name and the gap, which puts the orb's centre,
   Sun included, on the line. */
.sc-nd { --drop: calc((1.1rem + 1.65rem) / 2); translate: 0 var(--drop); }
.sc-nd i { height: 1.65rem; }
.sc-nd.low { translate: -50% var(--drop); }
@media (max-width: 559px) {
    .sc-nd { --drop: calc((1.1rem + 1.1rem) / 2); }
    .sc-nd i { height: 1.1rem; }
}

/* Doktor Kecil on a tablet: the body is big and centred, the two tools are round buttons on its right edge, and the organ's card is a
   slim bar fixed to the bottom of the screen, so nothing needs scrolling. A phone keeps the stacked layout above. */
@media (min-width: 560px) {
    .bd { padding-bottom: 11rem; }
    /* Before the body is opened there is no organ card to leave room for, so the body (with the scalpel) takes the height; the width is set and the height follows the picture, so it is never taller than the picture. */
    .bd:not(.bd-opened) { padding-bottom: .8rem; }
    .bd:not(.bd-opened) .bd-main { grid-template-columns: minmax(0, 1fr); justify-items: center; }
    .bd:not(.bd-opened) .bd-left { width: 100%; }
    .bd:not(.bd-opened) .bd-stage { width: min(73.7%, calc((100svh - 16rem) * .7305 * .737), 37.8rem); height: auto; }
    .bd-opened .bd-main { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 0; }
    .bd-opened .bd-left { --w: min(100%, calc((100svh - 24rem) * .7305)); display: flex; flex-direction: column; align-items: center; gap: 1.3rem; width: 100%; }
    .bd-opened .bd-tools { order: -1; margin: 0; }
    /* While the doctor's game runs the organ card is gone and only the game bar sits at the bottom, so the picture takes the room the card
       left and the bar follows right under the picture (it is no longer pinned to the bottom of the screen, which left a gap). */
    .bd.bd-playing { padding-bottom: 1.5rem; }
    .bd-opened.bd-playing .bd-side { position: static; translate: none; width: min(46rem, 100%); margin: .7rem auto 0; }
    .bd-playing .bd-left { --w: min(100%, calc((100svh - 21.2rem) * .7305)); gap: 1.3rem; }
    .bd-opened .bd-stage { width: var(--w); height: auto; }
    .bd-opened .bd-side { position: fixed; left: 50%; bottom: .8rem; z-index: 30; translate: -50% 0; width: min(46rem, calc(100% - 1.6rem)); display: block; }
    .bd-opened .bd-card:not([hidden]) { grid-template-columns: 7.5rem minmax(0, 1fr) auto auto; grid-template-areas: "spin bubble say steth" "spin bubble stars stars" "ftext ftext ftext ftext"; align-items: center; gap: .3rem 1rem; padding: .8rem 1.2rem; border-radius: 2rem; text-align: left; justify-items: stretch; box-shadow: 0 -8px 28px rgba(40, 20, 100, .3), 0 12px 22px -14px rgba(40, 20, 100, .6); }
    .bd-opened .bd-card .bd-spin { grid-area: spin; width: 7.5rem; margin: 0; }
    /* The ear card: the picture on the left (a tap on a number says what it is), the speech bubble beside it, so it is not taller than the others. */
    .bd-opened .bd-card:has(.bd-ear):not([hidden]) { grid-template-columns: 22rem minmax(0, 1fr) auto; grid-template-areas: "ear bubble say" "ear stars stars" "ftext ftext ftext"; }
    .bd-opened .bd-card .bd-ear { grid-area: ear; width: 22rem; margin: 0; }
    .bd-opened .bd-card .bd-ear-list { display: none; }
    .bd-opened .bd-card .bd-ear-n { width: 1.5rem; height: 1.5rem; font-size: .8rem; border-width: 2px; }
    .bd-opened .bd-card[data-bd-card]:has(.bd-ear) .bd-bubble > .sc-say { grid-column: 3; }
    .bd-opened .bd-card .bd-bubble { display: contents; }
    .bd-opened .bd-card .bd-bubble > div { grid-area: bubble; text-align: left; }
    .bd-opened .bd-card .bd-bubble > .sc-say { grid-area: say; justify-self: end; }
    .bd-opened .bd-card .bd-bubble::after { display: none; }
    .bd-opened .bd-card .bd-bubble b { font-size: 1.25rem; }
    .bd-opened .bd-card .bd-bubble p { font-size: .98rem; }
    .bd-opened .bd-card .bd-steth { grid-area: steth; margin: 0; min-height: 2.6rem; padding: 0 1rem; font-size: .9rem; }
    .bd-opened .bd-card .bd-fstars { grid-area: stars; margin: 0; gap: .3rem; justify-content: center; justify-self: stretch; }
    .bd-opened .bd-card .bd-fstar { width: 3.4rem; height: 3.4rem; }
    .bd-opened .bd-card .bd-fnum { margin-top: .1rem; font-size: 1.05rem; }
    /* The speaker button says "Dengar" and is the same size as the stethoscope button; with no stethoscope button it sits centred over the stars. */
    .bd-opened .bd-card .bd-bubble > .sc-say { display: inline-flex; flex-direction: row; align-items: center; justify-content: center; white-space: nowrap; width: auto; height: auto; min-height: 2.6rem; padding: 0 1rem; gap: .4rem; border-radius: 999px; font: 900 .9rem/1 Nunito, sans-serif; }
    .bd-opened .bd-card .bd-bubble > .sc-say svg { width: 1.3rem; height: 1.3rem; }
    .bd-opened .bd-card .bd-bubble > .sc-say .bd-say-txt { display: inline; }
    .bd-opened .bd-card:not(:has(.bd-steth)) .bd-bubble > .sc-say { grid-column: 3 / 5; justify-self: center; }
    .bd-opened .bd-card .bd-ftext { grid-area: ftext; margin: 0; }
    .bd-opened .bd-turn { display: none; }
}

/* Sifir page as a chalkboard: green board in a wooden frame, chalk-white writing, yellow answers. Placed last so it wins over the
   shared speaker-button and notebook styles it reuses. */
.sf-board { position: relative; width: min(36rem, 100%); padding: 1.2rem 1rem 1.4rem; border: 14px solid #a86b3c; border-radius: 1.1rem; background: radial-gradient(ellipse at center, #3f6b4f, #2c4d39); box-shadow: inset 0 0 40px rgba(0, 0, 0, .45), 0 10px 0 #7a4a24, 0 18px 26px -10px rgba(0, 0, 0, .4); text-align: center; color: #fff; }
.sf-board .sf-title { color: #fff; text-transform: uppercase; letter-spacing: .06em; }
.sf-board .sf-title mark { padding: 0; background: none; color: #ffe066; }
.sf-board .sf-step { background: transparent; color: #fff !important; border: 2px dashed rgba(255, 255, 255, .75); box-shadow: none; }
.sf-board .sc-say.big { border-radius: .9rem; background: #fff; color: #2c4d39; box-shadow: 0 5px 0 #c9c1a9; }
.sf-board .sc-say.big .ic { background: linear-gradient(180deg, #5b9a72, #2f6b47); box-shadow: 0 3px 0 #1d4a30; }
.sf-board .rd-btn.sf-go { border-color: transparent; border-radius: .9rem; background: #ffe066; color: #5a3300 !important; box-shadow: 0 5px 0 #c99a00; }
.sf-board .sf-mode { gap: 0; padding: 0; overflow: hidden; border: 2px solid rgba(255, 255, 255, .55); background: transparent; }
.sf-board .sf-mode a { border-radius: 0; color: #fff !important; }
.sf-board .sf-mode a.on { background: rgba(255, 255, 255, .22); color: #fff !important; box-shadow: none; }
.sf-board .sf-tip, .sf-board .sf-skiphead { color: #e3f1e7; }
.sf-board .sf-box { padding: .25rem .2rem .25rem .5rem; border-radius: 0; background: transparent; border-bottom: 2px dashed rgba(255, 255, 255, .28); box-shadow: none; }
.sf-board .sf-box:has(details[open]) { background: rgba(255, 224, 102, .13); box-shadow: none; }
.sf-board .sf-row { color: #fff; }
.sf-board .sf-row .sf-ans { color: #ffe066; }
.sf-board details.sf-row .sf-hide { border-color: rgba(255, 255, 255, .75); color: #fff; }
.sf-board .sf-box .sc-say { background: rgba(255, 255, 255, .18); color: #fff; box-shadow: none; }
.sf-board .sf-box .sc-say.speaking { background: #ffe066; color: #2c4d39; }
.sf-board .sf-skip span { background: transparent; color: #fff; border: 2px solid rgba(255, 255, 255, .75); box-shadow: none; }
.sf-board .sf-skip span:nth-child(even) { color: #ffe066; border-color: rgba(255, 224, 102, .85); background: transparent; box-shadow: none; }
/* Bigger chalk writing: the facts, title, links, tip and the skip-count row are a step larger than on the notebook pages. */
.sf-board .sf-title { font-size: clamp(2.2rem, 9.5vw, 3.1rem); }
.sf-board .sf-step { padding: .5rem 1.1rem; font-size: 1.2rem; }
.sf-board .sf-mode a { min-height: 2.9rem; font-size: 1.15rem; }
.sf-board .sf-tip { font-size: 1.15rem; }
.sf-board .sf-list { width: min(27rem, 100%); gap: .35rem; }
.sf-board .sf-row { font-size: clamp(1.85rem, 8.5vw, 2.6rem); }
.sf-board .sf-box .sc-say { width: 3.2rem; height: 3.2rem; }
.sf-board .sf-box .sc-say .spk { width: 1.8rem; height: 1.8rem; }
.sf-board .sf-skiphead { font-size: 1.3rem; }
.sf-board .sf-skip { gap: .5rem; }
.sf-board .sf-skip span { min-width: 3.2rem; height: 3.2rem; font-size: 1.35rem; }
@media (max-width: 459px) { .sf-board { border-width: 9px; padding: 1rem .6rem 1.2rem; } }

/* Hafal sifir list: each tile is a small chalkboard in a wooden frame, matching the table page. */
.sf-tile.sf-chalk { gap: .15rem; padding: .7rem .4rem .75rem; border: 8px solid #a86b3c; border-radius: .9rem; background: radial-gradient(ellipse at center, #3f6b4f, #2c4d39); color: #fff !important; box-shadow: inset 0 0 18px rgba(0, 0, 0, .4), 0 6px 0 #7a4a24; }
.sf-tile.sf-chalk small { letter-spacing: .14em; opacity: .9; }
.sf-tile.sf-chalk b { font-size: 2.9rem; color: #ffe066; }
.sf-tile.sf-chalk span { align-self: stretch; margin: .15rem .5rem 0; padding-top: .3rem; border-top: 2px dashed rgba(255, 255, 255, .35); font-size: .85rem; opacity: .95; text-align: center; }
/* On a tablet the tile grid (and the practice card under it) is as wide as the title card above, four tiles to a row. */
@media (min-width: 700px) {
    .sf-pick, .sf-mix { width: min(44rem, 100%); }
    .sf-pick { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.2rem; }
    .sf-tile.sf-chalk b { font-size: 3.4rem; }
    .sf-tile.sf-chalk span { font-size: 1rem; }
}


/* While the doctor's game runs the organ card is out of the way: the game bar takes its place. */
.bd-playing .bd-card, .bd-playing .bd-empty { display: none !important; }

/* The doctor's game bar: one row from the first question to the last. On the left the task (a small "Cari:" over the organ's name, or
   the right/try-again words in its place), in the middle a path of question circles joined by a line that turns green as the child
   goes on, on the right the buttons. When the round is over a gold star with the stars won stands in front, the title says
   "Anda hebat!" and the buttons become "Main semula" and "Tutup". */
.bd-game { box-sizing: border-box; display: flex; align-items: center; gap: 1rem; min-height: 5.6rem; padding: .6rem 1.3rem; border-radius: 1.8rem; background: #161047; color: #fff; }
.bd-ask { flex: 0 0 11.5rem; min-width: 0; display: grid; gap: .15rem; }
.bd-game.done { gap: .6rem; padding-inline: 1.1rem; }
.bd-game.done .bd-ask { flex-basis: 6.5rem; }
.bd-game b { display: block; min-width: 0; font: 400 1.35rem/1.1 "Cherry Bomb One", Nunito, sans-serif; }
.bd-game.done b { color: #ffd84d; }
.bd-game b small { display: block; font: 900 .85rem/1.2 Nunito, sans-serif; opacity: .85; }
.bd-game:has(.bd-score:not(:empty)) b small { display: none; }
.bd-game .bd-score { min-width: 0; margin: 0; min-height: 0; font: 900 .9rem/1.2 Nunito, sans-serif; }
.bd-game .bd-score:empty { display: none; }
.bd-game .sc-say { order: 2; flex: none; display: inline-flex; flex-direction: row; align-items: center; justify-content: center; gap: .35rem; white-space: nowrap; width: auto; height: auto; min-height: 2.8rem; padding: 0 1.1rem; border-radius: 999px; font: 900 1rem/1 Nunito, sans-serif; }
.bd-game .sc-say.bd-replay { height: auto; padding: 0 1rem; font-size: 1rem; }
.bd-game .sc-say.bd-close { padding: 0 1rem; }
.bd-game .sc-say svg { width: 1.1rem; height: 1.1rem; }
.bd-game .bd-say-txt { display: inline; }
.bd-game.done .sc-say:not(.bd-replay):not(.bd-close) { display: none; }
.bd-q { --f: 0; order: 1; position: relative; flex: 1 1 12rem; min-width: 0; display: flex; justify-content: space-between; align-items: center; }
.bd-q::before, .bd-q::after { content: ""; position: absolute; left: 1.5rem; top: 50%; height: .4rem; margin-top: -.2rem; border-radius: 9px; }
.bd-q::before { right: 1.5rem; background: #3a3175; }
.bd-q::after { width: calc((100% - 3rem) * var(--f)); background: #4be08f; transition: width .35s ease; }
.bd-q i { position: relative; z-index: 1; display: grid; place-items: center; box-sizing: border-box; flex: none; width: 3rem; height: 3rem; padding: 0; border-radius: 50%; border: .22rem solid #161047; background: #3a3175 center / 58% no-repeat; color: #cdbfff; font: 900 1.15rem/1 Nunito, sans-serif; font-style: normal; }
.bd-q i.ok { background-color: #4be08f; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12.5l5 5L20 6.5'/%3E%3C/svg%3E"); }
.bd-q i.bad:not(.now) { background-color: #ff7a7a; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.6' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E"); }
.bd-q i.now { background-color: #ffd84d; color: #4a3000; box-shadow: 0 0 16px rgba(255, 216, 77, .9); }
.bd-q i.now.bad { box-shadow: 0 0 0 4px #ff7a7a; }
.bd-game.done .bd-q i { width: 2.4rem; height: 2.4rem; }
.bd-game.done .bd-q::before, .bd-game.done .bd-q::after { left: 1.2rem; }
.bd-game.done .bd-q::before { right: 1.2rem; }
.bd-game.done .bd-q::after { width: calc((100% - 2.4rem) * var(--f)); }
.bd-won { position: relative; flex: none; width: 3.8rem; height: 3.8rem; filter: drop-shadow(0 0 10px rgba(255, 200, 60, .8)); }
.bd-won[hidden] { display: none; }
.bd-won:not([hidden]) { animation: bd-won-in .6s cubic-bezier(.3, 1.6, .5, 1) both; }
.bd-won svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.bd-game .bd-won b { position: absolute; left: 0; right: 0; top: 56%; translate: 0 -50%; text-align: center; font: 900 .95rem/1 Nunito, sans-serif; color: #7a4300; }
@keyframes bd-won-in { from { scale: .2; opacity: 0; } 60% { scale: 1.2; } to { scale: 1; opacity: 1; } }
/* A phone is too narrow for one row: the task and the buttons share the first, the path takes a row of its own. */
@media (max-width: 36rem) { .bd-game { flex-wrap: wrap; row-gap: .6rem; } .bd-ask { flex: 1 1 8rem; } .bd-q { order: 9; flex: 1 1 100%; } }

/* The bookshelf's title and filters sit in a banner like the other pages (Science, Maths): purple, the same title font,
   white pill buttons with the chosen one filled. The title keeps its own h1 so the shelf section is still labelled by it. */
.rd-library-head.sc-sky { box-sizing: border-box; display: block; width: 100%; padding: 1.5rem 1.6rem 1.4rem; margin-bottom: 1.5rem; background: radial-gradient(circle at 88% 18%, rgba(255, 255, 255, .35) 0, rgba(255, 255, 255, 0) 45%), linear-gradient(135deg, #8a5cf0, #5b36d6); color: #fff; box-shadow: 0 14px 24px -14px rgba(60, 30, 160, .55); }
.rd-library-head.sc-sky h1 { position: relative; z-index: 1; max-width: 75%; font: 400 clamp(1.9rem, 5vw, 2.4rem)/1.05 "Cherry Bomb One", Nunito, sans-serif; text-shadow: 0 3px 0 rgba(0, 0, 0, .18); }
.rd-library-head.sc-sky .rd-chips { position: relative; z-index: 1; margin-top: 1rem; gap: .6rem; }
.rd-library-head.sc-sky .rd-chip { min-height: 2.8rem; padding: 0 1.3rem; background: #fff; color: #4b2fa3 !important; font-weight: 900; box-shadow: 0 4px 0 rgba(0, 0, 0, .22); }
.rd-library-head.sc-sky .rd-chip:hover { transform: translateY(-1px); box-shadow: 0 4px 0 rgba(0, 0, 0, .22); }
.rd-library-head.sc-sky .rd-chip.active { background: #ffd23f; color: #3a2a00 !important; box-shadow: 0 4px 0 rgba(0, 0, 0, .25); }
.rd-shelf-ico { position: absolute; right: 1.4rem; top: 50%; translate: 0 -50%; rotate: 8deg; font-size: clamp(4.2rem, 11vw, 6.5rem); line-height: 1; filter: drop-shadow(0 6px 5px rgba(120, 40, 10, .35)); pointer-events: none; }

/* The bookshelf banner is filled with neon books and stars, like the planet and body banners have their stars and plus signs. */
.rd-library-head.sc-sky .rd-shelf-sub { position: relative; z-index: 1; max-width: 62%; margin: .5rem 0 0; font-weight: 800; color: #e4d9ff; }
.sc-dec { position: absolute; line-height: 1; pointer-events: none; }
.sc-glow { right: -2rem; top: -3rem; width: 15rem; height: 15rem; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .35), rgba(255, 255, 255, 0) 65%); }
.sc-ring { left: -2.5rem; bottom: -3.5rem; width: 9rem; height: 9rem; border-radius: 50%; border: 1.1rem solid rgba(255, 255, 255, .12); }
/* Three neon books drawn in SVG: a glowing outline in the book's own colour, a dark fill and a small shape on the cover. The glow is kept thin. */
.rd-neon { position: absolute; right: 1.6rem; top: 50%; translate: 0 -50%; width: 12.5rem; height: 8rem; pointer-events: none; }
.rd-neon .nb { position: absolute; overflow: visible; filter: drop-shadow(0 0 1.5px var(--c)) drop-shadow(0 0 4px var(--c)); }
.rd-neon .bk { fill: rgba(20, 8, 70, .55); stroke: var(--c); stroke-width: 2.6; }
.rd-neon .sp { fill: var(--c); fill-opacity: .25; stroke: var(--c); stroke-width: 2; }
.rd-neon .ln { fill: none; stroke: var(--c); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.rd-neon .dt { fill: var(--c); }
.rd-neon .n1 { left: 0; top: 1.5rem; width: 4.9rem; rotate: -13deg; }
.rd-neon .n2 { right: 0; top: 1.5rem; width: 4.9rem; rotate: 12deg; }
.rd-neon .nf { left: 3.6rem; top: .2rem; width: 5.6rem; rotate: -2deg; z-index: 2; }
/* The stars on the shelf banner are placed from the right edge, clear of the neon books (which fill the last 14 rem), so none touches a book. */
.sc-star.s4 { left: auto; right: 16rem; top: 20%; font-size: 1.1rem; }
.sc-star.s5 { left: auto; right: 18.5rem; bottom: 18%; font-size: .8rem; }
.sc-star.s6 { left: 22%; top: 9%; font-size: .9rem; }
.sc-star.s7 { left: auto; right: 22rem; bottom: 12%; font-size: 1rem; }
.sc-star.s8 { left: auto; right: 2.5rem; top: 7%; font-size: .8rem; }
@media (max-width: 559.98px) {
    .rd-library-head .sc-star.s4, .rd-library-head .sc-star.s5, .rd-library-head .sc-star.s7 { display: none; }
    .rd-neon { right: .8rem; width: 9.4rem; height: 6rem; }
    .rd-neon .n1, .rd-neon .n2 { width: 3.7rem; top: 1.1rem; }
    .rd-neon .nf { left: 2.7rem; width: 4.2rem; }
    .rd-library-head.sc-sky .rd-shelf-sub { max-width: 58%; font-size: .9rem; }
}

/* The cross on an organ card (not the game's own "Tutup" button, which is .bd-close and is removed when the game stops). It sits above the card's
   top edge, so it never covers the buttons inside the card. */
.bd-card { position: relative; }
.bd-x { position: absolute; top: -2.3rem; right: .9rem; z-index: 3; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; padding: 0; border: 3px solid var(--c, #7a4fe0); border-radius: 50%; background: #fff; color: var(--c, #3b2490); font: 900 1.15rem/1 Nunito, sans-serif; box-shadow: 0 4px 0 rgba(0, 0, 0, .18); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.bd-x:active { translate: 0 2px; box-shadow: 0 2px 0 rgba(0, 0, 0, .18); }

/* Narrow phones: the logo, the Home and sound buttons, the star count and the profile picture do not leave room for the name "Baca Ceria"
   (the Home button was drawn over it). The name steps aside for the logo, and stays readable for screen readers. */
@media (max-width: 560px) {
    .rd-top .rd-brand { flex: 0 0 auto; }
    .rd-top .rd-brand span { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
    .rd-top .rd-nav { margin-left: auto; }
}

/* ---- Science: Dinosaur topic ------------------------------------------------------------------------------------------------- */
.dn { --dn-leaf: #2e9e44; }
.dn-img { display: block; max-width: 100%; height: auto; }
.dn-img.dn-shadow { filter: brightness(0) opacity(.85); }

/* Cards: each dinosaur's picture pops out of a coloured card. */
.dn-grid { list-style: none; margin: 0 auto; padding: 1.6rem 0 0; width: min(46rem, 100%); display: grid; grid-template-columns: repeat(2, 1fr); gap: 2.6rem 1rem; }
.dn-card { position: relative; display: grid; justify-items: center; align-content: end; min-height: 7.2rem; padding: 0 .6rem .8rem; border-radius: 1.6rem; background: linear-gradient(180deg, var(--dl), var(--dc)); color: #fff !important; text-decoration: none; box-shadow: 0 6px 0 rgba(0, 0, 0, .18), 0 14px 20px -12px rgba(0, 0, 0, .5); transition: transform .12s ease; }
.dn-card:active { transform: translateY(3px); }
.dn-card:hover { transform: translateY(-3px); }
.dn-pic { display: block; width: 78%; margin-top: -2.4rem; filter: drop-shadow(0 6px 5px rgba(0, 0, 0, .3)); transition: transform .2s ease; }
.dn-card:hover .dn-pic { transform: scale(1.06) rotate(-2deg); }
.dn-card b { margin-top: .5rem; font: 400 1.35rem/1 "Cherry Bomb One", Nunito, sans-serif; text-shadow: 0 2px 0 rgba(0, 0, 0, .25); }
@media (min-width: 640px) { .dn-grid { grid-template-columns: repeat(3, 1fr); } }

/* Trail: the same dinosaurs along a dotted line; the circle takes the dinosaur's colour. */

.dn-games { display: grid; gap: .9rem; width: min(34rem, 100%); margin: 0 auto; }
.dn-game-art { font-size: 2.8rem; line-height: 1; animation: sc-bob 1.6s ease-in-out infinite; }

/* One dinosaur: a jungle stage with the size drawn to scale. */
.dn-stage { position: relative; width: min(46rem, 100%); box-sizing: border-box; overflow: hidden; padding: 1.4rem 1.2rem 1.2rem; border-radius: 1.8rem; background: #3d8f4a url(dino/jungle.svg) center / cover no-repeat; color: #fff; box-shadow: 0 14px 24px -14px rgba(10, 50, 20, .8); }
.dn-stage h1 { margin: 0; text-align: center; color: #fff; font: 400 2.3rem/1 "Cherry Bomb One", Nunito, sans-serif; text-shadow: 0 3px 0 rgba(0, 60, 20, .6); }
.dn-stage > p { margin: .3rem 0 0; text-align: center; font-weight: 900; color: #fff; text-shadow: 0 2px 0 rgba(0, 60, 20, .6); }
.dn-stage .sc-arrow { position: absolute; top: 3.2rem; z-index: 3; }
.dn-stage .sc-arrow.prev { left: .5rem; }
.dn-stage .sc-arrow.next { right: .5rem; }
.dn-row { position: relative; margin-top: 1rem; padding: 0 .2rem; }
.dn-lane { position: relative; width: calc(var(--len) / var(--span) * 100%); min-width: 7rem; }
.dn-actor { position: relative; z-index: 2; transform-origin: 50% 100%; animation: dn-breathe 3.2s ease-in-out infinite; filter: drop-shadow(0 8px 6px rgba(0, 0, 0, .35)); }
.dn-actor .dn-img { width: 100%; }
.dn-actor.roaring { animation: dn-shake .18s linear 6; }
@keyframes dn-breathe { 50% { transform: scale(1.025, 1.04); } }
@keyframes dn-shake { 25% { transform: translateX(-3px) rotate(-1deg); } 75% { transform: translateX(3px) rotate(1deg); } }
.dn-waves { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.dn-waves i { position: absolute; left: 50%; top: 40%; width: 30%; aspect-ratio: 1; margin: -15% 0 0 -15%; border: 4px solid rgba(255, 255, 255, .85); border-radius: 50%; opacity: 0; }
.dn-waves.roaring i { animation: dn-ring 1.2s ease-out forwards; }
.dn-waves.roaring i:nth-child(2) { animation-delay: .25s; }
.dn-waves.roaring i:nth-child(3) { animation-delay: .5s; }
@keyframes dn-ring { from { opacity: .9; transform: scale(.4); } to { opacity: 0; transform: scale(3.2); } }
.dn-measure { width: calc(var(--len) / var(--span) * 100%); min-width: 4rem; margin-top: .3rem; text-align: center; font: 400 1.3rem/1 "Cherry Bomb One", Nunito, sans-serif; text-shadow: 0 2px 0 rgba(0, 60, 20, .7); }
.dn-ruler { position: relative; z-index: 2; height: 1.1rem; margin-top: .2rem; border-radius: .3rem; background: repeating-linear-gradient(90deg, #5b3a14 0, #5b3a14 2px, transparent 2px, transparent calc(100% / var(--span))), #f4d58a; box-shadow: 0 3px 0 rgba(0, 0, 0, .25); }
.dn-refs { display: flex; align-items: flex-end; gap: 6%; margin-top: .8rem; }
.dn-kid { width: max(1.6rem, calc(.5 / var(--span) * 100%)); height: auto; }
.dn-car { width: calc(4.5 / var(--span) * 100%); min-width: 3rem; height: auto; }
.dn-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: .3rem 1.2rem; margin: .5rem 0 0; font-weight: 900; font-size: .9rem; text-shadow: 0 1px 0 rgba(0, 60, 20, .7); }
.dn-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .7rem; margin-top: 1rem; }
.dn-roar { min-height: 3rem; padding: 0 1.3rem; border: 0; border-radius: 999px; background: #ff7a3d; color: #fff; font: 400 1.25rem/1 "Cherry Bomb One", Nunito, sans-serif; box-shadow: 0 4px 0 #b84a14; cursor: pointer; }
.dn-roar:active { transform: translateY(3px); box-shadow: 0 1px 0 #b84a14; }
.dn-chips { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; width: min(46rem, 100%); margin: 0; padding: 0; }
.dn-chips li { display: grid; justify-items: center; gap: .1rem; padding: .7rem .4rem; border-radius: 1.2rem; background: #fff; color: #17703a; text-align: center; box-shadow: 0 4px 0 #cfe9d4; }
.dn-chips i { font-style: normal; font-size: 1.6rem; }
.dn-chips b { font-weight: 900; line-height: 1.1; }
.dn-chips small { color: #5d8a6b; font-weight: 800; }
.dn-acts { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; }
.dn-acts a { padding: .6rem 1.2rem; border-radius: 999px; background: #fff; color: #17703a !important; font-weight: 900; text-decoration: none; box-shadow: 0 4px 0 #cfe9d4; }

/* Games: shared question area, the shadow, the choices and the eggs. */
.dn-q { text-align: center; }
.dn-q h1 { margin: 0; color: #17703a; font: 400 2rem/1.05 "Cherry Bomb One", Nunito, sans-serif; }
.dn-q p { margin: .3rem 0 0; font-weight: 800; color: #3b6a4b; }
.dn-count { display: flex; justify-content: center; gap: 1.4rem; }
.dn-dots { list-style: none; display: flex; justify-content: center; gap: .5rem; margin: .6rem 0 0; padding: 0; }
.dn-dots li { width: .9rem; height: .9rem; border-radius: 50%; background: #cfe9d4; }
.dn-dots li.done { background: var(--dn-leaf); }
.dn-dots li.now { background: #ffd84d; box-shadow: 0 0 0 3px #fff3b0; }
.dn-shadow-stage { display: grid; justify-items: center; gap: .6rem; width: min(30rem, 100%); box-sizing: border-box; margin: 0 auto; padding: 1.2rem; border-radius: 1.8rem; background: #3d8f4a url(dino/jungle.svg) center / cover no-repeat; box-shadow: 0 10px 0 rgba(0, 0, 0, .12); }
.dn-shadow-stage .dn-img { width: min(16rem, 80%); }
.dn-shadow-stage.solved .dn-img { animation: dn-pop .5s ease-out; }
@keyframes dn-pop { 40% { transform: scale(1.12); } }
.dn-clue { margin: 0; padding: .4rem .9rem; border-radius: 999px; background: rgba(255, 255, 255, .92); color: #17703a; font-weight: 900; text-align: center; }
.dn-choices { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: .7rem; width: min(30rem, 100%); margin: 0 auto; padding: 0; }
.dn-choice { display: grid; place-items: center; min-height: 3.4rem; padding: .3rem .6rem; border-radius: 1.2rem; background: linear-gradient(180deg, var(--dl), var(--dc)); color: #fff !important; font: 400 1.2rem/1.05 "Cherry Bomb One", Nunito, sans-serif; text-align: center; text-decoration: none; text-shadow: 0 2px 0 rgba(0, 0, 0, .25); box-shadow: 0 5px 0 rgba(0, 0, 0, .2); }
.dn-choice:active { transform: translateY(3px); }
.dn-choice.bad { filter: grayscale(1); opacity: .5; pointer-events: none; }
.dn-next { padding: .6rem 1.5rem; border-radius: 999px; background: #ffd84d; color: #4b2fa3 !important; font: 900 1.2rem/1 Nunito, sans-serif; text-decoration: none; box-shadow: 0 4px 0 #c99a12; }
.dn-who .sc-end, .dn-eggs .sc-end { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; }

/* Egg pairs: twelve eggs that turn over to show a dinosaur. */
.dn-board { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; width: min(26rem, 100%); margin: 0 auto; }
@media (min-width: 560px) { .dn-board { grid-template-columns: repeat(4, 1fr); width: min(34rem, 100%); } }
.dn-egg { aspect-ratio: 1; padding: 0; border: 0; background: none; perspective: 700px; cursor: pointer; }
.dn-egg-in { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .45s ease; }
.dn-egg.open .dn-egg-in, .dn-egg.found .dn-egg-in { transform: rotateY(180deg); }
.dn-egg-front, .dn-egg-back { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 1.2rem; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.dn-egg-front { font-size: 2.6rem; background: linear-gradient(180deg, #fff6d6, #ffe08a); box-shadow: 0 5px 0 #d9b34a; }
.dn-egg-back { transform: rotateY(180deg); padding: .3rem; background: linear-gradient(180deg, #e9ffd6, #b8ecb0); box-shadow: 0 5px 0 #7fbf7a; }
.dn-egg.found .dn-egg-back { background: linear-gradient(180deg, #fff3b0, #ffd84d); box-shadow: 0 5px 0 #c99a12; }
.dn-egg-back .dn-img { width: 100%; max-height: 100%; object-fit: contain; }
.dn-done { display: grid; justify-items: center; gap: .6rem; margin-top: 1rem; }
.dn-done[hidden], .dn-done .rd-gain[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) {
    .dn-actor, .dn-actor.roaring, .dn-game-art, .dn-shadow-stage.solved .dn-img { animation: none; }
    .dn-waves.roaring i { animation-duration: .01s; }
    .dn-egg-in { transition: none; }
}

/* Small phones (360 px and under, or a large system font): the header stays on one row. The buttons shrink a little and the row may
   not wrap, so the star count or the profile picture never drops below the logo. */
@media (max-width: 420px) {
    .rd-top { flex-wrap: nowrap; padding-inline: .6rem; gap: .3rem; }
    .rd-top .rd-mark { width: 2.8rem; height: 2.8rem; }
    .rd-top .rd-nav { min-width: 0; }
    .rd-top .rd-end { gap: .35rem; }
    .rd-top .rd-home, .rd-top .rd-sound { width: 2.6rem; height: 2.6rem; }
    .rd-top .rd-stars-pill { height: 2.6rem; padding: 0 .55rem 0 .35rem; font-size: 1rem; }
    .rd-top .pchip { min-height: 2.6rem; }
    .rd-top .pchip .pav { width: 2.1rem; height: 2.1rem; }
}

/* ---- Dinosaur topic, second pass ---------------------------------------------------------------------------------------------- */
/* The jungle sits behind every Dinosaur page except the detail page (its stage already is the jungle). */
.dn:not(.dn-one) { position: relative; isolation: isolate; }
.dn:not(.dn-one)::before { content: ""; position: fixed; inset: 0; z-index: -1; background: #8fd4ff url(dino/jungle.svg) center bottom / cover no-repeat; pointer-events: none; }
.dn-q { padding: .8rem 1rem; border-radius: 1.4rem; background: rgba(255, 255, 255, .9); box-shadow: 0 5px 0 rgba(0, 0, 0, .1); }
/* Cards: every picture has the same box, so no dinosaur sticks out more than the others. */
.dn-card { min-height: 6.2rem; }
.dn-pic { display: grid; place-items: end center; width: 86%; height: 6.6rem; margin-top: -2.4rem; }
.dn-pic .dn-img { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
/* Trail: the dinosaurs stand free on the jungle (no box), joined by a smooth white dotted line. */
.dn-trail { background: rgba(14, 64, 32, .55); }
.dn-trail .sc-orb { width: 9rem; height: 7rem; background: none; box-shadow: none; }
.dn-trail .sc-orb .dn-img { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; filter: drop-shadow(0 6px 5px rgba(0, 0, 0, .35)); }
.dn-trail .sc-trail-line path { stroke: rgba(255, 255, 255, .85); stroke-width: 5; stroke-dasharray: 1 11; }
.dn-trail .sc-words b { text-shadow: 0 2px 0 rgba(0, 0, 0, .35); }
.dn-trail .sc-words small { color: #fff; text-shadow: 0 1px 0 rgba(0, 0, 0, .45); }
/* Detail page: a ruler stands beside the dinosaur for its height, a tick for each metre of the picture. */
.dn-row { padding-left: 2.1rem; }
.dn-vruler { position: absolute; left: -1.7rem; top: 0; bottom: 0; width: .9rem; border-radius: .3rem; background: repeating-linear-gradient(to top, #5b3a14 0, #5b3a14 2px, transparent 2px, transparent calc(100% / var(--hm, 4))), #f4d58a; box-shadow: 0 3px 0 rgba(0, 0, 0, .25); z-index: 2; }
.dn-vruler b { position: absolute; left: 50%; top: -1.3rem; translate: -50% 0; font: 900 .85rem/1 Nunito, sans-serif; color: #fff; text-shadow: 0 1px 0 rgba(0, 60, 20, .8); }
/* Both buttons are the same size. */
.dn-actions { flex-wrap: nowrap; gap: .6rem; }
.dn-actions .dn-roar, .dn-actions .sc-say.big { flex: 1 1 0; min-width: 0; width: auto; min-height: 3.6rem; margin: 0; justify-content: center; box-sizing: border-box; font-size: 1.2rem; }
@media (max-width: 380px) { .dn-actions .dn-roar, .dn-actions .sc-say.big { font-size: 1.05rem; } }

/* ---- Dinosaur topic, third pass: the approved designs ------------------------------------------------------------------------- */
.dn-title { text-align: center; padding: .4rem 0 .2rem; }
.dn-title h1, .dn-q h1 { margin: 0; color: #fff; font: 400 clamp(2.2rem, 9vw, 3.2rem)/1.02 "Cherry Bomb One", Nunito, sans-serif; text-shadow: 0 3px 0 #a0521f, 0 6px 14px rgba(0, 0, 0, .25); }
.dn-title p, .dn-q p { margin: .4rem 0 0; color: #fff; font-weight: 900; text-shadow: 0 2px 0 rgba(90, 40, 10, .7); }
.dn-q { padding: 0; background: none; box-shadow: none; }
.dn-q h1 { font-size: clamp(1.8rem, 7vw, 2.4rem); }
/* Cards: wide, close together, a light picture area and a coloured name bar. */
.dn-grid { width: min(46rem, 100%); gap: .7rem; padding: .4rem 0 0; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dn-card { display: grid; grid-template-rows: 1fr auto; align-content: stretch; justify-items: stretch; min-height: 0; padding: 0; overflow: hidden; border: 4px solid #fff; border-radius: 1.6rem; background: color-mix(in srgb, var(--dl) 22%, #fff); box-shadow: 0 5px 0 rgba(0, 0, 0, .22), 0 12px 18px -10px rgba(0, 0, 0, .45); }
.dn-pic { display: grid; place-items: center; width: auto; height: 8.2rem; margin: 0; padding: .6rem .5rem .2rem; filter: none; }
.dn-pic .dn-img { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; filter: drop-shadow(0 5px 4px rgba(0, 0, 0, .3)); }
.dn-card b { margin: 0; padding: .55rem .4rem; background: var(--dc); color: #fff; text-align: center; font: 400 1.3rem/1 "Cherry Bomb One", Nunito, sans-serif; text-shadow: 0 2px 0 rgba(0, 0, 0, .25); }
@media (min-width: 640px) { .dn-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* Trail: free-standing dinosaurs on the jungle, a white name pill with a number, one smooth dotted line. */
.dn-trail { background: none; box-shadow: none; padding: .2rem 0; }
.dn-trail .sc-trail-line { inset: .2rem 0; width: 100%; height: calc(100% - .4rem); }
.dn-trail li { height: 12.5rem; }
.dn-trail .sc-orb { top: 38%; left: 30%; width: 11rem; height: 8rem; }
.dn-trail .even .sc-orb { left: 70%; }
.dn-trail .sc-words { top: 80%; left: 30%; width: auto; white-space: nowrap; }
.dn-trail .even .sc-words { left: 70%; }
.dn-trail .sc-words b { display: inline-flex; align-items: center; gap: .45rem; padding: .22rem .9rem .22rem .25rem; border-radius: 999px; background: #fff; color: #3a2410; font: 900 1.15rem/1 Nunito, sans-serif; text-shadow: none; box-shadow: 0 3px 0 rgba(0, 0, 0, .2); }
.dn-trail .sc-words i { display: grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: #ffd84d; color: #3a2410; font-style: normal; }
.dn-trail .sc-trail-line path { stroke: #fff; stroke-width: 7; stroke-dasharray: 0.1 14; stroke-linecap: round; filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .2)); }
/* Detail page: the white ruler stands at the left edge of the scene with a label every few metres. */
.dn-row { padding-left: 2.8rem; }
.dn-vruler { left: -2.4rem; width: 2px; border-radius: 0; background: #fff; box-shadow: 0 1px 0 rgba(0, 0, 0, .35); }
.dn-vruler b { position: absolute; left: 0; top: auto; translate: 0 50%; padding-left: .7rem; font: 900 .8rem/1 Nunito, sans-serif; white-space: nowrap; color: #fff; text-shadow: 0 1px 0 rgba(0, 60, 20, .8); }
.dn-vruler b::before { content: ""; position: absolute; left: 0; top: 50%; width: .55rem; height: 2px; margin-top: -1px; background: #fff; }

/* ---- Dinosaur topic, fourth pass ---------------------------------------------------------------------------------------------- */
/* Cards: as wide as the page allows, a thin gap, and every picture fitted and centred inside its box. */
.dn-grid { width: 100%; gap: .4rem; }
.dn-card { border-width: 3px; }
.dn-pic { height: 8.4rem; padding: .9rem .6rem .3rem; box-sizing: border-box; }
.dn-pic .dn-img { max-width: 88%; max-height: 100%; }
/* The shadow game: the jungle is already behind the page, so the shadow has no box of its own. */
.dn-shadow-stage { display: grid; place-items: center; width: min(30rem, 100%); min-height: 15rem; padding: 0; background: none; box-shadow: none; }
.dn-shadow-stage .dn-img { width: auto; height: auto; max-width: 80%; max-height: 14rem; object-fit: contain; }
.dn-dots { gap: .6rem; }
/* Phones: smaller buttons. */
@media (max-width: 600px) {
    .dn-actions { gap: .5rem; }
    .dn-actions .dn-roar, .dn-actions .sc-say.big { height: 2.8rem; min-height: 0; padding: 0 .8rem; font-size: .98rem; gap: .4rem; }
    .dn-actions .sc-say.big { padding-left: .4rem; }
    .dn-actions .sc-say.big .ic { width: 2rem; height: 2rem; }
    .dn-roar { font-size: .98rem; }
    .dn-acts a { padding: .45rem .9rem; font-size: .9rem; }
    .dn-choice { min-height: 2.9rem; font-size: 1.05rem; }
    .dn-next { padding: .5rem 1.2rem; font-size: 1.05rem; }
    .dn-game .sc-game-go { min-height: 2.6rem; padding: 0 1rem; font-size: 1.05rem; }
}

/* ---- Dinosaur topic, fifth pass ----------------------------------------------------------------------------------------------- */
/* Egg pairs: an open egg is white-blue, a found pair turns green with a tick, so a pair that is done never looks like an egg still to find. */
.dn-egg-back { background: linear-gradient(180deg, #f4fbff, #cfeaff); box-shadow: 0 5px 0 #8fbfe6; }
.dn-egg.found .dn-egg-back { background: linear-gradient(180deg, #b8f5c0, #4fc66a); box-shadow: 0 5px 0 #2a8f46; }
.dn-egg.found .dn-egg-back::after { content: "✓"; position: absolute; top: .25rem; right: .35rem; display: grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: #fff; color: #1f9d46; font: 900 1.05rem/1 Nunito, sans-serif; box-shadow: 0 2px 0 rgba(0, 0, 0, .2); }
/* The five stars at the end are sized to the screen, so the row never goes past the edge of a phone. */
.dn-done .sc-won, .dn-who .sc-won { gap: .4rem; max-width: 100%; }
.dn-done .sc-won span, .dn-who .sc-won span { width: min(4.2rem, 15vw); height: min(4.2rem, 15vw); }
.dn-done { width: 100%; box-sizing: border-box; padding-bottom: 1.5rem; }

/* ---- Headers (Science banners and the Dinosaur banner) -------------------------------------------------------------------------- */
/* The words keep the left part of the banner and wrap there, so the picture on the right never covers them. */
.sc-sky:has(> img) h1, .sc-sky:has(> img) p { max-width: 58%; }
.sc-sky .dn-img { position: absolute; right: .6rem; top: 50%; translate: 0 -50%; width: min(13rem, 42%); height: auto; max-height: 92%; object-fit: contain; pointer-events: none; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .4)); }

/* Bookshelf banner on phones: the neon books sit in the bottom right corner (a little smaller) and the title and the filter chips keep the left,
   so the "Baharu" chip is no longer drawn over the books. */
@media (max-width: 600px) {
    .rd-library-head.sc-sky h1 { max-width: 100%; }
    .rd-library-head.sc-sky .rd-shelf-sub { max-width: 100%; }
    .rd-library-head.sc-sky .rd-chips { max-width: 58%; }
    .rd-library-head.sc-sky .rd-chip { min-height: 2.4rem; padding: 0 .9rem; font-size: .95rem; }
    .rd-neon { top: auto; bottom: .8rem; right: 1rem; translate: none; scale: .75; transform-origin: 100% 100%; }
}

/* The Dinosaur banner: the same card as the Science banners, but a plain sky and one green hill, so the words stay easy to read. */
.sc-sky.dn-sky { background: radial-gradient(120% 70% at 30% 118%, #4fb35c 0 55%, transparent 56%), radial-gradient(90% 60% at 95% 125%, #3f9e4f 0 55%, transparent 56%), linear-gradient(180deg, #8fd4ff 0%, #d4f3ff 55%, #e6f9cf 100%); }
.sc-sky.dn-sky h1 { color: #14602f; text-shadow: 0 2px 0 #fff, 0 4px 8px rgba(255, 255, 255, .6); }
.sc-sky.dn-sky p { color: #1d5a35; text-shadow: 0 1px 0 #fff; }

/* Home cards: the gap between the two columns was 2.6rem (plus the tilt), so the cards looked narrow with a big hole in the middle.
   Keep the gap small and let the grid use the full width of the page. */
.hm-tiles { column-gap: .9rem; row-gap: 1.6rem; max-width: 56rem; }
@media (max-width: 600px) {
    .hm-tiles { column-gap: .6rem; row-gap: 1.3rem; margin-inline: -.3rem; }
    .hm-tile { padding: .5rem .5rem .8rem; }
    .hm-tiles li:nth-child(odd) .hm-tile { transform: rotate(-1.5deg); }
    .hm-tiles li:nth-child(even) .hm-tile { transform: rotate(1.2deg); }
}

/* ---- Dinosaur topic, sixth pass ------------------------------------------------------------------------------------------------- */
/* The name sits on a white plate so it can be read on any part of the jungle. */
.dn-plate { width: fit-content; max-width: 78%; margin: 0 auto; padding: .35rem 1.4rem .5rem; border: 3px solid #ffd84d; border-radius: 1.2rem; background: #fff; text-align: center; box-shadow: 0 4px 0 #1b5c2a, 0 10px 16px -6px rgba(0, 0, 0, .45); }
.dn-stage .dn-plate h1 { color: #1e6b2f; text-shadow: none; font-size: clamp(1.7rem, 8vw, 2.4rem); overflow-wrap: anywhere; }
.dn-stage .dn-plate p { margin: .15rem 0 0; color: #7a4a12; text-shadow: none; font-size: clamp(.85rem, 3.6vw, 1.05rem); }
.dn-stage .sc-arrow { top: 2.6rem; }
/* The dinosaur stands in the middle of the scene, with the child and the car (open-source 3D pictures) on the ground under it. */
.dn-row { padding-right: 2.8rem; }
.dn-lane { margin-inline: auto; }
.dn-refs { justify-content: center; gap: 8%; margin-top: 1.4rem; }
.dn-kid { width: max(1.7rem, calc(.36 / var(--span) * 100%)); height: auto; filter: drop-shadow(0 3px 2px rgba(0, 0, 0, .45)); }
.dn-car { width: calc(4.5 / var(--span) * 100%); min-width: 3.4rem; height: auto; filter: drop-shadow(0 4px 3px rgba(0, 0, 0, .45)); }
.dn-legend span { padding: .15rem .7rem; border-radius: 999px; background: #fff; color: #1e4d2a; text-shadow: none; box-shadow: 0 2px 0 rgba(0, 0, 0, .25); }
/* Before / next: two compact cards with the neighbour's picture in a round window. */
.dn-pn { display: flex; gap: .6rem; width: min(46rem, 100%); }
.dn-pn > * { flex: 1 1 0; min-width: 0; }
.dn-pn-a { --dc: #4b2fa3; display: flex; align-items: center; gap: .4rem; min-height: 3.6rem; padding: .3rem .55rem; border: 2px solid var(--dc); border-radius: 1.2rem; background: #fff; color: #2a2150 !important; text-decoration: none; box-shadow: 0 4px 0 color-mix(in srgb, var(--dc) 65%, #000); }
.dn-pn-a.next { justify-content: flex-end; border-color: #fff; background: linear-gradient(135deg, #7b4fe0, #4c2bb0); color: #fff !important; box-shadow: 0 4px 0 #2f1a80; }
.dn-pn-a:active { transform: translateY(3px); box-shadow: none; }
.dn-pn-a .tx { display: grid; min-width: 0; line-height: 1.1; }
.dn-pn-a.next .tx { text-align: right; }
.dn-pn-a small { font-size: .68rem; font-weight: 800; opacity: .75; }
.dn-pn-a b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .98rem; font-weight: 900; }
.dn-pn-a .th { display: grid; place-items: center; flex: none; width: 2.7rem; height: 2.7rem; border-radius: 50%; background: color-mix(in srgb, var(--dl, #eee8ff) 35%, #fff); box-shadow: 0 0 0 2px var(--dc, #fff); overflow: hidden; }
.dn-pn-a.next .th { background: #fff; box-shadow: none; }
.dn-pn-a .th .dn-img { width: 82%; height: auto; max-height: 70%; object-fit: contain; }
.dn-pn-a .th i { font-style: normal; font-size: 1.3rem; }
.dn-pn-a .go { display: grid; place-items: center; flex: none; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--dc); color: #fff; font-size: 1.1rem; font-weight: 900; line-height: 1; }
.dn-pn-a.next .go { background: #ffd84d; color: #4a2f00; }
/* Cards: a few light grey trees inside each card, behind the picture (not on the page). */
.dn-card { position: relative; isolation: isolate; }
.dn-card::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5; pointer-events: none; background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 96'%3E%3Crect x='27' y='70' width='6' height='26' fill='%238d93a0'/%3E%3Cpath d='M30 2L50 34H40L54 58H40L58 80H2L20 58H6L20 34H10Z' fill='%23aab0bd'/%3E%3C/svg%3E") 4% 70% / 22% auto no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 90'%3E%3Crect x='27' y='50' width='6' height='40' fill='%238d93a0'/%3E%3Ccircle cx='30' cy='30' r='26' fill='%23aab0bd'/%3E%3Ccircle cx='18' cy='40' r='14' fill='%23aab0bd'/%3E%3Ccircle cx='43' cy='40' r='14' fill='%23aab0bd'/%3E%3C/svg%3E") 96% 60% / 18% auto no-repeat; }

/* Cards, centring: the picture box has the same space on all four sides and the picture is fitted and centred inside it, whatever the
   proportions of the picture (a picture staff uploaded is not always the same shape as the built-in one). Trees are smaller. */
.dn-pic { height: 8.6rem; padding: .75rem; box-sizing: border-box; }
.dn-pic .dn-img { width: 100%; height: 100%; max-width: none; max-height: none; object-fit: contain; object-position: center; }
.dn-card::before { background-position: 5% 78%, 95% 70%; background-size: 14% auto, 12% auto; opacity: .45; }

/* Stage: "Kamu" and "Kereta" sit side by side, and the jungle is a little paler so the picture and the labels stand out. */
.dn-stage { background: linear-gradient(rgba(255, 255, 255, .32), rgba(255, 255, 255, .32)), #3d8f4a url(dino/jungle.svg) center / cover no-repeat; }
.dn-row { padding-inline: 2.8rem; }
.dn-legend { flex-wrap: nowrap; gap: .4rem; margin-inline: -2.4rem; white-space: nowrap; }
.dn-legend span { padding: .15rem .55rem; font-size: clamp(.72rem, 3.3vw, .9rem); }

/* Trail: every dinosaur is fitted into the same box, so a picture is never bigger than the others, whatever its own size or proportions. */
.dn-trail .sc-orb { width: 10rem; height: 6.6rem; }
.dn-trail .sc-orb .dn-img { width: 100%; height: 100%; max-width: none; max-height: none; object-fit: contain; object-position: center bottom; }
/* A paler jungle behind the lists and the games. */
.dn:not(.dn-one)::before { background: linear-gradient(rgba(255, 255, 255, .38), rgba(255, 255, 255, .38)), #8fd4ff url(dino/jungle.svg) center bottom / cover no-repeat; }

/* "Siapa dia?": the title sits on a white plate (it was white on the pale sky), and the five round dots became stars:
   done = gold, now = bigger gold, still to come = pale grey. */
.dn-q { width: fit-content; max-width: 92%; margin-inline: auto; padding: .45rem 1.6rem .6rem; border: 3px solid #ffd84d; border-radius: 1.3rem; background: #fff; box-shadow: 0 4px 0 #1b5c2a, 0 10px 16px -6px rgba(0, 0, 0, .4); }
.dn-q h1 { color: #1e6b2f; text-shadow: none; }
.dn-q p { color: #7a4a12; text-shadow: none; }
.dn-dots { align-items: center; gap: .35rem; filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .25)); }
.dn-dots li { width: 1.7rem; height: 1.7rem; border-radius: 0; background: #d9dde3; clip-path: polygon(50% 0, 62% 35%, 98% 36%, 69% 57%, 80% 92%, 50% 71%, 20% 92%, 31% 57%, 2% 36%, 38% 35%); box-shadow: none; }
.dn-dots li.done { background: #ffc21a; }
.dn-dots li.now { width: 2.2rem; height: 2.2rem; background: #ffd84d; box-shadow: none; animation: sc-bob 1.4s ease-in-out infinite; }

/* ---- "Siapa dia?" as a fossil dig ----------------------------------------------------------------------------------------------- */
/* The page is a cross-section: sky, a grass strip and three layers of soil. The dinosaur is a dark shape buried in the soil, the title
   is a wooden sign hanging in the sky, and each answer is a bone half buried in the ground (the dot is the dinosaur's colour). */
.dn-who::before { background:
    radial-gradient(rgba(0, 0, 0, .22) 2px, transparent 3px) 0 19rem / 22px 22px,
    linear-gradient(#bfe6ff 0 19rem, #5fb04a 19rem 20rem, #9a6430 20rem 36%, #845326 36% 62%, #6d4220 62%); }
.dn-who .dn-q { position: relative; margin-top: 1.8rem; padding: .5rem 1.4rem .6rem; border: 4px solid #7a4a1a; border-radius: 1rem;
    background: repeating-linear-gradient(90deg, #c58a4b 0 38px, #b97c3c 38px 40px); box-shadow: 0 6px 0 #4a2a0a, inset 0 2px 0 rgba(255, 255, 255, .27); }
.dn-who .dn-q::before { content: ""; position: absolute; left: 12%; right: 12%; top: -1.7rem; height: 1.7rem;
    background: linear-gradient(#5a3a1a, #5a3a1a) 0 0 / 5px 100% no-repeat, linear-gradient(#5a3a1a, #5a3a1a) 100% 0 / 5px 100% no-repeat; }
.dn-who .dn-q h1 { color: #fff4d0; text-shadow: 0 3px 0 #4a2a0a; font: 900 clamp(1.7rem, 8vw, 2.3rem)/1.05 Nunito, sans-serif; white-space: nowrap; }
.dn-who .dn-q p { margin: .1rem 0 0; color: #fff4d0; text-shadow: 0 2px 0 #4a2a0a; font-size: .9rem; }
.dn-who .dn-dots { margin-top: .35rem; }
.dn-who .dn-dots li { width: 1.4rem; height: 1.4rem; }
.dn-who .dn-dots li.now { width: 1.8rem; height: 1.8rem; }
/* The buried dinosaur: a dark shape pressed into the soil; it shows its real colours when it is found. */
.dn-who .dn-img.dn-shadow { opacity: .4; mix-blend-mode: multiply; filter: brightness(0); }
.dn-who .dn-shadow-stage.solved .dn-img { mix-blend-mode: normal; opacity: 1; }
.dn-who .dn-clue { padding: .7rem 1rem; border: 3px dashed #b88a4a; border-radius: 1rem; background: #fff8e6; color: #5a3411; text-shadow: none; }
/* Answers: a dinosaur egg for each name, with speckles in the dinosaur's colour. */
.dn-who .dn-choices { gap: .7rem .5rem; }
.dn-who .dn-choice { position: relative; min-height: 4.8rem; padding: .3rem .6rem; border: 0; border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%; color: #4a2a0a !important; text-shadow: none; text-align: center;
    font: 900 .95rem/1.1 Nunito, sans-serif; overflow: hidden;
    background:
        radial-gradient(circle at 14% 30%, color-mix(in srgb, var(--dc) 70%, transparent) 0 .5rem, transparent .55rem),
        radial-gradient(circle at 86% 46%, color-mix(in srgb, var(--dc) 70%, transparent) 0 .38rem, transparent .43rem),
        radial-gradient(circle at 24% 84%, color-mix(in srgb, var(--dc) 70%, transparent) 0 .32rem, transparent .37rem),
        radial-gradient(circle at 78% 86%, color-mix(in srgb, var(--dc) 70%, transparent) 0 .45rem, transparent .5rem),
        radial-gradient(circle at 35% 22%, rgba(255, 255, 255, .7), transparent 32%),
        linear-gradient(#fff4dc, #f1dcae);
    box-shadow: 0 6px 0 #4a2a0a, inset 0 -6px 0 rgba(0, 0, 0, .08); }
.dn-who .dn-choice span { padding: .15rem .8rem; border-radius: 999px; background: rgba(255, 255, 255, .72); }
.dn-who .dn-choice:active { transform: translateY(4px); box-shadow: 0 2px 0 #4a2a0a; }
.dn-who .dn-choice.bad { filter: grayscale(1) brightness(.75); opacity: .6; }
/* Progress: glossy rounded stars; the one being asked is bigger and shines, the ones to come are carved dark. */
.dn-who .dn-dots { align-items: flex-end; gap: .15rem; filter: none; }
.dn-who .dn-dots li { width: 1.7rem; height: 1.85rem; border-radius: 0; clip-path: none; box-shadow: none; animation: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 108'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23fff3a0'/%3E%3Cstop offset='.5' stop-color='%23ffc928'/%3E%3Cstop offset='1' stop-color='%23f08a00'/%3E%3C/linearGradient%3E%3ClinearGradient id='e' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%236b4220'/%3E%3Cstop offset='1' stop-color='%234a2a0a'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpolygon points='50.0,14.0 61.2,36.6 86.1,40.3 68.1,57.9 72.3,82.7 50.0,71.0 27.7,82.7 31.9,57.9 13.9,40.3 38.8,36.6' fill='url(%23e)' stroke='url(%23e)' stroke-width='10' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.dn-who .dn-dots li.done { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 108'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23fff3a0'/%3E%3Cstop offset='.5' stop-color='%23ffc928'/%3E%3Cstop offset='1' stop-color='%23f08a00'/%3E%3C/linearGradient%3E%3ClinearGradient id='e' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%236b4220'/%3E%3Cstop offset='1' stop-color='%234a2a0a'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpolygon points='50.0,14.0 61.2,36.6 86.1,40.3 68.1,57.9 72.3,82.7 50.0,71.0 27.7,82.7 31.9,57.9 13.9,40.3 38.8,36.6' fill='%23c97300' stroke='%23c97300' stroke-width='12' stroke-linejoin='round' transform='translate(0,4)'/%3E%3Cpolygon points='50.0,14.0 61.2,36.6 86.1,40.3 68.1,57.9 72.3,82.7 50.0,71.0 27.7,82.7 31.9,57.9 13.9,40.3 38.8,36.6' fill='url(%23g)' stroke='url(%23g)' stroke-width='11' stroke-linejoin='round'/%3E%3Cellipse cx='40' cy='36' rx='9' ry='5' fill='%23fff' opacity='.75' transform='rotate(-30 40 36)'/%3E%3C/svg%3E"); }
.dn-who .dn-dots li.now { width: 2.3rem; height: 2.5rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 108'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23fff3a0'/%3E%3Cstop offset='.5' stop-color='%23ffc928'/%3E%3Cstop offset='1' stop-color='%23f08a00'/%3E%3C/linearGradient%3E%3ClinearGradient id='e' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%236b4220'/%3E%3Cstop offset='1' stop-color='%234a2a0a'/%3E%3C/linearGradient%3E%3C/defs%3E%3Ccircle cx='50' cy='54' r='48' fill='%23fff3a0' opacity='.35'/%3E%3Cpolygon points='50.0,14.0 61.2,36.6 86.1,40.3 68.1,57.9 72.3,82.7 50.0,71.0 27.7,82.7 31.9,57.9 13.9,40.3 38.8,36.6' fill='%23c97300' stroke='%23c97300' stroke-width='12' stroke-linejoin='round' transform='translate(0,4)'/%3E%3Cpolygon points='50.0,14.0 61.2,36.6 86.1,40.3 68.1,57.9 72.3,82.7 50.0,71.0 27.7,82.7 31.9,57.9 13.9,40.3 38.8,36.6' fill='url(%23g)' stroke='url(%23g)' stroke-width='11' stroke-linejoin='round'/%3E%3Cellipse cx='40' cy='36' rx='9' ry='5' fill='%23fff' opacity='.75' transform='rotate(-30 40 36)'/%3E%3Cpath d='M90 8 l3 8 l8 3 l-8 3 l-3 8 l-3 -8 l-8 -3 l8 -3z' fill='%23fff'/%3E%3C/svg%3E"); animation: sc-bob 1.4s ease-in-out infinite; }

/* "Siapa dia?": the soil background must beat the jungle that every other dinosaur page uses (that rule has two classes, so this one has three). */
.dn.dn-who:not(.dn-one)::before { background:
    radial-gradient(rgba(0, 0, 0, .22) 2px, transparent 3px) 0 19rem / 22px 22px,
    linear-gradient(#bfe6ff 0 19rem, #5fb04a 19rem 20rem, #9a6430 20rem 36%, #845326 36% 62%, #6d4220 62%); }

/* Pictures fitted for real: the picture is laid over its box with fixed edges (not sized by a percentage, which a grid ignores), so a tall,
   wide or oddly shaped picture (a photo staff uploaded, say) always stays inside the box, centred, with the same space on every side. */
.dn-pic { position: relative; overflow: hidden; }
.dn-pic .dn-img { position: absolute; inset: .75rem; width: calc(100% - 1.5rem); height: calc(100% - 1.5rem); max-width: none; max-height: none; object-fit: contain; object-position: center; }
.dn-trail .sc-orb { overflow: visible; }
.dn-trail .sc-orb .dn-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: center bottom; }
.dn-egg-back { overflow: hidden; }
.dn-egg-back .dn-img { position: absolute; inset: .35rem; width: calc(100% - .7rem); height: calc(100% - .7rem); max-height: none; object-fit: contain; object-position: center; }

/* ---- Dinosaur page, new layout (arrows beside the name, a strip of small pictures, a ruler on the edge, one round roar button) -------- */
.dn-stage { padding: .9rem .8rem 1rem; background: linear-gradient(rgba(255, 255, 255, .58), rgba(255, 255, 255, .58)), #8fd4ff url(dino/jungle.svg) center bottom / cover no-repeat; color: #1e4d2a; }
.dn-namerow { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.dn-namerow .dn-plate { flex: 1 1 auto; max-width: none; margin: 0; min-width: 0; }
.dn-arrow, .dn-arrow-gap { flex: none; width: 2.9rem; height: 2.9rem; }
.dn-arrow { display: grid; place-items: center; border-radius: 50%; background: #ffd84d; color: #6a4300 !important; box-shadow: 0 4px 0 #b88a00; }
.dn-arrow:active { transform: translateY(3px); box-shadow: none; }
.dn-strip { display: flex; justify-content: space-between; gap: .2rem; margin: .8rem 0 0; padding: 0; list-style: none; }
.dn-strip a { position: relative; display: block; width: min(2.7rem, 10.4vw); aspect-ratio: 1; overflow: hidden; border-radius: 50%; background: rgba(255, 255, 255, .92); box-shadow: 0 0 0 2px rgba(255, 255, 255, .7), 0 3px 0 rgba(0, 0, 0, .25); }
.dn-strip a.on { background: #ffd84d; box-shadow: 0 0 0 3px #fff, 0 3px 0 rgba(0, 0, 0, .3); scale: 1.15; z-index: 1; }
.dn-strip .dn-img { position: absolute; inset: 14%; width: 72%; height: 72%; object-fit: contain; }
.dn-row { margin-top: 1rem; padding: 0; }
.dn-top { position: relative; padding: 0 3.2rem; }
.dn-top .dn-vruler { left: .3rem; top: 0; bottom: 0; width: 3px; border-radius: 2px; background: #2a6a3a; box-shadow: none; }
.dn-top .dn-vruler b { left: 0; padding-left: .8rem; color: #1e4d2a; text-shadow: 0 1px 0 #fff; font-size: .78rem; }
.dn-top .dn-vruler b::before { background: #2a6a3a; width: .6rem; }
.dn-ground { height: 5px; margin: 0 .3rem; border-radius: 3px; background: #5b3a14; opacity: .7; }
.dn-refs { justify-content: center; gap: 8%; margin: .5rem 3.2rem 0; }
.dn-legend { flex-wrap: nowrap; gap: .35rem; margin: .8rem 0 0; white-space: nowrap; }
.dn-legend span { padding: .15rem .55rem; font-size: clamp(.68rem, 3.1vw, .88rem); }
/* One big round roar button, and a small round listen button beside it. */
.dn-actions { position: relative; justify-content: center; flex-wrap: nowrap; margin-top: .9rem; }
.dn-actions .dn-roar { flex: none; display: grid; justify-items: center; gap: .25rem; width: auto; height: auto; min-height: 0; margin: 0; padding: 0; border: 0; background: none; box-shadow: none; font-size: 1rem; }
.dn-roar .ic { display: grid; place-items: center; width: 4.8rem; height: 4.8rem; border-radius: 50%; background: radial-gradient(circle at 35% 28%, #ffb07a, #ff7a3d 60%); font-size: 2.2rem; box-shadow: 0 5px 0 #b8501f; }
.dn-roar:active .ic { transform: translateY(4px); box-shadow: 0 1px 0 #b8501f; }
.dn-roar b { color: #b8501f; font: 900 .95rem/1 Nunito, sans-serif; text-shadow: 0 1px 0 #fff; }
.dn-actions .dn-ear { position: absolute; right: .9rem; top: .9rem; display: grid; place-items: center; flex: none; width: 3rem; height: 3rem; min-height: 0; margin: 0; padding: 0; border-radius: 50%; background: #7b4fe0; color: #fff; box-shadow: 0 4px 0 #4b2fa3; }
.dn-actions .dn-ear svg { width: 1.5rem; height: 1.5rem; }
/* The facts: three cards side by side, swiped one at a time. */
.dn-facts { display: flex; gap: .6rem; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; width: min(46rem, 100%); }
.dn-facts::-webkit-scrollbar { display: none; }
.dn-facts li { position: relative; flex: 0 0 100%; box-sizing: border-box; scroll-snap-align: center; }
.dn-facts .n { position: absolute; right: 1rem; bottom: .3rem; color: #8a7aa8; font-size: .75rem; font-weight: 800; }
.dn-swipehint { margin: 0; color: #7b4fe0; text-align: center; font-weight: 900; font-size: .85rem; }

/* ---- Dinosaur pages, round 12 ---- */

/* Strip of small pictures: smaller round pictures with even space, so all eight fit in one row without touching. */
.dn-strip { flex-wrap: nowrap; margin: 1rem 0 .9rem; }
.dn-strip a { width: min(2.5rem, 9vw); }

/* Roar and listen: one soft capsule split in two halves of the same size and style. */
.dn-actions { display: flex; flex-wrap: nowrap; gap: 0; width: min(21rem, 100%); margin: .9rem auto 0; padding: 0; overflow: hidden; border: 4px solid #fff; border-radius: 999px; background: #fff; box-shadow: 0 5px 0 #e6dcf5; }
.dn-actions .dn-roar, .dn-actions .dn-ear { position: static; flex: 1 1 0; display: flex; align-items: center; justify-content: center; gap: .45rem; width: auto; height: 3.4rem; min-height: 0; margin: 0; padding: 0 .6rem; border: 0; border-radius: 0; box-shadow: none; font: 900 1.15rem/1 Nunito, sans-serif; cursor: pointer; }
.dn-actions .dn-roar { background: #ffd9c2; color: #a24a1c; }
.dn-actions .dn-ear { background: #e0d6fb; color: #4b2fa3; }
.dn-actions .dn-roar .ic { display: inline; width: auto; height: auto; background: none; box-shadow: none; font-size: 1.4rem; }
.dn-actions .dn-roar b, .dn-actions .dn-ear b { color: inherit; font: inherit; text-shadow: none; }
.dn-actions .dn-ear svg { width: 1.4rem; height: 1.4rem; }
.dn-actions .dn-roar:active, .dn-actions .dn-ear:active { transform: none; filter: brightness(.94); }

/* Facts: one card that stays where it is; the round numbers under it choose the fact (no sideways swipe). */
.dn-fx { display: grid; gap: .7rem; width: min(46rem, 100%); }
.dn-fr { position: absolute; width: 1px; height: 1px; margin: -1px; opacity: 0; overflow: hidden; clip-path: inset(50%); }
.dn-fx .dn-facts { display: grid; overflow: visible; scroll-snap-type: none; width: 100%; gap: 0; }
.dn-fx .dn-facts li { display: none; flex: none; min-height: 5rem; scroll-snap-align: none; }
#dn-f1:checked ~ .dn-facts li:nth-child(1), #dn-f2:checked ~ .dn-facts li:nth-child(2), #dn-f3:checked ~ .dn-facts li:nth-child(3) { display: flex; }
.dn-fn { display: flex; align-items: center; justify-content: center; gap: .6rem; }
.dn-fn span { color: #8a7aa8; font-weight: 900; font-size: .9rem; }
.dn-fn label { display: grid; place-items: center; width: 2.7rem; height: 2.7rem; border-radius: 50%; background: #fff; color: #7b4fe0; font: 900 1.15rem/1 Nunito, sans-serif; box-shadow: 0 4px 0 #d9d0f5; cursor: pointer; }
#dn-f1:checked ~ .dn-fn label:nth-of-type(1), #dn-f2:checked ~ .dn-fn label:nth-of-type(2), #dn-f3:checked ~ .dn-fn label:nth-of-type(3) { background: #7b4fe0; color: #fff; box-shadow: 0 4px 0 #4b2fa3; }
#dn-f1:focus-visible ~ .dn-fn label:nth-of-type(1), #dn-f2:focus-visible ~ .dn-fn label:nth-of-type(2), #dn-f3:focus-visible ~ .dn-fn label:nth-of-type(3) { outline: 3px solid #ffd84d; outline-offset: 2px; }

/* Trail: bigger dinosaurs, with a taller row so the picture always ends well above the name pill. */
.dn-trail li { height: 14.5rem; }
.dn-trail .sc-orb { top: 39%; width: 11.5rem; height: 8.6rem; }
.dn-trail .sc-words { top: 84%; }

/* "Siapa dia?": plain sky and soil (no dots), and a canvas banner for the title with a torn lower edge. */
.dn-who::before, .dn.dn-who:not(.dn-one)::before { background: linear-gradient(#bfe6ff 0 19rem, #5fb04a 19rem 20rem, #9a6430 20rem 36%, #845326 36% 62%, #6d4220 62%); }
.dn-who .dn-q { margin-top: 1rem; padding: 1rem 1.4rem 1.7rem; border: 4px solid #7a5a2a; border-radius: .4rem .4rem 0 0; background: #f7ecd0; box-shadow: none;
    clip-path: polygon(0 0, 100% 0, 100% 90%, 92% 100%, 84% 90%, 76% 100%, 68% 90%, 60% 100%, 52% 90%, 44% 100%, 36% 90%, 28% 100%, 20% 90%, 12% 100%, 4% 90%, 0 100%); }
.dn-who .dn-q::before { content: none; }
.dn-who .dn-q::after { content: ""; position: absolute; inset: .45rem; border: 2px dashed #b88a4a; border-radius: .3rem; pointer-events: none; }
.dn-who .dn-q h1 { color: #6b3f12; text-shadow: none; }
.dn-who .dn-q p { color: #9a6a2a; text-shadow: none; font-weight: 800; }
.dn-who .dn-q .dn-dots { width: fit-content; margin: .5rem auto 0; padding: .35rem 1rem .2rem; border-radius: 999px; background: #8a5a2a; }

/* ---- Round 13 ---- */
.dn-stage .dn-plate h1 { font-size: clamp(1rem, 5.4vw, 2rem); white-space: nowrap; overflow-wrap: normal; }
.dn-strip a.on { scale: 1; }
.dn-refs { align-items: flex-end; }
.dn-refs figure { display: grid; justify-items: center; gap: .45rem; margin: 0; }
.dn-refs figcaption { padding: .15rem .6rem; border-radius: 999px; background: #fff; color: #1e4d2a; font: 900 clamp(.72rem, 3.3vw, .9rem)/1.2 Nunito, sans-serif; white-space: nowrap; box-shadow: 0 2px 0 rgba(0, 0, 0, .25); }
.dn-trail .sc-words { top: 76%; }
.dn-who { overflow-x: clip; }
.dn-who .dn-q { width: 100vw; max-width: none; margin-inline: calc(50% - 50vw); box-sizing: border-box; border-inline: 0; border-radius: 0; clip-path: none; padding-bottom: 1rem; }
.dn-who .dn-q .dn-dots { width: 100%; box-sizing: border-box; justify-content: center; border-radius: 1rem; }
.dn-fx .dn-fn { justify-content: space-between; padding: 0 .3rem; }
.dn-nums { display: flex; gap: .45rem; }
.dn-fn label { width: 2.3rem; height: 2.3rem; font-size: 1rem; }
.dn-refs { margin: .6rem 0 0; gap: 6%; }
.dn-refs figure:has(.dn-kid) { width: max(1.7rem, calc(.36 / var(--span) * 100%)); }
.dn-refs figure:has(.dn-car) { width: max(3.4rem, calc(4.5 / var(--span) * 100%)); }
.dn-refs .dn-kid, .dn-refs .dn-car { width: 100%; min-width: 0; }
.dn-refs figcaption { justify-self: center; font-size: clamp(.66rem, 3vw, .85rem); padding-inline: .5rem; }

/* ---- Round 14 ---- */
/* The child and the car keep their scale: the figure has a fixed width and the name pill may be wider than it without stretching the picture. */
.dn-refs figure { display: flex; flex-direction: column; align-items: center; }
.dn-refs figcaption { width: max-content; }

/* Facts: one white card with a header (purple "Fakta" tab on the left, round numbers on the right) and the fact under a dashed line. */
.dn-fx { gap: .3rem; padding: .7rem .9rem .8rem; border-radius: 1.4rem; background: #fff; box-shadow: 0 5px 0 #d9cffa; }
.dn-fx .dn-fn { padding: 0 0 .6rem; border-bottom: 2px dashed #e3d9fb; }
.dn-fn span { display: inline-flex; align-items: center; gap: .3rem; padding: .3rem .9rem; border-radius: 999px; background: #7b4fe0; color: #fff; font-size: .95rem; box-shadow: 0 3px 0 #4b2fa3; }
.dn-fn span::before { content: "⭐"; font-size: .9rem; }
.dn-fn label { width: 2.1rem; height: 2.1rem; background: #f1ebff; box-shadow: none; }
#dn-f1:checked ~ .dn-fn label:nth-of-type(1), #dn-f2:checked ~ .dn-fn label:nth-of-type(2), #dn-f3:checked ~ .dn-fn label:nth-of-type(3) { box-shadow: 0 3px 0 #4b2fa3; }
.dn-fx .dn-facts li { padding: .5rem .1rem 0; background: none; box-shadow: none; }
.dn-fx .dn-facts li > span[aria-hidden] { display: none; }

/* ---- Round 15 ---- */
/* Facts: the header is a full-width purple band with a big white title and the round numbers (the chosen one is yellow). */
.dn-fx { padding: 0 0 .8rem; overflow: hidden; }
.dn-fx .dn-fn { padding: .6rem 1rem; border-bottom: 0; background: linear-gradient(#8f68f0, #6b3fd6); }
.dn-fn span { padding: 0; background: none; box-shadow: none; color: #fff; font: 900 clamp(1.3rem, 6.2vw, 1.7rem)/1.1 Nunito, sans-serif; text-shadow: 0 2px 0 #4b2fa3; }
.dn-fn span::before { content: "💡"; font-size: inherit; }
.dn-fn label { background: rgba(255, 255, 255, .3); color: #fff; }
#dn-f1:checked ~ .dn-fn label:nth-of-type(1), #dn-f2:checked ~ .dn-fn label:nth-of-type(2), #dn-f3:checked ~ .dn-fn label:nth-of-type(3) { background: #ffd84d; color: #5a3a00; box-shadow: 0 3px 0 #b88a00; }
.dn-fx .dn-facts li { padding: .8rem 1rem 0; }

/* "Siapa dia?": excavation zone banner, a sand panel between two yellow and black warning tapes. */
.dn-who .dn-q { padding: 2.6rem 1rem 2.8rem; background: #efd9a0; border: 0; box-shadow: 0 6px 0 rgba(0, 0, 0, .25); }
.dn-who .dn-q::before, .dn-who .dn-q::after { content: ""; position: absolute; left: 0; right: 0; width: auto; height: 1.7rem; inset: auto 0; border: 0; border-radius: 0; background: repeating-linear-gradient(135deg, #ffd84d 0 22px, #2b2b2b 22px 44px); pointer-events: none; }
.dn-who .dn-q::before { top: 0; }
.dn-who .dn-q::after { bottom: 0; top: auto; }
.dn-who .dn-q .dn-zone { display: block; color: #8a5a12; font: 900 .75rem/1 Nunito, sans-serif; letter-spacing: .2rem; }
.dn-who .dn-q h1 { color: #6b3f12; }

/* ---- Round 16 ---- */
/* The person, the car and the dinosaur stand in one line at one scale: the line is as tall as the tallest of them (aspect ratio from --tot and --hm). */
.dn-line { position: relative; aspect-ratio: calc(var(--tot) / var(--hm)); }
.dn-line .dn-kid, .dn-line .dn-car, .dn-line .dn-lane { position: absolute; bottom: 0; margin: 0; min-width: 0; height: auto; }
.dn-line .dn-kid { left: 0; width: var(--kw); }
.dn-line .dn-car { left: var(--cx); width: var(--cw); }
.dn-line .dn-lane { left: var(--lx); width: var(--lw); }
.dn-top { margin-bottom: 0; }

/* "Siapa dia?": the progress marks are dinosaur footprints (golden when earned, dark when not, the current one bigger). */
.dn-who .dn-dots li { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg fill='%237a5428' stroke='%235b3d1a' stroke-width='4'%3E%3Cellipse cx='50' cy='66' rx='23' ry='21'/%3E%3Cellipse cx='23' cy='40' rx='9' ry='14' transform='rotate(-20 23 40)'/%3E%3Cellipse cx='50' cy='28' rx='9' ry='15'/%3E%3Cellipse cx='77' cy='40' rx='9' ry='14' transform='rotate(20 77 40)'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat; }
.dn-who .dn-dots li.done { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg fill='%23ffcf3f' stroke='%23c98a00' stroke-width='4'%3E%3Cellipse cx='50' cy='66' rx='23' ry='21'/%3E%3Cellipse cx='23' cy='40' rx='9' ry='14' transform='rotate(-20 23 40)'/%3E%3Cellipse cx='50' cy='28' rx='9' ry='15'/%3E%3Cellipse cx='77' cy='40' rx='9' ry='14' transform='rotate(20 77 40)'/%3E%3C/g%3E%3Cellipse cx='42' cy='58' rx='9' ry='5' fill='%23fff' opacity='.55' transform='rotate(-30 42 58)'/%3E%3C/svg%3E"); }
.dn-who .dn-dots li.now { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='52' r='48' fill='%23fff3a0' opacity='.4'/%3E%3Cg fill='%23ffcf3f' stroke='%23c98a00' stroke-width='4'%3E%3Cellipse cx='50' cy='66' rx='23' ry='21'/%3E%3Cellipse cx='23' cy='40' rx='9' ry='14' transform='rotate(-20 23 40)'/%3E%3Cellipse cx='50' cy='28' rx='9' ry='15'/%3E%3Cellipse cx='77' cy='40' rx='9' ry='14' transform='rotate(20 77 40)'/%3E%3C/g%3E%3Cellipse cx='42' cy='58' rx='9' ry='5' fill='%23fff' opacity='.55' transform='rotate(-30 42 58)'/%3E%3C/svg%3E"); }

/* Buttons at the end of the dinosaur games: two big white tiles in one row, the same size, each with a coloured round icon. */
.dn-who .sc-end, .dn-eggs .sc-end { flex-wrap: nowrap; width: min(26rem, 100%); margin-inline: auto; gap: .8rem; }
.dn-who .sc-end .sc-btn, .dn-eggs .sc-end .sc-btn { flex: 1 1 0; min-width: 0; box-sizing: border-box; display: grid; justify-items: center; align-content: center; gap: .5rem; height: 8.4rem; padding: .6rem; border-radius: 1.8rem; background: #fff; box-shadow: 0 6px 0 rgba(0, 0, 0, .16); font: 900 1.1rem/1.1 Nunito, sans-serif; text-align: center; }
.dn-who .sc-end .sc-btn i, .dn-eggs .sc-end .sc-btn i { width: 4.2rem; height: 4.2rem; font-size: 2rem; }
.dn-who .sc-end .sc-btn.again, .dn-eggs .sc-end .sc-btn.again { background: #fff; color: #1e6b3a; }
.dn-who .sc-end .sc-btn.again i, .dn-eggs .sc-end .sc-btn.again i { background: #8fdca8; color: #14804a; }
.dn-who .sc-end .sc-btn.see, .dn-eggs .sc-end .sc-btn.see { background: #fff; color: #8a5a00; }
.dn-who .sc-end .sc-btn.see i, .dn-eggs .sc-end .sc-btn.see i { background: #ffd873; }

/* ---- Round 17: end-of-game buttons are tall glossy game buttons (green and orange) of the same size, side by side. ---- */
.dn-who .sc-end .sc-btn, .dn-eggs .sc-end .sc-btn { height: 5.8rem; gap: .2rem; border-radius: 1.6rem; color: #fff !important; text-shadow: 0 2px 0 var(--edge); box-shadow: 0 7px 0 var(--edge), inset 0 4px 0 rgba(255, 255, 255, .4); }
.dn-who .sc-end .sc-btn.again, .dn-eggs .sc-end .sc-btn.again { --edge: #12814a; background: linear-gradient(#6df0a0, #1fb560); }
.dn-who .sc-end .sc-btn.see, .dn-eggs .sc-end .sc-btn.see { --edge: #b86b00; background: linear-gradient(#ffe066, #ff9f1a); }
.dn-who .sc-end .sc-btn i, .dn-eggs .sc-end .sc-btn i { width: auto; height: auto; background: none !important; color: #fff !important; font-size: 2.1rem; text-shadow: 0 2px 0 var(--edge); }

/* ---- Round 18 ---- */
/* The small pickaxes flank the zone label; the footprints sit on one centre line in equal boxes, so the bigger current one grows evenly in every direction. */
.dn-who .dn-q .dn-zone span { font-size: .85rem; letter-spacing: 0; }
.dn-who .dn-q .dn-dots { align-items: center; justify-content: center; gap: .5rem; padding: .35rem 1rem; }
.dn-who .dn-dots li, .dn-who .dn-dots li.done, .dn-who .dn-dots li.now { width: 2.5rem; height: 2.5rem; margin: 0; background-position: center; background-size: 78%; background-repeat: no-repeat; }
.dn-who .dn-dots li.now { background-size: 100%; }

/* ---- Round 19: end-of-game buttons are white with a thick coloured border (purple, orange), so they stand out from the green background. ---- */
.dn-who .sc-end .sc-btn, .dn-eggs .sc-end .sc-btn { background: #fff !important; text-shadow: none; box-sizing: border-box; border: 5px solid var(--ring); box-shadow: 0 7px 0 var(--edge); }
.dn-who .sc-end .sc-btn.again, .dn-eggs .sc-end .sc-btn.again { --ring: #7b4fe0; --edge: #432497; color: #4b2fa3 !important; }
.dn-who .sc-end .sc-btn.see, .dn-eggs .sc-end .sc-btn.see { --ring: #ff7a3d; --edge: #a8420f; color: #b8501f !important; }
.dn-who .sc-end .sc-btn i, .dn-eggs .sc-end .sc-btn i { color: inherit !important; text-shadow: none; }

/* ---- Round 20: the ground line is thin and soft ---- */
.dn-ground { height: 2px; border-radius: 1px; background: rgba(91, 58, 20, .55); opacity: 1; }
.dn-top .dn-vruler { width: 2px; }

/* ---- Round 21: on the trail every dinosaur has a white outline and a soft glow round its body (stacked drop shadows follow the shape), then the usual shadow underneath. ---- */
.dn-trail .sc-orb .dn-img { filter: drop-shadow(0 0 1.5px #fff) drop-shadow(0 0 1.5px #fff) drop-shadow(0 0 3px #fff) drop-shadow(0 0 10px rgba(255, 255, 255, .9)) drop-shadow(0 6px 5px rgba(0, 0, 0, .3)); }

/* ---- Round 22: the brown pill round the footprints is only as wide as its footprints, so it never touches the edges of the banner. ---- */
.dn-who .dn-q .dn-dots { width: fit-content; max-width: calc(100% - 3rem); margin: .5rem auto 0; padding: .3rem 1.2rem; gap: .3rem; }
.dn-who .dn-dots li, .dn-who .dn-dots li.done, .dn-who .dn-dots li.now { width: 2.2rem; height: 2.2rem; }

/* ---- Round 23: once the dinosaur is found its picture gets a white outline and a soft glow. ---- */
.dn-who .dn-shadow-stage.solved .dn-img { filter: drop-shadow(0 0 1.5px #fff) drop-shadow(0 0 1.5px #fff) drop-shadow(0 0 3px #fff) drop-shadow(0 0 12px rgba(255, 255, 255, .9)); }

/* ---- Round 24: "Siapa dia?" soil has pebbles and specks (an uneven tile, not a regular dot grid) under the sky and grass strip. ---- */
.dn-who::before, .dn.dn-who:not(.dn-one)::before { background:
    linear-gradient(#bfe6ff 0 19rem, #5fb04a 19rem 20rem, transparent 20rem),
    url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%27200%27 height=%27200%27 viewBox=%270 0 200 200%27%3E%3Cellipse cx=%2767%27 cy=%2734%27 rx=%2710.2%27 ry=%275.8%27 fill=%27%236b4824%27 transform=%27rotate(2 67 34)%27/%3E%3Cellipse cx=%2764%27 cy=%2732%27 rx=%274.1%27 ry=%271.5%27 fill=%27%23ffffff%27 opacity=%27.12%27 transform=%27rotate(2 67 34)%27/%3E%3Cellipse cx=%27116%27 cy=%27178%27 rx=%276.7%27 ry=%273.9%27 fill=%27%23a8814f%27 transform=%27rotate(-5 116 178)%27/%3E%3Cellipse cx=%27114%27 cy=%27177%27 rx=%272.7%27 ry=%271.0%27 fill=%27%23ffffff%27 opacity=%27.12%27 transform=%27rotate(-5 116 178)%27/%3E%3Cellipse cx=%2722%27 cy=%2786%27 rx=%2711.6%27 ry=%276.8%27 fill=%27%234a2d12%27 transform=%27rotate(-17 22 86)%27/%3E%3Cellipse cx=%2719%27 cy=%2784%27 rx=%274.6%27 ry=%271.7%27 fill=%27%23ffffff%27 opacity=%27.12%27 transform=%27rotate(-17 22 86)%27/%3E%3Cellipse cx=%27185%27 cy=%27115%27 rx=%278.2%27 ry=%276.9%27 fill=%27%23a8814f%27 transform=%27rotate(-27 185 115)%27/%3E%3Cellipse cx=%27183%27 cy=%27113%27 rx=%273.3%27 ry=%271.7%27 fill=%27%23ffffff%27 opacity=%27.12%27 transform=%27rotate(-27 185 115)%27/%3E%3Cellipse cx=%2760%27 cy=%2732%27 rx=%275.9%27 ry=%273.8%27 fill=%27%23a8814f%27 transform=%27rotate(19 60 32)%27/%3E%3Cellipse cx=%2759%27 cy=%2731%27 rx=%272.4%27 ry=%271.0%27 fill=%27%23ffffff%27 opacity=%27.12%27 transform=%27rotate(19 60 32)%27/%3E%3Cellipse cx=%2725%27 cy=%27114%27 rx=%276.5%27 ry=%273.8%27 fill=%27%234a2d12%27 transform=%27rotate(13 25 114)%27/%3E%3Cellipse cx=%2723%27 cy=%27112%27 rx=%272.6%27 ry=%270.9%27 fill=%27%23ffffff%27 opacity=%27.12%27 transform=%27rotate(13 25 114)%27/%3E%3Cellipse cx=%2716%27 cy=%2744%27 rx=%2710.4%27 ry=%277.1%27 fill=%27%234a2d12%27 transform=%27rotate(-11 16 44)%27/%3E%3Cellipse cx=%2714%27 cy=%2742%27 rx=%274.2%27 ry=%271.8%27 fill=%27%23ffffff%27 opacity=%27.12%27 transform=%27rotate(-11 16 44)%27/%3E%3Cellipse cx=%27180%27 cy=%2774%27 rx=%277.0%27 ry=%274.2%27 fill=%27%235b3a1a%27 transform=%27rotate(17 180 74)%27/%3E%3Cellipse cx=%27179%27 cy=%2772%27 rx=%272.8%27 ry=%271.1%27 fill=%27%23ffffff%27 opacity=%27.12%27 transform=%27rotate(17 180 74)%27/%3E%3Cellipse cx=%27114%27 cy=%27105%27 rx=%2712.0%27 ry=%279.2%27 fill=%27%235b3a1a%27 transform=%27rotate(-13 114 105)%27/%3E%3Cellipse cx=%27111%27 cy=%27102%27 rx=%274.8%27 ry=%272.3%27 fill=%27%23ffffff%27 opacity=%27.12%27 transform=%27rotate(-13 114 105)%27/%3E%3Cellipse cx=%2727%27 cy=%2784%27 rx=%2711.1%27 ry=%276.6%27 fill=%27%235b3a1a%27 transform=%27rotate(-1 27 84)%27/%3E%3Cellipse cx=%2725%27 cy=%2782%27 rx=%274.4%27 ry=%271.6%27 fill=%27%23ffffff%27 opacity=%27.12%27 transform=%27rotate(-1 27 84)%27/%3E%3Ccircle cx=%27192%27 cy=%2716%27 r=%271.4%27 fill=%27%23fff%27 opacity=%270.11%27/%3E%3Ccircle cx=%2770%27 cy=%2799%27 r=%271.6%27 fill=%27%23000%27 opacity=%270.16%27/%3E%3Ccircle cx=%27189%27 cy=%2795%27 r=%271.5%27 fill=%27%23000%27 opacity=%270.15%27/%3E%3Ccircle cx=%2762%27 cy=%27116%27 r=%271.5%27 fill=%27%23fff%27 opacity=%270.11%27/%3E%3Ccircle cx=%2777%27 cy=%27134%27 r=%270.8%27 fill=%27%23fff%27 opacity=%270.12%27/%3E%3Ccircle cx=%27122%27 cy=%2799%27 r=%271.0%27 fill=%27%23fff%27 opacity=%270.09%27/%3E%3Ccircle cx=%2750%27 cy=%2778%27 r=%271.7%27 fill=%27%23000%27 opacity=%270.10%27/%3E%3Ccircle cx=%2780%27 cy=%2756%27 r=%270.9%27 fill=%27%23fff%27 opacity=%270.17%27/%3E%3Ccircle cx=%2756%27 cy=%2783%27 r=%271.2%27 fill=%27%23fff%27 opacity=%270.18%27/%3E%3Ccircle cx=%2730%27 cy=%2735%27 r=%271.0%27 fill=%27%23000%27 opacity=%270.08%27/%3E%3Ccircle cx=%27166%27 cy=%2736%27 r=%271.1%27 fill=%27%23000%27 opacity=%270.12%27/%3E%3Ccircle cx=%2774%27 cy=%27113%27 r=%271.8%27 fill=%27%23000%27 opacity=%270.13%27/%3E%3Ccircle cx=%27174%27 cy=%27190%27 r=%271.5%27 fill=%27%23fff%27 opacity=%270.12%27/%3E%3Ccircle cx=%2779%27 cy=%2796%27 r=%271.2%27 fill=%27%23000%27 opacity=%270.09%27/%3E%3Ccircle cx=%2742%27 cy=%2732%27 r=%271.1%27 fill=%27%23000%27 opacity=%270.09%27/%3E%3Ccircle cx=%27113%27 cy=%27107%27 r=%271.7%27 fill=%27%23000%27 opacity=%270.09%27/%3E%3Ccircle cx=%2742%27 cy=%2775%27 r=%271.4%27 fill=%27%23fff%27 opacity=%270.14%27/%3E%3Ccircle cx=%2795%27 cy=%2723%27 r=%271.3%27 fill=%27%23fff%27 opacity=%270.13%27/%3E%3Ccircle cx=%2762%27 cy=%2729%27 r=%271.5%27 fill=%27%23fff%27 opacity=%270.13%27/%3E%3Ccircle cx=%27138%27 cy=%27103%27 r=%271.0%27 fill=%27%23fff%27 opacity=%270.09%27/%3E%3Ccircle cx=%27109%27 cy=%275%27 r=%271.3%27 fill=%27%23000%27 opacity=%270.15%27/%3E%3Ccircle cx=%2752%27 cy=%2773%27 r=%271.0%27 fill=%27%23000%27 opacity=%270.13%27/%3E%3Ccircle cx=%27156%27 cy=%2766%27 r=%271.0%27 fill=%27%23000%27 opacity=%270.16%27/%3E%3Ccircle cx=%27164%27 cy=%27148%27 r=%271.0%27 fill=%27%23fff%27 opacity=%270.12%27/%3E%3Ccircle cx=%276%27 cy=%276%27 r=%271.1%27 fill=%27%23fff%27 opacity=%270.10%27/%3E%3Ccircle cx=%27121%27 cy=%2769%27 r=%271.6%27 fill=%27%23fff%27 opacity=%270.18%27/%3E%3Ccircle cx=%2773%27 cy=%2744%27 r=%271.0%27 fill=%27%23000%27 opacity=%270.11%27/%3E%3Ccircle cx=%2797%27 cy=%27197%27 r=%271.4%27 fill=%27%23000%27 opacity=%270.13%27/%3E%3Ccircle cx=%27131%27 cy=%27160%27 r=%270.9%27 fill=%27%23000%27 opacity=%270.17%27/%3E%3Ccircle cx=%27156%27 cy=%27150%27 r=%271.3%27 fill=%27%23000%27 opacity=%270.12%27/%3E%3Ccircle cx=%27127%27 cy=%2717%27 r=%271.7%27 fill=%27%23fff%27 opacity=%270.13%27/%3E%3Ccircle cx=%27149%27 cy=%2717%27 r=%271.0%27 fill=%27%23000%27 opacity=%270.08%27/%3E%3Ccircle cx=%27118%27 cy=%2793%27 r=%271.5%27 fill=%27%23fff%27 opacity=%270.15%27/%3E%3Ccircle cx=%2770%27 cy=%27110%27 r=%270.9%27 fill=%27%23000%27 opacity=%270.16%27/%3E%3Ccircle cx=%27145%27 cy=%2721%27 r=%271.5%27 fill=%27%23000%27 opacity=%270.12%27/%3E%3Ccircle cx=%27174%27 cy=%27165%27 r=%271.0%27 fill=%27%23fff%27 opacity=%270.10%27/%3E%3Ccircle cx=%27100%27 cy=%27153%27 r=%271.1%27 fill=%27%23fff%27 opacity=%270.16%27/%3E%3Ccircle cx=%2712%27 cy=%27148%27 r=%271.7%27 fill=%27%23fff%27 opacity=%270.16%27/%3E%3Ccircle cx=%27176%27 cy=%2726%27 r=%271.0%27 fill=%27%23000%27 opacity=%270.17%27/%3E%3Ccircle cx=%27155%27 cy=%27122%27 r=%271.6%27 fill=%27%23000%27 opacity=%270.10%27/%3E%3C/svg%3E") 0 20rem / 200px 200px,
    linear-gradient(#bfe6ff 0 19rem, #5fb04a 19rem 20rem, #9a6430 20rem 36%, #845326 36% 62%, #6d4220 62%); }

/* ---- Round 25: the tape on the menu cards has soft wavy ends (a clip-path, so the colour stays the same). ---- */
.hm-tape { border-radius: 0; clip-path: polygon(4.0% 0.0%,6.0% 4.2%,7.5% 8.3%,8.0% 12.5%,7.5% 16.7%,6.0% 20.8%,4.0% 25.0%,2.0% 29.2%,0.5% 33.3%,0.0% 37.5%,0.5% 41.7%,2.0% 45.8%,4.0% 50.0%,6.0% 54.2%,7.5% 58.3%,8.0% 62.5%,7.5% 66.7%,6.0% 70.8%,4.0% 75.0%,2.0% 79.2%,0.5% 83.3%,0.0% 87.5%,0.5% 91.7%,2.0% 95.8%,4.0% 100.0%,92.6% 100.0%,94.2% 95.8%,96.2% 91.7%,98.2% 87.5%,99.6% 83.3%,100.0% 79.2%,99.4% 75.0%,97.8% 70.8%,95.8% 66.7%,93.8% 62.5%,92.4% 58.3%,92.0% 54.2%,92.6% 50.0%,94.2% 45.8%,96.2% 41.7%,98.2% 37.5%,99.6% 33.3%,100.0% 29.2%,99.4% 25.0%,97.8% 20.8%,95.8% 16.7%,93.8% 12.5%,92.4% 8.3%,92.0% 4.2%,92.6% 0.0%); }

/* The tape on the puzzle and practice pages has the same wavy ends. */
.mg-tape { clip-path: polygon(4.0% 0.0%,6.0% 4.2%,7.5% 8.3%,8.0% 12.5%,7.5% 16.7%,6.0% 20.8%,4.0% 25.0%,2.0% 29.2%,0.5% 33.3%,0.0% 37.5%,0.5% 41.7%,2.0% 45.8%,4.0% 50.0%,6.0% 54.2%,7.5% 58.3%,8.0% 62.5%,7.5% 66.7%,6.0% 70.8%,4.0% 75.0%,2.0% 79.2%,0.5% 83.3%,0.0% 87.5%,0.5% 91.7%,2.0% 95.8%,4.0% 100.0%,92.6% 100.0%,94.2% 95.8%,96.2% 91.7%,98.2% 87.5%,99.6% 83.3%,100.0% 79.2%,99.4% 75.0%,97.8% 70.8%,95.8% 66.7%,93.8% 62.5%,92.4% 58.3%,92.0% 54.2%,92.6% 50.0%,94.2% 45.8%,96.2% 41.7%,98.2% 37.5%,99.6% 33.3%,100.0% 29.2%,99.4% 25.0%,97.8% 20.8%,95.8% 16.7%,93.8% 12.5%,92.4% 8.3%,92.0% 4.2%,92.6% 0.0%); }

/* The tape on the game tiles has the same wavy ends. */
.gm-tile::before { clip-path: polygon(4.0% 0.0%,6.0% 4.2%,7.5% 8.3%,8.0% 12.5%,7.5% 16.7%,6.0% 20.8%,4.0% 25.0%,2.0% 29.2%,0.5% 33.3%,0.0% 37.5%,0.5% 41.7%,2.0% 45.8%,4.0% 50.0%,6.0% 54.2%,7.5% 58.3%,8.0% 62.5%,7.5% 66.7%,6.0% 70.8%,4.0% 75.0%,2.0% 79.2%,0.5% 83.3%,0.0% 87.5%,0.5% 91.7%,2.0% 95.8%,4.0% 100.0%,92.6% 100.0%,94.2% 95.8%,96.2% 91.7%,98.2% 87.5%,99.6% 83.3%,100.0% 79.2%,99.4% 75.0%,97.8% 70.8%,95.8% 66.7%,93.8% 62.5%,92.4% 58.3%,92.0% 54.2%,92.6% 50.0%,94.2% 45.8%,96.2% 41.7%,98.2% 37.5%,99.6% 33.3%,100.0% 29.2%,99.4% 25.0%,97.8% 20.8%,95.8% 16.7%,93.8% 12.5%,92.4% 8.3%,92.0% 4.2%,92.6% 0.0%); }

/* The tape on the home page menu cards comes in a different colour for each card. */
.hm-tiles li:nth-child(5n+1) .hm-tape { background: rgba(255, 143, 177, .88); }
.hm-tiles li:nth-child(5n+2) .hm-tape { background: rgba(120, 215, 190, .88); }
.hm-tiles li:nth-child(5n+3) .hm-tape { background: rgba(255, 226, 122, .88); }
.hm-tiles li:nth-child(5n+4) .hm-tape { background: rgba(150, 190, 255, .88); }
.hm-tiles li:nth-child(5n) .hm-tape { background: rgba(190, 160, 255, .88); }

/* Home cards on a tablet or a computer: the tilted cards nearly touched, so give them room. Phones (600px and under) keep the
   tighter gap above. */
@media (min-width: 601px) {
    .hm-tiles { column-gap: 2.2rem; row-gap: 2.4rem; max-width: 52rem; padding-inline: .6rem; }
}

/* Maths islands and lessons (ReaderMathsIsland, ReaderMathsLesson). The same notebook look as the games: an island is a winding
   road of stops (purple lessons, orange game) to a trophy; a lesson is a notebook page with a picture and a sentence, or a task the
   child does with taps. */
.rd-shell:has(.mi) { background:
        radial-gradient(circle at 10% 92%, rgba(240, 170, 190, .28) 0 4rem, transparent 4.1rem),
        radial-gradient(circle at 92% 12%, rgba(255, 255, 255, .35) 0 5rem, transparent 5.1rem),
        radial-gradient(rgba(255, 255, 255, .4) 2px, transparent 2.6px) 0 0 / 22px 22px,
        linear-gradient(160deg, #fbf1de, #f6e3d3 55%, #efdde6) fixed; }
.mi { gap: 1.2rem; }
.mi-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.mi-head { display: flex; align-items: center; gap: 1rem; text-align: left; padding: 1.1rem 1.1rem 1rem; }
.mi-head h1 { margin: 0 0 .35rem; }
.mi-sym { display: grid; place-items: center; flex: none; width: 4.2rem; height: 4.2rem; border-radius: 1.1rem; background: var(--mi-c, #ff8a3d); color: #fff; font: 900 2.3rem/1 var(--rd-font); box-shadow: 0 5px 0 rgba(0, 0, 0, .2); }
.mi-bar { display: block; width: min(14rem, 100%); height: .75rem; border-radius: 99px; background: #e3e8f8; overflow: hidden; }
.mi-bar i { display: block; height: 100%; border-radius: 99px; background: #34c98a; }
.mi-legend { display: flex; gap: 1rem; margin-top: .4rem; font-size: .9rem; font-weight: 800; color: #5a6aa8; }
.mi-legend span:before { content: ""; display: inline-block; width: .75rem; height: .75rem; margin-right: .35rem; border-radius: 50%; vertical-align: -.05rem; }
.mi-legend .l:before { background: #7a4fe0; }
.mi-legend .m:before { background: #ff8a3d; }
.mi-map { position: relative; width: min(30rem, 100%); }
.mi-path { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.mi-path path { fill: none; vector-effect: non-scaling-stroke; stroke-linecap: round; }
.mi-path .road { stroke: #fff; stroke-width: 26; }
.mi-path .dots { stroke: #e8c79a; stroke-width: 5; stroke-dasharray: 2 16; }
.mi-stops { position: absolute; inset: 0; margin: 0; padding: 0; list-style: none; }
.mi-node, .mi-trophy { position: absolute; translate: -50% -50%; }
.mi-node a { position: relative; z-index: 1; display: grid; justify-items: center; gap: .35rem; width: 7.5rem; color: #26325f !important; text-decoration: none; }
.mi-node .c { display: grid; place-items: center; width: 4.6rem; height: 4.6rem; border-radius: 50%; border: 5px solid #fff; background: #b9a6ef; font-size: 2rem; box-shadow: 0 7px 0 rgba(0, 0, 0, .16); transition: transform .15s; }
.mi-node.m .c { background: #ffb98a; }
.mi-node.done .c { background: #34c98a; }
.mi-node.now .c { width: 5.6rem; height: 5.6rem; background: #7a4fe0; box-shadow: 0 0 0 .5rem rgba(122, 79, 224, .28), 0 7px 0 rgba(0, 0, 0, .16); }
.mi-node.m.now .c { background: #ff8a3d; box-shadow: 0 0 0 .5rem rgba(255, 138, 61, .3), 0 7px 0 rgba(0, 0, 0, .16); }
.mi-node a:hover .c { transform: translateY(-3px); }
.mi-node b { padding: .15rem .55rem; border-radius: .6rem; background: #fff; font-size: .9rem; font-weight: 900; line-height: 1.2; text-align: center; box-shadow: 0 2px 0 rgba(0, 0, 0, .08); }
.mi-node .st { position: absolute; top: -.5rem; left: 50%; translate: -50% 0; padding: 0 .4rem; border-radius: 99px; background: #fff1b8; color: #e0a800; font-size: .85rem; font-weight: 900; letter-spacing: -.05em; box-shadow: 0 2px 0 #e9b400; white-space: nowrap; }
.mi-dino { position: absolute; z-index: 2; top: -1.4rem; left: 100%; width: 4.6rem; height: auto; margin-left: -1.6rem; pointer-events: none; }
@media (prefers-reduced-motion: no-preference) {
    .mi-dino { animation: mi-bob 1.8s ease-in-out infinite; }
    @keyframes mi-bob { 50% { translate: 0 -.4rem; } }
}
.mi-trophy { font-size: 3.2rem; filter: grayscale(.85); opacity: .55; }
.mi-trophy.won { filter: none; opacity: 1; }
.mi-sheet { width: min(34rem, 100%); box-sizing: border-box; padding: 1.2rem 1.1rem 1.3rem; border-radius: 1.6rem; background: #fff; text-align: center; box-shadow: 0 -4px 18px rgba(0, 0, 0, .08), 0 6px 0 rgba(0, 0, 0, .1); }
.mi-sheet h2 { margin: 0 0 .2rem; font-size: 1.4rem; color: #26325f; }
.mi-sheet p { margin: 0; font-weight: 800; color: #5a6aa8; }
.mi-peek { margin: .4rem 0 0; }
.mi-peek .ml-art { min-height: 0; padding: .3rem; background: none; box-shadow: none; }
.mi-peek .ml-tags { display: none; }
.mi-acts, .ml-acts { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .8rem; margin-top: .9rem; }
.mi-acts .sc-say.big { margin-top: 0; }

.ml { gap: 1rem; }
.ml .mg-paper { padding-top: 1.8rem; }
/* The paper's tab sticks up above the paper, so the stepper keeps clear of it with room to spare. */
.ml-steps { display: flex; gap: .3rem; width: min(34rem, 100%); box-sizing: border-box; margin-bottom: 1.6rem; padding: .3rem; border-radius: 99px; background: #fff; box-shadow: 0 4px 0 rgba(0, 0, 0, .1); overflow-x: auto; }
.ml-steps a { flex: 1 0 auto; padding: .5rem .55rem; border-radius: 99px; color: #7d8bbd !important; font-size: .9rem; font-weight: 900; text-align: center; text-decoration: none; white-space: nowrap; }
.ml-steps a.on { background: #7a4fe0; color: #fff !important; box-shadow: 0 3px 0 #4b2fa8; }
.ml-tab { position: absolute; top: -.95rem; left: 1rem; z-index: 2; padding: .35rem 1rem; border-radius: .6rem .6rem 0 0; background: var(--mi-c, #ff8a3d); color: #fff; font-size: .8rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.ml-hd { display: flex; justify-content: space-between; align-items: baseline; gap: .6rem; }
.ml-hd h1, .ml-task h1 { margin: 0; font-size: 1.45rem; color: #26325f; text-align: left; }
.ml-task h1 { text-align: center; }
.ml-hd span { flex: none; font-weight: 900; color: #5a6aa8; }
.ml-dots { display: flex; justify-content: center; gap: .35rem; margin: .6rem 0 0; padding: 0; list-style: none; }
.ml-dots li { width: 2.2rem; height: .5rem; border-radius: 99px; background: #e3e8f8; }
.ml-dots li.ok { background: #34c98a; }
.ml-dots li.now { background: var(--mi-c, #ff8a3d); }
.ml-art { display: grid; justify-items: center; gap: .4rem; min-height: 9rem; align-content: center; margin: .8rem 0 .4rem; padding: .8rem .5rem; border-radius: 1.1rem; background: linear-gradient(#eaf6ff, #fffaf0); box-shadow: inset 0 0 0 2px #d3e2ff; }
.ml-art .mg-eq { margin: .2rem 0; }
.ml-art .mg-sticks, .ml-art .mg-groups { margin-top: 0; }
.ml-objs { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .2rem .35rem; font-size: clamp(2.2rem, 10vw, 3rem); line-height: 1.1; }
.ml-objs b { font-size: 2rem; color: #5a6aa8; }
.ml-objs .new { filter: drop-shadow(0 0 .35rem rgba(46, 165, 255, .9)); }
.ml-objs .out { opacity: .3; filter: grayscale(1); translate: 0 -.6rem; rotate: -12deg; }
.ml-tags { display: flex; gap: .5rem; }
.ml-tags span { padding: 0 .7rem; border-radius: .6rem; font: 700 1.4rem var(--rd-font-read); }
.ml-tags .t1 { background: #fff; color: #1d6644; box-shadow: 0 2px 0 rgba(0, 0, 0, .1); }
.ml-tags .t2 { background: #2ea5ff; color: #fff; }
.ml-tags .t3 { background: #b8323f; color: #fff; }
.mg-eq .g { background: #a5f0c4; }
.ml-shapes { display: flex; justify-content: center; gap: .5rem; }
.ml-shapes .mg-svg { width: min(4.6rem, 19vw); height: min(4.6rem, 19vw); }
.ml-seq { flex-wrap: wrap; font-size: clamp(1.8rem, 8vw, 2.6rem); }
.ml-text { margin: .6rem .2rem .5rem; font-family: var(--rd-font-read); font-size: clamp(1.35rem, 5.4vw, 1.75rem); font-weight: 700; line-height: 1.45; color: #26325f; }
.ml-paper .sc-say.big { margin-top: 0; }
.ml-nav { display: flex; justify-content: space-between; gap: .8rem; margin-top: 1rem; }
.ml-end { display: grid; justify-items: center; gap: .3rem; }
.ml-end h1 { margin: 0; color: #26325f; }
.ml-end p { margin: 0; font-weight: 800; color: #5a6aa8; }
.ml-party { font-size: 3.4rem; line-height: 1; }
.ml-ask { display: flex; align-items: center; justify-content: center; gap: .7rem; margin: .5rem 0 0; }
.ml-ask p { margin: 0; font-weight: 800; color: #5a6aa8; text-align: left; }
.ml-live { font-size: clamp(2.2rem, 10vw, 3rem); }
.mg-box.ok { border-style: solid; border-color: #2a8a5f; background: #a5f0c4; color: #1d6644; }
.ml-frame { display: grid; grid-template-columns: repeat(5, minmax(0, 3.2rem)); justify-content: center; margin: .6rem auto 0; width: max-content; border: 4px solid #26325f; border-radius: .7rem; background: #fff; overflow: hidden; }
.ml-frame > span { display: grid; place-items: center; aspect-ratio: 1; border: 2px solid #c9d3ef; }
.ml-frame > span.drop { background: #fff7cc; border: 2px dashed #e0a800; }
.ml-frame i, .ml-tray a { display: block; width: 2.3rem; height: 2.3rem; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffc08f, #ff8a3d 60%, #e0661c); box-shadow: 0 3px 0 rgba(0, 0, 0, .15); }
.ml-frame i.b, .ml-tray a { background: radial-gradient(circle at 35% 30%, #a9dcff, #2ea5ff 60%, #1b7fd0); }
.ml-frame i.out { background: #cfd3e4; position: relative; }
.ml-frame i.out:after { content: ""; position: absolute; left: -.2rem; right: -.2rem; top: 48%; height: 4px; border-radius: 2px; background: #b8323f; rotate: -30deg; }
.ml-frame a { display: grid; place-items: center; border-radius: 50%; animation: none; }
.ml-frame a:hover i { scale: 1.08; }
.ml-tray { display: flex; justify-content: center; gap: .8rem; width: max-content; margin: .9rem auto 0; padding: .7rem 1.1rem; border-radius: 99px; background: #eaf5ff; box-shadow: inset 0 0 0 3px #b9e0ff; }
.ml-tray a { width: 2.8rem; height: 2.8rem; }
@media (prefers-reduced-motion: no-preference) {
    .ml-tray a:first-child, .ml-corners .tap, .ml-groups .add, .ml-do { animation: ml-pulse 1.4s ease-in-out infinite; }
    @keyframes ml-pulse { 50% { scale: 1.08; } }
}
.ml-count { margin: .7rem 0 0; font: 700 1.15rem var(--rd-font-read); color: #5a6aa8; }
.ml-goal { margin: .4rem 0; font-weight: 900; font-size: 1.3rem; color: #5a6aa8; }
.ml-goal mark { padding: 0 .5rem; border-radius: .5rem; background: #ffe066; color: #26325f; font: 700 1.8rem var(--rd-font-read); }
.ml-do { margin-top: .9rem; }
.ml-pair { display: flex; flex-wrap: wrap; justify-content: center; gap: .8rem; }
.ml-ok { display: flex; align-items: center; justify-content: center; gap: .6rem; margin: 1rem 0 .8rem; }
.ml-ok .mg-ok { white-space: normal; text-align: left; box-shadow: 0 0 0 2px #a5f0c4; }
.ml-line { position: relative; display: grid; grid-template-columns: repeat(var(--ml-n), minmax(0, 1fr)); width: 100%; margin: 2.4rem 0 .2rem; }
.ml-line > span { position: relative; display: grid; justify-items: center; gap: .15rem; }
.ml-line > span:before { content: ""; position: absolute; top: .55rem; left: 0; right: 0; height: 4px; background: #cfd9f5; }
.ml-line > span:first-child:before { left: 50%; }
.ml-line > span:last-child:before { right: 50%; }
.ml-line i { position: relative; width: 3px; height: 1.2rem; border-radius: 2px; background: #8d9bd1; }
.ml-line b { font: 700 clamp(.8rem, 3.4vw, 1.15rem) var(--rd-font-read); color: #7d8bbd; }
.ml-line .s b { color: #ff8a3d; font-size: clamp(1rem, 4.4vw, 1.45rem); }
.ml-line .e b { padding: 0 .25rem; border-radius: .4rem; background: #7a4fe0; color: #fff; font-size: clamp(1rem, 4.4vw, 1.45rem); }
.ml-line .v b { color: #2ea5ff; }
.ml-line .goal b { outline: 3px dashed #34c98a; outline-offset: 2px; border-radius: .4rem; color: #1d6644; }
.ml-frog { position: absolute; top: -2.4rem; font-size: 1.9rem; font-style: normal; line-height: 1; }
.ml-hop { position: absolute; top: -1.15rem; height: 1.3rem; box-sizing: border-box; border: 3px dashed #2ea5ff; border-bottom: 0; border-radius: 99px 99px 0 0; text-decoration: none; }
.ml-blocks { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: center; gap: .4rem; min-height: 8.6rem; }
.ml-blocks .rod { display: grid; gap: 1px; padding: 1px; border-radius: .3rem; background: #c96f00; }
.ml-blocks .ones { display: grid; grid-template-columns: repeat(3, auto); gap: .3rem; align-content: end; }
.ml-blocks i { display: block; width: .8rem; height: .75rem; border-radius: 2px; background: #ffb52e; }
.ml-blocks .ones i { width: 1.3rem; height: 1.3rem; border-radius: .25rem; background: #5aaeff; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .15); }
.ml-groups { min-height: 3rem; }
.ml-groups .add { display: grid; place-items: center; max-width: none; padding: .4rem .8rem; border-style: solid; border-color: #7a4fe0; background: #ece4ff; color: #4b2fa8 !important; font-weight: 900; text-decoration: none; }
.ml-corners { display: block; width: min(13rem, 60vw); height: auto; margin: .9rem auto .2rem; overflow: visible; }
.ml-corners circle { stroke: #fff; stroke-width: 3; }
.ml-corners .tap { fill: #7a4fe0; cursor: pointer; }
.ml-corners .got { fill: #ffe066; stroke: #e0a800; }
.ml-corners text { font: 900 9px var(--rd-font); fill: #26325f; }
.ml-slots { display: flex; justify-content: center; gap: .4rem; margin: .8rem 0; padding: 0; list-style: none; }
.ml-slots li { display: grid; place-items: center; width: 3rem; height: 3.2rem; border: 3px dashed #9fb1e0; border-radius: .7rem; background: #fff; font: 700 1.7rem var(--rd-font-read); color: #26325f; }
.ml-slots li.on { border-style: solid; border-color: #2a8a5f; background: #a5f0c4; }
.ml-cards { grid-template-columns: repeat(auto-fit, minmax(0, 4.4rem)); }
.ml-cards .mg-choice { height: 4.4rem; font-size: 2rem; }
.ml-cards .mg-choice:nth-child(4) { background: #b9e0ff; }
.ml-cards .mg-choice:nth-child(5) { background: #ffd8a8; rotate: 2deg; }
.rd-btn .rd-trail-ic { flex: none; width: 1.4rem; height: 1.4rem; }

/* Science module, Magnet topic (ScienceMagnet*.razor, reader-magnet.js): a red-and-blue sky in place of space, three lessons and two games. */
.mt-mag { display: block; width: 7rem; height: auto; overflow: visible; }
.mt-mag.down { rotate: 180deg; }
.mt-sky { background: radial-gradient(circle at 85% 20%, #ff6b6b, #c2253a 45%, #3a3fa8 100%); }
.mt-sky p { max-width: 58%; color: #ffe0e4; }
.mt-sky .mt-hero { position: absolute; right: .6rem; top: 50%; width: min(9.5rem, 34%); translate: 0 -50%; rotate: 18deg; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .35)); }
.mt-clip { position: absolute; font-size: 1.6rem; pointer-events: none; }
.mt-clip.c1 { right: min(10rem, 36%); bottom: .7rem; }
.mt-clip.c2 { right: 1.2rem; bottom: .9rem; rotate: 30deg; }
.mt-h2 { justify-self: start; width: min(46rem, 100%); margin: .2rem auto -.5rem; padding-left: .3rem; font: 400 1.5rem/1 "Cherry Bomb One", Nunito, sans-serif !important; color: #4b2fa3 !important; }
.mt-learn { list-style: none; margin: 0; padding: 0; width: min(46rem, 100%); display: grid; gap: .8rem; }
.mt-step { display: flex; align-items: center; gap: .8rem; padding: .7rem .9rem; border-radius: 1.5rem; background: #fff; box-shadow: 0 6px 0 #f1c6cd; color: #2b2350 !important; text-decoration: none; transition: translate .12s; }
.mt-step:hover { translate: 0 -2px; }
.mt-step .n { flex: none; display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: #e23a4e; color: #fff; font-weight: 900; font-size: 1.2rem; box-shadow: 0 3px 0 #9e1d2e; }
.mt-step .pic { flex: none; display: grid; place-items: center; width: 3.6rem; height: 3.6rem; border-radius: 1rem; background: #fff0f2; font-size: 2rem; }
.mt-step .tx { flex: 1; min-width: 0; display: grid; }
.mt-step b { font-size: 1.15rem; font-weight: 900; }
.mt-step small { color: #7a6aa8; font-weight: 700; }
.mt-step .go { flex: none; color: #e23a4e; font-size: 1.4rem; }
.mt-games { width: min(46rem, 100%); }
.mt-game-art { font-size: 2.6rem; line-height: 1; }

/* A lesson page */
.mt-stage { position: relative; width: min(40rem, 100%); padding: 1.1rem 1rem 1.3rem; border-radius: 1.8rem; background: radial-gradient(circle at 50% 30%, #fff, #ffe7ea 70%); box-shadow: 0 8px 0 #f1c6cd; text-align: center; }
.mt-stage h1 { margin: 0; color: #c2253a !important; font: 400 1.9rem/1.05 "Cherry Bomb One", Nunito, sans-serif !important; }
.mt-dots { display: flex; justify-content: center; gap: .4rem; list-style: none; margin: 0 0 .5rem; padding: 0; }
.mt-dots li { width: .7rem; height: .7rem; border-radius: 999px; background: #f1c6cd; }
.mt-dots li.done { background: #f08a97; }
.mt-dots li.on { width: 1.6rem; background: #e23a4e; }
.mt-q { margin: .6rem 0 .2rem; font-family: var(--rd-font-read); font-size: clamp(1.25rem, 5vw, 1.5rem); font-weight: 700; line-height: 1.35; color: #2b2350; }
.mt-result { margin: .4rem 0 0; font: 900 1.5rem/1.2 Nunito, sans-serif; }
.mt-result.ok { color: #1b8a72; }
.mt-result.look { color: #c2253a; }
.mt-art { display: grid; justify-items: center; gap: .5rem; min-height: 11rem; margin: .8rem 0 .2rem; }
.mt-art .mt-mag.big { width: 10rem; animation: sc-bob 2s ease-in-out infinite; }
.mt-pull { position: relative; display: grid; justify-items: center; width: 10rem; height: 13rem; }
.mt-pull .mt-mag { width: 7.5rem; }
.mt-lines { position: absolute; top: 7.4rem; width: 5rem; height: 2.2rem; background: radial-gradient(circle, #e23a4e 0 .18rem, transparent .2rem) 0 0 / .9rem .9rem; opacity: .55; }
.mt-thing { position: absolute; bottom: 0; display: grid; place-items: center; width: 5rem; height: 5rem; border-radius: 1.2rem; background: #fff; box-shadow: 0 5px 0 #e9d9dc; font-size: 3rem; transition: translate .5s cubic-bezier(.3, 1.5, .5, 1); }
.mt-thing.stuck { translate: 0 -2rem; box-shadow: 0 0 0 .25rem #ffd84d; }
.mt-pull.got .mt-lines, .mt-pull:has(.stuck) .mt-lines { opacity: 0; }
.mt-thing.no { animation: mt-shake .5s; }
.mt-name { margin: 0; font-family: var(--rd-font-read); font-size: 1.2rem; font-weight: 700; color: #2b2350; }
.mt-row { display: flex; gap: .5rem; }
.mt-row span { display: grid; place-items: center; width: 3.4rem; height: 3.4rem; border-radius: 1rem; background: #fff; box-shadow: 0 4px 0 #e9d9dc; font-size: 2rem; }
.mt-home { display: flex; align-items: end; gap: 1.4rem; }
.mt-fridge { position: relative; display: grid; align-content: start; gap: .3rem; width: 7rem; height: 11rem; padding: 1rem .6rem; border-radius: 1rem; background: linear-gradient(180deg, #f6f8fc 0 38%, #8a93a6 38% 39.5%, #eef1f7 39.5%); box-shadow: 0 6px 0 #c9cfdc; }
.mt-fridge i { font-style: normal; font-size: 1.7rem; }
.mt-fridge i:nth-child(2) { justify-self: end; rotate: 12deg; }
.mt-toy { font-size: 3.6rem; }
.mt-pair { display: flex; justify-content: center; align-items: center; gap: .5rem; min-height: 4rem; transition: gap .4s; }
.mt-pair > b { font-size: 1.5rem; }
.mt-pair.pull { gap: .2rem; }
.mt-pair.pull > b { color: #1b8a72; }
.mt-pair.push { gap: 1.6rem; }
.mt-pair.push > b { color: #c2253a; }
.mt-pair.one .mt-bar { width: 12rem; height: 3.4rem; }
.mt-bar { display: flex; width: 7rem; height: 2.8rem; overflow: hidden; border-radius: .5rem; box-shadow: 0 4px 0 rgba(0, 0, 0, .18); }
.mt-bar i { flex: 1; display: grid; place-items: center; font-style: normal; font-weight: 900; font-size: 1.3rem; color: #fff; }
.mt-bar .n { background: #e23a4e; }
.mt-bar .s { background: #3d63d9; }
.mt-bar.blue { outline: .25rem solid #ffd84d; outline-offset: .15rem; }
.mt-flip { padding: 0; border: 0; background: none; cursor: pointer; animation: sc-bob 1.6s ease-in-out infinite; }
.mt-flip:focus-visible { outline: 3px solid #ffd84d; outline-offset: 4px; border-radius: .6rem; }
.mt-legend { display: flex; gap: 1rem; margin: 0; font-weight: 900; }
.mt-legend .n { color: #e23a4e; } .mt-legend .s { color: #3d63d9; }
.mt-verdict { margin: 0; font: 900 1.4rem/1.2 Nunito, sans-serif; }
.mt-verdict.pull { color: #1b8a72; } .mt-verdict.push { color: #c2253a; }
.mt-choices { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin-top: 1.2rem; }
.mt-choices a { display: grid; place-items: center; gap: .1rem; min-height: 5rem; border-radius: 1.3rem; color: #fff !important; font-weight: 900; font-size: 1.2rem; text-decoration: none; }
.mt-choices a:active { translate: 0 3px; }
.mt-choices .yes { background: #2fb596; box-shadow: 0 6px 0 #1b8a72; }
.mt-choices .no { background: #9a8fbf; box-shadow: 0 6px 0 #6d6396; }
.mt-choices em { font-style: normal; font-size: 1.9rem; line-height: 1; }
.mt-nav { display: flex; justify-content: space-between; align-items: center; gap: .6rem; margin-top: 1.1rem; }
.mt-arrow { display: inline-grid; place-items: center; min-width: 3.2rem; height: 3.2rem; padding: 0 .9rem; border-radius: 999px; background: #fff; color: #c2253a !important; font-weight: 900; font-size: 1.15rem; text-decoration: none; box-shadow: 0 4px 0 #f1c6cd; }
.mt-arrow.next { background: #e23a4e; color: #fff !important; box-shadow: 0 4px 0 #9e1d2e; }
@keyframes mt-shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* The games */
.mt-gamehead { display: flex; justify-content: space-between; align-items: center; gap: .6rem; width: min(40rem, 100%); }
.mt-gamehead h1 { margin: 0; color: #4b2fa3 !important; font: 400 1.7rem/1 "Cherry Bomb One", Nunito, sans-serif !important; }
.mt-count { flex: none; padding: .3rem .9rem; border-radius: 999px; background: #fff; font-weight: 900; box-shadow: 0 3px 0 #eadfc8; }
.mt-hint { margin: .8rem 0 0; text-align: center; font-family: var(--rd-font-read); font-size: 1.15rem; font-weight: 700; color: #6b4a12; }
.mt-board { width: min(40rem, 100%); padding: 1rem; border-radius: 1.8rem; background: linear-gradient(180deg, #fff4d6, #ffe2b8); box-shadow: 0 8px 0 #eac48a; }
.mt-bins { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.mt-bin { display: grid; align-content: start; justify-items: center; gap: .3rem; min-height: 12rem; padding: .6rem .4rem; border-radius: 1.4rem; font: inherit; cursor: pointer; transition: scale .12s; }
.mt-bin.yes { background: #ffe1e5; border: .25rem dashed #e23a4e; color: #c2253a; }
.mt-bin.no { background: #ece8f7; border: .25rem dashed #9a8fbf; color: #5b4f8a; }
.mt-bin.over { scale: 1.04; border-style: solid; }
.mt-bin > b { font-size: 1.05rem; font-weight: 900; }
.mt-bin .mt-mag { width: 4.2rem; }
.mt-bin .box { font-size: 3rem; line-height: 1.1; }
.mt-bin .got { display: flex; flex-wrap: wrap; justify-content: center; gap: .2rem; }
.mt-tray { display: flex; flex-wrap: wrap; justify-content: center; gap: .55rem; min-height: 4.4rem; margin-top: 1rem; }
.mt-piece { display: grid; place-items: center; width: 4.1rem; height: 4.1rem; padding: 0; border: 0; border-radius: 1.1rem; background: #fff; font-size: 2.4rem; line-height: 1; box-shadow: 0 5px 0 #e6c99a; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.mt-piece.picked { outline: .25rem solid #ffd84d; translate: 0 -4px; }
.mt-piece.dragging { position: relative; z-index: 20; cursor: grabbing; box-shadow: 0 14px 18px -6px rgba(0, 0, 0, .35); outline: .25rem solid #ffd84d; }
.mt-piece.shake { animation: mt-shake .5s; }
.mt-piece.in { width: 2.6rem; height: 2.6rem; font-size: 1.7rem; border-radius: .8rem; box-shadow: none; cursor: default; pointer-events: none; }
.mt-pond { position: relative; width: min(40rem, 100%); min-height: 22rem; padding: 5.5rem .8rem 1rem; overflow: hidden; border-radius: 1.8rem; background: linear-gradient(180deg, #bfe9ff 0 4.6rem, #3fa8e8 4.6rem, #1f6fc2); box-shadow: 0 8px 0 #175a9e; }
.mt-rod { position: absolute; left: 50%; top: 0; z-index: 3; display: grid; justify-items: center; translate: -50% 0; transition: left .35s ease, translate .35s ease; pointer-events: none; }
.mt-rod .mt-string { width: 3px; height: 2.4rem; background: #5a4a3a; transition: height .35s ease; }
.mt-rod .mt-mag { width: 3.2rem; }
.mt-rod.down .mt-string { height: calc(2.4rem + var(--drop, 6rem)); }
.mt-fishes { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.4rem .4rem; list-style: none; margin: 0; padding: 0; }
.mt-fishes li { display: grid; justify-items: center; }
.mt-fishes li:nth-child(odd) { translate: 0 .8rem; }
.mt-fishy { position: relative; display: grid; justify-items: center; padding: 0; border: 0; background: none; cursor: pointer; animation: mt-swim 2.6s ease-in-out infinite; animation-delay: calc(var(--i, 0) * -.4s); }
.mt-fishy .fish { font-size: 3rem; line-height: 1; }
.mt-fishy .tag { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; margin-bottom: -.5rem; border-radius: .7rem; background: rgba(255, 255, 255, .92); font-size: 1.5rem; box-shadow: 0 3px 0 rgba(0, 0, 0, .15); }
.mt-fishy:disabled { cursor: default; }
.mt-fishy.caught { animation: mt-caught .7s ease-in forwards; }
.mt-fishy.nope { opacity: .45; animation: mt-shake .5s; }
@keyframes mt-swim { 50% { transform: translate(6px, -5px) rotate(-4deg); } }
@keyframes mt-caught { to { transform: translateY(-14rem) scale(.6); opacity: 0; } }
.mt-done { width: min(40rem, 100%); }
@media (prefers-reduced-motion: reduce) {
    .mt-art .mt-mag.big, .mt-flip, .mt-fishy, .mt-thing.no, .mt-piece.shake { animation: none; }
    .mt-fishy.caught { animation: none; opacity: 0; }
}

/* Science module, "5 senses" topic (ScienceSenses*.razor, SenseFace, SenseIcon, reader-senses.js): the lessons and games are built on
   the Magnet topic's pieces (mt-*); each sense has its own colour (--sc). */
/* The topic page: a night-purple card with the drawn face, the senses as solid colour circles with matching white icons (SenseIcon),
   the lessons as a dotted path, then the two game doors. Outlines in one dark ink (#2b1d5c) tie the page to the face's sticker style. */
.dr-hero { position: relative; width: min(46rem, 100%); box-sizing: border-box; display: flex; align-items: center; gap: .7rem; overflow: hidden; padding: 1.1rem 1rem; border-radius: 1.8rem; background: radial-gradient(circle at 20% 30%, #5b46c9, #2b1d7a 70%); box-shadow: 0 8px 0 #1c1254; }
.dr-hero .dr-hero-face { flex: none; width: 44%; max-width: 13rem; margin: 0; filter: drop-shadow(0 5px 0 rgba(0, 0, 0, .25)); }
.dr-hero-tx { position: relative; z-index: 1; min-width: 0; }
.dr-hero h1 { margin: 0; color: #ffd84d !important; font: 400 2.4rem/1 "Cherry Bomb One", Nunito, sans-serif !important; }
.dr-hero p { margin: .4rem 0 0; color: #e6defd; font-weight: 800; line-height: 1.35; }
.dr-star { position: absolute; color: #ffd84d; line-height: 1; pointer-events: none; }
.dr-star.a { right: 1rem; top: .8rem; }
.dr-star.b { left: 46%; top: .6rem; font-size: .7rem; }
.dr-star.c { right: 2.6rem; bottom: .9rem; font-size: .8rem; }
.dr-five { list-style: none; margin: 0; padding: 0; width: min(46rem, 100%); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .2rem; }
.dr-five li { display: grid; justify-items: center; gap: .3rem; min-width: 0; text-align: center; }
.dr-five .ic { display: grid; place-items: center; width: 3.4rem; height: 3.4rem; border-radius: 50%; background: var(--sc); box-shadow: 0 4px 0 color-mix(in srgb, var(--sc) 65%, #000); }
.dr-five .dr-icon { width: 2.05rem; height: 2.05rem; }
.dr-five b { font-size: .72rem; font-weight: 900; color: #2b1d5c; white-space: nowrap; }
.dr-five small { margin-top: -.3rem; font-size: .7rem; font-weight: 700; color: #7a6aa8; }
.dr-h2 { justify-self: start; width: min(46rem, 100%); margin: .2rem auto -.5rem; padding-left: .3rem; font: 400 1.5rem/1 "Cherry Bomb One", Nunito, sans-serif !important; color: #2b1d7a !important; }
.dr-path { position: relative; list-style: none; margin: 0; padding: 0; width: min(46rem, 100%); display: grid; gap: .8rem; }
.dr-path::before { content: ""; position: absolute; left: 1.2rem; top: 1.5rem; bottom: 1.5rem; border-left: .3rem dotted #c7b8ff; }
.dr-step { display: flex; align-items: center; gap: .6rem; color: #2b2350 !important; text-decoration: none; }
.dr-step .n { position: relative; flex: none; display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: #ffd84d; border: .18rem solid #2b1d5c; color: #2b1d5c; font-weight: 900; font-size: 1.15rem; }
.dr-step .card { flex: 1; min-width: 0; display: flex; align-items: center; gap: .7rem; padding: .65rem .8rem; border-radius: 1.3rem; background: #fff; border: .18rem solid #2b1d5c; box-shadow: 0 4px 0 #2b1d5c; transition: translate .12s; }
.dr-step:hover .card { translate: 0 -2px; }
.dr-step .pic { flex: none; font-size: 2rem; line-height: 1; }
.dr-step .tx { min-width: 0; display: grid; }
.dr-step b { font-size: 1.08rem; font-weight: 900; }
.dr-step small { color: #6b5a92; font-weight: 700; font-size: .88rem; }
.dr-doors { width: min(46rem, 100%); display: grid; gap: .7rem; }
.dr-door { display: flex; align-items: center; gap: .8rem; padding: .65rem .8rem; border-radius: 1.3rem; background: #fff; border: .18rem solid #2b1d5c; border-left-width: .5rem; box-shadow: 0 4px 0 #2b1d5c; color: #2b2350 !important; text-decoration: none; transition: translate .12s; }
.dr-door:hover { translate: 0 -2px; }
.dr-door .art { flex: none; font-size: 2rem; line-height: 1; }
.dr-door .tx { flex: 1; min-width: 0; display: grid; }
.dr-door b { font-size: 1.08rem; font-weight: 900; }
.dr-door small { color: #6b5a92; font-weight: 700; font-size: .85rem; }
.dr-door .go { flex: none; display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: #3b2a8c; color: #fff; }
.dr-stage { background: radial-gradient(circle at 50% 30%, #fff, #fff1dc 70%); box-shadow: 0 8px 0 #f6d3a4; }
.dr-stage h1 { color: #c25e00 !important; }
.dr .mt-dots li { background: #f6d3a4; }
.dr .mt-dots li.done { background: #f5b25c; }
.dr .mt-dots li.on { background: #ef8a00; }
.dr .mt-arrow { color: #c25e00 !important; box-shadow: 0 4px 0 #f6d3a4; }
.dr .mt-arrow.next { background: #ef8a00; color: #fff !important; box-shadow: 0 4px 0 #b5620a; }
.dr-art { min-height: 9rem; align-content: center; }
.dr-organ { display: grid; place-items: center; width: 7rem; height: 7rem; border-radius: 50%; background: color-mix(in srgb, var(--sc) 18%, #fff); border: .3rem solid var(--sc); font-size: 4rem; line-height: 1; animation: sc-bob 2s ease-in-out infinite; }
.dr-organ-name { margin: 0; font-weight: 900; font-size: 1.1rem; color: var(--sc); }
.dr-row span.no { background: #ffe3e3; }
.dr-thing { display: grid; place-items: center; width: 6rem; height: 6rem; border-radius: 1.4rem; background: #fff; box-shadow: 0 5px 0 #eedcc3; font-size: 3.6rem; line-height: 1; }
.dr-pair { display: flex; align-items: center; gap: .8rem; }
.dr-pair > b { font-size: 2rem; color: #c25e00; }
.dr-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(5.6rem, 1fr)); gap: .6rem; margin-top: 1.1rem; }
.dr-choices a { display: grid; place-items: center; gap: .1rem; min-height: 5rem; padding: .3rem; border-radius: 1.2rem; background: var(--sc); color: #fff !important; font-weight: 900; font-size: 1rem; text-decoration: none; box-shadow: 0 5px 0 color-mix(in srgb, var(--sc) 70%, #000); }
.dr-choices a:active { translate: 0 3px; }
.dr-choices em { font-style: normal; font-size: 2rem; line-height: 1; }

/* The face (SenseFace): one inline SVG; in the game, round buttons sit on the parts, placed in percent of the drawing. */
.dr-face { position: relative; width: 15rem; margin: 0 auto; }
.dr-kid { display: block; width: 100%; height: auto; }
.dr-part { position: absolute; padding: 0; border: 0; border-radius: 50%; background: none; }
.dr-face.game .dr-part { cursor: pointer; background: rgba(255, 255, 255, .18); box-shadow: 0 0 0 .18rem rgba(75, 47, 163, .35); transition: scale .12s, background-color .12s; }
.dr-face.game .dr-part:hover { scale: 1.1; background: rgba(255, 255, 255, .35); }
.dr-face.game .dr-part:focus-visible { outline: 3px solid #4b2fa3; outline-offset: 2px; }
.dr-face.game .dr-part.ok { background: rgba(47, 181, 150, .3); box-shadow: 0 0 0 .3rem #2fb596; }
.dr-face.game .dr-part.shake { animation: mt-shake .5s; background: rgba(255, 90, 110, .35); box-shadow: 0 0 0 .25rem #e5527a; }

/* The games */
.dr-board { background: linear-gradient(180deg, #fff6e6, #ffe6c2); box-shadow: 0 8px 0 #eec38a; }
.dr-bins { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .45rem; }
@media (max-width: 34rem) { .dr-bins { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.dr-bin { display: grid; align-content: start; justify-items: center; gap: .2rem; min-height: 9rem; padding: .5rem .2rem; border-radius: 1.2rem; border: .22rem dashed var(--sc); background: color-mix(in srgb, var(--sc) 12%, #fff); color: var(--sc); font: inherit; cursor: pointer; transition: scale .12s; }
.dr-bin.over { scale: 1.05; border-style: solid; }
.dr-bin .ic { font-size: 2.2rem; line-height: 1.1; }
.dr-bin > b { font-size: .85rem; font-weight: 900; }
.dr-bin .got { display: flex; flex-wrap: wrap; justify-content: center; gap: .2rem; }
.dr-bin .mt-piece.in { width: 2.3rem; height: 2.3rem; font-size: 1.5rem; }
.dr-qs { list-style: none; margin: 0 0 .6rem; padding: 0; }
.dr-q { display: flex; align-items: center; gap: .8rem; padding: .6rem .8rem; border-radius: 1.3rem; background: #fff; box-shadow: 0 5px 0 #eedcc3; }
.dr-q[hidden] { display: none; }
.dr-q .dr-thing { flex: none; width: 4.2rem; height: 4.2rem; font-size: 2.7rem; box-shadow: none; background: #fff4e2; }
.dr-q .tx { flex: 1; min-width: 0; display: grid; }
.dr-q b { font-family: var(--rd-font-read); font-size: 1.3rem; font-weight: 700; color: #2b2350; }
.dr-q small { font-weight: 800; color: #7a6aa8; }
/* Bigger in the game, so small fingers hit the right part; scale keeps every part where it is on the face. */
.dr-game .dr-face { width: min(19rem, 92%); margin: .4rem auto .2rem; }
@media (prefers-reduced-motion: reduce) {
    .dr-organ, .dr-face.game .dr-part.shake { animation: none; }
}


/* Payment return page, design 1A (rocket). Dark like the landing page's space theme; colours pass 4.5:1 on #0B0430. */
.pr { box-sizing: border-box; max-width: 30rem; margin: 1rem auto 2rem; padding: 2.25rem 1.5rem 1.75rem; border-radius: 2.25rem; text-align: center; color: #fff;
      display: flex; flex-direction: column; align-items: center; gap: .6rem;
      background-color: #0B0430;
      background-image: radial-gradient(2px 2px at 10% 8%, #fff, transparent), radial-gradient(2px 2px at 88% 12%, #fff, transparent),
                        radial-gradient(1.5px 1.5px at 22% 30%, #fff, transparent), radial-gradient(1.5px 1.5px at 76% 34%, #fff, transparent),
                        radial-gradient(1.5px 1.5px at 92% 70%, #fff, transparent), radial-gradient(1.5px 1.5px at 6% 78%, #fff, transparent); }
.rd-shell .pr h1 { margin: 0; color: #fff; font-size: clamp(1.8rem, 7vw, 2.15rem); line-height: 1.08; font-weight: 900; }
.pr-kicker { margin: 0; font-size: .82rem; font-weight: 900; letter-spacing: .14em; color: #7DF0FF; }
.pr-kicker-bad { color: #FF8A9A; }
.pr-art { width: 9.5rem; height: auto; overflow: visible; }
.pr-lead { margin: 0; font-size: 1.05rem; line-height: 1.45; font-weight: 600; color: #E4DBFF; }
.pr-card { box-sizing: border-box; width: 100%; margin-top: .5rem; padding: .9rem 1.15rem; border-radius: 1.4rem; background: #24135E; border: 2px solid #7DF0FF; text-align: left; }
.pr-card-bad { background: #2A1640; border-color: #FF8A9A; text-align: center; }
.pr-card-title { margin: 0 0 .35rem; font-size: .76rem; font-weight: 900; letter-spacing: .1em; color: #7DF0FF; }
.pr-card-bad .pr-card-title { color: #FF8A9A; }
.pr-card dl { margin: 0; }
.pr-card dl div { display: flex; justify-content: space-between; gap: 1rem; padding: .25rem 0; font-size: .92rem; font-weight: 600; }
.pr-card dt { color: #E4DBFF; }
.pr-card dd { margin: 0; color: #fff; text-align: right; }
.pr-total { display: flex; justify-content: space-between; gap: 1rem; margin-top: .4rem; padding-top: .6rem; border-top: 1px dashed #5A4A9E; font-size: 1.15rem; font-weight: 900; }
.pr-total strong { color: #FFE27A; }
.pr-reason { margin: 0; font-size: 1rem; line-height: 1.45; font-weight: 600; }
.pr-note { margin: .25rem 0 0; font-size: .92rem; line-height: 1.45; font-weight: 600; color: #E4DBFF; }
.pr-note strong { color: #fff; }
.rd-shell a.pr-btn { box-sizing: border-box; display: flex; align-items: center; justify-content: center; width: 100%; min-height: 58px; margin-top: 1rem; border-radius: 999px;
      font-size: 1.15rem; font-weight: 900; text-decoration: none; color: #14052E; background: #FFD23F; box-shadow: 0 6px 0 #B36B00; }
.rd-shell a.pr-btn:hover { background: #FFDD66; }
.rd-shell a.pr-link { display: inline-flex; align-items: center; min-height: 48px; padding: 0 1rem; font-weight: 800; color: #E4DBFF; }
.rd-shell .pr :focus-visible { outline-color: #FFD23F; }
.pr-wait { animation: pr-bob 1.6s ease-in-out infinite; }
.pr-flame { transform-origin: 100px 146px; animation: pr-flicker .5s ease-in-out infinite alternate; }
@keyframes pr-bob { 50% { transform: translateY(-6px); } }
@keyframes pr-flicker { to { transform: scaleY(.85); } }
@media (prefers-reduced-motion: reduce) { .pr-wait, .pr-flame { animation: none; } }

/* Checkout details: name across the top, email and phone side by side (stacked on a phone), a short hint under a field. */
.ck-field-wide { grid-column: 1 / -1; }
/* A field sits in a grid row with its neighbour; without this, a field with no hint stretched its box to match one
   that has a hint (email beside phone). Fixed box height so every input is the same size. */
.ck-field { align-content: start; }
.ck-field input { height: 3.25rem; box-sizing: border-box; }
.ck-field input::placeholder { color: #9a93b5; }
.ck-hint { font-size: .85rem; line-height: 1.4; color: var(--rd-ink-soft); }
.ck-hint.ck-error { color: var(--rd-berry); font-weight: 800; }
.ck-field input.ck-invalid { border-color: var(--rd-berry); }
