.home-theme-open{display:block;margin:8px 0 8px auto!important;min-height:36px;padding:6px 12px!important;border:1px solid #d8deed!important;border-radius:18px!important;background:white!important;color:#203a8c!important;font-size:12px!important;font-weight:700}
.home-theme-dialog{width:min(440px,calc(100% - 28px));max-height:85dvh;overflow:auto;padding:20px;border:0;border-radius:20px;color:#203a8c;background:white;box-sizing:border-box}.home-theme-dialog::backdrop{background:#10204788}.home-theme-dialog header{display:flex;align-items:center;justify-content:space-between;gap:12px}.home-theme-dialog h2{font-size:20px;margin:0}.home-theme-dialog header button{width:44px;height:44px;border:0;border-radius:50%;font-size:26px;background:#eff1fa;color:#203a8c}.home-theme-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:18px 0}.home-theme-grid button{position:relative;padding:0 0 12px;overflow:hidden;border:2px solid #e0e4ee;border-radius:12px;background:white;color:#203a8c;font-size:13px}.home-theme-grid button[aria-pressed=true]{border-color:#ff6b6b;box-shadow:0 0 0 2px #ff6b6b22}.theme-check{display:none}.home-theme-grid button[aria-pressed=true] .theme-check{display:grid;place-items:center;position:absolute;right:6px;top:6px;width:24px;height:24px;background:#ff6b6b;color:white;border-radius:50%}.theme-swatch{display:block;aspect-ratio:3/1;background-image:url('../assets/home-themes.png');background-size:100% 500%;margin-bottom:10px}.theme-standard{background-image:url('../assets/volleyball-court.png');background-size:cover}.theme-school{background-position:0 0}.theme-cyber{background-position:0 25%}.theme-volleyball{background-position:0 50%}.theme-forest{background-position:0 75%}.theme-cafe{background-position:0 100%}
.phone[data-home-theme=school]{--scene-y:0%;--theme-dark:#382239;--theme-edge:#cba66d}.phone[data-home-theme=cyber]{--scene-y:25%;--theme-dark:#071e3a;--theme-edge:#32c8ef}.phone[data-home-theme=volleyball]{--scene-y:50%;--theme-dark:#172f69;--theme-edge:#eab443}.phone[data-home-theme=forest]{--scene-y:75%;--theme-dark:#193f2d;--theme-edge:#abbd6a}.phone[data-home-theme=cafe]{--scene-y:100%;--theme-dark:#483025;--theme-edge:#d5ac87}
.phone.screen-home[data-home-theme]:not([data-home-theme=standard]) .reference-home-hero{background-image:linear-gradient(90deg,#11244899,#11244822),url('../assets/home-themes.png')!important;background-size:100% 100%,100% 500%!important;background-position:center,center var(--scene-y)!important}
.phone.screen-home[data-home-theme]:not([data-home-theme=standard]) .player-card{background-image:url('../assets/home-themes.png')!important;background-size:100% 500%!important;background-position:center var(--scene-y)!important}.phone.screen-home[data-home-theme]:not([data-home-theme=standard]) .player-card:before{background:linear-gradient(90deg,#fffffff5 10%,#ffffffc9 48%,#ffffff20)!important}
.phone.screen-home[data-home-theme]:not([data-home-theme=standard]) .home .next-goal{background:linear-gradient(120deg,#ffffff06,transparent),var(--theme-dark)!important;border:1px solid var(--theme-edge)!important;box-shadow:inset 0 0 0 3px var(--theme-dark),inset 0 0 0 4px var(--theme-edge),0 4px 0 var(--theme-dark)!important}.phone.screen-home[data-home-theme]:not([data-home-theme=standard]) .home .next-goal:after{border-color:var(--theme-edge);opacity:.15}.phone.screen-home[data-home-theme]:not([data-home-theme=standard]) .next-goal .next-goal-title,.phone.screen-home[data-home-theme]:not([data-home-theme=standard]) .next-goal .goal-task,.phone.screen-home[data-home-theme]:not([data-home-theme=standard]) .next-goal .goal-days-note,.phone.screen-home[data-home-theme]:not([data-home-theme=standard]) .next-goal .next-goal-label span{color:#ffffffce!important}
.phone.screen-home[data-home-theme=cyber] .home .next-goal{border-radius:8px;box-shadow:inset 0 0 12px #25c6ff33,0 0 8px #25c6ff33!important}.phone.screen-home[data-home-theme=volleyball] .home .next-goal:after{width:110px;height:170px;border-width:3px;top:-20px;right:-65px;opacity:.45}.phone.screen-home[data-home-theme=forest] .home .next-goal:after{border-radius:90% 0 90% 0;transform:rotate(15deg);width:70px;height:100px;right:-20px;top:-40px}.phone.screen-home[data-home-theme=cafe] .home .next-goal:after{transform:rotate(0);border-radius:50%;border-width:1px;opacity:.25}
.home-theme-dialog button:focus-visible,.home-theme-open:focus-visible{outline:3px solid #203a8c;outline-offset:3px}

.phone.screen-home .reference-home-hero{position:relative}.phone.screen-home .reference-home-hero .home-theme-open{position:absolute;top:12px;right:14px;margin:0!important;background:#ffffffee!important;z-index:2}

/* The whole home becomes a themed room; reading surfaces remain calm. */
.phone.screen-home[data-home-theme]:not([data-home-theme=standard]){background:var(--theme-dark)!important}
.phone.screen-home[data-home-theme]:not([data-home-theme=standard]) main.home{background:linear-gradient(90deg,var(--theme-dark),transparent 12%,transparent 88%,var(--theme-dark)),linear-gradient(#ffffff24,#ffffff12)!important}
.phone.screen-home[data-home-theme]:not([data-home-theme=standard]) .home-start{background:transparent!important}
.phone.screen-home[data-home-theme]:not([data-home-theme=standard]) .player-card{border:2px solid var(--theme-edge)!important;box-shadow:0 5px 0 #00000020!important}
.phone.screen-home[data-home-theme]:not([data-home-theme=standard]) .home-latest,
.phone.screen-home[data-home-theme]:not([data-home-theme=standard]) .weekly-view{background:#fffffff5!important;border:1px solid var(--theme-edge)!important;border-top:4px solid var(--theme-edge)!important;border-radius:16px;padding:14px;margin-top:20px;box-shadow:0 4px 0 #00000018}
.phone.screen-home[data-home-theme]:not([data-home-theme=standard]) .home-latest .section-heading h2,
.phone.screen-home[data-home-theme]:not([data-home-theme=standard]) .weekly-view h2{color:var(--theme-dark)!important}
.phone.screen-home[data-home-theme]:not([data-home-theme=standard]) .home-latest .section-heading h2:before,
.phone.screen-home[data-home-theme]:not([data-home-theme=standard]) .weekly-view .viz-heading h2:before{background:var(--theme-edge)!important}
.phone.screen-home[data-home-theme]:not([data-home-theme=standard]) .player-trophy-shelf{background:linear-gradient(0deg,var(--theme-dark) 0 7px,var(--theme-edge) 7px 12px,transparent 12px)!important;border-bottom:0!important;padding-bottom:14px!important;filter:drop-shadow(0 4px 2px #00000022)}
.phone.screen-home[data-home-theme]:not([data-home-theme=standard]) .player-trophy-shelf .trophy-empty{background:#ffffffc9!important;color:var(--theme-dark)!important;border-color:var(--theme-edge)!important}
.phone.screen-home[data-home-theme=cyber] .player-trophy-shelf{filter:drop-shadow(0 2px 5px #32c8ef88)}
.phone.phone[data-home-theme=school]{--theme-edge:#d9b289}
.phone.phone[data-home-theme=forest]{--theme-edge:#b8c887}
.phone.phone[data-home-theme=cafe]{--theme-edge:#d9b99b}
.phone.screen-home[data-home-theme]:not([data-home-theme=standard]) .school-brand-signature{background:#ffffffee;border-radius:12px;margin-top:16px}
.phone.screen-home[data-home-theme]:not([data-home-theme=standard]) .loop-home-entry{border-color:var(--theme-edge)!important;background:var(--theme-dark)!important}

/* A continuous illustrated environment, rather than a solid-color backdrop. */
.phone.screen-home[data-home-theme]:not([data-home-theme=standard]) main.home{background-image:linear-gradient(#10243b12,#10243b08),url('../assets/home-worlds.png')!important;background-size:100% 100%,500% 100%!important;background-position:center,var(--scene-y) top!important;background-repeat:no-repeat!important;min-height:100vh}
.phone.screen-home[data-home-theme]:not([data-home-theme=standard]) .player-card{background:linear-gradient(90deg,#ffffffed 0%,#ffffffbd 42%,#ffffff12 100%)!important;border-color:#ffffffa6!important;box-shadow:0 5px 18px #10243b20!important}
.phone.screen-home[data-home-theme]:not([data-home-theme=standard]) .player-card:before{background:none!important}
.phone.screen-home[data-home-theme]:not([data-home-theme=standard]) .home-latest,
.phone.screen-home[data-home-theme]:not([data-home-theme=standard]) .weekly-view{background:#fffffff0!important;box-shadow:0 5px 18px #10243b24}

/* Shared theme environment. Standard has no overrides. */
.phone[data-home-theme=school]{--theme-veil:#492941b8;--theme-ink:#53354d}
.phone[data-home-theme=cyber]{--theme-veil:#042d46b8;--theme-ink:#07506b}
.phone[data-home-theme=volleyball]{--theme-veil:#16424db8;--theme-ink:#164a59}
.phone[data-home-theme=forest]{--theme-veil:#143c25b8;--theme-ink:#235538}
.phone[data-home-theme=cafe]{--theme-veil:#503225b8;--theme-ink:#63412d}
.phone.screen-home[data-home-theme]:not([data-home-theme=standard]) .reference-home-hero{background-image:linear-gradient(90deg,var(--theme-veil),#0000000d),url('../assets/home-themes.png')!important}
.phone.screen-home[data-home-theme]:not([data-home-theme=standard]) .reference-home-hero:before{background:transparent!important}
.phone[data-home-theme]:not([data-home-theme=standard]):not(.screen-home){background-image:url('../assets/home-worlds.png')!important;background-size:500% 100%!important;background-position:var(--scene-y) top!important;background-color:var(--theme-dark)!important}
.phone[data-home-theme]:not([data-home-theme=standard]):not(.screen-home)>main{background:linear-gradient(90deg,#ffffffd4,#fffffff7 6%,#fffffff7 94%,#ffffffd4)!important;min-height:75vh}
.phone[data-home-theme]:not([data-home-theme=standard]):not(.screen-home)>header{background:var(--theme-dark)!important;color:#fff!important;border-bottom:2px solid var(--theme-edge)}
.phone[data-home-theme]:not([data-home-theme=standard]):not(.screen-home)>header :is(h1,h2,button,span){color:#fff!important}
.phone[data-home-theme]:not([data-home-theme=standard]) :is(.ac-topic-banner,.book-play-hero,.ac-player-hero){background:var(--theme-dark)!important;color:white!important;border-color:var(--theme-edge)!important}
.phone[data-home-theme]:not([data-home-theme=standard]) :is(.ac-topic-banner,.book-play-hero,.ac-player-hero) :is(h1,h2,h3,p,strong){color:white!important}
.phone[data-home-theme]:not([data-home-theme=standard]) :is(.screen-book,.book) :is(.ac-player-hero,.book-play-hero){background-image:linear-gradient(90deg,var(--theme-veil),#00000020),url('../assets/home-themes.png')!important;background-size:100% 100%,100% 500%!important;background-position:center,center var(--scene-y)!important}
.phone[data-home-theme]:not([data-home-theme=standard]) :is(textarea,input,select){background-color:#fff!important}
.phone[data-home-theme]:not([data-home-theme=standard]) .book-sheet{background:#fff!important;border-top:3px solid var(--theme-edge)}
.phone[data-home-theme]:not([data-home-theme=standard]).screen-complete>main{background:#ffffff18!important}
.phone[data-home-theme]:not([data-home-theme=standard]).screen-complete :is(.heading,.completion-card,[data-record-celebration]){background:#fffffff0;border-radius:18px;padding:16px}
.phone[data-home-theme]:not([data-home-theme=standard]) .identity-card{border-color:var(--theme-edge)}
.phone[data-home-theme]:not([data-home-theme=standard]) .ac-heading{display:block!important;background:#ffffffed;border-radius:12px;padding:12px!important}.phone[data-home-theme]:not([data-home-theme=standard]) .ac-heading h1{white-space:nowrap;margin:0 0 4px}.phone[data-home-theme]:not([data-home-theme=standard]) .ac-heading p{margin:0;font-size:13px}
.phone[data-home-theme]:not([data-home-theme=standard]) :is(.ac-player-hero,.book-play-hero):before,.phone[data-home-theme]:not([data-home-theme=standard]) :is(.ac-player-hero,.book-play-hero):after{display:none!important}
/* Forest trophy cabinet and the player's own practice note. */
.phone.screen-home[data-home-theme=forest] .home .player-trophy-shelf{border:7px solid #987047!important;border-bottom:12px solid #ae8050!important;border-radius:5px;background:repeating-linear-gradient(2deg,#785436 0 4px,#805b3c 5px 8px)!important;box-shadow:inset 0 5px 10px #30231466,0 4px 5px #30231444;padding:8px 4px 0!important}
.phone.screen-home[data-home-theme=forest] .home .player-trophy-shelf>span{background:transparent!important;border:0!important;color:#fff0d2!important}.phone.screen-home[data-home-theme=forest] .home .player-trophy-shelf .trophy-empty{background:transparent!important;color:#f4dfb8!important;border:0!important}
.phone.screen-home[data-home-theme=forest] .home .forest-focus-note{display:flex!important;flex-direction:column;align-items:stretch;gap:8px;padding:18px!important;border:9px solid #a77b4e!important;border-radius:7px;background:#fffdf5!important;color:#203a8c!important;box-shadow:inset 0 0 0 1px #cdbd9c,0 5px 10px #30231433;position:relative;text-align:left}
.forest-note-heading{font-size:18px;font-weight:800;border-bottom:2px solid #ff8b83;padding-bottom:8px}.forest-note-play{font-size:12px;color:#657153}.forest-note-text{font-size:17px;line-height:1.8;white-space:pre-wrap;overflow-wrap:anywhere;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden}.forest-note-link{align-self:flex-end;font-size:12px;font-weight:700;border:1px solid #9aa8bd;border-radius:18px;padding:6px 12px;background:white}
.phone[data-home-theme=forest] .record-celebration .celebration-avatar{position:relative;isolation:isolate}
.phone[data-home-theme=forest] .record-celebration .celebration-avatar:after{content:'';position:absolute;inset:0;pointer-events:none;background:radial-gradient(circle at 15% 30%,#ffe491 0 3px,transparent 5px),radial-gradient(circle at 85% 20%,#fff4b7 0 4px,transparent 6px),radial-gradient(circle at 75% 65%,#ffe491 0 3px,transparent 5px),radial-gradient(circle at 25% 75%,#fff4b7 0 3px,transparent 5px);opacity:0;animation:forest-save-light 1.2s ease-out 1}
@keyframes forest-save-light{0%{opacity:0;transform:translateY(14px) scale(.85)}35%{opacity:1}100%{opacity:0;transform:translateY(-22px) scale(1.12)}}
@media(prefers-reduced-motion:reduce){.phone[data-home-theme=forest] .record-celebration .celebration-avatar:after{animation:none}}

.phone.screen-home[data-home-theme] .home .themed-focus-note{display:flex!important;flex-direction:column;align-items:stretch;gap:8px;padding:18px!important;border:2px solid var(--theme-edge)!important;border-radius:12px;background:#fffdf8!important;color:#203a8c!important;text-align:left;box-shadow:0 4px 12px #10243b22}
.phone.screen-home[data-home-theme=forest] .home .loop-home.themed-focus-note{border:9px solid #a77b4e!important;border-radius:7px;background:#fffdf5!important}
.phone.screen-home[data-home-theme=school] .home .loop-home.themed-focus-note{background:#fffdf8!important;border-left:7px solid #bd777f!important}
.phone.screen-home[data-home-theme=cyber] .home .loop-home.themed-focus-note{background:#082b42!important;color:#effbff!important;border-color:#40cbe5!important;box-shadow:inset 0 0 15px #32c8ef18,0 0 8px #32c8ef30}.phone.screen-home[data-home-theme=cyber] .themed-focus-note .forest-note-play{color:#c2eaf1}
.phone.screen-home[data-home-theme=volleyball] .home .loop-home.themed-focus-note{border-top:6px solid #eab443!important;background:#fff!important}
.phone.screen-home[data-home-theme=cafe] .home .loop-home.themed-focus-note{background:#fff7e9!important;border:5px solid #b79572!important;box-shadow:0 4px 0 #78583e33}
.themed-focus-note .forest-note-link{color:#203a8c!important}.themed-focus-note .forest-note-heading{line-height:1.5}.themed-focus-note .forest-note-text{font-weight:500}

.phone.screen-home[data-home-theme=standard] .home .loop-home.themed-focus-note{background:#fff!important;border:1px solid #ffb5ad!important;color:#203a8c!important;box-shadow:0 3px 12px #203a8c0b;gap:10px;padding:18px!important}
.phone.screen-home[data-home-theme=standard] .themed-focus-note .forest-note-heading{align-self:flex-start;background:#ff6b6b;color:#fff;border:0;border-radius:6px;padding:6px 11px;font-size:15px;line-height:1.5}
.phone.screen-home[data-home-theme=standard] .themed-focus-note .forest-note-play{color:#697993}
.phone.screen-home[data-home-theme=standard] .themed-focus-note .forest-note-text{color:#203a8c;font-size:18px;font-weight:700;line-height:1.7}
.phone.screen-home[data-home-theme=standard] .themed-focus-note .forest-note-link{color:#203a8c!important;border:0;border-radius:0;padding:5px 0 0;background:transparent;font-size:13px}

/* Theme brand colors; action and outcome colors remain shared. */
.phone[data-home-theme=school]{--theme-main:#783e50;--theme-soft:#f7eef1;--theme-line:#dcc4cd;--theme-dark:#4e2837;--theme-veil:#4e2837b8;--theme-ink:#783e50}
.phone[data-home-theme=cyber]{--theme-main:#086281;--theme-soft:#eaf7fb;--theme-line:#aed6e2;--theme-ink:#086281}
.phone[data-home-theme=volleyball]{--theme-main:#2456ae;--theme-soft:#edf3fd;--theme-line:#c1d1ed;--theme-dark:#173c80;--theme-veil:#173c80b8;--theme-ink:#2456ae}
.phone[data-home-theme=forest]{--theme-main:#28603e;--theme-soft:#eef6ee;--theme-line:#c2d8c5;--theme-ink:#28603e}
.phone[data-home-theme=cafe]{--theme-main:#70492f;--theme-soft:#f8f1e9;--theme-line:#dfcbb8;--theme-ink:#70492f}
.phone[data-home-theme]:not([data-home-theme=standard]){--navy:var(--theme-main);--color-navy:var(--theme-main);--keys-navy:var(--theme-main);--brand-indigo:var(--theme-main);--brand-support:var(--theme-soft);--color-border:var(--theme-line);--keys-line:var(--theme-line);--line:var(--theme-line)}
.phone[data-home-theme]:not([data-home-theme=standard]) :is(main>h1,.heading h1,.section-heading h2,.profile-identity h1,.keys-thinking h1,.keys-thinking h2,.player-card-copy h2,.ac-book>h1,.record-celebration h1,.record-celebration h2,.thinking-arrow,.player-collection-link,.home-latest .section-heading>button){color:var(--theme-main)!important}
.phone[data-home-theme]:not([data-home-theme=standard]) :is(.secondary:not(:disabled),.ac-aspects button,.thinking-list>button,.thinking-back,.profile-menu>button,.record-row,.edit-answer-list>button){color:var(--theme-main);border-color:var(--theme-line)}
.phone[data-home-theme]:not([data-home-theme=standard]) :is(.ac-tabs,.profile-photo,.profile-journey>p,.keys-self-cover,.home .home-record-icon){background:var(--theme-soft);color:var(--theme-main)}
.phone[data-home-theme]:not([data-home-theme=standard]) :is(.ac-tabs button.active,.tabs button.active,.manual-period button.active){background:var(--theme-main)!important;color:white!important;border-color:var(--theme-main)!important}
.phone[data-home-theme]:not([data-home-theme=standard]) .manual-tabs button.active{background:white!important;color:var(--theme-main)!important;border-bottom-color:var(--theme-main)!important}
.phone[data-home-theme]:not([data-home-theme=standard]) nav.ds-bottom-nav{background:var(--theme-soft)!important;border-top-color:var(--theme-line)!important}
.phone[data-home-theme]:not([data-home-theme=standard]) nav.ds-bottom-nav button.current,
.phone[data-home-theme]:not([data-home-theme=standard]) nav.ds-bottom-nav button.current :is(svg,small){color:var(--theme-main)!important}
.phone[data-home-theme]:not([data-home-theme=standard]) :is(button,input,textarea,summary):focus-visible{outline-color:var(--theme-main)}
.phone[data-home-theme]:not([data-home-theme=standard]):not([data-home-theme=cyber]) .home .themed-focus-note{color:var(--theme-main)!important}
.phone[data-home-theme]:not([data-home-theme=standard]) .themed-focus-note .forest-note-link{color:var(--theme-main)!important;border-color:var(--theme-line)}
.phone[data-home-theme]:not([data-home-theme=standard]) .home-theme-open{color:var(--theme-main)!important;border-color:var(--theme-line)!important}
.phone[data-home-theme]:not([data-home-theme=standard]) .ac-heading h1{color:var(--theme-main)!important}
.phone[data-home-theme]:not([data-home-theme=standard]) .vj-entry{background:var(--theme-soft)!important;color:var(--theme-main)!important;border-color:var(--theme-line)!important}
.phone[data-home-theme]:not([data-home-theme=standard]) .ac-plays button:not([aria-pressed=true]){background:var(--theme-soft)!important;color:var(--theme-main)!important}

/* Keep avatar-panel copy readable on its dark theme surface. */
.phone[data-home-theme]:not([data-home-theme=standard]) .followup-hero .heading :is(h1,h2,p,strong){color:#fff!important}
