/* Catalog-wide material pass. Keep the learning geometry and state markers intact. */
.sized-balloon .adv-icon { transform: scale(var(--balloon-scale)); transform-origin: bottom center; }
.game-dialog[data-world] .game-body:not(:has(.adv-shell)):not(:has(.quiz-scene)) { background: linear-gradient(#e9f6ff22,#edf5dc33),var(--scene-art) center/cover; }
.game-dialog[data-world]:has(.adv-shell) .game-ribbon { min-height: 55px; margin: 0; padding: 4px 18px; border: 0; border-radius: 0; background: linear-gradient(100deg,#dcf0f8,#e4f4dd); box-shadow: none; }
.game-dialog[data-world]:has(.adv-shell) .ribbon-character { width: 43px; height: 43px; }
.game-dialog[data-world]:has(.adv-shell) .game-ribbon > div:not(.ribbon-stars) { padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; backdrop-filter: none; }
.game-dialog[data-world]:has(.adv-shell) .game-ribbon > div > span { font-size: 16px; }
.game-dialog[data-world]:has(.adv-shell) .game-meta { padding-block: 9px 5px; }
.game-dialog[data-world]:has(.adv-shell) .game-meta p { font-family: var(--font-play); font-size: 14px; line-height: 1.55; }
.game-dialog[data-world]:has(.adv-shell) .game-voice-tools { padding-bottom: 10px; }
.game-dialog[data-world]:has(.adv-shell) .game-voice-tools .voice-button { font-size: 13px; padding: 7px 12px; }
.game-dialog[data-world] .game-body:has(.adv-shell) { background: var(--scene-art) center/cover; padding: 14px; }
.adv-shell {
 --piece-top:#e9d4ff; --piece-bottom:#c6a3e6; --piece-base:#9971bf;
 --playmat-top:#fff6d6; --playmat-bottom:#f2ddb2;
 background: var(--world-art) center/cover;
 border: 3px solid #fff1c5; box-shadow: 0 7px 0 #938461,0 12px 23px #394b4640;
 padding-bottom: 22px;
}
.adv-shell[data-theme=garden],.adv-shell[data-theme=island] { --piece-top:#d2f4c1; --piece-bottom:#a3d3a1; --piece-base:#70a47a; }
.adv-shell[data-theme=ocean] { --piece-top:#c3f2f6; --piece-bottom:#94d4de; --piece-base:#61a2b1; }
.adv-shell[data-theme=sky] { --piece-top:#d3eeff; --piece-bottom:#9bc9ee; --piece-base:#6b9ec4; }
.adv-shell[data-theme=market] { --piece-top:#ffedb2; --piece-bottom:#efc67d; --piece-base:#be975b; }
.adv-shell[data-theme=forest] { --piece-top:#ead3ff; --piece-bottom:#c5a5e8; --piece-base:#9471bb; }
.adv-shell[data-theme=space] { --piece-top:#d6d3ff; --piece-bottom:#aaa4e5; --piece-base:#7972b2; }
.adv-world-scene { min-height: 118px; padding: 12px 8px; }
.adv-world-scene:before { background: linear-gradient(90deg,#fff0,#fff0 65%,#fff2); }
.adv-world-label { border: 2px solid #fff4ce; border-radius: 22px 22px 7px 22px; background: #fff8e6; box-shadow: 0 4px 0 #c4a46c; padding: 9px 14px; }
.adv-world-label>strong { font-size: 25px; color: #575079; }
.adv-world-label>i { color: #c18828; letter-spacing: 4px; font-size: 14px; }
.adv-world-guide .adv-icon { width: 98px!important; height: 98px!important; }
.adv-topline { padding: 8px 12px; margin-bottom: 12px; border: 2px solid #fff0b5; background: #fff6db; border-radius: 999px; box-shadow: 0 3px 0 #af925b; }
.adv-topline>span { color: #65537f; font-size: 15px; }
.adv-stage { padding: 12px 6px; gap: 20px; border: 0; background: none; box-shadow: none; border-radius: 0; min-height: 220px; }
.adv-stage>.adv-prompt,.adv-stage>.adv-mission,.adv-stage>.adv-position,.adv-stage>.adv-balance-total,.adv-stage>.adv-word,
.adv-stage>.wonder-question,.adv-stage>.enrich-mission,.adv-stage>.discovery-clue {
 padding: 9px 16px; border: 2px solid #fff5d2; border-radius: 22px;
 background: #fff7e3; box-shadow: 0 3px 0 #bba06b;
 color: #55436e; font-family: var(--font-play); font-weight: 400; line-height: 1.5;
}
.adv-stage>.adv-prompt { font-size: 16px; }
.adv-stage>.wonder-question,.adv-stage>.enrich-mission { font-size: 23px; }
.adv-stage .adv-mission strong { font-weight: 450; color: #6b4c91; }
.adv-solved { opacity: 1; }
.adv-stage .sculpted-toy { filter: drop-shadow(0 4px 2px #624f6438); }
.adv-shell .adv-primary { border-radius: 999px!important; background: linear-gradient(#ad86dd,#8057b2)!important; border-color: #fff0c9!important; box-shadow: inset 0 2px 0 #fff8,0 5px 0 #58407d,0 8px 12px #41314333!important; font-weight: 400!important; }
.adv-shell .adv-secondary { padding: 9px 16px; min-height: 44px; background: #fff2d9; border: 2px solid #fffcde; border-radius: 999px; color: #665280!important; box-shadow: 0 3px 0 #c3aa7f; }
.adv-items>button,.adv-order-items>button,.adv-choice-row>button,.adv-matching button,
.adv-answers>button,.adv-letter-tiles>button,.adv-digits>button,
.workshop-answers button,.enrich-options button,.discovery-words button,.discovery-sentence button {
 background: radial-gradient(ellipse at 35% 10%,#fff9,transparent 55%),linear-gradient(var(--piece-top),var(--piece-bottom))!important;
 border: 3px solid #fff5d5!important; border-bottom-color: #f0dfb8!important;
 box-shadow: inset 0 2px 0 #fff9,0 5px 0 var(--piece-base),0 9px 12px #4d3a5730!important;
 color: #4b3863!important;
}
.adv-stage .adv-items>button { min-height: 115px; border-radius: 30px!important; }
.adv-stage .adv-items>button>span:not(.adv-icon) { font-size: 15px; }
.adv-shell .adv-bin { background: repeating-linear-gradient(0deg,#cbab7320 0 3px,#e8d49b20 3px 11px),linear-gradient(#e5f4c1,#b7d29c)!important; border: 3px solid #fff1c7!important; box-shadow: inset 0 -7px 0 #6c9a6d40,0 5px 0 #678d60!important; border-radius: 32px 32px 22px 22px; }
.adv-bin strong { font-weight: 400; font-size: 16px; }
.adv-matching button { border-radius: 999px!important; }
.adv-order-track { padding: 12px 7px; border: 3px solid #f8dfac; background: linear-gradient(#c09159,#e1bb80); border-radius: 22px; box-shadow: 0 5px 0 #977147; }
.adv-order-track>span { background: #fff0c9; border: 2px dashed #ad885a; border-radius: 12px; color: #775336; box-shadow: inset 0 2px 4px #9d784926; }
.adv-order-track>span.filled { background: #d8eec5; }
.adv-order-track>i { color: #fff5d8; }
.adv-train { padding: 15px 8px 25px; border: 3px solid #e4c18a; border-radius: 24px; background: linear-gradient(#e4d0a14d,#c1995d99),var(--world-art) center/cover; box-shadow: 0 5px 0 #a48351; }
.adv-carriage { border: 2px solid #ffedbd; border-radius: 13px; background: linear-gradient(#fff2c6,#e6bd78); box-shadow: 0 4px 0 #a47645; }
.adv-carriage:after { color: #65526c; text-shadow: 0 2px 0 #e3cead; }
.adv-carriage.empty { color: #926735; border-color: #fff5d0; background: #e3bb764d; }
.adv-choice-row>button { border-radius: 50%!important; aspect-ratio: 1; }
.adv-stage .adv-answers>button,.adv-stage .enrich-options>button,.adv-stage .workshop-answers>button,
.wonder-answer-row>button,.wonder-letter-bank>button,.journey-answers>button { border-radius: 999px!important; }
.adv-hero-token { background: radial-gradient(#fff4ad,#ffefaf77 55%,#fff0 70%); }
.adv-comparison>div { border: 3px solid #fff1be; background: linear-gradient(#fff3d2,#f0d8a2); box-shadow: 0 4px 0 #b79c68; border-radius: 24px; }
.adv-stones { background: linear-gradient(#bddb8b66,#c6dfa499),var(--world-art) center/cover; border: 3px solid #e9e7b9; border-radius: 28px; padding: 20px 13px; box-shadow: 0 5px 0 #7c9b67; }
.adv-stones button { font-family: var(--font-play); background: linear-gradient(#d8f1ce,#9dc8a0); color: #425d48; border-color: #f1f9d6; box-shadow: inset 0 3px 0 #fff8,0 5px 0 #6f997d; }
.adv-stones button:nth-child(3n+1) { background: linear-gradient(#d0f1e7,#a0c9c5); color: #355f58; box-shadow: inset 0 3px 0 #fff8,0 5px 0 #65938b; }
.adv-pixel-grid { border: 4px solid #ead3a8; padding: 9px; border-radius: 19px; background: #9e7d53; box-shadow: 0 5px 0 #775a37; }
.adv-pixel-grid .adv-pixel { border: 2px solid #ffffff8c; box-shadow: inset 0 2px 0 #ffffff60,0 2px 0 #45372e40; }
.adv-palette>button,.adv-direction-pad>button,.adv-jumps>button,.adv-clock-tools button,.adv-stepper button,.discovery-length button { border: 2px solid #fff1cc; border-radius: 50%; background: radial-gradient(ellipse at 35% 10%,#fff8,transparent 55%),linear-gradient(var(--piece-top),var(--piece-bottom)); color: #594273; box-shadow: 0 4px 0 var(--piece-base); font-family: var(--font-play); font-weight: 400; }
.adv-recall-progress>span { border: 2px solid #f5dda4; background: #fff5dd; box-shadow: 0 3px 0 #aa8e61; }
.adv-lanterns>button { opacity: 1; background: radial-gradient(#cdb9ea88,#67548d); border: 3px solid #e2bc7e; box-shadow: 0 5px 0 #8d683d!important; }
.adv-lanterns>button.lit { background: radial-gradient(#fffbe0,#edcc69); box-shadow: 0 0 0 4px #fff1b4,0 0 24px #ffe994!important; }
.adv-code-map { border: 5px solid #f3dbab; background: linear-gradient(#e8f4c022,#e8f4c044),var(--world-art) center/cover; border-radius: 24px; padding: 11px; box-shadow: 0 5px 0 #a68c60; }
.adv-map-cell { background: linear-gradient(#fff8d6,#e3d4a6); border: 2px solid #fff5d4; border-radius: 11px; box-shadow: 0 2px 0 #a49870; }
.adv-map-cell.wall { background: #727c7077; }
.adv-map-cell.visited { background: #efcd79; }
.adv-program { background: #e4d4f4; border: 3px solid #fff0d9; border-radius: 22px; }
.adv-program>span { border: 1px solid #fff4de; background: linear-gradient(#f6e8ff,#c3a6df); color: #614184; box-shadow: 0 2px 0 #a489bf; }
.adv-cipher-key,.adv-letter-slots { padding: 13px; border: 3px solid #f1d5a1; background: linear-gradient(#fff0cb,#eed2a0); border-radius: 23px; box-shadow: 0 4px 0 #b39060; }
.adv-cipher-key>span { padding: 5px; background: #fff7df; border-radius: 14px; }
.adv-letter-slots>span { background: #fff7dc; color: #6c4e87; border: 2px dashed #a98c5d; box-shadow: inset 0 2px 3px #9e78452b; }
.adv-place-value>div { background: linear-gradient(#fff0ca,#e9d2aa); border: 3px solid #fff4d6; border-radius: 24px; box-shadow: 0 4px 0 #b09369; }
.adv-tens-blocks i { background: linear-gradient(135deg,#e4b9ff,#a770d3); border: 1px solid #edceff; }
.adv-unit-blocks i { background: linear-gradient(135deg,#cbf7b5,#7dbb83); border: 1px solid #e3ffc8; box-shadow: 0 3px 0 #578b65; }
.adv-equation,.adv-position { padding: 8px 15px; border-radius: 18px; background: #fff5d8; color: #604879; font-family: var(--font-play); }
.adv-numberline { background: #f2e2b9; padding: 28px 4px 12px; border: 3px solid #fff0c6; border-bottom: 7px solid #b79561; border-radius: 22px; box-shadow: 0 4px 0 #916e45; }
.adv-numberline:before { background: #a08053; z-index: 0; bottom: 38px; }
.adv-numberline>span { z-index: 1; }
.adv-wallet { background: linear-gradient(#dcc7a8,#efd7ab); border: 4px solid #ffe8b9; border-radius: 24px; box-shadow: inset 0 3px 6px #8b643c40,0 4px 0 #a5845b; }
.adv-denominations>button { background: linear-gradient(var(--piece-top),var(--piece-bottom)); border: 3px solid #fff0c5; box-shadow: inset 0 2px 0 #fff8,0 5px 0 var(--piece-base); border-radius: 25px; }
.adv-denominations .adv-coin-choice,.adv-wallet>.adv-coin { background: radial-gradient(circle at 35% 20%,#fff1ac,#ecc056 65%,#c79231); color: #6f4b22; border: 3px solid #ffefb4; border-radius: 50%; box-shadow: inset 0 0 0 3px #e6c37b,0 4px 0 #a47b35; }
.adv-clock { border: 7px solid #e4b573; border-radius: 50%; background: #b293ce; box-shadow: inset 0 2px 0 #fff5,0 6px 0 #9b743d,0 10px 15px #3b344c33; }
.adv-flower-array { border: 4px solid #e9d3a3; background: linear-gradient(#d6edc166,#c5e4ad99),var(--world-art) center/cover; box-shadow: 0 5px 0 #8f9a65; }
.adv-sum-board { padding: 14px; border: 5px solid #f9dfad; background: linear-gradient(#ceb6e9,#a589ca); box-shadow: 0 5px 0 #76618d; border-radius: 26px; }
.adv-sum-board { width: min(330px,100%); grid-template-columns: repeat(3,minmax(0,1fr)) 40px; }
.adv-sum-board>button { border: 2px solid #fff4cf; background: linear-gradient(#fff3cd,#e9cb91); color: #69507f; border-radius: 13px; box-shadow: 0 3px 0 #95784e; }
.adv-boat { background: linear-gradient(#d5f1f4,#a9d3df); border: 3px solid #fff1c9; border-radius: 28px; box-shadow: 0 5px 0 #709eab; }
.adv-boat button { border: 2px solid #fff4d6; background: linear-gradient(#efe0ff,#bea3de); border-radius: 50%; box-shadow: 0 3px 0 #9173ae; color: #65417f; }
.adv-clues { background: #fff4d6; border: 3px solid #ffefd1; border-radius: 22px; box-shadow: 0 4px 0 #bb996d; }
.adv-logic-seats>button { background: linear-gradient(#fff0c9,#dbbd8c); border: 3px solid #ffecc4; border-radius: 24px; box-shadow: 0 5px 0 #a58153; }
.adv-hanoi { padding-inline: 8px; background: linear-gradient(#fff0,#fff0 80%,#c9ad7877); }
.adv-hanoi>button { border-bottom-color: #ba9259; box-shadow: 0 4px 0 #8e6c43; }
.adv-rings>i { border: 2px solid #fff9; box-shadow: inset 0 4px 0 #fff4,inset 0 -5px 0 #0002,0 3px 0 #5b406c66; border-radius: 999px; }
.adv-hanoi>button>strong { background: #fff1d4; color: #655077; border-radius: 999px; padding: 3px 8px; }
.adv-stage .workshop-lab { background: linear-gradient(#e6d3f555,#dfc4f577),var(--world-art) center/cover; }
.workshop-equation { background: #fff2d2; }
.explorer-options>button,.explorer-collection>div { background: linear-gradient(#f5e4ff,#d1afea); border-radius: 28px; border: 3px solid #fff1d6; box-shadow: 0 4px 0 #a585bd; }
.wonder-answer-row>button,.wonder-letter-bank>button,.journey-answers>button { background: radial-gradient(ellipse at 35% 10%,#fff9,transparent 55%),linear-gradient(var(--piece-top),var(--piece-bottom)); border: 3px solid #fff2cf; box-shadow: 0 5px 0 var(--piece-base); color: #57406b; }
.wonder-graph { background: linear-gradient(#fff2cfaa,#f0dfb9b0),var(--world-art) center/cover; }
.discovery-length { padding: 14px 18px; background: #fff4d9; border: 3px solid #ffeac1; border-radius: 24px; box-shadow: 0 4px 0 #bca070; }
.discovery-sentence { background: #fff1cc; border: 3px dashed #aa8055; }
.game-dialog[data-world] .code-lab { background: linear-gradient(#27265b55,#34385b88),var(--scene-art) center/cover; border: 4px solid #e7d2ff; border-radius: 30px; box-shadow: 0 6px 0 #6d5591; }
.game-dialog[data-world] .code-caption { display: table; margin-inline: auto; background: #fff3dc; padding: 6px 14px; border-radius: 999px; color: #614476; }
.game-dialog[data-world] .code-slot { background: linear-gradient(#fff0c9,#e2c58c); border: 3px solid #fff4d4; box-shadow: inset 0 3px 6px #9d815733,0 4px 0 #a0845b; }
.game-dialog[data-world] .code-gem { display: grid; place-items: center; width: 44px; height: 46px; background: none; border: 0; box-shadow: none; border-radius: 0; }
.code-gem svg { width: 100%; height: 100%; }
.game-dialog[data-world] .code-gem.small { width: 26px; height: 28px; }
.game-dialog[data-world] .code-palette>button { background: linear-gradient(#f1dfff,#c5a2e7); border: 2px solid #fff0d2; box-shadow: 0 4px 0 #8d6aad; border-radius: 25px; }
.game-dialog[data-world] .code-palette small { color: #52396b; }
.game-dialog[data-world] .secret-lock { background: linear-gradient(#fae2a8,#c69b5c); border: 3px solid #fff0c7; border-radius: 22px; padding: 9px 12px; box-shadow: 0 4px 0 #9c7449; }
.game-dialog[data-world] .code-check { border: 2px solid #fff2cc; border-radius: 999px; background: linear-gradient(#ae83df,#8053b3); box-shadow: 0 5px 0 #58397f; color: #fff; }
.game-dialog[data-world] .code-legend { padding: 9px; border-radius: 17px; background: #fff3df; color: #54415f; }
.game-dialog[data-world] .code-history-row { background: #fff4df; border: 2px solid #e7cfaa; border-radius: 17px; }
.game-dialog[data-world] .play-tip,.game-dialog[data-world] .puzzle-tools { padding: 8px 13px; border: 2px solid #fff2cf; border-radius: 20px; background: #fff3da; color: #5b496e; font-family: var(--font-play); }
.adv-stage>.studio-heading,.adv-stage>.studio-note { padding: 9px 14px; background: #fff3d8; border: 2px solid #ffeac0; border-radius: 23px; box-shadow: 0 3px 0 #b79c6c; }
.studio-coast { background: linear-gradient(#fff0ce55,#f5e2b177),var(--world-art) center/cover; }
.studio-target { display: table; padding: 8px 18px; margin-inline: auto; border: 2px solid #ffe9b9; border-radius: 21px; background: #fff5dc; }
.studio-story { background: linear-gradient(#fff0cf,#ead2f6); border-color: #fff0c9; box-shadow: 0 5px 0 #b093be; }
.studio-story button,.voyage-answers>button,.voyage-number-picker>button { background: radial-gradient(ellipse at 35% 10%,#fff9,transparent 55%),linear-gradient(var(--piece-top),var(--piece-bottom)); border: 3px solid #fff2cf; border-radius: 999px; color: #58416f; box-shadow: 0 5px 0 var(--piece-base); }
.voyage-number-cards>button { background: linear-gradient(#fff0bb,#edc77f); border: 3px solid #fff4cf; border-radius: 999px; color: #71512e; box-shadow: 0 5px 0 #ad844b; }
.voyage-story { background: linear-gradient(100deg,#fff2d4f2,#f4ddb9ed),var(--world-art) center/cover; border-color: #e4bf88; }
.voyage-story p { font-weight: 400; }
.voyage-fractions { background: linear-gradient(#d6edff66,#c7dff599),var(--world-art) center/cover; }
@media(max-width:600px) {
 .game-dialog[data-world] .game-body:has(.adv-shell) { padding: 10px 7px 19px; }
 .game-dialog[data-world]:has(.adv-shell) .game-ribbon { padding-inline: 13px; }
 .game-dialog[data-world]:has(.adv-shell) .game-ribbon > div > span { font-size: 14px; }
 .game-dialog[data-world]:has(.adv-shell) .game-meta p { font-size: 12px; }
 .game-dialog[data-world]:has(.adv-shell) .game-voice-tools .voice-button { font-size: 12px; }
 .adv-shell { padding-inline: 10px; }
 .adv-world-scene { min-height: 100px; padding: 8px 3px 12px; }
 .adv-world-guide .adv-icon { width: 80px!important; height: 80px!important; }
 .adv-world-label { padding: 8px 10px; }
 .adv-world-label>strong { font-size: 21px; }
 .adv-world-label>span { font-size: 11px; }
 .adv-topline { padding: 8px 10px; border-radius: 20px; }
 .adv-topline>span { font-size: 14px; }
 .adv-stage { padding: 9px 0; gap: 18px; }
 .adv-stage>.adv-prompt { font-size: 14px; padding: 8px 12px; }
 .adv-stage>.wonder-question,.adv-stage>.enrich-mission { font-size: 21px; }
 .adv-stage .adv-items>button { min-height: 99px; border-radius: 25px!important; }
 .adv-stage .adv-items>button>span:not(.adv-icon) { font-size: 13px; }
 .adv-bin strong { font-size: 14px; }
 .adv-train { padding: 12px 6px 24px; }
 .adv-code-map { padding: 8px; border-width: 4px; }
 .adv-cipher-key,.adv-letter-slots { padding: 9px; gap: 6px; }
 .adv-sum-board { padding: 9px; border-width: 4px; grid-template-columns: repeat(3,minmax(0,1fr)) 32px; grid-template-rows: repeat(3,56px) 30px; }
 .adv-clock { width: min(240px,100%); border-width: 6px; }
 .game-dialog[data-world] .code-lab { padding: 17px 10px; }
 .game-dialog[data-world] .code-gem { width: 38px; height: 40px; }
}
@media(prefers-reduced-motion:reduce) { .adv-shell button { transition: none; } }
@media(forced-colors:active) {
 .adv-shell,.adv-stage,.adv-world-label,.adv-topline,.adv-stage>.adv-prompt,.adv-stage>.adv-mission,
 .adv-train,.adv-code-map,.adv-place-value>div,.adv-letter-slots,.adv-wallet,.adv-clues,
 .game-dialog[data-world] .code-lab { background: Canvas!important; border: 2px solid CanvasText; box-shadow: none; color: CanvasText; }
 .adv-shell button,.game-dialog[data-world] .code-palette>button,.game-dialog[data-world] .code-slot { background: ButtonFace!important; color: ButtonText!important; border: 2px solid ButtonText!important; box-shadow: none!important; }
 .adv-shell .selected { outline: 3px solid Highlight!important; }
}

/* The terrace activities keep individual objects illustrated and controls stationary. */
.terrace-board{color:#433150}.terrace-balance{max-width:440px;margin:auto;background:#fff1d9e8;border:2px solid #b7a180;border-radius:24px;padding:8px 16px}.terrace-balance svg{display:block;width:100%;max-height:120px}.terrace-pan-labels{display:flex;justify-content:space-around;gap:18px;flex-wrap:wrap;font-weight:800}.terrace-coins,.terrace-answers,.terrace-tools{display:flex;flex-wrap:wrap;justify-content:center;gap:9px;margin:12px 0}.terrace-coins button{min-width:70px;display:grid;justify-items:center;gap:5px;background:#fff1d9!important;color:#433150!important}.terrace-coin{display:grid;place-items:center;width:43px;height:43px;border-radius:50%;border:4px double #8b6939;background:#f6d78d;font-size:24px;font-weight:900}.terrace-notebook{max-width:620px;margin:12px auto;background:#fff5e6ed;padding:12px 18px;border-inline-start:6px solid #987baf;border-radius:12px}.terrace-notebook h3{margin:0 0 8px}.terrace-notebook ol{padding-inline-start:24px;margin:0}.terrace-notebook li{margin:6px 0;overflow-wrap:anywhere}.terrace-answers button{min-width:48px;min-height:48px}.terrace-towers{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;max-width:640px;margin:12px auto}.terrace-towers button{display:grid;justify-items:center;align-content:end;background:#fff0d6df!important;color:#433150!important;padding:8px!important;border-radius:18px!important;min-width:0}.terrace-towers svg{width:100%;max-width:140px;max-height:170px}.terrace-towers small{white-space:normal}.terrace-letter{max-width:620px;margin:12px auto;padding:18px 24px;background:repeating-linear-gradient(#fff8e9 0 34px,#e6d8c6 35px 36px);border:3px solid #b5a080;border-radius:6px 24px 24px 6px;box-shadow:5px 5px 0 #987baf33}.terrace-letter>svg,.terrace-letter>.art-icon{float:left}.terrace-letter h3{margin:0 0 12px}.terrace-letter p{font-size:clamp(17px,2.5vw,21px);line-height:1.7;margin:7px 0}.terrace-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(175px,1fr));gap:10px}.terrace-fields button{display:grid;gap:8px;min-height:82px;text-align:right!important;white-space:normal!important;overflow-wrap:anywhere}.terrace-details{display:grid;grid-template-columns:repeat(auto-fit,minmax(175px,1fr));gap:9px;margin:12px 0}.terrace-details button{white-space:normal!important;line-height:1.5;min-height:56px}.terrace-board button.selected{outline:3px solid #75508d;outline-offset:1px}.terrace-board button:focus-visible{outline:4px solid #433150;outline-offset:4px}@media(max-width:460px){.terrace-towers{grid-template-columns:repeat(2,minmax(0,1fr))}.terrace-letter{padding:14px}.terrace-fields,.terrace-details{grid-template-columns:1fr}.terrace-tools button{width:100%}.terrace-coins{gap:6px}.terrace-notebook{padding:10px 12px}}

.brook-board{color:#433150}.brook-village{display:block;width:min(100%,440px);height:auto;margin:12px auto}.brook-paths{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.brook-paths button{white-space:normal;min-width:0;line-height:1.6}.brook-card,.brook-quote{background:#fffdf6;border:2px solid #b29b76;padding:18px;border-radius:24px;max-width:640px;margin:12px auto;text-align:center}.brook-card p,.brook-quote p{font-size:clamp(1.25rem,2.5vw,1.5rem);line-height:1.8;margin:8px 0}.brook-quote{border-inline-start:8px solid #9877ad}.brook-stepper{display:flex;align-items:center;justify-content:center;gap:20px;margin:14px auto}.brook-stepper strong{font-size:1.7rem;background:#fffdf6;border:2px solid #b29b76;padding:9px 18px;border-radius:16px}.brook-album{display:grid;grid-template-columns:repeat(auto-fit,minmax(110px,1fr));gap:12px;margin:16px 0}.brook-album section{padding:12px;border:2px solid #a18a73;background:#fff1d8;border-radius:14px}.brook-album .brook-known{border:3px solid #76528e;background:#e6d6ef}.brook-album section>div{display:flex;gap:5px;flex-wrap:wrap;justify-content:center;margin-top:8px;min-height:30px}.brook-narrator{display:flex;gap:10px;flex-wrap:wrap;align-items:center;justify-content:center;max-width:640px;margin:15px auto;background:#fffdf6;padding:18px;border-radius:20px;border:2px solid #b29b76;font-size:1.2rem;line-height:1.8}.brook-board button:focus-visible{outline:4px solid #433150;outline-offset:4px}.brook-narrator button{white-space:normal;font-size:inherit}.brook-narrator span{overflow-wrap:anywhere}@media(max-width:450px){.brook-paths{grid-template-columns:1fr}.brook-card,.brook-quote{padding:14px}.brook-album{grid-template-columns:repeat(2,minmax(0,1fr))}.brook-narrator{padding:12px;gap:8px}}
/* Picture crops and the solver both number columns from the left. */
.game-dialog .swap-board{direction:ltr}
