/* Child screens (redesign V1): map home, lesson game, reward, sticker book.
   Big touch targets, no text below 14px, motion off for reduced-motion users. */
:root{--kid-sky:#fff8ea;--kid-grass:#eef6e6;--kid-sun:#f4d179;--kid-ink:#294439;--kid-green:#225e46;--kid-red:#d9725a;--kid-shadow:0 6px 0 #00000012}

/* ---------- layout ---------- */
.kid-layout{min-height:100vh;min-height:100dvh;display:flex;flex-direction:column;background:linear-gradient(180deg,var(--kid-sky) 0,#fdf6e8 40%,var(--kid-grass) 100%)}
.kid-top{position:sticky;top:0;z-index:20;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 16px;background:#fff8eae6;backdrop-filter:blur(6px);border-bottom:1px solid #f1e6cc}
.kid-brand{display:flex;align-items:center;gap:8px;font-weight:800;font-size:18px;color:var(--kid-green);min-height:44px;min-width:44px}
.kid-brand img{width:34px;height:34px}
.kid-top-controls{display:flex;align-items:center;gap:8px;min-width:0}
.kid-top .language-btn{font-size:14px;padding:8px 12px;border-radius:999px;background:#fff}
.kid-learner{display:flex;align-items:center;gap:6px;padding:4px 12px 4px 4px;border-radius:999px;background:#fff;border:1px solid #efe3c8;font-size:15px;font-weight:700;max-width:46vw}
.kid-learner span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.kid-main{width:100%;max-width:640px;margin:0 auto;padding:14px 16px 118px;flex:1}
.kid-main:focus{outline:none}
.kid-nav{position:fixed;left:0;right:0;bottom:0;z-index:30;display:flex;justify-content:center;gap:4px;padding:8px 10px calc(8px + env(safe-area-inset-bottom));background:#fffdf7f2;border-top:1px solid #efe3c8;box-shadow:0 -6px 24px #0000000d}
.kid-tab{flex:1;max-width:150px;display:flex;flex-direction:column;align-items:center;gap:2px;padding:6px 4px;border-radius:18px;font-size:14px;font-weight:700;color:#5c6b60}
.kid-tab span{font-size:28px;line-height:1.1}
.kid-tab.active{background:#fff1c9;color:var(--kid-ink)}
.kid-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:28px;color:#6b776f}
.kid-footer .quiet-button,.kid-footer .status-chip{font-size:14px}

/* ---------- shared bits ---------- */
.primary.big,.secondary.big{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:60px;padding:0 30px;border-radius:999px;font-size:21px;font-weight:800;letter-spacing:.2px}
.primary.big{background:var(--kid-green);color:#fffef6;box-shadow:0 5px 0 #143b2b}
.primary.big:active{transform:translateY(3px);box-shadow:0 2px 0 #143b2b}
.primary.big:disabled{opacity:.42;box-shadow:none}
.secondary.big{background:#fff;border:2px solid #e6dcc3;color:var(--kid-ink);box-shadow:0 4px 0 #e6dcc3}
.bubble{position:relative;margin:0;padding:12px 16px;background:#fff;border:2px solid #f1e3bf;border-radius:20px;font-size:18px;font-weight:700;line-height:1.45;color:var(--kid-ink)}
.guide{display:block;flex:none}
.guide-bear{width:64px;height:96px}
.guide-chick{width:58px;height:70px}
.guides{display:inline-flex;align-items:flex-end;gap:2px}
.guide-line{display:flex;align-items:flex-end;gap:10px;margin:6px 0 12px}
.guide-line .bubble{flex:1}
.guide-line .bubble::before{content:'';position:absolute;left:-11px;bottom:18px;border:9px solid transparent;border-right-color:#f1e3bf}
.guide-line.cheer .guide{animation:bounce .7s ease 2}
.guide-line.oops .guide{animation:wiggle .5s ease 1}
.guide.cheer{animation:bounce .8s ease 3}

/* ---------- home ---------- */
.kid-hello{font-size:26px;letter-spacing:-.5px;margin:4px 0 12px}
.today-card{position:relative;display:flex;flex-wrap:wrap;justify-content:center;gap:12px;align-items:center;padding:16px;border-radius:28px;background:#fff;border:3px solid var(--kid-sun);box-shadow:var(--kid-shadow)}
/* 10-17: on a 320 px phone a wide system font (Roboto/DejaVu) made the done card's copy wider than the space beside the two guides, so its buttons ran past the card. The copy now takes the rest of the row and moves under the guides only when its narrowest form does not fit; where it fits, every box is where it was (measured at 320/390, en/zh-Hant, both families, two font sets). */
.today-card>.today-copy{flex:1 1 0;min-width:min-content}
.today-card.is-done{background:#f0f8ea;border-color:#a9cf91}
.today-art .guide-bear{width:78px;height:117px}
.today-card.is-done .today-art .guide-bear{width:66px;height:99px}
.today-label{display:inline-block;margin-bottom:6px;padding:3px 12px;border-radius:999px;background:#fff1c9;font-size:14px;font-weight:800;color:#7a5a12}
.today-copy .bubble{margin-bottom:12px;font-size:19px}
.today-copy .primary.big{width:100%}
.today-sub{margin:8px 0 0;font-size:14px;color:#66746b}
.today-sticker{position:absolute;top:-14px;right:-6px;font-size:40px;filter:drop-shadow(0 3px 0 #0000001a);animation:pop .5s ease}
.sticker-strip{display:flex;align-items:center;gap:10px;margin:16px 0 6px;padding:12px 16px;border-radius:20px;background:#fff;border:2px solid #efe3c8;font-size:16px}
.sticker-strip>span:first-child{font-size:28px}
.sticker-strip .strip-last{margin-left:auto;font-size:24px;letter-spacing:2px}

/* ---------- map ---------- */
.kid-map{margin-top:14px}
.map-chapter{margin:18px 0 6px}
.map-chapter-title{display:flex;align-items:center;gap:10px;margin:0 0 4px;padding:10px 16px;border-radius:18px;font-size:18px;letter-spacing:0}
.map-chapter-title span{display:inline-grid;place-items:center;width:32px;height:32px;border-radius:50%;background:#fff;font-size:14px}
.tone-peach .map-chapter-title{background:#f9e0d0}.tone-mint .map-chapter-title{background:#dcefd8}.tone-yellow .map-chapter-title{background:#f8ebbd}.tone-lilac .map-chapter-title{background:#e9dff3}
.tone-sky .map-chapter-title{background:#dcebf6}
.tone-sun .map-chapter-title{background:#f8ebbd}
.tone-rose .map-chapter-title{background:#f7dfe4}
.map-path{position:relative}
.map-line{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.map-line polyline{fill:none;stroke:#e2cf9f;stroke-width:6;stroke-dasharray:2 14;stroke-linecap:round;vector-effect:non-scaling-stroke}
.map-stop{position:relative;height:140px;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;padding-top:12px;width:140px}
/* Stops zigzag but always stay inside the page width (no sideways scrolling). */
.map-stop.spot-mid{margin-left:calc(50% - 70px)}.map-stop.spot-right{margin-left:min(calc(76% - 70px),calc(100% - 140px))}.map-stop.spot-left{margin-left:max(calc(24% - 70px),0px)}
.map-node{position:relative;width:86px;height:86px;flex:none;border-radius:50%;background:#fff;border:4px solid #e9dcbc;box-shadow:0 6px 0 #e3d3ab;display:grid;place-items:center}
.map-node:active{transform:translateY(3px);box-shadow:0 3px 0 #e3d3ab}
.node-face{font-size:42px;line-height:1}
.map-node.is-done{border-color:#f0c040;background:#fff9e3;box-shadow:0 6px 0 #ddb12f}
.map-node.is-current{width:96px;height:96px;border-color:var(--kid-green);box-shadow:0 6px 0 #173e30;animation:glow-node 2s ease-in-out infinite}
.map-node.is-locked{background:#f1efe9;border-color:#d9d4c7;box-shadow:0 6px 0 #cfc9bb}
.map-node.is-locked .node-face{filter:grayscale(.7);opacity:.7}
.node-star{position:absolute;top:-8px;right:-8px;font-size:26px}
.node-lock{position:absolute;bottom:-6px;right:-6px;font-size:24px;background:#fff;border-radius:50%;padding:2px}
.node-title{margin-top:8px;font-size:15px;font-weight:800;text-align:center;line-height:1.25;max-width:140px}
.node-note{font-size:14px;font-weight:700;color:var(--kid-green)}
.map-stop .lesson-tag{font-size:14px;margin:2px 0 0;padding:0 8px}
.map-guide{position:absolute;top:22px;left:-40px}
.spot-left .map-guide{left:auto;right:-40px}
.map-guide .guide-bear{width:44px;height:66px;animation:bounce 2.4s ease-in-out infinite}

/* ---------- sticker book ---------- */
.kid-stickers h1{font-size:26px;margin:0 0 4px}
.book-head{display:flex;align-items:flex-end;gap:12px;margin:4px 0 10px}
.book-count{margin:0;font-size:18px;font-weight:800;color:var(--kid-green)}
.book-rule,.book-note{font-size:15px;color:#5f6d63}
.sticker-grid{list-style:none;padding:0;margin:14px 0;display:grid;grid-template-columns:repeat(auto-fill,minmax(92px,1fr));gap:12px}
.sticker{display:flex;flex-direction:column;align-items:center;gap:4px;text-align:center}
.sticker-face{display:grid;place-items:center;width:78px;height:78px;border-radius:50%;background:#fff;border:4px solid #fff;box-shadow:0 4px 12px #0000001f;font-size:44px}
.sticker-name{font-size:14px;font-weight:700}
.sticker.rare .sticker-face{border-color:#f0c040;background:radial-gradient(circle,#fff8d8,#fff 70%);box-shadow:0 0 0 3px #f7e08a,0 4px 14px #d6a62e55}
.rare-tag{font-size:14px;font-weight:800;color:#a17208}
.sticker.slot-empty .sticker-face{background:transparent;border:3px dashed #e1d6bd;box-shadow:none;font-size:26px;color:#cbbd9c}
.sticker.slot-empty.rare-slot .sticker-face{border-color:#f0d27a}
.kid-stickers .primary.big{width:100%;margin-top:6px}

/* ---------- lesson game ---------- */
.game-shell{min-height:100vh;min-height:100dvh;background:linear-gradient(180deg,var(--kid-sky),var(--kid-grass));padding:10px 16px max(30px,env(safe-area-inset-bottom))}
.game-shell>*{max-width:640px;margin-left:auto;margin-right:auto}
.game-top{display:flex;align-items:center;gap:10px;margin-bottom:10px}
.game-exit{width:48px;height:48px;flex:none;border-radius:50%;background:#fff;border:2px solid #eadfc4;font-size:22px;font-weight:800;color:#6b776f}
.game-steps{flex:1;min-width:0;display:flex;justify-content:center;gap:6px;list-style:none;margin:0;padding:0}
.game-steps li{display:grid;place-items:center;width:40px;height:40px;border-radius:50%;background:#ffffffa8;font-size:20px;opacity:.5}
.game-steps li.past{opacity:.85;background:#e3f0dc}
.game-steps li.now{opacity:1;background:#fff;box-shadow:0 0 0 3px var(--kid-sun);transform:scale(1.08)}
.game-top .language-btn{font-size:14px;border-radius:999px;background:#fff;padding:8px 12px}
.game-card{background:#fff;border-radius:30px;padding:16px 16px 22px;box-shadow:var(--kid-shadow);border:2px solid #f1e6cc}
.game-count{margin:0 0 4px;font-size:14px;font-weight:800;color:#8a7a52;letter-spacing:.3px}
.game-resume{margin:0 0 6px;font-size:15px;font-weight:700;color:var(--kid-green)}
.word-card-big{display:flex;flex-direction:column;align-items:center;gap:4px;margin:8px 0 14px;padding:14px;border-radius:24px;background:#fffbef}
.word-picture{font-size:96px;line-height:1.1;animation:pop .45s ease}
/* 10-17: a card's own drawing (card.image) sits where its emoji would, at the same size */
.card-picture{display:inline-block;width:1em;height:1em;vertical-align:-.125em;object-fit:contain;pointer-events:none;user-select:none}
.word-text{font-size:40px;font-weight:800;letter-spacing:1px;text-align:center}
.word-card-big .jyutping{font-size:20px;font-weight:700;color:#7a5a12}
.word-en{font-size:16px;color:#66746b}
.tone-note{text-align:center;font-size:14px;color:#7c887f;margin:8px 0 0}
.speaker{display:inline-grid;place-items:center;width:58px;height:58px;border-radius:50%;background:#fff1c9;border:3px solid var(--kid-sun);font-size:26px;vertical-align:middle}
.speaker.big{display:flex;align-items:center;justify-content:center;gap:10px;width:auto;height:auto;min-height:64px;margin:6px auto;padding:8px 26px;border-radius:999px;font-size:30px}
.speaker.big .speaker-text{font-size:19px;font-weight:800}
.speaker[aria-busy=true]{animation:glow-speaker 1s ease-in-out infinite}
.speaker.attention{animation:glow-speaker 1.6s ease-in-out infinite}
.game-bottom{margin-top:18px;text-align:center}
.game-bottom .primary.big{width:100%}
.game-hint{margin:10px 0 0;font-size:15px;color:#6b776f}
.pick-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:14px 0 4px}
.pick{aspect-ratio:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;border-radius:24px;background:#fffdf5;border:4px solid #eadfc4;box-shadow:0 5px 0 #eadfc4;font-size:56px;line-height:1}
.pick strong{font-size:16px}
.pick.correct{border-color:#56a35d;background:#ecf8e8;box-shadow:0 5px 0 #3f8a47;animation:pop .45s ease}
.pick.wrong{border-color:var(--kid-red);animation:shake .45s ease}
.pick:disabled{opacity:1;cursor:default}
.pick:disabled:not(.correct){opacity:.45}
.match-board{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:12px 0}
.match-col{display:flex;flex-direction:column;gap:12px}
.match-tile{min-height:76px;border-radius:22px;border:4px solid #eadfc4;background:#fffdf5;box-shadow:0 5px 0 #eadfc4;font-size:40px;display:grid;place-items:center}
.match-tile.sound{font-size:30px}
.match-tile.pair-a{background:#ffe3d6;border-color:#f3b89e}.match-tile.pair-b{background:#dcf1dd;border-color:#9fd0a2}.match-tile.pair-c{background:#dbe9fb;border-color:#9fbfe9}.match-tile.pair-d{background:#f6e2f6;border-color:#d9a8d9}
.match-tile.selected{outline:4px solid var(--kid-green);outline-offset:3px;transform:scale(1.04)}
.match-tile.done{opacity:1;animation:pop .4s ease}
.match-tile.done.sound{font-size:30px;color:var(--kid-green)}
.match-tile.wrong{border-color:var(--kid-red);animation:shake .45s ease}
.match-tile:disabled{cursor:default}
.speak-actions{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:12px}
.record-button{display:inline-flex;align-items:center;gap:8px;min-height:58px;padding:0 20px;border-radius:999px;background:#fff;border:3px solid #f3b89e;font-size:17px;font-weight:800}
.record-button span{font-size:24px}
.record-button.active{background:#ffe3d6;animation:glow-record 1s ease-in-out infinite}
.speak-actions .secondary{min-height:52px;border-radius:999px;padding:0 18px;font-size:16px;font-weight:700}
.family-card{margin:10px 0 0;padding:16px 18px;border-radius:24px;background:#fff9ec;border:2px dashed #e7cf8f}
.family-card h2{font-size:20px;margin:0 0 10px;letter-spacing:0}
.family-card ol{margin:0;padding-left:22px;display:flex;flex-direction:column;gap:12px}
.family-card li{font-size:17px;line-height:1.55}
.family-card li>span:first-child{display:block;font-size:14px;font-weight:800;color:#8a6a1c}
.family-card .jyutping{font-size:16px;color:#7a5a12}
.family-card .speaker{width:44px;height:44px;font-size:20px;margin-left:4px}
.family-small{margin:12px 0 0;font-size:14px;color:#6b776f}
.family-tip{margin:12px 0 0;font-size:15px;line-height:1.55;color:#4d5b52}
.word-note{margin:0 0 10px;padding:10px 14px;border-radius:16px;background:#f3f7ef;font-size:15px;line-height:1.5;color:#3f5246;text-align:center}

/* ---------- reward ---------- */
.reward-shell{display:flex;align-items:flex-start}
.kid-reward{position:relative;overflow:hidden;margin-top:16px;border-radius:32px;border:3px solid var(--kid-sun);background:#fff}
.kid-reward h1{font-size:34px;margin:10px 0 6px}
.kid-reward .guides .guide-bear{width:96px;height:128px}
.kid-reward .guides .guide-chick{width:80px;height:95px}
.reward-sticker{display:inline-flex;flex-direction:column;align-items:center;gap:6px;margin:10px auto 4px}
.reward-sticker .sticker-face{width:132px;height:132px;font-size:78px;border-width:6px}
.reward-sticker.is-new .sticker-face{animation:pop .7s cubic-bezier(.2,1.6,.4,1)}
.reward-sticker.rare .sticker-face{border-color:#f0c040;box-shadow:0 0 0 5px #f7e08a,0 8px 24px #d6a62e66}
.reward-sticker strong{font-size:18px}
.reward-note{font-size:18px!important;font-weight:700;color:var(--kid-ink)!important}
.reward-small{font-size:15px!important}
.kid-reward .button-row{display:flex;flex-direction:column;gap:12px;margin-top:16px}
.kid-reward .button-row>*{width:100%}
.confetti{position:absolute;inset:0;pointer-events:none}
.confetti span{position:absolute;top:-40px;left:calc(8% + var(--i) * 15%);font-size:28px;animation:fall 2.6s ease-in calc(var(--i) * .18s) 1 forwards}

/* ---------- motion ---------- */
@keyframes pop{0%{transform:scale(.6)}60%{transform:scale(1.12)}100%{transform:scale(1)}}
@keyframes shake{0%,100%{transform:translateX(0)}25%{transform:translateX(-8px)}75%{transform:translateX(8px)}}
@keyframes bounce{0%,100%{transform:translateY(0)}50%{transform:translateY(-8px)}}
@keyframes wiggle{0%,100%{transform:rotate(0)}30%{transform:rotate(-8deg)}70%{transform:rotate(8deg)}}
/* Buttons only glow (no size change), so a tap target never moves under a finger. */
@keyframes glow-node{0%,100%{box-shadow:0 6px 0 #173e30,0 0 0 0 #225e4666}50%{box-shadow:0 6px 0 #173e30,0 0 0 12px #225e4600}}
@keyframes glow-speaker{0%,100%{box-shadow:0 0 0 0 #f4d17999}50%{box-shadow:0 0 0 10px #f4d17900}}
@keyframes glow-record{0%,100%{box-shadow:0 0 0 0 #e8907399}50%{box-shadow:0 0 0 10px #e8907300}}
@keyframes fall{0%{transform:translateY(0) rotate(0);opacity:1}100%{transform:translateY(520px) rotate(220deg);opacity:0}}
@media(prefers-reduced-motion:reduce){.kid-layout *,.game-shell *,.kid-reward *{animation:none!important;transition:none!important}}

/* ---------- small phones / wide screens ---------- */
@media(max-width:420px){.kid-brand span{display:none}.game-steps{gap:3px}.game-steps li{width:30px;height:30px;font-size:16px}.game-exit{width:44px;height:44px}}
@media(max-width:360px){.pick{font-size:44px}.word-picture{font-size:80px}.word-text{font-size:34px}.kid-tab{font-size:14px}.today-art .guide-bear{width:62px;height:93px}}
@media(min-width:900px){.kid-main{padding-top:24px}.kid-nav{left:50%;right:auto;transform:translateX(-50%);bottom:16px;border:1px solid #efe3c8;border-radius:24px;width:440px}}

/* ---------- songs ---------- */
.kid-rhymes h1{font-size:30px;margin:0}
.rhyme-head{display:flex;align-items:flex-end;gap:12px;margin:4px 0 14px}
.rhyme-head .jyutping{margin:2px 0 6px;font-size:16px;font-weight:700;color:#7a5a12}
.rhyme-play{width:100%}
.rhyme-lines{list-style:none;margin:14px 0;padding:0;display:flex;flex-direction:column;gap:8px}
.rhyme-line{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:18px;background:#fff;border:2px solid #f1e6cc}
.rhyme-line.now{border-color:var(--kid-sun);background:#fff8de}
.rhyme-line-play{flex:none;width:44px;height:44px;border-radius:50%;background:#fff1c9;border:2px solid var(--kid-sun);font-size:16px}
/* R3-B25: a line is shown in its two halves (not always 3 + 3); cells keep one width across halves. */
.rhyme-chars{flex:1;min-width:0;display:flex;flex-wrap:wrap;gap:4px 14px}
.rhyme-half{min-width:0;display:grid;gap:2px 4px;flex:3 1 0;grid-template-columns:repeat(3,minmax(0,1fr))}
.rhyme-half[data-n="1"]{flex-grow:1;grid-template-columns:repeat(1,minmax(0,1fr))}
.rhyme-half[data-n="2"]{flex-grow:2;grid-template-columns:repeat(2,minmax(0,1fr))}
.rhyme-half[data-n="3"]{flex-grow:3;grid-template-columns:repeat(3,minmax(0,1fr))}
.rhyme-half[data-n="4"]{flex-grow:4;grid-template-columns:repeat(4,minmax(0,1fr))}
.rhyme-half[data-n="5"]{flex-grow:5;grid-template-columns:repeat(5,minmax(0,1fr))}
.rhyme-half[data-n="6"]{flex-grow:6;grid-template-columns:repeat(6,minmax(0,1fr))}
.rhyme-half[data-n="7"]{flex-grow:7;grid-template-columns:repeat(7,minmax(0,1fr))}
.rhyme-half[data-n="8"]{flex-grow:8;grid-template-columns:repeat(8,minmax(0,1fr))}
.rhyme-picker{display:flex;flex-wrap:wrap;gap:8px;margin:4px 0 12px}
.rhyme-pick{display:flex;flex-direction:column;align-items:center;min-width:88px;min-height:56px;padding:6px 12px;border-radius:16px;background:#fff;border:2px solid #f1e6cc;color:inherit}
.rhyme-pick strong{font-size:20px;line-height:1.2}
.rhyme-pick small{font-size:14px;color:#7a5a12}
.rhyme-pick[aria-pressed="true"]{border-color:var(--kid-sun);background:#fff8de}
.rhyme-char{display:flex;flex-direction:column;align-items:center;min-width:0;border-radius:10px;padding:2px 0 0}
@media(max-width:420px){.rhyme-half{flex-basis:100%}}
.rhyme-char strong{font-size:26px;line-height:1.2}
.rhyme-char small{font-size:14px;color:#7a5a12}
.rhyme-char.sung strong{color:var(--kid-green)}
.rhyme-char.now{background:var(--kid-sun)}
.rhyme-char.now strong{color:#3b2a00}
.rhyme-meaning{margin:8px 0 0;padding:12px 16px;border-radius:18px;background:#fff;border:2px dashed #e7cf8f;font-size:15px}
.rhyme-meaning summary{font-weight:800;cursor:pointer}
.rhyme-meaning li{margin:6px 0;line-height:1.5}

/* ---------- plans, reminders, grown-up page ---------- */
.lesson-tag.week{background:#e6f0fb;color:#1f4a7a}
.trial-reminder{margin:0 0 12px;padding:12px 16px;border-radius:16px;background:#fff4d6;border:2px solid #f0c040;font-size:15px;line-height:1.5}
.family-plan .plan-status{margin:0 0 10px;padding:10px 14px;border-radius:14px;background:#eef6e6;font-size:15px;line-height:1.5}
.week-summary h2 small{font-size:14px;font-weight:600;color:#66746b;margin-left:6px}
.week-facts{list-style:none;padding:0;margin:0 0 10px;display:flex;flex-direction:column;gap:6px;font-size:15px}
.week-facts strong{font-size:20px;color:var(--kid-green)}
.week-words{list-style:none;padding:0;margin:0 0 10px;display:flex;flex-wrap:wrap;gap:8px}
.week-words li{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border-radius:999px;background:#fff8e6;border:1px solid #efe3c8;font-size:15px}
.week-words small{font-size:14px;color:#7a5a12}
.week-task{font-size:15px;line-height:1.55}
.streak-number{margin:0 0 8px;font-size:16px}
.streak-number strong{font-size:34px;color:var(--kid-green)}
.streak-weeks{list-style:none;padding:0;margin:0 0 10px;display:flex;gap:6px;flex-wrap:wrap}
.streak-weeks li{display:flex;flex-direction:column;align-items:center;justify-content:center;width:40px;height:48px;border-radius:12px;background:#f5f2ea;font-size:18px}
.streak-weeks li small{font-size:14px;color:#66746b}
.streak-weeks li.met{background:#e3f1dd}.streak-weeks li.forgiven{background:#eef6e6}.streak-weeks li.current{background:#fff4d6}
.upcoming-list{list-style:none;padding:0;margin:8px 0 0;display:flex;flex-direction:column;gap:10px}
.upcoming-list li{display:flex;flex-direction:column;gap:4px;padding:10px 12px;border-radius:14px;background:#faf7ef;font-size:15px}
.upcoming-samples{display:flex;flex-wrap:wrap;gap:8px;font-size:16px}
.upcoming-samples>span{display:inline-flex;gap:4px;align-items:center}
.advanced{margin-top:22px}
.advanced>summary{font-size:18px;font-weight:800;cursor:pointer;padding:4px 0}
.advanced[open]>summary{margin-bottom:12px}
.advanced-body>[data-account-action="archive-sources"]{margin-bottom:12px}
/* The skip link is for keyboard users; a programmatic focus after a dialog must not show it. */
.skip-link:focus:not(:focus-visible){top:-80px}
/* G2 R2-M2: today is never a lock; the word game is always one tap away. */
.today-copy .big+.big{margin-top:8px}
.today-grown{display:block;margin:10px 0 0;padding:6px 0;border:0;background:none;color:#66746b;font:inherit;font-size:14px;text-align:left;text-decoration:underline;cursor:pointer;min-height:44px}
.word-game-strip{display:flex;align-items:center;gap:10px;width:100%;margin:16px 0 0;padding:12px 16px;border-radius:20px;background:#fff8e6;border:2px solid #f3d27a;font:inherit;font-size:16px;color:inherit;text-align:left;cursor:pointer;min-height:56px}
.word-game-strip>span:first-child{font-size:28px}
.word-game-strip>span:last-child{margin-left:auto;font-size:14px;color:#66746b}
.word-game-strip+.sticker-strip{margin-top:10px}
.today-copy .secondary.big{width:100%}
/* 10-17: Chinese labels on the today card never break inside a word (睇貼紙/簿); the card's copy moves under the guides when a whole label does not fit beside them */
.today-copy .big{word-break:keep-all}
.nowrap{white-space:nowrap}
/* G2 R2-M1: tap 豆豆 on the today card or the reward sticker to hear them */
.guide-tap{border:0;background:none;padding:0;font:inherit;color:inherit;cursor:pointer}
.reward-sticker[data-action]{cursor:pointer}
/* G2 R2-M7: a sentence for grown-ups on the family card */
.family-say{display:flex;flex-wrap:wrap;align-items:center;gap:4px 10px;margin-top:8px;padding:10px 12px;border-radius:14px;background:#fff8e6}
.family-say strong{font-size:20px}
.family-say-label,.family-say-en,.family-say-note{width:100%;font-size:14px;color:#66746b}
/* Pricing V1: the plan chooser for grown-ups (course dialog) and the quiet notice dot on the Grown-ups button. */
.kid-tab[data-action=parent]{position:relative}
.tab-dot{position:absolute;top:4px;right:calc(50% - 22px);width:12px;height:12px;border-radius:50%;background:var(--kid-red);box-shadow:0 0 0 2px #fff}
.plan-shop{display:grid;gap:14px}
.currency-switch{display:flex;flex-wrap:wrap;align-items:center;gap:8px;font-size:15px}
.currency-switch button{min-height:44px;padding:8px 14px;border-radius:999px}
.plan-options{border:0;margin:0;padding:0;display:grid;gap:10px;min-width:0}
.plan-options legend{font-weight:700;margin-bottom:8px;padding:0}
.plan-option{display:flex;gap:12px;align-items:flex-start;padding:14px;border:2px solid #d8dfd6;border-radius:16px;background:#fff;cursor:pointer;min-height:44px}
.plan-option.chosen{border-color:var(--kid-green);background:#f3f9f1}
.plan-option input{width:22px;height:22px;margin-top:2px;flex:none;accent-color:var(--kid-green)}
.plan-option-text{display:grid;gap:2px;min-width:0}
.plan-option-text strong{font-size:17px}
.plan-price{font-size:16px}
.plan-badge{font-style:normal;font-size:14px;font-weight:700;color:#7a4b00;background:var(--kid-sun);border-radius:999px;padding:2px 10px;margin-left:6px;white-space:nowrap}
.plan-charge{margin:0;display:flex;flex-wrap:wrap;align-items:baseline;gap:6px 10px;font-size:16px}
.plan-charge strong{font-size:34px;line-height:1.1;color:var(--kid-ink)}
.plan-details summary{cursor:pointer;font-weight:700;min-height:44px;display:flex;align-items:center}

/* G2 R2-M6: sticker garden */
.sticker-btn{display:flex;flex-direction:column;align-items:center;gap:2px;width:100%;height:100%;border:0;background:none;padding:0;font:inherit;color:inherit;cursor:pointer}
.sticker-scene{position:relative;height:220px;margin:12px 0 14px;border-radius:24px;overflow:hidden;background:linear-gradient(180deg,#dff1ff 0,#eef8ff 52%,#cfe9b8 52%,#b9dd9b 100%);border:2px solid #efe3c8}
.scene-hint{position:absolute;inset:auto 12px 12px;margin:0;padding:8px 12px;border-radius:14px;background:#ffffffd9;font-size:15px;color:#4c5b50}
.scene-sticker{position:absolute;width:56px;height:56px;border:0;border-radius:50%;background:#fffdf5e6;box-shadow:0 3px 0 #0000001a;font-size:36px;line-height:1;cursor:grab;touch-action:none;display:grid;place-items:center}
.scene-sticker.rare{box-shadow:0 0 0 3px #f3d27a}
.scene-sticker.hop{animation:pop .45s ease}
.reward-next{margin:6px 0 0;font-size:16px;color:#5c6b60}
.challenge-strip{background:#eef6ff;border-color:#9fbfe9}
.profile-current{font-size:14px;color:#2f6b3f;font-weight:800}
/* G2 R2-M5: 4 or 6 pictures for older children */
.pick-grid.n4{grid-template-columns:repeat(2,1fr)}
.pick-grid.n4 .pick{aspect-ratio:1.25}
.pick-grid.n5,.pick-grid.n6{grid-template-columns:repeat(3,1fr)}
.pick-grid.n6 .pick{font-size:46px}
/* G2 R2-M10: slow speaker and the six tones */
.speaker-row{display:flex;align-items:center;justify-content:center;gap:10px}
.speaker-row .speaker.big{margin:6px 0}
.slow-speaker{display:inline-grid;place-items:center;width:58px;height:58px;border-radius:50%;background:#e8f4e4;border:3px solid #9fd0a2;font-size:26px;vertical-align:middle;cursor:pointer}
.tone-note{display:block;margin:6px auto 0;padding:8px 14px;border:0;border-radius:999px;background:#fff8e6;font:inherit;font-size:15px;color:#7a5a12;cursor:pointer;min-height:44px}
.tone-list{list-style:none;margin:10px 0 0;padding:0;display:grid;gap:8px}
.tone-list li{display:grid;grid-template-columns:32px 1fr auto auto;grid-template-areas:'n how a b' 'n word a b';align-items:center;gap:2px 10px;padding:8px 10px;border-radius:14px;background:#fffbef}
.tone-n{grid-area:n;font-size:24px;font-weight:900;color:#7a5a12;text-align:center}
.tone-how{grid-area:how;font-size:14px;color:#66746b}
.tone-list strong{grid-area:word;font-size:20px}
.tone-list .jyutping{grid-area:word;margin-left:4.5em;font-size:16px}
.tone-list .jyutping b{color:#c0392b}
.tone-list .speaker,.tone-list .slow-speaker{width:44px;height:44px;font-size:20px}
.tone-list .speaker{grid-area:a}.tone-list .slow-speaker{grid-area:b}
/* G2 R2-M8: tablets use the whole screen: bigger pictures, words and characters */
@media(min-width:768px){
 .kid-main{max-width:920px;padding-left:28px;padding-right:28px}
 .game-shell>*{max-width:920px}
 .game-card{min-height:calc(100dvh - 120px);display:flex;flex-direction:column}
 .game-card>.game-bottom{margin-top:auto}
 .guide-bear{width:130px;height:195px}.guide-chick{width:116px;height:140px}
 .guide-line .bubble{font-size:24px}
 .word-card-big{flex:1;display:flex;flex-direction:column;justify-content:center}
 .word-picture{font-size:220px}.word-text{font-size:76px}.word-card-big .jyutping{font-size:30px}.word-en{font-size:22px}
 .pick-grid{gap:22px}.pick{font-size:110px}.pick-grid.n6 .pick{font-size:84px}
 .match-board{gap:24px}.match-tile{min-height:130px;font-size:72px}.match-tile.sound{font-size:48px}
 .speaker,.slow-speaker{width:72px;height:72px;font-size:32px}.speaker.big{min-height:84px;font-size:38px}.speaker.big .speaker-text{font-size:24px}
 .primary.big,.secondary.big{font-size:24px;min-height:72px}
 .today-art .guide-bear{width:130px;height:195px}.today-copy .bubble{font-size:26px}
 .sticker-scene{height:340px}.scene-sticker{width:80px;height:80px;font-size:54px}
 .kid-reward .guides .guide-bear{width:150px;height:200px}.kid-reward .guides .guide-chick{width:124px;height:148px}
 .reward-sticker .sticker-face{font-size:120px}
 .family-card{font-size:20px}.family-say strong{font-size:26px}
}
/* ---------- G2 R3 ---------- */
/* R3-B1: account forms large and easy to read (text ≥17px, inputs ≥48px), with the APP's own messages. */
dialog [data-account-form] label,dialog [data-account-form] .field-help,dialog .account-help,.account-lock label,.account-lock .field-help{font-size:17px}
dialog [data-account-form] input:not([type=checkbox]):not([type=radio]),.account-lock input:not([type=checkbox]):not([type=radio]){font-size:17px;min-height:48px}
dialog [data-account-form] button,.account-lock button{min-height:48px;font-size:17px}
dialog p,dialog li{font-size:16px}
.account-help{color:var(--ink);background:#f5f2e4;border-radius:12px;padding:12px 14px;line-height:1.6}
.field-help{margin:6px 0 0;color:var(--muted);line-height:1.5}
.password-row{display:flex;gap:8px;align-items:stretch}
.password-row input{flex:1;min-width:0}
.show-password{white-space:nowrap;border:1px solid var(--line);border-radius:10px;padding:0 12px;background:var(--paper)}
.field-error{color:#9d4937;font-size:16px;margin:6px 0 0;line-height:1.5}
.field-error:empty{display:none}
input[aria-invalid=true]{border-color:#9d4937!important}
.consent-line{font-size:16px;line-height:1.6;color:var(--ink)}
.legal-inline{margin:4px 0}.legal-inline summary{min-height:44px;display:flex;align-items:center;cursor:pointer;color:var(--green);font-weight:600}
.legal-inline ul{padding-left:20px}.legal-links{margin-top:16px}
/* R3-B2: the recovery code in big, easy-to-copy groups. */
.recovery-code.big{font-size:28px;letter-spacing:.06em;text-align:center;font-weight:700;padding:18px 12px}
.recovery-handle{font-size:17px!important}
/* R3-B3 */
.lock-big{font-size:26px;line-height:1.35;margin:0 0 12px}
.account-lock p{font-size:17px}
.locked-play-note{background:#fff2de;border:1px solid #e5c798;border-radius:14px;padding:12px 16px;margin:0 0 14px;font-size:16px;line-height:1.5}
/* R3-B11: a subtitle under what the character says when the spoken language differs. */
.bubble-sub{display:block;font-size:.82em;font-weight:500;opacity:.8;margin-top:4px}
/* R3-B13: praise first, then the sticker pops in. */
.reward-praise{font-size:18px!important;color:var(--ink)!important}
.reward-sticker.reveal-later{animation:reveal-sticker .6s ease 1.6s both}
.reward-sticker .reward-note{display:block;font-size:15px;margin-top:6px}
@keyframes reveal-sticker{0%{opacity:0;transform:scale(.4)}70%{opacity:1;transform:scale(1.12)}100%{opacity:1;transform:scale(1)}}
.reward-actions .primary.big{order:-1}
/* R3-B15: a wrong tap is neutral: a light wiggle, no red and no low tone. */
.pick.wrong,.match-tile.wrong{border-color:var(--line,#dfe6d8)!important;background:inherit;animation:wiggle .4s ease}
/* R3-B17: grown-up pages ≥16px, buttons ≥44px. */
.main-content .panel p,.main-content .panel li,.main-content .hint-box,.main-content .small-note,.main-content .profile-row small,.main-content .history-row,.main-content .history-row small,.week-facts,.week-task{font-size:16px!important}
.main-content .field label{font-size:16px}
.sync-status{font-size:16px}.sync-ok{color:var(--green)!important;font-weight:700}
.learner-switch button,.profile-row button,.profile-row .primary,.profile-row .secondary,[data-action=switch],[data-action=switch-ask]{min-height:44px;min-width:44px;font-size:15px}
.page-footer .quiet-button,.kid-footer .quiet-button,.welcome-footer .linklike{min-height:44px;display:inline-flex;align-items:center}
.choice-grid{border:0;padding:0;margin:0 0 16px;display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px}
.choice-grid legend{font-size:16px;font-weight:650;margin-bottom:8px}
.choice-button{display:flex;align-items:center;gap:10px;min-height:56px;border:1px solid var(--line);border-radius:14px;padding:10px 14px;background:var(--paper);font-size:16px;cursor:pointer}
.choice-button:has(input:checked){background:var(--mint);border-color:var(--green)}
.choice-button input{width:22px;height:22px;flex:none}
.choice-button:has(input:disabled){opacity:.5}
.trial-reminder{display:flex;flex-wrap:wrap;gap:10px;align-items:center}.trial-reminder p{margin:0;flex:1;min-width:220px}
.tax-note{font-size:15px!important}
.week-say{margin-top:8px}
.sticker-jyutping{display:block;font-size:14px;color:#7a5a12}
/* R3-B20: Jyutping larger on tablets. */
@media (min-width:700px){.jyutping{font-size:1.15em}.word-card .jyutping{font-size:15px}.family-card .jyutping{font-size:19px}.tone-list .jyutping{font-size:19px}}
/* R4-B2: after today is done, the other games sit below the map; the sticker comes later offline */
.after-map{margin-top:18px}
.after-map .word-game-strip:first-child{margin-top:0}
.today-copy a.secondary.big{display:flex;justify-content:center;align-items:center;width:100%;margin-top:8px;text-decoration:none}
.reward-later{margin:10px auto 0;max-width:30em;padding:10px 14px;border-radius:16px;background:#fff8e6;border:2px solid #f3d27a;font-size:17px!important;font-weight:700;color:var(--kid-ink)!important}
/* R4-B8: offline note above the map */
.map-offline{margin:14px 0 0;padding:10px 14px;border-radius:16px;background:#eef1f4;border:2px dashed #9aa8b5;font-size:16px;font-weight:700;color:#3d4a55}
/* R4-B4: say your own age */
.word-example{display:block;margin-top:6px;font-size:15px;color:#66746b}
.age-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:14px auto 4px;max-width:420px}
.age-card{display:flex;flex-direction:column;align-items:center;gap:2px;min-height:76px;padding:8px 6px;border-radius:18px;border:2px solid #e3e7ea;background:#f7f8f9;font:inherit;color:inherit;opacity:.72;cursor:pointer}
.age-card strong{font-size:28px;line-height:1.1}
.age-card span{font-size:16px}
.age-card .jyutping{font-size:15px}
.age-card.in-group{opacity:1;background:#fff8e6;border-color:#f3d27a}
.age-card.picked{opacity:1;background:#e8f6e0;border-color:#5aa246;box-shadow:0 0 0 3px #b9e3a5}
/* R4-B9: the rhyme animations */
.rhyme-bubble{margin:0 0 6px;font-size:18px}
.rhyme-stage{position:relative;margin:4px 0 12px;border-radius:22px;overflow:hidden;background:#1d2a33;aspect-ratio:16/9;box-shadow:var(--kid-shadow)}
.rhyme-video{display:block;width:100%;height:100%;object-fit:contain;background:#1d2a33;cursor:pointer}
.rhyme-novideo{margin:4px 0 12px;padding:10px 14px;border-radius:16px;background:#eef1f4;border:2px dashed #9aa8b5;font-size:16px;font-weight:700;color:#3d4a55}
.rhyme-after{display:flex;flex-wrap:wrap;gap:10px;margin:0 0 12px}
.rhyme-after .big{flex:1 1 180px}
.rhyme-controls{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.rhyme-controls .rhyme-play{flex:1 1 220px}
.rhyme-chain{min-height:48px;min-width:44px}
.rhyme-chain[aria-pressed="true"]{background:#e8f6e0;border-color:#5aa246}
/* R4-B10 「對答」 */
.ask-choices{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px;margin:14px 0}
.ask-choice{display:flex;flex-direction:column;align-items:center;gap:4px;min-height:96px;padding:10px;border-radius:20px;border:3px solid #e3e7ea;background:#fff;font:inherit;color:inherit;cursor:pointer}
.ask-choice .word-picture{font-size:34px}
.ask-choice strong{font-size:22px}
.ask-choice.picked{border-color:#5aa246;background:#e8f6e0}
.ask-choice.wrong{animation:wiggle .4s}
/* R4-B18: three big buttons for a family moment; details folded */
.obs-quick{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px;margin:4px 0 14px}
.obs-quick-button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-height:84px;padding:10px;border-radius:18px;border:2px solid var(--line);background:var(--paper);font:inherit;font-size:18px;font-weight:700;color:inherit;cursor:pointer}
.obs-quick-button span{font-size:28px}
.obs-more{margin:0 0 10px}
.obs-more summary{cursor:pointer;font-size:16px;font-weight:650;min-height:44px;display:flex;align-items:center}
/* R4-B18: one bottom bar everywhere; grown-up pages linked at the top; 44 px targets */
.layout .main-content{padding-bottom:120px}
.layout .mobile-nav{display:none!important}
.grown-links{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 14px}
.grown-link{display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:8px 14px;border-radius:14px;border:1px solid var(--line);background:var(--paper);font-size:16px;font-weight:650;color:inherit;text-decoration:none}
.grown-link.active{background:var(--mint);border-color:var(--green);color:var(--green)}
.kid-learner,.language-btn,.profile-button{min-height:44px;min-width:44px}
/* R4-B12: the sign-up button stays in view; readable welcome and add-child text */
.sticky-submit{position:sticky;bottom:-1px;z-index:2;margin:12px -4px 0;padding:10px 4px calc(10px + env(safe-area-inset-bottom));background:linear-gradient(#fffefa00,#fffefa 30%)}
.sticky-submit .primary{width:100%}
.welcome p,.welcome .field-help,.welcome label,.add-child-form p,.add-child-form label,.account-help,.consent-line{font-size:17px}
.welcome .small-note,.add-child-form .small-note{font-size:17px!important}
/* R4-B15: "account deleted" as large as "password changed" */
.deleted-notice{margin:0 0 16px;padding:14px 16px;border-radius:18px;background:#fff8e6;border:2px solid #f3d27a}
.deleted-notice .lock-big{margin:0 0 6px}
/* R4-B17: Jyutping in bubbles, after a right pick and in notes; at least 22 px on a tablet */
.bubble-jp{display:block;margin-top:2px;font-size:15px;font-weight:600;color:#7a5a12}
/* the right answer shows its word and Jyutping inside the tile: the tile grows instead of overflowing */
.pick.correct{aspect-ratio:auto;min-height:100%;padding:6px 4px;overflow:hidden}
.pick.correct>span{font-size:.72em}
.pick strong{line-height:1.2}
.pick .jyutping{display:block;font-size:14px;line-height:1.2;color:#7a5a12;overflow-wrap:anywhere}
.inline-jp{margin:0 2px;font-size:.9em;color:#7a5a12}
@media(min-width:700px){.game-shell .jyutping,.kid-home .jyutping,.kid-rhymes .jyutping,.rhyme-char small,.bubble-jp,.age-card .jyutping,.ask-choice .jyutping,.family-card .jyutping{font-size:22px}}
/* R4-B19: room between 「俾小朋友繼續玩」 and the sign-in heading (phones and tablets) */
.account-lock .locked-play{display:flex;justify-content:center;width:100%;margin:10px 0 28px}
.account-lock .locked-play+h2{margin-top:8px}
/* wide screens have the side menu (Map, Word garden, Progress, Grown-ups): no second row of links */
@media(min-width:801px){.grown-links{display:none}}
/* G2 pre-beta (src/beta.js): important notices, the free beta, feedback and the day-14 survey (grown-ups only). */
.parent-notice{margin:0 0 14px;padding:12px 16px;border-radius:16px;background:#eaf4ff;border:2px solid #7aa7d8;font-size:15px;line-height:1.55}
.parent-notice h2{font-size:17px;margin:0 0 6px}.parent-notice p{margin:4px 0;white-space:pre-line}.parent-notice .small-note{text-align:left;max-width:none}
.beta-free .beta-free-line{font-size:20px;margin:6px 0 4px;color:var(--kid-green,#225e46)}
.feedback-form textarea,.beta-survey textarea{width:100%;box-sizing:border-box;border:1px solid #ccd6c7;border-radius:10px;background:var(--paper,#fff);padding:12px;color:var(--ink,#1f2a24);font-size:16px;font-family:inherit;line-height:1.5;resize:vertical}
.feedback-form .small-note,.beta-survey .small-note,.feedback-panel .small-note{text-align:left;max-width:none;font-size:14px!important}
.feedback-panel .button-row{display:flex;flex-wrap:wrap;gap:10px}
.usage-setting{margin-top:18px;border-top:1px solid var(--line,#e6e0d6);padding-top:12px}.usage-setting .quiet-button{min-height:44px;padding-left:0}
.beta-survey{border:2px solid #f0c040;background:#fffaf0}
.beta-survey form .button-row{display:flex;flex-wrap:wrap;gap:10px}
/* Self-check 10-15: kid-facing tap targets at least 44 px (the logo link, the grown-ups' meaning of a rhyme); a field
   focused in a form with the sticky sign-up button scrolls above that button. */
.rhyme-meaning>summary{min-height:44px;padding:10px 0;box-sizing:border-box;cursor:pointer}
dialog:has(.sticky-submit){scroll-padding-bottom:110px}
