/* ============================================================
   SINAPSE — plataforma de jogos da Roberta Reis
   Sistema de design derivado da marca (cérebro + rede de conexões)
   ============================================================ */

:root {
  /* Marca */
  --blue:        #1f74e0;
  --blue-600:    #175fc0;
  --blue-800:    #0f3d80;
  --ink:         #0b2246;   /* texto forte sobre claro */
  --ink-soft:    #3a4a63;
  --gold:        #c8973f;
  --gold-soft:   #e6c98a;

  /* Pilares cognitivos (cada um tem sua cor) */
  --p-atencao:    #f2a31c;
  --p-memoria:    #e8567f;
  --p-executiva:  #7c5ce0;
  --p-linguagem:  #17a5b0;
  --p-matematica: #2fb56b;
  --p-percepcao:  #f0563f;

  /* Paleta dos jogos de blocos e padrões */
  --game-yellow:  var(--p-atencao);
  --game-pink:    var(--p-memoria);
  --game-purple:  var(--p-executiva);
  --game-teal:    var(--p-linguagem);
  --game-green:   var(--p-matematica);
  --game-orange:  var(--p-percepcao);

  /* Superfícies */
  --bg:        #f4f7fd;
  --bg-2:      #eaf1fb;
  --card:      #ffffff;
  --line:      #e2e9f4;
  --line-2:    #d3ddee;

  /* Sombras */
  --sh-sm: 0 2px 8px rgba(15,61,128,.06);
  --sh-md: 0 10px 30px rgba(15,61,128,.10);
  --sh-lg: 0 24px 60px rgba(15,61,128,.16);
  --sh-glow: 0 0 0 4px rgba(31,116,224,.14);

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;

  --maxw: 1160px;

  --font-display: "Fredoka", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
a { color: inherit; }
h1,h2,h3,h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.1; margin: 0; color: var(--ink); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.hidden { display: none !important; }
.center { text-align: center; }
.eyebrow {
  font-family: var(--font-display);
  font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  font-size: .74rem; color: var(--blue);
}

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  border: 0; border-radius: 999px;
  padding: 14px 26px; font-weight: 700; font-size: 1rem;
  font-family: var(--font-display);
  transition: transform .18s cubic-bezier(.2,.9,.3,1.3), box-shadow .18s, filter .18s;
  text-decoration: none;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary { background: linear-gradient(135deg, #2b86f0, var(--blue-600)); color: #fff; box-shadow: 0 10px 24px rgba(31,116,224,.34); text-shadow: 0 1px 3px rgba(8,28,64,.35); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 32px rgba(31,116,224,.42); }
.btn-gold { background: linear-gradient(135deg, #e6b95f, var(--gold)); color: #4a340c; box-shadow: 0 10px 24px rgba(200,151,63,.34); text-shadow: 0 1px 1px rgba(255,255,255,.3); }
.btn-gold:hover { transform: translateY(-2px); }
.btn-ghost { background: var(--card); color: var(--ink); border: 1.5px solid var(--line-2); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }
.btn-sm { padding: 9px 16px; font-size: .9rem; }
.btn-block { width: 100%; justify-content: center; }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(244,247,253,.82);
  backdrop-filter: saturate(1.2) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-in { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 12px;
  display: grid; place-items: center;
  background: radial-gradient(120% 120% at 30% 20%, #2b86f0, var(--blue-800));
  box-shadow: var(--sh-sm), inset 0 0 0 1px rgba(255,255,255,.18);
}
.icon { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; display: inline-block; }
.icon-lg { width: 1.6em; height: 1.6em; display: block; }
.cover .icon-lg, .g-panel .big .icon-lg, .g-panel .medal .icon-lg { margin: 0 auto; }
.pillar .ic .icon, .contact-details .d .ic .icon, .maker-photo .float .b .icon, .about-photo .float .b .icon, .serv-card .ic .icon { display: block; }
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 1.08rem; letter-spacing: -.01em; line-height: 1.05; }
.brand-name b { color: var(--blue); }
.brand-sub { font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); font-weight: 700; }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { text-decoration: none; font-weight: 700; color: var(--ink-soft); font-size: .95rem; }
.nav-links a:hover { color: var(--blue); }
.nav-cta { display: flex; align-items: center; gap: 10px; }
.nav-burger { display: none; background: none; border: 0; font-size: 1.5rem; color: var(--ink); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1000px 500px at 78% -8%, rgba(43,134,240,.16), transparent 60%),
    radial-gradient(700px 420px at 8% 12%, rgba(232,86,127,.10), transparent 55%),
    var(--bg);
  padding: 68px 0 40px;
}
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(2.4rem, 5vw, 4rem); letter-spacing: -.02em; }
.hero h1 .glow { color: var(--blue); position: relative; }
.hero p.lead { font-size: 1.2rem; color: var(--ink-soft); max-width: 40ch; margin: 20px 0 30px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-trust { margin-top: 26px; display: flex; gap: 22px; flex-wrap: wrap; color: var(--ink-soft); font-weight: 700; font-size: .9rem; }
.hero-trust span { display: inline-flex; align-items: center; gap: 7px; }
.hero-trust b { color: var(--blue); font-family: var(--font-display); }

/* Brain visual */
.brainstage { position: relative; aspect-ratio: 1/1; }
.brainstage .halo {
  position: absolute; inset: 6%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, rgba(43,134,240,.22), transparent 62%);
  filter: blur(6px);
  animation: breathe 5.5s ease-in-out infinite;
}
@keyframes breathe { 0%,100%{transform:scale(1);opacity:.8} 50%{transform:scale(1.05);opacity:1} }
.brainstage img { position: relative; width: 100%; filter: drop-shadow(0 30px 50px rgba(15,61,128,.28)); }
.spark {
  position: absolute; width: 10px; height: 10px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 14px 4px rgba(230,201,138,.8);
  animation: twinkle 2.6s ease-in-out infinite;
}
@keyframes twinkle { 0%,100%{opacity:.2; transform:scale(.7)} 50%{opacity:1; transform:scale(1.15)} }

/* ============================================================
   FAIXAS
   ============================================================ */
.section { padding: 78px 0; }
.section-head { max-width: 640px; margin: 0 auto 44px; text-align: center; }
.section-head h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); letter-spacing: -.02em; }
.section-head p { color: var(--ink-soft); font-size: 1.08rem; margin-top: 12px; }

.age-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 22px; }
.age-card {
  background: var(--card); border-radius: var(--r-lg); padding: 30px 26px;
  border: 1px solid var(--line); box-shadow: var(--sh-sm);
  transition: transform .2s, box-shadow .2s;
  position: relative; overflow: hidden;
}
.age-card:hover { transform: translateY(-4px); box-shadow: var(--sh-md); }
.age-card .emoji { font-size: 2.4rem; }
.age-card h3 { font-size: 1.45rem; margin: 12px 0 4px; }
.age-card .range { font-weight: 800; color: var(--blue); font-family: var(--font-display); }
.age-card p { color: var(--ink-soft); font-size: .98rem; margin: 10px 0 0; }
.age-card .bar { position: absolute; left: 0; top: 0; height: 5px; width: 100%; }

/* ============================================================
   PILARES
   ============================================================ */
.pillars { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; }
.pillar {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 22px; display: flex; gap: 16px; align-items: flex-start;
  box-shadow: var(--sh-sm); transition: transform .2s;
}
.pillar:hover { transform: translateY(-3px); }
.pillar .ic {
  flex: none; width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center;
  font-size: 1.5rem; color: #fff;
}
.pillar h4 { font-size: 1.12rem; }
.pillar p { margin: 6px 0 0; color: var(--ink-soft); font-size: .92rem; }

/* ============================================================
   PREVIEW / COMO FUNCIONA
   ============================================================ */
.steps { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.step { text-align: center; padding: 12px; }
.step .n {
  width: 54px; height: 54px; margin: 0 auto 14px; border-radius: 50%;
  display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; line-height: 1;
  font-size: 1.4rem; color: #fff; background: linear-gradient(135deg,#2b86f0,var(--blue-800));
  box-shadow: 0 10px 22px rgba(31,116,224,.32);
}
.step h4 { font-size: 1.18rem; }
.step p { color: var(--ink-soft); margin-top: 8px; }

/* ============================================================
   PLANOS
   ============================================================ */
.plans { display: grid; grid-template-columns: repeat(3,1fr); gap: 22px; align-items: stretch; }
/* Plano único — specs de precificação, 2026-09-04 (decisão fechada com o
   Lucas): R$49,90/mês, sem degraus. Card centralizado, não esticado pra
   largura de 3 colunas. */
.plans-single { grid-template-columns: minmax(0,420px); justify-content: center; }
.plan {
  background: var(--card); border: 1.5px solid var(--line); border-radius: var(--r-lg);
  padding: 30px 26px; display: flex; flex-direction: column; box-shadow: var(--sh-sm);
  position: relative; transition: transform .2s, box-shadow .2s;
}
.plan:hover { transform: translateY(-4px); box-shadow: var(--sh-md); }
.plan.featured { border-color: var(--blue); box-shadow: var(--sh-md); }
.plan .tag {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg,#e6b95f,var(--gold)); color: #4a340c;
  font-family: var(--font-display); font-weight: 700; font-size: .78rem;
  padding: 5px 16px; border-radius: 999px; box-shadow: var(--sh-sm);
}
.plan h3 { font-size: 1.4rem; }
.plan .price { font-family: var(--font-display); font-weight: 700; margin: 14px 0 2px; }
.plan .price b { font-size: 2.6rem; color: var(--ink); }
.plan .price span { color: var(--ink-soft); font-weight: 700; }
.plan .who { color: var(--ink-soft); font-size: .95rem; min-height: 42px; }
.plan ul { list-style: none; padding: 0; margin: 18px 0 24px; display: grid; gap: 11px; }
.plan li { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; }
.plan li .ck { color: var(--p-matematica); font-weight: 900; flex: none; }
.plan .btn { margin-top: auto; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { background: #0c2246; color: #cbd8ef; padding: 60px 0 34px; }
.footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.footer h4 { color: #fff; margin-bottom: 14px; font-size: 1.05rem; }
.footer a { color: #cbd8ef; text-decoration: none; display: block; margin-bottom: 9px; font-weight: 600; }
.footer a:hover { color: #fff; }
.footer .brand-name { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 40px; padding-top: 20px; font-size: .85rem; color: #8ea4c8; text-align: center; }
.footer-brand p { color: #9db2d6; font-size: .95rem; max-width: 34ch; }

/* ============================================================
   MODAL (assinatura)
   ============================================================ */
.modal-back {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(8,24,52,.55); backdrop-filter: blur(4px);
  display: grid; place-items: center; padding: 20px;
  animation: fade .2s ease;
}
@keyframes fade { from{opacity:0} to{opacity:1} }
.modal {
  background: var(--card); border-radius: var(--r-xl); width: min(460px, 100%);
  padding: 34px; box-shadow: var(--sh-lg); position: relative;
  animation: pop .28s cubic-bezier(.2,.9,.3,1.3);
  max-height: 92vh; overflow: auto;
}
@keyframes pop { from{opacity:0; transform: translateY(16px) scale(.97)} to{opacity:1; transform:none} }
.modal-close { position: absolute; top: 16px; right: 16px; background: var(--bg-2); border: 0; width: 34px; height: 34px; border-radius: 50%; font-size: 1.1rem; color: var(--ink-soft); }
.modal h3 { font-size: 1.6rem; }
.modal .sub { color: var(--ink-soft); margin: 6px 0 22px; }
.field { margin-bottom: 15px; }
.field label { display: block; font-weight: 700; font-size: .88rem; margin-bottom: 6px; color: var(--ink); }
.field input {
  width: 100%; padding: 13px 14px; border: 1.5px solid var(--line-2); border-radius: var(--r-sm);
  font-size: 1rem; font-family: inherit; background: #fbfcfe; transition: border .15s, box-shadow .15s;
}
.field input:focus { outline: 0; border-color: var(--blue); box-shadow: var(--sh-glow); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pick-plan { display: grid; gap: 10px; margin-bottom: 20px; }
.pick-plan .opt {
  border: 1.5px solid var(--line-2); border-radius: var(--r-md); padding: 14px 16px;
  display: flex; justify-content: space-between; align-items: center; cursor: pointer; transition: border .15s, background .15s;
}
.pick-plan .opt:hover { border-color: var(--blue); }
.pick-plan .opt.sel { border-color: var(--blue); background: #f3f8ff; box-shadow: var(--sh-glow); }
.pick-plan .opt b { font-family: var(--font-display); }
.pick-plan .opt .p { color: var(--blue); font-weight: 800; font-family: var(--font-display); }
.pay-badge { display: flex; align-items: center; gap: 8px; justify-content: center; color: var(--ink-soft); font-size: .82rem; margin-top: 14px; }
.success-check {
  width: 84px; height: 84px; border-radius: 50%; margin: 0 auto 18px;
  background: linear-gradient(135deg,#37c26f,#1f9e56); display: grid; place-items: center;
  color: #fff; font-size: 2.6rem; box-shadow: 0 14px 30px rgba(47,181,107,.4);
  animation: pop .4s cubic-bezier(.2,.9,.3,1.3);
}

/* ============================================================
   APP (área logada)
   ============================================================ */
.app-nav { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40; }
.app-nav .nav-in { height: 66px; }
.chip-user { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg,#2b86f0,var(--blue-800)); color: #fff; font-weight: 800; font-family: var(--font-display);
}
.app-hero { padding: 34px 0 8px; }
.app-hero h1 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
.app-hero p { color: var(--ink-soft); margin-top: 6px; }

/* Área única do assinante (sidebar) — specs/intensivo-app-unificado.md §6-7.
   Sidebar fixa + conteúdo com largura máxima própria, sem depender de
   .wrap (que é da landing) pra não herdar o max-width errado. */
.app-shell { display: flex; align-items: stretch; min-height: 100vh; }
.app-sidebar {
  width: 240px; flex: 0 0 240px; background: var(--card); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 20px 16px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.app-side-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.app-side-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.app-side-link {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px;
  font-weight: 700; font-size: .92rem; color: var(--ink-soft); cursor: pointer; background: none; border: none; text-align: left; width: 100%; font-family: var(--font-body);
  transition: background .15s, color .15s;
}
.app-side-link:hover { background: var(--bg-2); }
.app-side-link.active { background: rgba(31,116,224,.12); color: var(--blue); }
.app-side-user { display: flex; align-items: center; gap: 10px; padding: 10px 4px; margin-top: 8px; border-top: 1px solid var(--line); padding-top: 14px; }
.app-main { flex: 1; min-width: 0; overflow-x: hidden; }
.app-content { max-width: 1200px; margin: 0 auto; padding: 22px 24px 60px; }

/* Fade-in curto na troca de seção da sidebar / aba da ficha do aluno —
   antes o conteúdo era substituído 100% instantâneo (achado de motion da
   Ink, 2026-09-02). Curto de propósito (~180ms), não pode parecer lento.
   specs/intensivo-look-and-feel-acabamento.md §3. */
@keyframes app-content-fade-in { from { opacity: 0; } to { opacity: 1; } }
.app-content-fade { animation: app-content-fade-in .18s ease; }
.app-hero-slim { padding: 4px 0 6px; }
.app-hero-slim h1 { font-size: clamp(1.25rem, 2.2vw, 1.6rem); }
.filters-sticky { position: sticky; top: 0; background: var(--bg); z-index: 10; padding-top: 6px; padding-bottom: 6px; }

.history-list { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.history-row {
  display: grid; grid-template-columns: 1.4fr .8fr auto 1fr; gap: 14px; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px 16px;
}
.history-row .name { font-weight: 700; }
.history-row .meta { color: var(--ink-soft); font-size: .85rem; }

@media (max-width: 860px) {
  .app-shell { flex-direction: column; }
  .app-sidebar { position: static; width: 100%; height: auto; flex-direction: row; align-items: center; overflow-x: auto; border-right: none; border-bottom: 1px solid var(--line); }
  .app-side-brand { margin-bottom: 0; margin-right: 12px; flex-shrink: 0; }
  .app-side-nav { flex-direction: row; flex: none; }
  .app-side-link { white-space: nowrap; }
  .app-side-user { display: none; }
  .app-sidebar > .btn { flex-shrink: 0; width: auto; margin-top: 0 !important; margin-left: 8px; }
  .app-content { padding: 16px 16px 40px; }
  .history-row { grid-template-columns: 1fr; text-align: left; gap: 4px; }
}

/* Banner de instruções / acesso livre na plataforma */
.app-guide { background: linear-gradient(135deg,#eef5ff,#e8f8f0); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 20px; display: flex; gap: 16px 22px; align-items: center; margin: 18px 0 4px; box-shadow: var(--sh-sm); flex-wrap: wrap; }
.app-guide .g-title { font-family: var(--font-display); font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.app-guide .steps-line { display: flex; gap: 8px 18px; flex-wrap: wrap; font-weight: 700; color: var(--ink-soft); font-size: .9rem; }
.app-guide .steps-line > span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.app-guide .steps-line b { color: var(--blue); font-family: var(--font-display); }
.demo-pill { background: #e8fff0; color: #1f9e56; border: 1px solid #b7ecc9; font-weight: 800; font-size: .8rem; padding: 7px 13px; border-radius: 999px; white-space: nowrap; }
.app-guide .num { width: 22px; height: 22px; border-radius: 7px; background: linear-gradient(135deg,#2b86f0,#0f3d80); color: #fff; display: grid; place-items: center; font-size: .78rem; font-family: var(--font-display); font-weight: 700; line-height: 1; }

.filters { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; margin: 24px 0 8px; justify-content: space-between; }
.tabs { display: inline-flex; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 5px; box-shadow: var(--sh-sm); }
.tab {
  border: 0; background: none; padding: 9px 18px; border-radius: 999px; font-weight: 800;
  color: var(--ink-soft); font-family: var(--font-display); font-size: .95rem; transition: .15s;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.tab.active { color: #fff; background: linear-gradient(135deg,#2b86f0,var(--blue-600)); box-shadow: 0 6px 14px rgba(31,116,224,.3); text-shadow: 0 1px 2px rgba(8,28,64,.35); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pchip {
  border: 1.5px solid var(--line-2); background: var(--card); border-radius: 999px; padding: 7px 14px;
  font-weight: 700; font-size: .85rem; color: var(--ink-soft); display: inline-flex; gap: 7px; align-items: center; transition: .15s; white-space: nowrap;
}
.pchip .dot { width: 10px; height: 10px; border-radius: 50%; }
.pchip.active { color: #fff; border-color: transparent; text-shadow: 0 1px 2px rgba(0,0,0,.3); }

.games-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px,1fr)); gap: 20px; margin: 28px 0 60px; }
.game-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--sh-sm); transition: transform .2s, box-shadow .2s; cursor: pointer; display: flex; flex-direction: column;
}
.game-card:hover { transform: translateY(-5px); box-shadow: var(--sh-md); }
.game-card .cover { height: 118px; display: grid; place-items: center; font-size: 3.2rem; position: relative; }
.game-card .cover .age { position: absolute; top: 10px; right: 10px; background: rgba(255,255,255,.85); color: var(--ink); font-weight: 800; font-size: .72rem; padding: 4px 10px; border-radius: 999px; font-family: var(--font-display); }
.game-card .body { padding: 16px 18px 20px; display: flex; flex-direction: column; flex: 1; }
.game-card h3 { font-size: 1.2rem; }
.game-card .tg { color: var(--ink-soft); font-size: .9rem; margin: 6px 0 12px; flex: 1; }
.game-card .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.game-card .tags .t { font-size: .72rem; font-weight: 800; padding: 3px 9px; border-radius: 999px; color: #fff; }
.game-card .play { margin-top: 14px; font-family: var(--font-display); font-weight: 700; color: var(--blue); display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Player de jogo ---------- */
.player-back { position: fixed; inset: 0; z-index: 90; background: var(--bg); overflow: auto; animation: fade .2s; }
.player-top { position: sticky; top: 0; background: rgba(244,247,253,.9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); z-index: 5; }
.player-top .nav-in { height: 62px; }
.player-title { display: flex; align-items: center; gap: 12px; font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; }
.player-title .gg { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; font-size: 1.4rem; line-height: 1; }
.player-stats { display: flex; gap: 20px; align-items: center; }
.stat { text-align: center; }
.stat .v { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; color: var(--blue); line-height: 1; }
.stat .l { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); font-weight: 800; }
.game-stage { max-width: 740px; margin: 0 auto; padding: 30px 20px 80px; }
/* Desktop: centraliza verticalmente o painel pra não sobrar "oceano vazio" */
@media (min-width: 768px) {
  .game-stage { min-height: calc(100vh - 62px); display: flex; flex-direction: column; justify-content: center; padding-top: 24px; padding-bottom: 48px; }
}
.g-toolbar .btn { min-height: 44px; }

/* Elementos genéricos de jogo */
.g-intro { text-align: center; padding: 30px 10px; }
.g-intro .big { font-size: 3.4rem; }
.g-intro h2 { font-size: 1.8rem; margin: 10px 0; }
.g-intro p { color: var(--ink-soft); max-width: 44ch; margin: 0 auto 22px; font-size: 1.05rem; }
.g-panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px; box-shadow: var(--sh-sm); }
.g-prompt { text-align: center; font-family: var(--font-display); font-weight: 600; }
.g-feedback { text-align: center; font-weight: 800; min-height: 26px; margin-top: 14px; font-family: var(--font-display); }
.g-feedback.ok { color: var(--p-matematica); }
.g-feedback.no { color: var(--p-percepcao); }
.g-toolbar { display: flex; justify-content: center; gap: 12px; margin-top: 22px; flex-wrap: wrap; }
.g-result { text-align: center; padding: 20px 0; }
.g-result .medal { font-size: 4rem; }
.g-result h2 { font-size: 2rem; margin: 6px 0; }
.g-result .score { font-family: var(--font-display); font-size: 1.2rem; color: var(--blue); font-weight: 700; }
.g-result p { color: var(--ink-soft); max-width: 40ch; margin: 12px auto 22px; }
.progress { height: 10px; background: var(--bg-2); border-radius: 999px; overflow: hidden; margin-bottom: 22px; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg,#2b86f0,var(--blue-600)); border-radius: 999px; transition: width .3s; }

/* ---------- Desafio dos Blocos ---------- */
.blocks-panel, .pattern-panel { text-align: center; overflow: hidden; }
.blocks-lead { max-width: 38ch; margin: 12px auto 22px; color: var(--ink-soft); font-weight: 700; }
.blocks-steps { display: flex; justify-content: center; gap: 7px; margin: 0 auto 18px; flex-wrap: wrap; }
.blocks-steps span { padding: 6px 11px; border-radius: 999px; background: var(--bg-2); color: var(--ink-soft); font-size: .76rem; font-weight: 800; }
.blocks-steps span.active { background: var(--blue); color: var(--card); }
.blocks-steps span.done { background: color-mix(in srgb, var(--p-matematica) 18%, var(--card)); color: var(--p-matematica); }
.blocks-task { max-width: 34ch; margin: 0 auto; font-size: 1.08rem; }
.blocks-die {
  width: 112px; height: 112px; margin: 18px auto 8px; border-radius: var(--r-lg);
  display: grid; place-items: center; font-family: var(--font-display); font-size: 3.4rem; font-weight: 700;
  color: var(--blue-800); background: var(--card); border: 5px solid var(--blue);
  box-shadow: var(--sh-md), inset 0 0 0 6px var(--bg-2);
}
.blocks-die.revealed { color: var(--card); background: linear-gradient(135deg, var(--blue), var(--blue-800)); border-color: var(--card); }
.blocks-board { max-width: 560px; margin: 8px auto 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(62px, 1fr)); gap: 10px; }
.blocks-board-label { margin-top: 16px; color: var(--ink-soft); font-size: .84rem; font-weight: 800; }
.blocks-tile {
  min-height: 64px; border: 3px solid transparent; border-radius: var(--r-md); color: var(--card);
  font-family: var(--font-display); font-size: 1.65rem; font-weight: 700; box-shadow: var(--sh-sm);
  transition: transform .16s cubic-bezier(.2,.9,.3,1.3), box-shadow .16s, border-color .16s, filter .16s;
}
.blocks-tile:hover { transform: translateY(-3px); filter: brightness(1.04); }
.blocks-tile.selected { border-color: var(--ink); box-shadow: var(--sh-glow), var(--sh-md); transform: translateY(-4px) scale(1.04); }
.color-0 { background: var(--game-pink); }
.color-1 { background: var(--game-yellow); }
.color-2 { background: var(--game-green); }
.color-3 { background: var(--blue); }
.color-4 { background: var(--game-orange); }
.color-5 { background: var(--game-purple); }
.blocks-equation { display: grid; gap: 8px; align-content: center; }
.blocks-expression {
  min-height: 84px; margin: 14px auto 6px; padding: 9px 12px; display: flex; justify-content: center; align-items: flex-end; gap: 8px; border-radius: var(--r-md);
  background: var(--bg-2); border: 2px dashed var(--line-2); font-family: var(--font-display); font-weight: 700;
}
.blocks-value { display: grid; gap: 5px; justify-items: center; }
.blocks-value small { color: var(--ink-soft); font-family: var(--font-body); font-size: .65rem; font-weight: 800; line-height: 1; white-space: nowrap; }
.blocks-slot { width: 48px; height: 48px; border-radius: var(--r-sm); display: grid; place-items: center; background: var(--card); border: 2px solid var(--line-2); color: var(--ink-soft); font-size: 1.35rem; }
.blocks-slot.filled { color: var(--card); background: var(--p-matematica); border-color: var(--p-matematica); box-shadow: var(--sh-sm); }
.blocks-slot.target { background: var(--blue); border-color: var(--blue); }
.blocks-symbol { color: var(--ink); font-size: 1.45rem; }
.blocks-auto-hint { color: var(--p-matematica); font-weight: 800; font-size: .9rem; }
.blocks-operations { display: flex; justify-content: center; gap: 10px; }
.blocks-op {
  width: 56px; height: 52px; border-radius: var(--r-sm); border: 2px solid var(--line-2); background: var(--card);
  color: var(--ink); font-family: var(--font-display); font-size: 1.65rem; font-weight: 700;
}
.blocks-op.active { color: var(--card); background: var(--p-matematica); border-color: var(--p-matematica); box-shadow: var(--sh-glow); }

/* ---------- Padrões de Cores ---------- */
.pattern-model { margin: 20px auto 24px; padding: 17px; max-width: 570px; background: var(--bg-2); border: 2px dashed var(--line-2); border-radius: var(--r-lg); }
.pattern-label { margin-bottom: 11px; color: var(--ink-soft); font-family: var(--font-display); font-weight: 700; }
.pattern-sequence { display: flex; justify-content: center; gap: clamp(5px, 1.6vw, 11px); }
.pattern-cell {
  flex: 0 1 58px; aspect-ratio: 1; min-width: 32px; border-radius: var(--r-sm);
  display: grid; place-items: center; color: var(--ink-soft); font-family: var(--font-display); font-size: 1.15rem; font-weight: 700;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.38), var(--sh-sm);
}
.hidden-pattern .pattern-cell { background: var(--card); border: 2px solid var(--line-2); box-shadow: none; }
.pattern-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pattern-card {
  position: relative; min-height: 92px; padding: 18px 14px; border: 3px solid var(--line); border-radius: var(--r-md);
  background: var(--card); box-shadow: var(--sh-sm); transition: transform .16s, border-color .16s, box-shadow .16s;
}
.pattern-card:hover { transform: translateY(-3px); border-color: var(--blue); box-shadow: var(--sh-md); }
.pattern-card.correct { border-color: var(--p-matematica); background: color-mix(in srgb, var(--p-matematica) 9%, var(--card)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--p-matematica) 22%, transparent); }
.pattern-card.wrong { border-color: var(--p-percepcao); opacity: .64; }
.pattern-card-number {
  position: absolute; top: 6px; left: 7px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  color: var(--ink-soft); background: var(--bg-2); font-family: var(--font-display); font-size: .75rem; font-weight: 700; line-height: 1;
}
.pattern-card .pattern-cell { max-width: 42px; border-radius: 9px; }

@media (prefers-reduced-motion: no-preference) {
  .blocks-die.rolling { animation: blocks-roll .18s linear infinite; }
  .blocks-die.revealed { animation: g-pop .5s cubic-bezier(.2,.9,.3,1.3) both; }
  .pattern-options:not(.hidden) { animation: g-fade-up .4s ease-out both; }
}
@keyframes blocks-roll { 0% { transform: rotate(-5deg) scale(.96); } 50% { transform: rotate(5deg) scale(1.04); } 100% { transform: rotate(-5deg) scale(.96); } }

@media (max-width: 620px) {
  .blocks-panel, .pattern-panel { padding: 20px 14px; }
  .blocks-board { grid-template-columns: repeat(3, 1fr); }
  .blocks-tile { min-height: 58px; }
  .blocks-steps span { padding: 5px 8px; font-size: .67rem; }
  .blocks-expression { gap: 4px; padding-left: 5px; padding-right: 5px; }
  .blocks-slot { width: 42px; height: 42px; }
  .blocks-value small { font-size: .56rem; }
  .pattern-options { grid-template-columns: 1fr; }
  .pattern-card { min-height: 78px; padding: 15px 10px; }
  .pattern-cell { min-width: 27px; }
}

/* ============================================================
   MAPA DE FASES + COMO JOGAR
   ============================================================ */
.phase-map { text-align: center; }
.phase-map-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.phase-map-head h2 { font-size: 1.55rem; }
.phase-map-head .btn { min-height: 44px; }
.phase-map-sub { color: var(--ink-soft); font-weight: 700; font-size: .9rem; margin: 2px 0 4px; }

.phase-help { text-align: left; background: linear-gradient(135deg, #eef5ff, #fff7e8); border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px 18px; margin: 10px 0 6px; box-shadow: var(--sh-sm); }
.phase-help-title { font-family: var(--font-display); font-weight: 700; color: var(--ink); margin-bottom: 12px; font-size: 1.05rem; }
.phase-help ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.phase-help li { display: flex; gap: 11px; align-items: flex-start; font-weight: 600; color: var(--ink); font-size: .96rem; line-height: 1.35; }
.phase-help li .s { flex: none; width: 24px; height: 24px; border-radius: 8px; background: linear-gradient(135deg, #2b86f0, var(--blue-800)); color: #fff; display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: .82rem; line-height: 1; }
.phase-help .dica { margin-top: 13px; padding-top: 11px; border-top: 1px dashed var(--line-2); color: var(--gold); font-weight: 700; font-size: .92rem; }
.phase-help .dica b { color: var(--ink); }

.phase-trail { position: relative; display: flex; flex-direction: column; align-items: center; gap: 20px; padding: 22px 0 8px; }
.phase-trail::before { content: ""; position: absolute; top: 30px; bottom: 30px; left: 50%; border-left: 3px dashed var(--line-2); }
.phase-step { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 7px; }
.phase-dot {
  width: 76px; height: 76px; border-radius: 50%; border: 4px solid #fff;
  display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; line-height: 1;
  font-size: 1.9rem; color: #fff; cursor: pointer; text-shadow: 0 1px 3px rgba(8,28,64,.4);
  background: radial-gradient(120% 120% at 30% 22%, #2b86f0, var(--blue-800));
  box-shadow: 0 8px 20px rgba(31,116,224,.34), inset 0 0 0 1px rgba(255,255,255,.25);
  transition: transform .16s cubic-bezier(.2,.9,.3,1.3), box-shadow .16s;
}
.phase-dot:hover { transform: scale(1.07) translateY(-2px); box-shadow: 0 14px 28px rgba(31,116,224,.42); }
.phase-dot:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.phase-step.done .phase-dot { background: radial-gradient(120% 120% at 30% 22%, #e6b95f, var(--gold)); box-shadow: 0 8px 20px rgba(200,151,63,.4), inset 0 0 0 1px rgba(255,255,255,.35); }
.phase-step.locked .phase-dot { background: #e7edf7; color: #9fb2d2; cursor: not-allowed; font-size: 1.5rem; box-shadow: inset 0 0 0 2px var(--line-2); }
.phase-step.locked .phase-dot:hover { transform: none; }
.phase-name { font-family: var(--font-display); font-weight: 700; color: var(--ink); font-size: .98rem; }
.phase-step.locked .phase-name { color: var(--ink-soft); }
.phase-stars { display: flex; gap: 3px; font-size: .95rem; line-height: 1; }
.phase-stars .st { color: var(--line-2); }
.phase-stars .st.on { color: var(--gold); }

/* estrelas grandes na tela de resultado */
.result-phase { font-family: var(--font-display); font-weight: 700; color: var(--ink-soft); font-size: .95rem; margin-bottom: 6px; }
.phase-stars-big { justify-content: center; gap: 12px; margin: 6px 0 2px; }
.phase-stars-big .st { font-size: 3rem; }
.unlock-banner { margin: 16px auto 0; max-width: 34ch; background: linear-gradient(135deg, #fff3d6, #ffe6a8); color: #7a5410; border: 1px solid var(--gold-soft); border-radius: 999px; padding: 10px 18px; font-family: var(--font-display); font-weight: 700; font-size: .95rem; }

@media (prefers-reduced-motion: no-preference) {
  .phase-map { animation: g-pop .5s cubic-bezier(.2,.9,.3,1.3) both; }
  .phase-step { animation: g-fade-up .5s ease-out both; }
  .phase-step:nth-child(2) { animation-delay: .06s; }
  .phase-step:nth-child(3) { animation-delay: .12s; }
  .phase-step:nth-child(4) { animation-delay: .18s; }
  .phase-step:nth-child(5) { animation-delay: .24s; }
  .phase-stars-big .st.on { display: inline-block; animation: g-medal-in .6s cubic-bezier(.2,.9,.3,1.3) both; }
  .phase-stars-big .st.on:nth-child(1) { animation-delay: .15s; }
  .phase-stars-big .st.on:nth-child(2) { animation-delay: .32s; }
  .phase-stars-big .st.on:nth-child(3) { animation-delay: .49s; }
  .unlock-banner { animation: g-pop .5s cubic-bezier(.2,.9,.3,1.3) .55s both; }
}

@media (max-width: 560px) {
  .phase-dot { width: 66px; height: 66px; font-size: 1.6rem; }
}

/* ---------- Encanto: intro / resultado ---------- */
@media (prefers-reduced-motion: no-preference) {
  .g-intro { animation: g-pop .5s cubic-bezier(.2,.9,.3,1.3) both; }
  .g-intro .big { display: inline-block; animation: g-emoji-bob 2.4s ease-in-out .4s infinite; }
  .g-result { animation: g-pop .5s cubic-bezier(.2,.9,.3,1.3) both; }
  .g-result .medal { display: inline-block; animation: g-medal-in .7s cubic-bezier(.2,.9,.3,1.3) both, g-emoji-bob 2.6s ease-in-out .7s infinite; }
  .g-result .score { animation: g-fade-up .5s ease-out .25s both; }
  .g-result p { animation: g-fade-up .5s ease-out .35s both; }
  .g-result .g-toolbar { animation: g-fade-up .5s ease-out .45s both; }
  /* celebração pontual disparada por classe */
  .g-celebrate { animation: g-shake-joy .5s ease-in-out; }
  .g-wrong { animation: g-shake-x .4s ease-in-out; }
  .g-boom { animation: g-boom .5s cubic-bezier(.2,.9,.3,1.3); }
  .fonemas-letter { animation: g-pop .5s cubic-bezier(.2,.9,.3,1.3) both, g-letter-wobble 3.2s ease-in-out .5s infinite; }
}
@keyframes g-letter-wobble { 0%,100% { transform: rotate(0); } 25% { transform: rotate(-5deg); } 75% { transform: rotate(5deg); } }
@keyframes g-pop { from { opacity: 0; transform: scale(.9) translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes g-fade-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes g-emoji-bob { 0%,100% { transform: translateY(0) rotate(0); } 25% { transform: translateY(-8px) rotate(-4deg); } 75% { transform: translateY(-4px) rotate(4deg); } }
@keyframes g-medal-in { 0% { opacity: 0; transform: scale(.2) rotate(-25deg); } 60% { transform: scale(1.25) rotate(8deg); } 100% { opacity: 1; transform: scale(1) rotate(0); } }
@keyframes g-shake-x { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-8px); } 40% { transform: translateX(8px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(5px); } }
@keyframes g-shake-joy { 0%,100% { transform: scale(1) rotate(0); } 30% { transform: scale(1.12) rotate(-3deg); } 60% { transform: scale(1.12) rotate(3deg); } }
@keyframes g-boom { 0% { transform: scale(1); } 45% { transform: scale(1.35); } 100% { transform: scale(1); } }

/* ============================================================
   RESPONSIVO
   ============================================================ */
/* Com a Roberta na nav sao seis links: entre 900 e 1100px eles precisam de
   menos folga para caber ao lado da marca e dos dois botoes. */
@media (max-width: 1100px) and (min-width: 901px) {
  .nav-links { gap: 18px; }
  .nav-links a { font-size: .9rem; }
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .brainstage { max-width: 380px; margin: 0 auto; order: -1; }
  .age-grid, .pillars, .steps, .plans { grid-template-columns: 1fr; }
  .footer .wrap { grid-template-columns: 1fr; gap: 28px; }
  .nav-links { display: none; }
  .nav-burger { display: block; }
  .filters { flex-direction: column; align-items: stretch; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .hero { padding: 40px 0 20px; }
  .row2 { grid-template-columns: 1fr; }

  /* Player: empilha título acima da linha de stats + Sair, sem colisão */
  .player-top .nav-in {
    height: auto; flex-direction: column; align-items: stretch;
    gap: 8px; padding-top: 10px; padding-bottom: 10px;
  }
  .player-title { font-size: 1.02rem; gap: 9px; min-width: 0; }
  .player-title .gg { width: 34px; height: 34px; font-size: 1.15rem; border-radius: 10px; flex: none; }
  .player-title span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .player-actions { justify-content: space-between; gap: 12px !important; }
  /* stats viram chips compactos */
  .player-stats { gap: 10px; }
  .player-stats .stat {
    background: var(--card); border: 1px solid var(--line); border-radius: 12px;
    padding: 5px 11px; display: flex; align-items: baseline; gap: 5px;
  }
  .player-stats .stat .v { font-size: 1.05rem; }
  .player-stats .stat .l { font-size: .58rem; }
  /* alvo de toque confortável pro Sair */
  .player-exit { min-height: 44px; padding: 10px 16px; flex: none; }
  .game-stage { padding-top: 20px; }
}

/* ============================================================
   Quebra-Cabeça de encaixe — conceito visual Verve (2026-09-01)
   ============================================================ */
.puzzle-panel { text-align: center; overflow: hidden; }

.puzzle-picker-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(120px,1fr));
  gap: 14px; max-width: 560px; margin: 6px auto 4px;
}
.puzzle-scene-card {
  border: 1.5px solid var(--line-2); background: var(--card); border-radius: var(--r-md);
  padding: 8px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 8px;
  box-shadow: var(--sh-sm); transition: transform .15s, box-shadow .15s, border-color .15s;
}
.puzzle-scene-card:hover { transform: translateY(-3px); box-shadow: var(--sh-md); border-color: var(--p-percepcao); }
.puzzle-thumb {
  width: 100%; aspect-ratio: 1/1; border-radius: 12px; background-size: cover; background-position: center;
  box-shadow: inset 0 0 0 1px rgba(15,61,128,.08);
}
.puzzle-scene-name { font-family: var(--font-display); font-weight: 700; font-size: .82rem; color: var(--ink); }

/* ---- Revisão 2 (2026-09-01): bandejas laterais, slots demarcados, feedback ---- */
:root {
  --puzzle-error: #c96a5e; /* terracota apagado — Verve: nunca vermelho-alerta de formulário nem cor de pilar */
}

.puzzle-workspace {
  display: flex; align-items: flex-start; justify-content: center;
  margin: 10px auto 0; position: relative;
}
/* Bandejas fixas nas bordas da tela — fora do card do tabuleiro, altura =
   viewport disponível, SEM scroll (a largura/colunas já vêm calculadas em JS
   pra caber todas as peças daquele lado). Grandes de propósito: alvo de toque
   confortável pro público do site. */
.puzzle-tray {
  position: fixed; top: 84px; bottom: 16px; overflow: visible;
  border: 1.5px solid var(--line); border-radius: var(--r-lg); background: #f6f8fd;
  box-shadow: var(--sh-sm); box-sizing: border-box; z-index: 30;
}
.puzzle-tray-left { left: 14px; }
.puzzle-tray-right { right: 14px; }
.puzzle-board-holder { flex: none; }
.puzzle-board {
  position: relative; margin: 0 auto; border-radius: 16px; background: #eef3fb;
  box-shadow: inset 0 0 0 1px var(--line);
}
.puzzle-slots { position: absolute; inset: 0; pointer-events: none; }
.puzzle-slots svg { width: 100%; height: 100%; display: block; }
.puzzle-slot-path {
  fill: none; stroke: rgba(11,34,70,.12); stroke-width: 1.3px;
  transition: stroke .18s, opacity .18s;
}
.puzzle-slot-path.near { stroke: rgba(11,34,70,.28); }
.puzzle-slot-path.just-filled { animation: puzzle-slot-pulse .5s ease-out; }
@keyframes puzzle-slot-pulse {
  0% { stroke: rgba(47,181,107,.55); stroke-width: 2.2px; }
  100% { stroke: rgba(11,34,70,.12); stroke-width: 1.3px; }
}

/* fixed (não absolute): a peça arrastada precisa atravessar da bandeja fixa
   na borda da tela até o tabuleiro, fora dos limites do card estreito. */
.puzzle-drag-layer { position: fixed; inset: 0; pointer-events: none; z-index: 40; }

.puzzle-piece {
  position: absolute; left: 0; top: 0; border: 0; padding: 0; margin: 0;
  background-repeat: no-repeat; background-color: transparent; cursor: grab;
  filter: drop-shadow(0 5px 10px rgba(15,61,128,.22)) drop-shadow(0 0 0 rgba(11,34,70,.16));
  transform: rotate(var(--puzzle-tilt, 0deg));
  transition: left .18s cubic-bezier(.2,.8,.3,1), top .18s cubic-bezier(.2,.8,.3,1),
    filter .15s, transform .16s ease-out;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
}
.puzzle-piece.dragging {
  cursor: grabbing; transition: filter .1s, transform .1s; z-index: 50;
  transform: scale(1.045) rotate(var(--puzzle-tilt, 0deg));
  filter: drop-shadow(0 12px 18px rgba(15,61,128,.32));
}
.puzzle-piece.placed {
  cursor: default; pointer-events: none;
  filter: drop-shadow(0 0 0 rgba(15,61,128,0));
}
/* encaixe certo — Verve: bounce curto e discreto, sem rotação (confirmação ≠ arraste) */
.puzzle-piece.placed.g-boom { animation: puzzle-piece-bounce .28s cubic-bezier(.34,1.56,.64,1) both; }
@keyframes puzzle-piece-bounce {
  0% { transform: scale(1) rotate(0deg); }
  55% { transform: scale(1.08) rotate(0deg); }
  100% { transform: scale(1) rotate(0deg); }
}
/* erro — Verve: aceno gentil, tremida pequena + tint terracota suave, nunca um susto */
.puzzle-piece.wrong {
  animation: puzzle-piece-shake .38s ease-out;
}
.puzzle-piece.wrong::after {
  content: ""; position: absolute; inset: 0; background: var(--puzzle-error);
  opacity: 0; clip-path: inherit; animation: puzzle-piece-tint .42s ease-out;
  pointer-events: none;
}
@keyframes puzzle-piece-shake {
  0%, 100% { transform: translateX(0) rotate(var(--puzzle-tilt, 0deg)); }
  20% { transform: translateX(-5px) rotate(-2deg); }
  40% { transform: translateX(5px) rotate(2deg); }
  60% { transform: translateX(-4px) rotate(-1deg); }
  80% { transform: translateX(3px) rotate(1deg); }
}
@keyframes puzzle-piece-tint {
  0% { opacity: 0; }
  30% { opacity: .18; }
  100% { opacity: 0; }
}

@media (max-width: 900px) {
  /* Tela estreita: bandejas continuam fixas nas bordas (nunca empilham
     embaixo do tabuleiro) — só ganham um respiro menor da borda. */
  .puzzle-tray-left { left: 6px; }
  .puzzle-tray-right { right: 6px; }
}

/* ============================================================
   Resta 1 — tabuleiro em cruz
   ============================================================ */
.resta-panel { text-align: center; }
.resta-board { position: relative; margin: 14px auto 0; }
.resta-hole {
  position: absolute; border: 0; padding: 0; margin: 0; border-radius: 50%;
  background: var(--bg-2); box-shadow: inset 0 2px 5px rgba(11,34,70,.18);
  cursor: default; transition: box-shadow .15s;
}
.resta-hole.target {
  cursor: pointer; box-shadow: inset 0 2px 5px rgba(11,34,70,.18), 0 0 0 3px var(--p-atencao);
  animation: resta-pulse 1s ease-in-out infinite;
}
@keyframes resta-pulse {
  0%, 100% { box-shadow: inset 0 2px 5px rgba(11,34,70,.18), 0 0 0 3px rgba(242,163,28,.55); }
  50% { box-shadow: inset 0 2px 5px rgba(11,34,70,.18), 0 0 0 5px rgba(242,163,28,.85); }
}
.resta-peg {
  position: absolute; inset: 12%; border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #a892ef, var(--p-executiva) 70%);
  box-shadow: 0 3px 6px rgba(11,34,70,.35), inset 0 -3px 5px rgba(0,0,0,.18), inset 0 2px 3px rgba(255,255,255,.35);
  cursor: pointer; transition: transform .15s;
}
.resta-hole:has(.resta-peg) { cursor: pointer; }
.resta-hole.selected .resta-peg { transform: scale(1.12); box-shadow: 0 5px 10px rgba(11,34,70,.4), 0 0 0 3px var(--p-percepcao); }

/* Acessibilidade: respeita quem prefere quietude */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .05ms !important; }
  html { scroll-behavior: auto; }
}

/* Olhinho de mostrar/esconder senha (js/app.js withReveal) */
.pw-wrap { position: relative; }
.pw-wrap input { width: 100%; padding-right: 46px; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; background: none; border: 0; border-radius: 8px; color: var(--ink-soft, #666); cursor: pointer; }
.pw-eye:hover, .pw-eye:focus-visible { color: var(--ink); background: rgba(0,0,0,.05); }
