
        :root, [data-theme="forest"] {
            --ink: #1d2540;
            --muted: #5a6683;
            --blue: #2d6cdf;
            --blue-bg: #e4eeff;
            --blue-glow: rgba(45, 108, 223, .28);
            --orange: #e8830c;
            --orange-bg: #fff0dc;
            --orange-glow: rgba(232, 131, 12, .3);
            --green: #12a05f;
            --green-bg: #e0f7ea;
            --green-glow: rgba(18, 160, 95, .3);
            --purple: #8e44ad;
            --purple-bg: #f1e6f8;
            --purple-glow: rgba(142, 68, 173, .3);
            --pink: #d6336c;
            --pink-bg: #fde6ee;
            --pink-glow: rgba(214, 51, 108, .3);
            --line: #d5dcee;
            /* Tema (Floresta é o padrão). Os outros temas trocam só estas variáveis: ver "Temas da loja" no fim. */
            --page-bg: linear-gradient(180deg, #d9f0ff 0%, #f6fbff 55%, #e6f7e1 100%);
            --surface: #fff;
            --surface-2: #f6f8ff;
            --surface-3: #e9eeff;
            --track: #e8ecf8;
            --locked-bg: #f1f3f8;
            --on-accent: #fff;
            --accent-text: var(--green);
            --ok-ink: #0d7a48;
            --warn-ink: #9a4a00;
            --focus: #1d2540;
            --tap-bg: #fffbe6;
            --gold: #f4c20d;
            --gold-bg: #fffbe6;
            --shadow: rgba(30, 50, 100, .08);
            --cel-bg: linear-gradient(#fffdf0, #fff1bd);
            --cel-ink: #1d2540;
            --cel-title: #b36b00;
            --font: 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
            --font-display: var(--font);
            --display-spacing: normal;
            /* árvore ilustrada */
            --tr-ground: #8ccf7a; --tr-trunk: #8a5a2b; --tr-stem: #7a4a21; --tr-sprout: #3dbb5e;
            --tr-l2: #2fa84f; --tr-l3: #3dbb5e; --tr-l4: #279a45; --tr-l5: #34b356; --tr-l6: #3dbb5e;
            --tr-dot: #6fd68a; --tr-dot2: #6fd68a; --tr-dot3: #6fd68a;
            --tr-fruit: #e53935; --tr-fruit-line: none; --tr-fruit-w: 0;
            color-scheme: light;
        }
        * { box-sizing: border-box; }
        [hidden] { display: none !important; }
        body {
            margin: 0;
            font-family: var(--font);
            color: var(--ink);
            background: var(--page-bg);
            background-attachment: var(--page-attach, scroll);
            min-height: 100vh;
            -webkit-tap-highlight-color: transparent;
        }
        .app { max-width: 1040px; margin: 0 auto; padding: 14px 12px 28px; }
        button { font: inherit; color: inherit; cursor: pointer; }
        button:focus-visible { outline: 4px solid var(--focus); outline-offset: 2px; }

        /* Cores por casa decimal: unidades, dezenas, centenas e milhares */
        .pl-1 { --c: var(--orange); --bg: var(--orange-bg); --glow: var(--orange-glow); }
        .pl-10 { --c: var(--blue); --bg: var(--blue-bg); --glow: var(--blue-glow); }
        .pl-100 { --c: var(--purple); --bg: var(--purple-bg); --glow: var(--purple-glow); }
        .pl-1000 { --c: var(--pink); --bg: var(--pink-bg); --glow: var(--pink-glow); }
        .source span, .prompt b[class*="pl-"] { color: var(--c); }

        /* Cabeçalho */
        .top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
        .brand { display: flex; align-items: center; gap: 10px; }
        .logo { font-size: 2.6rem; line-height: 1; animation: sway 4s ease-in-out infinite; transform-origin: 50% 90%; }
        h1 { margin: 0; font-size: clamp(1.4rem, 5vw, 2rem); font-family: var(--font-display); letter-spacing: var(--display-spacing); }
        .tagline { margin: 2px 0 0; color: var(--muted); font-size: .95rem; }
        .hud { display: flex; align-items: center; gap: 8px; }
        .pill { background: var(--surface); border: 2px solid var(--line); border-radius: 999px; padding: 6px 12px; font-weight: 800; font-size: 1.05rem; }
        .pill.bump { animation: pop .5s; }
        .icon-btn { width: 46px; height: 46px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); font-size: 1.3rem; }
        .icon-btn[aria-pressed="false"] { opacity: .55; }

        /* Níveis */
        .levels { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; }
        .level { flex: 0 0 auto; min-width: 58px; display: grid; justify-items: center; background: var(--surface); border: 3px solid var(--line); border-radius: 16px; padding: 6px 10px; font-weight: 800; line-height: 1.1; }
        .level b { font-size: 1.9rem; line-height: 1.15; }
        .level small { font-weight: 700; color: var(--muted); font-size: .7rem; min-height: .9em; }
        .level[aria-pressed="true"] { border-color: var(--green); background: var(--green-bg); }
        .level-desc { margin: 0 0 10px; font-weight: 700; color: var(--muted); }
        .climb { display: inline-block; margin-left: 12px; color: var(--accent-text); white-space: nowrap; }

        .panel { background: var(--surface); border: 2px solid var(--line); border-radius: 22px; padding: 14px; box-shadow: 0 8px 24px var(--shadow); }

        /* Layout */
        .game {
            display: grid; gap: 12px;
            grid-template-columns: minmax(0, 1fr);
            grid-template-areas: "board" "tree" "blocks";
        }
        .board { grid-area: board; min-width: 0; }
        .coach { grid-area: coach; }
        .pad { grid-area: pad; }
        .tree { grid-area: tree; }
        .blocks { grid-area: blocks; }
        @media (min-width: 860px) {
            .game {
                grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr);
                grid-template-areas: "board coach" "board tree" "board pad" "blocks blocks";
                align-items: start;
            }
        }

        /* Conta e progresso */
        .equation { text-align: center; font-size: clamp(1.8rem, 8vw, 3.2rem); font-weight: 800; font-family: var(--font-display); }
        .answer { display: inline-block; min-width: 1.6em; border-bottom: 5px solid var(--ink); color: var(--green); }
        .answer.revealed { animation: pop .6s; }
        .progress { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin: 8px 0 12px; }
        .progress i { width: 12px; height: 12px; border-radius: 50%; background: var(--line); transition: background .3s, transform .3s; }
        .progress i.now { background: var(--surface); border: 3px solid var(--green); transform: scale(1.25); }
        .progress i.on { background: var(--green); }

        /* Árvore da soma: grade + linhas desenhadas por JS entre os nós */
        .tree-scroll { overflow-x: auto; padding: 6px 14px 30px; margin: 0 -14px; }
        .tree-board {
            --colmin: 0px;
            position: relative; display: grid; justify-items: center; align-items: start;
            column-gap: 6px; row-gap: clamp(40px, 9vw, 60px);
        }
        .tree-board.k3, .tree-board.k4 { --colmin: 58px; }
        .tree-board.k3, .tree-board.k4 { row-gap: clamp(32px, 5vw, 46px); }
        .tree-board > * { position: relative; z-index: 1; }
        .tree-board > .edges { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; overflow: visible; }
        .source {
            font: inherit; font-size: clamp(2.2rem, 9vw, 3.4rem); font-weight: 800; line-height: 1.1;
            color: var(--ink); background: none; border: 3px solid transparent; border-radius: 18px; padding: 2px 14px; cursor: default;
        }
        .tree-board.k3 .source, .tree-board.k4 .source { font-size: clamp(1.8rem, 6vw, 2.6rem); }
        .tree-board > .plus { position: absolute; left: 50%; top: 6px; transform: translateX(-50%); font-size: clamp(1.8rem, 7vw, 2.6rem); font-weight: 800; color: var(--muted); }
        .edge { fill: none; stroke: var(--c); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset .5s ease-out; }
        .edge.grown { stroke-dashoffset: 0; }

        /* Caixas de resposta */
        .box {
            --c: var(--green); --bg: var(--green-bg); --glow: var(--green-glow);
            width: clamp(54px, 15vw, 88px); height: clamp(54px, 14vw, 76px);
            display: grid; place-items: center;
            position: relative;
            border-radius: 16px; border: 3px dashed var(--c); background: var(--surface);
            font-size: clamp(1.5rem, 6vw, 2.3rem); font-weight: 800; color: var(--ink);
            transition: opacity .2s, background .2s;
        }
        .tree-board.k3 .box, .tree-board.k4 .box { width: 64px; height: 60px; font-size: 1.35rem; }
        .box.pl-1 { --c: var(--orange); --bg: var(--orange-bg); --glow: var(--orange-glow); }
        .box.pl-10 { --c: var(--blue); --bg: var(--blue-bg); --glow: var(--blue-glow); }
        .box.pl-100 { --c: var(--purple); --bg: var(--purple-bg); --glow: var(--purple-glow); }
        .box.pl-1000 { --c: var(--pink); --bg: var(--pink-bg); --glow: var(--pink-glow); }
        .box.locked { opacity: .4; border-style: dotted; }
        .box.active { border-style: solid; background: var(--bg); animation: glow 1.4s ease-in-out infinite; }
        .box.active:empty::after { content: '?'; opacity: .35; }
        .box.ok { border-style: solid; background: var(--bg); animation: pop .45s; }
        .box.shake { animation: shake .4s; }

        .node {
            --c: var(--green); --bg: var(--green-bg);
            display: flex; flex-direction: column; align-items: center; gap: 4px;
            padding: 8px 12px 10px; border-radius: 16px; background: var(--bg);
        }
        .node.pl-1 { --c: var(--orange); --bg: var(--orange-bg); }
        .node.pl-10 { --c: var(--blue); --bg: var(--blue-bg); }
        .node.pl-100 { --c: var(--purple); --bg: var(--purple-bg); }
        .node.pl-1000 { --c: var(--pink); --bg: var(--pink-bg); }
        .node.final-node { width: max-content; }
        .row-label { font-size: .72rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); text-align: center; }
        .expr { font-size: clamp(1.15rem, 4.6vw, 1.8rem); font-weight: 800; white-space: nowrap; }
        .tree-board.k3 .expr { font-size: 1.1rem; }
        .tree-board.k4 .expr { font-size: 1rem; }

        /* Partes que "crescem" quando a criança toca */
        .box[data-grow]:not(.grown), .node:not(.grown) { visibility: hidden; opacity: 0; }

        /* Alvo de toque: brilha e mostra a mãozinha */
        .source.tap, .box.tap {
            --glow: rgba(244, 194, 13, .55);
            cursor: pointer; border-style: solid; border-color: var(--ink); background: var(--tap-bg); opacity: 1;
            animation: glow 1.2s ease-in-out infinite;
        }
        .source.tap::after, .box.tap::before {
            content: '👆'; position: absolute; right: -8px; bottom: -20px; font-size: 1.6rem; line-height: 1;
            animation: poke .9s ease-in-out infinite; pointer-events: none; z-index: 2;
        }
        .box.linked { border-style: solid; box-shadow: 0 0 0 4px var(--green-glow); }
        .box.entering, .node.entering { animation: growin .45s .3s backwards; }

        /* Ajudante */
        .coach { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; align-items: center; }
        .mascot { font-size: 3.4rem; line-height: 1; }
        .mascot.bounce { animation: bounce .7s; }
        .mascot.wiggle { animation: wiggle .6s; }
        .prompt { margin: 0; font-size: 1.2rem; font-weight: 700; line-height: 1.3; }
        .bubble { margin: 6px 0 0; font-weight: 700; color: var(--muted); min-height: 1.4em; }
        .bubble.happy, .bubble.cheer { color: var(--ok-ink); }
        .bubble.think, .bubble.oops { color: var(--warn-ink); }
        .coach-actions, .result { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; justify-content: center; }
        .result { flex-direction: column; }
        .btn { background: var(--surface); border: 2px solid var(--line); border-radius: 14px; padding: 10px 16px; font-weight: 800; }
        .btn.primary { background: var(--green); border-color: var(--green); color: var(--on-accent); }
        .btn.big { font-size: 1.3rem; padding: 14px 24px; animation: glow 1.4s ease-in-out infinite; --glow: var(--green-glow); }
        .stars { display: flex; gap: 6px; font-size: 2.6rem; }
        .star { filter: grayscale(1); opacity: .3; transition: opacity .2s; }
        .star.on { filter: none; opacity: 1; animation: pop .55s; }
        .result-msg { margin: 0; font-weight: 800; font-size: 1.1rem; text-align: center; }

        /* Árvore ilustrada */
        .tree { text-align: center; }
        .treesvg { width: 100%; max-width: 230px; height: auto; display: block; margin: 0 auto; }
        .tl { opacity: 0; transform: scale(.2); transform-box: fill-box; transform-origin: 50% 50%; transition: opacity .4s, transform .7s cubic-bezier(.3, 1.5, .5, 1); }
        .tl.trunk { transform-origin: 50% 100%; }
        .tl.on { opacity: 1; transform: scale(1); }
        .apple { opacity: 0; transform: scale(0); transform-box: fill-box; transform-origin: 50% 50%; transition: opacity .3s, transform .5s cubic-bezier(.3, 1.8, .5, 1); }
        .apple.on { opacity: 1; transform: scale(1); }
        /* cores da árvore vêm do tema (o CSS vence os atributos fill/stroke do SVG) */
        .treesvg > ellipse { fill: var(--tr-ground); }
        #seed path { stroke: var(--tr-stem); }
        #seed ellipse { fill: var(--tr-sprout); }
        #t1 path { fill: var(--tr-trunk); }
        #t2 path, #t3 path { stroke: var(--tr-trunk); }
        #t2 circle { fill: var(--tr-l2); }
        #t3 circle { fill: var(--tr-l3); }
        #t4 circle { fill: var(--tr-l4); }
        #t5 circle { fill: var(--tr-l5); }
        #t6 circle { fill: var(--tr-l6); }
        #t7 circle { fill: var(--tr-dot); }
        #t7 circle:nth-child(3n+2) { fill: var(--tr-dot2); }
        #t7 circle:nth-child(3n) { fill: var(--tr-dot3); }
        .apple { fill: var(--tr-fruit); stroke: var(--tr-fruit-line); stroke-width: var(--tr-fruit-w); }
        .tree-cap { margin: 4px 0 0; font-weight: 800; color: var(--muted); }

        /* Teclado */
        .padgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
        .padgrid button { min-height: 58px; border-radius: 16px; border: 2px solid var(--line); background: var(--surface-2); font-size: 1.7rem; font-weight: 800; touch-action: manipulation; transition: transform .08s; }
        .padgrid button:active { transform: scale(.94); background: var(--surface-3); }
        .padgrid .ok-key { background: var(--green); border-color: var(--green); color: var(--on-accent); }
        .padgrid .del-key { font-size: 1.4rem; }
        .pad.off { opacity: .35; pointer-events: none; }

        /* Bloquinhos */
        .blocks h2 { margin: 0 0 8px; font-size: 1.05rem; }
        .blocks-empty { margin: 0; color: var(--muted); }
        .brow { display: flex; align-items: flex-end; gap: 12px; padding: 8px 0; border-top: 1px dashed var(--line); }
        .blocks h2 + p + .brow { border-top: 0; }
        .blabel { min-width: 74px; font-weight: 800; font-size: .95rem; color: var(--muted); }
        .bitems { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px 10px; }
        .bgroup { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px; padding-right: 10px; border-right: 2px dashed var(--line); }
        .bgroup:last-child { border-right: 0; }
        .bzero { color: var(--muted); font-weight: 800; }
        .blk { display: inline-block; animation: pop .35s both; animation-delay: calc(var(--i, 0) * 35ms); }
        .blk.merge { animation: mergeout .45s forwards; }
        .cube { width: 14px; height: 14px; border-radius: 3px; background: var(--orange); }
        .bar { width: 14px; height: 56px; border-radius: 3px; border: 1px solid var(--blue); background: repeating-linear-gradient(to bottom, var(--blue) 0 4.6px, #fff 4.6px 5.6px); }
        .plate { width: 56px; height: 56px; border-radius: 4px; background-color: var(--purple); background-image: linear-gradient(#fff 1px, transparent 1px), linear-gradient(90deg, #fff 1px, transparent 1px); background-size: 5.6px 5.6px; }
        .kilo { width: 56px; height: 56px; border-radius: 8px; background: linear-gradient(135deg, #ec5b8f, var(--pink)); border: 2px solid #a8254f; box-shadow: 3px 3px 0 #a8254f; }
        .bnote { margin: 6px 0 0; font-weight: 800; color: var(--warn-ink); }

        footer { margin-top: 16px; text-align: center; color: var(--muted); font-size: .9rem; display: grid; gap: 8px; justify-items: center; }
        .link-btn { background: none; border: 0; text-decoration: underline; color: var(--blue); font-weight: 700; padding: 6px; }

        canvas#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 50; }

        /* Animações */
        @keyframes pop { 0% { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.18); opacity: 1; } 100% { transform: scale(1); } }
        @keyframes growin { from { opacity: 0; transform: scale(.5); } to { opacity: 1; transform: scale(1); } }
        @keyframes mergeout { from { transform: scale(1); opacity: 1; } to { transform: scale(.2); opacity: 0; } }
        @keyframes shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-8px); } 40% { transform: translateX(8px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(5px); } }
        @keyframes glow { 0%, 100% { box-shadow: 0 0 0 0 var(--glow); } 50% { box-shadow: 0 0 0 9px var(--glow); } }
        @keyframes bounce { 0%, 100% { transform: translateY(0); } 30% { transform: translateY(-16px) rotate(-6deg); } 60% { transform: translateY(0) rotate(5deg); } }
        @keyframes wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-9deg); } 75% { transform: rotate(9deg); } }
        @keyframes sway { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
        @keyframes poke { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-5px, -9px); } }
        @media (prefers-reduced-motion: reduce) {
            *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
        }

        /* Folha para imprimir */
        #sheet { display: none; }
        @media print {
            body { background: #fff; }
            .app, canvas#confetti { display: none !important; }
            #sheet { display: block; padding: 10mm; font-size: 13pt; color: #000; }
            #sheet h2 { margin: 0 0 4mm; }
            #sheet .item { break-inside: avoid; margin-bottom: 6mm; padding-bottom: 4mm; border-bottom: 1px dashed #888; line-height: 1.8; }
            #sheet .eq { font-size: 17pt; font-weight: 700; }
        }

        /* ---------- Idioma e toque ---------- */
        .lang-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 999px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 800; font-size: .9rem; text-decoration: none; }
        .lang-link:focus-visible { outline: 4px solid var(--focus); outline-offset: 2px; }
        .link-btn { min-height: 44px; }
        /* barra do topo: os botões quebram de linha em vez de estourar a largura do celular */
        .hud { flex-wrap: wrap; justify-content: flex-end; }

        /* ---------- Janelinhas: nome do jogador e ranking ---------- */
        .sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); border: 0; white-space: nowrap; }
        .player-pill { cursor: pointer; max-width: 11rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-height: 44px; }
        .dlg { border: 0; border-radius: 22px; padding: 20px; width: min(92vw, 440px); box-shadow: 0 20px 60px rgba(20, 30, 70, .35); color: var(--ink); font: inherit; background: var(--surface); }
        .dlg::backdrop { background: rgba(20, 30, 70, .5); }
        .dlg h2 { margin: 0 0 6px; font-size: 1.45rem; }
        .dlg p { margin: 0 0 8px; }
        .dlg input { width: 100%; font: inherit; font-size: 1.25rem; padding: 12px 14px; border: 3px solid var(--line); border-radius: 14px; margin: 6px 0 12px; background: var(--surface); color: var(--ink); }
        .dlg input:focus { outline: none; border-color: var(--blue); }
        .dlg-actions { display: flex; gap: 8px; flex-wrap: wrap; }
        .dlg-actions .btn { flex: 1 1 130px; }
        .dlg-sub { margin: 16px 0 6px; font-weight: 800; color: var(--muted); }
        .pick-list { display: flex; flex-wrap: wrap; gap: 8px; }
        .pick { min-height: 44px; padding: 8px 14px; border-radius: 999px; border: 2px solid var(--line); background: var(--surface-2); font-weight: 800; }
        .pick:hover { border-color: var(--blue); }
        .dlg-note { margin: 14px 0 0; color: var(--muted); font-size: .85rem; }
        .rank-list { list-style: none; margin: 10px 0; padding: 0; display: grid; gap: 6px; }
        .rank-row { display: grid; grid-template-columns: 2.4rem 1fr auto auto; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 12px; background: var(--surface-2); font-weight: 700; }
        .rank-row.me { background: var(--green-bg); box-shadow: inset 0 0 0 2px var(--green); }
        .rk-pos { text-align: center; font-size: 1.2rem; }
        .rk-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .rk-lv { color: var(--muted); font-size: .85rem; }
        .rk-pts { font-weight: 800; }
        .rank-empty { color: var(--muted); margin: 14px 0; }

        .dlg h3 { margin: 0 0 4px; font-size: 1.1rem; }
        .dlg hr { border: 0; border-top: 2px dashed var(--line); margin: 16px 0; }
        .dlg-link { margin: 12px 0 0; }
        .code-box { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 8px 0; }
        .code-value { flex: 1 1 auto; font: 800 1.5rem ui-monospace, Consolas, monospace; letter-spacing: .08em; padding: 10px 12px; border-radius: 12px; background: var(--green-bg); border: 2px solid var(--green); text-align: center; user-select: all; }
        .code-msg { min-height: 1.4em; margin: 10px 0 0; font-weight: 700; color: var(--warn-ink); }
        .code-msg.ok { color: var(--ok-ink); }
        .rank-offline { margin: 8px 0 0; color: var(--warn-ink); font-weight: 700; font-size: .9rem; }
        .rank-total { margin: 4px 0 0; color: var(--muted); font-size: .85rem; text-align: right; }

        /* ---------- Prêmios (figurinhas) ---------- */
        .icon-btn { position: relative; }
        .icon-btn[data-new]::after { content: attr(data-new); position: absolute; top: -5px; right: -5px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--pink); color: #fff; font-size: .72rem; font-weight: 800; display: grid; place-items: center; }
        .dlg-wide { width: min(94vw, 580px); }
        .awards-count { margin: 0; font-weight: 800; color: var(--muted); }
        .awards { list-style: none; margin: 10px 0; padding: 6px 2px 2px; display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; max-height: 52vh; overflow: auto; }
        .award { position: relative; display: grid; justify-items: center; align-content: start; gap: 2px; text-align: center; padding: 10px 6px 8px; border-radius: 14px; background: var(--surface-2); border: 2px solid var(--line); }
        .award.got { background: var(--gold-bg); border-color: var(--gold); }
        .award.locked { opacity: .75; border-style: dashed; }
        .award.locked .aw-emoji { filter: grayscale(1); opacity: .6; }
        .award.new { animation: glow 1.4s ease-in-out infinite; --glow: rgba(244, 194, 13, .5); }
        .aw-emoji { font-size: 2.3rem; line-height: 1.1; }
        .aw-name { font-weight: 800; font-size: .85rem; line-height: 1.15; }
        .aw-desc { font-size: .72rem; color: var(--muted); line-height: 1.2; }
        .aw-badge { position: absolute; top: -7px; right: -4px; background: var(--green); color: var(--on-accent); font-size: .65rem; font-weight: 800; padding: 2px 7px; border-radius: 999px; }
        .toast { position: fixed; top: 12px; left: 50%; z-index: 60; transform: translate(-50%, -160%); max-width: 92vw; text-align: center; padding: 12px 20px; border-radius: 999px; background: var(--ink); color: var(--surface); font-weight: 800; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); }
        .toast.in { animation: toastIn .35s ease-out forwards; }
        .toast.out { animation: toastOut .35s ease-in forwards; }
        @keyframes toastIn { from { transform: translate(-50%, -160%); } to { transform: translate(-50%, 0); } }
        @keyframes toastOut { from { transform: translate(-50%, 0); } to { transform: translate(-50%, -160%); } }

        /* Níveis: bloqueados até a criança chegar neles; o recém-liberado pisca */
        .level:disabled { opacity: .55; cursor: not-allowed; background: var(--locked-bg); border-style: dashed; }
        .level.new { border-color: var(--green); animation: glow 1.4s ease-in-out infinite; --glow: var(--green-glow); }

        /* Painel do ajudante + teclado: no computador fica nas colunas da grade; no celular fica fixo no rodapé */
        .dock { display: contents; }

        @keyframes dockIn { from { transform: translateY(18px); opacity: 0; } to { transform: none; opacity: 1; } }

        @media (min-width: 860px) {
            .game { grid-template-areas: "board coach" "board pad" "board tree" "board ." "blocks blocks"; grid-template-rows: auto auto auto 1fr auto; }
        }

        /* ---------- Celular e tablet pequeno ---------- */
        @media (max-width: 859px) {
            .app { padding-bottom: calc(24px + var(--dock-h, 0px)); }
            html { scroll-padding-bottom: calc(var(--dock-h, 0px) + 14px); scroll-padding-top: 12px; }
            .dock {
                display: flex; flex-direction: column; gap: 6px;
                position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
                max-width: 640px; margin: 0 auto; padding: 8px 10px 10px;
                background: var(--surface); border-top: 2px solid var(--line); border-radius: 18px 18px 0 0;
                box-shadow: 0 -8px 22px rgba(30, 50, 100, .18);
            }
            .dock .panel { border: 0; box-shadow: none; border-radius: 0; padding: 0; background: none; }
            .coach { grid-template-columns: auto 1fr auto; gap: 2px 8px; }
            .mascot { font-size: 2.3rem; }
            .prompt { font-size: 1.05rem; line-height: 1.25; }
            .bubble { margin: 2px 0 0; font-size: .88rem; min-height: 1.1em; }
            .coach-actions { grid-column: 3; grid-row: 1; }
            .btn { min-height: 44px; padding: 8px 12px; }
            .result { grid-column: 1 / -1; }
            .stars { font-size: 2rem; }
            .btn.big { width: 100%; font-size: 1.15rem; padding: 10px 20px; }
            .padgrid { grid-template-columns: repeat(6, 1fr); gap: 6px; }
            .padgrid button { min-height: 46px; font-size: 1.3rem; order: var(--om, 0); }
            .pad.off, .pad.done { display: none; }
            .pad:not(.off):not(.done) { animation: dockIn .22s ease-out; }

            .levels { display: grid; grid-template-columns: repeat(4, 1fr); overflow: visible; padding-bottom: 4px; }
            .level { min-width: 0; min-height: 48px; padding: 6px 4px; }

            .tree-board.k3, .tree-board.k4 { --colmin: 54px; }
            .tree-board.k3 .box, .tree-board.k4 .box { width: 52px; height: 50px; font-size: 1.15rem; }
            .tree-board.k3 .source, .tree-board.k4 .source { font-size: 1.7rem; }
            .tree-board.k3 .expr { font-size: 1rem; }
            .tree-board.k4 .expr { font-size: .9rem; }
        }

        /* ---------- Figurinhas ganhas, à vista durante o jogo ---------- */
        .stickers { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 8px; margin: 0 0 4px; }
        .stickers:empty { display: none; }
        .sticker { flex: 0 0 auto; width: 46px; height: 46px; padding: 0; display: grid; place-items: center; border-radius: 50%; border: 2px solid var(--gold); background: var(--gold-bg); font-size: 1.6rem; line-height: 1; cursor: pointer; box-shadow: 0 2px 6px rgba(0, 0, 0, .12); }
        .sticker:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
        .sticker.fly { animation: stickerFly 1.5s cubic-bezier(.2, .8, .2, 1) var(--fd, 0s) both; z-index: 5; }
        @keyframes stickerFly {
            from { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(3.2) rotate(0deg); }
            15% { opacity: 1; }
            to { opacity: 1; transform: translate(0, 0) scale(1) rotate(var(--r, 0deg)); }
        }
        @keyframes stickerBob {
            0%, 100% { transform: rotate(var(--r, 0deg)) translateY(0); }
            50% { transform: rotate(var(--r, 0deg)) translateY(-7px); }
        }
        /* tela larga: as figurinhas ficam soltas nas margens, dos dois lados da página */
        @media (min-width: 1240px) {
            .stickers { display: block; height: 0; padding: 0; margin: 0; overflow: visible; }
            .stickers:empty { display: block; }
            .sticker { position: fixed; top: var(--y); width: clamp(44px, min(4.4vw, 6.2vh), 72px); height: clamp(44px, min(4.4vw, 6.2vh), 72px); font-size: clamp(1.5rem, min(2.8vw, 4vh), 2.7rem); transform: rotate(var(--r, 0deg)); animation: stickerBob 4.5s ease-in-out var(--d, 0s) infinite; }
            .sticker.fly { animation: stickerFly 1.5s cubic-bezier(.2, .8, .2, 1) var(--fd, 0s) both; }
            .sticker.l { left: calc((100vw - 1040px) / 2 * var(--fx)); }
            .sticker.r { right: calc((100vw - 1040px) / 2 * var(--fx)); }
        }
        .sticker-tip { position: fixed; z-index: 70; width: max-content; max-width: min(260px, 90vw); transform: translateX(-50%); padding: 8px 12px; border-radius: 12px; background: var(--ink); color: var(--surface); font-size: .85rem; font-weight: 700; line-height: 1.25; text-align: center; box-shadow: 0 8px 24px rgba(0, 0, 0, .3); pointer-events: none; }
        .sticker-tip[hidden] { display: none; }
        .sticker-tip b { font-size: .95rem; }

        /* ---------- Comemoração de prêmio e meta ---------- */
        .sticker.wait { visibility: hidden; }
        canvas#confetti { z-index: 90; }
        .celebrate { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; background: rgba(20, 30, 70, .6); }
        .celebrate[hidden] { display: none; }
        .cel-card { position: relative; width: min(92vw, 380px); padding: 24px 20px 22px; border-radius: 28px; background: var(--cel-bg); color: var(--cel-ink); text-align: center; box-shadow: 0 24px 70px rgba(0, 0, 0, .45); overflow: hidden; }
        .celebrate.in .cel-card { animation: celPop .6s cubic-bezier(.2, 1.4, .4, 1) both; }
        .cel-rays { position: absolute; left: 50%; top: 150px; width: 560px; height: 560px; margin: -280px 0 0 -280px; border-radius: 50%; background: repeating-conic-gradient(rgba(244, 194, 13, .38) 0 10deg, transparent 10deg 20deg); -webkit-mask-image: radial-gradient(circle, #000 15%, transparent 68%); mask-image: radial-gradient(circle, #000 15%, transparent 68%); animation: celSpin 16s linear infinite; }
        .cel-title { position: relative; margin: 0; font-weight: 900; font-size: 1.15rem; color: var(--cel-title); }
        .cel-emoji { position: relative; margin: 8px 0 2px; font-size: 5.6rem; line-height: 1.15; animation: celBounce 1.1s ease-in-out infinite; }
        .cel-emoji.many { font-size: 2.6rem; word-spacing: .12em; }
        .cel-name { position: relative; margin: 0; font-weight: 900; font-size: 1.5rem; }
        .cel-desc { position: relative; margin: 4px 0 16px; font-weight: 700; color: var(--muted); }
        .cel-card .btn { position: relative; }
        @keyframes celPop { from { opacity: 0; transform: scale(.4) rotate(-6deg); } to { opacity: 1; transform: scale(1) rotate(0); } }
        @keyframes celSpin { to { transform: rotate(360deg); } }
        @keyframes celBounce { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-8px) scale(1.07); } }
        .goal { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; padding: 6px 12px; border-radius: 14px; background: var(--surface); border: 2px solid var(--line); font-weight: 800; font-size: .85rem; }
        .goal[hidden] { display: none; }
        .goal-icon { font-size: 1.15rem; }
        .goal-text { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .goal-bar { flex: 1 1 56px; min-width: 48px; height: 12px; border-radius: 999px; background: var(--track); overflow: hidden; }
        .goal-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #f4c20d, #e8830c); transition: width .8s ease; }
        .goal-n { color: var(--muted); font-variant-numeric: tabular-nums; }
        .goal.all .goal-bar { display: none; }

        /* ---------- Temas da loja (Floresta é o :root lá em cima) ---------- */
        /* As cores das casas decimais (unidade laranja, dezena azul, centena roxa, milhar rosa) são as mesmas em todos
           os temas; o Espaço só as clareia para manter o contraste no fundo escuro. */
        [data-theme="ocean"] {
            --ink: #0f2a3d; --muted: #47667a; --line: #bfe1ea;
            --surface: #fff; --surface-2: #eef9fc; --surface-3: #d9f1f7; --track: #d7edf3; --locked-bg: #e8f4f7;
            --green: #0a7c86; --green-bg: #dcf4f4; --green-glow: rgba(10, 124, 134, .3);
            --accent-text: #0a7c86; --ok-ink: #0a6b73; --focus: #0f2a3d;
            --tap-bg: #fff8d6; --gold: #f2b705; --gold-bg: #fff8d6; --shadow: rgba(10, 70, 100, .1);
            --cel-bg: linear-gradient(#f2fdff, #c8eff6); --cel-ink: #0f2a3d; --cel-title: #0a6b73;
            --font-display: Verdana, 'Segoe UI', system-ui, sans-serif;
            --page-attach: fixed;
            --page-bg:
                radial-gradient(circle at 8% 22%, transparent 0 9px, rgba(255, 255, 255, .9) 10px 12px, transparent 13px),
                radial-gradient(circle at 93% 38%, transparent 0 6px, rgba(255, 255, 255, .85) 7px 9px, transparent 10px),
                radial-gradient(circle at 88% 70%, transparent 0 11px, rgba(255, 255, 255, .7) 12px 14px, transparent 15px),
                radial-gradient(circle at 5% 64%, transparent 0 5px, rgba(255, 255, 255, .8) 6px 8px, transparent 9px),
                url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M0 55 Q150 15 300 55 T600 55 T900 55 T1200 55 V120 H0Z' fill='%2387d3e6' fill-opacity='.55'/%3E%3Cpath d='M0 82 Q150 48 300 82 T600 82 T900 82 T1200 82 V120 H0Z' fill='%234fb6d2' fill-opacity='.5'/%3E%3C/svg%3E") bottom / 100% 130px no-repeat,
                linear-gradient(180deg, #c2efff 0%, #e9fbff 48%, #b6e5ee 100%);
            --tr-ground: #f1d79c; --tr-trunk: #e2725b; --tr-stem: #c65a46; --tr-sprout: #2bbbad;
            --tr-l2: #19a7a0; --tr-l3: #2bbbad; --tr-l4: #138f8f; --tr-l5: #22b0a8; --tr-l6: #34c6b6;
            --tr-dot: #c9f7ef; --tr-dot2: #ffffff; --tr-dot3: #a6ecf5;
            --tr-fruit: #fbf8ff; --tr-fruit-line: #7fa6d6; --tr-fruit-w: 2.5;
        }
        [data-theme="candy"] {
            --ink: #3a1d34; --muted: #7a4a6b; --line: #f0c4da;
            --surface: #fffafd; --surface-2: #fff0f7; --surface-3: #ffe0ee; --track: #f7dcea; --locked-bg: #fbe9f2;
            --green: #a8307a; --green-bg: #fbe3f0; --green-glow: rgba(168, 48, 122, .3);
            --accent-text: #a8307a; --ok-ink: #8a2463; --focus: #3a1d34;
            --tap-bg: #fff6c9; --gold: #f0b400; --gold-bg: #fff6d6; --shadow: rgba(160, 40, 110, .1);
            --cel-bg: linear-gradient(#fff6fb, #ffd3ea); --cel-ink: #3a1d34; --cel-title: #a8307a;
            --font-display: ui-rounded, 'Arial Rounded MT Bold', 'Segoe UI', system-ui, sans-serif;
            --page-attach: fixed;
            --page-bg:
                radial-gradient(circle, rgba(255, 255, 255, .8) 0 5px, transparent 6px) 0 0 / 44px 44px,
                radial-gradient(circle, rgba(255, 150, 200, .35) 0 4px, transparent 5px) 22px 22px / 44px 44px,
                linear-gradient(180deg, #ffe0f0 0%, #fff3f9 52%, #efe2ff 100%);
            --tr-ground: #ffc9e2; --tr-trunk: #7b4a2e; --tr-stem: #7b4a2e; --tr-sprout: #ff8fc6;
            --tr-l2: #ff9ecf; --tr-l3: #c9a7ff; --tr-l4: #ff7fbf; --tr-l5: #b892ff; --tr-l6: #ffb3d9;
            --tr-dot: #ffffff; --tr-dot2: #7fe0c8; --tr-dot3: #ffe066;
            --tr-fruit: #e0245e; --tr-fruit-line: #fff; --tr-fruit-w: 1.5;
        }
        [data-theme="space"] {
            --ink: #eef1ff; --muted: #b3bce6; --line: #34407a;
            --surface: #161e43; --surface-2: #212a5a; --surface-3: #2b3670; --track: #2a3366; --locked-bg: #1b2250;
            --green: #3ccf91; --green-bg: #173b3a; --green-glow: rgba(60, 207, 145, .35);
            --orange: #ffab4a; --orange-bg: #3d2c1c; --orange-glow: rgba(255, 171, 74, .35);
            --blue: #7fb0ff; --blue-bg: #1d2f5e; --blue-glow: rgba(127, 176, 255, .35);
            --purple: #c49bff; --purple-bg: #33255e; --purple-glow: rgba(196, 155, 255, .35);
            --pink: #ff86b7; --pink-bg: #4a2140; --pink-glow: rgba(255, 134, 183, .35);
            --on-accent: #0b1230; --accent-text: #3ccf91; --ok-ink: #5be0a6; --warn-ink: #ffc46b; --focus: #ffd54a;
            --tap-bg: #3a3466; --gold: #e8b923; --gold-bg: #2f2a4f; --shadow: rgba(0, 0, 0, .35);
            --cel-bg: linear-gradient(#2c2868, #17164a); --cel-ink: #eef1ff; --cel-title: #ffd54a;
            --font-display: 'Trebuchet MS', 'Segoe UI', system-ui, sans-serif; --display-spacing: .03em;
            --page-attach: fixed;
            --page-bg:
                radial-gradient(circle at 20% 30%, #fff 0 1px, transparent 2px) 0 0 / 180px 180px,
                radial-gradient(circle at 70% 62%, #cfd8ff 0 1.2px, transparent 2.2px) 0 0 / 180px 180px,
                radial-gradient(circle at 45% 85%, #fff 0 .8px, transparent 1.8px) 0 0 / 120px 120px,
                radial-gradient(circle at 85% 15%, #ffe9a8 0 1.5px, transparent 2.5px) 0 0 / 260px 260px,
                radial-gradient(ellipse at 88% -10%, rgba(124, 92, 255, .45), transparent 55%),
                radial-gradient(ellipse at 0% 110%, rgba(60, 207, 145, .18), transparent 50%),
                linear-gradient(180deg, #0b1230 0%, #131a45 55%, #1b1650 100%);
            --tr-ground: #2b2470; --tr-trunk: #9b8fd6; --tr-stem: #9b8fd6; --tr-sprout: #6a5cff;
            --tr-l2: #5b4ad6; --tr-l3: #3f7fe0; --tr-l4: #7a4fd8; --tr-l5: #3b9bd9; --tr-l6: #6a5cff;
            --tr-dot: #ffffff; --tr-dot2: #ffe9a8; --tr-dot3: #bfe3ff;
            --tr-fruit: #ffd54a; --tr-fruit-line: #ff9f1c; --tr-fruit-w: 2;
            color-scheme: dark;
        }
        [data-theme="space"] .dlg::backdrop { background: rgba(0, 0, 0, .6); }
        [data-theme="space"] .bar { background: repeating-linear-gradient(to bottom, var(--blue) 0 4.6px, #1d2f5e 4.6px 5.6px); }
        [data-theme="space"] .plate { background-image: linear-gradient(#33255e 1px, transparent 1px), linear-gradient(90deg, #33255e 1px, transparent 1px); }

        /* ---------- Moedas e loja ---------- */
        .coin-ico {
            display: inline-block; flex: 0 0 auto; width: 1em; height: 1em; border-radius: 50%; vertical-align: -.15em;
            background: radial-gradient(circle at 34% 30%, #fff7c2 0 14%, transparent 15%), radial-gradient(circle, #ffd84a 0 50%, #f0ae00 51% 62%, #ffd84a 63% 100%);
            box-shadow: inset 0 0 0 .08em #c98a00, 0 1px 0 rgba(0, 0, 0, .15);
        }
        .coin-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; border-color: var(--gold); background: var(--gold-bg); color: var(--ink); font-variant-numeric: tabular-nums; }
        .coin-btn:hover { border-color: var(--green); }
        .coin-shop { display: inline-flex; align-items: center; gap: 4px; margin-left: 2px; padding-left: 8px; border-left: 2px solid var(--gold); font-size: .92rem; }
        .coin-fly {
            position: fixed; left: 0; top: 0; z-index: 95; pointer-events: none;
            display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px;
            font-weight: 900; font-size: 1.1rem; color: var(--ink); background: var(--gold-bg); border: 2px solid var(--gold);
            box-shadow: 0 4px 12px rgba(0, 0, 0, .18); animation: coinFly .9s cubic-bezier(.45, 0, .2, 1) forwards;
        }
        @keyframes coinFly {
            0% { transform: translate(var(--x0), var(--y0)) scale(.6); opacity: 0; }
            20% { transform: translate(var(--x0), calc(var(--y0) - 22px)) scale(1.1); opacity: 1; }
            100% { transform: translate(var(--x1), var(--y1)) scale(.75); opacity: .15; }
        }
        .coin-msg { margin: 0; display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-weight: 800; background: var(--gold-bg); border: 2px solid var(--gold); }
        .box.boom { animation: boom .5s ease-out; }
        @keyframes boom { 0% { transform: scale(1); } 35% { transform: scale(1.22); filter: brightness(1.2); } 100% { transform: scale(1); } }

        .shop-dlg { width: min(94vw, 680px); }
        .shop-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
        .dlg .shop-head h2 { margin: 0; }
        .dlg .shop-balance { margin: 0; display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; font-weight: 900; font-size: 1.1rem; background: var(--gold-bg); border: 2px solid var(--gold); font-variant-numeric: tabular-nums; }
        .dlg .shop-how { margin: 10px 0 12px; color: var(--muted); font-size: .9rem; font-weight: 600; }
        .shop-tabs { display: flex; gap: 6px; padding: 4px; border-radius: 16px; background: var(--surface-2); border: 2px solid var(--line); }
        .shop-tab { flex: 1 1 0; min-height: 46px; border: 0; border-radius: 12px; background: transparent; font-weight: 800; font-size: 1.02rem; color: var(--muted); }
        .shop-tab[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 2px 8px var(--shadow), inset 0 -4px 0 var(--green); }
        .shop-panel { margin-top: 12px; }
        .shop-grid { list-style: none; margin: 0; padding: 2px; display: grid; grid-template-columns: repeat(auto-fill, minmax(136px, 1fr)); gap: 10px; }
        .shop-item { display: grid; grid-template-rows: auto auto 1fr auto auto; gap: 4px; padding: 8px; border-radius: 16px; background: var(--surface-2); border: 2px solid var(--line); }
        .shop-item.equipped { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-glow); }
        .dlg .si-name { margin: 4px 0 0; font-weight: 900; font-size: 1rem; line-height: 1.2; }
        .dlg .si-desc { margin: 0; font-size: .8rem; font-weight: 600; color: var(--muted); line-height: 1.25; }
        .dlg .si-state { margin: 2px 0 0; display: flex; align-items: center; gap: 5px; min-height: 1.5em; font-weight: 800; font-size: .88rem; font-variant-numeric: tabular-nums; }
        .si-state.on { color: var(--ok-ink); }
        .si-actions { display: flex; flex-wrap: wrap; gap: 6px; }
        .si-actions .btn { flex: 1 1 auto; min-height: 44px; padding: 6px 10px; font-size: .92rem; display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
        .si-actions .btn.buy { background: var(--gold-bg); border-color: var(--gold); }
        .si-actions .btn[aria-disabled="true"] { opacity: .8; border-style: dashed; color: var(--muted); }
        .shop-item.confirm .si-actions .btn { flex-basis: 100%; }
        .theme-prev {
            position: relative; height: 92px; padding: 8px; border-radius: 12px; overflow: hidden; border: 2px solid var(--line);
            display: flex; align-items: flex-end; justify-content: space-between; color: var(--ink); background: var(--page-bg);
        }
        .tp-panel { align-self: flex-start; padding: 3px 8px; border-radius: 10px; border: 2px solid var(--line); background: var(--surface); font-weight: 900; font-size: 1.02rem; font-family: var(--font-display); white-space: nowrap; }
        .tp-panel b { color: var(--c); }
        .tp-btn { position: absolute; left: 8px; bottom: 8px; width: 30px; height: 14px; border-radius: 6px; background: var(--green); }
        .tp-tree { width: 52px; height: 56px; }
        .tp-tree .ground { fill: var(--tr-ground); }
        .tp-tree .trunk { fill: var(--tr-trunk); }
        .tp-tree .l1 { fill: var(--tr-l2); }
        .tp-tree .l2 { fill: var(--tr-l4); }
        .tp-tree .l3 { fill: var(--tr-l6); }
        .tp-tree .fruit { fill: var(--tr-fruit); stroke: var(--tr-fruit-line); stroke-width: calc(var(--tr-fruit-w) * .5); }
        .fx-prev { height: 92px; border-radius: 12px; border: 2px solid var(--line); display: grid; place-items: center; font-size: 2.6rem; background: radial-gradient(circle, var(--surface) 0 38%, var(--surface-3) 100%); }
        .dlg .shop-msg { min-height: 1.4em; margin: 12px 0 0; font-weight: 800; color: var(--ok-ink); }
        .dlg .shop-msg.warn { color: var(--warn-ink); }
        .dlg .shop-reduced { margin: 0 0 10px; padding: 8px 12px; border-radius: 12px; border: 2px dashed var(--line); background: var(--surface-2); font-size: .85rem; font-weight: 700; color: var(--muted); }
        @media (max-width: 420px) {
            .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
            .dlg.shop-dlg { padding: 16px 12px; }
            .shop-item { padding: 6px; }
            .theme-prev, .fx-prev { height: 78px; }
            .tp-panel { font-size: .9rem; padding: 2px 6px; }
            .tp-tree { width: 44px; height: 48px; }
        }
