.child-layout{max-width:880px;margin:22px auto 180px;padding:0 20px;display:grid;gap:16px}
.child-header .topright{gap:8px}.child-profile{display:flex;align-items:center;gap:14px;padding:12px 4px}.child-avatar{width:62px;height:76px;object-fit:contain;image-rendering:pixelated;flex-shrink:0}.child-profile strong{display:block;font-size:23px}.child-profile small{display:block;color:#627665;margin-top:5px}
.child-story h2{font-size:25px}.child-story p{max-width:58ch;margin:10px 0 16px;font-size:15px;color:#536c5e}.child-city{width:100%;max-height:310px;object-fit:cover;image-rendering:pixelated;border-radius:10px}.child-destinations{display:flex;gap:9px;flex-wrap:wrap;margin-top:14px}
.child-stats{display:flex;flex-wrap:wrap;justify-content:space-between;gap:10px;background:#e9f0df;border-radius:10px;padding:13px 17px;font-size:14px}.child-stats b{margin-left:6px;color:#245e49}
.child-family-preview{display:grid;grid-template-columns:1fr 1fr;gap:15px;margin:15px 0}.child-family-preview>div{display:grid;grid-template-columns:54px 1fr;gap:3px 12px;align-items:center}.child-family-preview .child-avatar{grid-row:span 2;width:50px;height:64px}.child-family-preview strong{font-size:14px}.child-family-preview small{font-size:12px;color:#697b69}
.child-next-unlock{border-top:1px solid #dce3d2;padding-top:12px;color:#59734f;font-size:13px}.child-memories{padding:15px;background:#fffdf1;border:1px solid #dce4ce;border-radius:10px}.child-memories summary{cursor:pointer;font-size:14px}.child-memories p{font-size:13px;margin:12px 0 0;color:#54674f}.child-people{display:grid;grid-template-columns:1fr 1fr;gap:12px}.child-person{display:flex;align-items:center;gap:12px;background:#fffdf4;border:1px solid #ceddc0;border-radius:12px;padding:15px;text-align:left;color:#2c4d3e}.child-person strong,.child-person small{display:block}.child-person small{font-size:12px;color:#687c66;margin-top:5px}
.child-school .progress{margin:15px 0 18px;height:8px}.child-school .progress span{background:#478e78}.child-school-friend{margin-top:24px;border-top:1px solid #dce3d2;padding-top:19px}.child-school-friend p,.child-small{font-size:13px;color:#61735a;margin:10px 0 16px}
.child-phone-tabs{display:flex;gap:7px;overflow-x:auto;padding-bottom:6px}.child-phone-tabs button{white-space:nowrap;min-height:42px;border:1px solid #cdddca;border-radius:8px;background:#fffdf2;color:#435c4b;padding:8px 11px;font-size:12px}.child-phone-tabs button[aria-current=page]{background:#dcebd2;color:#255a45}.child-phone-tabs button:disabled,.child-phone-home button:disabled,.child-menu button:disabled,.child-dock button:disabled{opacity:.4;filter:grayscale(1);cursor:not-allowed}
.child-phone-home{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:18px}.child-phone-home button,.child-menu button{display:grid;gap:6px;background:#f0f5e7;padding:17px;text-align:left;border:1px solid #d1dfc4;border-radius:9px;color:#355341;font-size:14px}.child-phone-home small,.child-menu small{font-size:11px}.child-contacts{display:flex;gap:9px;overflow-x:auto;margin:16px 0}.child-contacts button{background:#edf4e4;border:1px solid #ceddc3;border-radius:9px;padding:10px;font-size:12px;color:#355941;min-width:90px;display:grid;justify-items:center;gap:5px}.child-contacts .child-avatar{width:34px;height:42px}.child-message{padding:15px;background:#f2f5e8;border:1px solid #dbe4ce;border-radius:10px;margin-top:12px}.child-message p{font-size:14px;line-height:1.5;margin:8px 0}.child-message small{font-size:12px;color:#687959}.child-phone textarea,#child-chat-form textarea{font:inherit;min-height:74px;resize:vertical;margin:12px 0}.child-menu{display:grid;grid-template-columns:1fr 1fr;gap:9px}
.child-turnbar{position:fixed;bottom:76px;left:0;right:0;z-index:19;display:flex;align-items:center;justify-content:space-between;padding:10px max(14px,calc((100vw - 850px)/2));background:#fffdf1ee;border-top:1px solid #cadbbf;backdrop-filter:blur(8px)}.child-turnbar span{font-weight:700;color:#31563f;font-size:15px}.child-turnbar small{display:block;font-size:11px;font-weight:400;color:#71846a}.child-turnbar .btn{min-height:42px}
.child-dock{position:fixed;bottom:0;left:0;right:0;z-index:20;display:grid;grid-template-columns:repeat(5,1fr);background:#fffdf4;border-top:1px solid #cadbbf;padding:6px max(8px,calc((100vw - 850px)/2)) max(8px,env(safe-area-inset-bottom));min-height:76px}.child-dock button{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:2px;background:none;color:#45634c;font-size:12px;padding:2px}.child-dock .pixel-art{width:25px;height:25px}.child-dock button[aria-current=page]{background:#e0ecd5;border-radius:7px}.child-dock small{font-size:9px}
.compact-guide-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.compact-guide-actions .btn{min-height:34px}.compact-guide-actions .tutorial-secondary{min-height:30px;padding:4px;font-size:11px}
.guide-details summary,.guide-options summary{font-size:11px;color:#5b7154;padding:6px 0;cursor:pointer}.guide-details p{font-size:12px!important}.guide-options .year-controls{margin-top:4px}.tutorial-card .tutorial-progress{margin:8px 0}.child-guide h3{font-size:16px}.child-guide p{font-size:13px;line-height:1.45}
html[data-interface=phone] .child-layout{padding:0 12px;gap:12px;margin-top:8px;margin-bottom:380px}
html[data-interface=phone] .child-profile{padding:8px 2px;gap:11px}html[data-interface=phone] .child-profile strong{font-size:20px}html[data-interface=phone] .child-profile .child-avatar{width:45px;height:58px}html[data-interface=phone] .child-story{padding:16px}html[data-interface=phone] .child-story h2{font-size:20px}html[data-interface=phone] .child-story p{font-size:13px;line-height:1.5}html[data-interface=phone] .child-city{max-height:210px}
html[data-interface=phone] .child-family-preview{grid-template-columns:1fr;gap:10px}html[data-interface=phone] .child-people{grid-template-columns:1fr}html[data-interface=phone] .child-person{padding:12px}html[data-interface=phone] .child-person .child-avatar{width:44px;height:55px}html[data-interface=phone] .child-stats{font-size:12px;padding:11px;gap:7px}
/* The instruction sits above the fixed controls and uses at most a quarter screen. */
html[data-interface=phone] #tutorial-main:not(:empty){position:static}
html[data-interface=phone] #tutorial-main .tutorial-card{position:fixed;left:12px;right:12px;bottom:calc(145px + env(safe-area-inset-bottom));z-index:18;max-width:596px;max-height:25vh;max-height:25dvh;overflow:auto;margin:0 auto;padding:11px 13px;border-radius:12px;box-shadow:0 2px 12px #264f3422}
html[data-interface=phone] #tutorial-main .tutorial-card.child-guide{bottom:calc(139px + env(safe-area-inset-bottom))}
html[data-interface=phone] .tutorial-card h3{font-size:15px!important;line-height:1.3;margin:4px 0 6px}html[data-interface=phone] .tutorial-card p{font-size:12.5px!important;line-height:1.45;margin:0 0 7px}html[data-interface=phone] .tutorial-card .tutorial-top{font-size:10px;margin-bottom:5px}html[data-interface=phone] .tutorial-card .tutorial-tag{font-size:9px;padding:3px 6px}html[data-interface=phone] .tutorial-card .tutorial-progress{display:none}
html[data-interface=phone] .tutorial-card .tutorial-quick{margin:6px 0;gap:5px}html[data-interface=phone] .tutorial-card .btn{min-height:32px!important;font-size:12px!important;padding:7px 10px!important}html[data-interface=phone] .tutorial-card .tutorial-secondary{min-height:28px;font-size:11px;padding:3px}html[data-interface=phone] .tutorial-card .year-controls button{min-height:28px;font-size:11px}
html[data-interface=phone] #tutorial-modal .tutorial-card,html[data-interface=phone] #tutorial-menu .tutorial-card{max-height:25vh;max-height:25dvh;overflow:auto;padding:10px 12px;margin-bottom:12px}html[data-interface=phone] .mobile-layout{padding-bottom:330px}
html[data-interface=phone] .child-header .topright .btn{font-size:11px;min-height:34px;padding:5px 7px}html[data-interface=phone] .child-header{min-height:65px;padding:9px 12px}
html[data-interface=phone] .newborn-city{max-height:120px}html[data-interface=phone] .child-turnbar,html[data-interface=phone] .child-dock{max-width:620px;margin:auto;padding-left:14px;padding-right:14px}html[data-interface=phone] .child-turnbar{bottom:calc(76px + env(safe-area-inset-bottom))}html[data-interface=phone] .child-dock{min-height:calc(76px + env(safe-area-inset-bottom));padding-bottom:calc(8px + env(safe-area-inset-bottom))}
html[data-interface=phone].mobile-keyboard .child-turnbar,html[data-interface=phone].mobile-keyboard .child-dock{display:none}html[data-interface=phone].mobile-keyboard #tutorial-main .tutorial-card{bottom:12px}html[data-interface=phone].mobile-keyboard .tutorial-card{max-height:25dvh}
html[data-interface=phone] .welcome-copy h1{font-size:29px;line-height:1.2;max-width:13ch}html[data-interface=phone] .welcome-copy>p{font-size:13px}html[data-interface=phone] .welcome-copy .tagline{display:none}
html[data-interface=phone] .maincol>.pagehead p{font-size:12px}html[data-interface=phone] .maincol .note{font-size:12px;line-height:1.5}
@media(max-width:500px){.child-turnbar{padding:9px 14px}.child-family-preview{grid-template-columns:1fr}.child-stats{font-size:12px}.child-menu button{font-size:12px;padding:13px}}
@media(prefers-reduced-motion:no-preference){.child-profile>.child-avatar{animation:child-breathe 3s ease-in-out infinite}@keyframes child-breathe{50%{transform:translateY(-2px)}}}
