/* Shared layout contract: intrinsic height, wrapping controls and stable area colours. */
:root{--area-play:#143c59;--area-math:#147553;--area-seasonal:#783f92;--area-shop:#f5c244;--area-room:#675488;--area-calculator:#126d7a}
*,*::before,*::after{box-sizing:border-box}
button,input,select,textarea{font:inherit}
button,a,summary{touch-action:manipulation}
button{white-space:normal;overflow-wrap:break-word}
[hidden]{display:none!important}
:focus-visible{outline:3px solid #d89400;outline-offset:3px}
.games-top,.student-top-inner{flex-wrap:wrap;gap:12px;height:auto}
#games,.dashboard{width:min(1240px,calc(100% - 32px));min-width:0;margin-inline:auto}
.game-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));align-items:stretch;gap:20px}
.game-card,.game-card-body,.crew-mission,.question-card,.math-workshop,.game-board{min-width:0}
.game-card-body{display:flex;flex-direction:column;flex:1}
.game-card-body h2{min-height:2.6em}.game-card-body p{flex:1}.game-card-body button{width:100%}
.game-tools,.game-filters,.math-step-controls,.shared-play-actions,.reaction-bar{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.game-tools button,.math-step-controls button{margin:0;min-height:44px;flex:1 1 125px}
.math-step-controls button:first-child{background:#edf2f4;color:#244658}.math-step-controls button:nth-child(2){background:#f7c649;color:#10364c}.math-step-controls button:nth-child(3){background:#147553;color:#fff}
button[aria-pressed=true]{box-shadow:inset 0 0 0 2px currentColor}
button:disabled{cursor:not-allowed}
#games .adventure-head{display:grid!important;grid-template-columns:104px minmax(0,1fr) minmax(150px,220px);gap:8px 20px;padding:20px!important;align-items:center;position:relative}
#games .adventure-head .back-games{grid-column:1/-1;justify-self:start;margin:0}
#games .adventure-head>.eyebrow{grid-column:2;grid-row:2;margin:0}
#games .adventure-head>h1{grid-column:2;grid-row:3;font-size:clamp(1.5rem,3vw,2.25rem);margin:0;overflow-wrap:break-word}
#games .adventure-head>p:not(.eyebrow){grid-column:2;grid-row:4;margin:0;line-height:1.5}
#games .adventure-head>.active-game-art{position:static!important;grid-column:1;grid-row:2/5;width:104px!important;height:104px!important;max-width:100%;padding:4px;transform:none}
.active-game-art img{width:100%;height:100%;object-fit:contain}
#games .adventure-head>.active-game-reward{grid-column:3;grid-row:2/5;display:flex;flex-direction:column;gap:8px;align-items:center;text-align:center;padding:12px;background:#e8f4ed;border-radius:12px;margin:0;min-width:0;font-size:14px}
.active-game-reward .player-identity{display:flex;align-items:center;gap:8px;max-width:100%}.player-identity img{width:42px;height:42px;object-fit:contain;border-radius:50%;background:#fff6e2}.player-identity span{overflow-wrap:anywhere}
.level-overview{display:flex!important;flex-wrap:wrap;gap:10px 16px;align-items:center;padding:16px!important;min-width:0}
.level-overview>progress{width:100%;height:12px;accent-color:#147553}.level-overview>.chapter-marker{width:auto!important;height:auto!important;max-width:none!important;padding:8px 12px;border-radius:18px;background:#f7e8ba;color:#143c59;font-weight:800}
.level-map-details{flex-basis:100%;min-width:0}#games .stage-map{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(75px,1fr));gap:8px}
.level-lights{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;width:100%;padding:4px 0;list-style:none;margin:0}
.level-light{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:8px 4px;min-height:60px;background:#edf0ef;border:2px solid #b8c4c2;border-radius:12px;color:#415963;text-align:center;font-size:13px}
.level-light.is-passed{background:#147553;color:white;border-color:#0b5338}.level-light.is-current{background:#ffe49a;color:#12374e;border-color:#b87c00}.level-light img{width:26px;height:26px;object-fit:contain;border-radius:50%;background:white}.level-light strong{font-size:18px}
.meaning-question-grid,.crew-mission-grid{align-items:stretch}.crew-mission{display:flex;flex-direction:column;gap:8px}
/* Question cards must not inherit wrapping flex columns from option groups. */
.meaning-missions fieldset.question-card{display:block;min-width:0;width:100%;margin:0;padding:16px}
.meaning-missions .question-card .question-tools{display:flex;flex-direction:row;flex-wrap:wrap;align-items:flex-start;gap:8px;width:100%;min-width:0;margin:8px 0 12px;flex-basis:auto}
.meaning-missions .question-card .question-tools button{flex:0 1 auto!important;width:auto;max-width:100%;height:auto;min-height:44px;white-space:normal;overflow-wrap:anywhere}
.meaning-missions .question-card>button{display:block;flex:none;width:100%;max-width:100%;height:auto;min-height:48px;margin:8px 0;padding:12px;text-align:left;white-space:normal;overflow-wrap:anywhere}
.meaning-missions .question-card .question-result{margin:12px 0 0}
.meaning-question-grid{align-items:start}.question-card legend{white-space:normal;max-width:100%;line-height:1.4}.question-card button{min-height:44px}.crew-mission .mission-controls{margin-top:auto}
.game-board-layout,#games .game-play{align-items:start}#games .game-coach{position:static!important;min-width:0}#games .game-play>*{min-width:0}.crew-helper{position:static!important}.crew-portrait{object-fit:contain}
dialog,.blueprint-dialog,#game-help{width:min(860px,calc(100% - 24px));max-width:calc(100% - 24px);max-height:calc(100dvh - 24px);overflow:auto;overscroll-behavior:contain;padding:16px}
dialog>header,.blueprint-dialog>header,#game-help>header{position:static!important;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;padding:0 0 12px;margin:0 0 12px;float:none}
dialog>header button,.blueprint-dialog>header button,#close-help{position:static!important;inset:auto!important;float:none!important;transform:none!important;margin:0;background:#f7c649;color:#12374e;min-height:44px}
.blueprint-shop>header h2{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%)}.blueprint-shop>header{justify-content:flex-end}
.math-options>button{flex:1 1 130px;min-height:48px}.math-data-table{table-layout:fixed}.math-data-table th,.math-data-table td{overflow-wrap:anywhere}
.learning-doors a[href="/games.html"],.games-launch-button{background:var(--area-play)!important;color:white!important}
.learning-doors a[href*="section=math"],.math-launch{background:var(--area-math)!important;color:white!important}
.learning-doors a[href*="section=boo"]{background:var(--area-seasonal)!important;color:white!important;border-color:#d89035}
[data-open-shop],.shop-launch{background:var(--area-shop);color:#143c59}
[data-open-room]{background:#eeebf2;color:#695f78}
.learning-doors button[data-calculator],.portal-calculator-launch{background:var(--area-calculator);color:white}
.launch-actions{display:flex;flex-direction:column;gap:10px}.launch-actions>*{display:flex;justify-content:center;align-items:center;width:100%;min-height:48px;text-align:center;padding:12px;border-radius:12px;font-weight:800;text-decoration:none}
/* Workbook shell: row height follows its content rather than cutting through buttons. */











@media(max-width:850px){
 #games,.dashboard{width:calc(100% - 24px)}
 #games .adventure-head{grid-template-columns:72px minmax(0,1fr);gap:8px 12px;padding:14px!important}
 #games .adventure-head>.active-game-art{width:72px!important;height:72px!important}#games .adventure-head>.active-game-reward{grid-column:1/-1;grid-row:5;flex-direction:row;flex-wrap:wrap;justify-content:center}
 .game-layout,.game-board-layout,.adventure-layout{display:flex!important;flex-direction:column}.game-layout>*,.game-board-layout>*,.adventure-layout>*{width:100%;min-width:0}
 #games .game-play{grid-template-columns:minmax(0,1fr)!important}
 .crew-helper{width:100%!important;max-width:none!important;display:flex;flex-wrap:wrap;gap:12px;align-items:center}.crew-helper img{width:65px!important;height:85px!important}
 
 
 
 
 
}
@media(max-width:540px){
 .games-top{justify-content:center;text-align:center;padding:12px}.games-top>*{max-width:100%}.games-top>strong{order:-1;width:100%}
 .meaning-question-grid,.crew-mission-grid,.mission-grid,.shop-layout{grid-template-columns:minmax(0,1fr)!important}
 .math-step-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .math-step-controls button{min-width:0;width:100%}.math-workshop{padding:12px!important}
 .equation-scale{gap:6px;padding:12px 0}.equation-scale>div{font-size:18px;padding:12px 4px}
 .letter-bank,.letter-slots{flex-wrap:wrap;gap:5px}.letter-tile{width:40px!important;height:44px!important;min-width:0!important}
 .level-light{font-size:11px}.level-light strong{font-size:16px}
 .shop-receipt{position:static}.blueprint-shop{padding:12px}.collection-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation:none!important;transition:none!important}}

#blueprintBuzz{margin:22px 0;padding:24px;background-color:#143c59;background-size:100% 100%;border:2px solid #cc9a32;border-radius:20px}
.buzz-heading{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;background:#fff9e9ef;border-radius:12px;padding:12px 16px;margin-bottom:16px}.buzz-heading h2{margin:0;color:#143c59}.buzz-heading label{display:flex;align-items:center;flex-wrap:wrap;gap:8px}.buzz-heading select,.buzz-style-shop{min-height:44px;padding:8px;border:1px solid #b6c8c8;border-radius:8px;background:#fff9e9;color:#143c59}
.buzz-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.buzz-card{display:flex;flex-direction:column;align-items:stretch;text-align:center;padding:16px;border-radius:14px;background:#fffaf0f5;border:1px solid #d8bd79;min-width:0}.buzz-label{font-size:12px;font-weight:800;letter-spacing:.06em;color:#176b5d;margin:0 0 8px}.buzz-card>img,.buzz-card>.game-cover{width:100%;height:125px;object-fit:contain;flex:none;margin:0;background:transparent}.buzz-card h3{font-size:18px;line-height:1.3;margin:12px 0 8px}.buzz-card>p:not(.buzz-label){font-size:14px;line-height:1.5;flex:1}.buzz-action{padding:12px 8px;min-height:44px;border-radius:9px;background:#143c59;color:white;text-decoration:none;font-weight:700;display:grid;place-items:center}.buzz-card:first-child .buzz-action{background:#147553}.buzz-card:nth-child(3) .buzz-action{background:#783f92}.buzz-card:nth-child(4) .buzz-action{background:#f5c244;color:#143c59}.buzz-status:empty{display:none}.buzz-status{background:#fff4d0;padding:10px;border-radius:8px}
@media(max-width:1000px){.buzz-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:540px){#blueprintBuzz{padding:12px}.buzz-grid{grid-template-columns:minmax(0,1fr)}.buzz-card{display:grid;grid-template-columns:80px minmax(0,1fr);gap:8px;text-align:left}.buzz-card>.buzz-label{grid-column:1/-1}.buzz-card>img,.buzz-card>.game-cover{grid-row:2/4;height:80px}.buzz-card>h3,.buzz-card>p:not(.buzz-label){grid-column:2;margin:0}.buzz-card>.buzz-action{grid-column:1/-1}.buzz-heading{padding:12px}.buzz-heading>*{max-width:100%}}
.illustrated-doors{--nav-art:url("/interface-art/nav-junior.webp");display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px!important;width:min(1240px,calc(100% - 32px));margin:18px auto!important;padding:0!important;align-items:stretch}
.illustrated-doors[data-age=little]{--nav-art:url("/interface-art/nav-little.webp")}.illustrated-doors[data-age=teen]{--nav-art:url("/interface-art/nav-teen.webp")}
.illustrated-doors>*{display:flex!important;flex-direction:column;justify-content:space-between;align-items:stretch;padding:0!important;min-width:0!important;min-height:0!important;border-radius:12px;overflow:hidden;border:2px solid #ccad61!important;text-align:center;text-decoration:none;font-weight:700;line-height:1.3}
.door-art{display:block;flex:none;height:110px;background-image:var(--nav-art);background-size:600% auto;background-position:calc(var(--door) * 20%) 39%;background-repeat:no-repeat;background-color:#fff3db}
.door-label{display:flex;justify-content:center;align-items:center;min-height:54px;padding:8px 6px;font-size:14px}
.illustrated-doors>*:nth-child(4){background:var(--area-shop)!important;color:#143c59!important}.illustrated-doors>*:nth-child(5){background:#eeebf2!important;color:#695f78!important}.illustrated-doors>*:nth-child(6){background:var(--area-calculator)!important;color:white!important}
@media(max-width:850px){.illustrated-doors{grid-template-columns:repeat(3,minmax(0,1fr))}.door-art{height:90px;background-position:calc(var(--door) * 20%) 38%}}
@media(max-width:400px){.door-art{height:70px}.door-label{font-size:12px;min-height:58px}}
[data-answer-result=incorrect]{outline:3px solid #bc3434!important;outline-offset:2px!important;background-color:#ffe8e1!important}
[data-answer-result=correct]{outline:3px solid #147553!important;outline-offset:2px!important;background-color:#e6f4ea!important}
[data-answer-result=missing]{outline:3px dashed #a66a00!important;outline-offset:2px!important}
.ybb-question-feedback{width:min(900px,calc(100% - 24px));margin:16px auto;padding:16px;border:2px solid #b18c31;border-radius:12px;background:#fff9e6;color:#143c59;line-height:1.5;font:16px/1.5 Arial,sans-serif}
.question-feedback-list{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}.question-feedback-list button{min-height:44px;flex:1 1 180px;padding:10px;border-radius:8px;border:1px solid currentColor;background:#fff9e6;color:#143c59}.question-feedback-list .feedback-correct{background:#e6f4ea;color:#126341}.question-feedback-list .feedback-incorrect{background:#ffe8e1;color:#952a23}.question-feedback-list .feedback-missing{background:#fff0bd;color:#73500b}

@media print{.ybb-question-feedback{display:none}}

/* Final learner dashboard and level-map layout. Dashboard styles are purchased
   in the shop; the announcements sit inside the selected dashboard artwork. */
#blueprintBuzz{padding:20px;background-position:center;background-size:100% 100%;box-shadow:0 12px 30px #102f4824}
#blueprintBuzz .buzz-heading{background:transparent;padding:4px 6px 16px;margin:0;display:flex;align-items:center;justify-content:space-between;gap:12px}
#blueprintBuzz .buzz-heading h2{color:#fff;text-shadow:0 2px 3px #082539}
#blueprintBuzz .buzz-style-shop{min-height:44px;padding:9px 14px;border:2px solid #e6b53d;border-radius:10px;background:#fff9e9;color:#143c59;font-weight:800}
#blueprintBuzz .buzz-grid{gap:10px;padding:10px;border-radius:16px;background:#0d314cc7}
#blueprintBuzz .buzz-card{padding:14px;border:2px solid #d8bd79;box-shadow:inset 0 0 0 2px #fff8df}
#blueprintBuzz .buzz-card>img,#blueprintBuzz .buzz-card>.game-cover{height:112px}
.level-light.is-milestone{border-color:#c08a0a;background:#fff1bf;box-shadow:inset 0 0 0 2px #fff8df}
.level-light.is-milestone.is-passed{background:#147553;border-color:#f5c244}
.level-light.is-milestone.is-current{background:#f8c442}
@media(max-width:540px){#blueprintBuzz{padding:10px}#blueprintBuzz .buzz-grid{padding:7px}#blueprintBuzz .buzz-heading{align-items:stretch}#blueprintBuzz .buzz-style-shop{width:100%}}

/* Buzz board refinement: center the title in the built-in sign, reduce the
   board height, and give every announcement illustration one equal stage. */
#blueprintBuzz{padding:12px 16px 16px}
#blueprintBuzz .buzz-heading{position:relative;min-height:68px;padding:0;margin:0 0 4px;justify-content:flex-end}
#blueprintBuzz .buzz-heading h2{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:min(42%,430px);margin:0;color:#143c59;text-shadow:none;text-align:center;font-size:clamp(20px,2vw,28px);line-height:1.1}
#blueprintBuzz .buzz-style-shop{position:relative;z-index:1;margin-right:0;min-height:40px;padding:7px 12px}
#blueprintBuzz .buzz-grid{padding:8px;gap:8px}
#blueprintBuzz .buzz-card{padding:10px 12px 12px;min-height:350px}
#blueprintBuzz .buzz-label{margin-bottom:3px}
#blueprintBuzz .buzz-art{height:104px;display:grid;place-items:center;margin:0 auto;width:100%}
#blueprintBuzz .buzz-art>img,#blueprintBuzz .buzz-art>.game-cover{display:block;width:104px!important;height:104px!important;max-width:104px!important;max-height:104px!important;object-fit:contain!important;margin:0 auto!important;background:transparent!important}
#blueprintBuzz .buzz-card h3{margin:7px 0 5px}
#blueprintBuzz .buzz-card>p:not(.buzz-label){margin:5px 0 10px;line-height:1.35}
@media(max-width:1000px){#blueprintBuzz .buzz-heading h2{width:50%}#blueprintBuzz .buzz-card{min-height:330px}}
@media(max-width:540px){#blueprintBuzz{padding:9px}#blueprintBuzz .buzz-heading{min-height:96px;align-items:flex-end;justify-content:center;padding-top:50px}#blueprintBuzz .buzz-heading h2{top:25px;width:90%;font-size:21px}#blueprintBuzz .buzz-style-shop{width:auto;min-width:180px}#blueprintBuzz .buzz-card{grid-template-columns:82px minmax(0,1fr);min-height:0;padding:10px}#blueprintBuzz .buzz-art{grid-row:2/4;width:82px;height:82px}#blueprintBuzz .buzz-art>img,#blueprintBuzz .buzz-art>.game-cover{width:82px!important;height:82px!important;max-width:82px!important;max-height:82px!important}#blueprintBuzz .buzz-card>h3,#blueprintBuzz .buzz-card>p:not(.buzz-label){grid-column:2}#blueprintBuzz .buzz-card>.buzz-action{grid-column:1/-1}}

/* Compact game identity: useful information without the oversized empty panel. */
#games .adventure-head{grid-template-columns:116px minmax(0,1fr) auto!important;gap:6px 18px!important;padding:14px 18px!important;background:#fff9ef!important}
#games .adventure-head>.active-game-art{width:116px!important;height:116px!important;padding:0!important}
#games .adventure-head>.active-game-reward{align-self:center;min-width:190px;max-width:230px;padding:9px 12px!important;border:2px solid #a9d0c1;border-radius:999px!important;display:grid!important;grid-template-columns:auto 1fr;gap:5px 8px!important;text-align:left!important;background:#e5f4ed!important}
#games .active-game-reward>.player-identity{grid-column:1/-1;justify-content:center;font-weight:800}
#games .active-game-reward>.player-identity img{width:52px;height:52px}
#games .active-game-reward>.bill-stack{width:58px!important;min-width:58px!important;height:36px!important;margin:0!important}
#games .active-game-reward>.bill-stack img{width:58px!important;height:auto!important}
#games .active-game-reward>strong{font-size:13px;line-height:1.3}
@media(max-width:760px){#games .adventure-head{grid-template-columns:86px minmax(0,1fr)!important;padding:12px!important}#games .adventure-head>.active-game-art{width:86px!important;height:86px!important;grid-row:2/4}#games .adventure-head>p:not(.eyebrow){grid-column:1/-1!important;grid-row:auto!important}#games .adventure-head>.active-game-reward{grid-column:1/-1!important;grid-row:auto!important;max-width:none;width:100%;border-radius:14px!important;grid-template-columns:auto 1fr auto}#games .active-game-reward>.player-identity{grid-column:auto}.level-lights{grid-template-columns:repeat(5,minmax(72px,1fr));overflow-x:auto;padding-bottom:8px}}
@media(max-width:420px){#games .adventure-head{grid-template-columns:68px minmax(0,1fr)!important;gap:6px 10px!important}#games .adventure-head>.active-game-art{width:68px!important;height:68px!important}#games .active-game-reward>.player-identity img{width:44px;height:44px}.game-tools button{flex:1 1 46%!important}}

/* Match the live game selectors; late legacy themes must not restore fixed sizing. */
#games .adventure-head{min-height:0;padding-right:20px!important}
#games .adventure-head>.eyebrow{display:block}
#games .stage-map{overflow:visible;grid-template-columns:repeat(auto-fit,minmax(min(100%,75px),1fr))}
#games .crew-mission-grid>*{min-width:0}
#games .code-program{max-width:100%;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere}
@media(max-width:850px){#games .adventure-head{padding-right:14px!important}#games .game-coach{max-width:100%;width:100%}}
/* Keep completion feedback aligned with the game, with no empty grid cells. */
#games .game-receipt{width:calc(100% - 249px);max-width:100%;grid-template-columns:80px minmax(0,1fr);align-items:start;gap:10px 16px;padding:20px;height:auto;min-height:0}
#games .game-receipt>*{grid-column:2;min-width:0;margin:0;overflow-wrap:anywhere}
#games .game-receipt>.crew-portrait{grid-column:1;grid-row:1 / span 3;width:80px;height:116px}
#games .game-receipt>.bucks-fan{justify-self:start;padding:4px 0}
#games .game-receipt>.game-actions{margin:4px 0 0;align-items:center}
@media(max-width:850px){#games .game-receipt{width:100%}}
@media(max-width:500px){#games .game-receipt{grid-template-columns:56px minmax(0,1fr);padding:14px;gap:10px}#games .game-receipt>.crew-portrait{width:56px;height:82px}#games .game-receipt>.game-actions{grid-column:1 / -1}#games .game-receipt strong{font-size:19px}}

/* Every age group uses six separate transparent navigation illustrations. */
.learning-door .door-art{background:none!important;aspect-ratio:1.18;display:grid;place-items:center;overflow:hidden}
.learning-door .door-art svg{display:none!important}
.learning-door .door-art>img{display:block;width:100%;height:100%;object-fit:contain;object-position:center;filter:none}


/* V47.1.21 workbook toolbar: exactly two blue rows on phone/tablet. */



/* V47.1.23 responsive toolbar lock: two rows on phones/tablets, including rotated coarse-pointer tablets. */




/* V47.1.26 toolbar lock: one desktop row; two rows maximum on phones/tablets; rotation reflows without state changes. */




