@media(max-width:900px){.menu-paths{grid-template-columns:1fr}.journey-grid{grid-template-columns:repeat(2,1fr)}.board{width:100%}.game-hud{grid-template-columns:auto 1fr auto}.compact-stats{grid-column:2/3;grid-row:2;justify-self:start}.hud-actions{grid-column:3;grid-row:1/3}.foundation-cluster{gap:4px}.stock-cluster{gap:4px}.game-dock{grid-template-columns:1fr auto}.auto-btn{grid-column:1/-1}.power-btn{min-width:130px}}
@media(max-width:600px){:root{--gap:4px}.menu-topbar,.sub-topbar{height:68px}.menu-main{margin-top:4px}.menu-hero{padding-top:14px}.menu-hero h1{font-size:64px}.hero-sub{font-size:16px}.menu-progress{grid-template-columns:1fr 1fr 1fr}.path-card{grid-template-columns:50px 1fr auto;padding:16px}.path-icon{width:50px;height:50px;border-radius:16px}.path-card strong{font-size:21px}.journey-grid{grid-template-columns:1fr}.journey-heading h2{font-size:44px}.game-hud{height:64px;padding-top:max(8px,env(safe-area-inset-top));gap:7px}.game-title small{font-size:10px}.round-btn{width:42px;height:42px;border-radius:14px}.hud-actions{gap:4px}.board{padding-left:5px;padding-right:5px}.board-top{gap:8px;margin-bottom:7px}.tableau-wrap{margin-top:14px}.pile-slot{border-radius:10px}.pile-slot small{font-size:7px;bottom:-13px}.stock-slot small,.waste-slot small{display:none}.card-center small{display:none}.game-dock{margin-bottom:max(5px,env(safe-area-inset-bottom));padding:8px 9px;border-radius:18px}.energy-title{font-size:9px}.energy-gems i{width:13px;height:9px}.power-btn,.auto-btn{font-size:11px;padding:0 9px;min-height:42px}.stuck-banner{bottom:79px;grid-template-columns:1fr 1fr;padding:11px}.stuck-banner div{grid-column:1/-1}.tutorial-stage{min-height:260px;gap:20px;padding:20px}.tutorial-card,.tutorial-foundation{width:96px;height:136px}.pause-summary,.win-stats{grid-template-columns:1fr 1fr 1fr}.panel{padding:24px 18px}.panel h2{font-size:33px}.achievement-grid{grid-template-columns:1fr}.toast{bottom:86px}.objective-strip{margin-bottom:4px;grid-template-columns:1fr auto}.objective-strip>span{grid-column:1/-1}.objective-track{grid-column:1}.objective-strip>strong{grid-column:2}.compact-stats{font-size:11px;gap:7px}}
@media(max-width:390px){.game-title{display:none}.game-hud{grid-template-columns:auto 1fr auto}.compact-stats{grid-column:2;grid-row:1;justify-self:center}.hud-actions{grid-column:3;grid-row:1}.foundation-cluster,.stock-cluster{gap:3px}.board-top{gap:4px}.menu-progress strong{font-size:22px}.tutorial-stage{gap:12px}.tutorial-card,.tutorial-foundation{width:86px;height:122px}.tutorial-card b{font-size:40px}.tutorial-card span{font-size:26px}}
@media(max-height:600px) and (orientation:landscape){.game-hud{height:54px;padding:5px 10px}.round-btn{width:38px;height:38px}.objective-strip{padding:6px 11px;margin-bottom:3px}.board{padding-top:0}.board-top{margin-bottom:4px}.tableau-wrap{margin-top:9px}.game-dock{padding:5px 9px;margin-bottom:4px}.power-btn,.auto-btn{min-height:36px}.pile-slot small{display:none}}

/* PRISMA V3 · ETAPA 2 — ajustes responsivos finais */
@media(max-width:900px){
  .game-dock{grid-template-columns:minmax(0,1fr) auto;gap:8px}
  .auto-btn{grid-column:1/-1}
  .power-btn{min-width:128px}
}
@media(max-width:600px){
  .board{padding-left:5px;padding-right:5px}
  .board-top{gap:4px;margin-bottom:17px}
  .tableau-wrap{margin-top:5px}
  .pile-slot{border-radius:10px}
  .game-dock{grid-template-columns:minmax(0,1fr) auto;padding:7px 8px 7px 10px;border-radius:19px;margin-bottom:max(5px,env(safe-area-inset-bottom))}
  .energy-title{font-size:8px}.energy-gems i{width:27px;height:22px}.power-btn,.auto-btn{font-size:10px;padding:4px 8px;min-height:43px}
}
@media(max-width:390px){
  .board-top{gap:3px}
  .game-dock{gap:5px;padding-left:8px;padding-right:7px}
  .power-btn{min-width:101px}
}
@media(max-height:600px) and (orientation:landscape){
  .board-top{margin-bottom:7px}.tableau-wrap{margin-top:4px}.game-dock{padding:4px 8px;margin-bottom:4px}.power-btn,.auto-btn{min-height:37px}
}

/* Etapa 3: os feedbacks continuam claros sem cobrir o tabuleiro em telas pequenas. */
@media(max-width:600px){.flow-callout{bottom:78px;min-width:190px;padding:7px 11px}.flow-callout b{font-size:21px}.flow-callout span{font-size:10px}.convergence-fx,.resonance-fx{top:48%;max-width:86vw;padding:11px 14px}.convergence-prism{width:46px;height:46px}.convergence-fx b,.resonance-fx b{font-size:20px}.feel-beam{height:2px}}
@media(max-height:600px) and (orientation:landscape){.flow-callout{bottom:57px}.convergence-fx,.resonance-fx{top:46%;transform:translate(-50%,-50%) scale(.9)}}

/* PRISMA V3 · ETAPA 4 — mobile de verdade, não apenas desktop reduzido. */
@media(max-width:700px){
  .menu-topbar{height:62px;padding-top:10px;padding-bottom:8px}.brand-brain{width:36px;height:36px;border-radius:12px;font-size:24px}.brand-lockup b{font-size:15px}.brand-lockup small{font-size:10px}
  .menu-screen .menu-main{padding-left:14px;padding-right:14px;gap:12px}
  .menu-settings-btn{width:44px;height:44px}
  .hero-emblem{width:min(94vw,360px)}
  .menu-logo{width:min(88vw,320px)}
  .menu-tagline{font-size:14px;letter-spacing:.14em}
  .menu-screen .hero-actions{margin-top:14px;width:min(100%,390px);gap:10px}
  .menu-screen .hero-actions .primary-btn{min-height:52px}
  .menu-paths{gap:8px}.path-card{padding:13px 14px;min-height:93px;border-radius:20px;grid-template-columns:45px 1fr auto;gap:11px}.path-icon{width:45px;height:45px;border-radius:15px;font-size:24px}.path-card strong{font-size:19px}.path-card p{font-size:11px;margin-top:3px}.path-card small{font-size:8px}
  .menu-secondary{gap:6px}.menu-secondary button{min-height:58px;padding:8px;border-radius:16px;grid-template-columns:26px 1fr;column-gap:6px}.menu-secondary button>span{width:25px;height:25px;border-radius:8px;font-size:11px}.menu-secondary b{font-size:11px}.menu-secondary small{font-size:8px}.menu-progress>div{padding:8px}.menu-progress span{font-size:8px}.menu-progress strong{font-size:18px;margin-top:2px}
  .selection-helper{display:block;bottom:74px;max-width:94vw;padding:6px 10px}.selection-helper b{font-size:10px}.selection-helper span{font-size:9px}
  .card.selected .card-inner{transform:translateY(-8px) scale(1.075);transform-origin:50% 82%;box-shadow:0 0 0 3px #ffe18a,0 0 28px color-mix(in srgb,var(--accent) 48%,transparent)}
  .card.selected{z-index:8000!important}.card.connection-target .card-inner{box-shadow:0 0 0 3px rgba(255,226,124,.92),0 0 22px color-mix(in srgb,var(--accent) 42%,transparent)}
  .onboarding-coach{bottom:78px;width:calc(100% - 18px);padding:10px 12px 11px;border-radius:18px}.onboarding-coach strong{font-size:17px}.onboarding-coach p{font-size:10px;line-height:1.34}.coach-head{margin-bottom:2px}.coach-action{margin-top:7px;padding:6px 11px;font-size:10px}
}
@media(max-width:430px){
  .game-hud{grid-template-columns:auto 1fr auto;padding-left:7px;padding-right:7px}.game-title{display:grid;grid-column:2;grid-row:1;justify-self:center;text-align:center}.game-title small{display:none}.game-hud:has(.compact-stats:not([hidden])) .game-title{display:none}.compact-stats{grid-column:2;grid-row:1;justify-self:center}.hud-actions #btn-sound-game{display:none}.hud-actions{grid-column:3;grid-row:1}
  .connection-legend{opacity:.72}.connection-legend .legend-cycle,.connection-legend .legend-temperature{font-size:8px}.connection-legend>b{display:none}
  .foundation-name,.foundation-slot small{display:none!important}.foundation-count{font-size:8px!important}.foundation-ghost{width:42%!important}.nucleus-bar{width:58%!important}
  .selection-helper{bottom:72px}.selection-helper span{display:none}.selection-helper b::after{content:" · toque em um destino iluminado";color:#a9c0c2;font-weight:600}
  .onboarding-coach{bottom:72px}.game-screen.onboarding-active .selection-helper{display:none!important}
}
@media(max-height:600px) and (orientation:landscape){
  .onboarding-coach{left:auto;right:9px;bottom:52px;transform:none;width:min(320px,42vw);padding:8px 10px}.onboarding-coach strong{font-size:16px}.onboarding-coach p{font-size:9px}.selection-helper{bottom:53px}
  .menu-screen .menu-main{grid-template-columns:1fr;max-width:480px;align-content:center}
  .hero-emblem{width:min(42vw,220px)}
  .menu-logo{width:min(36vw,200px)}
  .menu-tagline{font-size:12px}
  .menu-screen .hero-actions{margin-top:8px;gap:8px}
  .menu-paths{grid-template-columns:1fr}.menu-secondary{grid-template-columns:repeat(3,1fr)}.menu-progress{grid-column:2}.menu-links{grid-column:2}.hero-sub{font-size:13px}
}
@media(max-height:600px) and (orientation:landscape){
  .board{width:100%;max-width:none}
}

/* Etapa 5 */
@media(max-width:900px){.menu-secondary{grid-template-columns:repeat(2,1fr)}.chapter-levels{grid-template-columns:repeat(2,1fr)}}
@media(max-width:600px){.play-promise{font-size:10px}.journey-chapter{padding:12px;border-radius:22px}.chapter-head{align-items:flex-start}.chapter-head>span{width:44px;height:44px;border-radius:14px;font-size:21px}.chapter-head h3{font-size:24px}.chapter-head p{font-size:11px}.chapter-levels{grid-template-columns:1fr}.level-card{min-height:142px}}
@media(max-height:500px) and (orientation:landscape){.menu-secondary{grid-template-columns:repeat(4,1fr)}.play-promise{display:none}.journey-chapter{padding:10px}.chapter-levels{grid-template-columns:repeat(3,1fr)}}


/* Etapa 6 — duelos e compartilhamento */
@media(max-width:760px){.challenge-invite{grid-template-columns:58px 1fr;padding:15px;gap:12px}.challenge-invite-icon{width:56px;height:56px;border-radius:18px;font-size:27px}.challenge-invite-actions{grid-column:1/-1;grid-template-columns:1fr auto;min-width:0}.challenge-invite-copy h2{font-size:23px}.challenge-invite-stats{flex-wrap:wrap}.challenge-invite-stats span{min-width:74px;flex:1}.challenge-strip{grid-template-columns:auto 1fr;padding:7px 9px}.challenge-strip strong{grid-column:1/-1;text-align:center}.result-card-shell{max-width:270px}.win-actions{grid-template-columns:1fr 1fr}.menu-progress{grid-template-columns:1fr 1fr}}
@media(max-width:430px){.challenge-invite{grid-template-columns:1fr;text-align:center}.challenge-invite-icon{margin:auto}.challenge-invite-stats{justify-content:center}.challenge-invite-actions{grid-template-columns:1fr}.challenge-strip p{font-size:9px}.win-actions{grid-template-columns:1fr}.win-actions .primary-btn,.win-actions .text-link{grid-column:auto}.result-card-shell{max-width:235px}.win-panel{padding-top:22px}.win-prism{width:68px;height:68px;border-radius:21px;font-size:33px}.duel-outcome{margin:9px 0}.win-stats{margin:11px 0}.win-stats span{padding:9px 6px}.win-stats b{font-size:20px}.panel-actions{margin-top:14px}}

@media(max-width:430px){.win-panel{padding:18px 16px}.win-panel .win-prism{width:56px;height:56px;border-radius:18px;font-size:28px;margin-bottom:5px}.win-panel h2{font-size:28px}.win-panel #win-copy{font-size:12px}.result-card-shell{max-width:165px}.win-actions button{min-height:40px;padding-top:9px;padding-bottom:9px;font-size:12px}.duel-outcome b{font-size:20px}}
