/* Main menu only: a portrait play surface, with no reading required. */
body:has(.home-screen){background:#e8f3f7}
.home-screen{width:100%;max-width:480px;height:min(100svh,840px);min-height:650px;margin:0 auto;padding:calc(8px + env(safe-area-inset-top)) 16px calc(8px + env(safe-area-inset-bottom));display:grid;grid-template-rows:56px 88px minmax(408px,1fr) 56px;gap:8px;background:radial-gradient(ellipse at 8% 5%,#dff3fc 0,transparent 43%),radial-gradient(ellipse at 100% 90%,#fff0d3 0,transparent 40%),#fffdf7;isolation:isolate}
.home-topbar{display:grid;grid-template-columns:56px minmax(0,1fr) 56px;align-items:center;gap:8px}
.home-brand{color:#547b77;font-size:15px;font-weight:600;line-height:1.25;letter-spacing:-.3px}
.home-brand strong{color:#234f4a;font-size:19px}
.home-profile,.home-parent{width:56px;height:56px;display:grid;place-items:center;border:2px solid #fff;border-radius:21px;box-shadow:0 3px 0 #c9dadb;background:#fff}
.home-profile .avatar{width:44px;height:44px;font-size:30px;background:#ffecd2}
.home-profile .avatar.star{background:#eee4ff}
.home-parent{background:#edf4f1;color:#607d74;box-shadow:none;border-color:transparent}
.home-parent svg{width:23px;height:23px}
.home-start-row{display:grid;grid-template-columns:88px minmax(0,1fr);align-items:center;gap:12px}
.home-mimi{position:relative;width:88px;height:88px;padding:2px 8px 1px;border-radius:30px;background:#d6eedb;border:2px solid #fff;transform-origin:50% 85%;animation:mimiHello .9s ease-out 1}
.home-mimi.greeting{animation:mimiWave .75s ease-in-out 1}
.home-mimi svg{width:100%;height:100%}
.mimi-spark{position:absolute;right:0;top:1px;color:#e6ab38;font-size:23px;pointer-events:none}
.home-start{height:76px;display:flex;align-items:center;justify-content:center;gap:16px;padding:8px 16px;border-radius:27px;background:#268269;color:white;box-shadow:0 6px 0 #186a56;border:2px solid #ffffff80}
.home-start strong{font-size:26px;letter-spacing:-.6px}
.home-play{display:grid;place-items:center;width:52px;height:52px;border-radius:50%;background:#fff4c4;color:#246751;flex-shrink:0}
.home-play svg{width:30px;height:30px;fill:currentColor;stroke-width:1}
.home-activities{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(4,minmax(0,1fr));gap:10px;padding:4px 0 5px;min-height:408px}
.home-tile{position:relative;min-width:0;min-height:92px;border-radius:26px;background:var(--tile-color);border:3px solid #fff;box-shadow:0 4px 0 color-mix(in srgb,var(--tile-color),#47645b 20%);padding:4px 8px 7px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;overflow:hidden;transition:transform .13s,box-shadow .13s}
.home-tile:active{transform:translateY(3px) scale(.97);box-shadow:0 1px 0 #557a6b30}
.home-picture{position:relative;display:block;width:clamp(66px,11svh,105px);height:clamp(66px,11svh,105px);flex-shrink:0}
.home-picture svg{width:100%;height:100%}
.home-tile strong{position:relative;font-size:17px;line-height:1.15;color:#284f48;font-weight:700;z-index:1}
.tile-cards .home-picture{background:#f7f2ff;border:2px solid #fff;border-radius:16px;transform:rotate(-5deg);padding:3px;margin:2px 0 4px;width:clamp(61px,10svh,95px);height:clamp(61px,10svh,95px);box-shadow:5px 3px 0 #b99cdd}
.tile-cards .home-picture svg{transform:rotate(5deg)}
.home-footer{display:flex;align-items:center;justify-content:space-between;gap:12px}
.home-footer button{min-width:56px;min-height:56px;display:flex;align-items:center;justify-content:center;gap:10px;background:#fff7dd;border:2px solid #fff;border-radius:20px;padding:8px 14px;color:#6c592b;font-weight:bold;font-size:14px}
.home-footer button svg{width:25px;height:25px;flex-shrink:0}
.home-footer button:first-child svg{fill:#f7c45f;stroke:#ae7f27}
.home-footer button:last-child{background:#e3eff8;color:#3b728f;width:56px;padding:13px}
/* Navigation targets stay finger-sized; activity content retains its existing layout. */
.play-header .round{width:56px;height:56px;min-width:56px;min-height:56px;padding:16px;flex-shrink:0}
.topbar .profile,.topbar .parent-icon{min-width:56px;min-height:56px}
.topbar .parent-icon{width:56px;height:56px;padding:17px}
.bottom-nav .nav-item{min-width:56px;min-height:56px}
.play-world-tabs button{min-width:56px;min-height:56px}
@keyframes mimiHello{0%{transform:translateY(5px) rotate(-6deg)}45%{transform:translateY(-3px) rotate(5deg)}75%{transform:rotate(-3deg)}100%{transform:none}}
@keyframes mimiWave{0%,100%{transform:none}25%{transform:rotate(-8deg)}65%{transform:rotate(8deg)}}
@media(min-width:700px){.home-screen{margin:20px auto;border-radius:32px;box-shadow:0 14px 70px #3c718321;height:min(calc(100svh - 40px),840px)}}
@media(max-height:600px){.home-screen{grid-template-rows:56px 80px minmax(408px,1fr) 56px;min-height:650px;gap:6px}.home-start-row{grid-template-columns:80px minmax(0,1fr)}.home-mimi{width:80px;height:80px}.home-start{height:70px}.home-start strong{font-size:25px}.home-picture{width:66px;height:66px}.tile-cards .home-picture{width:61px;height:61px}.home-tile strong{font-size:16px}.home-brand{font-size:14px}.home-brand strong{font-size:18px}}
@media(prefers-reduced-motion:reduce){.home-screen *{animation:none!important;transition:none!important}}

/* One familiar back arrow at the top of each screen. */
.section-back{width:56px;height:56px;min-width:56px;min-height:56px;display:grid;place-items:center;background:#fff;border:2px solid #c6dedc;border-radius:20px;box-shadow:0 3px 0 #c9dadb;padding:15px;color:#285c53}
.topbar{gap:8px}.topbar .brand{min-width:0}.topbar .brand strong{font-size:16px}.topbar .profile-name{display:none}.topbar .profile{width:56px;padding:7px;justify-content:center}.topbar .section-back{flex-shrink:0}.modal-top .round{width:56px;height:56px;min-width:56px;min-height:56px;padding:16px}.modal-top{position:sticky;top:-22px;z-index:2;background:#fffdf8;padding:6px 0}.modal-top h2{min-width:0}.home-footer button:first-child{padding:8px 12px}
@media(max-width:360px){.topbar .brand small{display:none}.topbar .brand strong{font-size:13px;line-height:1.25}.topbar{gap:6px}.topbar .parent-icon{padding:18px}.home-brand strong{font-size:18px}}

/* Same button and arrow as Next, mirrored for Back. */
.home-topbar{grid-template-columns:64px minmax(0,1fr) 56px}
.back-btn,.home-back.back-btn,.section-back.back-btn{width:64px;height:56px;min-width:64px;min-height:56px;display:grid;place-items:center;flex-shrink:0;padding:16px;border:0;border-radius:21px;background:var(--green);color:#fffdf5;box-shadow:0 5px 0 #3e685332}
.back-btn svg,.home-back.back-btn svg{width:24px;height:24px;fill:none;stroke:currentColor;transform:rotate(180deg)}
.modal-top .back-btn{order:-1}.modal-top h2{flex:1}

.home-footer .home-parent{width:56px;min-width:56px;min-height:56px;padding:14px;background:#edf4f1;color:#607d74;box-shadow:none}

.current-player{background:transparent;border:0;box-shadow:none}

.topbar,.play-header{position:sticky;top:0;z-index:35;background:#fcfaf5}

.current-player{position:relative}.home-star-total{position:absolute;bottom:-7px;right:-2px;display:flex;align-items:center;justify-content:center;gap:3px;min-height:24px;min-width:40px;max-width:70px;padding:2px 5px;border-radius:12px;background:#fff0b8;border:2px solid #fff;font-size:13px;line-height:1;color:#80601f}.home-star-total svg{width:15px;height:15px;flex-shrink:0;fill:#f6c74a;stroke:#ae7f27}.home-star-total b{overflow:hidden;text-overflow:ellipsis}
