@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&family=Nunito:wght@400;600;700;800;900&family=Outfit:wght@500;600;700;800&display=swap');

:root {
  color-scheme: light;
  --ink: #18352e;
  --muted: #64756f;
  --green: #176b57;
  --green-2: #2d9977;
  --yellow: #ffd65c;
  --orange: #ff8c52;
  --blue: #60b6ea;
  --purple: #8a68cf;
  --red: #e96176;
  --cream: #fffaf0;
  --paper: rgba(255, 255, 255, .92);
  --shadow: 0 20px 60px rgba(29, 71, 57, .13);
  --soft-shadow: 0 12px 30px rgba(29, 71, 57, .09);
  font-family: "Trebuchet MS", "Arial Rounded MT Bold", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 7% 9%, rgba(255, 214, 92, .35) 0 7%, transparent 7.3%),
    radial-gradient(circle at 92% 16%, rgba(96, 182, 234, .2) 0 10%, transparent 10.3%),
    linear-gradient(145deg, #fff9ec, #eef9f3 54%, #edf7ff);
  overflow-x: hidden;
}

button,
a {
  font: inherit;
}

button:focus-visible,
a:focus-visible {
  outline: 5px solid rgba(96, 182, 234, .48);
  outline-offset: 4px;
}

[hidden] {
  display: none !important;
}

.app-content {
  visibility: hidden;
  opacity: 0;
}

.app-content.app-content-ready {
  visibility: visible;
  opacity: 1;
}

body:not(.app-loaded) {
  overflow: hidden;
}

/* Entrada: a nave permanece visível até componentes, conteúdo e eventos estarem prontos. */
/* Entrada Neutra: Mundo das Descobertas */
.launch-loader {
  --loading-progress: .04;
  position: fixed;
  z-index: 1000;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  inset: 0;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 24px;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 50% 120%, rgba(96, 182, 234, .45) 0 30%, transparent 30.5%),
    radial-gradient(circle at 18% 20%, rgba(255, 214, 92, .25) 0 12%, transparent 12.5%),
    radial-gradient(circle at 82% 80%, rgba(233, 97, 118, .2) 0 14%, transparent 14.5%),
    linear-gradient(150deg, #0e4844 0%, #156254 48%, #1f8a70 100%);
  transition: opacity .7s ease, visibility .7s ease;
}

.launch-loader::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  inset: 0;
  opacity: .28;
  background-image:
    radial-gradient(circle, #fff 0 1.2px, transparent 2px),
    radial-gradient(circle, #ffd65c 0 1.8px, transparent 2.5px);
  background-position: 0 0, 40px 50px;
  background-size: 80px 80px, 120px 120px;
  animation: skyDrift 10s linear infinite;
}

/* Fundo neutro com orbes e brilhos lúdicos */
.loader-neutral-bg {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.neutral-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: .35;
}

.orb-1 {
  width: 320px;
  height: 320px;
  top: -60px;
  left: -40px;
  background: var(--yellow);
  animation: orbPulse 6s ease-in-out infinite alternate;
}

.orb-2 {
  width: 280px;
  height: 280px;
  bottom: -40px;
  right: -30px;
  background: var(--blue);
  animation: orbPulse 8s ease-in-out infinite alternate-reverse;
}

@keyframes orbPulse {
  0% {
    transform: scale(1) translate(0, 0);
  }

  100% {
    transform: scale(1.18) translate(20px, -15px);
  }
}

.neutral-sparkle {
  position: absolute;
  font-size: 1.6rem;
  opacity: .7;
  user-select: none;
  animation: neutralFloat 5s ease-in-out infinite alternate;
}

.s-1 {
  top: 12%;
  left: 10%;
  animation-delay: 0s;
  font-size: 2rem;
}

.s-2 {
  top: 22%;
  right: 14%;
  animation-delay: -1.2s;
  font-size: 1.8rem;
}

.s-3 {
  top: 65%;
  left: 8%;
  animation-delay: -2.5s;
  font-size: 2.2rem;
}

.s-4 {
  top: 48%;
  right: 10%;
  animation-delay: -0.8s;
  font-size: 1.7rem;
}

.s-5 {
  bottom: 18%;
  left: 18%;
  animation-delay: -3.1s;
  font-size: 2.1rem;
}

.s-6 {
  bottom: 12%;
  right: 16%;
  animation-delay: -1.8s;
  font-size: 1.9rem;
}

.s-7 {
  top: 38%;
  left: 4%;
  animation-delay: -4s;
  font-size: 1.5rem;
}

.s-8 {
  top: 10%;
  right: 35%;
  animation-delay: -2s;
  font-size: 1.4rem;
}

@keyframes neutralFloat {
  0% {
    transform: translateY(0) rotate(-6deg) scale(1);
  }

  100% {
    transform: translateY(-18px) rotate(8deg) scale(1.1);
  }
}

/* Ícone central do livro mágico animado */
.neutral-window {
  width: min(320px, 70vw);
  height: clamp(160px, 24vh, 220px);
  margin: 16px auto 8px;
  position: relative;
  display: grid;
  place-items: center;
}

.neutral-aura-ring {
  position: absolute;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  border: 3px dashed rgba(255, 255, 255, .3);
  animation: spinRing 14s linear infinite;
}

@keyframes spinRing {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.neutral-center-icon {
  position: relative;
  z-index: 2;
  font-size: clamp(75px, 12vw, 105px);
  filter: drop-shadow(0 14px 28px rgba(0, 0, 0, .25));
  animation: bookFloat 2.8s ease-in-out infinite alternate;
}

@keyframes bookFloat {
  0% {
    transform: translateY(8px) scale(0.96) rotate(-2deg);
  }

  100% {
    transform: translateY(-12px) scale(1.05) rotate(3deg);
  }
}

.floating-sparkles {
  position: absolute;
  top: -10px;
  right: -15px;
  font-size: 32px;
  animation: sparklePop 1.5s ease-in-out infinite alternate;
}

@keyframes sparklePop {
  0% {
    opacity: .4;
    transform: scale(.8) rotate(0deg);
  }

  100% {
    opacity: 1;
    transform: scale(1.3) rotate(25deg);
  }
}

.launch-badge-neutral {
  background: linear-gradient(135deg, #ffd65c, #ffb834);
  color: #173d34;
  border: 1px solid rgba(255, 255, 255, .4);
}

.launch-loader.launch-leaving {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.launch-content {
  width: min(760px, 94vw);
  position: relative;
  z-index: 2;
  text-align: center;
}

.launch-badge {
  display: inline-flex;
  padding: 8px 13px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 999px;
  color: #164b43;
  background: var(--yellow);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .14);
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: .1em;
}

.rocket-window {
  --rocket-travel: clamp(100px, 25vw, 225px);
  width: min(560px, 82vw);
  height: clamp(210px, 32vh, 300px);
  margin: 17px auto 2px;
  position: relative;
}

.rocket-orbit {
  position: absolute;
  top: 15px;
  right: 3%;
  bottom: 15px;
  left: 3%;
  inset: 15px 3%;
  border: 3px dashed rgba(255, 255, 255, .16);
  border-radius: 50%;
  transform: rotate(-8deg);
  animation: orbitSpin 12s linear infinite;
}

.loader-logo {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  width: clamp(112px, 18vw, 150px);
  height: clamp(112px, 18vw, 150px);
  padding: 10px;
  border: 3px solid rgba(255, 255, 255, .72);
  border-radius: 50%;
  object-fit: contain;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 18px 42px rgba(0, 0, 0, .22), 0 0 0 10px rgba(255, 255, 255, .08);
  transform: translate(-50%, -50%);
  animation: loaderLogoFloat 1.8s ease-in-out infinite alternate;
}

.loader-rocket {
  position: absolute;
  z-index: 3;
  left: 19%;
  top: 48%;
  width: 110px;
  height: 90px;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 15px 13px rgba(0, 0, 0, .22));
  animation: rocketExplore 2.4s ease-in-out infinite alternate;
}

.rocket-body {
  position: relative;
  z-index: 2;
  font-size: clamp(74px, 10vw, 105px);
  line-height: 1;
  transform: rotate(43deg);
}

.rocket-flame {
  position: absolute;
  z-index: 1;
  left: 3px;
  bottom: 3px;
  width: 46px;
  height: 24px;
  border-radius: 80% 10% 10% 80%;
  background: linear-gradient(90deg, #ffec78, #ff8c52 55%, transparent);
  transform: rotate(43deg);
  transform-origin: right center;
  animation: flamePulse .22s ease-in-out infinite alternate;
}

.rocket-smoke {
  position: absolute;
  width: 16px;
  height: 16px;
  left: -10px;
  bottom: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .72);
  animation: smokeTrail 1.1s ease-out infinite;
}

.smoke-two {
  animation-delay: -.35s;
}

.smoke-three {
  animation-delay: -.72s;
}

.rocket-destination {
  position: absolute;
  right: 8%;
  top: 18%;
  font-size: clamp(55px, 8vw, 84px);
  filter: drop-shadow(0 0 18px rgba(255, 214, 92, .5));
  animation: destinationGlow 1s ease-in-out infinite alternate;
}

.launch-content h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 59px);
  line-height: 1;
  letter-spacing: -.04em;
}

.launch-content p {
  min-height: 28px;
  margin: 12px 0 17px;
  color: rgba(255, 255, 255, .8);
  font-size: clamp(15px, 2vw, 19px);
  font-weight: 800;
  transition: opacity .2s ease;
}

.loader-progress-row {
  width: min(560px, 84vw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 54px;
  align-items: center;
  gap: 12px;
}

.loader-progress {
  height: 18px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(0, 0, 0, .18);
  box-shadow: inset 0 2px 7px rgba(0, 0, 0, .14);
}

.loader-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffb24e, var(--yellow), #fff2a2);
  box-shadow: 0 0 18px rgba(255, 214, 92, .55);
  transition: width .25s ease;
}

.loader-progress-row strong {
  color: var(--yellow);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.launch-content>small {
  display: block;
  margin-top: 17px;
  color: rgba(255, 255, 255, .58);
  font-size: 11px;
  font-weight: 1000;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.loader-star {
  position: absolute;
  z-index: 1;
  color: var(--yellow);
  animation: starTwinkle 1.3s ease-in-out infinite alternate;
}

.star-a {
  left: 8%;
  top: 12%;
  font-size: 29px;
}

.star-b {
  right: 11%;
  top: 15%;
  font-size: 21px;
  animation-delay: -.7s;
}

.star-c {
  left: 16%;
  bottom: 17%;
  font-size: 17px;
  animation-delay: -.35s;
}

.star-d {
  right: 18%;
  bottom: 14%;
  font-size: 31px;
  animation-delay: -1s;
}

.loader-planet {
  position: absolute;
  z-index: 1;
  border-radius: 50%;
  opacity: .34;
}

.planet-yellow {
  width: clamp(130px, 18vw, 260px);
  height: clamp(130px, 18vw, 260px);
  left: -5%;
  top: 24%;
  border: 18px solid rgba(255, 214, 92, .22);
  box-shadow: inset -28px -22px 0 rgba(0, 0, 0, .08);
  background: var(--yellow);
}

.planet-blue {
  width: clamp(110px, 15vw, 210px);
  height: clamp(110px, 15vw, 210px);
  right: -3%;
  bottom: 17%;
  box-shadow: inset 28px -18px 0 rgba(0, 0, 0, .08);
  background: var(--blue);
}

.launch-ready .loader-rocket {
  animation: rocketDeparture .85s cubic-bezier(.5, 0, .8, .3) forwards;
}

.launch-ready .rocket-destination {
  animation: destinationReached .7s ease forwards;
}

.launch-ready .loader-progress span {
  background: linear-gradient(90deg, #55d49e, #c5ffd8);
}

.launch-error .loader-progress span {
  background: var(--orange);
}

@keyframes skyDrift {
  to {
    background-position: 74px 74px, 148px 155px;
  }
}

@keyframes orbitSpin {
  to {
    transform: rotate(352deg);
  }
}

@keyframes loaderLogoFloat {
  from {
    transform: translate(-50%, -50%) scale(.97);
  }

  to {
    transform: translate(-50%, calc(-50% - 5px)) scale(1.02);
  }
}

@keyframes rocketExplore {
  from {
    transform: translate(-20px, 34px) rotate(-5deg);
  }

  to {
    transform: translate(var(--rocket-travel), -65px) rotate(6deg);
  }
}

@keyframes flamePulse {
  to {
    transform: rotate(43deg) scaleX(1.38);
    opacity: .68;
  }
}

@keyframes smokeTrail {
  from {
    transform: translate(0, 0) scale(.5);
    opacity: .8;
  }

  to {
    transform: translate(-52px, 29px) scale(1.8);
    opacity: 0;
  }
}

@keyframes destinationGlow {
  to {
    transform: scale(1.16) rotate(9deg);
  }
}

@keyframes starTwinkle {
  to {
    transform: scale(1.45) rotate(20deg);
    opacity: .45;
  }
}

@keyframes rocketDeparture {
  0% {
    transform: translate(var(--rocket-travel), -65px) rotate(6deg) scale(1);
  }

  100% {
    transform: translate(calc(var(--rocket-travel) + 340px), -260px) rotate(-18deg) scale(.25);
    opacity: 0;
  }
}

@keyframes destinationReached {
  to {
    transform: scale(1.45);
    opacity: 0;
  }
}

.load-error {
  width: min(680px, calc(100% - 32px));
  margin: 12vh auto;
  padding: 38px;
  border-radius: 28px;
  color: var(--ink);
  background: #fff;
  box-shadow: var(--shadow);
  text-align: center;
}

.load-error h1 {
  color: var(--green);
}

.load-error p {
  color: var(--muted);
  font-weight: 800;
}

.app-shell {
  min-height: 100vh;
  padding: clamp(14px, 2vw, 30px);
}

.screen {
  max-width: 1500px;
  margin: 0 auto;
}

.topbar {
  max-width: 1500px;
  min-height: 80px;
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  padding: 0;
  border: 0;
  display: flex;
  align-items: center;
  gap: 13px;
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.brand-logo {
  width: 76px;
  height: 76px;
  object-fit: contain;
  flex: 0 0 auto;
  filter: drop-shadow(0 8px 12px rgba(23, 107, 87, .16));
}

.brand strong {
  display: block;
  color: var(--green);
  font-size: clamp(19px, 2vw, 29px);
  letter-spacing: -.02em;
}

.brand small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-weight: 800;
}

.top-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
}

.soft-btn,
.text-back {
  min-height: 49px;
  padding: 0 17px;
  border: 2px solid rgba(23, 107, 87, .14);
  border-radius: 16px;
  color: var(--green);
  background: rgba(255, 255, 255, .8);
  box-shadow: 0 8px 24px rgba(29, 71, 57, .06);
  font-weight: 900;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease;
}

.soft-btn:hover,
.text-back:hover {
  transform: translateY(-2px);
  background: #fff;
}

/* Início */
.hero {
  min-height: 34vh;
  padding: clamp(28px, 4.5vw, 66px);
  border-radius: 40px;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
  align-items: center;
  gap: 30px;
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(115deg, rgba(13, 82, 63, .99), rgba(38, 139, 105, .93)),
    var(--green);
  box-shadow: var(--shadow);
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
}

.hero::before {
  width: 330px;
  height: 330px;
  right: -70px;
  top: -150px;
}

.hero::after {
  width: 180px;
  height: 180px;
  right: 28%;
  bottom: -120px;
}

.hero-copy,
.hero-demo {
  position: relative;
  z-index: 1;
}

.eyebrow,
.step-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border-radius: 999px;
  color: #28493f;
  background: var(--yellow);
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: .09em;
}

.hero h1 {
  margin: 18px 0 12px;
  max-width: 900px;
  font-size: clamp(40px, 5.5vw, 78px);
  line-height: .98;
  letter-spacing: -.05em;
}

.hero p {
  margin: 0;
  max-width: 790px;
  color: rgba(255, 255, 255, .84);
  font-size: clamp(17px, 1.65vw, 24px);
  line-height: 1.48;
  font-weight: 700;
}

.hero-pills {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.hero-pills span {
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  font-size: 13px;
  font-weight: 900;
}

.hero-demo {
  justify-self: center;
  width: min(100%, 360px);
  aspect-ratio: 1.1;
  border: 4px solid rgba(255, 255, 255, .19);
  border-radius: 38px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .09);
  transform: rotate(2deg);
}

.demo-hand {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--yellow);
  box-shadow: 0 0 0 20px rgba(255, 255, 255, .08);
  font-size: 75px;
  animation: handFloat 2.2s ease-in-out infinite;
}

.orbit {
  position: absolute;
  font-size: 32px;
  animation: orbitFloat 3s ease-in-out infinite alternate;
}

.orbit-a {
  left: 15%;
  top: 18%;
  color: var(--yellow);
}

.orbit-b {
  right: 15%;
  bottom: 17%;
  color: #8bd4ff;
  animation-delay: -1.4s;
}

@keyframes handFloat {

  0%,
  100% {
    transform: translate(-25px, 20px) rotate(-12deg);
  }

  50% {
    transform: translate(30px, -24px) rotate(8deg);
  }
}

@keyframes orbitFloat {
  to {
    transform: translateY(-20px) rotate(25deg) scale(1.2);
  }
}

.section-head {
  margin: 36px 4px 17px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.section-head .step-label {
  color: var(--green);
  background: rgba(45, 153, 119, .13);
}

.section-head h2 {
  margin: 9px 0 0;
  font-size: clamp(28px, 3.2vw, 46px);
  letter-spacing: -.04em;
}

.section-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.class-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.class-card {
  --card: var(--green);
  min-height: 320px;
  padding: 23px;
  border: 2px solid transparent;
  border-radius: 31px;
  position: relative;
  overflow: hidden;
  color: var(--ink);
  background: var(--paper);
  box-shadow: var(--soft-shadow);
  text-align: left;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, border .2s ease;
}

.class-card::after {
  content: "";
  position: absolute;
  width: 120px;
  height: 120px;
  right: -45px;
  top: -45px;
  border-radius: 50%;
  background: rgba(23, 107, 87, 0.12);
  background: color-mix(in srgb, var(--card) 12%, transparent);
}

.class-card:hover {
  transform: translateY(-8px);
  border-color: rgba(23, 107, 87, 0.35);
  border-color: color-mix(in srgb, var(--card) 35%, transparent);
  box-shadow: 0 25px 52px rgba(29, 71, 57, .15);
}

.class-baby {
  --card: #df9c29;
}

.class-three {
  --card: #3c9ed7;
}

.class-four {
  --card: #8b62cd;
}

.class-five {
  --card: #26966c;
}

.class-age {
  position: absolute;
  z-index: 2;
  right: 18px;
  top: 18px;
  min-width: 48px;
  height: 48px;
  padding: 0 10px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--card);
  font-size: 18px;
  font-weight: 1000;
}

.card-icon {
  width: 82px;
  height: 82px;
  margin-bottom: 18px;
  border-radius: 25px;
  display: grid;
  place-items: center;
  background: #f0f7f4;
  background: color-mix(in srgb, var(--card) 15%, white);
  font-size: 46px;
}

.class-card h3 {
  margin: 0 0 8px;
  font-size: 24px;
}

.class-card p {
  min-height: 85px;
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
  font-weight: 700;
}

.card-action {
  margin-top: 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--card);
  font-weight: 1000;
}

.card-action span {
  font-size: 25px;
  transition: transform .18s ease;
}

.class-card:hover .card-action span {
  transform: translateX(5px);
}

.bncc-note {
  margin: 22px 0 0;
  padding: 19px 22px;
  border: 2px dashed rgba(23, 107, 87, .2);
  border-radius: 24px;
  display: flex;
  align-items: center;
  gap: 17px;
  background: rgba(255, 255, 255, .64);
}

.bncc-mark {
  width: 68px;
  height: 68px;
  flex: 0 0 auto;
  border-radius: 22px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--green);
  font-size: 14px;
  font-weight: 1000;
}

.bncc-note strong {
  color: var(--green);
  font-size: 18px;
}

.bncc-note p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.45;
  font-weight: 700;
}

/* Catálogo */
.text-back {
  margin-bottom: 15px;
}

.catalog-hero {
  min-height: 220px;
  padding: clamp(26px, 4vw, 50px);
  border-radius: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  color: #fff;
  background: linear-gradient(120deg, #185f50, #2c9977);
  box-shadow: var(--shadow);
}

.catalog-hero .step-label {
  color: var(--green);
}

.catalog-hero h1 {
  margin: 12px 0 7px;
  font-size: clamp(34px, 4.5vw, 62px);
  letter-spacing: -.045em;
}

.catalog-hero p {
  margin: 0;
  color: rgba(255, 255, 255, .82);
  font-size: 18px;
  font-weight: 700;
}

.subject-picker {
  margin: 17px 0 10px;
  padding: 13px 16px;
  border: 1px solid rgba(23, 107, 87, .1);
  border-radius: 19px;
  display: grid;
  grid-template-columns: auto minmax(220px, 420px);
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: rgba(255, 255, 255, .9);
  box-shadow: var(--soft-shadow);
}

.subject-picker label {
  color: var(--green);
  font-size: 14px;
  font-weight: 1000;
}

.subject-picker select {
  min-height: 48px;
  padding: 0 42px 0 14px;
  border: 2px solid rgba(23, 107, 87, .16);
  border-radius: 14px;
  color: var(--ink);
  background: #fff;
  font-weight: 900;
  cursor: pointer;
}

.class-stamp {
  width: 140px;
  height: 140px;
  flex: 0 0 auto;
  border: 3px solid rgba(255, 255, 255, .17);
  border-radius: 42px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .1);
  font-size: 76px;
  transform: rotate(4deg);
  animation: stampBob 2.5s ease-in-out infinite alternate;
}

@keyframes stampBob {
  to {
    transform: rotate(-3deg) translateY(-8px);
  }
}

.subject-nav {
  position: sticky;
  z-index: 20;
  top: 10px;
  margin: 17px 0 10px;
  padding: 10px;
  border: 1px solid rgba(23, 107, 87, .1);
  border-radius: 22px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: rgba(255, 255, 255, .88);
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(12px);
}

.subject-nav a {
  min-height: 50px;
  padding: 0 12px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--subject);
  text-decoration: none;
  font-weight: 1000;
  transition: background .18s ease;
}

.subject-nav a:hover {
  background: #edf6f2;
  background: color-mix(in srgb, var(--subject) 11%, white);
}

.subject-section {
  margin-top: 18px;
  padding: clamp(21px, 3vw, 34px);
  border-radius: 32px;
  background: rgba(255, 255, 255, .7);
  box-shadow: var(--soft-shadow);
  scroll-margin-top: 95px;
}

.subject-heading {
  display: flex;
  align-items: center;
  gap: 17px;
  margin-bottom: 21px;
}

.subject-icon {
  width: 72px;
  height: 72px;
  flex: 0 0 auto;
  border-radius: 23px;
  display: grid;
  place-items: center;
  background: #ebf5f0;
  background: color-mix(in srgb, var(--subject) 14%, white);
  font-size: 38px;
}

.subject-heading h2 {
  margin: 0;
  color: var(--subject);
  font-size: clamp(25px, 3vw, 38px);
}

.subject-heading p {
  margin: 4px 0 2px;
  color: var(--muted);
  font-weight: 700;
}

.subject-heading small {
  color: var(--subject);
  font-weight: 900;
}

.games-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.game-card {
  min-height: 200px;
  padding: 21px;
  border: 2px solid rgba(24, 53, 46, .07);
  border-radius: 26px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: 1fr auto;
  align-items: center;
  gap: 12px 17px;
  position: relative;
  color: var(--ink);
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: transform .2s ease, border .2s ease, box-shadow .2s ease;
}

.game-card:hover {
  transform: translateY(-5px);
  border-color: rgba(23, 107, 87, 0.4);
  border-color: color-mix(in srgb, var(--subject) 40%, transparent);
  box-shadow: 0 17px 35px rgba(29, 71, 57, .11);
}

.game-number {
  position: absolute;
  right: 18px;
  top: 15px;
  color: #3b8b74;
  color: color-mix(in srgb, var(--subject) 18%, white);
  font-size: 46px;
  font-weight: 1000;
}

.game-icon {
  width: 78px;
  height: 78px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  background: #edf6f2;
  background: color-mix(in srgb, var(--subject) 13%, white);
  font-size: 43px;
  transition: transform .2s ease;
}

.game-card:hover .game-icon {
  transform: rotate(-5deg) scale(1.08);
}

.game-copy {
  position: relative;
  z-index: 1;
}

.game-copy strong {
  display: block;
  margin-bottom: 6px;
  font-size: 22px;
}

.game-copy small {
  display: block;
  max-width: 430px;
  color: var(--muted);
  line-height: 1.42;
  font-weight: 700;
}

.game-meta {
  grid-column: 1 / 3;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.game-meta span {
  padding: 6px 9px;
  border-radius: 999px;
  color: var(--subject);
  background: #f1f8f5;
  background: color-mix(in srgb, var(--subject) 9%, white);
  font-size: 12px;
  font-weight: 1000;
}

.game-meta .done {
  color: var(--green);
  background: #e0f4e9;
}

.game-go {
  color: var(--subject);
  font-size: 29px;
  font-weight: 1000;
}

/* Jogo */
.game-toolbar {
  margin-bottom: 12px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
}

.game-toolbar .text-back {
  justify-self: start;
  margin: 0;
}

.game-crumbs {
  color: var(--muted);
  text-align: center;
  font-weight: 900;
}

.game-layout {
  min-height: calc(100vh - 165px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 17px;
}

.stage {
  --game-color: var(--purple);
  min-height: 680px;
  position: relative;
  overflow: hidden;
  border-radius: 35px;
  background:
    radial-gradient(circle at 50% 112%, rgba(255, 214, 92, .35) 0 28%, transparent 28.4%),
    linear-gradient(#dff4ff 0 64%, #e5f6df 64%);
  box-shadow: var(--shadow);
  cursor: none;
  isolation: isolate;
}

.stage::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 22px;
  right: 22px;
  bottom: 22px;
  left: 22px;
  inset: 22px;
  border: 3px dashed rgba(138, 104, 207, 0.25);
  border: 3px dashed color-mix(in srgb, var(--game-color) 18%, transparent);
  border-radius: 28px;
  pointer-events: none;
}

.ambient-shape {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  background: rgba(138, 104, 207, 0.12);
  background: color-mix(in srgb, var(--game-color) 10%, transparent);
  pointer-events: none;
  animation: ambient 5s ease-in-out infinite alternate;
}

.shape-one {
  width: 180px;
  height: 180px;
  left: -55px;
  top: 25%;
}

.shape-two {
  width: 130px;
  height: 130px;
  right: -30px;
  bottom: 20%;
  animation-delay: -2.4s;
}

@keyframes ambient {
  to {
    transform: translate(22px, -18px) scale(1.12);
  }
}

.stage-heading {
  position: absolute;
  z-index: 5;
  top: 20px;
  left: 50%;
  width: min(83%, 850px);
  transform: translateX(-50%);
  text-align: center;
  pointer-events: none;
}

.round-kicker {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 999px;
  color: #fff;
  background: var(--game-color);
  box-shadow: 0 6px 17px rgba(138, 104, 207, 0.25);
  box-shadow: 0 6px 17px color-mix(in srgb, var(--game-color) 25%, transparent);
  font-size: 11px;
  font-weight: 1000;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.stage-heading h2 {
  width: max-content;
  max-width: 100%;
  margin: 6px auto 0;
  padding: 9px 18px;
  border-radius: 19px;
  color: var(--ink);
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 8px 24px rgba(29, 71, 57, .11);
  font-size: clamp(20px, 2.3vw, 33px);
  line-height: 1.15;
}

.game-area {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  inset: 0;
}

.play-scene {
  position: absolute;
  top: 112px;
  right: 6%;
  bottom: 290px;
  left: 6%;
  inset: 112px 6% 290px;
  display: grid;
  place-items: center;
}

.choice-grid {
  position: absolute;
  left: 5%;
  right: 5%;
  bottom: 92px;
  display: grid;
  grid-template-columns: repeat(var(--columns, 3), minmax(0, 1fr));
  gap: clamp(10px, 1.6vw, 19px);
}

.choices-2 {
  --columns: 2;
  left: 14%;
  right: 14%;
}

.choices-3 {
  --columns: 3;
}

.choices-4 {
  --columns: 4;
}

.choice-card {
  min-height: 148px;
  padding: 16px 10px 12px;
  border: 6px solid rgba(255, 255, 255, .92);
  border-radius: 29px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  color: var(--ink);
  background: #f4effd;
  background: color-mix(in srgb, var(--game-color) 14%, white);
  box-shadow: 0 15px 28px rgba(29, 71, 57, .15);
  font-weight: 1000;
  cursor: none;
  transition: transform .14s ease, box-shadow .14s ease, outline-color .14s ease;
}

.choice-card:nth-child(2) {
  background: #fff8db;
  background: color-mix(in srgb, var(--yellow) 38%, white);
}

.choice-card:nth-child(3) {
  background: #e8f5fd;
  background: color-mix(in srgb, var(--blue) 27%, white);
}

.choice-card:nth-child(4) {
  background: #ffefe5;
  background: color-mix(in srgb, var(--orange) 25%, white);
}

.choice-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 33px rgba(29, 71, 57, .18);
}

.choice-card.gesture-hover {
  outline: 7px solid #ffe880;
  outline: 7px solid color-mix(in srgb, var(--yellow) 76%, white);
  outline-offset: 3px;
  transform: translateY(-5px) scale(1.025);
  box-shadow: 0 22px 38px rgba(29, 71, 57, .22);
}

.choice-index {
  position: absolute;
  left: 10px;
  top: 10px;
  width: 27px;
  height: 27px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--game-color);
  font-size: 12px;
}

.choice-emoji {
  font-family: "Segoe UI Emoji", "Noto Color Emoji", "Apple Color Emoji", sans-serif;
  font-size: clamp(48px, 6vw, 78px);
  line-height: 1;
  filter: drop-shadow(0 7px 6px rgba(29, 71, 57, .1));
}

.choice-visual {
  width: clamp(72px, 7vw, 104px);
  height: clamp(68px, 7vw, 96px);
  position: relative;
  display: grid;
  place-items: center;
}

.choice-visual .choice-emoji {
  position: relative;
  z-index: 2;
}

.choice-fallback {
  position: absolute;
  z-index: 1;
  right: -4px;
  bottom: -3px;
  width: 49px;
  height: 49px;
  filter: drop-shadow(0 4px 5px rgba(29, 71, 57, .16));
}

.choice-card strong {
  margin-top: 7px;
  font-size: clamp(15px, 1.5vw, 21px);
  line-height: 1.1;
  text-align: center;
}

.choice-card.choice-number strong {
  margin: 0;
  font-size: clamp(48px, 6vw, 82px);
}

.choices-4 .choice-card {
  min-height: 138px;
}

.choices-4 .choice-emoji {
  font-size: clamp(38px, 4.5vw, 62px);
}

.choices-4 .choice-card strong {
  font-size: clamp(13px, 1.2vw, 17px);
}

.correct-pulse {
  animation: correctPulse .62s ease !important;
}

.wrong-pulse {
  animation: wrongPulse .48s ease !important;
}

@keyframes correctPulse {
  45% {
    transform: translateY(-8px) scale(1.1);
    box-shadow: 0 0 0 18px rgba(45, 153, 119, .24);
  }
}

@keyframes wrongPulse {

  20%,
  60% {
    transform: translateX(-12px);
  }

  40%,
  80% {
    transform: translateX(12px);
  }
}

/* Jogos cooperativos para duas crianças */
.stage.cooperative-mode {
  cursor: default;
}

.stage.cooperative-mode .duo-scene {
  inset: 104px 5% 330px;
}

.duo-challenge {
  width: min(650px, 92%);
  padding: clamp(18px, 3vw, 30px);
  border: 6px solid rgba(255, 255, 255, .9);
  border-radius: 32px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: 20px;
  color: var(--ink);
  background: rgba(255, 255, 255, .78);
  box-shadow: var(--soft-shadow);
  animation: modelBob 1.8s ease-in-out infinite alternate;
}

.duo-challenge>span {
  grid-row: 1 / 3;
  font-size: clamp(62px, 9vw, 105px);
  filter: drop-shadow(0 8px 8px rgba(29, 71, 57, .12));
}

.duo-challenge strong {
  font-size: clamp(22px, 3vw, 38px);
  line-height: 1.12;
}

.duo-challenge small {
  margin-top: 7px;
  color: var(--muted);
  font-size: clamp(14px, 1.5vw, 18px);
  font-weight: 800;
}

.duo-controls {
  position: absolute;
  z-index: 6;
  left: 6%;
  right: 6%;
  bottom: 76px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(8px, 1.5vw, 18px);
}

.duo-player {
  min-height: 172px;
  padding: 16px;
  border: 6px solid #fff;
  border-radius: 30px;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  color: var(--ink);
  background: #e7f3ff;
  box-shadow: 0 15px 28px rgba(29, 71, 57, .15);
  font-family: inherit;
  cursor: pointer;
  touch-action: none;
  user-select: none;
  transition: transform .16s ease, background .16s ease, box-shadow .16s ease;
}

.duo-player.player-two {
  background: #ffe6ed;
}

.duo-player.ready {
  transform: translateY(-5px) scale(1.025);
  color: #fff;
  background: #397fc4;
  box-shadow: 0 18px 34px rgba(31, 102, 170, .28);
}

.duo-player.player-two.ready {
  background: #cf4f72;
}

.duo-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: #397fc4;
  font-size: 23px;
  font-weight: 1000;
}

.player-two .duo-avatar {
  background: #cf4f72;
}

.duo-player.ready .duo-avatar {
  color: currentColor;
  background: rgba(255, 255, 255, .24);
}

.duo-player strong {
  font-size: clamp(20px, 2.4vw, 29px);
}

.duo-player small {
  font-size: 13px;
  font-weight: 900;
}

.duo-player kbd {
  min-width: 25px;
  padding: 3px 7px;
  border: 2px solid currentColor;
  border-radius: 7px;
  display: inline-block;
  font: inherit;
}

.duo-player i {
  height: 8px;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  transform: scaleX(0);
  transform-origin: left;
  background: var(--yellow);
}

.duo-controls.together .duo-player i {
  animation: duoHold var(--duo-hold) linear forwards;
}

.duo-link {
  width: clamp(48px, 6vw, 76px);
  aspect-ratio: 1;
  border: 5px solid #fff;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--yellow);
  box-shadow: var(--soft-shadow);
  font-size: clamp(25px, 3.5vw, 42px);
}

.duo-controls.together .duo-link {
  animation: duoTogether .38s ease-in-out infinite alternate;
}

.duo-controls.completed .duo-link {
  background: #63d59b;
  transform: scale(1.15);
}

@keyframes duoHold {
  to {
    transform: scaleX(1);
  }
}

@keyframes duoTogether {
  to {
    transform: scale(1.12) rotate(5deg);
  }
}

.side-panel.cooperative-controls .camera-box,
.side-panel.cooperative-controls .status-pill,
.side-panel.cooperative-controls .panel-actions,
.side-panel.cooperative-controls .sound-replay {
  display: none;
}

.side-panel.cooperative-controls .instruction {
  border-color: rgba(207, 79, 114, .2);
  color: #8a3150;
  background: #fff0f4;
}

.coach-bubble {
  position: absolute;
  z-index: 8;
  left: 50%;
  bottom: 228px;
  width: max-content;
  max-width: 78%;
  padding: 8px 15px;
  border: 2px solid rgba(23, 107, 87, .12);
  border-radius: 999px;
  transform: translateX(-50%);
  color: var(--green);
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 7px 18px rgba(29, 71, 57, .1);
  text-align: center;
  font-size: 13px;
  font-weight: 1000;
  pointer-events: none;
}

.coach-bubble.hint {
  color: #8a5a11;
  background: #fff4cf;
  animation: coachPop .3s ease;
}

.coach-bubble.success {
  color: #fff;
  background: var(--green-2);
  animation: coachPop .3s ease;
}

@keyframes coachPop {
  50% {
    transform: translateX(-50%) scale(1.08);
  }
}

/* Cenas animadas */
.object-cluster {
  max-width: 700px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(11px, 2.8vw, 33px);
}

.object-cluster span {
  font-size: clamp(58px, 8.2vw, 118px);
  line-height: .95;
  filter: drop-shadow(0 11px 8px rgba(29, 71, 57, .12));
  animation: objectDance 1.8s ease-in-out infinite alternate;
  animation-delay: calc(var(--i) * -.19s);
}

@keyframes objectDance {
  from {
    transform: translateY(9px) rotate(-7deg) scale(.94);
  }

  to {
    transform: translateY(-9px) rotate(7deg) scale(1.04);
  }
}

.pattern-model {
  width: 180px;
  height: 180px;
  border: 7px solid #fff;
  border-radius: 36px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .58);
  box-shadow: var(--soft-shadow);
  animation: modelBob 1.8s ease-in-out infinite alternate;
}

.shape {
  display: block;
  width: 100px;
  height: 100px;
}

.shape.circle {
  border-radius: 50%;
}

.shape.square {
  border-radius: 18px;
}

.shape.blue {
  background: #49a8e5;
}

.shape.yellow {
  background: var(--yellow);
}

.shape.red {
  background: #ef5262;
}

.shape.green {
  background: #42ae70;
}

.pattern-line {
  padding: 24px 30px;
  border: 6px solid rgba(255, 255, 255, .9);
  border-radius: 30px;
  background: rgba(255, 255, 255, .48);
  box-shadow: var(--soft-shadow);
  font-size: clamp(47px, 7vw, 92px);
  letter-spacing: .05em;
  white-space: nowrap;
  animation: modelBob 1.8s ease-in-out infinite alternate;
}

@keyframes modelBob {
  to {
    transform: translateY(-10px) rotate(1deg);
  }
}

.math-expression {
  padding: 24px 38px;
  border: 7px solid #fff;
  border-radius: 34px;
  display: flex;
  align-items: center;
  gap: clamp(18px, 4vw, 42px);
  color: var(--green);
  background: rgba(255, 255, 255, .78);
  box-shadow: var(--soft-shadow);
  font-size: clamp(66px, 10vw, 125px);
  font-weight: 1000;
  animation: modelBob 1.8s ease-in-out infinite alternate;
}

.math-expression b {
  color: var(--orange);
}

.word-scene {
  width: clamp(150px, 17vw, 230px);
  aspect-ratio: 1;
  border: 7px solid #fff;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #f4effd;
  background: color-mix(in srgb, var(--game-color) 14%, white);
  box-shadow: 0 0 0 18px rgba(138, 104, 207, 0.1);
  box-shadow: 0 0 0 18px color-mix(in srgb, var(--game-color) 8%, transparent);
  font-size: clamp(75px, 10vw, 135px);
  animation: wordBounce 1.7s ease-in-out infinite;
}

.letter-orb {
  width: 125px;
  height: 125px;
  border-radius: 36px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--game-color);
  font-size: 85px;
  font-weight: 1000;
}

@keyframes wordBounce {

  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(-15px) scale(1.03);
  }
}

.sound-wave {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--game-color);
}

.sound-wave strong {
  margin: 0 18px;
  padding: 21px 28px;
  border: 6px solid #fff;
  border-radius: 26px;
  background: rgba(255, 255, 255, .78);
  box-shadow: var(--soft-shadow);
  font-size: clamp(40px, 6vw, 76px);
}

.sound-wave i {
  width: 9px;
  height: 45px;
  border-radius: 9px;
  background: currentColor;
  animation: wave .8s ease-in-out infinite alternate;
}

.sound-wave i:nth-child(2),
.sound-wave i:nth-last-child(2) {
  height: 75px;
  animation-delay: -.35s;
}

.sound-wave i:nth-child(3),
.sound-wave i:nth-last-child(3) {
  height: 100px;
  animation-delay: -.55s;
}

@keyframes wave {
  to {
    transform: scaleY(.4);
    opacity: .6;
  }
}

.animal-scene {
  display: flex;
  align-items: center;
  gap: 18px;
  animation: animalWalk 2.2s ease-in-out infinite alternate;
}

.animal-scene span {
  font-size: clamp(100px, 14vw, 175px);
  filter: drop-shadow(0 12px 9px rgba(29, 71, 57, .13));
}

.animal-scene small {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--game-color);
  font-size: 45px;
  font-weight: 1000;
}

@keyframes animalWalk {
  to {
    transform: translateX(22px) rotate(3deg);
  }
}

.garden-scene {
  position: relative;
  font-size: clamp(105px, 15vw, 190px);
  filter: drop-shadow(0 14px 10px rgba(29, 71, 57, .12));
  animation: gardenGrow 2s ease-in-out infinite alternate;
}

.garden-scene .sparkle {
  position: absolute;
  right: -25px;
  top: 0;
  color: var(--yellow);
  font-size: 45px;
  animation: sparkle 1s ease-in-out infinite alternate;
}

@keyframes gardenGrow {
  from {
    transform: scale(.9) rotate(-3deg);
  }

  to {
    transform: scale(1.05) rotate(3deg);
  }
}

@keyframes sparkle {
  to {
    transform: rotate(90deg) scale(1.35);
  }
}

.emotion-scene,
.community-scene {
  max-width: 650px;
  padding: 25px 34px;
  border: 6px solid #fff;
  border-radius: 35px;
  display: flex;
  align-items: center;
  gap: 20px;
  background: rgba(255, 255, 255, .75);
  box-shadow: var(--soft-shadow);
  animation: modelBob 2s ease-in-out infinite alternate;
}

.emotion-scene span,
.community-scene span {
  font-size: clamp(65px, 8vw, 105px);
}

.emotion-scene strong,
.community-scene strong {
  font-size: clamp(21px, 2.8vw, 36px);
  line-height: 1.15;
}

.activity-scene {
  max-width: 650px;
  padding: 25px 34px;
  border: 6px solid #fff;
  border-radius: 35px;
  display: flex;
  align-items: center;
  gap: 22px;
  background: rgba(255, 255, 255, .78);
  box-shadow: var(--soft-shadow);
  animation: modelBob 2s ease-in-out infinite alternate;
}

.activity-scene span {
  font-size: clamp(65px, 9vw, 110px);
}

.activity-scene strong {
  font-size: clamp(24px, 3vw, 40px);
  line-height: 1.08;
}

.art-scene {
  background: linear-gradient(135deg, rgba(255, 255, 255, .82), rgba(255, 232, 248, .82));
}

/* Temas */
.stage.game-patterns {
  background: linear-gradient(145deg, #f1eaff, #e8f5ff 55%, #fff3d0);
}

.stage.game-words {
  background: linear-gradient(145deg, #ffe8ee, #fff4da 58%, #e8f6ff);
}

.stage.game-rhymes {
  background: linear-gradient(145deg, #ffe9f2, #f3eaff 58%, #e3f4ff);
}

.stage.game-habitats {
  background: linear-gradient(#cdefff 0 60%, #cfecc4 60%);
}

.stage.game-garden {
  background: linear-gradient(#dff5ff 0 58%, #d2edc3 58%);
}

.stage.game-emotions {
  background: linear-gradient(145deg, #fff0c9, #ffe8ef 55%, #e9e5ff);
}

.stage.game-community {
  background: linear-gradient(#dff2ff 0 62%, #ffe4ba 62%);
}

.stage.game-movements {
  background: linear-gradient(145deg, #e1f6ff, #e7f9eb 58%, #fff0c9);
}

.stage.game-bodycare {
  background: linear-gradient(145deg, #fff1d8, #e8f6ff 58%, #e8f7ec);
}

.stage.game-colors {
  background: linear-gradient(145deg, #ffe7ef, #eee5ff 52%, #fff4c8);
}

.stage.game-instruments {
  background: linear-gradient(145deg, #ece5ff, #e4f5ff 55%, #ffe7c9);
}

.stage.game-duorhythm {
  background: linear-gradient(145deg, #e4f5ff, #fff0c9 55%, #ffe8ef);
}

.stage.game-duomirror {
  background: linear-gradient(145deg, #ffe8ef, #eee7ff 55%, #e3f7ed);
}

.success-burst {
  position: absolute;
  z-index: 18;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.success-burst i {
  position: absolute;
  color: var(--yellow);
  font-size: 24px;
  opacity: 0;
}

.success-burst.play i {
  animation: burst .7s ease-out forwards;
}

.success-burst i:nth-child(1) {
  --x: -90px;
  --y: -60px;
}

.success-burst i:nth-child(2) {
  --x: 0;
  --y: -105px;
  color: var(--blue);
}

.success-burst i:nth-child(3) {
  --x: 90px;
  --y: -55px;
  color: var(--orange);
}

.success-burst i:nth-child(4) {
  --x: 100px;
  --y: 50px;
}

.success-burst i:nth-child(5) {
  --x: 0;
  --y: 100px;
  color: var(--blue);
}

.success-burst i:nth-child(6) {
  --x: -95px;
  --y: 45px;
  color: var(--orange);
}

@keyframes burst {
  0% {
    transform: translate(0, 0) scale(.2) rotate(0);
    opacity: 1;
  }

  100% {
    transform: translate(var(--x), var(--y)) scale(1.2) rotate(140deg);
    opacity: 0;
  }
}

.hand-cursor {
  position: absolute;
  z-index: 25;
  width: 82px;
  height: 82px;
  border: 7px solid #fff;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(23, 107, 87, .9);
  box-shadow: 0 0 0 8px rgba(23, 107, 87, .18), 0 12px 25px rgba(0, 0, 0, .18);
  font-size: 40px;
  transform: translate(-50%, -50%);
  opacity: 0;
  pointer-events: none;
  transition: width .12s ease, height .12s ease, opacity .16s ease;
}

.hand-cursor.active {
  opacity: 1;
}

.hand-cursor.holding {
  width: 100px;
  height: 100px;
}

.hand-cursor.tracking-lost {
  opacity: .58;
  filter: grayscale(.35);
}

.hand-cursor::after {
  content: "";
  position: absolute;
  top: -13px;
  right: -13px;
  bottom: -13px;
  left: -13px;
  inset: -13px;
  border: 7px solid var(--yellow);
  border-radius: 50%;
  clip-path: polygon(0 0, calc(var(--dwell, 0) * 100%) 0, calc(var(--dwell, 0) * 100%) 100%, 0 100%);
}

.hand-cursor.wand-cursor {
  width: 38px;
  height: 132px;
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(circle at 50% 18px, #fff 0 5px, var(--yellow) 6px 12px, #f39b31 13px 17px, transparent 18px);
  box-shadow: none;
  transform: translate(-50%, -18px) rotate(-28deg);
  transform-origin: 50% 18px;
}

.hand-cursor.wand-cursor::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 31px;
  width: 14px;
  height: 96px;
  border: 4px solid #fff;
  border-radius: 10px;
  background: linear-gradient(90deg, #6a3fb4, #9b72e7 55%, #5b349e);
  box-shadow: 0 10px 21px rgba(50, 30, 91, .3);
}

.hand-cursor.wand-cursor::after {
  top: -2px;
  left: -2px;
  inset: -2px auto auto -2px;
  width: 42px;
  height: 42px;
  border-width: 6px;
  clip-path: polygon(0 0, calc(var(--dwell, 0) * 100%) 0, calc(var(--dwell, 0) * 100%) 100%, 0 100%);
}

.hand-cursor.wand-cursor.holding {
  width: 38px;
  height: 132px;
}

.young-wand-mode::before {
  border-style: solid;
  border-color: rgba(138, 104, 207, 0.25);
  border-color: color-mix(in srgb, var(--game-color) 22%, transparent);
}

/* Painel lateral */
.side-panel {
  padding: 17px;
  border-radius: 30px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(255, 255, 255, .87);
  box-shadow: var(--shadow);
}

.progress-card {
  padding: 18px;
  border-radius: 22px;
  color: #fff;
  background: linear-gradient(135deg, var(--green), var(--green-2));
}

.progress-card>div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.progress-card span {
  font-weight: 900;
}

.progress-card strong {
  font-size: 37px;
}

.progress-track {
  height: 9px;
  margin-top: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, .22);
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--yellow);
  transition: width .45s ease;
}

.mini-stars {
  min-height: 22px;
  margin-top: 7px;
  display: flex;
  gap: 5px;
}

.mini-stars span {
  color: rgba(255, 255, 255, .28);
  font-size: 20px;
  transition: color .3s ease, transform .3s ease;
}

.mini-stars span.earned {
  color: var(--yellow);
  transform: scale(1.15) rotate(8deg);
}

.learning-card {
  padding: 15px;
  border: 2px solid rgba(23, 107, 87, 0.15);
  border: 2px solid color-mix(in srgb, var(--game-color) 13%, transparent);
  border-radius: 19px;
  background: #fbfdfc;
  background: color-mix(in srgb, var(--game-color) 6%, white);
}

.learning-card span {
  display: block;
  margin-bottom: 6px;
  color: var(--game-color);
  font-size: 10px;
  font-weight: 1000;
  letter-spacing: .08em;
}

.learning-card strong {
  display: block;
  font-size: 14px;
  line-height: 1.35;
}

.learning-card small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  font-weight: 700;
}

.camera-box {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 20px;
  background: #dfe8e5;
}

.camera-box video,
.camera-box canvas {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

.camera-box canvas {
  z-index: 2;
}

.camera-box.circle-mode.awaiting-circle::after {
  content: "";
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 50%;
  width: 82px;
  height: 82px;
  border: 5px dashed var(--yellow);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 999px rgba(15, 49, 40, .16);
  pointer-events: none;
  animation: calibrationPulse 1.2s ease-in-out infinite alternate;
}

@keyframes calibrationPulse {
  to {
    transform: translate(-50%, -50%) scale(1.08);
  }
}

.camera-empty {
  position: absolute;
  z-index: 3;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  inset: 0;
  padding: 20px;
  display: grid;
  place-content: center;
  gap: 5px;
  color: var(--muted);
  text-align: center;
  font-weight: 900;
}

.camera-empty span {
  font-size: 38px;
}

.status-pill {
  padding: 10px 12px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #715817;
  background: #fff3c9;
  font-size: 13px;
  font-weight: 900;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #e0a800;
}

.status-pill.ready {
  color: var(--green);
  background: #dff5e9;
}

.status-pill.ready .status-dot {
  background: var(--green-2);
  box-shadow: 0 0 0 5px rgba(45, 153, 119, .13);
}

.panel-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.panel-btn {
  min-height: 48px;
  padding: 0 10px;
  border: 0;
  border-radius: 15px;
  color: var(--green);
  background: #e8f6ef;
  font-size: 13px;
  font-weight: 1000;
  cursor: pointer;
}

.panel-btn.camera-on {
  color: #fff;
  background: var(--green);
}

.sound-replay {
  width: 100%;
  color: #704491;
  background: #f3eaff;
}

.sound-toggle[aria-pressed="false"] {
  color: #7b635d;
  background: #f3efed;
}

.instruction {
  padding: 13px;
  border-radius: 16px;
  color: var(--muted);
  background: #f6f4ed;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 800;
}

/* Conclusão */
.celebration {
  position: absolute;
  z-index: 40;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: rgba(13, 82, 63, .82);
  backdrop-filter: blur(8px);
}

.celebration-card {
  width: min(88%, 630px);
  padding: clamp(27px, 4vw, 50px);
  border-radius: 39px;
  position: relative;
  text-align: center;
  background: #fff;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .25);
  animation: celebrationIn .55s cubic-bezier(.18, .89, .32, 1.28);
}

@keyframes celebrationIn {
  from {
    transform: scale(.5) rotate(-5deg);
    opacity: 0;
  }
}

.celebration-card .big {
  font-size: 75px;
  animation: trophyDance 1.3s ease-in-out infinite alternate;
}

@keyframes trophyDance {
  to {
    transform: rotate(8deg) scale(1.08);
  }
}

.celebration-stars {
  color: #f1b900;
  font-size: 31px;
  letter-spacing: 8px;
}

.celebration-card h2 {
  margin: 7px 0;
  color: var(--green);
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1;
}

.celebration-card p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.45;
  font-weight: 800;
}

.celebration-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 19px;
}

.confetti {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  inset: 0;
  pointer-events: none;
}

.confetti i {
  --x: 10%;
  position: absolute;
  left: var(--x);
  top: -30px;
  width: 14px;
  height: 28px;
  border-radius: 4px;
  background: var(--yellow);
  animation: confettiFall 2.2s linear infinite;
}

.confetti i:nth-child(2) {
  --x: 23%;
  background: var(--blue);
  animation-delay: -.9s;
}

.confetti i:nth-child(3) {
  --x: 35%;
  background: var(--orange);
  animation-delay: -1.4s;
}

.confetti i:nth-child(4) {
  --x: 48%;
  background: var(--purple);
  animation-delay: -.4s;
}

.confetti i:nth-child(5) {
  --x: 61%;
  background: var(--red);
  animation-delay: -1.7s;
}

.confetti i:nth-child(6) {
  --x: 74%;
  background: var(--yellow);
  animation-delay: -.7s;
}

.confetti i:nth-child(7) {
  --x: 86%;
  background: var(--blue);
  animation-delay: -1.1s;
}

.confetti i:nth-child(8) {
  --x: 95%;
  background: var(--orange);
  animation-delay: -1.9s;
}

@keyframes confettiFall {
  to {
    transform: translateY(760px) rotate(500deg);
  }
}

.primary-btn,
.secondary-btn {
  min-height: 56px;
  padding: 0 22px;
  border: 0;
  border-radius: 17px;
  font-weight: 1000;
  cursor: pointer;
}

.primary-btn {
  color: #fff;
  background: var(--green);
  box-shadow: 0 12px 28px rgba(23, 107, 87, .24);
}

.secondary-btn {
  color: var(--green);
  background: #e8f6ef;
}

/* Modais */
.modal {
  position: fixed;
  z-index: 100;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  inset: 0;
  padding: 20px;
  display: grid;
  place-items: center;
  background: rgba(15, 49, 40, .67);
  backdrop-filter: blur(8px);
}

.modal-card {
  width: min(700px, 100%);
  max-height: 91vh;
  padding: clamp(26px, 4vw, 44px);
  border-radius: 34px;
  position: relative;
  overflow: auto;
  background: #fff;
  box-shadow: 0 30px 100px rgba(0, 0, 0, .28);
}

.guide-card {
  width: min(800px, 100%);
}

.sound-card {
  width: min(660px, 100%);
}

.modal-close {
  position: absolute;
  right: 18px;
  top: 16px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 15px;
  color: var(--green);
  background: #e8f6ef;
  font-size: 28px;
  cursor: pointer;
}

.modal-icon {
  font-size: 46px;
}

.modal-card h2 {
  margin: 8px 0 12px;
  color: var(--green);
  font-size: 35px;
}

.modal-card h3 {
  color: var(--green);
}

.modal-card p,
.modal-card li {
  color: var(--muted);
  line-height: 1.55;
  font-weight: 700;
}

.modal-card li+li {
  margin-top: 7px;
}

.modal-actions {
  margin-top: 20px;
  display: flex;
  gap: 10px;
}

.sound-controls {
  margin-top: 23px;
  display: grid;
  gap: 14px;
}

.sound-control {
  padding: 16px 18px;
  border: 2px solid rgba(23, 107, 87, .1);
  border-radius: 20px;
  display: grid;
  gap: 14px;
  background: #f6fbf8;
}

.sound-control>span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink);
}

.sound-control output {
  min-width: 58px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #fff;
  background: var(--green);
  text-align: center;
  font-weight: 1000;
}

.sound-control input[type="range"] {
  width: 100%;
  height: 28px;
  accent-color: var(--green-2);
  cursor: pointer;
}

.sound-actions {
  flex-wrap: wrap;
}

.sound-actions .primary-btn {
  margin-left: auto;
}

.privacy,
.legal-box {
  padding: 14px;
  border-radius: 16px;
  color: var(--green) !important;
  background: #e9f7f0;
}

.rights-row {
  margin: 16px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.rights-row span {
  padding: 7px 10px;
  border-radius: 999px;
  color: #795d12;
  background: #fff1bd;
  font-size: 13px;
  font-weight: 1000;
}

.legal-box {
  display: grid;
  gap: 7px;
}

.legal-box a {
  color: var(--green);
  font-weight: 800;
}

.toast {
  position: fixed;
  z-index: 9999;
  left: 50%;
  bottom: 24px;
  padding: 14px 22px;
  border-radius: 16px;
  transform: translate(-50%, 30px);
  color: #fff;
  background: #17312a;
  box-shadow: 0 12px 35px rgba(0, 0, 0, .28);
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transition: .25s ease;
  max-width: 90vw;
  text-align: center;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

.toast.toast-error {
  background: #922b2b;
  color: #fff;
  box-shadow: 0 12px 35px rgba(146, 43, 43, .4);
}

.toast.toast-success {
  background: #176b57;
  color: #fff;
  box-shadow: 0 12px 35px rgba(23, 107, 87, .4);
}

/* Bloqueio absoluto da área logada antes da autorização - Prevenção total de vazamento e rolagem */
body:not(.cemac-authenticated) {
  overflow: hidden !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-height: 100dvh !important;
  position: fixed !important;
  width: 100% !important;
  overscroll-behavior: none !important;
}

body:not(.cemac-authenticated) #appContent {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
}

@media (max-width: 1150px) {
  .class-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .class-card p {
    min-height: auto;
  }

  .game-layout {
    grid-template-columns: 1fr;
  }

  .side-panel {
    display: grid;
    grid-template-columns: 1fr 1fr 1.2fr;
    align-items: start;
  }

  .camera-box {
    grid-column: 3;
    grid-row: 1 / span 3;
  }

  .instruction {
    grid-column: 1 / 3;
  }
}

@media (max-width: 800px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-demo {
    display: none;
  }

  .games-grid {
    grid-template-columns: 1fr;
  }

  .subject-nav {
    grid-template-columns: repeat(2, 1fr);
  }

  .game-toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .game-crumbs {
    display: none;
  }

  .choice-grid {
    left: 3%;
    right: 3%;
  }

  .choices-4 {
    grid-template-columns: repeat(2, 1fr);
    bottom: 42px;
  }

  .choices-4 .choice-card {
    min-height: 115px;
    flex-direction: row;
    gap: 7px;
  }

  .choices-4 .choice-emoji {
    font-size: 40px;
  }

  .play-scene {
    bottom: 300px;
  }

  .coach-bubble {
    bottom: 273px;
  }
}

@media (max-width: 620px) {
  .app-shell {
    padding: 10px;
  }

  .topbar {
    align-items: flex-start;
    min-height: 65px;
  }

  .brand-logo {
    width: 58px;
    height: 58px;
  }

  .brand strong {
    font-size: 17px;
  }

  .brand small {
    display: none;
  }

  .top-actions .soft-btn:not(.sound-toggle):not(.sound-settings):not(:last-child) {
    display: none;
  }

  .soft-btn {
    min-height: 44px;
    padding: 0 11px;
    font-size: 13px;
  }

  .hero {
    min-height: 360px;
    padding: 30px 22px;
    border-radius: 28px;
  }

  .hero h1 {
    font-size: 43px;
  }

  .hero-pills span:nth-child(3) {
    display: none;
  }

  .class-grid {
    grid-template-columns: 1fr;
  }

  .class-card {
    min-height: 270px;
  }

  .bncc-note {
    align-items: flex-start;
  }

  .bncc-mark {
    width: 55px;
    height: 55px;
    border-radius: 18px;
  }

  .catalog-hero {
    min-height: 210px;
    padding: 27px 21px;
    border-radius: 27px;
  }

  .class-stamp {
    display: none;
  }

  .catalog-hero h1 {
    font-size: 38px;
  }

  .subject-picker {
    grid-template-columns: 1fr;
  }

  .subject-picker select {
    width: 100%;
  }

  .subject-nav {
    position: static;
  }

  .subject-nav a {
    font-size: 14px;
  }

  .subject-section {
    padding: 18px;
    border-radius: 25px;
  }

  .subject-heading {
    align-items: flex-start;
  }

  .subject-icon {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    font-size: 30px;
  }

  .subject-heading small {
    display: none;
  }

  .game-card {
    min-height: 220px;
    padding: 17px;
    grid-template-columns: auto 1fr;
  }

  .game-go {
    display: none;
  }

  .game-meta {
    grid-column: 1 / 3;
  }

  .game-icon {
    width: 65px;
    height: 65px;
    font-size: 36px;
  }

  .game-toolbar .text-back {
    min-height: 44px;
    padding: 0 12px;
    font-size: 13px;
  }

  .stage {
    min-height: 670px;
    border-radius: 27px;
  }

  .stage::before {
    inset: 10px;
  }

  .stage-heading {
    top: 14px;
    width: 90%;
  }

  .play-scene {
    inset: 105px 5% 330px;
  }

  .choice-grid,
  .choices-2,
  .choices-3 {
    left: 4%;
    right: 4%;
    bottom: 26px;
    grid-template-columns: repeat(2, 1fr);
  }

  .choice-card,
  .choices-4 .choice-card {
    min-height: 120px;
    padding: 12px 7px 8px;
    flex-direction: column;
  }

  .choice-emoji,
  .choices-4 .choice-emoji {
    font-size: 45px;
  }

  .choice-card strong,
  .choices-4 .choice-card strong {
    font-size: 14px;
  }

  .choices-3 .choice-card:last-child {
    grid-column: 1 / 3;
    min-height: 105px;
  }

  .coach-bubble {
    bottom: 282px;
    max-width: 90%;
  }

  .stage.cooperative-mode .duo-scene {
    inset: 96px 3% 335px;
  }

  .duo-challenge {
    width: 96%;
    padding: 15px;
    column-gap: 10px;
    border-radius: 23px;
  }

  .duo-challenge>span {
    font-size: 53px;
  }

  .duo-challenge strong {
    font-size: 20px;
  }

  .duo-challenge small {
    font-size: 12px;
  }

  .duo-controls {
    left: 2.5%;
    right: 2.5%;
    bottom: 48px;
    gap: 5px;
  }

  .duo-player {
    min-height: 155px;
    padding: 10px 4px;
    border-width: 4px;
    border-radius: 22px;
  }

  .duo-avatar {
    width: 39px;
    height: 39px;
    font-size: 19px;
  }

  .duo-player strong {
    font-size: 17px;
  }

  .duo-player small {
    font-size: 10px;
  }

  .duo-player kbd {
    display: none;
  }

  .duo-link {
    width: 39px;
    border-width: 3px;
    font-size: 21px;
  }

  .stage.cooperative-mode .coach-bubble {
    bottom: 236px;
  }

  .pattern-line {
    padding: 18px;
    font-size: 43px;
  }

  .sound-wave i {
    display: none;
  }

  .sound-wave strong {
    margin: 0;
    font-size: 43px;
  }

  .emotion-scene,
  .community-scene {
    padding: 18px;
  }

  .emotion-scene span,
  .community-scene span {
    font-size: 55px;
  }

  .emotion-scene strong,
  .community-scene strong {
    font-size: 18px;
  }

  .activity-scene {
    padding: 18px;
  }

  .activity-scene span {
    font-size: 55px;
  }

  .activity-scene strong {
    font-size: 19px;
  }

  .side-panel {
    grid-template-columns: 1fr 1fr;
  }

  .camera-box {
    grid-column: auto;
    grid-row: auto;
  }

  .learning-card {
    grid-column: 1 / 3;
  }

  .instruction {
    display: none;
  }

  .panel-actions {
    grid-column: 1 / 3;
  }

  .sound-replay {
    grid-column: 1 / 3;
  }

  .celebration-card {
    padding: 28px 20px;
  }

  .celebration-actions {
    flex-direction: column;
  }

  .sound-control {
    padding: 13px;
  }

  .sound-control>span {
    align-items: flex-start;
  }

  .sound-actions {
    flex-direction: column;
  }

  .sound-actions .primary-btn {
    width: 100%;
    margin-left: 0;
  }
}

/* Tablets: navegação por toque, retrato e paisagem */
@media (min-width: 621px) and (max-width: 1180px) {
  .app-shell {
    padding:
      max(14px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  }

  .topbar {
    min-height: 70px;
    margin-bottom: 12px;
    gap: 12px;
  }

  .brand-logo {
    width: 64px;
    height: 64px;
  }

  .brand strong {
    font-size: 21px;
  }

  .brand small {
    font-size: 12px;
  }

  .top-actions {
    gap: 7px;
  }

  .soft-btn,
  .text-back,
  .panel-btn {
    min-height: 52px;
  }

  .soft-btn {
    padding: 0 13px;
    font-size: 13px;
  }

  .class-card,
  .game-card,
  .choice-card,
  .duo-player {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  .catalog-hero {
    min-height: 225px;
    padding: 30px;
  }

  .class-stamp {
    width: 112px;
    height: 112px;
    border-radius: 34px;
    font-size: 61px;
  }

  .subject-picker select {
    min-height: 54px;
    font-size: 16px;
  }

  .subject-nav a {
    min-height: 54px;
    padding: 0 9px;
    font-size: 13px;
  }

  .subject-section {
    padding: 22px;
  }

  .game-card {
    padding: 17px;
  }

  .game-icon {
    width: 66px;
    height: 66px;
    border-radius: 20px;
    font-size: 37px;
  }

  .game-copy strong {
    font-size: 19px;
  }

  .game-copy small {
    font-size: 13px;
  }

  .game-toolbar .text-back {
    min-width: 160px;
  }

  .stage {
    min-height: clamp(650px, 72dvh, 720px);
  }

  .choice-card {
    min-height: 142px;
  }

  .side-panel {
    gap: 10px;
    padding: 14px;
  }

  .panel-btn {
    font-size: 14px;
  }

  .camera-box {
    min-height: 150px;
  }

  .modal-close {
    width: 52px;
    height: 52px;
  }

  .sound-control input[type="range"] {
    height: 36px;
  }
}

@media (min-width: 700px) and (max-width: 899px) {

  #guideBtn,
  #helpBtn {
    display: none;
  }

  .games-grid {
    grid-template-columns: 1fr 1fr;
  }

  .game-card {
    min-height: 190px;
    grid-template-columns: auto 1fr;
    gap: 10px 13px;
  }

  .game-go {
    display: none;
  }

  .subject-nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .stage {
    min-height: 690px;
  }

  .play-scene {
    bottom: 295px;
  }

  .choice-grid,
  .choices-2,
  .choices-3 {
    left: 5%;
    right: 5%;
    bottom: 70px;
  }

  .choices-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .choices-3 .choice-card:last-child {
    grid-column: auto;
    min-height: 142px;
  }

  .coach-bubble {
    bottom: 236px;
  }

  .side-panel {
    grid-template-columns: 1fr 1fr 1.1fr;
    align-items: stretch;
  }

  .progress-card {
    grid-column: 1;
    grid-row: 1;
  }

  .learning-card {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .camera-box {
    grid-column: 3;
    grid-row: 1 / span 3;
    min-height: 170px;
  }

  .status-pill {
    grid-column: 1;
    grid-row: 2;
  }

  .panel-actions {
    grid-column: 1 / 3;
    grid-row: 3;
  }

  .sound-replay {
    grid-column: 1 / 3;
  }

  .instruction {
    grid-column: 1 / 4;
  }
}

@media (min-width: 900px) and (max-width: 1180px) and (orientation: landscape) {
  .app-shell {
    padding-top: max(9px, env(safe-area-inset-top));
    padding-bottom: max(10px, env(safe-area-inset-bottom));
  }

  .topbar {
    min-height: 58px;
    margin-bottom: 7px;
  }

  .brand-logo {
    width: 56px;
    height: 56px;
  }

  .brand small {
    display: none;
  }

  #guideBtn {
    display: none;
  }

  .soft-btn {
    min-height: 48px;
    padding: 0 11px;
    font-size: 12px;
  }

  .game-toolbar {
    margin-bottom: 7px;
  }

  .game-layout {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr) 282px;
    gap: 12px;
    align-items: start;
  }

  .stage {
    height: calc(100dvh - 126px);
    min-height: 590px;
    border-radius: 29px;
  }

  .stage::before {
    inset: 15px;
  }

  .stage-heading {
    top: 14px;
    width: 88%;
  }

  .play-scene {
    inset: 102px 5% 268px;
  }

  .choice-grid {
    left: 4%;
    right: 4%;
    bottom: 72px;
    gap: 10px;
  }

  .choices-2 {
    left: 11%;
    right: 11%;
  }

  .choice-card {
    min-height: 130px;
    padding: 12px 8px 9px;
    border-width: 5px;
    border-radius: 24px;
  }

  .choice-emoji {
    font-size: clamp(43px, 5vw, 64px);
  }

  .choice-visual {
    width: 78px;
    height: 72px;
  }

  .choice-card strong {
    font-size: 15px;
  }

  .coach-bubble {
    bottom: 211px;
  }

  .side-panel {
    max-height: calc(100dvh - 126px);
    padding: 11px;
    display: flex;
    gap: 7px;
    overflow-y: auto;
    overscroll-behavior: contain;
    border-radius: 25px;
  }

  .progress-card {
    padding: 12px;
    border-radius: 18px;
  }

  .progress-card strong {
    font-size: 29px;
  }

  .mini-stars {
    min-height: 18px;
    margin-top: 3px;
  }

  .mini-stars span {
    font-size: 16px;
  }

  .learning-card {
    padding: 11px;
  }

  .learning-card strong {
    font-size: 12px;
  }

  .learning-card small {
    font-size: 10px;
  }

  .camera-box {
    min-height: 150px;
    aspect-ratio: 16 / 9;
    flex: 0 0 auto;
  }

  .status-pill {
    padding: 8px 10px;
    font-size: 12px;
  }

  .panel-btn {
    min-height: 47px;
    font-size: 12px;
  }

  .instruction {
    padding: 9px;
    font-size: 10px;
  }

  .stage.cooperative-mode .duo-scene {
    inset: 92px 4% 285px;
  }

  .duo-controls {
    left: 4%;
    right: 4%;
    bottom: 62px;
  }

  .duo-player {
    min-height: 145px;
  }

  .stage.cooperative-mode .coach-bubble {
    bottom: 220px;
  }
}

@media (hover: none),
(pointer: coarse) {

  button,
  a,
  select,
  input[type="range"] {
    touch-action: manipulation;
  }

  .stage {
    cursor: default;
  }

  .choice-card,
  .duo-player {
    cursor: pointer;
  }

  .soft-btn:hover,
  .text-back:hover,
  .game-card:hover,
  .choice-card:hover {
    transform: none;
  }

  .game-card:hover {
    box-shadow: none;
  }

  .choice-card:active,
  .game-card:active,
  .soft-btn:active {
    transform: scale(.98);
  }
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ═══════════════════════════════════════════════════════════════
   TELA DE LOGIN — CEMAC em Movimento
   ═══════════════════════════════════════════════════════════════ */

/* Import de fonte infantil amigável */
@import url("https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&display=swap");

.login-shell {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 3vw, 24px);
  font-family: "Nunito", "Trebuchet MS", system-ui, sans-serif;
  background:
    radial-gradient(circle at 12% 15%, rgba(255, 214, 92, .35) 0 10%, transparent 10.5%),
    radial-gradient(circle at 88% 10%, rgba(96, 182, 234, .25) 0 12%, transparent 12.5%),
    radial-gradient(circle at 50% 90%, rgba(45, 153, 119, .2) 0 15%, transparent 15.5%),
    linear-gradient(160deg, #e8f9f2 0%, #d0f0e4 35%, #c8edff 70%, #fff4d4 100%);
  opacity: 1;
  transition: opacity .5s ease;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.login-shell.login-visible,
#loginMount.app-content-ready .login-shell {
  opacity: 1 !important;
  visibility: visible !important;
}

.login-shell.login-leaving {
  opacity: 0 !important;
  pointer-events: none !important;
  transition: opacity .6s ease;
}

/* Fundo decorativo flutuante */
.login-bg {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
}

.login-wave {
  position: absolute;
  left: -5%;
  width: 110%;
  border-radius: 50%;
}

.wave-top {
  top: -60px;
  height: 140px;
  background: rgba(23, 107, 87, .07);
}

.wave-bottom {
  bottom: -60px;
  height: 140px;
  background: rgba(23, 107, 87, .07);
}

.login-bubble {
  position: absolute;
  font-size: 1.8rem;
  opacity: .55;
  animation: loginFloat linear infinite;
  user-select: none;
  pointer-events: none;
}

.lb-1 {
  top: 8%;
  left: 5%;
  animation-duration: 6s;
  animation-delay: 0s;
  font-size: 1.4rem;
}

.lb-2 {
  top: 15%;
  right: 8%;
  animation-duration: 8s;
  animation-delay: -2s;
  font-size: 2rem;
}

.lb-3 {
  top: 60%;
  left: 3%;
  animation-duration: 7s;
  animation-delay: -1s;
  font-size: 1.6rem;
}

.lb-4 {
  top: 40%;
  right: 4%;
  animation-duration: 5.5s;
  animation-delay: -3s;
  font-size: 1rem;
  opacity: .35;
}

.lb-5 {
  bottom: 20%;
  left: 8%;
  animation-duration: 9s;
  animation-delay: -4s;
  font-size: 1.8rem;
}

.lb-6 {
  bottom: 10%;
  right: 6%;
  animation-duration: 6.5s;
  animation-delay: -0.5s;
  font-size: 1.5rem;
}

.lb-7 {
  top: 30%;
  left: 12%;
  animation-duration: 7.5s;
  animation-delay: -2.5s;
  font-size: 1rem;
  opacity: .3;
}

.lb-8 {
  bottom: 35%;
  right: 10%;
  animation-duration: 8.5s;
  animation-delay: -1.5s;
  font-size: 1.6rem;
}

@keyframes loginFloat {

  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  25% {
    transform: translateY(-14px) rotate(-5deg);
  }

  75% {
    transform: translateY(8px) rotate(4deg);
  }
}

/* Card principal */
.login-card {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, .96);
  border-radius: 28px;
  padding: 40px 36px;
  max-width: 420px;
  width: 100%;
  box-shadow:
    0 4px 24px rgba(23, 107, 87, .12),
    0 32px 80px rgba(23, 107, 87, .10),
    0 0 0 1px rgba(23, 107, 87, .07);
  text-align: center;
  animation: loginCardIn .45s cubic-bezier(.22, .68, 0, 1.2) both;
}

@keyframes loginCardIn {
  from {
    opacity: 0;
    transform: scale(.92) translateY(24px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* Logo e mascote */
.login-mascot {
  position: relative;
  display: inline-block;
  margin-bottom: 12px;
}

.login-logo {
  width: 84px;
  height: 84px;
  object-fit: contain;
  border-radius: 20px;
  position: relative;
  z-index: 1;
  animation: logoSway 4s ease-in-out infinite;
}

@keyframes logoSway {

  0%,
  100% {
    transform: rotate(-2deg) scale(1);
  }

  50% {
    transform: rotate(2deg) scale(1.04);
  }
}

.mascot-glow {
  position: absolute;
  top: -8px;
  right: -8px;
  bottom: -8px;
  left: -8px;
  inset: -8px;
  border-radius: 28px;
  background: radial-gradient(circle, rgba(23, 107, 87, .18), transparent 70%);
  animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {

  0%,
  100% {
    opacity: .6;
    transform: scale(1);
  }

  50% {
    opacity: 1;
    transform: scale(1.08);
  }
}

/* Badge e título */
.login-badge {
  display: inline-block;
  background: linear-gradient(135deg, #176b57, #2d9977);
  color: #fff;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 10px;
}

.login-title {
  font-family: "Nunito", system-ui, sans-serif;
  margin: 0 0 4px;
  line-height: 1.1;
}

.login-title-main {
  display: block;
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--green, #176b57);
  letter-spacing: -.02em;
}

.login-title-sub {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  color: #2d9977;
}

.login-tagline {
  font-size: .95rem;
  color: #5a7a6e;
  font-weight: 600;
  margin: 0 0 18px;
}

.login-divider {
  width: 48px;
  height: 4px;
  background: linear-gradient(90deg, #176b57, #ffd65c);
  border-radius: 4px;
  margin: 0 auto 20px;
}

.login-question {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--ink, #18352e);
  margin: 0 0 20px;
}

/* Botões principais */
.login-choices {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 64px;
  padding: 14px 20px;
  border: none;
  border-radius: 18px;
  font-family: "Nunito", system-ui, sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  text-decoration: none;
}

.btn-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
}

.btn-text {
  flex: 1;
  text-align: center;
}

.login-btn-yes {
  background: linear-gradient(135deg, #176b57 0%, #2d9977 100%);
  color: #fff;
  box-shadow: 0 6px 24px rgba(23, 107, 87, .35);
}

.login-btn-yes:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 32px rgba(23, 107, 87, .45);
}

.login-btn-yes:active {
  transform: translateY(0);
}

.login-btn-no {
  background: rgba(100, 117, 111, .1);
  color: #64756f;
  border: 2px solid rgba(100, 117, 111, .2);
}

.login-btn-no:hover {
  background: rgba(100, 117, 111, .14);
}

.login-btn-no-active {
  border-color: rgba(255, 140, 82, .4);
  color: #d87532;
}

.login-no-hint {
  font-size: .85rem;
  color: #d87532;
  font-weight: 600;
  margin: 0;
  padding: 10px 16px;
  background: rgba(255, 214, 92, .2);
  border-radius: 12px;
  animation: loginCardIn .3s ease;
}

.login-footer-note {
  font-size: .78rem;
  color: #8a9e97;
  margin: 20px 0 0;
  line-height: 1.5;
}

/* Botão voltar */
.login-back-row {
  text-align: left;
  margin-bottom: 8px;
}

.login-back-btn {
  background: none;
  border: none;
  color: #2d9977;
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 0;
  text-decoration: none;
  transition: color .15s;
}

.login-back-btn:hover {
  color: #176b57;
}

/* Ícone grande */
.login-icon-big {
  font-size: 3.5rem;
  margin-bottom: 12px;
  display: block;
  animation: loginIconBounce 2.5s ease-in-out infinite;
}

@keyframes loginIconBounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

.login-step-title {
  font-family: "Nunito", system-ui, sans-serif;
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--ink, #18352e);
  margin: 0 0 10px;
}

.login-step-desc {
  font-size: .95rem;
  color: #5a7a6e;
  line-height: 1.6;
  margin: 0 0 20px;
}

/* Formulário Oficial de Login CEMAC (Google + CPF e Turma) */
.login-card-auth {
  max-width: 460px;
  padding: 36px 32px 30px;
}

/* Abas de seleção de perfil (Aluno / Professor) */
.login-tabs {
  display: flex;
  background: #eef5f1;
  padding: 4px;
  border-radius: 18px;
  margin: 0 0 20px;
  gap: 4px;
}

.login-tab {
  flex: 1;
  min-height: 46px;
  padding: 8px 12px;
  border: none;
  border-radius: 14px;
  background: transparent;
  color: #4f6b62;
  font-family: "Nunito", system-ui, sans-serif;
  font-size: .92rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  transition: all .2s cubic-bezier(.2, .8, .4, 1);
}

.login-tab .tab-icon {
  font-size: 1.15rem;
}

.login-tab:hover:not(.login-tab-active) {
  background: rgba(255, 255, 255, .5);
  color: #176b57;
}

.login-tab-active {
  background: #ffffff !important;
  color: #176b57 !important;
  box-shadow: 0 3px 12px rgba(23, 107, 87, .12), 0 1px 3px rgba(0, 0, 0, .05);
}

/* Campos do formulário */
.login-form-active {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
}

.login-field-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.login-label {
  font-size: .84rem;
  font-weight: 800;
  color: #176b57;
  letter-spacing: .02em;
}

.login-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.login-input-wrapper .input-icon {
  position: absolute;
  left: 14px;
  font-size: 1.15rem;
  pointer-events: none;
  z-index: 1;
  opacity: .85;
}

.login-input,
.login-select {
  width: 100%;
  min-height: 50px;
  padding: 10px 14px 10px 44px;
  border: 2px solid #cce8dd;
  border-radius: 14px;
  font-family: "Nunito", system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink, #18352e);
  background: #f7fcfa;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
  outline: none;
}

.login-input:focus,
.login-select:focus {
  border-color: #176b57;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(23, 107, 87, .12);
}

.login-input::placeholder {
  color: #9bb0a7;
  font-weight: 500;
}

.login-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23176b57' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  padding-right: 38px;
  cursor: pointer;
}

.login-helper {
  font-size: .75rem;
  color: #6b897e;
  font-weight: 600;
  margin-top: 2px;
}

/* Erro e avisos */
.login-form-error {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .88rem;
  color: #b91c1c;
  font-weight: 700;
  background: #fef2f2;
  border: 1.5px solid #fca5a5;
  border-radius: 14px;
  padding: 11px 15px;
  text-align: left;
  line-height: 1.45;
  animation: loginCardIn .25s ease;
}

.login-form-error .error-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

/* Botão oficial do Google */
.login-btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 12px 20px;
  margin-top: 4px;
  background: #ffffff;
  border: 2px solid #dadce0;
  border-radius: 16px;
  font-family: "Nunito", "Google Sans", system-ui, sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  color: #3c4043;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(60, 64, 67, .1);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.login-btn-google:hover:not(:disabled) {
  border-color: #4285f4;
  box-shadow: 0 8px 24px rgba(66, 133, 244, .2);
  transform: translateY(-2px);
}

.login-btn-google:active:not(:disabled) {
  transform: none;
}

.login-btn-google:disabled {
  opacity: .6;
  cursor: not-allowed;
}

.google-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

/* Loading no login */
.login-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 8px;
  color: #176b57;
  font-weight: 700;
  font-size: .9rem;
}

.login-spinner {
  width: 22px;
  height: 22px;
  border: 3px solid rgba(23, 107, 87, .2);
  border-top-color: #176b57;
  border-radius: 50%;
  animation: loginSpin .8s linear infinite;
  flex-shrink: 0;
}

@keyframes loginSpin {
  to {
    transform: rotate(360deg);
  }
}

/* Badge de Jogos em Dupla exclusivo para desktop */
.game-card-duo-mobile {
  opacity: .75;
  filter: saturate(.8);
  border-style: dashed;
}

.duo-mobile-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 5px;
  padding: 3px 9px;
  border-radius: 8px;
  background: #ede9fe;
  color: #6d28d9;
  font-size: .74rem;
  font-weight: 800;
}

.login-link {
  color: #2d9977;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color .15s ease;
}

.login-link:hover {
  color: #176b57;
}

.login-privacy {
  font-size: .76rem;
  color: #8a9e97;
  margin: 18px 0 0;
  line-height: 1.5;
}

/* Tela de boas-vindas com animação Foguete CEMAC em Movimento */
.login-card-welcome {
  background: linear-gradient(160deg, #eafaf4, #f7fdfa, #ffffff);
  max-width: 480px;
}

.login-confetti-row {
  font-size: 1.5rem;
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 8px;
  animation: loginCardIn .4s ease;
}

.welcome-rocket-container {
  background: linear-gradient(145deg, #094354, #12666b, #176b57);
  border-radius: 24px;
  padding: 16px 12px 10px;
  margin: 12px 0 20px;
  box-shadow: inset 0 2px 8px rgba(255, 255, 255, .15), 0 10px 28px rgba(18, 102, 107, .25);
  overflow: hidden;
  position: relative;
}

.welcome-badge {
  font-size: 11px;
  padding: 4px 10px;
}

.welcome-rocket-window {
  --rocket-travel: clamp(70px, 18vw, 150px);
  width: 100%;
  height: 140px;
  margin: 8px auto 0;
}

.welcome-rocket-window .loader-logo {
  width: 70px;
  height: 70px;
  padding: 6px;
}

.welcome-rocket-window .loader-rocket {
  width: 70px;
  height: 60px;
  left: 12%;
  top: 40%;
}

.welcome-rocket-window .rocket-body {
  font-size: 50px;
}

.welcome-rocket-window .rocket-destination {
  font-size: 40px;
  right: 6%;
  top: 12%;
}

.login-aluno-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(23, 107, 87, .07);
  border-radius: 16px;
  padding: 16px 20px;
  margin: 0 0 24px;
}

.login-aluno-nome {
  font-size: 1.2rem;
  font-weight: 900;
  color: #176b57;
}

.login-aluno-turma {
  font-size: .9rem;
  font-weight: 700;
  color: #2d9977;
}

.login-btn-start {
  background: linear-gradient(135deg, #176b57, #2d9977);
  color: #fff;
  font-size: 1.15rem;
  box-shadow: 0 6px 24px rgba(23, 107, 87, .4);
  animation: loginPulseGlow 2s ease-in-out infinite;
}

@keyframes loginPulseGlow {

  0%,
  100% {
    box-shadow: 0 6px 24px rgba(23, 107, 87, .4);
  }

  50% {
    box-shadow: 0 8px 36px rgba(23, 107, 87, .6);
  }
}

/* Tela de erro */
.login-card-error {
  background: linear-gradient(160deg, #fff8f0, #fff);
}

.login-error-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.login-btn-retry {
  background: linear-gradient(135deg, #e55f7e, #cf4f72);
  color: #fff;
  box-shadow: 0 4px 16px rgba(229, 95, 126, .35);
}

.login-btn-retry:hover {
  transform: translateY(-2px);
}

.login-btn-back2 {
  background: none;
  color: #64756f;
  border: 2px solid rgba(100, 117, 111, .25);
  font-size: .95rem;
  min-height: 52px;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVIDADE MOBILE — Melhorias para smartphones
   ═══════════════════════════════════════════════════════════════ */

/* Mobile portrait < 480px */
@media (max-width: 479px) {

  /* Login */
  .login-card {
    padding: 26px 18px;
    border-radius: 22px;
    width: 100%;
    max-width: 95vw;
  }

  .login-card-auth {
    padding: 26px 18px;
  }

  .login-title-main {
    font-size: 1.9rem;
  }

  .login-logo {
    width: 62px;
    height: 62px;
  }

  .login-tab {
    min-height: 42px;
    font-size: .84rem;
    padding: 6px 8px;
  }

  .login-btn-google {
    min-height: 52px;
    font-size: .98rem;
  }

  /* Header Mobile Funcional e Elegante */
  .topbar {
    padding: 8px 10px;
    flex-wrap: nowrap !important;
    gap: 6px;
    min-height: 56px;
    align-items: center;
    justify-content: space-between;
  }

  .brand {
    gap: 8px;
    flex-shrink: 0;
  }

  .brand-logo {
    width: 34px;
    height: 34px;
  }

  .brand strong {
    font-size: .95rem !important;
  }

  .brand-sub,
  .brand-tagline,
  .brand small {
    display: none !important;
  }

  .top-actions {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: nowrap !important;
  }

  .user-badge {
    max-width: 120px;
    padding: 3px 6px;
    gap: 4px;
    margin-right: 2px;
    flex-shrink: 1;
  }

  .user-icon {
    width: 24px;
    height: 24px;
    font-size: 13px;
  }

  .user-details strong {
    font-size: .78rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .user-details small {
    display: none !important;
  }

  .badge-logout {
    padding: 2px;
    font-size: .95rem;
  }

  .soft-btn {
    min-height: 40px;
    min-width: 40px;
    padding: 0 8px;
    font-size: .8rem;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  .btn-label-audio,
  .btn-label-eq,
  .btn-label-aux,
  .btn-label-exit {
    display: none !important;
  }

  .header-aux-btn,
  #guideBtn,
  #helpBtn,
  #fullscreenBtn {
    display: none !important;
    /* Mantém cabeçalho limpo e sem quebra em celulares */
  }

  /* Modal de Som Otimizado no Mobile */
  .modal {
    padding: 12px;
  }

  .sound-card {
    padding: 20px 16px;
    border-radius: 22px;
    max-height: 90dvh;
    overflow-y: auto;
    width: min(500px, 96vw);
  }

  .sound-card h2 {
    font-size: 22px;
    margin: 4px 0 8px;
  }

  .sound-controls {
    margin-top: 14px;
    gap: 10px;
  }

  .sound-control {
    padding: 12px 14px;
    border-radius: 16px;
    gap: 8px;
  }

  .sound-control input[type="range"] {
    height: 38px;
    cursor: pointer;
  }

  .sound-actions {
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
  }

  .sound-actions button {
    width: 100%;
    min-height: 48px;
  }

  .sound-actions .primary-btn {
    margin-left: 0;
  }

  /* Home screen */
  .hero {
    flex-direction: column;
    padding: 20px 16px;
    gap: 16px;
  }

  .hero-demo {
    display: none;
  }

  /* Esconde animação decorativa no mobile */
  .hero-copy h1 {
    font-size: 1.5rem;
  }

  .class-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 0 12px;
  }

  .class-card {
    padding: 16px 12px;
    border-radius: 14px;
  }

  .class-card h3 {
    font-size: .9rem;
  }

  .class-card p {
    font-size: .78rem;
  }

  /* Catálogo */
  .catalog-header {
    padding: 16px 12px 12px;
  }

  .subject-list {
    padding: 12px;
  }

  .game-card {
    border-radius: 14px;
  }

  /* Jogo — layout empilhado para mobile */
  .game-layout {
    flex-direction: column;
    gap: 0;
  }

  .stage {
    min-height: 55dvh;
    padding: 12px;
    border-radius: 0;
  }

  .side-panel {
    display: none;
    /* Escondido por padrão no mobile */
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200;
    border-radius: 20px 20px 0 0;
    padding: 16px;
    max-height: 50dvh;
    overflow-y: auto;
  }

  .side-panel.panel-open {
    display: flex !important;
    flex-direction: column;
    gap: 10px;
  }

  /* Botão flutuante para abrir painel no mobile */
  .mobile-panel-toggle {
    display: flex !important;
    position: fixed;
    bottom: 16px;
    right: 16px;
    z-index: 210;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--green, #176b57);
    color: #fff;
    border: none;
    font-size: 1.4rem;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(23, 107, 87, .4);
    cursor: pointer;
  }

  /* Alternativas maiores no mobile */
  .choice-card {
    min-height: 80px;
    font-size: 1rem;
    border-radius: 14px;
    padding: 14px 10px;
  }

  .choice-emoji {
    font-size: 2.2rem;
  }

  /* Toolbar do jogo mais compacta */
  .game-toolbar {
    padding: 8px 12px;
    gap: 8px;
  }

  .game-back {
    font-size: .85rem;
  }

  .game-crumbs {
    font-size: .8rem;
  }

  /* Coaching bubble maior para toque */
  .coach-bubble {
    font-size: .95rem;
    padding: 10px 16px;
  }

  /* Botões de ação maiores para toque */
  .panel-btn {
    min-height: 52px;
    font-size: .95rem;
    border-radius: 12px;
  }
}

/* Mobile landscape e tablet portrait: 480–767px */
@media (min-width: 480px) and (max-width: 767px) {
  .login-card {
    max-width: 440px;
    padding: 32px 28px;
  }

  .topbar {
    padding: 8px 14px;
    min-height: 60px;
    flex-wrap: nowrap;
    gap: 8px;
  }

  .brand-logo {
    width: 40px;
    height: 40px;
  }

  .brand strong {
    font-size: 1.1rem;
  }

  .brand-tagline,
  .brand small {
    display: none;
  }

  .top-actions {
    gap: 6px;
    flex-wrap: nowrap;
  }

  .soft-btn {
    padding: 0 12px;
    min-height: 42px;
    font-size: .84rem;
  }

  .header-aux-btn {
    display: none;
  }

  .class-grid {
    grid-template-columns: 1fr 1fr;
  }

  .hero {
    padding: 24px 20px;
  }

  .game-layout {
    flex-direction: column;
  }

  .stage {
    min-height: 50dvh;
  }

  .side-panel {
    max-width: 100%;
  }

  .choice-card {
    min-height: 72px;
  }
}

/* ═══════════════════════════════════════════════════════════════
   ESTILOS PARA QR CODE LOGIN E PERFIS DE TURMA
   ═══════════════════════════════════════════════════════════════ */

/* Botão Área do Professor */
.login-choices-dual {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.login-btn-teacher {
  background: linear-gradient(135deg, #287fa8 0%, #258a63 100%);
  color: #fff;
  box-shadow: 0 6px 24px rgba(40, 127, 168, .35);
}

.login-btn-teacher:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 32px rgba(40, 127, 168, .45);
}

.btn-subtext {
  display: block;
  font-size: .75rem;
  opacity: .85;
  font-weight: 600;
}

/* Exibição do QR Code */
.login-card-qr {
  max-width: 440px;
}

.login-role-badge {
  display: inline-block;
  font-size: .8rem;
  font-weight: 800;
  color: #176b57;
  background: #e8f9f2;
  padding: 4px 12px;
  border-radius: 12px;
  float: right;
}

.qr-display-wrapper {
  position: relative;
  width: 210px;
  height: 210px;
  margin: 16px auto;
  padding: 12px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 8px 30px rgba(23, 107, 87, .15), 0 0 0 3px #176b57;
  overflow: hidden;
}

.qr-box {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-box svg {
  width: 100%;
  height: 100%;
  border-radius: 8px;
}

.qr-scan-beam {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent, #ffd65c, #176b57, transparent);
  box-shadow: 0 0 12px #ffd65c;
  animation: scanBeam 2.4s cubic-bezier(.4, 0, .6, 1) infinite;
}

@keyframes scanBeam {

  0%,
  100% {
    top: 6%;
  }

  50% {
    top: 90%;
  }
}

.login-qr-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: .88rem;
  font-weight: 700;
  color: #2d9977;
  margin-bottom: 18px;
}

.pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2d9977;
  animation: pulseDot 1.4s infinite;
}

@keyframes pulseDot {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.5);
    opacity: .4;
  }
}

/* Botões alternativos */
.login-alt-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.login-btn-soft {
  background: #f0f9f5;
  border: 1px dashed #2d9977;
  color: #176b57;
  padding: 10px 14px;
  border-radius: 12px;
  font-family: inherit;
  font-weight: 700;
  font-size: .88rem;
  cursor: pointer;
  transition: background .15s;
}

.login-btn-soft:hover {
  background: #e0f4ec;
}

.login-btn-demo {
  background: linear-gradient(135deg, #ffd65c 0%, #f4b41a 100%);
  color: #18352e;
  border: none;
  padding: 12px 14px;
  border-radius: 12px;
  font-family: inherit;
  font-weight: 800;
  font-size: .9rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(244, 180, 26, .3);
  transition: transform .15s;
}

.login-btn-demo:hover {
  transform: translateY(-2px);
}

/* Scanner de Webcam Overlay */
.webcam-scanner-box {
  margin-top: 16px;
  padding: 14px;
  background: #18352e;
  color: #fff;
  border-radius: 16px;
  text-align: center;
}

.webcam-hint {
  font-size: .82rem;
  margin: 0 0 10px;
  opacity: .9;
}

.webcam-video {
  width: 100%;
  max-height: 200px;
  border-radius: 12px;
  background: #000;
  object-fit: cover;
}

.login-btn-close-webcam {
  margin-top: 10px;
  background: rgba(255, 255, 255, .2);
  border: none;
  color: #fff;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  font-size: .8rem;
}

/* User Badge no Header */
.user-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(23, 107, 87, .12), rgba(45, 153, 119, .08));
  border: 1px solid rgba(23, 107, 87, .25);
  padding: 4px 10px;
  border-radius: 16px;
  margin-right: 8px;
  max-width: clamp(130px, 35vw, 320px);
}

.user-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}

.user-details {
  display: flex;
  flex-direction: column;
  text-align: left;
  overflow: hidden;
}

.user-details strong {
  font-size: .85rem;
  color: #176b57;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-details small {
  font-size: .72rem;
  color: #2d9977;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.badge-logout {
  background: none;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  opacity: .7;
  padding: 2px;
  flex-shrink: 0;
  transition: opacity .15s;
}

.badge-logout:hover {
  opacity: 1;
}

@media (max-width: 480px) {
  .user-badge {
    max-width: 125px;
    padding: 3px 6px;
    margin-right: 4px;
  }

  .user-details small {
    display: none;
  }

  .login-card {
    padding: 24px 16px;
    border-radius: 20px;
  }

  .login-title-main {
    font-size: 1.9rem;
  }

  .login-btn {
    min-height: 52px;
    padding: 10px 14px;
    font-size: .95rem;
  }
}

/* Estilo para turmas bloqueadas no Home Screen */
.class-card.class-locked {
  opacity: .55;
  filter: grayscale(40%);
  cursor: not-allowed !important;
  position: relative;
  border: 2px dashed #cf4f72 !important;
}

.class-card.class-locked::after {
  content: "🔒 Acesso Restrito à sua Turma";
  position: absolute;
  top: 12px;
  right: 12px;
  background: #cf4f72;
  color: #fff;
  font-size: .7rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 8px;
}


/* Tablet portrait: 768–1023px */
@media (min-width: 768px) and (max-width: 1023px) {
  .login-card {
    max-width: 460px;
  }

  [data-device="tablet"] .game-layout {
    flex-direction: column;
  }

  [data-device="tablet"] .stage {
    min-height: clamp(600px, 65dvh, 700px);
  }

  [data-device="tablet"] .side-panel {
    max-width: 100%;
  }
}

/* Desktop / tablet landscape: já tem bom layout — apenas ajustes de toque */
@media (min-width: 1024px) {
  .login-card {
    padding: 48px 42px;
  }

  .login-title-main {
    font-size: 2.8rem;
  }
}

/* ── Estilos exclusivos para dispositivo móvel (via atributo data-device) ── */
[data-device="mobile"] .camera-box {
  display: none !important;
}

[data-device="mobile"] #cameraBtn {
  display: none !important;
}

[data-device="mobile"] #switchHandBtn {
  display: none !important;
}

[data-device="mobile"] .mobile-panel-toggle {
  display: flex !important;
}

[data-device="mobile"] .interactionInstruction {
  display: none !important;
}

/* Botão de painel no mobile (oculto por padrão, exibido via JS/CSS acima) */
.mobile-panel-toggle {
  display: none;
}

/* ── Instrução adaptada por tipo de dispositivo ── */
[data-device="mobile"] .instruction::before {
  content: "Toque na resposta! ";
}

[data-device="tablet"] .instruction::before {
  content: "Toque ou use suas mãos! ";
}

[data-device="desktop"] .instruction::before {
  content: "";
}

/* Código da Sessão Web para Digitação Manual */
.login-session-code-wrapper {
  margin: 12px auto 16px;
  text-align: center;
  max-width: 320px;
}

.session-code-label {
  display: block;
  font-size: 0.8rem;
  color: #555;
  font-weight: 600;
  margin-bottom: 6px;
}

.session-code-box {
  background: #f0f7f4;
  border: 1.5px dashed #176b57;
  border-radius: 10px;
  padding: 8px 12px;
  display: inline-block;
}

.session-code-box code {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.95rem;
  font-weight: 700;
  color: #176b57;
  letter-spacing: 0.5px;
  user-select: all;
}


/* ==========================================================================
   ✨ PREMIUM VISUAL REFRESH — CEMAC EM MOVIMENTO (Modern Educational Game Design)
   ========================================================================== */

:root {
  --font-main: 'Nunito', system-ui, -apple-system, sans-serif;
  --font-display: 'Fredoka', 'Nunito', cursive, sans-serif;
  --shadow-lg: 0 20px 45px -10px rgba(21, 122, 98, 0.22), 0 8px 16px -4px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 12px 28px -6px rgba(21, 122, 98, 0.14), 0 4px 10px -2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 4px 14px rgba(21, 122, 98, 0.08);
}

body {
  font-family: var(--font-main);
  background:
    radial-gradient(circle at 10% 12%, rgba(255, 214, 92, 0.4) 0 8%, transparent 8.5%),
    radial-gradient(circle at 90% 15%, rgba(96, 182, 234, 0.3) 0 12%, transparent 12.5%),
    radial-gradient(circle at 85% 85%, rgba(233, 97, 118, 0.2) 0 10%, transparent 10.5%),
    linear-gradient(150deg, #fffdf8 0%, #f0faf5 50%, #edf7ff 100%);
  color: #18352e;
}

h1,
h2,
h3,
.brand strong,
.step-label,
.round-kicker,
.login-title,
.class-btn strong,
.choice-card strong {
  font-family: var(--font-display);
}

/* ── Topbar & Header ────────────────────────────────────────────── */
.topbar {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 2px solid rgba(23, 107, 87, 0.12);
  border-radius: 28px;
  padding: 10px 20px;
  margin: 12px auto 22px;
  box-shadow: 0 10px 30px rgba(29, 71, 57, 0.07);
}

.brand {
  gap: 14px;
}

.brand-logo {
  width: 58px;
  height: 58px;
  filter: drop-shadow(0 6px 12px rgba(23, 107, 87, 0.2));
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.brand:hover .brand-logo {
  transform: rotate(-8deg) scale(1.08);
}

.brand strong {
  font-size: clamp(20px, 2.2vw, 28px);
  color: #137a63;
  letter-spacing: -0.01em;
}

.brand small {
  color: #587970;
  font-size: 13px;
  font-weight: 700;
}

/* Badge de Perfil do Aluno / Professor */
.user-badge {
  background: #ffffff;
  border: 2px solid #2d9977;
  border-radius: 999px;
  padding: 6px 14px 6px 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 6px 18px rgba(45, 153, 119, 0.18), 0 2px 0 #2d9977;
}

.user-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffd65c, #ffb703);
  display: grid;
  place-items: center;
  font-size: 18px;
  box-shadow: 0 3px 8px rgba(255, 183, 3, 0.35);
}

.user-details strong {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: #137a63;
  line-height: 1.15;
}

.user-details small {
  font-size: 12px;
  font-weight: 800;
  color: #2d9977;
}

.badge-logout {
  background: #fee2e2;
  border: 1.5px solid #fca5a5;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 800;
  color: #dc2626;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.badge-logout:hover {
  background: #fecaca;
  transform: scale(1.05);
}

/* Botões Suaves (Sons, Ajustar Som, Guia) */
.soft-btn {
  min-height: 44px;
  padding: 0 16px;
  border: 2px solid rgba(23, 107, 87, 0.14);
  border-radius: 18px;
  background: #ffffff;
  color: #176b57;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(29, 71, 57, 0.05), 0 2px 0 rgba(23, 107, 87, 0.12);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.soft-btn:hover {
  transform: translateY(-2px);
  background: #f7fcf9;
  border-color: #2d9977;
  box-shadow: 0 8px 18px rgba(45, 153, 119, 0.15), 0 3px 0 #2d9977;
}

.soft-btn:active {
  transform: translateY(1px);
  box-shadow: 0 2px 6px rgba(45, 153, 119, 0.1);
}

/* Botão Voltar (Cápsula elegante) */
.text-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 999px;
  background: #ffffff;
  border: 2px solid rgba(23, 107, 87, 0.16);
  color: #176b57;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  box-shadow: 0 4px 14px rgba(23, 107, 87, 0.08), 0 2px 0 rgba(23, 107, 87, 0.16);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  margin-bottom: 18px;
}

.text-back:hover {
  transform: translateY(-2px);
  background: #f7fcf9;
  border-color: #2d9977;
  box-shadow: 0 8px 20px rgba(23, 107, 87, 0.15), 0 3px 0 #2d9977;
}

/* ── Hero do Catálogo de Jogos ──────────────────────────────────── */
.catalog-hero {
  min-height: 200px;
  padding: clamp(24px, 3.5vw, 42px);
  border-radius: 34px;
  background: linear-gradient(135deg, #0d523f 0%, #157a62 45%, #229c7d 100%);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: relative;
  overflow: hidden;
  border: 4px solid rgba(255, 255, 255, 0.25);
}

.catalog-hero::before {
  content: "";
  position: absolute;
  top: -40px;
  right: 15%;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 214, 92, 0.25) 0%, transparent 70%);
  pointer-events: none;
}

.catalog-hero .step-label {
  display: inline-flex;
  align-items: center;
  background: linear-gradient(135deg, #ffd65c, #ffb703);
  color: #5a3700;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(255, 183, 3, 0.35);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.catalog-hero h1 {
  font-size: clamp(30px, 4vw, 52px);
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  margin: 10px 0 6px;
  line-height: 1.15;
}

.catalog-hero p {
  color: rgba(255, 255, 255, 0.92);
  font-size: 17px;
  font-weight: 600;
  margin: 0;
}

.class-stamp {
  width: 120px;
  height: 120px;
  border-radius: 36px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  font-size: 64px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

/* ── Seletor de Área / Filtro ───────────────────────────────────── */
.subject-picker {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  border: 2px solid rgba(23, 107, 87, 0.12);
  border-radius: 24px;
  padding: 14px 20px;
  margin: 18px 0 12px;
  box-shadow: var(--shadow-sm);
}

.subject-picker label {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: #137a63;
}

.subject-picker select {
  min-height: 46px;
  border: 2px solid rgba(23, 107, 87, 0.18);
  border-radius: 16px;
  padding: 0 20px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: #18352e;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* ── Menu de Categorias (Subject Nav) — CARDS LÚDICOS ────────────── */
.subject-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  padding: 16px 20px;
  margin: 16px 0 12px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  border: 2px solid rgba(23, 107, 87, 0.1);
  box-shadow: var(--shadow-md);
}

.subject-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 22px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  color: var(--subject);
  background: #edf7f3;
  background: color-mix(in srgb, var(--subject) 12%, #ffffff);
  border: 2.5px solid rgba(23, 107, 87, 0.3);
  border: 2.5px solid color-mix(in srgb, var(--subject) 32%, transparent);
  box-shadow: 0 4px 14px rgba(29, 71, 57, 0.05), 0 3px 0 rgba(23, 107, 87, 0.45);
  box-shadow: 0 4px 14px rgba(29, 71, 57, 0.05), 0 3px 0 color-mix(in srgb, var(--subject) 45%, transparent);
  transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
  min-height: 52px;
}

.subject-nav a:hover {
  transform: translateY(-4px) scale(1.03);
  background: #ddf0e7;
  background: color-mix(in srgb, var(--subject) 22%, #ffffff);
  border-color: var(--subject);
  box-shadow: 0 10px 24px rgba(23, 107, 87, 0.28), 0 5px 0 rgba(23, 107, 87, 0.6);
  box-shadow: 0 10px 24px color-mix(in srgb, var(--subject) 28%, transparent), 0 5px 0 color-mix(in srgb, var(--subject) 60%, transparent);
}

.subject-nav a:active {
  transform: translateY(1px);
  box-shadow: 0 2px 6px rgba(23, 107, 87, 0.2);
  box-shadow: 0 2px 6px color-mix(in srgb, var(--subject) 20%, transparent);
}

/* ── Card de Jogo no Catálogo ───────────────────────────────────── */
.game-card {
  min-height: 190px;
  padding: 22px;
  border: 3px solid rgba(24, 53, 46, 0.08);
  border-radius: 30px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  transition: all 0.24s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.game-card:hover {
  transform: translateY(-6px);
  border-color: var(--subject);
  box-shadow: 0 18px 38px rgba(23, 107, 87, 0.2), 0 4px 0 var(--subject);
  box-shadow: 0 18px 38px color-mix(in srgb, var(--subject) 20%, transparent), 0 4px 0 var(--subject);
}

.game-icon {
  width: 76px;
  height: 76px;
  border-radius: 24px;
  background: #ebf6f1;
  background: color-mix(in srgb, var(--subject) 15%, #ffffff);
  border: 2px solid rgba(23, 107, 87, 0.25);
  border: 2px solid color-mix(in srgb, var(--subject) 25%, transparent);
  font-size: 40px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.game-copy strong {
  font-family: var(--font-display);
  font-size: 22px;
  color: #18352e;
  letter-spacing: -0.01em;
}

/* ── ARENA DO JOGO (Stage) ──────────────────────────────────────── */
.stage {
  border-radius: 38px;
  border: 8px solid #ffffff;
  box-shadow: var(--shadow-lg);
  min-height: 660px;
  background:
    radial-gradient(circle at 50% 112%, rgba(255, 214, 92, 0.45) 0 28%, transparent 28.5%),
    linear-gradient(180deg, #dcf0fa 0%, #e6f7ea 65%, #dff2e1 100%);
}

.stage-heading {
  top: 18px;
}

.round-kicker {
  background: linear-gradient(135deg, #7b2cbf, #9d4edd);
  color: #ffffff;
  padding: 6px 18px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.06em;
  box-shadow: 0 4px 14px rgba(123, 44, 191, 0.35);
  text-transform: uppercase;
}

.stage-heading h2 {
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 36px);
  font-weight: 700;
  color: #18352e;
  background: rgba(255, 255, 255, 0.96);
  border: 3px solid rgba(255, 255, 255, 0.9);
  border-radius: 26px;
  padding: 10px 30px;
  box-shadow: 0 10px 30px rgba(29, 71, 57, 0.12);
  margin-top: 8px;
}

/* Itens da Rodada (Estrelas, Emojis, Formas) */
.play-scene {
  font-size: clamp(60px, 7.5vw, 100px);
  filter: drop-shadow(0 10px 20px rgba(255, 183, 3, 0.4));
  animation: starFloat 3s ease-in-out infinite alternate;
}

@keyframes starFloat {
  0% {
    transform: translateY(0) scale(1);
  }

  100% {
    transform: translateY(-8px) scale(1.03);
  }
}

/* Balão do Guia / Coach */
.coach-bubble {
  background: #ffffff;
  border: 3px solid #ffd65c;
  border-radius: 999px;
  padding: 10px 26px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: #6a4200;
  box-shadow: 0 8px 24px rgba(255, 183, 3, 0.25), 0 3px 0 #ffd65c;
}

/* ── BOTÕES DE RESPOSTA / ESCOLHA (Choice Cards) ────────────────── */
.choice-grid {
  bottom: 88px;
  gap: clamp(14px, 2vw, 24px);
}

.choice-card {
  min-height: 155px;
  padding: 18px 12px 14px;
  border: 6px solid #ffffff;
  border-radius: 32px;
  box-shadow: 0 14px 28px rgba(29, 71, 57, 0.12), 0 6px 0 rgba(0, 0, 0, 0.06);
  font-family: var(--font-display);
  font-weight: 700;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

.choice-card:nth-child(1) {
  background: linear-gradient(145deg, #ede9fe 0%, #ddd6fe 100%);
}

.choice-card:nth-child(2) {
  background: linear-gradient(145deg, #fef3c7 0%, #fde68a 100%);
}

.choice-card:nth-child(3) {
  background: linear-gradient(145deg, #dbeafe 0%, #bfdbfe 100%);
}

.choice-card:nth-child(4) {
  background: linear-gradient(145deg, #ffedd5 0%, #fed7aa 100%);
}

.choice-card:hover {
  transform: translateY(-8px) scale(1.03);
  box-shadow: 0 24px 40px rgba(29, 71, 57, 0.18), 0 8px 0 rgba(0, 0, 0, 0.08);
}

.choice-card.gesture-hover {
  outline: 7px solid #ffb703;
  outline-offset: 4px;
  transform: translateY(-8px) scale(1.05);
  box-shadow: 0 26px 44px rgba(255, 183, 3, 0.35), 0 8px 0 rgba(0, 0, 0, 0.1);
}

.choice-index {
  position: absolute;
  left: 14px;
  top: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #7b2cbf;
  color: #ffffff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  border: 3px solid #ffffff;
  box-shadow: 0 4px 10px rgba(123, 44, 191, 0.35);
  display: grid;
  place-items: center;
}

.choice-card strong {
  font-size: clamp(48px, 6vw, 82px);
  color: #18352e;
  line-height: 1;
}

.choice-emoji {
  font-size: clamp(52px, 6.5vw, 82px);
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.1));
}

/* ── Painel Lateral (Side Panel) ────────────────────────────────── */
.side-panel {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(14px);
  border: 2px solid rgba(23, 107, 87, 0.12);
  border-radius: 34px;
  padding: 18px;
  box-shadow: var(--shadow-md);
}

.progress-card {
  border-radius: 24px;
  border: 2px solid rgba(23, 107, 87, 0.1);
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.progress-card span {
  font-family: var(--font-display);
  font-weight: 700;
  color: #137a63;
}

.progress-card strong {
  font-family: var(--font-display);
  font-size: 22px;
  color: #18352e;
}

.learning-card {
  border-radius: 24px;
  border: 2px solid rgba(23, 107, 87, 0.1);
  background: #ffffff;
}

.learning-card span {
  font-family: var(--font-display);
  font-weight: 700;
  color: #137a63;
  letter-spacing: 0.05em;
}

/* ── Adaptações Mobile e Telas Estreitas ─────────────────────────── */
@media (max-width: 768px) {
  .topbar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 14px;
  }

  .brand {
    justify-content: center;
  }

  .top-actions {
    justify-content: center;
    gap: 8px;
  }

  .catalog-hero {
    flex-direction: column;
    text-align: center;
    padding: 24px 18px;
  }

  .class-stamp {
    display: none;
  }

  .subject-nav a {
    flex: 1 1 calc(50% - 12px);
    font-size: 14px;
    padding: 10px 14px;
  }

  .game-layout {
    grid-template-columns: 1fr;
  }

  .stage {
    min-height: 520px;
  }

  .choice-card {
    min-height: 125px;
  }

  .choice-card strong {
    font-size: clamp(38px, 9vw, 56px);
  }
}

/* Botão Destacado de Logout no Cabeçalho */
.logout-action-btn {
  background: #fff1f2 !important;
  color: #e11d48 !important;
  border: 2px solid #fda4af !important;
  font-weight: 800 !important;
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.12) !important;
}

.logout-action-btn:hover {
  background: #ffe4e6 !important;
  border-color: #f43f5e !important;
  transform: translateY(-2px) scale(1.02) !important;
  box-shadow: 0 8px 18px rgba(225, 29, 72, 0.2) !important;
}

/* ==========================================================================
   ✨ LOADER PERFEITO — CENTRALIZAÇÃO MOBILE & TABLET (LOGO CEMAC EM DESTAQUE)
   ========================================================================== */

.launch-loader {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 100vh !important;
  min-height: 100dvh !important;
  width: 100vw !important;
  padding: 24px 16px !important;
  box-sizing: border-box !important;
  text-align: center !important;
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  inset: 0 !important;
  z-index: 9999 !important;
  overflow: hidden !important;
}

.loader-neutral-bg {
  position: absolute !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  inset: 0 !important;
  pointer-events: none !important;
  overflow: hidden !important;
  z-index: 1 !important;
}

.neutral-sparkle {
  position: absolute !important;
  font-size: 1.8rem !important;
  opacity: 0.45 !important;
  user-select: none !important;
}

.s-1 {
  top: 8% !important;
  left: 8% !important;
}

.s-2 {
  top: 12% !important;
  right: 10% !important;
}

.s-3 {
  bottom: 10% !important;
  left: 8% !important;
}

.s-4 {
  bottom: 12% !important;
  right: 10% !important;
}

.launch-content {
  position: relative !important;
  z-index: 10 !important;
  width: 100% !important;
  max-width: 440px !important;
  margin: 0 auto !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
}

.launch-badge-neutral {
  background: linear-gradient(135deg, #ffd65c, #ffb703) !important;
  color: #5a3700 !important;
  font-family: var(--font-display, 'Fredoka', sans-serif) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  padding: 6px 18px !important;
  border-radius: 999px !important;
  box-shadow: 0 4px 14px rgba(255, 183, 3, 0.35) !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  margin-bottom: 8px !important;
}

.neutral-window {
  width: 150px !important;
  height: 150px !important;
  margin: 16px auto 12px !important;
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.neutral-aura-ring {
  position: absolute !important;
  top: -8px !important;
  right: -8px !important;
  bottom: -8px !important;
  left: -8px !important;
  inset: -8px !important;
  border-radius: 50% !important;
  border: 3.5px dashed rgba(255, 214, 92, 0.7) !important;
  animation: spinRing 12s linear infinite !important;
}

.loader-logo {
  position: static !important;
  transform: none !important;
  width: 125px !important;
  height: 125px !important;
  object-fit: contain !important;
  border-radius: 50% !important;
  background: #ffffff !important;
  padding: 14px !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28), 0 0 0 3px rgba(255, 255, 255, 0.4) !important;
  animation: logoPulse 3s ease-in-out infinite alternate !important;
}

@keyframes logoPulse {
  0% {
    transform: scale(0.97);
  }

  100% {
    transform: scale(1.04);
  }
}

.launch-content h1 {
  font-family: var(--font-display, 'Fredoka', sans-serif) !important;
  font-size: clamp(28px, 6vw, 40px) !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  text-shadow: 0 3px 8px rgba(0, 0, 0, 0.2) !important;
  margin: 10px 0 6px !important;
  line-height: 1.15 !important;
}

.launch-content p#loaderMessage {
  font-size: clamp(14px, 3.8vw, 17px) !important;
  font-weight: 600 !important;
  color: rgba(255, 255, 255, 0.92) !important;
  margin: 0 0 16px !important;
  min-height: 24px !important;
}

.loader-progress-row {
  width: 100% !important;
  max-width: 380px !important;
  margin: 0 auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px !important;
}

.loader-progress {
  flex: 1 !important;
  height: 16px !important;
  padding: 3px !important;
  border: 1.5px solid rgba(255, 255, 255, 0.3) !important;
  border-radius: 999px !important;
  background: rgba(0, 0, 0, 0.25) !important;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.2) !important;
  overflow: hidden !important;
}

.loader-progress span {
  height: 100% !important;
  border-radius: 999px !important;
  background: linear-gradient(90deg, #ffb24e, #ffd65c, #fff2a2) !important;
  box-shadow: 0 0 14px rgba(255, 214, 92, 0.6) !important;
}

.loader-progress-row strong {
  font-family: var(--font-display, 'Fredoka', sans-serif) !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  color: #ffd65c !important;
  min-width: 44px !important;
  text-align: right !important;
}

.launch-content>small {
  font-family: var(--font-display, 'Fredoka', sans-serif) !important;
  font-size: 12px !important;
  letter-spacing: 0.12em !important;
  color: rgba(255, 255, 255, 0.75) !important;
  margin-top: 18px !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
}

/* ==========================================================================
   🎯 STAGE RESPONSIVO SEM SOBREPOSIÇÃO & MENU HORIZONTAL EM PAISAGEM
   ========================================================================== */

/* Layout Flex Estruturado da Arena de Jogo (Elimina colisões de posição absoluta) */
.stage {
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  align-items: center !important;
  min-height: 540px !important;
  padding: 16px 20px 20px !important;
  box-sizing: border-box !important;
  position: relative !important;
}

.stage-heading {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  transform: none !important;
  width: 100% !important;
  max-width: 720px !important;
  margin-bottom: 8px !important;
  z-index: 5 !important;
  text-align: center !important;
}

.game-area {
  position: relative !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  inset: auto !important;
  width: 100% !important;
  flex: 1 1 auto !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  align-items: center !important;
  z-index: 4 !important;
  min-height: 260px !important;
}

.play-scene {
  position: relative !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  inset: auto !important;
  flex: 1 1 auto !important;
  width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 6px auto !important;
  min-height: 90px !important;
  max-height: 190px !important;
  font-size: clamp(48px, 7vw, 84px) !important;
}

.coach-bubble {
  position: relative !important;
  bottom: auto !important;
  left: auto !important;
  transform: none !important;
  margin: 6px auto 12px !important;
  z-index: 6 !important;
  max-width: 85% !important;
  text-align: center !important;
}

.choice-grid {
  position: relative !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  width: 100% !important;
  max-width: 900px !important;
  margin: 0 auto !important;
  z-index: 7 !important;
}

/* Tablet: Modelos e Câmera 100% habilitados */
[data-device="tablet"] .camera-box {
  display: block !important;
}

[data-device="tablet"] #cameraBtn {
  display: inline-flex !important;
}

[data-device="tablet"] #switchHandBtn {
  display: inline-flex !important;
}

/* Menu de Matérias em Horizontal/Landscape ou Telas Menores (Barra de Chips deslizante) */
@media (orientation: landscape) and (max-height: 640px),
(max-width: 800px) {
  .subject-nav {
    position: relative !important;
    top: 0 !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    justify-content: flex-start !important;
    padding: 8px 12px !important;
    border-radius: 20px !important;
    scrollbar-width: none !important;
    gap: 8px !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06) !important;
  }

  .subject-nav::-webkit-scrollbar {
    display: none !important;
  }

  .subject-nav a {
    flex-shrink: 0 !important;
    min-height: 40px !important;
    padding: 6px 14px !important;
    font-size: 13px !important;
    white-space: nowrap !important;
    border-radius: 16px !important;
    gap: 6px !important;
  }

  .topbar {
    padding: 6px 14px !important;
    margin-bottom: 10px !important;
  }

  .brand-logo {
    width: 38px !important;
    height: 38px !important;
  }

  .brand strong {
    font-size: 16px !important;
  }

  .catalog-hero {
    min-height: 120px !important;
    padding: 14px 20px !important;
  }

  .catalog-hero h1 {
    font-size: 22px !important;
    margin: 4px 0 !important;
  }

  .stage {
    min-height: 380px !important;
    padding: 10px 14px 14px !important;
  }

  .stage-heading h2 {
    font-size: 18px !important;
    padding: 6px 18px !important;
  }

  .choice-card {
    min-height: 105px !important;
    padding: 8px 6px 6px !important;
  }

  .choice-card strong {
    font-size: clamp(26px, 6vw, 42px) !important;
  }

  .choice-emoji {
    font-size: clamp(32px, 5vw, 48px) !important;
  }

  .choice-index {
    width: 26px !important;
    height: 26px !important;
    font-size: 12px !important;
    top: 8px !important;
    left: 8px !important;
  }
}

/* ── AVISO DE GIRAR TELA (Modo Celular Vertical) ─────────────────── */
.orientation-notice {
  position: fixed;
  bottom: 20px;
  left: 16px;
  right: 16px;
  z-index: 2000;
  display: none;
  justify-content: center;
  align-items: center;
  pointer-events: none;
  animation: slideUpNotice 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideUpNotice {
  from {
    transform: translateY(100%);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.orientation-box {
  pointer-events: auto;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(16px);
  border: 3px solid #ffb703;
  border-radius: 28px;
  padding: 16px 22px;
  text-align: center;
  max-width: 380px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22), 0 4px 0 #ffb703;
}

.orientation-icon {
  display: inline-block;
  font-size: 34px;
  margin-bottom: 6px;
  animation: rotatePhone 2.5s ease-in-out infinite alternate;
}

@keyframes rotatePhone {
  0% {
    transform: rotate(0deg) scale(1);
  }

  50% {
    transform: rotate(45deg) scale(1.1);
  }

  100% {
    transform: rotate(90deg) scale(1.15);
  }
}

.orientation-box h3 {
  font-family: var(--font-display, 'Fredoka', sans-serif);
  font-size: 18px;
  font-weight: 700;
  color: #6a4200;
  margin: 2px 0 6px;
}

.orientation-box p {
  font-size: 13px;
  font-weight: 600;
  color: #4b5563;
  margin: 0 0 12px;
  line-height: 1.35;
}

.orientation-dismiss-btn {
  background: linear-gradient(135deg, #157a62, #229c7d);
  color: #ffffff;
  border: none;
  border-radius: 999px;
  padding: 8px 22px;
  font-family: var(--font-display, 'Fredoka', sans-serif);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(21, 122, 98, 0.35);
  transition: transform 0.18s ease;
}

.orientation-dismiss-btn:active {
  transform: scale(0.96);
}

/* Mostra aviso no celular vertical */
[data-device="mobile"][data-orientation="portrait"] .orientation-notice:not(.dismissed) {
  display: flex !important;
}

/* ==========================================================================
   🎮 CONTROLE DE CÂMERA/MÃOS E ARENA DE JOGO ESCALÁVEL
   ========================================================================== */

/* Garante que em Desktop e Tablet o painel de câmera e botões fiquem 100% visíveis e ativos */
.camera-box {
  display: block !important;
  width: 100% !important;
  aspect-ratio: 4 / 3 !important;
  min-height: 140px !important;
  border-radius: 20px !important;
  overflow: hidden !important;
  background: #dfe8e5 !important;
  position: relative !important;
}

.panel-actions {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 8px !important;
}

#cameraBtn,
#switchHandBtn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 48px !important;
  font-family: var(--font-display, 'Fredoka', sans-serif) !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  border-radius: 16px !important;
  cursor: pointer !important;
}

#cameraBtn {
  background: #176b57 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(23, 107, 87, 0.3) !important;
}

#cameraBtn:hover {
  background: #1f8a70 !important;
  transform: translateY(-2px) !important;
}

#switchHandBtn {
  background: #e8f6ef !important;
  color: #176b57 !important;
  border: 1.5px solid rgba(23, 107, 87, 0.2) !important;
}

#switchHandBtn:hover {
  background: #d8f1e4 !important;
  transform: translateY(-2px) !important;
}

/* Arena de Jogo Perfeita (Sem sobreposições entre cena e escolhas) */
.stage {
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  align-items: center !important;
  min-height: 520px !important;
  height: calc(100vh - 160px) !important;
  max-height: 760px !important;
  padding: 16px 22px 18px !important;
  box-sizing: border-box !important;
  border-radius: 34px !important;
  border: 8px solid #ffffff !important;
  overflow: hidden !important;
  background:
    radial-gradient(circle at 50% 112%, rgba(255, 214, 92, 0.4) 0 28%, transparent 28.5%),
    linear-gradient(180deg, #dcf0fa 0%, #e6f7ea 65%, #dff2e1 100%) !important;
}

.stage-heading {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  transform: none !important;
  width: 100% !important;
  max-width: 720px !important;
  margin: 0 auto 4px !important;
  text-align: center !important;
  z-index: 5 !important;
}

.stage-heading h2 {
  font-family: var(--font-display, 'Fredoka', sans-serif) !important;
  font-size: clamp(20px, 2.3vw, 30px) !important;
  font-weight: 700 !important;
  color: #18352e !important;
  background: rgba(255, 255, 255, 0.96) !important;
  border: 3px solid rgba(255, 255, 255, 0.9) !important;
  border-radius: 20px !important;
  padding: 8px 24px !important;
  box-shadow: 0 6px 18px rgba(29, 71, 57, 0.1) !important;
  margin: 4px auto 0 !important;
}

.game-area {
  position: relative !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  inset: auto !important;
  width: 100% !important;
  flex: 1 1 auto !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  align-items: center !important;
  z-index: 4 !important;
  min-height: 0 !important;
}

.play-scene {
  position: relative !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  inset: auto !important;
  flex: 1 1 auto !important;
  width: 100% !important;
  max-width: 780px !important;
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px 16px !important;
  padding: 6px !important;
  font-size: clamp(38px, 5vw, 62px) !important;
  min-height: 70px !important;
  max-height: 180px !important;
  overflow: visible !important;
}

.coach-bubble {
  position: relative !important;
  bottom: auto !important;
  left: auto !important;
  transform: none !important;
  margin: 4px auto 8px !important;
  z-index: 6 !important;
  padding: 6px 20px !important;
  font-size: 14px !important;
}

.choice-grid {
  position: relative !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  width: 100% !important;
  max-width: 840px !important;
  margin: 0 auto !important;
  z-index: 7 !important;
  gap: 14px !important;
}

.choice-card {
  min-height: 130px !important;
  max-height: 165px !important;
  padding: 10px 8px 8px !important;
  border-radius: 24px !important;
}

.choice-card strong {
  font-size: clamp(36px, 4.5vw, 58px) !important;
}

/* Cursor da Mão */
.hand-cursor {
  position: absolute !important;
  z-index: 999 !important;
  width: 52px !important;
  height: 52px !important;
  border-radius: 50% !important;
  background: #176b57 !important;
  border: 3px solid #ffffff !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 26px !important;
  pointer-events: none !important;
  transform: translate(-50%, -50%) !important;
}

/* ==========================================================================
   🖼️ RESPONSIVIDADE E EXIBIÇÃO CORRETA DE IMAGENS
   ========================================================================== */
img {
  max-width: 100%;
  height: auto;
}

.brand-logo,
.login-logo,
.loader-logo {
  object-fit: contain;
  aspect-ratio: 1 / 1;
}

.qr-box svg,
.qr-box canvas,
.qr-box img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  display: block !important;
}

/* ==========================================================================
   🎮 FOCO ESPACIAL PARA CONTROLE REMOTO DE SMART TV
   ========================================================================== */
.tv-focused,
[data-device="tv"] button:focus-visible,
[data-device="tv"] .class-card:focus-visible,
[data-device="tv"] .game-card:focus-visible,
[data-device="tv"] .choice-card:focus-visible,
[data-tv="true"] button:focus-visible,
[data-tv="true"] .class-card:focus-visible,
[data-tv="true"] .game-card:focus-visible,
[data-tv="true"] .choice-card:focus-visible {
  outline: 5px solid #ffb703 !important;
  outline-offset: 4px !important;
  box-shadow: 0 0 0 7px rgba(255, 183, 3, 0.4), 0 14px 36px rgba(0, 0, 0, 0.38) !important;
  transform: scale(1.05) !important;
  z-index: 100 !important;
  transition: transform 0.16s ease, box-shadow 0.16s ease !important;
}

.tv-activated {
  transform: scale(0.95) !important;
  outline-color: #2ec4b6 !important;
  transition: transform 0.08s ease !important;
}

/* ==========================================================================
   📺 EXPERIÊNCIA DEDICADA PARA SMART TV (10-Foot UI & Remote Control)
   ========================================================================== */

/* Margens de segurança contra overscan da TV */
[data-device="tv"] body,
[data-tv="true"] body {
  padding: 14px 32px !important;
  box-sizing: border-box !important;
  overflow-x: hidden !important;
}

[data-device="tv"] .app-shell,
[data-tv="true"] .app-shell {
  max-width: 1800px !important;
  margin: 0 auto !important;
}

/* Oculta aviso de rotação de tela (TV é sempre landscape) */
[data-device="tv"] .orientation-notice,
[data-tv="true"] .orientation-notice {
  display: none !important;
}

/* Cursor no palco da TV permanece interativo quando há mouse ou Magic Remote */
[data-device="tv"] .stage,
[data-device="tv"] .choice-card,
[data-tv="true"] .stage,
[data-tv="true"] .choice-card {
  cursor: default !important;
}

/* Cabeçalho na TV */
[data-device="tv"] .topbar,
[data-tv="true"] .topbar {
  padding: 10px 24px !important;
  margin-bottom: 14px !important;
}

[data-device="tv"] .brand strong,
[data-tv="true"] .brand strong {
  font-size: 22px !important;
}

[data-device="tv"] .top-actions .soft-btn,
[data-tv="true"] .top-actions .soft-btn {
  min-height: 48px !important;
  font-size: 14px !important;
  padding: 0 16px !important;
  border-radius: 14px !important;
}

/* Tela de Início na TV */
[data-device="tv"] .hero-copy h1,
[data-tv="true"] .hero-copy h1 {
  font-size: clamp(32px, 3.2vw, 48px) !important;
}

[data-device="tv"] .class-grid,
[data-tv="true"] .class-grid {
  gap: 20px !important;
}

[data-device="tv"] .class-card,
[data-tv="true"] .class-card {
  padding: 24px 20px !important;
  border-radius: 30px !important;
}

[data-device="tv"] .class-card h3,
[data-tv="true"] .class-card h3 {
  font-size: 26px !important;
}

[data-device="tv"] .class-card p,
[data-tv="true"] .class-card p {
  font-size: 15px !important;
  line-height: 1.4 !important;
}

/* Catálogo na TV */
[data-device="tv"] .catalog-hero h1,
[data-tv="true"] .catalog-hero h1 {
  font-size: clamp(32px, 3.2vw, 48px) !important;
}

[data-device="tv"] .games-grid,
[data-tv="true"] .games-grid {
  gap: 18px !important;
}

[data-device="tv"] .game-card,
[data-tv="true"] .game-card {
  min-height: 180px !important;
  padding: 24px !important;
}

[data-device="tv"] .game-copy strong,
[data-tv="true"] .game-copy strong {
  font-size: 24px !important;
}

/* Arena de Jogo na TV */
/* Oculta câmera inexistente e botões irrelevantes na TV */
[data-device="tv"] .side-panel .camera-box,
[data-device="tv"] .side-panel .panel-actions,
[data-device="tv"] #mobilePanelToggle,
[data-tv="true"] .side-panel .camera-box,
[data-tv="true"] .side-panel .panel-actions,
[data-tv="true"] #mobilePanelToggle {
  display: none !important;
}

[data-device="tv"] .game-layout,
[data-tv="true"] .game-layout {
  grid-template-columns: minmax(0, 1fr) 290px !important;
  gap: 20px !important;
  min-height: calc(100vh - 120px) !important;
}

[data-device="tv"] .stage,
[data-tv="true"] .stage {
  height: calc(100vh - 130px) !important;
  max-height: 840px !important;
  padding: 20px 30px !important;
  border-radius: 38px !important;
}

[data-device="tv"] .stage-heading h2,
[data-tv="true"] .stage-heading h2 {
  font-size: clamp(24px, 2.5vw, 36px) !important;
  padding: 10px 30px !important;
}

[data-device="tv"] .play-scene,
[data-tv="true"] .play-scene {
  max-width: 900px !important;
  font-size: clamp(48px, 6vw, 76px) !important;
  max-height: 220px !important;
}

[data-device="tv"] .choice-grid,
[data-tv="true"] .choice-grid {
  max-width: 960px !important;
  gap: 18px !important;
}

[data-device="tv"] .choice-card,
[data-tv="true"] .choice-card {
  min-height: 130px !important;
  max-height: 165px !important;
  padding: 14px 10px !important;
  border-radius: 28px !important;
}

[data-device="tv"] .choice-card strong,
[data-tv="true"] .choice-card strong {
  font-size: clamp(38px, 4vw, 62px) !important;
}

[data-device="tv"] .choice-emoji,
[data-tv="true"] .choice-emoji {
  font-size: clamp(44px, 5vw, 68px) !important;
}

[data-device="tv"] .coach-bubble,
[data-tv="true"] .coach-bubble {
  font-size: 17px !important;
  padding: 8px 26px !important;
}

[data-device="tv"] .instruction,
[data-tv="true"] .instruction {
  background: #eaf5f1 !important;
  border: 2px solid #176b57 !important;
  border-radius: 18px !important;
  padding: 14px 16px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #176b57 !important;
  line-height: 1.45 !important;
}

/* Tela de Login na TV */
[data-device="tv"] #loginWebcamBtn,
[data-device="tv"] #loginWebcamBox,
[data-tv="true"] #loginWebcamBtn,
[data-tv="true"] #loginWebcamBox {
  display: none !important;
}

[data-device="tv"] .qr-display-wrapper,
[data-tv="true"] .qr-display-wrapper {
  width: 270px !important;
  height: 270px !important;
  padding: 16px !important;
  border-radius: 24px !important;
  box-shadow: 0 12px 36px rgba(23, 107, 87, 0.22), 0 0 0 4px #176b57 !important;
}

[data-device="tv"] .session-code-box code,
[data-tv="true"] .session-code-box code {
  font-size: 34px !important;
  letter-spacing: 6px !important;
}

[data-device="tv"] .login-choices-dual,
[data-tv="true"] .login-choices-dual {
  max-width: 680px !important;
  margin: 0 auto !important;
}

[data-device="tv"] .login-btn,
[data-tv="true"] .login-btn {
  min-height: 84px !important;
  font-size: 1.25rem !important;
}

/* Ponteiro Global Remoto na TV */
#globalRemotePointer {
  width: 58px !important;
  height: 58px !important;
  font-size: 32px !important;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.45)) !important;
  pointer-events: none !important;
  transition: transform 0.08s ease !important;
}
/* ==============================================================
   ESTILOS DO MÓDULO DE PLANOS PARA NÃO-ALUNOS (CEMAC EM MOVIMENTO)
   RESPONSIVIDADE E LEGIBILIDADE APRIMORADAS
   ============================================================== */

/* Card expandido para acomodar os planos com excelente legibilidade */
.login-card-auth.has-planos-active {
  max-width: 860px !important;
  width: 95vw !important;
  max-height: 92vh;
  overflow-y: auto;
  padding: 32px 30px 24px !important;
  transition: all .35s cubic-bezier(.2, .8, .4, 1);
  box-shadow: 
    0 12px 40px rgba(23, 107, 87, .18),
    0 32px 80px rgba(23, 107, 87, .12),
    0 0 0 1px rgba(23, 107, 87, .10);
}

/* Scrollbar suave para telas menores */
.login-card-auth.has-planos-active::-webkit-scrollbar {
  width: 6px;
}
.login-card-auth.has-planos-active::-webkit-scrollbar-track {
  background: #f1f7f4;
  border-radius: 8px;
}
.login-card-auth.has-planos-active::-webkit-scrollbar-thumb {
  background: #a3d9bc;
  border-radius: 8px;
}

/* Botão de atalho abaixo do Google */
.login-nao-aluno-action {
  margin-top: 14px;
  width: 100%;
}

.login-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: #8fa397;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #dce8e2;
}

.login-divider span {
  padding: 0 12px;
}

.btn-ver-planos {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #f0faf5;
  color: #176b57;
  border: 1.5px dashed #7ebfa4;
  padding: 12px 16px;
  border-radius: 14px;
  font-family: "Nunito", system-ui, sans-serif;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: all .2s ease;
}

.btn-ver-planos:hover {
  background: #e1f5eb;
  border-color: #176b57;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(23, 107, 87, .12);
}

.btn-ver-planos .btn-arrow {
  transition: transform .2s ease;
}

.btn-ver-planos:hover .btn-arrow {
  transform: translateX(4px);
}

/* Banner Animado de Planos */
.planos-banner-animado {
  background: linear-gradient(135deg, #176b57, #0b4537);
  color: #ffffff;
  padding: 22px 24px;
  border-radius: 20px;
  text-align: left;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(23, 107, 87, .22);
}

.banner-tag-pulse {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, .20);
  border: 1px solid rgba(255, 255, 255, .35);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: #c9f5e3;
  margin-bottom: 10px;
}

.pulse-spark {
  width: 8px;
  height: 8px;
  background: #4ef2ab;
  border-radius: 50%;
  box-shadow: 0 0 10px #4ef2ab;
  animation: pulseSpark 1.5s infinite;
}

@keyframes pulseSpark {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.4); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

.planos-hero-title {
  font-size: 1.45rem;
  font-weight: 900;
  margin: 0 0 8px 0;
  color: #ffffff;
  letter-spacing: -0.3px;
}

.planos-hero-sub {
  font-size: 13.5px;
  color: #daf5eb;
  line-height: 1.55;
  margin: 0 0 12px 0;
}

.planos-aviso-se {
  font-size: 12px;
  background: rgba(0, 0, 0, .25);
  border-left: 3.5px solid #ffca28;
  padding: 8px 12px;
  border-radius: 8px;
  color: #fff9c4;
  line-height: 1.4;
}

/* Toggle Faturamento */
.planos-billing-toggle {
  display: flex;
  justify-content: center;
  background: #eef5f1;
  padding: 4px;
  border-radius: 16px;
  margin: 0 auto 20px;
  width: fit-content;
}

.toggle-btn {
  border: none;
  background: transparent;
  padding: 8px 20px;
  font-family: "Nunito", system-ui, sans-serif;
  font-size: 13.5px;
  font-weight: 800;
  color: #4f6b62;
  border-radius: 13px;
  cursor: pointer;
  transition: all .2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toggle-btn.toggle-active {
  background: #ffffff;
  color: #176b57;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .10);
}

.badge-desconto {
  background: #ffb300;
  color: #3e2723;
  font-size: 10px;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: 10px;
  text-transform: uppercase;
}

/* Grid de Cards dos Planos */
.planos-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
  text-align: left;
}

.plano-mini-card {
  background: #ffffff;
  border: 1.5px solid #d5e3dc;
  border-radius: 18px;
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: all .25s ease;
}

.plano-mini-card:hover {
  border-color: #8ec5ae;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(23, 107, 87, .10);
}

.plano-card-destaque {
  border: 2.5px solid #176b57;
  background: #fbfefd;
  box-shadow: 0 6px 24px rgba(23, 107, 87, .14);
}

.selo-popular-floating {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: #176b57;
  color: #ffffff;
  font-size: 10px;
  font-weight: 900;
  padding: 3px 12px;
  border-radius: 14px;
  text-transform: uppercase;
  letter-spacing: .4px;
  white-space: nowrap;
  box-shadow: 0 3px 8px rgba(23, 107, 87, .35);
}

.plano-top-badge {
  font-size: 11px;
  font-weight: 800;
  color: #176b57;
  background: #eef8f4;
  padding: 3px 8px;
  border-radius: 8px;
  width: fit-content;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: .4px;
}

.badge-destaque {
  background: #fff8e1;
  color: #e65100;
}

.plano-card-title {
  font-size: 16px;
  font-weight: 900;
  color: #1f3b32;
  margin: 0 0 4px 0;
}

.plano-card-desc {
  font-size: 12px;
  color: #557264;
  margin: 0 0 12px 0;
  line-height: 1.4;
  min-height: 34px;
}

.plano-price-box {
  display: flex;
  align-items: baseline;
  gap: 3px;
  margin-bottom: 2px;
}

.plano-price-box .moeda {
  font-size: 13px;
  font-weight: 800;
  color: #557264;
}

.plano-price-box .valor {
  font-size: 28px;
  font-weight: 900;
  color: #1f3b32;
  line-height: 1;
}

.plano-price-box .valor-verde {
  color: #176b57;
}

.plano-price-box .mes {
  font-size: 12px;
  color: #557264;
  font-weight: 700;
}

.plano-price-tip {
  font-size: 11px;
  color: #176b57;
  font-weight: 800;
  display: block;
  margin-bottom: 12px;
}

.plano-feat-list {
  list-style: none;
  padding: 0;
  margin: 0 0 16px 0;
  border-top: 1px solid #edf4f0;
  padding-top: 10px;
  font-size: 12px;
  color: #3e584f;
  line-height: 1.6;
}

.plano-feat-list li {
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-plano-disabled {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #d0dcd5;
  background: #f0f4f2;
  color: #7a948a;
  font-family: "Nunito", system-ui, sans-serif;
  font-size: 12px;
  font-weight: 800;
  cursor: not-allowed;
  opacity: .9;
  transition: all .2s ease;
}

.btn-disabled-destaque {
  background: #e2f2eb;
  border-color: #a8d9c4;
  color: #176b57;
}

.planos-footer-back {
  text-align: center;
  margin-top: 12px;
}

.btn-voltar-login {
  background: #f4faf6;
  border: 1px solid #cce5da;
  color: #176b57;
  font-family: "Nunito", system-ui, sans-serif;
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
  padding: 8px 20px;
  border-radius: 10px;
  transition: all .2s ease;
}

.btn-voltar-login:hover {
  background: #e8f5ee;
  border-color: #176b57;
  transform: translateY(-1px);
}

/* ==============================================================
   RESPONSIVIDADE INTELIGENTE (TABLETS E MOBILE)
   ============================================================== */
@media (max-width: 768px) {
  .login-card-auth.has-planos-active {
    max-width: 520px !important;
    padding: 24px 18px !important;
  }

  .planos-cards-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .plano-card-desc {
    min-height: auto;
  }

  .planos-hero-title {
    font-size: 1.25rem;
  }

  .planos-hero-sub {
    font-size: 12.5px;
  }

  .plano-mini-card {
    padding: 18px 16px;
  }
}

@media (max-width: 480px) {
  .login-card-auth.has-planos-active {
    width: 96vw !important;
    padding: 20px 14px !important;
    max-height: 94vh;
  }

  .login-tab {
    padding: 8px 4px !important;
    font-size: 0.80rem !important;
    gap: 4px !important;
  }

  .login-tab .tab-icon {
    font-size: 1rem !important;
  }

  .planos-banner-animado {
    padding: 16px 14px;
  }

  .planos-hero-title {
    font-size: 1.15rem;
  }

  .plano-price-box .valor {
    font-size: 26px;
  }
}
