/* HOME personalization only. Native/account controls and the reading surfaces keep their own styles. */
#screen-profile-wizard:has(.home-book-flow){background:#fff8eb;padding-bottom:0;min-height:100svh}
#screen-profile-wizard:has(.home-book-flow) .wizard-content{background:#fff8eb;overflow:visible}
.home-book-flow{--setup-ink:#294c44;--setup-muted:#67766b;--setup-paper:#fff8eb;max-width:680px;min-height:100svh;padding-bottom:calc(24px + env(safe-area-inset-bottom,0px));background:var(--setup-paper);color:var(--setup-ink)}
.home-book-flow .home-setup-progress{background:var(--setup-paper);max-width:580px;padding-inline:24px;padding-bottom:16px}
.home-book-flow .home-progress-line{height:4px;border-radius:8px;background:#e7dfcf}
.home-book-flow .home-progress-active .home-progress-line{background:#a7613f}
.home-book-flow .home-progress-active{color:#885035!important}
.home-book-flow .home-progress-complete .home-progress-line{background:#92b4a1}
.home-book-flow #home-flow-profile,.home-book-flow #home-flow-parent,.home-book-flow #home-flow-finish{background:transparent}
.home-book-flow .home-profile-steps{display:flex;flex-direction:column;min-height:calc(100svh - 150px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px));padding:8px 24px 16px;max-width:560px}
.home-book-flow .hp-back,.home-book-flow .home-parent-setup>.wiz-back-btn{align-self:flex-start;margin:0 0 12px;padding:8px 0;min-height:44px;text-align:start;color:#546b60}
.home-book-flow .hp-step{margin-block:auto;padding:20px 0}
.home-book-flow h1,.home-book-flow h2{letter-spacing:-.025em;line-height:1.3;color:#294c44}
/* Route focus remains on the heading for screen readers. Controls retain visible keyboard rings. */
.home-book-flow h1[tabindex="-1"]:focus,.home-book-flow h2[tabindex="-1"]:focus{outline:none;text-decoration:underline;text-decoration-color:#dfb66e;text-decoration-thickness:3px;text-underline-offset:9px}
.home-book-flow h1{font-size:clamp(1.9rem,8vw,2.6rem);margin:8px 0 16px}
.home-book-flow .hp-eyebrow{font-size:.8rem;font-weight:800;color:#955e3d;letter-spacing:.04em;margin:0 0 12px}
.home-book-flow .hp-intro-copy{font-size:1rem;line-height:1.8;color:#617269;margin:0 auto 28px}
.home-book-flow .wiz-name-input{border:1.5px solid #d8c9ac;border-radius:18px;background:#fffdf7;box-shadow:0 3px 12px #6c543306;min-height:56px;font-size:1.05rem;color:#294c44}
.home-book-flow .wiz-next-btn{background:#345e50;border-radius:18px;min-height:54px;box-shadow:0 4px 0 #254a3e;font-size:1rem;line-height:1.5;font-weight:800}
.home-book-flow .home-profile-steps .wiz-next-btn{width:min(100%,340px)}
.home-book-flow .hp-booki{margin:24px auto 0;gap:12px;max-width:360px}
.home-book-flow .hp-booki img{width:96px;height:108px;object-fit:contain}
.home-book-flow .hp-booki span{font-size:.9rem;line-height:1.6;text-align:start}
.home-book-flow .hp-avatar-title,.home-book-flow .hp-interest-title{font-size:clamp(1.5rem,6vw,2rem);margin:0 auto 24px;max-width:350px}
.home-book-flow .hp-identity-orbit{width:176px;height:176px;background:#f6ebd4;border:6px solid #fffdf7;box-shadow:0 0 0 1px #dfcfaf,0 10px 28px #6f563111;margin:0 auto 28px}
.hp-neutral-avatar{width:80%;height:80%;opacity:1}
.hp-neutral-avatar:before,.hp-neutral-avatar:after{display:none}
.hp-neutral-avatar svg{width:100%;height:100%}
.home-book-flow .hp-identity-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:0 auto 24px;max-width:380px}
.home-book-flow .hp-identity-choice{border:1px solid #e3d7be;border-radius:20px;background:#fffdf6;padding:16px 4px;min-height:100px;font-size:.85rem;gap:10px}
.home-book-flow .hp-avatar-actions{flex-direction:column;gap:4px}
.home-book-flow .hp-interests{gap:10px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));max-width:390px;margin:24px auto}
.home-book-flow .hp-interests button{width:auto;min-width:0;min-height:130px;background:#fffdf6;border:1px solid #e3d7be;padding:14px 4px;border-radius:22px}
.home-book-flow .hp-interests svg{width:62px;height:62px}
.home-book-flow .hp-interests button[aria-pressed="true"]{background:#e9f0e4;border:2px solid #55745b}
.home-book-flow .hp-finish{flex-direction:column;gap:4px}
.home-book-flow #home-setup-error:empty{display:none}
.home-book-flow .home-parent-setup{max-width:560px;padding:8px 24px 20px}
.home-book-flow .home-parent-region{border:1.5px solid #dbb777;border-radius:28px;background:#fffdf7;padding:20px 20px 24px;box-shadow:0 12px 36px #79552e08}
.home-book-flow .home-parent-heading-row{margin:0 0 12px;padding-bottom:12px;border-bottom:1px solid #ecd9b6}
.home-book-flow .home-parent-title{font-size:1.35rem;padding:0;color:#995633}
.home-book-flow .home-parent-info-trigger{background:#f8edce;color:#995633;border-radius:14px}
.home-book-flow .home-parent-heading{margin-bottom:12px}
.home-book-flow .home-parent-heading .wiz-step-sub{font-size:.93rem;line-height:1.7;color:#716b59;text-align:start}
.home-book-flow .home-progressive-step{padding:16px 0 0;border:0}
.home-book-flow .home-progressive-step>label{font-size:1.25rem;margin-bottom:12px}
.home-book-flow .home-target-line{margin:20px auto;gap:10px}
.home-book-flow .home-target-line .wiz-name-input{font-size:2.3rem;font-weight:800;width:145px;padding:12px;color:#995633;background:#fff7e7;border-color:#dfbd83}
.home-book-flow .home-parent-setup details{background:#f8f3e7;border-radius:14px;padding:0 12px;text-align:start}
.home-book-flow .home-small-booki{width:88px;margin:22px auto 0}
.home-book-flow .home-parent-setup .wiz-chips-wrap{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:18px auto}
.home-book-flow .home-parent-setup .wiz-chip{padding:10px 6px;font-size:.85rem;min-width:0;min-height:84px;border:1px solid #e7dac2;border-radius:16px;background:#fffaf0;color:#5d604e}
.home-book-flow .home-parent-setup .wiz-chip[aria-pressed="true"]{border:2px solid #b07843;background:#faedcf;color:#754a2b}
.home-book-flow #home-setup-reward{font-size:1rem;text-align:start;padding:14px 12px}
.home-book-flow #home-setup-reward::placeholder{color:#776d5a;opacity:1;font-size:.9rem}
.home-book-flow .home-review-illustration{background:#faedcf;border:1px solid #ead5a9}
.home-book-flow .home-review-title,.home-book-flow .home-review-target strong{color:#995633}
.home-book-flow .home-review-track>span{background:#ad7644}
.home-book-flow .home-review-track{background:#e4d3ac}
.home-book-flow .home-review-reward strong{color:#805337}
.home-book-flow button:focus-visible,.home-book-flow input:focus-visible,.home-book-flow summary:focus-visible{outline:3px solid #49785e;outline-offset:4px}
@media(max-width:360px){.home-book-flow .home-profile-steps,.home-book-flow .home-parent-setup{padding-inline:16px}.home-book-flow .home-parent-region{padding:16px 12px 20px}.home-book-flow .home-setup-progress{padding-inline:16px}.home-book-flow .hp-identity-choice{font-size:.8rem}}
@media(max-height:600px){.home-book-flow .home-profile-steps{min-height:0}.home-book-flow .home-setup-progress{position:static}.home-book-flow .hp-booki img{width:64px;height:72px}.home-book-flow .hp-step{padding-block:12px}}
/* The custom celebration stays editable and its full invitation wraps at larger text sizes. */
.home-book-flow textarea#home-setup-reward{resize:vertical;min-height:82px;line-height:1.6;font-family:inherit;scroll-margin-block:24px 30vh;overflow-wrap:anywhere}
.home-book-flow textarea:focus-visible{outline:3px solid #49785e;outline-offset:4px}

/* Keep every personalization step below the native status area. */
#screen-profile-wizard{padding-top:calc(16px + env(safe-area-inset-top,0px));box-sizing:border-box;scroll-padding-top:calc(16px + env(safe-area-inset-top,0px))}
.home-book-flow .home-setup-progress{top:env(safe-area-inset-top,0px)}

/* Personalization refresh: one invitation, three creative choices, an open parent page. */
.home-book-flow .home-profile-steps{max-width:560px;padding-inline:24px}
.home-book-flow .hp-step[data-profile-step="name"]{width:100%;padding-block:36px}
.home-book-flow [data-profile-step="name"] h1{max-width:370px;margin:0 auto 32px;font-size:clamp(2rem,7vw,2.55rem);line-height:1.22;letter-spacing:-.035em}
.home-book-flow .hp-name-label{font-size:1.05rem;font-weight:700;margin-bottom:12px;color:#355e50}
.home-book-flow .hp-gender{padding:0;margin:4px auto 26px;border:0;max-width:340px;min-width:0}
.home-book-flow .hp-gender legend{font-size:.95rem;color:#617269;text-align:center;padding:0 0 10px}
.home-book-flow .hp-gender-options{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.home-book-flow .hp-gender label{position:relative;cursor:pointer}
.home-book-flow .hp-gender input{position:absolute;width:1px;height:1px;opacity:0}
.home-book-flow .hp-gender label>span{display:flex;align-items:center;justify-content:center;gap:8px;border:1px solid #c3d4c9;background:#fffcf5;border-radius:16px;min-height:52px;color:#365d50;font-size:1.05rem;font-weight:700}
.home-book-flow .hp-gender-check{visibility:hidden}
.home-book-flow .hp-gender input:checked+span{background:#dcecdf;border:2px solid #416d58}
.home-book-flow .hp-gender input:checked+span .hp-gender-check{visibility:visible}
.home-book-flow .hp-gender input:focus-visible+span{outline:3px solid #416d58;outline-offset:4px}
.home-book-flow .hp-avatar-title{max-width:340px;font-size:clamp(1.6rem,6vw,2.1rem);margin-bottom:28px}
.home-book-flow .hp-identity-orbit{width:150px;height:150px;background:#f0e7d5;box-shadow:0 0 0 1px #e3d4b7,0 12px 28px #6555320c;border:8px solid #fffdf6;margin-bottom:30px}
.home-book-flow .hp-neutral-avatar{display:grid;place-items:center;width:100%;height:100%}
.home-book-flow .hp-avatar-spark{font-size:65px;filter:saturate(.8)}
.home-book-flow .hp-identity-options{width:100%;max-width:400px;gap:12px;margin:0 auto 20px}
.home-book-flow .hp-identity-choice{border:0;border-radius:24px 24px 16px 16px;min-height:132px;padding:19px 5px 16px;gap:14px;font-size:.92rem;box-shadow:0 4px 0 #4c735414;transition:transform .15s ease}
.home-book-flow .hp-identity-choice[data-choice="avatar"]{background:#f8e7b7;color:#755928;transform:rotate(2deg)}
.home-book-flow .hp-identity-choice[data-choice="camera"]{background:#deece3;color:#355e50;transform:translateY(-5px)}
.home-book-flow .hp-identity-choice[data-choice="draw"]{background:#f4dcd2;color:#865337;transform:rotate(-2deg)}
.home-book-flow .hp-identity-choice:hover:not(:disabled),.home-book-flow .hp-identity-choice[aria-expanded="true"]{transform:translateY(-6px);box-shadow:0 5px 0 #385d5130}
.home-book-flow .hp-identity-choice:disabled{opacity:.55;cursor:not-allowed;box-shadow:none}
.home-book-flow .hp-choice-icon{width:50px;height:50px}
.home-book-flow .hp-choice-emoji{font-size:46px;line-height:1}
.home-book-flow .hp-storage-note{font-size:.78rem;line-height:1.65;max-width:330px;margin:4px auto 14px;color:#6c7163}
.home-book-flow .hp-avatar-actions{margin-top:20px}
.home-book-flow .hp-editor{width:100%}
.home-book-flow .hp-draw-actions{flex-wrap:wrap}
.home-book-flow .hp-draw-actions .wiz-next-btn{width:auto;min-width:135px}
.home-book-flow .home-parent-setup{max-width:560px;padding:8px 28px 24px}
.home-book-flow .home-parent-region{border:0;border-radius:0;box-shadow:none;background:transparent;padding:8px 0 0}
.home-book-flow .home-parent-heading{margin:0 0 30px}
.home-book-flow .home-parent-heading-row{border:0;padding:0;margin:0 0 10px;justify-content:center;gap:12px}
.home-book-flow .home-parent-title{font-size:.95rem;color:#8a684d;font-weight:800;letter-spacing:.01em}
.home-book-flow .home-parent-info-trigger{width:36px;min-height:36px;padding:8px;background:#f3e8d1;border-radius:50%}
.home-book-flow .home-parent-open-lock{width:22px;height:22px}
.home-book-flow .home-parent-heading .wiz-step-sub{font-size:.95rem;text-align:center;line-height:1.65;color:#617269;max-width:290px;margin:auto}
.home-book-flow .home-progressive-step{padding:0}
.home-book-flow .home-progressive-step>label{font-size:clamp(1.7rem,6.4vw,2.05rem);line-height:1.3;max-width:380px;margin:0 auto 12px;color:#294c44;letter-spacing:-.025em}
.home-book-flow .home-step-hint{max-width:300px;font-size:.95rem;line-height:1.65;margin:0 auto 20px}
.home-book-flow .home-target-line{flex-direction:column;gap:5px;margin:22px auto 26px}
.home-book-flow .home-target-line .wiz-name-input{font-size:4rem;line-height:1.1;width:210px;max-width:100%;border:0;border-bottom:2px solid #c7af80;border-radius:0;box-shadow:none;background:transparent;color:#a06038;padding:8px 8px 10px;font-weight:800}
.home-book-flow .home-target-line>strong{font-size:.95rem;font-weight:500;color:#617269}
.home-book-flow .home-parent-setup details{background:transparent;border-radius:0;border-top:1px solid #e5dbc5;border-bottom:1px solid #e5dbc5;padding:2px 0;text-align:start;margin:22px auto}
.home-book-flow .home-parent-setup details summary{font-size:.88rem;line-height:1.55;padding:12px 2px}
.home-book-flow .home-parent-setup .wiz-next-btn{margin-top:24px;width:min(100%,340px)}
.home-book-flow .home-parent-setup .wiz-chips-wrap{gap:10px;margin:24px auto}
.home-book-flow .home-parent-setup .wiz-chip{border:0;box-shadow:0 0 0 1px #e7dcc4;background:#fffaf0;min-height:92px;border-radius:18px}
.home-book-flow .home-parent-setup .wiz-chip[aria-pressed="true"]{border:0;background:#dcecdf;box-shadow:0 0 0 2px #416d58;color:#355e50}
.home-book-flow .home-review-illustration{border:0;background:#f1e6cc;border-radius:24px;box-shadow:none}
.home-book-flow .home-small-booki{margin-top:32px;width:84px}
.home-book-flow h1[tabindex="-1"]:focus,.home-book-flow h2[tabindex="-1"]:focus{text-decoration:none}
@media(max-width:360px){.home-book-flow .home-profile-steps,.home-book-flow .home-parent-setup{padding-inline:18px}.home-book-flow .hp-identity-options{gap:8px}.home-book-flow .hp-identity-choice{font-size:.82rem;min-height:120px}.home-book-flow .home-parent-region{padding-inline:0}.home-book-flow .hp-drawing-colors{gap:4px}}
@media(max-height:650px){.home-book-flow .hp-step[data-profile-step="name"]{padding-block:20px}.home-book-flow .home-parent-heading{margin-bottom:20px}.home-book-flow .home-small-booki{margin-top:20px}}

/* The current cloud build still supports emoji only; keep its sole choice centered. */
.home-book-flow .hp-identity-options:has(> :only-child){grid-template-columns:minmax(0,1fr);max-width:160px}
/* Explicit child address choice, keyboard-accessible and independent of avatar. */
.home-book-flow .hp-gender button{min-width:110px;min-height:48px;margin:6px;border:2px solid #c3d4c9;border-radius:16px;background:#fffcf5;color:#365d50;font:inherit;font-weight:700;cursor:pointer}
.home-book-flow .hp-gender button[aria-pressed="true"]{background:#dcecdf;border-color:#416d58;box-shadow:inset 0 0 0 1px #416d58}
.home-book-flow .hp-gender button:focus-visible{outline:3px solid #2765bf;outline-offset:3px}

/* Illustrated address-style choices. Native buttons retain Enter/Space and Tab support. */
.home-book-flow .hp-gender{width:100%;max-width:340px}
.home-book-flow .hp-gender-options{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.home-book-flow .hp-gender .hp-gender-card{position:relative;display:flex;flex-direction:column;align-items:center;gap:8px;min-width:0;width:100%;min-height:168px;margin:0;padding:12px 10px 14px;border:2px solid #c3d4c9;border-radius:24px;background:#fffcf5;color:#365d50;font:inherit;font-weight:700;cursor:pointer;touch-action:manipulation}
.home-book-flow .hp-gender-art{display:block;width:min(100%,128px);line-height:0}
.home-book-flow .hp-gender-art svg{display:block;width:100%;height:auto}
.home-book-flow .hp-gender-label{font-size:1.1rem;line-height:1.4}
.home-book-flow .hp-gender .hp-gender-check{position:absolute;top:8px;inset-inline-end:8px;display:grid;place-items:center;width:24px;height:24px;border-radius:50%;background:#416d58;color:#fff;font-size:16px;visibility:hidden}
.home-book-flow .hp-gender .hp-gender-card[aria-pressed="true"]{background:#e8f2e7;border-color:#416d58;box-shadow:inset 0 0 0 1px #416d58}
.home-book-flow .hp-gender-card[aria-pressed="true"] .hp-gender-check{visibility:visible}
.home-book-flow .hp-gender .hp-gender-card:focus-visible{outline:3px solid #2765bf;outline-offset:4px}
@media(hover:hover){.home-book-flow .hp-gender-card:hover{border-color:#416d58;background:#f0f5e9}}
@media(max-width:360px){.home-book-flow .hp-gender-options{gap:10px}.home-book-flow .hp-gender .hp-gender-card{padding:10px 6px;min-height:150px}}
@media(forced-colors:active){.home-book-flow .hp-gender-card[aria-pressed="true"]{outline:2px solid Highlight}.home-book-flow .hp-gender .hp-gender-check{border:1px solid ButtonText}}

/* Private photo and drawing editors, including narrow screens and touch input. */
.home-profile-steps .hp-image-consent{display:flex;align-items:flex-start;gap:10px;max-width:380px;margin:14px auto;padding:14px;border:1px solid #d6c6a7;border-radius:16px;background:#fffdf6;text-align:start;font-size:.86rem;line-height:1.6;color:#355e50}
.home-profile-steps .hp-image-consent input{flex:0 0 22px;width:22px;height:22px;margin:3px 0;accent-color:#345e50}
.home-profile-steps .hp-camera-help{max-width:360px;font-size:.88rem;line-height:1.6;color:#617269}
.home-profile-steps .hp-camera-video,.home-profile-steps .hp-captured-photo{display:block;width:min(100%,300px);aspect-ratio:1;object-fit:cover;height:auto;background:#e9ede7;border:2px solid #b4cbbb;border-radius:20px;margin:16px auto}
.home-profile-steps .hp-camera-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:12px;margin:14px auto}
.home-profile-steps .hp-camera-actions .wiz-next-btn{min-width:120px;width:auto}
.home-profile-steps .hp-camera-actions button:disabled{opacity:.5;cursor:default}
.home-profile-steps .hp-camera-actions .hp-text-btn{flex-basis:100%}
.home-profile-steps #hp-drawing{width:min(100%,256px);height:auto;aspect-ratio:1;touch-action:none;user-select:none;-webkit-user-select:none}
.home-profile-steps .hp-image-consent:focus-within{outline:2px solid #416d58;outline-offset:3px}
