:root{font-family:system-ui,-apple-system,Segoe UI,sans-serif;color:#17323b;background:#e8f0e6;--teal:#167d79;--cream:#fff8e9;--line:#c9d7c9}*{box-sizing:border-box}body{margin:0;background:radial-gradient(circle at 15% 0%,#fff9dc 0,transparent 35%),#e8f0e6}button,input{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.52}[hidden]{display:none!important}.app-shell{max-width:1420px;margin:auto;min-height:100vh}
.topbar{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.85rem clamp(1rem,3vw,2.2rem);background:#153e4a;color:#fff;box-shadow:0 4px 18px #0d313437}.brand{display:flex;align-items:center;gap:.65rem}.brand-mark{display:grid;place-items:center;width:2.3rem;height:2.3rem;border:2px solid #e8be71;border-radius:11px;color:#e8be71;font-size:1.4rem}.brand strong{display:block;font-family:Georgia,serif;font-size:1.28rem}.brand small{display:block;color:#bed6d1;font-size:.7rem}.top-stats{display:flex;align-items:center;gap:1rem;font-weight:700;font-size:.88rem}.heart{color:#e76671;font-size:1.25rem}.heart.empty{color:#8da3a4}.icon-button{border:1px solid #668c8c;background:transparent;color:#fff;border-radius:9px;padding:.28rem .55rem}
.panel{margin:clamp(1rem,3vw,2rem);border:1px solid var(--line);background:var(--cream);border-radius:22px;box-shadow:0 12px 40px #1c4a4220}.centered{text-align:center;padding:4rem 1rem}.loading-spark{font-size:3rem;color:#eab869}.start-screen{display:grid;grid-template-columns:1.2fr .8fr;gap:clamp(1.5rem,5vw,5rem);align-items:center;padding:clamp(1.5rem,5vw,5rem)}.start-copy h1{font:700 clamp(2.3rem,5vw,4.4rem)/1.07 Georgia,serif;max-width:680px;margin:.8rem 0 1.2rem;color:#153e4a}.start-copy p{font-size:1.1rem;line-height:1.65;max-width:590px}.eyebrow{font-size:.7rem;letter-spacing:.14em;text-transform:uppercase;font-weight:800;color:#2a8880}.start-tags{display:flex;gap:.7rem;flex-wrap:wrap;margin-top:2rem}.start-tags span{background:#dceee5;border-radius:30px;padding:.5rem .8rem;color:#24554c;font-weight:700;font-size:.82rem}.start-card{background:white;border:1px solid #d8e1d6;border-radius:20px;padding:1.5rem;box-shadow:0 10px 25px #163a3517}.hero-preview{height:125px;display:flex;justify-content:center;align-items:end;gap:1.5rem;margin:.6rem 0 1.3rem;background:linear-gradient(#d9f0dc,#bcd4b0);border-radius:14px;border-bottom:10px solid #8eb56b}.hero-preview img{image-rendering:pixelated;width:64px;height:auto}.start-card label,.start-card legend{display:block;font-weight:750;margin:.7rem 0 .35rem}.start-card>input{width:100%;border:1px solid #b8cfc8;border-radius:10px;padding:.72rem}.start-card fieldset{border:0;padding:0;margin:1rem 0}.swatches{display:flex;gap:.4rem}.swatches label{margin:0;flex:1}.swatches input{position:absolute;opacity:0}.swatch{display:block;border:2px solid transparent;text-align:center;padding:.6rem .2rem;border-radius:9px;font-size:.78rem}.swatch-a{background:#d3ebe2}.swatch-b{background:#d5e3ff}.swatch-c{background:#ead9fb}.swatches input:checked+.swatch{border-color:#176c73;box-shadow:0 0 0 2px white inset}
.primary,.secondary{border:0;border-radius:11px;padding:.75rem 1rem;font-weight:800}.primary{background:#187d77;color:white;box-shadow:0 4px 0 #0e5a56}.primary:hover{background:#116c66}.secondary{background:#ecf7ef;color:#17625e;border:1px solid #b7d8cd}.start-card .primary{width:100%}.text-button{border:0;background:transparent;color:#166d72;text-decoration:underline;text-underline-offset:3px;padding:.5rem;font-weight:750}.start-card .text-button{width:100%;margin-top:.7rem}
.game-layout{display:grid;grid-template-columns:minmax(0,1fr) 290px;gap:1.2rem;padding:1.2rem}.map-column,.side-panel{background:#fffdf6;border:1px solid #cbd9cb;border-radius:17px;box-shadow:0 5px 22px #173b3220}.map-column{padding:1rem}.scene-heading{display:flex;justify-content:space-between;align-items:center;gap:1rem;margin:0 0 .8rem}.scene-heading h1{font:700 1.7rem Georgia,serif;margin:.1rem 0}.viewport{height:min(61vh,550px);min-height:325px;position:relative;overflow:hidden;border:5px solid #315d5a;border-radius:12px;background:#9dc684;outline:none;touch-action:none}.world{position:absolute;left:0;top:0;transform-origin:0 0;image-rendering:pixelated;background:#8bbd73}.world.city{background-image:url('content/cidade-dos-numeros/sprites/tile-grass.png');background-size:32px 32px}.world.house{background-image:url('content/cidade-dos-numeros/sprites/interior-house-floor.png');background-size:512px 512px}.world::after{content:"";position:absolute;inset:0;pointer-events:none;box-shadow:inset 0 0 0 4px #486a59}.ground{position:absolute;background-image:url('content/cidade-dos-numeros/sprites/tile-path.png');background-size:32px 32px}.zone-shade{position:absolute;opacity:.13;pointer-events:none}.entity,.decor,.place-tile{position:absolute;image-rendering:pixelated}.entity{width:32px;height:48px;object-fit:contain;object-position:bottom;z-index:8;filter:drop-shadow(0 3px 1px #24573b75)}.entity.companion{height:32px;z-index:7}.entity.player{z-index:9}.world .building{position:absolute;image-rendering:pixelated;z-index:4}.npc{position:absolute;z-index:10;width:32px;height:48px;border:0;padding:0;background:transparent}.npc img{width:32px;height:48px;image-rendering:pixelated}.npc .question{position:absolute;top:-25px;left:0;width:32px;height:32px;image-rendering:pixelated;filter:drop-shadow(0 1px 2px #173b46)}.npc.done .question{display:none}.npc-label{position:absolute;left:50%;bottom:-16px;transform:translateX(-50%);background:#fff9e8;border-radius:5px;padding:0 3px;font-size:10px;font-weight:800;white-space:nowrap}.place-tile{width:32px;height:32px;border:0;background:transparent;z-index:2}.place-tile:hover{background:#d4f3ae77}.decor{z-index:5;font-size:26px;text-align:center;line-height:32px}.door-marker,.gate{position:absolute;z-index:5;display:grid;place-items:center;font-weight:900}.door-marker{width:32px;height:32px;background:#e7c783bd;border:2px solid #785c36;border-radius:5px;color:#473b2e}.gate{width:32px;height:32px;background:#ab714d;color:#fff;border:2px solid #f4d59a;border-radius:3px}.gate.open{background:#4baf91}.map-note{position:absolute;z-index:3;color:#285b4b;background:#f6f1d6bd;border-radius:7px;padding:4px 6px;font-size:12px;font-weight:850;white-space:nowrap}
.message{background:#e7f2eb;margin-top:.7rem;border-left:4px solid #2b9d85;padding:.7rem;border-radius:6px;min-height:2.7rem;font-size:.9rem}.message.error{background:#fff0e9;border-color:#d57b5d}.mobile-controls{display:flex;justify-content:space-between;align-items:end;gap:1rem;margin-top:.7rem}.dpad{text-align:center}.dpad button{width:52px;height:43px;margin:2px;background:#d9ebe1;color:#1d625d;border:1px solid #a5c9bb;border-radius:9px;font-weight:900;touch-action:manipulation}.dpad>div{display:flex}.interact{min-height:45px}.side-panel{padding:.2rem 1rem;align-self:start}.side-section{border-bottom:1px solid #e4e9de;padding:1rem 0}.side-section:last-child{border:0}.side-section h2{font:700 1.25rem Georgia,serif;margin:.35rem 0}.side-section p{font-size:.86rem;line-height:1.5;margin:.3rem 0}.nearby-list{display:flex;flex-direction:column;gap:.35rem}.nearby-list button{display:flex;justify-content:space-between;text-align:left;border:1px solid #dce5d8;background:#f9fbf4;border-radius:8px;padding:.55rem;color:#2b4e46}.nearby-list small{color:#55816b}.inventory{display:flex;flex-wrap:wrap;gap:.4rem}.inventory button{border:1px solid #b8d4bb;background:#eef8ea;color:#254b39;border-radius:8px;padding:.4rem .6rem;font-size:.77rem}.inventory button.selected{outline:2px solid #277e7d}.hint-small{color:#61746a}
.overlay,.battle-screen,.hospital-screen{position:fixed;inset:0;z-index:30;background:#11333dbc;display:grid;place-items:center;padding:1rem;overflow:auto}.dialog-card,.hospital-card{background:#fffaf0;border-radius:20px;box-shadow:0 24px 70px #09232360;padding:clamp(1.3rem,4vw,2.3rem);max-width:570px;width:100%}.dialog-card h2{font:700 2rem Georgia,serif;margin:.5rem 0}.dialog-card p{line-height:1.6}.dialog-actions{display:flex;flex-wrap:wrap;gap:.6rem;margin-top:1.5rem}.battle-screen{background:radial-gradient(circle at 50% 0,#326c68,#13363e 70%)}.battle-wrap{max-width:850px;width:100%;margin:auto}.battle-top{display:flex;justify-content:space-between;align-items:center;color:#e1f5e9;margin-bottom:.4rem}.battle-top .text-button{color:#e3f5e4}.battle-top .eyebrow{color:#e0c37f}.arena{display:flex;align-items:center;justify-content:space-around;gap:.5rem;height:190px;background:linear-gradient(#457875,#88b695 75%,#557b58 75%);border:4px solid #d5e7c8;border-radius:16px 16px 0 0}.fighter{text-align:center;color:#fff;min-width:100px}.fighter img{display:block;margin:auto;width:75px;height:75px;object-fit:contain;image-rendering:pixelated;filter:drop-shadow(0 7px 1px #35584a)}.fighter strong{display:block;margin:.35rem}.fighter-hearts{height:28px;font-size:1.25rem;white-space:nowrap}.arena-center{display:grid;place-items:center;color:#fff;font-weight:900}.impact-icon{font-size:2.3rem;color:#ffe293}.challenge-card{background:#fffaf0;border:4px solid #d5e7c8;border-top:0;border-radius:0 0 16px 16px;padding:1.4rem}.challenge-heading{display:flex;justify-content:space-between;gap:1rem}.type-tag{background:#e3f1e8;color:#27766d;border-radius:30px;padding:.25rem .65rem;font-size:.74rem;font-weight:800}.challenge-card h1{font:700 clamp(1.2rem,3vw,1.65rem)/1.35 Georgia,serif;margin:.8rem 0 1rem}.options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.6rem}.options button,.order-card{padding:.8rem;border:1px solid #aec9bf;border-radius:10px;background:#f3f9f0;color:#1d4640;text-align:left;font-weight:650}.options button:hover{border-color:#328f83;background:#e7f5e5}.answer-row{display:flex;gap:.6rem}.answer-row input,.field-grid input{border:1px solid #9abfb3;border-radius:9px;padding:.7rem;min-width:0;flex:1;background:white}.field-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:.7rem;margin:.8rem 0}.field-grid label{display:flex;flex-direction:column;gap:.35rem;font-size:.85rem;font-weight:700}.order-list{display:grid;gap:.4rem}.order-card{display:flex;align-items:center;justify-content:space-between;gap:.5rem}.order-card button{border:1px solid #b5cac1;border-radius:6px;background:#fff;padding:.2rem .55rem}.confirm-row{margin-top:.8rem}.challenge-feedback{min-height:2rem;margin:.7rem 0 0;font-weight:800;color:#24745c}.challenge-feedback.wrong{color:#c14f43}.challenge-footer{display:flex;align-items:center;gap:.6rem;border-top:1px solid #e1e5dc;margin-top:.6rem;padding-top:.4rem;font-size:.86rem}.challenge-footer span{color:#6d6045}.stimulus-table{border-collapse:collapse;margin:.8rem 0;width:100%;font-size:.82rem}.stimulus-table th,.stimulus-table td{border:1px solid #b9cdb9;padding:.4rem;text-align:center}.stimulus-table th{background:#e4f2df}.cartesian{display:grid;grid-template-columns:repeat(5,1fr);width:180px;height:180px;margin:.5rem auto;background:linear-gradient(90deg,transparent 49%,#628a83 49%,#628a83 51%,transparent 51%),linear-gradient(transparent 49%,#628a83 49%,#628a83 51%,transparent 51%),repeating-linear-gradient(90deg,#cde4da 0 1px,transparent 1px 36px),repeating-linear-gradient(#cde4da 0 1px,transparent 1px 36px)}.cartesian span{background:#e35d61;border-radius:50%;width:8px;height:8px;align-self:center;justify-self:center}.hospital-card{max-width:670px}.hospital-hero{display:flex;align-items:center;gap:1.2rem;margin:1rem 0}.hospital-hero img{width:130px;image-rendering:pixelated}.hospital-hero h1{font:700 2rem Georgia,serif;margin:.2rem 0}.hospital-hero p{margin:.3rem 0}.hospital-hearts{font-size:1.7rem;margin:1rem 0}.hospital-card label{display:block;font-weight:800;margin:.8rem 0}.flash-wrong{animation:shake .3s}.flash-correct{animation:glow .45s}@keyframes shake{25%{transform:translateX(-7px)}75%{transform:translateX(7px)}}@keyframes glow{50%{box-shadow:0 0 0 8px #b5e5b8}}
@media(max-width:850px){.game-layout{grid-template-columns:1fr}.side-panel{display:grid;grid-template-columns:1fr 1fr;gap:0 1rem}.side-section{padding:.7rem 0}.viewport{height:min(55vh,480px)}}@media(max-width:600px){.topbar{padding:.65rem}.brand strong{font-size:1.03rem}.brand small{font-size:.57rem}.top-stats{gap:.4rem;font-size:.72rem}.top-stats .heart{font-size:1rem}.start-screen{grid-template-columns:1fr;padding:1.3rem;margin:.6rem}.start-copy h1{font-size:2.4rem}.start-tags{margin-top:1rem}.game-layout{padding:.5rem;gap:.5rem}.map-column{padding:.55rem}.scene-heading h1{font-size:1.25rem}.scene-heading .secondary{padding:.55rem}.viewport{height:48vh;min-height:280px}.side-panel{grid-template-columns:1fr 1fr;padding:0 .6rem}.side-section.help{display:none}.side-section h2{font-size:1rem}.side-section p{font-size:.74rem}.side-section:nth-child(2){order:3;grid-column:span 2}.dpad button{width:51px;height:39px}.interact{font-size:.78rem;padding:.5rem}.battle-screen,.hospital-screen{padding:.4rem}.arena{height:150px}.fighter img{width:60px;height:60px}.challenge-card{padding:.8rem}.options{grid-template-columns:1fr}.hospital-hero img{width:90px}.hospital-hero h1{font-size:1.4rem}}

.avatar-sprite{position:relative;width:32px;height:48px;image-rendering:pixelated}
.world .avatar-sprite.entity{position:absolute}
.avatar-sprite img{position:absolute;left:0;top:0;width:32px!important;height:48px!important;image-rendering:pixelated}
.avatar-sprite .avatar-layer{position:absolute;left:0;top:0;width:32px;height:48px;background-repeat:no-repeat;background-size:32px 192px;image-rendering:pixelated}
.avatar-sprite.facing-left .avatar-layer{background-position:0 -48px}
.avatar-sprite.facing-right .avatar-layer{background-position:0 -96px}
.avatar-sprite.facing-up .avatar-layer{background-position:0 -144px}
.hero-preview>img{width:64px;height:auto}
.hero-preview #appearance-preview{display:grid;place-items:end center;width:92px;height:104px}
.hero-preview #appearance-preview .avatar-sprite{transform:scale(2);transform-origin:bottom center;margin-bottom:5px}
.appearance-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.55rem .8rem;margin:1rem 0 1.2rem}
.appearance-control{min-width:0;padding:.55rem;border:1px solid #d4e2d7;border-radius:12px;background:#f5faf3}
.appearance-label{display:block;margin:0 0 .35rem;font-size:.78rem;font-weight:800;color:#24554c}
.appearance-stepper{display:grid;grid-template-columns:42px minmax(0,1fr) 42px;align-items:center;border:1px solid #b8cfc8;border-radius:9px;background:#fff;overflow:hidden}
.appearance-stepper button{height:42px;border:0;background:#e4f2e8;color:#17625e;font-size:1.5rem;font-weight:800;line-height:1;touch-action:manipulation}
.appearance-stepper button:hover,.appearance-stepper button:focus-visible{background:#cce9dc;outline:2px solid #177a79;outline-offset:-2px}
.appearance-position{text-align:center;font-size:.88rem;font-weight:850;color:#17323b;font-variant-numeric:tabular-nums}
.appearance-value{display:block;min-height:2.4em;margin-top:.35rem;text-align:center;font-size:.76rem;line-height:1.2;color:#45655b}
.scene-actions{display:flex;gap:.45rem;flex-wrap:wrap;justify-content:flex-end}
@media(max-width:600px){.scene-actions .secondary{font-size:.75rem;padding:.48rem}.appearance-grid{gap:.45rem}.appearance-control{padding:.4rem}.appearance-label{font-size:.73rem}.appearance-stepper{grid-template-columns:38px minmax(0,1fr) 38px}.appearance-stepper button{height:40px}}

.barrier{position:absolute;z-index:6;pointer-events:none;box-shadow:0 2px 2px #213b3155}
.barrier.vertical{background:linear-gradient(90deg,#433d34 0 2px,#bc9763 2px 6px,#433d34 6px 8px)}
.barrier.horizontal{background:linear-gradient(#433d34 0 2px,#bc9763 2px 6px,#433d34 6px 8px)}
.barrier.vertical::after{content:"";position:absolute;left:-3px;top:10px;width:14px;height:12px;border:2px solid #3c443c;border-radius:3px;background:#d6b074}
.barrier.horizontal::after{content:"";position:absolute;left:10px;top:-3px;width:12px;height:14px;border:2px solid #3c443c;border-radius:3px;background:#d6b074}
.barrier.gate-barrier{background:#a46744}
.barrier.gate-barrier.color-azul{background:#498bb7}
.barrier.gate-barrier.color-violeta{background:#8b71af}
.barrier.gate-barrier.color-dourado{background:#d5ac4f}
.barrier.gate-barrier::after{background:inherit}
.world .gate{z-index:7}
.walk-marker{position:absolute;z-index:11;pointer-events:none;display:grid;place-items:center;width:32px;height:32px;color:#fff8d2;background:#197a75aa;border:2px solid #fff4b4;border-radius:50%;font-size:17px;animation:walk-pulse .8s ease-in-out infinite alternate}
@keyframes walk-pulse{to{transform:scale(.75);opacity:.55}}

.objective-action{width:100%;margin-top:.6rem}
.route-step{position:absolute;z-index:2;pointer-events:none;width:32px;height:32px;background:#fff3b255;border:2px dashed #fff5c7a8;border-radius:7px}
.travel-marker{position:absolute;z-index:7;width:32px;height:32px;border:2px solid #f7df9d;border-radius:6px;background:#405c91;color:#fff8d7;font-size:20px;font-weight:900;box-shadow:0 2px 4px #18304988}
.world .gate.color-bronze{background:#a46744}
.world .gate.color-azul{background:#498bb7}
.world .gate.color-violeta{background:#8b71af}
.world .gate.color-dourado{background:#d5ac4f;color:#3b3323}
.world .gate.open{background:#4baf91;color:#fff}
.world .gate.color-bronze:not(.open){background:#89563e url('content/cidade-dos-numeros/sprites/prop-gate-marker.png?v=topdown-1') center/32px 32px no-repeat;border:0;color:transparent}
.world.city{background-image:url('content/cidade-dos-numeros/sprites/tile-grass.png?v=topdown-1')}
.world.city .ground{background-image:url('content/cidade-dos-numeros/sprites/tile-path.png?v=topdown-1')}
.npc .avatar-sprite{display:block}

.world .entity.companion{background-repeat:no-repeat;background-size:auto;object-fit:initial}
.world .player{transform-origin:center bottom}
.world .player.walking .avatar-layer{animation:player-step .17s ease-in-out infinite}
@keyframes player-step{0%,100%{transform:translateY(0)}50%{transform:translateY(-3px)}}
.world.house[data-floor="pedra"]{background-image:repeating-linear-gradient(0deg,transparent 0 30px,#b7afa0 30px 32px),repeating-linear-gradient(90deg,#e8dfca 0 30px,#b7afa0 30px 32px);background-size:32px 32px}
.world.house[data-floor="ladrilho"]{background-image:repeating-linear-gradient(0deg,transparent 0 30px,#276d70 30px 32px),repeating-linear-gradient(90deg,#78b5aa 0 30px,#276d70 30px 32px);background-size:32px 32px}
.world .decor{display:grid;place-items:center;overflow:hidden}
.world .decor span{display:grid;place-items:center;width:100%;height:100%;font-size:clamp(24px,3vw,42px);transform-origin:center}
.world .floor-decor{z-index:2;background:repeating-linear-gradient(45deg,#d2a86c 0 12px,#efd6a1 12px 24px);border:4px solid #9d6948;border-radius:8px;opacity:.92}
.world .floor-decor[data-item="decoracao-tapete-cartesiano"]{background-color:#e0c686;background-image:linear-gradient(#588e91 2px,transparent 2px),linear-gradient(90deg,#588e91 2px,transparent 2px);background-size:32px 32px}
.world .furniture-decor{z-index:5;background:#d2a56b;border:3px solid #704e36;border-radius:7px;box-shadow:0 4px 0 #563b2c55}
.house-floor-controls{display:grid;gap:.35rem;margin:.55rem 0 1rem;font-size:.82rem;font-weight:700}.house-floor-controls select{padding:.55rem;border:1px solid #b8cfc8;border-radius:8px;background:#fff;color:#17323b}.rotate-reward{margin:.6rem 0}
.fighter.striking img{animation:fighter-lunge .48s ease-out}
.fighter:last-child.striking img{animation:fighter-lunge-left .48s ease-out}
.fighter.struck img{animation:fighter-hit .5s ease-out}
.fighter.struck .fighter-hearts{animation:hearts-hit .5s ease-out}
.impact-icon.burst{animation:impact-burst .5s ease-out}
.battle-screen.victory .arena{animation:victory-glow .9s ease-out}
@keyframes fighter-lunge{45%{transform:translateX(25px) scale(1.12)}75%{transform:translateX(8px)}100%{transform:none}}
@keyframes fighter-lunge-left{45%{transform:translateX(-25px) scale(1.12)}75%{transform:translateX(-8px)}100%{transform:none}}
@keyframes fighter-hit{25%{transform:translateX(8px);filter:brightness(2)}50%{transform:translateX(-6px)}75%{transform:translateX(4px)}100%{transform:none}}
@keyframes hearts-hit{50%{transform:scale(1.2);filter:brightness(1.7)}}
@keyframes impact-burst{0%{transform:scale(.3);opacity:.2}45%{transform:scale(1.7);opacity:1}100%{transform:scale(1);opacity:1}}
@keyframes victory-glow{50%{box-shadow:inset 0 0 45px #ffe49c,0 0 22px #ffe49c}}
@media(prefers-reduced-motion:reduce){.world .player.walking .avatar-layer,.fighter.striking img,.fighter:last-child.striking img,.fighter.struck img,.fighter.struck .fighter-hearts,.impact-icon.burst,.battle-screen.victory .arena,.flash-wrong,.flash-correct,.walk-marker{animation:none!important}}

.house-concept{border:5px solid #69503e;border-radius:14px;overflow:hidden;background:#fff2d7;box-shadow:0 8px 24px #253e2b24}
.dollhouse-toolbar{display:flex;justify-content:space-between;align-items:center;gap:.7rem;padding:.65rem .8rem;background:#ffe7ad;color:#453b32}
.dollhouse-toolbar strong,.dollhouse-toolbar small{display:block}
.dollhouse-toolbar strong{font:700 1.1rem Georgia,serif}
.dollhouse-toolbar small{font-size:.72rem;color:#735e4d}
.dollhouse-toolbar label{display:flex;align-items:center;gap:.4rem;font-size:.78rem;font-weight:800}
.dollhouse-toolbar select{max-width:125px;padding:.4rem;border:1px solid #a88a61;border-radius:7px;background:#fff9e8;color:#453b32}
.dollhouse-stage{position:relative;height:min(58vh,470px);min-height:330px;overflow:hidden;background:#f5dba9;border:8px solid #9b6a48;border-top:13px solid #79513a;box-shadow:inset 0 0 0 5px #d2a26b}
.dollhouse-wall{position:absolute;inset:0 0 63%;display:flex;justify-content:space-around;align-items:center;background:repeating-linear-gradient(90deg,#ffe8c3 0 27px,#f6dbad 27px 30px);border-bottom:13px solid #b4855c;box-shadow:inset 0 8px #fff2d4,inset 0 -4px #6d513d}
.dollhouse-window{width:18%;height:62%;border:7px solid #9a684a;border-radius:55px 55px 5px 5px;background:linear-gradient(135deg,#c7ecdf 0 47%,#94cfd2 48% 100%);box-shadow:inset 0 0 0 3px #f9e6bf,0 4px #76533e}
.dollhouse-window::after{content:"";display:block;width:100%;height:100%;border-left:3px solid #9a684a;border-bottom:3px solid #9a684a;transform:translateX(50%)}
.dollhouse-floor{position:absolute;inset:37% 0 0;outline:none;background:repeating-linear-gradient(0deg,transparent 0 42px,#9b704b 43px 45px),repeating-linear-gradient(90deg,#c38f58 0 78px,#bc8753 78px 80px);box-shadow:inset 0 8px 14px #6a4b3760;cursor:crosshair}
.dollhouse-floor[data-floor="pedra"]{background:repeating-linear-gradient(0deg,transparent 0 52px,#a99f8a 52px 55px),repeating-linear-gradient(90deg,#e6ddc9 0 74px,#c8beaa 74px 77px)}
.dollhouse-floor[data-floor="ladrilho"]{background:repeating-linear-gradient(0deg,transparent 0 52px,#2d807c 52px 55px),repeating-linear-gradient(90deg,#9ccdc0 0 74px,#72b5aa 74px 77px)}
.dollhouse-floor:focus-visible{outline:4px solid #177a79;outline-offset:-4px}
#dollhouse-objects{position:absolute;inset:0;pointer-events:none}
.dollhouse-item{position:absolute;display:grid;place-items:center;border:3px solid #5d4539;border-radius:7px;background:#ba875a;box-shadow:0 7px 0 #4b352e55;color:#244843;overflow:hidden}
.dollhouse-symbol{font-size:clamp(1.2rem,3vw,2rem);line-height:1}
.dollhouse-item.kind-bed{background:linear-gradient(90deg,#f7e9ce 0 26%,#418d89 26% 100%);border:6px solid #835539;border-radius:11px}
.dollhouse-item.kind-bed::after{content:"";position:absolute;right:8%;top:18%;width:35%;height:9%;border-radius:20px;background:#add7c2}
.dollhouse-item.kind-rug{border:7px solid #9b604b;border-radius:20px;background:repeating-linear-gradient(45deg,#e3b873 0 12px,#f2d39c 12px 24px,#74aaa4 24px 28px);box-shadow:inset 0 0 0 5px #f5dfaf}
.dollhouse-item.kind-table{border-width:5px;background:linear-gradient(#d6a76e 0 23%,#9b6747 24% 100%);box-shadow:0 9px 0 #624536}
.dollhouse-item.kind-chair{background:linear-gradient(#d7ad79 0 32%,#8e5b43 33% 65%,#c08c5d 66%);border-radius:7px 7px 13px 13px}
.dollhouse-item.kind-plant{background:radial-gradient(circle at 50% 34%,#7ab778 0 30%,#397b65 31% 49%,transparent 50%),linear-gradient(#d1a46d 65%,#9b6548 66%)}
.dollhouse-item.kind-lamp{background:radial-gradient(circle at 50% 40%,#fff0b5 0 29%,#e3b96b 30% 56%,#8c6348 57%)}
.dollhouse-item.kind-picture{background:#e3c590;border:7px solid #8e674b;box-shadow:inset 0 0 0 3px #f9e4b7}
.dollhouse-item.kind-shelf{background:repeating-linear-gradient(0deg,#725139 0 9px,#c49661 10px 13px,#83583b 14px 20px)}
.dollhouse-resident{position:absolute;transform:translate(-50%,-60%) scale(1.45);transform-origin:center bottom;image-rendering:pixelated;filter:drop-shadow(0 4px 2px #374a3899)}
.dollhouse-cursor{position:absolute;border:2px dashed #fff9dc;outline:2px solid #247e7d;border-radius:5px;z-index:40;opacity:.7}
.dollhouse-tools{display:flex;align-items:center;gap:.5rem;padding:.65rem;background:#fff4d9}
.dollhouse-inventory{display:flex;gap:.45rem;overflow:auto;flex:1;padding:.1rem;scrollbar-width:thin}
.dollhouse-inventory button{flex:none;max-width:160px;padding:.48rem .6rem;border:1px solid #ae9a79;border-radius:9px;background:#fff9eb;color:#4b4537;font-size:.75rem;font-weight:750}
.dollhouse-inventory button.selected{outline:3px solid #258881;background:#dff2e6}
.dollhouse-hint{margin:0;padding:.45rem .75rem .7rem;color:#615947;font-size:.8rem;line-height:1.4}
@media(max-width:600px){.dollhouse-stage{height:360px;min-height:0}.dollhouse-toolbar strong{font-size:.92rem}.dollhouse-toolbar small{font-size:.64rem}.dollhouse-toolbar select{max-width:92px}.dollhouse-window{border-width:5px}.dollhouse-item{border-width:2px}.dollhouse-item.kind-rug{border-width:4px}.dollhouse-hint{font-size:.72rem}}

/* Keep exploration and its controls in the visible mobile viewport. */
@media(max-width:600px){
  html.game-active,html.game-active body{height:100%;overflow:hidden}
  html.game-active .app-shell{height:100vh;height:100dvh;min-height:0;display:flex;flex-direction:column;overflow:hidden}
  html.game-active .topbar{flex:none;min-height:0;padding:.3rem .55rem;gap:.45rem}
  html.game-active .brand{gap:.4rem;min-width:0}
  html.game-active .brand-mark{width:1.75rem;height:1.75rem;flex:none;font-size:1rem;border-radius:7px}
  html.game-active .brand strong{font-size:.9rem;line-height:1.1}
  html.game-active .brand small{font-size:.52rem;line-height:1.1}
  html.game-active .top-stats{gap:.25rem;white-space:nowrap;font-size:.65rem}
  html.game-active .top-stats .heart{font-size:.85rem}
  html.game-active .icon-button{padding:.16rem .32rem}
  html.game-active main{flex:1;min-height:0;overflow:hidden}
  html.game-active .game-layout{height:100%;min-height:0;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,72fr) minmax(0,28fr);gap:.35rem;padding:.35rem;overflow:hidden}
  html.game-active .map-column{min-width:0;min-height:0;display:flex;flex-direction:column;overflow:hidden;padding:.4rem}
  html.game-active .scene-heading{flex:none;gap:.35rem;margin:0 0 .3rem}
  html.game-active .scene-heading h1{font-size:1.05rem;line-height:1.1}
  html.game-active .scene-heading .eyebrow{font-size:.55rem}
  html.game-active .scene-actions{gap:.25rem}
  html.game-active .scene-actions .secondary{padding:.3rem .4rem;font-size:.67rem;border-radius:7px}
  html.game-active .viewport{flex:1;min-height:0;height:auto;border-width:3px}
  html.game-active .message{flex:none;min-height:0;max-height:3.2rem;overflow-y:auto;margin-top:.3rem;padding:.35rem .45rem;font-size:.75rem;line-height:1.25}
  html.game-active .mobile-controls{flex:none;margin-top:.25rem;gap:.4rem}
  html.game-active .dpad button{width:45px;height:31px;margin:1px;border-radius:7px}
  html.game-active .interact{min-height:36px;padding:.35rem .6rem}
  html.game-active .side-panel{min-height:0;align-self:stretch;display:block;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:0 .65rem}
  html.game-active .side-section{padding:.5rem 0}
  html.game-active .side-section:nth-child(2){order:initial;grid-column:auto}
  html.game-active .side-section h2{margin:.2rem 0}
  html.game-active .house-concept{flex:1;min-height:0;display:flex;flex-direction:column}
  html.game-active .dollhouse-toolbar,html.game-active .dollhouse-tools,html.game-active .dollhouse-hint{flex:none}
  html.game-active .dollhouse-stage{flex:1;min-height:0;height:auto}
  html.game-active .dollhouse-toolbar{padding:.35rem .5rem}
  html.game-active .dollhouse-tools{padding:.35rem}
  html.game-active .dollhouse-hint{max-height:2.5rem;overflow-y:auto;padding:.3rem .5rem;font-size:.65rem}
}

.inventory button.available,.dollhouse-inventory button.available{background:#e4f4e9;border-color:#72b895;color:#1d5a42}
.inventory button.placed,.dollhouse-inventory button.placed{background:#e7e9e7;border-color:#a9b5ad;color:#4c5b52}
.inventory button.selected,.dollhouse-inventory button.selected{outline:3px solid #258881;outline-offset:1px}
.remove-reward{margin:.6rem 0 0 .4rem;padding:.5rem .65rem;font-size:.78rem}
.world .decor[data-item],.dollhouse-item[data-item]{cursor:grab;touch-action:none;user-select:none}
.world .decor[data-item].dragging,.dollhouse-item[data-item].dragging{cursor:grabbing;opacity:.75;z-index:50!important;filter:drop-shadow(0 9px 7px #174b4299);pointer-events:none}
.world .furniture-decor[data-item="cama"]{background:transparent;border:0;box-shadow:none}
.furniture-art{display:block;width:100%;height:100%;object-fit:fill;image-rendering:pixelated;pointer-events:none}
#dollhouse-objects .dollhouse-item[data-item]{pointer-events:auto}
#dollhouse-objects .dollhouse-resident,#dollhouse-objects .dollhouse-cursor{pointer-events:none}
.inventory-summary{flex-basis:100%;margin:.2rem 0;font-size:.78rem;font-weight:800;color:#24554c}
.house-drop-preview{position:absolute;z-index:60;pointer-events:none;border:3px dashed;border-radius:5px;box-shadow:0 0 0 2px #fff9;background:#37b77955}
.house-drop-preview.valid{border-color:#148342;background:#32bc6655}
.house-drop-preview.invalid{border-color:#c33535;background:#e956565e}
.inventory button.available{touch-action:none}
.inventory button.dragging{opacity:.65}
.order-row{display:flex;align-items:center;gap:.5rem;min-width:0}
.order-position{flex:0 0 1.6rem;text-align:right;font-weight:800;color:#285d56}
.order-row .order-card{flex:1;min-width:0}
.order-expression{min-width:0;overflow-wrap:anywhere}
.order-controls{display:flex;flex:none;gap:.15rem}
.house-trash{position:absolute;right:.6rem;bottom:.6rem;z-index:80;display:grid;place-items:center;min-width:82px;min-height:56px;padding:.35rem;border:3px dashed #bb514b;border-radius:12px;background:#fff4e9ed;color:#88332e;font-size:.84rem;font-weight:900;box-shadow:0 4px 15px #17291a66;pointer-events:none}
.house-trash.targeted{border-style:solid;background:#d8504a;color:white;transform:scale(1.08)}
@media(max-width:600px){html.game-active .game-layout.house-scene{grid-template-rows:minmax(0,68fr) minmax(0,32fr)}}
html.game-active .brand small{color:#e9dda1}
@media(max-width:600px){html.game-active .brand small{font-size:.61rem}}
.start-card .companion-picker{border:0;margin:1rem 0;padding:0}
.start-card .companion-picker legend{margin:0 0 .5rem;font-size:.86rem;font-weight:800;color:#24554c}
.companion-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.5rem}
.start-card .companion-option{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.3rem;min-width:0;min-height:91px;margin:0;padding:.45rem .2rem;border:2px solid #c9ddd1;border-radius:12px;background:#f4faf5;text-align:center;cursor:pointer}
.companion-option input{position:absolute;opacity:0;width:1px;height:1px}
.companion-option img{width:44px;height:44px;object-fit:contain;image-rendering:pixelated}
.companion-option span{font-size:.72rem;font-weight:800;line-height:1.15;color:#28554e}
.companion-option:has(input:checked){border-color:#158179;background:#dff3e8;box-shadow:0 0 0 2px #b2ded1}
.companion-option:focus-within{outline:3px solid #177a79;outline-offset:2px}
.companion-option input:checked+img{filter:drop-shadow(0 2px 2px #215a5d88)}
.start-card .start-secondary{display:block;width:100%;margin-top:.7rem}
.start-screen .start-card{align-self:center}
.start-screen .start-card h2{font:700 1.7rem Georgia,serif;margin:.4rem 0}
.start-screen .start-card p{line-height:1.45}
.start-screen .start-card .primary{width:100%}
.setup-screen{max-width:680px;margin:1rem auto;padding:clamp(1rem,3vw,2rem)}
.setup-heading h1{font:700 clamp(1.8rem,4vw,2.5rem) Georgia,serif;margin:.35rem 0}
.setup-heading p{margin:.25rem 0 1rem;line-height:1.45}
.setup-screen .start-card{box-shadow:none}
.starter-details>input{display:block;width:100%;border:1px solid #b8cfc8;border-radius:10px;padding:.72rem}
.salon-building{filter:hue-rotate(115deg) saturate(1.15) drop-shadow(0 3px 1px #24573b75)}
.salon-sign{position:absolute;z-index:6;display:grid;place-items:center;background:#653c70;color:#fff5d9;border:3px solid #f1c778;border-radius:5px;font-size:11px;font-weight:900;white-space:nowrap;box-shadow:0 3px 0 #35233f88;pointer-events:none}
.salon-door{background:#e9c2dc;color:#56315d}
.start-note{margin:.45rem 0 0;font-size:.72rem;line-height:1.35;color:#6b6154}
.dialog-card{max-height:calc(100dvh - 2rem);overflow:auto}
.dialog-lesson{margin-top:1rem;padding:1rem;border:1px solid #c6dfd0;border-left:5px solid #238b78;border-radius:12px;background:#eff8ec}
.dialog-lesson p{margin:.55rem 0 0;line-height:1.5}
.dialog-lesson .lesson-example{font-weight:750;color:#225953}
.dialog-lesson figure{margin:.8rem 0 0;text-align:center}
.dialog-lesson img{display:block;max-width:min(100%,290px);max-height:220px;margin:auto;background:white;border:1px solid #c6dfd0;border-radius:10px}
.topbar{border-bottom:4px solid #efbd58}
.brand small{color:#ffe5a2;font-weight:900}
.update-banner{position:relative;z-index:40;display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:.5rem 1rem;padding:.55rem 1rem;background:#fff1bb;border-bottom:2px solid #d9aa45;color:#533d17;text-align:center;box-shadow:0 3px 10px #1e3b2833}
.update-banner strong{font-size:.9rem}
.update-banner button{padding:.45rem .8rem;white-space:nowrap}
html.game-active .update-banner{flex:none}
@media(max-width:600px){.update-banner{padding:.35rem .5rem;gap:.25rem .5rem}.update-banner strong{font-size:.72rem}.update-banner button{padding:.32rem .55rem;font-size:.72rem}}
#dialog-text{white-space:pre-line}
.appearance-value{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;margin:0;padding:0}
.world.yard{background-image:url('content/cidade-dos-numeros/sprites/tile-grass.png?v=topdown-1');background-size:32px 32px}
.asphalt-road{position:absolute;z-index:1;background:repeating-linear-gradient(90deg,#3b454d 0 32px,#424d54 32px 64px);border-top:5px solid #9aa6a4;border-bottom:5px solid #e9d996;box-shadow:inset 0 22px 0 #53606733,inset 0 -18px 0 #202a2b33}
.road-dash{position:absolute;z-index:2;height:4px!important;background:#f8e8aa;box-shadow:0 1px 1px #20262788}
.road-sidewalk{position:absolute;z-index:2;background:repeating-linear-gradient(90deg,#bfc5b6 0 30px,#879589 30px 32px);border-top:3px solid #f0e3b1;border-bottom:4px solid #778678;box-shadow:inset 0 8px 0 #edf0d844}
.bus-stop{display:block;overflow:visible;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;filter:drop-shadow(1px 2px 1px #132d3588)}
.bus-stop span{position:absolute;display:block;pointer-events:none;image-rendering:pixelated}
.bus-stop .bus-roof{left:0;top:2px;width:32px;height:7px;border:2px solid #e9c86a;background:#235b6b;box-shadow:0 2px 0 #143a48}
.bus-stop .bus-sign{left:4px;top:-8px;width:24px;height:9px;border:1px solid #144457;background:#fff1b9;color:#20465a;font:900 5px/7px Arial,sans-serif;text-align:center;letter-spacing:.1px}
.bus-stop .bus-post{left:3px;top:9px;width:3px;height:20px;background:#d7dfd4;box-shadow:23px 0 #d7dfd4,0 2px #163b4c,23px 2px #163b4c}
.bus-stop .bus-bench{left:9px;top:19px;width:15px;height:5px;border:1px solid #6e432a;background:#d19455;box-shadow:0 6px 0 -2px #563d30,10px 6px 0 -2px #563d30}
.bus-stop:hover .bus-roof,.bus-stop:focus-visible .bus-roof{background:#2e8395}
.yard-path{z-index:1}
.step-history{margin:.8rem 0;padding:.7rem .85rem;border:1px solid #bdd9c9;border-left:4px solid #27866f;border-radius:10px;background:#eef7ed;color:#214a40}
.preview-link{display:inline-flex;align-items:center;justify-content:center;padding:.4rem .55rem;border:1px solid #4d8a80;border-radius:8px;color:#1a655d;background:#e6f2e9;font-size:.74rem;font-weight:850;text-decoration:none;white-space:nowrap}.preview-link:hover,.preview-link:focus-visible{background:#d3e9de;outline:2px solid #178274}.preview-home-link{display:flex;margin-top:.7rem}
@media(max-width:600px){.scene-actions .preview-link{max-width:88px;text-align:center;white-space:normal;line-height:1.1;padding:.25rem;font-size:.61rem}}
.step-history h3{margin:0 0 .4rem;font-size:.88rem}
.step-history ol{margin:0;padding-left:1.25rem}
.step-history li{margin:.35rem 0;font-size:.82rem;line-height:1.35}
.step-history-values{display:flex;flex-wrap:wrap;gap:.15rem .8rem;margin-top:.12rem;overflow-wrap:anywhere}
.step-history-values b{color:#153e36}
.city-mural{position:absolute;z-index:6;display:flex;align-items:center;justify-content:center;gap:2px;padding:2px;border:3px solid #70452b;border-radius:3px;background:#e8d5a4;box-shadow:inset 0 0 0 2px #b88750,0 4px 0 #553b2b,1px 5px 3px #173b3244;color:#285552;cursor:pointer;image-rendering:pixelated}
.city-mural::before{content:"";position:absolute;inset:5px 6px;border-top:1px solid #a2865f;border-bottom:1px solid #a2865f;pointer-events:none}
.city-mural.mural-study{background:#d7e6cb;color:#4c5c38}
.city-mural .mural-pin{position:relative;z-index:1;font-size:10px;line-height:1;color:#ae6d3d}
.city-mural .mural-label{position:relative;z-index:1;font-size:8px;line-height:1.1;font-weight:900;text-align:center;text-shadow:0 1px #fff8e2}
.city-mural:hover,.city-mural:focus-visible{outline:2px solid #fce49a;outline-offset:2px;filter:brightness(1.08)}
.dialog-card.mural-dialog{max-width:760px}
.mural-table-wrap{max-width:100%;overflow-x:auto;border:1px solid #c5d9ca;border-radius:9px}
.mural-table{width:100%;min-width:420px;border-collapse:collapse;font-size:.85rem}
.mural-table th,.mural-table td{padding:.5rem .6rem;text-align:left;border-bottom:1px solid #dbe7d9;vertical-align:top}
.mural-table th{background:#e6f1e7;color:#25594e;white-space:nowrap}
.mural-table tr:last-child td{border-bottom:0}
.mural-table td:last-child,.mural-table th:last-child{text-align:center;white-space:nowrap;font-variant-numeric:tabular-nums}
.mural-table tbody tr:nth-child(even){background:#f7f9ef}
.mural-empty{padding:.65rem .8rem;background:#ecf5e8;border-radius:9px}

/* Arrastar no mapa não deve selecionar rótulos e outros elementos da interface. */
body{-webkit-user-select:none;user-select:none}
input,textarea,[contenteditable="true"]{-webkit-user-select:text;user-select:text;cursor:text}
.world .door-marker,.world .salon-building,.world .bus-stop{cursor:pointer}
.world img{-webkit-user-drag:none}
.mobile-controls{justify-content:center}
