:root { --azul-soma: #176b87; --azul-suave: #e0f4ff; --verde-suave: #e5f7e5; --mesa-clara: #fff2cf; --mesa-borda: #b77a35; --texto-soma: #30434c; --foco-soma: #7b46b3; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { min-height: 100vh; margin: 0; color: var(--texto-soma); background: linear-gradient(145deg, #eefaff, #f4faed); font-family: system-ui, sans-serif; }
.pagina-soma { width: min(1180px, calc(100% - 28px)); min-height: 100vh; margin: auto; padding: 8px 0 12px; }
.navegacao-ambiente { position: fixed; z-index: 100; inset-block-start: 12px; inset-inline: 12px; display: flex; justify-content: space-between; gap: 12px; pointer-events: none; }
.navegacao-ambiente .botao { min-width: 112px; min-height: 50px; background: rgb(255 255 255 / 96%); border-color: #bddce9; box-shadow: 0 7px 18px rgb(47 93 113 / 14%); pointer-events: auto; cursor: pointer; }
.cartao-tela { height: calc(100svh - 20px); min-height: 0; border: 3px solid #fff; border-radius: 32px; background: rgb(255 255 255 / 95%); box-shadow: 0 18px 50px rgb(53 102 122 / 14%); }
.escolha-objeto { display: grid; grid-template-rows: auto minmax(0, 1fr); align-items: center; gap: clamp(12px, 2vh, 22px); padding: clamp(22px, 4vh, 42px) clamp(24px, 5vw, 58px); text-align: center; }
.cabecalho-escolha { align-self: end; }
.cabecalho-escolha p { margin: 4px 0; }
.cabecalho-escolha h1 { margin: .1em 0; font-size: clamp(2rem, 5vw, 3.8rem); }
.opcoes-objetos { display: grid; grid-template-columns: repeat(5, minmax(120px, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); align-self: stretch; gap: clamp(10px, 1.6vw, 18px); max-height: 510px; }
.opcao-objeto { min-width: 0; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; place-items: center; gap: 5px; padding: 10px; border: 3px solid #bddce9; border-radius: 22px; color: var(--texto-soma); background: linear-gradient(145deg, #fff, var(--azul-suave)); font: 850 1rem/1.15 system-ui, sans-serif; cursor: pointer; }
.opcao-objeto img { width: min(100%, 112px); height: min(100%, 112px); min-height: 60px; object-fit: contain; }
.atividade { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; align-content: stretch; gap: clamp(5px, .8vh, 8px); padding: 56px clamp(12px, 2vw, 24px) 8px; }
.orientacao { min-height: 48px; display: grid; justify-items: center; align-content: center; gap: 0; padding-inline: 180px; text-align: center; }
.instrucao { margin: 0; font-size: clamp(1.18rem, 2.5vw, 1.7rem); font-weight: 900; }
.feedback { min-height: 1.3em; margin: 0; color: #793f22; font-weight: 800; }
.area-concreta { min-height: 0; display: grid; grid-template-columns: minmax(150px, .23fr) minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); column-gap: clamp(12px, 2vw, 22px); row-gap: 6px; }
.controles-mesa { grid-column: 2; display: flex; justify-content: flex-end; align-items: center; gap: 8px; min-height: 48px; }
.botao-controle-mesa { min-height: 46px; display: inline-grid; grid-template-columns: 1.55rem auto; align-items: center; gap: .42rem; padding: .32rem .76rem; color: var(--texto-soma); background: rgb(255 255 255 / 96%); border: 2px solid #9dcfe3; border-radius: 999rem; box-shadow: 0 .22rem .7rem rgb(38 50 56 / 12%); font: 800 .86rem/1.1 system-ui, sans-serif; cursor: pointer; }
.botao-controle-mesa svg { width: 1.55rem; height: 1.55rem; fill: none; stroke: var(--azul-soma); stroke-linecap: round; stroke-linejoin: round; stroke-width: 4; }
.botao-controle-mesa svg path:last-child { fill: var(--azul-soma); stroke: var(--azul-soma); }
.botao-trocar-objeto { grid-template-columns: 2.35rem 1.55rem auto; }
.botao-trocar-objeto img { width: 2.35rem; height: 2.35rem; object-fit: contain; }
.area-disponivel { display: grid; place-items: center; min-height: 0; border: 3px dashed #bddce9; border-radius: 24px; background: var(--azul-suave); }
.objeto-disponivel { width: min(82%, 150px); min-height: 150px; display: grid; place-items: center; gap: 2px; padding: 8px; border: 3px solid #78b6cc; border-radius: 22px; color: var(--azul-soma); background: #fff; font: 850 .92rem/1.1 system-ui, sans-serif; cursor: grab; touch-action: manipulation; }
.objeto-disponivel img { width: min(100%, 104px); height: 104px; object-fit: contain; }
.objeto-disponivel.arrastando { opacity: .55; cursor: grabbing; }
.mesa { min-height: 250px; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: stretch; gap: clamp(8px, 1.2vw, 16px); padding: clamp(12px, 2vw, 22px); border: 7px solid var(--mesa-borda); border-radius: 28px 28px 42px 42px; background: linear-gradient(160deg, #fff8df, var(--mesa-clara)); box-shadow: inset 0 -10px 0 rgb(183 122 53 / 12%); transition: border-color .15s, background .15s; }
.mesa[data-stage="first"] { grid-template-columns: minmax(0, 1fr); }
.mesa.recebendo { border-color: var(--foco-soma); background: #f5effb; }
.grupo-mesa { min-width: 0; width: max-content; max-width: 100%; display: grid; grid-template-columns: repeat(var(--group-columns, 1), minmax(42px, 68px)); grid-auto-rows: minmax(68px, 1fr); align-content: center; align-items: center; gap: clamp(4px, .6vw, 7px); padding: 7px; border-radius: 20px; background: rgb(255 255 255 / 46%); }
#primeiro-grupo { direction: rtl; justify-self: end; }
#primeiro-grupo > * { direction: ltr; }
#segundo-grupo { justify-self: start; }
.grupo-mesa:empty { background: transparent; }
.sinal-mais { align-self: center; color: var(--azul-soma); font: 950 clamp(2.8rem, 5vw, 4.5rem)/1 system-ui, sans-serif; }
.objeto-na-mesa { display: grid; place-items: center; width: 100%; height: 100%; }
.objeto-na-mesa img { width: min(100%, 68px); height: min(9vh, 68px); min-height: 48px; object-fit: contain; }
.objeto-chegando { animation: objeto-chegando .24s ease-out; }
.alternativas { display: grid; grid-template-columns: repeat(3, minmax(90px, 150px)); justify-content: center; gap: clamp(14px, 3vw, 28px); }
.alternativa { min-height: 72px; border: 3px solid #78b6cc; border-radius: 20px; color: var(--azul-soma); background: #fff; font: 950 clamp(2rem, 4vw, 3rem)/1 system-ui, sans-serif; cursor: pointer; }
.resultado { display: grid; justify-items: center; align-content: center; gap: 2px; text-align: center; }
.expressao { margin: 0; color: var(--azul-soma); font: 950 clamp(2.5rem, 6vw, 4.4rem)/1 system-ui, sans-serif; }
.resultado-apoio { margin: 0; font-weight: 800; }
.falha { padding: 72px 30px; }
.opcao-objeto:hover, .objeto-disponivel:hover, .alternativa:hover { background: var(--azul-suave); }
.opcao-objeto:focus-visible, .objeto-disponivel:focus-visible, .alternativa:focus-visible, .botao:focus-visible { outline: 5px solid var(--foco-soma); outline-offset: 3px; }
@keyframes objeto-chegando { from { opacity: .2; transform: translateY(-18px) scale(.75); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
