@layer theme,legacy,utilities;
@layer legacy{
/* Shared reading and interaction rules. Theme values remain in the semantic palette.
   Design target: 44 CSS px controls, 320px+ viewports, text enlargement without clipping. */
:root{--reading-small:.875rem;--reading-body:1rem;--reading-title:1.125rem;--control-target:44px}
:where(button,summary,input,select,textarea){scroll-margin-block:1rem calc(var(--navigation-clearance,0px) + 1rem)}
:where(button,summary){overflow-wrap:anywhere;white-space:normal}
:where(h1,h2,h3,h4,p,li,dd){overflow-wrap:anywhere}
:where(#content):focus{outline:none}
:where(.settings-section,.child-extra,.prize-history,.chat-examples,.chat-privacy)>summary{font-size:var(--reading-body);line-height:1.5}
.settings-section>summary strong{font-size:var(--reading-title)}
.settings-section>summary small,.settings-section-content p{font-size:var(--reading-small)}
.settings-section-content .settings>button{margin-block:.375rem;max-width:100%}
.task-inbox-tabs{flex-wrap:wrap}
.task-inbox-tabs button,.task-inbox-links button,.task-inbox-filters summary{font-size:var(--reading-small)}
.parent-mode[data-page=today] .task-inbox-scope,.parent-mode[data-page=today] .task-inbox-toolbar p{font-size:var(--reading-small);max-width:none}
.task-inbox-toolbar,.daily-planner-top{flex-wrap:wrap}
.task-inbox-toolbar p{flex:1 1 10rem}
.task-inbox-tabs button[aria-pressed=true],.task-inbox-filters button[aria-pressed=true]{font-weight:750;text-decoration:underline;text-underline-offset:.3em}
.daily-planner .planner-days{grid-template-columns:repeat(auto-fit,minmax(min(100%,2.75rem),1fr));gap:.125rem}
.daily-planner .planner-days label{font-size:0.8rem;min-height:3.5rem;padding:.3rem .1rem;line-height:1.4;border-radius:1rem;gap:.2rem}
.planner-days label b{font-size:1.125rem;font-variant-numeric:tabular-nums}
.planner-days input:checked+label{outline:2px solid var(--ink);outline-offset:-2px;font-weight:750}
.planner-days input:focus-visible+label{outline:3px solid var(--accent);outline-offset:2px}
.child-mode .prize-row h3,.prize-row h3{font-size:var(--reading-body);line-height:1.5}
.prize-row p,.prize-row button,.prize-next,.prize-balance small,.prize-note,.prize-chosen span{font-size:var(--reading-small);line-height:1.6}
.child-prizes,.studio-list{container-type:inline-size}
.prize-row{grid-template-columns:1.75rem minmax(0,1fr) auto;column-gap:.75rem}
.prize-row>button{min-height:var(--control-target)}
.prize-balance{flex-wrap:wrap}.prize-balance>span{font-size:var(--reading-title)}
.prize-balance strong{font-size:2rem}
.child-prizes section>h2{font-size:var(--reading-title)}
.preview-controls,.preview-children,.preview-profile-summary{max-width:100%;overflow-wrap:anywhere}
.preview-children{flex-wrap:wrap}.preview-children button{flex:1 1 7rem}
.chat-heading p,.chat-examples summary,.chat-privacy summary,.chat-demo-note{font-size:var(--reading-small);line-height:1.6}
.parent-chat .chat-composer textarea{font-size:max(1rem,0.9411764705882353rem);line-height:1.6}
.chat-proposal li{font-size:var(--reading-body);line-height:1.65}
.chat-proposal-actions{flex-wrap:wrap}.chat-proposal-actions button{flex:1 1 9rem}
.timeline{font-size:var(--reading-body);line-height:1.65;overflow-wrap:anywhere}.timeline small{font-size:var(--reading-small)}
.auth-wrap form input{min-width:0;width:100%;font-size:max(1rem,0.9411764705882353rem)}
.auth-wrap button,.auth-wrap summary{line-height:1.5;min-height:var(--control-target)}
.auth-wrap .auth-help,.auth-wrap .auth-access-help p{font-size:var(--reading-small)}
@media(max-width:760px){
 .parent-tabs button,.g-bottom-nav button>span:last-child{font-size:0.8rem;line-height:1.4}
 .parent-tabs .nav-icon,.g-bottom-nav .nav-icon{width:1.4rem;height:1.4rem}
 .parent-tabs button,.g-bottom-nav button{min-width:0;height:auto}
 .parent-mode header h1,header h1{font-size:1.65rem}
 .parent-mode header,.child-mode header{flex-wrap:wrap}
 .parent-task-approval{flex-wrap:wrap}
 .parent-task-approval button{flex:1 1 8rem}
 .studio-view .studio-task h4{font-size:1rem;line-height:1.5}
 .studio-view .studio-task p{font-size:var(--reading-small)}
 .settings-section>summary{min-height:4rem}
 .access-member summary{flex-wrap:wrap}
 .access-member .access-actions button{flex:1 1 8rem}
}
@media(min-width:761px){.prize-row{grid-template-columns:1.75rem minmax(0,1fr) auto}.prize-row>button{grid-column:3;grid-row:1;margin:0}}
@media(prefers-contrast:more){
 .settings-section,.prize-row,.parent-task-row,.planner-task{border-color:var(--muted)}
 .task-inbox-tabs button[aria-pressed=true]{border-bottom-width:4px}
}
@media(forced-colors:active){
 button[aria-pressed=true],nav button[aria-current=page]{outline:2px solid Highlight}
 .planner-days input:checked+label{outline:3px solid Highlight}
 :is(button,a,input,select,textarea,summary):focus-visible{outline:3px solid Highlight}
}

@container(max-width:20rem){
 .prize-row{grid-template-columns:1.75rem minmax(0,1fr)}
 .prize-row>button{grid-column:2;justify-self:start;margin-top:.375rem}
 .studio-view .studio-task,.studio-view .studio-task:has([data-undo]){grid-template-columns:minmax(0,1fr)}
 .studio-view .studio-task>button,.studio-view .studio-task [data-undo],.studio-view .studio-approved{grid-column:1;justify-self:start}
}
/* Parent catalog: compact inventory, details on demand, delivery actions first. */
.parent-prizes{max-width:800px;margin-inline:auto}
.prizes-toolbar{display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-wrap:wrap;margin-bottom:1.25rem}
.prizes-toolbar p{flex:1 1 12rem;margin:0;color:var(--muted);font-size:var(--reading-small)}
.parent-prizes h2{font-size:1.2rem}.parent-prizes h3{font-size:1rem}
.parent-prizes .prize-note{margin:.5rem 0 1rem}
.parent-prize{border-block-start:1px solid var(--line)}
.parent-prize>summary{display:flex;align-items:center;gap:.75rem;cursor:pointer;padding:.9rem 0;list-style:none}
.parent-prize>summary::-webkit-details-marker{display:none}
.parent-prize>summary:after{content:'＋';margin-inline-start:auto;flex:none}
.parent-prize[open]>summary:after{content:'−'}
.parent-prize>summary>span:nth-child(2){min-width:0}
.parent-prize strong{display:block;font-size:1rem}.parent-prize small{display:block;color:var(--muted);font-size:0.875rem}
.parent-prize-details{padding:0 0 1.2rem}.parent-prize-details>button{margin-top:.75rem}
.prizes-delivery{border-inline-start:3px solid var(--warning);padding-inline-start:1rem;margin-bottom:1.5rem}
.parent-prizes .redemption{flex-wrap:wrap;gap:.75rem;font-size:0.875rem}
.daily-planner-top>p{flex:1 1 12rem}
@media(max-width:760px){
 .parent-tabs,.g-bottom-nav{font-size:0.8rem;display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,3.75em),1fr))}
 .parent-tabs button,.g-bottom-nav button{white-space:normal;max-width:100%;overflow-wrap:anywhere}
 .parent-tabs button span,.g-bottom-nav button>span:last-child{min-width:0;max-width:100%;white-space:normal;overflow-wrap:anywhere}
}

/* Decorative stamp must never sit over the child name or progress. */
.game-view .g-player:after{display:none}

/* One disclosure convention, including native summaries. */
body details>summary{list-style:none;position:relative;padding-inline-end:1.75em}
body details>summary::-webkit-details-marker{display:none}
body details>summary::marker{content:''}
body details>summary::after{content:'＋';position:absolute;inset-inline-end:0;inset-block-start:50%;transform:translateY(-50%);font-size:1em}
body details[open]>summary::after{content:'−'}
@media(max-width:760px){
 html[data-large-navigation] :is(.parent-tabs,.g-bottom-nav){position:static!important;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));margin-block-start:1rem;inset:auto}
 html[data-large-navigation] :is(.parent-tabs,.g-bottom-nav) button{min-height:44px;white-space:normal;display:flex;gap:.5rem;align-items:center;justify-content:center}
}

}