:root{color-scheme:dark;--bg:var(--theme-151024);--muted:var(--theme-a59bb5);--orange:var(--theme-ffad57);--cream:var(--theme-fff2dc)}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--cream);font-family:'Segoe UI',sans-serif}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer;color:inherit}button:focus-visible,a:focus-visible,canvas:focus-visible{outline:3px solid var(--theme-fdd17c);outline-offset:4px}header{height:80px;max-width:1400px;margin:auto;padding:0 5%;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--theme-ffffff10)}.brand{text-decoration:none;color:var(--cream);font-weight:800;font-size:16px;letter-spacing:2px}.brand span{color:var(--orange);font-size:27px;margin-right:10px}.header-right{display:flex;align-items:center;gap:28px}.season,.eyebrow{font-size:10px;letter-spacing:2.3px;font-weight:700;color:var(--orange)}#sound{background:none;border:1px solid var(--theme-ffffff25);border-radius:25px;padding:10px 16px;font-size:12px}main{max-width:1280px;margin:35px auto;padding:0 40px}.heading{display:flex;justify-content:space-between;align-items:end;margin:15px 0 28px}h1,h2,h3{font-family:'Trebuchet MS',sans-serif;margin:0}h1{font-size:clamp(38px,4.4vw,60px);line-height:1.02;letter-spacing:-2px}h1 em{color:var(--orange);font-style:normal}.heading p{font-size:14px;line-height:1.8;color:var(--muted);margin:0 0 5px}.game-shell{position:relative;border-radius:22px;overflow:hidden;border:1px solid var(--theme-8e77ab45);background:var(--theme-22263e);box-shadow:0 24px 90px var(--theme-0003);isolation:isolate}canvas{display:block;width:100%;aspect-ratio:1200/620;touch-action:none}.overlay{position:absolute;inset:0;display:grid;place-items:center;background:linear-gradient(90deg,var(--theme-130e29e8),var(--theme-130e2970) 65%,var(--theme-130e2930));text-align:center}.menu-content{max-width:640px;padding:24px}.pill{display:inline-block;font-size:10px;letter-spacing:2px;color:var(--theme-ffe2a8);border:1px solid var(--theme-ffd1894d);background:var(--theme-30243580);border-radius:30px;padding:9px 14px}h2{font-size:clamp(32px,4.3vw,58px);line-height:1.02;letter-spacing:-1.5px;margin:15px 0}h2 span{color:var(--theme-ffb85f)}.menu-content p{font-size:12px;color:var(--theme-e0d5e8);line-height:1.7}.primary{display:block;background:var(--theme-ffad57);color:var(--theme-251622);border:0;border-radius:12px;padding:15px 25px;font-weight:800;min-width:240px;margin:12px auto;box-shadow:0 5px 0 var(--theme-a65337);transition:transform .15s}.primary:hover{background:var(--theme-ffc079);transform:translateY(-2px)}.primary span{margin-left:70px}.controls-hint{font-size:8px;letter-spacing:1.2px;color:var(--theme-c0afca);margin-top:22px}.hud{position:absolute;inset:22px 25px auto;display:flex;justify-content:space-between;pointer-events:none}.hud strong{display:block;font:bold 32px 'Trebuchet MS',sans-serif;text-shadow:0 2px 10px var(--theme-000)}.hud span{font-size:12px}.hud-right{display:flex;gap:20px;align-items:start}#health{color:var(--theme-ffca7c);font-size:24px}#pause{pointer-events:auto;background:var(--theme-15102490);border:1px solid var(--theme-ffffff40);border-radius:8px;padding:8px 12px}.power{position:absolute;top:30px;left:50%;transform:translateX(-50%);color:var(--theme-ffe383);font-size:13px;font-weight:bold;letter-spacing:2px}.bubble{position:absolute;bottom:37%;left:3%;max-width:190px;background:var(--theme-fff0dd);color:var(--theme-3a2845);padding:10px 14px;border-radius:15px 15px 15px 2px;font-size:12px;box-shadow:0 5px 20px var(--theme-0002)}.end-content{padding:18px;background:var(--theme-1b142ae8);border:1px solid var(--theme-ffffff20);border-radius:20px;min-width:330px}.end-content h2{font-size:36px}.end-content p{font-size:12px;color:var(--theme-cbbcd9);margin:8px}.final-score{font:bold 58px 'Trebuchet MS',sans-serif;color:var(--theme-ffb660)}.secondary{padding:10px 24px;border:1px solid var(--theme-ffffff30);border-radius:10px;background:transparent}.text-button{display:block;margin:10px auto 0;background:none;border:0;color:var(--theme-cdbada);font-size:12px}.best{color:var(--theme-ffe188)!important}.below{display:flex;justify-content:space-between;font-size:11px;color:var(--theme-c6b9d4);margin-top:18px}.muted{color:var(--theme-82778e)}kbd{border:1px solid var(--theme-ffffff30);padding:3px 7px;border-radius:4px;font-size:9px;margin-right:5px}.bottom-grid{display:grid;grid-template-columns:1.7fr 1fr;gap:50px;margin-top:45px}h3{font-size:23px;letter-spacing:-.5px}.how h3{margin-top:10px}.tips{display:flex;gap:25px}.tips p{flex:1;font-size:11px;color:var(--muted);line-height:1.7}.tips b{color:var(--orange);font-size:10px}.tips strong{display:block;font-size:12px;color:var(--theme-ede2f3);margin:7px 0}.tips span{display:block}aside{background:var(--theme-21182f);border:1px solid var(--theme-ffffff0c);border-radius:16px;padding:22px}.board-title{display:flex;align-items:center;justify-content:space-between;gap:8px}.board-title h3{font-size:18px}.board-title>span{font-size:7px;letter-spacing:1px;color:var(--theme-b49dbf)}.board-note{font-size:10px;line-height:1.6;color:var(--theme-8f809f);margin-bottom:0}.score-row{display:flex;justify-content:space-between;gap:12px;font-size:12px;padding:12px 0;border-bottom:1px solid var(--theme-ffffff0d)}.score-row span{flex:1;color:var(--theme-cbbad8)}.empty{font-size:12px;color:var(--theme-b6a5c4);padding:10px 0}footer{max-width:1280px;margin:40px auto 0;padding:25px 40px;border-top:1px solid var(--theme-ffffff12);display:flex;justify-content:space-between;font-size:9px;letter-spacing:1px;color:var(--theme-80728f)}[hidden]{display:none!important}@media(max-width:700px){header{height:68px;padding:0 20px}.brand{font-size:12px}.season{display:none}main{margin:28px auto;padding:0 16px}.heading{margin-bottom:24px}.heading p{font-size:10px;max-width:130px}h1{font-size:37px;letter-spacing:-1px}.game-shell{border-radius:16px}canvas{aspect-ratio:4/5}.menu-content{padding:12px}.menu-content h2{font-size:42px}.menu-content p{font-size:11px;max-width:310px}.pill{font-size:8px}.below{font-size:9px;gap:12px}.below .muted{display:none}.bottom-grid{grid-template-columns:1fr;gap:22px;margin-top:36px}.tips{gap:15px}footer{padding:20px 16px;gap:20px;font-size:8px}.bubble{font-size:10px;max-width:145px;bottom:39%}.hud{inset:16px}.power{top:76px;font-size:10px}.end-content{min-width:280px}.end-content h2{font-size:30px}.controls-hint{font-size:7px}}@media(prefers-reduced-motion:reduce){.primary{transition:none}}

.hero-choices{display:flex;justify-content:center;gap:16px}.hero-choice{background:var(--theme-130e2970);border:2px solid var(--theme-ffffff25);border-radius:16px;min-width:120px;padding:8px}.hero-choice[aria-pressed=true]{border-color:var(--orange);box-shadow:0 0 0 2px var(--theme-ffd1894d)}.hero-choice img{display:block;object-fit:contain;width:120px;height:120px}.primary:disabled{opacity:.6;cursor:wait}#art-status{min-height:18px;margin:4px}.menu-content h2{font-size:36px}.controls-hint{margin-top:12px}@media(max-width:700px){.menu-content h2{font-size:28px;margin:8px 0}.menu-content p{font-size:10px;margin:6px}.hero-choice{min-width:100px;padding:4px}.hero-choice img{width:100px;height:100px}.menu-content .primary{padding:12px 20px;margin:8px auto}.menu-content .pill{padding:6px 10px}}

.dog-bubble{left:auto;right:12%;bottom:36%;max-width:90px}


.start-rules{font-weight:700;font-size:13px;margin:10px 0}.first-run-tip{position:absolute;top:25%;left:50%;transform:translateX(-50%);padding:10px 18px;background:var(--cream);color:var(--bg);border-radius:20px;font-weight:700;pointer-events:none}.heart-bump{color:var(--orange);transform:scale(1.12)}.game-shell{scroll-margin-top:0}@media(max-width:700px){body.run-active header,body.run-active main>.eyebrow,body.run-active .heading{display:none}body.run-active main{margin-top:0;padding-top:0}.bubble{font-size:13px;line-height:1.3;max-width:210px;padding:10px;bottom:42%}.dog-bubble{bottom:32%}.hud{inset:10px}.end-content{max-width:95%;min-width:0}.end-content h2{font-size:25px}.start-rules{font-size:12px}}
.app-title,.app-sound{display:none}footer a{color:var(--orange)}.app-mode body{height:100dvh;overflow:hidden}.app-mode header,.app-mode main>.eyebrow,.app-mode .heading,.app-mode .below,.app-mode .bottom-grid,.app-mode footer{display:none}.app-mode main{margin:0;max-width:none;width:100%;height:100dvh;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)}.app-mode .game-shell{height:100%;width:100%;border:0;border-radius:0}.app-mode canvas{height:100%;width:100%;display:block}.app-mode .app-title{display:block;font-size:clamp(24px,5vw,48px);margin-bottom:16px}.app-mode .menu-content h2,.app-mode .menu-content .pill,.app-mode .controls-hint{display:none}.app-mode .app-sound{display:inline-block;background:transparent;border:1px solid var(--orange);border-radius:10px;padding:8px}.app-mode .menu-content{max-height:100%;overflow:auto}.parent-gate{max-width:min(420px,90vw);border:1px solid var(--orange);border-radius:16px;background:var(--bg);color:var(--cream);padding:24px}.parent-gate::backdrop{background:#000b}.parent-gate input{display:block;font:inherit;width:100%;box-sizing:border-box;margin:12px 0;padding:12px}.parent-gate button{padding:12px;margin:8px 8px 0 0;min-height:44px}
.app-help{display:none}.app-mode .app-help{display:block;font-size:12px;margin:10px}.app-help a{color:var(--orange)}

#hud-sound{min-width:44px;min-height:44px;border:1px solid var(--orange);border-radius:10px;background:var(--bg);font-size:12px}#robot-memory:empty{display:none}#robot-memory{color:var(--orange);max-width:350px;margin:8px auto}@media(max-height:500px) and (orientation:landscape){body.run-active header,body.run-active .heading,body.run-active main>.eyebrow{display:none}body.run-active main{margin-top:0;padding:0 12px}.menu-content{max-height:100%;overflow:auto}.hero-choice img{height:75px;width:75px}.menu-content h2{font-size:24px}.end-content{max-height:100%;overflow:auto}}
#hud-sound{pointer-events:auto}

/* Portrait framing and clear, device-only rewards. */
.privacy-promise{font-size:11px!important;line-height:1.4!important;color:var(--cream)!important;margin:10px auto!important;max-width:350px}
.robot-version{font-weight:800;color:var(--orange)!important}.run-stars{font-size:48px;line-height:1.05;color:var(--orange);letter-spacing:5px}.end-content .run-sweets,.end-content .sweet-jar{font-size:19px;font-weight:800;color:var(--cream)}.final-score{font-size:25px}.end-content #score-detail{font-size:10px}.end-content h2{font-size:29px}.end-content #upgrade-note{max-width:300px;margin:8px auto;color:var(--orange)}
.first-tutorial{width:min(520px,94vw);max-height:90dvh;overflow:auto;background:var(--bg);color:var(--cream);border:2px solid var(--orange);border-radius:20px;padding:20px;text-align:center}.first-tutorial::backdrop{background:#100820dd}.first-tutorial h2{font-size:28px;margin:4px 0 18px}.tutorial-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.tutorial-card{background:#38243c;border-radius:14px;padding:12px 6px;font-size:14px;line-height:1.4}.tutorial-picture{display:block;font-size:34px;min-height:50px}.first-tutorial .text-button{min-height:44px;font-size:14px}.first-tutorial .primary{min-width:0;width:100%}
.app-mode main{display:flex;align-items:center;justify-content:center}.app-mode .app-help{display:flex;justify-content:center;gap:12px;margin:6px}.app-help a{min-height:44px;padding:12px 18px;border:1px solid var(--theme-ffffff30);border-radius:10px;text-decoration:none;font-weight:700}.app-mode .menu-content [data-text=story]{display:none}.app-mode .app-title{margin:4px 0 8px}.app-mode #art-status:empty{display:none}.app-mode .menu-content{padding:12px}.app-mode #robot-memory{font-size:11px;line-height:1.35;max-width:310px}.app-mode .robot-version{margin:6px}.app-mode .hero-choice img{width:90px;height:90px}.app-mode .hero-choice{min-width:105px}.app-mode .end-content{max-height:100%;overflow:auto}.app-mode .privacy-promise{max-width:300px}
@media(max-width:650px) and (orientation:portrait){.app-mode .game-shell{height:min(100%,calc((100vw - env(safe-area-inset-left) - env(safe-area-inset-right))*1.25));border-radius:18px}.hud strong{font-size:38px}.hud #health{font-size:27px}.hud-right{gap:8px}.hud{inset:12px}.hud #pause{min-height:44px;min-width:40px}.end-content{padding:12px}.end-content h2{font-size:23px;margin:8px 0}.end-content p{margin:5px}.run-stars{font-size:44px}.end-content .primary{margin:8px auto;padding:12px}.end-content .privacy-promise{font-size:10px!important;margin:6px!important}.app-mode .start-rules{font-size:11px}.app-mode .privacy-promise{font-size:10px!important}.app-mode .hero-choice img{height:85px}.menu-content #robot-memory{font-size:10px}.first-tutorial{padding:16px}.tutorial-card{font-size:12px}.tutorial-picture{font-size:29px}}
@media(max-height:500px) and (orientation:landscape){.app-mode .menu-content{width:min(780px,96vw);max-width:none;display:grid;grid-template-columns:1fr 1fr;column-gap:20px;align-items:center}.app-mode .app-title{grid-column:1;font-size:25px}.app-mode .app-help{grid-column:2;grid-row:1}.app-mode #app-sound{grid-column:2;grid-row:2}.app-mode #hero-choices{grid-column:1;grid-row:2/5}.app-mode #robot-version{grid-column:2;grid-row:3}.app-mode #robot-memory{grid-column:2;grid-row:4}.app-mode #start{grid-column:2;margin:6px auto;min-width:220px}.app-mode .start-rules,.app-mode .privacy-promise{grid-column:1/3}.app-mode .end-content{padding:10px 20px;max-width:96%;display:grid;grid-template-columns:1fr 1fr;column-gap:24px}.app-mode .end-content .pill,.app-mode #end-title,.app-mode #end-joke,.app-mode #run-stars,.app-mode #run-progress{grid-column:1}.app-mode #run-sweets{grid-column:2;grid-row:1}.app-mode #sweet-jar{grid-column:2;grid-row:2}.app-mode #final-score{grid-column:2;grid-row:3}.app-mode #again{grid-column:2;grid-row:4;margin:6px}.app-mode #share{grid-column:2;grid-row:5}.app-mode #home{grid-column:2;grid-row:6}.app-mode .end-content p{margin:4px}.app-mode .end-content h2{font-size:24px}.app-mode .run-stars{font-size:36px}}

.game-subtitle{display:block;font-size:.48em;line-height:1.3;letter-spacing:0}.edition-badge{display:block;font-size:10px;line-height:1.5;letter-spacing:.4px;color:var(--orange);margin-top:5px}.app-mode .app-title .game-subtitle{font-size:13px}.app-mode .app-title .edition-badge{font-size:9px}.app-mode .app-help{margin:4px}.app-mode .menu-content{padding:8px}.app-mode .hero-choice img{height:75px}.app-mode .robot-version{margin:4px}
.game-page,.game-page *{user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}.game-page{touch-action:manipulation}.game-page dialog input{user-select:text;-webkit-user-select:text}.game-page #end #end-joke,.game-page #end #upgrade-note,.game-page #end #final-score,.game-page #end #score-detail,.game-page #end #best-score,.game-page #end #run-progress,.game-page #end #new-best{display:none}.gift-progress{margin:10px auto;max-width:280px}.gift-progress label{display:block;font-size:13px;color:var(--orange);margin-bottom:7px}.gift-progress progress{width:100%;height:14px;accent-color:var(--orange)}.score-summary{font-size:12px!important;color:var(--muted)}.app-mode .end-content .gift-progress,.app-mode .end-content .score-summary{grid-column:2}.app-mode .end-content .run-sweets{font-size:14px;line-height:1.5}.game-page #end .run-stars{margin:12px 0}

.reward-actions{display:flex;justify-content:center;gap:10px;flex-wrap:wrap}.reward-actions button{min-height:44px;font-size:12px;padding:6px 12px;min-width:0}.dress-up-dialog{width:min(440px,92vw);max-height:85dvh;overflow:auto;background:var(--bg);color:var(--cream);border:2px solid var(--orange);border-radius:18px;padding:18px}.dress-up-dialog::backdrop{background:#100820dd}.dress-up-dialog label{display:flex;align-items:center;gap:12px;min-height:52px;border-bottom:1px solid #ffffff20;font-size:14px}.dress-up-dialog input{width:22px;height:22px;accent-color:var(--orange)}.dress-up-dialog button{min-height:44px;min-width:0;margin:10px 8px 0 0}.gift-celebration{color:var(--orange)!important;font-size:14px!important;animation:gift-pop .6s ease-out}@keyframes gift-pop{from{transform:scale(.85)}to{transform:scale(1)}}@media(prefers-reduced-motion:reduce){.gift-celebration{animation:none}}.app-mode .reward-actions{grid-column:1/3}

/* Gifts use pictures and single large tap targets. */
.gift-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.dress-up-dialog .gift-tile{display:flex;flex-direction:column;align-items:center;min-height:190px;padding:8px;background:#40334e;color:#fff;border:3px solid transparent;border-radius:18px;white-space:normal}.gift-tile canvas{width:100%;max-width:180px;height:130px;object-fit:contain}.gift-tile span{font-size:15px}.gift-tile small{font-size:12px;margin-top:5px}.dress-up-dialog .gift-tile[aria-pressed=true]{border-color:#ffd57a;background:#62503b}.gift-tile.locked{opacity:.75}.gift-tile.locked canvas{filter:brightness(0);opacity:.45}.gift-done{margin-top:12px}.gift-worn{display:flex;align-items:center;justify-content:center;gap:8px}.gift-worn canvas{width:76px;height:72px}.gift-worn p{font-size:16px;max-width:230px}.new-gift{box-shadow:0 0 14px #ffd57a88}@media(orientation:landscape) and (max-height:500px){.gift-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.gift-tile canvas{height:100px}.dress-up-dialog .gift-tile{min-height:160px}}

@media(max-width:650px){.hud #pause{min-width:54px;min-height:54px;font-size:25px}.hud{gap:8px}.hud-right{gap:6px}}#pause-home{display:block;margin:12px auto;min-width:130px;min-height:48px}

#combo{display:block;font-size:11px;margin-top:3px;color:#fff1d0}#combo.combo-active{color:#ffd66d;font-weight:bold;text-shadow:0 0 10px #ffd66d66}

.game-page #end #end-joke{display:block;font-size:15px;line-height:1.35;margin:8px 0;color:var(--cream)}
@media(max-height:500px) and (orientation:landscape){.game-page #end #end-joke{font-size:13px;margin:4px 0}}

.tutorial-cards{grid-template-columns:1fr!important;gap:8px;text-align:left}.tutorial-card{display:flex!important;align-items:center;gap:12px;padding:10px 14px!important;font-size:16px!important;line-height:1.3}.tutorial-picture{min-height:0!important;font-size:28px!important;min-width:56px;text-align:center}
.tutorial-gold{filter:sepia(1) saturate(4) hue-rotate(5deg) brightness(1.15) drop-shadow(0 0 6px #ffd25c)}

.lost-heart{position:absolute;z-index:15;color:#ff668d;font-size:32px;pointer-events:none;animation:heart-fly .65s ease-out forwards}@keyframes heart-fly{to{transform:translate(35px,-65px) rotate(25deg) scale(.4);opacity:0}}

/* Final Results hierarchy: outcome, stars, sweets, gift, small detail. */
.game-page #end .end-content{display:flex;flex-direction:column;align-items:center}
.game-page #end #end-title{order:0;font-size:clamp(28px,5vw,38px);line-height:1.08;max-width:450px;margin:8px 0 10px}
.game-page #end #run-stars{order:1;font-size:48px;margin:4px 0 10px}
.game-page #end #run-sweets{order:2;font-size:18px;margin:6px 0}
.game-page #end .gift-progress{order:3;margin:7px 0;width:100%}
.game-page #end #gift-celebration{order:4;font-size:13px}
.game-page #end #end-joke{display:block;order:5;font-size:13px;max-width:340px;margin:6px 0}
.game-page #end #score-summary{order:6;font-size:11px!important;margin:5px 0}
.game-page #end #again{order:7;margin-top:8px}
.game-page #end #share{order:8}.game-page #end #home{order:9}
.game-page #end #share-status{order:10}.game-page #end .privacy-promise{order:11;font-size:10px}
.game-page #end #end-label{display:none}
@media(max-height:500px) and (orientation:landscape){.game-page #end .end-content{display:grid;grid-template-columns:1fr 1fr;gap:3px 22px}.game-page #end #end-title{grid-column:1;grid-row:1/3;font-size:28px}.game-page #end #run-stars{grid-column:1;grid-row:3;font-size:36px}.game-page #end #end-joke{grid-column:1;grid-row:4}.game-page #end #score-summary{grid-column:1;grid-row:5}.game-page #end #run-sweets{grid-column:2;grid-row:1}.game-page #end .gift-progress{grid-column:2;grid-row:2}.game-page #end #again{grid-column:2;grid-row:3}.game-page #end #share{grid-column:2;grid-row:4}.game-page #end #home{grid-column:2;grid-row:5}}

.first-run-tip{opacity:1;transition:opacity .2s ease-out}.first-run-tip.tip-fading{opacity:0}
.family-card{width:min(430px,calc(100% - 24px));max-height:calc(100% - 24px);overflow:auto;box-sizing:border-box;padding:18px;background:#21182e;border:1px solid #876044;border-radius:22px;text-align:center}.family-card h2{font-size:28px;margin:4px 0 10px}.family-card p{font-size:14px;margin:8px 0}.family-card select{font:inherit;color:#fff2dc;background:#382b46;border:1px solid #b18765;border-radius:8px;padding:9px;max-width:100%}.family-players{margin:10px 0}.family-player{display:grid;grid-template-columns:20px 70px 1fr;align-items:center;gap:8px;margin:8px 0}.family-card button{display:block;margin:10px auto;min-height:44px}.family-hero{height:125px;width:auto;max-width:100%;object-fit:contain}.family-robot{height:86px;width:auto;object-fit:contain}.family-winner{font-weight:bold;color:#ffd47e}.family-podium{display:flex;justify-content:center;align-items:flex-end;gap:6px;margin:12px 0}.family-place{display:flex;flex-direction:column;justify-content:center;gap:6px;background:#493146;border-radius:12px 12px 3px 3px;padding:12px 6px;width:75px;min-height:85px}.family-place.rank-1{min-height:125px;background:#7d502e}.family-place.rank-2{min-height:105px}.family-place strong{font-size:32px}.family-place small{font-size:11px}.family-overlay .text-button{padding:5px 12px}@media(max-height:500px){.family-card{padding:10px}.family-card h2{font-size:23px}.family-hero{height:75px}.family-robot{height:45px}.family-podium{margin:5px 0}.family-place.rank-1{min-height:75px}.family-place.rank-2{min-height:60px}.family-place{min-height:45px;padding:5px}.family-player{margin:5px 0}}
@media(max-height:740px){.family-card{padding:10px}.family-card h2{font-size:24px;margin:2px 0 6px}.family-card p{font-size:12px;margin:4px 0}.family-card select{padding:6px}.family-players{margin:6px 0}.family-player{margin:4px 0;gap:6px}.family-card button{margin:6px auto}}

@media(orientation:portrait){.app-mode .game-shell{height:100%;border-radius:0}}

/* Task 24: equal cards, aligned content, with a gold winner highlight. */
.family-podium{align-items:stretch}
.family-podium .family-place{box-sizing:border-box;flex:1 1 0;width:0;min-width:0;height:144px;min-height:0;border-radius:12px;padding:12px 4px;display:grid;grid-template-rows:40px 26px 24px;align-content:center;gap:6px}
.family-podium .family-place strong,.family-podium .family-place span,.family-podium .family-place small{display:flex;align-items:center;justify-content:center;line-height:1.1}
.family-podium .family-place span{font-size:14px;white-space:nowrap}
.family-podium .family-place small{font-size:10px}
.family-podium .rank-1{background:#835927;box-shadow:inset 0 0 0 2px #ffd47e}
@media(max-height:500px){.family-podium .family-place{height:96px;padding:5px 4px;grid-template-rows:30px 22px 18px;gap:3px}.family-podium .family-place strong{font-size:27px}}
@media(orientation:landscape) and (max-height:520px){.bubble{bottom:auto;top:17%;left:22%;max-width:320px;font-size:12px;line-height:1.3;padding:8px 12px}.dog-bubble{top:auto;bottom:36%;left:auto;right:12%;max-width:90px}}.bubble{font-weight:600;border:2px solid var(--theme-ffad57);box-shadow:0 4px 14px rgba(0,0,0,.35)}@media(max-width:700px){.bubble{font-size:15px;line-height:1.3;max-width:240px}}@media(orientation:landscape) and (max-height:520px){.bubble{font-size:14px;max-width:340px}}@media(orientation:portrait) and (max-width:700px){.app-mode .hud-right{flex-wrap:wrap;justify-content:flex-end;max-width:170px;row-gap:6px;align-content:flex-start;height:auto}.app-mode #health{order:3;width:100%;text-align:right;font-size:26px}}.game-page #end #family-race-end{order:8;margin:6px auto}@media(orientation:landscape) and (max-height:520px){.bubble:not(.dog-bubble){top:8px;bottom:auto;left:50%;transform:translateX(-50%);width:max-content;max-width:44%;font-size:13px;line-height:1.25;padding:6px 10px;text-align:center;border-radius:12px}}@media(orientation:landscape) and (max-height:520px){.power{top:62px}}#bubble::before{content:"";display:inline-block;width:26px;height:25px;margin:-4px 6px -6px 0;vertical-align:middle;background:url(assets/halloween/game/robot-wave.webp) -2px 0/39px auto no-repeat}.family-card .family-player{grid-template-columns:20px 104px minmax(0,150px);justify-content:center}.family-card .family-player>select{font-size:13px;padding:6px 8px;height:40px}.emoji-pick{position:relative;display:flex;align-items:center;justify-content:center;width:104px;height:64px;border:1px solid #b18765;border-radius:8px;background:#382b46 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23fff2dc'/%3E%3C/svg%3E") no-repeat right 7px bottom 8px;cursor:pointer}.emoji-face{font-size:34px;line-height:1;pointer-events:none}.family-card .emoji-pick select{position:absolute;inset:0;width:100%;height:100%;opacity:0;font-size:16px;cursor:pointer}
.family-card .animal-button{font-size:36px;width:90px;height:64px;margin:0;background:#382b46;border:1px solid #b18765;border-radius:12px}.animal-picker{width:min(340px,calc(100vw - 48px));max-height:calc(100dvh - 40px);overflow:auto;box-sizing:border-box;background:#21182e;color:#fff2dc;border:2px solid #b18765;border-radius:18px;padding:16px}.animal-picker::backdrop{background:#100b20bb}.animal-picker h3{margin:0 0 12px}.animal-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.family-card .animal-choice{margin:0;min-width:0;height:60px;font-size:34px;background:#382b46;border-radius:12px;border:1px solid #b18765}.animal-choice:disabled{opacity:.25;filter:grayscale(1)}.animal-choice[aria-pressed=true]{border:2px solid #ffd47e;background:#65502f}@media(max-height:500px){.animal-grid{grid-template-columns:repeat(6,1fr)}.family-card .animal-choice{height:48px;font-size:28px}.animal-picker{width:min(470px,calc(100vw - 48px));padding:10px}}
.app-version{font-size:9px;opacity:.55;margin:2px 0 0;letter-spacing:.5px}.star-hint{font-size:14px;color:var(--theme-ffe2a8);margin:0 0 8px;line-height:1.35}.game-page #end .star-hint{order:1}.dawn-bar{display:flex;align-items:center;gap:6px;margin:4px 0 2px;width:min(46vw,220px)}.dawn-moon,.dawn-sun{font-size:22px;line-height:1}.dawn-track{flex:1;height:12px;border-radius:6px;background:var(--theme-ffffff25);overflow:hidden;box-shadow:inset 0 0 0 1px var(--theme-ffffff30)}.dawn-fill{display:block;height:100%;width:0;border-radius:6px;background:linear-gradient(90deg,#7b6bd6,#ffb85f 70%,#ffe383)}.hud #score{display:none}.star-key{font-size:11px;color:var(--theme-cbbcd9);margin:-4px 0 8px;opacity:.85}.game-page #end .star-key{order:1}.word-count{display:block;font-size:13px;font-weight:700;color:#ffe383;margin-top:2px;text-shadow:0 1px 4px #000}.word-count .word-plus{margin-left:6px;color:#fff2bb;animation:wordplus 1.2s ease-out}@keyframes wordplus{0%{opacity:0;transform:translateY(6px)}20%{opacity:1;transform:none}100%{opacity:0;transform:translateY(-10px)}}html:not(.app-mode) .app-help{display:flex;justify-content:center;gap:12px;margin:6px 0 10px;font-size:12px}html:not(.app-mode) .app-help a{min-height:0;padding:8px 14px}