:root {
    --ink: #29372f;
    --muted: #69766f;
    --page: #f4f3e9;
    --surface: #fffefa;
    --cream: #fff8e8;
    --border: #e4ddc9;
    --green: #3d7659;
    --green-dark: #28543f;
    --green-soft: #eaf4ec;
    --gold: #f3bd36;
    --gold-light: #ffe487;
    --gold-dark: #bd7408;
    --orange: #e66f28;
    --brown: #74513d;
    --correct: #16815a;
    --correct-soft: #e4f7ee;
    --wrong: #c74350;
    --wrong-soft: #fff0f2;
    --focus: #1677ff;
    --shadow: 0 18px 50px rgba(53, 72, 60, .13);
    --radius-lg: 28px;
    --radius-md: 18px;
    font-family: "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { min-width: 320px; min-height: 100%; background: var(--page); }

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at 8% 12%, rgba(243, 189, 54, .22), transparent 24rem),
        radial-gradient(circle at 92% 82%, rgba(61, 118, 89, .16), transparent 28rem),
        linear-gradient(145deg, #f7f5eb, #eef3e9);
}

button { font: inherit; -webkit-tap-highlight-color: transparent; }
button:focus-visible, [role="button"]:focus-visible { outline: 4px solid rgba(22,119,255,.34); outline-offset: 3px; }

.app-shell { width: min(1200px, calc(100% - 32px)); min-height: 100vh; margin: 0 auto; padding: 20px 0 38px; }
.app-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 1.08rem; font-weight: 900; }
.brand-mark { display: grid; width: 52px; height: 44px; place-items: center; color: #fff; background: #d71920; border-radius: 14px 14px 14px 5px; box-shadow: 0 6px 14px rgba(87,50,44,.18); font-family: Georgia, serif; font-size: 2rem; transform: rotate(-3deg); }
.header-theme { display: flex; align-items: center; gap: 8px; color: var(--green-dark); font-size: .9rem; font-weight: 800; }
.mini-barra { width: 8px; height: 30px; border: 1px solid var(--gold-dark); border-radius: 2px; background: repeating-linear-gradient(to bottom, var(--gold-light) 0 2px, var(--gold) 2px 3px); }
.mini-cubo { width: 13px; height: 13px; border: 1px solid var(--gold-dark); border-radius: 3px; background: var(--gold); }

.quiz-container { width: 100%; }
.screen { display: none; animation: screen-in 400ms ease-out; }
.screen.active { display: block; }

.welcome-screen, .result-screen, .ad-screen {
    width: min(760px, 100%);
    margin: 0 auto;
    padding: clamp(28px, 5vw, 52px);
    text-align: center;
    background: rgba(255,254,250,.97);
    border: 1px solid rgba(228,221,201,.9);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.hero-scene { position: relative; width: 300px; height: 180px; margin: -12px auto 8px; }
.avatar-container { position: absolute; inset: 28px 32px 22px; display: flex; align-items: center; justify-content: center; gap: 18px; padding-top: 17px; border: 2px solid #e8c46a; border-radius: 80px 80px 58px 58px; background: radial-gradient(circle at 50% 36%, #fffbe9 0 42%, #f6e6b8 100%); box-shadow: inset 0 -10px 22px rgba(145,94,16,.08), 0 9px 0 #ebd89e; }
.coelho-avatar, .urso-avatar { position: relative; width: 70px; height: 65px; border-radius: 50% 50% 46% 46%; filter: drop-shadow(0 5px 2px rgba(64,49,34,.12)); }
.coelho-avatar { background: #f3d5ad; }
.coelho-avatar::before, .coelho-avatar::after { content: ''; position: absolute; top: -33px; width: 17px; height: 42px; background: #f3d5ad; border: 2px solid #dfb981; border-bottom: 0; border-radius: 50% 50% 8px 8px; }
.coelho-avatar::before { left: 11px; transform: rotate(-11deg); }
.coelho-avatar::after { right: 11px; transform: rotate(11deg); }
.urso-avatar { background: #8c6954; }
.urso-avatar::before, .urso-avatar::after { content: ''; position: absolute; top: -5px; width: 23px; height: 23px; border: 3px solid #765441; border-radius: 50%; background: #8c6954; }
.urso-avatar::before { left: -4px; }
.urso-avatar::after { right: -4px; }
.olhos { position: absolute; z-index: 2; top: 20px; display: flex; width: 100%; justify-content: space-between; padding: 0 15px; }
.olho { width: 8px; height: 8px; border-radius: 50%; background: #263238; box-shadow: inset 2px 1px #fff; }
.focinho-urso { position: absolute; z-index: 2; top: 31px; left: 50%; width: 25px; height: 18px; border-radius: 50%; background: #d8c6ba; transform: translateX(-50%); }
.nariz-urso { position: absolute; top: 2px; left: 50%; width: 11px; height: 7px; border-radius: 5px; background: #4e342e; transform: translateX(-50%); }
.nariz-coelho { position: absolute; top: 31px; left: 50%; width: 11px; height: 7px; border-radius: 0 0 6px 6px; background: #ed9d8d; transform: translateX(-50%); }
.boca-coelho { position: absolute; top: 40px; left: 50%; width: 15px; height: 7px; border-bottom: 2px solid #a65c38; border-radius: 0 0 9px 9px; transform: translateX(-50%); }
.hero-material { position: absolute; right: 12px; bottom: 3px; display: flex; align-items: flex-end; gap: 5px; transform: rotate(8deg); }
.hero-material .barra-dz { height: 58px; }
.folha { position: absolute; width: 30px; height: 18px; border-radius: 100% 0 100% 0; background: #79a86c; }
.folha-left { left: 2px; bottom: 38px; transform: rotate(-28deg); }
.folha-right { right: 0; top: 20px; transform: rotate(25deg); }
.brilho { position: absolute; color: var(--gold-dark); }
.brilho-one { left: 22px; top: 22px; font-size: 22px; }
.brilho-two { right: 20px; bottom: 38px; font-size: 14px; }

.eyebrow, .question-type { margin: 0 0 7px; color: var(--green); font-size: .82rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
h1 { margin: 0 0 12px; font-size: clamp(2.2rem, 7vw, 3.8rem); line-height: 1; letter-spacing: -.045em; }
.welcome-screen h1 span { display: block; margin-top: 7px; color: var(--orange); font-size: .58em; letter-spacing: -.025em; }
.welcome-copy, .result-copy { max-width: 570px; margin: 0 auto 26px; color: var(--muted); font-size: clamp(1rem, 2.5vw, 1.18rem); line-height: 1.55; }

.btn-primary { display: inline-flex; min-height: 54px; align-items: center; justify-content: center; gap: 10px; padding: 12px 25px; color: #fff; background: var(--green); border: 2px solid var(--green); border-radius: 15px; box-shadow: 0 7px 0 var(--green-dark); cursor: pointer; font-size: 1.05rem; font-weight: 900; transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease; }
.btn-primary:hover:not(:disabled) { background: #356b50; transform: translateY(-2px); }
.btn-primary:active:not(:disabled) { box-shadow: 0 3px 0 var(--green-dark); transform: translateY(4px); }
.btn-primary:disabled { cursor: default; opacity: .55; box-shadow: 0 3px 0 #7f9488; }

.ad-screen { min-height: 420px; }
.ad-heading p { margin: 12px 0 4px; color: var(--ink); font-size: 1.15rem; font-weight: 900; }
.ad-heading small { color: var(--muted); }
.loading-cubes { display: flex; height: 35px; align-items: flex-end; justify-content: center; gap: 6px; }
.loading-cubes span { width: 18px; height: 18px; border: 2px solid var(--gold-dark); border-radius: 4px; background: var(--gold); animation: cube-bounce 900ms infinite alternate ease-in-out; }
.loading-cubes span:nth-child(2) { animation-delay: 150ms; }.loading-cubes span:nth-child(3) { animation-delay: 300ms; }
.bloco-anuncio { width: 100%; max-width: 520px; min-height: 90px; margin: 24px auto 18px; overflow: hidden; text-align: center; }

.game-layout { display: grid; grid-template-columns: 290px minmax(0,1fr); align-items: start; gap: 18px; }
.status-card, .question-card { background: rgba(255,254,250,.97); border: 1px solid rgba(228,221,201,.9); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.status-card { position: sticky; top: 18px; padding: 22px; }
.question-counter { margin-bottom: 9px; color: var(--green-dark); font-size: 1.05rem; font-weight: 900; }
.progress-bar-container { width: 100%; height: 12px; overflow: hidden; margin-bottom: 18px; border-radius: 99px; background: #e6e7dd; }
.progress-bar { width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--green), #6fa076); transition: width 350ms ease; }
.score-board { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.score-hits, .score-errors { display: grid; min-height: 60px; place-items: center; padding: 9px 5px; border-radius: 14px; font-weight: 900; text-align: center; }
.score-hits { color: #0b6844; background: var(--correct-soft); }.score-errors { color: #9e3040; background: var(--wrong-soft); }
.side-friends { display: flex; justify-content: center; gap: 12px; margin-top: 22px; padding-top: 20px; border-top: 1px dashed #d4d9c9; }
.coelho-mini, .urso-mini { position: relative; width: 78px; padding: 35px 5px 8px; border-radius: 40px 40px 15px 15px; color: var(--brown); background: #f7ead8; font-size: .78rem; font-weight: 900; text-align: center; }
.coelho-mini::before, .urso-mini::before { content: ''; position: absolute; top: 9px; left: 50%; width: 34px; height: 29px; border-radius: 50%; transform: translateX(-50%); }
.coelho-mini::before { background: #f3d5ad; }.urso-mini::before { background: #8c6954; }

.question-card { min-width: 0; padding: clamp(24px, 4vw, 38px); text-align: center; }
.question-text { max-width: 760px; margin: 0 auto 24px; font-size: clamp(1.16rem, 2.4vw, 1.45rem); font-weight: 800; line-height: 1.48; }
.mesa-material { display: flex; min-height: 260px; align-items: center; justify-content: center; gap: clamp(24px,4vw,50px); margin-bottom: 24px; padding: 26px; border: 2px dashed #d8bd78; border-radius: 24px; background: linear-gradient(rgba(255,254,247,.9),rgba(255,254,247,.9)), repeating-linear-gradient(0deg, transparent 0 31px, #eadfbd 32px), repeating-linear-gradient(90deg, transparent 0 31px, #eadfbd 32px), #fbf4de; box-shadow: inset 0 -10px 22px rgba(123,80,15,.05); }
.grupo-dezenas, .grupo-unidades { display: flex; max-width: 48%; align-content: center; align-items: center; justify-content: center; flex-wrap: wrap; gap: 7px; }
.barra-dz { display: block; width: 18px; height: 94px; flex: 0 0 auto; border: 1.5px solid var(--gold-dark); border-radius: 4px; background: repeating-linear-gradient(to bottom, transparent 0 7.8px, rgba(133,76,4,.45) 7.8px 9.4px), linear-gradient(90deg,#e9a91f,#ffe681 42%,#e6a019); box-shadow: inset 2px 0 rgba(255,255,255,.35), 0 5px 5px rgba(107,65,8,.17); }
.cubo-un { display: block; width: 18px; height: 18px; flex: 0 0 auto; border: 1.5px solid var(--gold-dark); border-radius: 4px; background: linear-gradient(135deg,#ffe98b,#f0b52d 68%); box-shadow: inset 3px 2px rgba(255,255,255,.38), 0 4px 4px rgba(107,65,8,.16); }

.options-grid { display: grid; grid-template-columns: repeat(2,minmax(100px,1fr)); gap: 13px; max-width: 620px; margin: 0 auto; }
.option-btn { min-height: 72px; padding: 12px; color: var(--ink); background: #fff; border: 3px solid var(--border); border-radius: 18px; box-shadow: 0 5px 0 #d2ccb9; cursor: pointer; font-size: 1.75rem; font-weight: 900; transition: transform 140ms ease, border-color 140ms ease, background 140ms ease; }
.option-btn:hover:not(:disabled) { border-color: var(--green); background: var(--green-soft); transform: translateY(-2px); }
.option-btn:disabled { cursor: default; opacity: .62; }
.option-btn.correct { color: #07593c; background: var(--correct-soft); border-color: var(--correct); box-shadow: 0 5px 0 #0a6b49; opacity: 1; }
.option-btn.wrong { color: #8e2636; background: var(--wrong-soft); border-color: var(--wrong); box-shadow: 0 5px 0 #a43042; opacity: 1; }

.area-decomposicao { display: grid; gap: 16px; }
.caixa-destino { position: relative; display: flex; min-height: 250px; align-items: center; justify-content: center; gap: 28px; padding: 38px 22px 24px; border: 3px dashed #cfa343; border-radius: 24px; background: linear-gradient(180deg,#fffdf5,#f8efd5); box-shadow: inset 0 -10px 22px rgba(123,80,15,.06); transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease; }
.caixa-destino.drag-over { border-color: var(--green); background: var(--green-soft); box-shadow: inset 0 0 0 4px rgba(61,118,89,.1), 0 8px 24px rgba(61,118,89,.16); transform: scale(1.01); }
.caixa-destino.resposta-correta { border-color: var(--correct); background: var(--correct-soft); }
.caixa-destino.resposta-errada { border-color: var(--wrong); background: var(--wrong-soft); }
.caixa-label { position: absolute; top: -14px; left: 50%; width: max-content; max-width: calc(100% - 26px); padding: 7px 14px; color: #fff; background: var(--green); border-radius: 99px; box-shadow: 0 4px 10px rgba(40,84,63,.18); font-size: .84rem; font-weight: 900; transform: translateX(-50%); }
.caixa-vazia-msg { color: #89928d; font-weight: 700; }
.caixa-destino .grupo-dezenas, .caixa-destino .grupo-unidades { max-width: 48%; }
.painel-selecao { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 13px; border: 1px solid var(--border); border-radius: 20px; background: #f7f5ed; }
.peca-fonte { display: flex; min-height: 124px; align-items: center; justify-content: center; gap: 18px; padding: 14px 18px; color: var(--green-dark); background: #fff; border: 2px solid #dfce9e; border-radius: 17px; box-shadow: 0 4px 0 #d5c28d; cursor: grab; font-weight: 900; touch-action: none; user-select: none; transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease; }
.peca-fonte:hover { border-color: var(--gold-dark); transform: translateY(-2px); }
.peca-fonte.is-dragging { z-index: 50; cursor: grabbing; filter: drop-shadow(0 12px 10px rgba(67,54,30,.24)); transform: translateY(-6px) scale(1.06); }
.peca-fonte.is-disabled { cursor: default; opacity: .5; }
.peca-fonte .barra-dz { height: 72px; }.peca-fonte .cubo-un { width: 26px; height: 26px; }
.drag-copy { display: grid; gap: 4px; text-align: left; }.drag-copy small { color: var(--muted); font-size: .77rem; font-weight: 700; }
.drag-ghost { position: fixed; z-index: 1000; pointer-events: none; opacity: .9; filter: drop-shadow(0 12px 9px rgba(55,43,20,.28)); transform: translate(-50%,-50%) scale(1.14); }
.action-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.btn-limpar { min-height: 46px; padding: 9px 18px; color: #8e3a3d; background: #fff; border: 2px solid #e2b7b6; border-radius: 13px; cursor: pointer; font-weight: 900; }
.btn-limpar:hover:not(:disabled) { background: var(--wrong-soft); }.btn-limpar:disabled { cursor: default; opacity: .5; }
.confirm-area { margin-top: 18px; text-align: center; }
.feedback-decomposicao { width: 100%; color: #802d36; font-size: .92rem; font-weight: 900; text-align: center; }
body.dragging-piece { overflow: hidden; overscroll-behavior: none; touch-action: none; }

.result-screen h1 { font-size: clamp(2.1rem,6vw,3.3rem); }
.result-illustration { position: relative; width: 150px; height: 135px; margin: -12px auto 8px; }
.medal { position: absolute; left: 25px; top: 4px; display: grid; width: 100px; height: 100px; place-items: center; border: 8px solid #d99412; border-radius: 50%; background: var(--gold); box-shadow: 0 9px 15px rgba(119,72,8,.2); }
.medal::before, .medal::after { content: ''; position: absolute; z-index: -1; top: 70px; width: 38px; height: 62px; background: var(--green); clip-path: polygon(0 0,100% 0,82% 100%,50% 77%,15% 100%); }
.medal::before { left: 7px; transform: rotate(14deg); }.medal::after { right: 7px; background: var(--orange); transform: rotate(-14deg); }
.medal span { color: #fff6c7; font-size: 3.4rem; text-shadow: 0 3px #c0810b; }
.result-spark { position: absolute; color: var(--gold-dark); }.spark-left { left: 0; top: 28px; font-size: 22px; }.spark-right { right: 0; top: 55px; font-size: 17px; }
.score-circle { display: grid; width: 156px; min-height: 96px; place-items: center; margin: 0 auto 16px; padding: 12px; color: var(--green-dark); background: var(--gold-soft,#fff5d3); border: 2px solid #e6c76e; border-radius: 24px; font-size: 2.7rem; font-weight: 900; }
#performance-message { max-width: 560px; margin: 0 auto 24px; color: var(--orange); font-size: 1.15rem; font-weight: 900; line-height: 1.45; }

@keyframes screen-in { from { opacity: 0; transform: translateY(12px); } }
@keyframes cube-bounce { to { transform: translateY(-8px) rotate(4deg); } }

@media (max-width: 899px) {
    .app-shell { width: min(100% - 24px,820px); }
    .game-layout { grid-template-columns: 1fr; }
    .status-card { position: static; padding: 16px 20px; }
    .side-friends { display: none; }
    .score-board { grid-template-columns: 1fr 1fr; }
    .score-hits, .score-errors { min-height: 48px; }
    .mesa-material, .caixa-destino { min-height: 230px; }
}

@media (max-width: 520px) {
    .question-card:has(.area-decomposicao) {
        padding-top: 14px;
        padding-bottom: 16px;
    }

    .question-card:has(.area-decomposicao) .question-text {
        margin-bottom: 12px;
    }

    .app-shell { width: min(100% - 18px,1200px); padding: 10px 0 24px; }
    .app-header { margin-bottom: 10px; }.brand-mark { width: 46px; height: 39px; font-size: 1.75rem; }.header-theme span:last-child { display: none; }
    .welcome-screen, .result-screen, .ad-screen { padding: 24px 16px 28px; border-radius: 22px; }
    .hero-scene { width: 270px; max-width: 100%; height: 160px; transform: scale(.9); transform-origin: center bottom; margin-top: -20px; margin-bottom: -3px; }
    .question-card, .status-card { border-radius: 21px; }.question-card { padding: 22px 13px 26px; }
    .question-text { margin-bottom: 20px; font-size: 1.08rem; }
    .mesa-material { min-height: 210px; gap: 15px; padding: 18px 9px; border-radius: 20px; }
    .grupo-dezenas, .grupo-unidades { max-width: 49%; gap: 5px; }.barra-dz { width: 15px; height: 82px; }.cubo-un { width: 15px; height: 15px; }
    .options-grid { gap: 9px; }.option-btn { min-height: 64px; font-size: 1.55rem; }
    .caixa-destino { min-height: 225px; gap: 12px; padding: 38px 9px 18px; border-radius: 20px; }
    .caixa-label { top: 4px; font-size: .74rem; }.painel-selecao { gap: 8px; padding: 9px; }
    .peca-fonte { min-height: 112px; flex-direction: column; gap: 7px; padding: 10px 5px; }.peca-fonte .barra-dz { width: 13px; height: 52px; }.peca-fonte .cubo-un { width: 22px; height: 22px; }.drag-copy { text-align: center; }.drag-copy small { font-size: .7rem; }
    .btn-primary { width: 100%; }.action-row .btn-limpar { width: 100%; }
    .bloco-anuncio { margin-top: 18px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Refinamentos de compactação e miniaturas do painel lateral */
.hero-scene { width: 280px; height: 150px; margin: -10px auto 2px; }
.avatar-container { inset: auto; top: 0; left: 30px; width: 220px; height: 140px; gap: 15px; padding-top: 15px; border: 4px solid #fed7b7; border-radius: 70px; background: #fdf2e9; box-shadow: none; }
.coelho-avatar, .urso-avatar { width: 65px; height: 60px; filter: none; }
.coelho-avatar { background: #ffe0b2; }
.coelho-avatar::before, .coelho-avatar::after { top: -30px; width: 15px; height: 38px; border: 0; border-radius: 50% 50% 0 0; background: #ffe0b2; }
.coelho-avatar::before { left: 10px; border-left: 2px solid #ffcc80; transform: rotate(-12deg); }
.coelho-avatar::after { right: 10px; border-right: 2px solid #ffcc80; transform: rotate(12deg); }
.urso-avatar { border-radius: 50% 50% 48% 48%; background: #a1887f; }
.urso-avatar::before, .urso-avatar::after { top: -4px; width: 20px; height: 20px; border: 0; background: #a1887f; }
.urso-avatar::before { left: -3px; border-left: 3px solid #8d6e63; }.urso-avatar::after { right: -3px; border-right: 3px solid #8d6e63; }
.olhos { top: 18px; padding: 0 14px; }.olho { width: 7px; height: 7px; box-shadow: none; }
.focinho-urso { top: 28px; width: 22px; height: 16px; }.nariz-urso { width: 10px; height: 6px; }
.nariz-coelho { top: 28px; width: 10px; height: 6px; background: #ffab91; }.boca-coelho { top: 36px; width: 14px; height: 6px; border-color: #e65100; }
.hero-material { right: 0; }

.side-friends { gap: 12px; margin-top: 14px; padding-top: 13px; }
.friend-mini { display: grid; width: 82px; justify-items: center; gap: 5px; padding: 7px 5px 6px; color: var(--brown); border-radius: 16px; background: #f8efe0; font-size: .76rem; font-weight: 900; }
.mini-face { position: relative; width: 48px; height: 42px; border: 2px solid rgba(92,63,44,.2); border-radius: 50% 50% 45% 45%; box-shadow: inset 0 -5px rgba(96,56,30,.06); }
.mini-rabbit { background: #f3d5ad; }.mini-bear { background: #8c6954; }
.mini-ear { position: absolute; z-index: -1; top: -20px; width: 13px; height: 26px; border: 2px solid #d5aa76; border-radius: 50% 50% 35% 35%; background: #f3d5ad; }
.mini-ear::after { content: ''; position: absolute; inset: 4px 3px; border-radius: inherit; background: #edb9aa; }
.mini-ear-left { left: 7px; transform: rotate(-9deg); }.mini-ear-right { right: 7px; transform: rotate(9deg); }
.mini-bear-ear { position: absolute; z-index: -1; top: -6px; width: 17px; height: 17px; border: 3px solid #72503e; border-radius: 50%; background: #a98772; }
.mini-bear-ear-left { left: -5px; }.mini-bear-ear-right { right: -5px; }
.mini-eye { position: absolute; top: 14px; width: 7px; height: 8px; border-radius: 50%; background: #27322d; box-shadow: inset 2px 2px #fff; }
.mini-eye-left { left: 10px; }.mini-eye-right { right: 10px; }
.mini-rabbit-nose { position: absolute; top: 24px; left: 50%; width: 9px; height: 6px; border-radius: 50% 50% 65% 65%; background: #df8f84; transform: translateX(-50%); }
.mini-rabbit-mouth { position: absolute; top: 30px; left: 50%; width: 14px; height: 6px; border-bottom: 2px solid #9e5e43; border-radius: 0 0 10px 10px; transform: translateX(-50%); }
.mini-bear-muzzle { position: absolute; top: 23px; left: 50%; width: 22px; height: 15px; border-radius: 50%; background: #d9c5b7; transform: translateX(-50%); }
.mini-bear-muzzle i { position: absolute; top: 1px; left: 50%; width: 9px; height: 6px; border-radius: 5px 5px 7px 7px; background: #4a332b; transform: translateX(-50%); }

@media (min-width: 900px) {
    .welcome-screen, .result-screen { padding-top: 26px; padding-bottom: 30px; }
    .welcome-copy, .result-copy { margin-bottom: 18px; }
    .question-card { padding: 20px 26px 24px; }
    .question-text { margin-bottom: 16px; font-size: clamp(1.1rem, 1.8vw, 1.3rem); line-height: 1.4; }
    .mesa-material { min-height: 180px; gap: 30px; margin-bottom: 16px; padding: 15px 18px; }
    .caixa-destino { min-height: 175px; gap: 18px; padding: 32px 16px 15px; }
    .area-decomposicao { gap: 11px; }.painel-selecao { padding: 9px; }
    .peca-fonte { min-height: 88px; padding: 8px 14px; }.peca-fonte .barra-dz { height: 56px; }
    .confirm-area { margin-top: 11px; }
    .result-illustration { height: 108px; margin-bottom: 0; transform: scale(.8); transform-origin: center top; }
    .score-circle { min-height: 78px; margin-bottom: 10px; padding: 8px; font-size: 2.35rem; }
    #performance-message { margin-bottom: 16px; }
    .result-screen .bloco-anuncio { margin-top: 14px; margin-bottom: 13px; }
}

@media (max-width: 520px) {
    .hero-scene { width: 270px; height: 145px; }
    .avatar-container { left: 25px; }
    .mesa-material, .caixa-destino { min-height: 190px; }
    .peca-fonte { min-height: 98px; }
}

/* Ajustes finais: Tuco lateral e redução vertical no desktop */
.mini-rabbit {
    width: 50px;
    height: 40px;
    border-radius: 48% 48% 46% 46%;
    transform: translateY(2px);
}

.mini-rabbit .mini-ear {
    z-index: 0;
    top: -15px;
    width: 12px;
    height: 22px;
    border-width: 2px;
    border-radius: 55% 55% 38% 38%;
}

.mini-rabbit .mini-ear-left { left: 8px; transform: rotate(-7deg); }
.mini-rabbit .mini-ear-right { right: 8px; transform: rotate(7deg); }
.mini-rabbit .mini-eye,
.mini-rabbit-nose,
.mini-rabbit-mouth { z-index: 1; }
.mini-rabbit .mini-eye { top: 13px; }
.mini-rabbit-nose { top: 23px; }
.mini-rabbit-mouth { top: 28px; width: 13px; height: 6px; }

@media (min-width: 900px) {
    .app-shell { padding-top: 14px; padding-bottom: 18px; }
    .app-header { margin-bottom: 12px; }

    .question-card { padding-top: 16px; padding-bottom: 18px; }
    .question-type { margin-bottom: 4px; }
    .question-text { margin-bottom: 11px; line-height: 1.34; }

    .area-decomposicao { gap: 7px; }
    .caixa-destino {
        min-height: 154px;
        gap: 14px;
        padding-top: 25px;
        padding-bottom: 10px;
    }
    .caixa-label { top: -12px; padding-top: 5px; padding-bottom: 5px; }
    .painel-selecao { gap: 9px; padding-top: 6px; padding-bottom: 6px; }
    .peca-fonte { min-height: 76px; gap: 12px; padding-top: 5px; padding-bottom: 5px; }
    .peca-fonte .barra-dz { height: 50px; }
    .peca-fonte .cubo-un { width: 22px; height: 22px; }
    .action-row { gap: 8px; }
    .btn-limpar { min-height: 40px; padding-top: 6px; padding-bottom: 6px; }
    .confirm-area { margin-top: 7px; }
    .confirm-area .btn-primary { min-height: 48px; padding-top: 9px; padding-bottom: 9px; }

    .mesa-material { min-height: 164px; margin-bottom: 12px; padding-top: 11px; padding-bottom: 11px; }
    .options-grid { gap: 9px; }
    .option-btn { min-height: 62px; padding-top: 8px; padding-bottom: 8px; }

    .result-screen { padding-bottom: 20px; }
    .result-screen .result-copy { margin-bottom: 12px; }
    .result-screen #performance-message { margin-bottom: 6px; }
    .result-screen .bloco-anuncio { min-height: 0; margin-top: 4px; margin-bottom: 8px; }
}

@media (max-width: 520px) {
    .area-decomposicao {
        position: relative;
        gap: 6px;
    }

    .caixa-destino {
        min-height: 112px;
        gap: 3px;
        padding: 25px 40px 6px 6px;
        overflow: hidden;
    }

    .caixa-destino .grupo-dezenas {
        max-width: none;
        flex: 0 0 auto;
        flex-wrap: nowrap;
        gap: 2px;
    }

    .caixa-destino .grupo-unidades {
        max-width: none;
        flex: 0 0 auto;
        flex-direction: column;
        flex-wrap: nowrap;
        gap: 0;
    }

    .caixa-destino .barra-dz {
        width: 12px;
        height: 60px;
    }

    .caixa-destino .cubo-un {
        width: 9px;
        height: 9px;
    }

    .action-row {
        position: absolute;
        z-index: 2;
        top: 7px;
        right: 7px;
    }

    .action-row .btn-limpar {
        width: 32px;
        min-height: 32px;
        padding: 0;
        overflow: hidden;
        border-radius: 9px;
        font-size: 0;
    }

    .action-row .btn-limpar::before {
        content: '\00d7';
        font-size: 1.35rem;
        line-height: 1;
    }

    .painel-selecao {
        padding-top: 6px;
        padding-bottom: 6px;
    }

    .peca-fonte {
        min-height: 82px;
        padding-top: 6px;
        padding-bottom: 6px;
    }

    .confirm-area {
        margin-top: 4px;
    }
}
