/* Child-facing shell. Existing activities and the administrator retain their own styles. */
body[data-page="family"]{--ink:#284d46;--muted:#60776e;--green:#25765f;--bg:#fbf9f2;background:radial-gradient(ellipse at 95% 0,#e9f3df 0,transparent 42%),var(--bg)}
body[data-page="family"] button{min-height:48px}
body[data-page="family"] :is(button,a,input,select,summary):focus-visible{outline:3px solid #226bac;outline-offset:5px}
body[data-page="family"] .site-header{height:88px;border-bottom:1px solid #e5e9dc}
body[data-page="family"] .brand-icon{background:#e5ecd3;border-radius:50%;width:50px;height:50px}
body[data-page="family"] .brand small{letter-spacing:1px}
body[data-page="family"] #identity{display:none}
body[data-page="family"] .page{padding-top:26px}
.island-topline{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:22px}
.island-topline .welcome{display:block;margin:0}
.island-topline .eyebrow{margin-bottom:8px;letter-spacing:3px;font-size:12px}
.island-topline h1{font-size:clamp(25px,3vw,34px);letter-spacing:0}
body[data-page="family"] .workspace-tabs{border:0;gap:10px;margin-bottom:26px;padding:0}
body[data-page="family"] .workspace-tabs button{border-radius:18px;padding:13px 25px;font-size:16px;color:#527067}
body[data-page="family"] .workspace-tabs button span{font-size:22px;margin-right:8px}
body[data-page="family"] .workspace-tabs button.active{background:#dfecdb;color:#265b43;box-shadow:inset 0 -3px #c6dcc0}
.adventure-card{display:grid;grid-template-columns:1.1fr 1fr;min-height:330px;border:1px solid #d9e6c8;border-radius:32px;overflow:hidden;background:#eaf2db;position:relative}
.adventure-copy{padding:38px 42px;z-index:1}
.adventure-label{display:inline-block;font-size:13px;font-weight:700;background:#fff9e7;padding:8px 14px;border-radius:30px;color:#596b38}
.adventure-copy h2{font-size:clamp(27px,3.3vw,40px);line-height:1.35;margin:17px 0 10px;max-width:520px}
.adventure-copy p{font-size:15px;color:#526b50}
.adventure-start{display:flex;align-items:center;justify-content:space-between;gap:40px;font-size:20px;margin:24px 0 13px;padding:16px 25px;border-radius:18px;background:#27745c;box-shadow:0 5px #19513e;min-width:205px}
.adventure-start:hover{transform:translateY(-2px)}
.adventure-start:active{transform:translateY(3px);box-shadow:0 2px #19513e}
.adventure-note{font-size:12px;color:#5e7256}
.adventure-scene{position:relative;min-height:320px;isolation:isolate;overflow:hidden;background:radial-gradient(ellipse at 50% 72%,#fff8d5 0 29%,transparent 30%)}
.adventure-scene:after{content:"";position:absolute;z-index:-1;bottom:-80px;left:-12%;width:130%;height:180px;background:#c6dda4;border-radius:50%}
.adventure-scene img{position:absolute;height:240px;width:210px;object-fit:contain;bottom:27px;left:50%;transform:translateX(-50%);filter:drop-shadow(0 14px 8px #68824322)}
.scene-sun{position:absolute;top:24px;right:44px;color:#d6a334;font-size:57px}
.scene-cloud{position:absolute;top:35px;left:26px;font-size:58px;color:white}
.scene-hello{position:absolute;top:65px;left:38%;background:white;padding:11px 18px;border-radius:20px 20px 20px 4px;font-size:14px;font-weight:700;transform:rotate(-7deg)}
.scene-sprout{position:absolute;bottom:23px;left:32px;font-size:55px}
.scene-flower{position:absolute;bottom:27px;right:45px;font-size:60px;color:#fff7d6}
.island-section-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:29px 0 17px}
.island-section-title h2{font-size:21px}.island-section-title>span{font-size:13px;color:var(--muted)}
.island-places{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}
.island-place{text-align:left;padding:0 22px 22px;border:1px solid #e4e4d7;border-radius:24px;color:var(--ink);background:#f1f0df;overflow:hidden;box-shadow:0 4px 0 #e4e4d7;transition:transform .18s}
.island-place:hover{transform:translateY(-4px);filter:none}
.place-diary{background:#f8ebe2;border-color:#efdfd3;box-shadow:0 4px #efdfd3}.place-room{background:#eaf0f5;border-color:#dce5ed;box-shadow:0 4px #dce5ed}
.place-picture{height:123px;display:flex;align-items:center;justify-content:center;gap:23px;font-size:29px}
.place-picture>span{font-size:70px;filter:drop-shadow(0 7px 0 #ffffff90);transform:rotate(-7deg)}
.island-place strong{display:flex;justify-content:space-between;font-size:21px;margin-bottom:7px}.island-place strong>span{font-size:22px;color:#718879}.island-place small{font-size:13px;color:#596f64;font-weight:400}
.island-footnote{text-align:center;font-size:13px;color:#788472;margin:26px 0 0}
.parent-profiles{margin-bottom:24px}.parent-profiles .child-controls{margin:20px 0}.parent-links{display:flex;gap:12px;flex-wrap:wrap}
body[data-page="family"][data-panel="home"] .zhizhi-companion{display:none}
@media(max-width:700px){body[data-page="family"] .site-header{padding:0 18px;height:76px}.brand{font-size:18px}.brand small{font-size:10px}#parent-entry{padding:10px 13px;font-size:13px}body[data-page="family"] .page{padding:22px 16px}.island-topline{margin-bottom:20px}.island-topline h1{font-size:25px}.island-topline .child-avatar-button{width:54px;height:54px;flex-shrink:0}body[data-page="family"] .workspace-tabs{display:grid;grid-template-columns:repeat(4,1fr);gap:4px}body[data-page="family"] .workspace-tabs button{padding:9px 3px;font-size:12px;border-radius:14px}body[data-page="family"] .workspace-tabs button span{display:block;margin:0 0 3px;font-size:24px}.adventure-card{grid-template-columns:1fr;min-height:0}.adventure-copy{padding:25px 25px 20px}.adventure-copy h2{font-size:29px}.adventure-scene{min-height:200px;grid-row:1}.adventure-scene img{height:170px;bottom:0;width:160px}.scene-hello{top:25px;left:47%;font-size:12px}.scene-sun{font-size:42px;right:24px;top:10px}.scene-cloud{font-size:42px;top:10px}.scene-sprout{font-size:38px}.scene-flower{font-size:42px}.adventure-start{width:100%;margin-top:20px}.island-section-title>span{display:none}.island-places{grid-template-columns:1fr;gap:14px}.island-place{position:relative;min-height:106px;padding:25px 20px 23px 118px}.place-picture{position:absolute;left:12px;top:0;width:94px;height:106px;gap:0;font-size:0}.place-picture>span{font-size:57px}.island-place strong{font-size:20px}.island-footnote{font-size:12px}body[data-page="family"] .footer{margin-top:10px;padding-bottom:35px}}
@media(prefers-reduced-motion:reduce){.island-place,.adventure-start{transition:none!important;transform:none!important}}

/* Keep the floating companion out of account entry, including the initial session check. */
body[data-page="family"]:not([data-session="ready"]) .zhizhi-companion{display:none!important}
body[data-page="family"]:not([data-session="ready"])>.footer{padding-bottom:28px}
