/* ==========================================================================
   FonoPares · Estilos globais — identidade visual azul, amigável e arredondada
   ========================================================================== */
:root {
  --blue: #2f6fb3;
  --blue-dk: #245a96;
  --blue-2: #38b6ff;
  --blue-lt: #eaf2fb;
  --blue-lt2: #dbe9f8;
  --red: #e23b3b;
  --red-dk: #c62f2f;
  --green: #3aa06a;
  --green-lt: #e4f5ec;
  --amber: #e0a020;
  --purple: #7b5cd6;
  --ink: #22394d;
  --muted: #6b7d8f;
  --card: #ffffff;
  --line: #e2ebf4;
  --shadow: 0 8px 22px rgba(30, 70, 120, .14);
  --shadow-sm: 0 3px 10px rgba(30, 70, 120, .12);
  --radius: 22px;
  --radius-lg: 30px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  font-family: "Segoe UI Rounded", "Nunito", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--blue-lt);
  font-size: 18px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  user-select: none;
}
img { max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* área do app: coluna centralizada tipo celular */
.app-root {
  min-height: 100%;
  max-width: 520px;
  margin: 0 auto;
  background: var(--blue-lt);
  position: relative;
  box-shadow: 0 0 40px rgba(0,0,0,.06);
}
.view { min-height: 100dvh; }

/* ---------- Splash ---------- */
.splash {
  position: fixed; inset: 0; z-index: 100;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  background: linear-gradient(160deg, var(--blue) 0%, var(--blue-dk) 100%);
  color: #fff; transition: opacity .4s ease;
}
.splash--hide { opacity: 0; }
.splash__logo { font-size: 76px; animation: bob 1.6s ease-in-out infinite; }
.splash__name { font-size: 34px; font-weight: 800; letter-spacing: .5px; }
.splash__tag { opacity: .85; }
@keyframes bob { 0%,100%{ transform: translateY(0) } 50%{ transform: translateY(-10px) } }

/* ---------- Telas ---------- */
.screen { min-height: 100dvh; display: flex; flex-direction: column; }
.screen__body { padding: 18px 18px calc(28px + var(--safe-bottom)); flex: 1; }
.fade-in { animation: fade .28s ease; }
@keyframes fade { from{ opacity: 0; transform: translateY(6px) } to{ opacity: 1; transform: none } }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: linear-gradient(180deg, var(--blue) 0%, var(--blue-dk) 100%);
  color: #fff; padding-top: var(--safe-top);
  box-shadow: var(--shadow-sm);
}
.topbar__progress { height: 8px; background: rgba(255,255,255,.25); }
.topbar__progress-fill { height: 100%; background: linear-gradient(90deg, #7ee0a6, #38b6ff); transition: width .4s ease; border-radius: 0 6px 6px 0; }
.topbar__row { display: flex; align-items: center; gap: 8px; padding: 10px 12px; min-height: 56px; }
.topbar__title { font-size: 19px; font-weight: 800; text-align: center; flex: 1; letter-spacing: .4px; }
.iconbtn {
  width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center;
  font-size: 24px; font-weight: 800; color: #fff; background: rgba(255,255,255,.16);
}
.iconbtn:active { transform: scale(.92); }
.iconbtn--ghost { background: transparent; visibility: hidden; }
.iconbtn--light { background: rgba(255,255,255,.2); }
.game__count { font-weight: 800; font-size: 15px; background: rgba(255,255,255,.18); padding: 6px 12px; border-radius: 12px; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 20px; border-radius: 18px; font-size: 19px; font-weight: 800;
  box-shadow: var(--shadow-sm); transition: transform .08s ease, filter .15s ease; width: 100%;
}
.btn:active { transform: translateY(2px) scale(.99); }
.btn--primary { background: linear-gradient(180deg, #3a82cf, var(--blue)); color: #fff; border-bottom: 4px solid var(--blue-dk); }
.btn--big { padding: 17px 22px; font-size: 21px; border-radius: 20px; }
.btn--ghost { background: #fff; color: var(--blue); border: 2px solid var(--blue-lt2); box-shadow: none; }
.btn--small { width: auto; padding: 9px 16px; font-size: 15px; border-radius: 13px; background: var(--blue); color: #fff; }
.btn--danger-ghost { background: #fff; color: var(--red); border: 2px solid #f4d3d3; box-shadow: none; font-size: 16px; }

/* ---------- Estrelas ---------- */
.stars { display: inline-flex; gap: 4px; justify-content: center; }
.star { line-height: 1; }
.star--on { color: var(--amber); filter: drop-shadow(0 2px 2px rgba(224,160,32,.4)); animation: starpop .4s ease backwards; }
.star--off { color: #cdd8e4; }
.stars .star--on:nth-child(2){ animation-delay:.1s } .stars .star--on:nth-child(3){ animation-delay:.2s }
@keyframes starpop { 0%{ transform: scale(0) rotate(-40deg) } 70%{ transform: scale(1.3) } 100%{ transform: none } }

/* ==========================================================================
   HOME · Mapa de fases
   ========================================================================== */
.home-head {
  background: linear-gradient(180deg, var(--blue) 0%, var(--blue-dk) 100%);
  color: #fff; padding: calc(14px + var(--safe-top)) 16px 18px; border-radius: 0 0 26px 26px;
  box-shadow: var(--shadow);
}
.home-head__row { display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand__logo { font-size: 34px; background: rgba(255,255,255,.18); width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; }
.brand__name { font-size: 24px; font-weight: 800; line-height: 1; }
.brand__tag { font-size: 13px; opacity: .88; margin-top: 3px; }
.stat-pills { display: flex; gap: 8px; margin-top: 14px; }
.pill { flex: 1; background: rgba(255,255,255,.16); border-radius: 14px; padding: 8px 6px; display: flex; align-items: center; justify-content: center; gap: 6px; font-weight: 800; }
.pill__icon { font-size: 18px; }
.pill__val { font-size: 16px; }

.map { padding: 20px 0 130px; display: flex; flex-direction: column; align-items: center; gap: 20px; position: relative; }
.map::before { content: ""; position: absolute; top: 40px; bottom: 90px; width: 4px; background: repeating-linear-gradient(var(--blue-lt2) 0 12px, transparent 12px 24px); border-radius: 4px; z-index: 0; }
.map__world {
  width: calc(100% - 32px); background: #fff; border-left: 6px solid var(--wc); border-radius: 16px;
  padding: 12px 16px; box-shadow: var(--shadow-sm); z-index: 1; position: relative;
}
.map__world:active { transform: scale(.99); }
.map__world-name { font-weight: 800; font-size: 18px; color: var(--wc); }
.map__world-sub { font-size: 13px; color: var(--muted); }
.map__world-go { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 13px; font-weight: 700; color: var(--muted); }
.map__node-wrap { display: flex; flex-direction: column; align-items: center; gap: 5px; z-index: 1; }
.node { position: relative; width: 78px; height: 78px; border-radius: 50%; display: grid; place-items: center; }
.node__ring { position: absolute; inset: 0; border-radius: 50%; box-shadow: var(--shadow); }
.node__face { position: relative; font-size: 20px; font-weight: 800; letter-spacing: .3px; }
.node--open .node__ring { background: linear-gradient(180deg, #fff 0%, #eef5fd 100%); border: 4px solid var(--wc); }
.node--open .node__face { color: var(--wc); }
.node--open { animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 0%,100%{ transform: translateX(var(--x,0)) scale(1) } 50%{ transform: scale(1.05) } }
.node--done .node__ring { background: linear-gradient(180deg, var(--wc), var(--blue-dk)); }
.node--done .node__face { color: #fff; }
.node--locked .node__ring { background: #dde6ef; }
.node--locked .node__face { filter: grayscale(1); opacity: .7; font-size: 26px; }
.node:active { transform: scale(.93); }
.node__caption { font-size: 12px; font-weight: 700; color: var(--muted); }
.map__flag { font-size: 40px; margin-top: 6px; z-index: 1; }

/* barra de abas inferior */
.tabbar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: 100%; max-width: 520px; z-index: 30;
  display: flex; background: #fff; border-top: 1px solid var(--line);
  padding: 8px 8px calc(8px + var(--safe-bottom)); box-shadow: 0 -6px 18px rgba(30,70,120,.08);
}
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--muted); font-weight: 700; padding: 4px; border-radius: 14px; }
.tab__icon { font-size: 22px; }
.tab__label { font-size: 12px; }
.tab--active { color: var(--blue); background: var(--blue-lt); }

/* ---------- cartão de início de fase / modal ---------- */
.overlay { position: fixed; inset: 0; z-index: 60; background: rgba(20,40,70,.5); display: grid; place-items: center; padding: 20px; animation: fade .2s ease; }
.overlay--out { opacity: 0; transition: opacity .2s; }
.overlay__card { background: #fff; border-radius: var(--radius-lg); padding: 22px; width: 100%; max-width: 420px; box-shadow: var(--shadow); max-height: 90dvh; overflow-y: auto; }
.pop-in { animation: pop .3s cubic-bezier(.2,.9,.3,1.3); }
@keyframes pop { from{ transform: scale(.85); opacity: 0 } to{ transform: none; opacity: 1 } }

.level-card { text-align: center; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.level-card__badge { font-size: 26px; font-weight: 800; color: #fff; background: var(--wc, var(--blue)); padding: 10px 22px; border-radius: 16px; box-shadow: var(--shadow-sm); }
.level-card__title { margin: 0; font-size: 20px; }
.level-card__desc { margin: 0; color: var(--muted); font-size: 15px; }
.level-card__meta { font-size: 13px; color: var(--muted); font-weight: 700; }

.settings { display: flex; flex-direction: column; gap: 12px; }
.settings__title { margin: 0 0 4px; }
.settings__label { font-size: 13px; font-weight: 700; color: var(--muted); }
.field { width: 100%; padding: 12px 14px; border-radius: 14px; border: 2px solid var(--line); font-size: 16px; font-family: inherit; }
.field:focus { outline: none; border-color: var(--blue); }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-weight: 700; padding: 10px 12px; background: var(--blue-lt); border-radius: 14px; }
.toggle__switch { position: relative; width: 52px; height: 30px; }
.toggle__switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; }
.toggle__switch::before { content: ""; position: absolute; inset: 0; background: #c4d2e0; border-radius: 20px; transition: background .2s; }
.toggle__switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; background: #fff; border-radius: 50%; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.toggle__switch:has(input:checked)::before { background: var(--green); }
.toggle__switch:has(input:checked)::after { transform: translateX(22px); }
.settings__actions { display: flex; gap: 8px; }
.settings__actions .btn { flex: 1; font-size: 14px; }

/* ==========================================================================
   WORLD · Grade de contrastes
   ========================================================================== */
.world-sub { text-align: center; color: var(--muted); margin: 2px 0 16px; font-weight: 600; }
.tile-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.tile { background: #fff; border-radius: 18px; padding: 14px 8px 12px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; align-items: center; gap: 6px; border: 2px solid transparent; min-height: 108px; justify-content: center; }
.tile:active { transform: scale(.96); }
.tile__badge { font-size: 20px; font-weight: 800; color: #fff; background: var(--wc, var(--blue)); border-radius: 12px; padding: 8px 10px; min-width: 54px; text-align: center; }
.tile__name { font-size: 12px; font-weight: 700; color: var(--muted); }
.tile__hint { font-size: 11px; color: var(--blue); font-weight: 800; text-transform: uppercase; }
.tile--locked { opacity: .6; }
.tile--locked .tile__badge { background: #c4d2e0; }
.tile--open { border-color: var(--wc, var(--blue)); }
.tile--done .tile__badge { background: linear-gradient(180deg, var(--green), #2c8656); }

/* ==========================================================================
   GAME · Qual é o nome da figura?
   ========================================================================== */
.screen--game { background: var(--blue-lt); }
.game__body { display: flex; flex-direction: column; gap: 16px; align-items: center; }
.game__q { text-align: center; font-size: clamp(22px, 6vw, 30px); font-weight: 800; color: var(--ink); margin: 6px 0 0; }
.figure {
  position: relative; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  width: 100%; max-width: 340px; aspect-ratio: 1 / 1; display: grid; place-items: center; padding: 18px;
  animation: pop .35s ease;
}
.figure__img { max-width: 100%; max-height: 100%; object-fit: contain; pointer-events: none; }
.figure__speak {
  position: absolute; bottom: 10px; right: 10px; width: 48px; height: 48px; border-radius: 50%;
  background: var(--blue); color: #fff; font-size: 22px; box-shadow: var(--shadow-sm);
}
.figure__speak:active { transform: scale(.9); }
.timebar { width: 100%; max-width: 340px; height: 10px; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: var(--shadow-sm); }
.timebar__fill { height: 100%; width: 100%; background: var(--green); border-radius: 8px; }

.options { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }
.opt {
  padding: 18px; border-radius: 18px; font-size: 24px; font-weight: 800; color: #fff; letter-spacing: 1px;
  box-shadow: var(--shadow-sm); transition: transform .08s ease, filter .15s ease; border-bottom: 4px solid rgba(0,0,0,.18);
}
.opt:active { transform: translateY(2px) scale(.995); }
/* Cor única para todas as opções: nenhuma parece "a errada" antes de escolher. */
.opt--neutral { background: linear-gradient(180deg, #3a82cf, var(--blue)); }
/* letra diferente do par mínimo destacada (opcional, ver Ajustes) */
.opt__diff { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 4px; font-weight: 900; }
.opt--correct { background: linear-gradient(180deg, #4cb87e, var(--green)) !important; animation: correctPulse .5s ease; }
.opt--wrong { background: linear-gradient(180deg, #9aa8b6, #7d8b99) !important; animation: shake .4s ease; }
.opt--dim { filter: grayscale(.6) brightness(.9); opacity: .55; }
@keyframes correctPulse { 0%{ transform: scale(1) } 50%{ transform: scale(1.04) } 100%{ transform: scale(1) } }
@keyframes shake { 0%,100%{ transform: translateX(0) } 20%{ transform: translateX(-8px) } 40%{ transform: translateX(8px) } 60%{ transform: translateX(-5px) } 80%{ transform: translateX(5px) } }

.feedback {
  position: fixed; left: 50%; bottom: -120px; transform: translateX(-50%); z-index: 50;
  display: flex; align-items: center; gap: 12px; padding: 16px 26px; border-radius: 20px;
  font-size: 22px; font-weight: 800; color: #fff; box-shadow: var(--shadow); transition: bottom .3s cubic-bezier(.2,.9,.3,1.3);
  max-width: 90%;
}
.feedback--show { bottom: calc(28px + var(--safe-bottom)); }
.feedback--ok { background: linear-gradient(180deg, #4cb87e, var(--green)); }
.feedback--no { background: linear-gradient(180deg, #ea5757, var(--red)); }
.feedback__icon { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.25); display: grid; place-items: center; }

/* ==========================================================================
   RESULTS · Parabéns
   ========================================================================== */
.screen--results { display: grid; place-items: center; padding: 24px 18px calc(24px + var(--safe-bottom)); min-height: 100dvh; }
.screen--results.is-win { background: linear-gradient(160deg, #eaf6ef 0%, var(--blue-lt) 100%); }
.result-card { background: #fff; border-radius: var(--radius-lg); padding: 26px 22px; width: 100%; max-width: 440px; box-shadow: var(--shadow); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.result-card__banner { font-size: 30px; font-weight: 900; letter-spacing: .5px; color: var(--blue); }
.is-win .result-card__banner { background: linear-gradient(90deg, var(--blue), var(--purple)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.result-card__sub { margin: -6px 0 0; color: var(--muted); }
.result-card__score { display: flex; gap: 20px; align-items: baseline; }
.score-big { font-size: 40px; font-weight: 900; color: var(--ink); }
.score-pct { font-size: 15px; color: var(--muted); font-weight: 700; }
.reward-row { display: flex; align-items: center; gap: 18px; justify-content: center; margin: 4px 0; }
.reward-fig { width: 92px; height: 92px; background: var(--blue-lt); border-radius: 18px; display: grid; place-items: center; padding: 8px; box-shadow: var(--shadow-sm); }
.reward-fig img { max-height: 100%; object-fit: contain; }
.medal { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.medal__disc { width: 92px; height: 92px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffe08a, var(--amber)); display: grid; place-items: center; box-shadow: inset 0 0 0 6px rgba(255,255,255,.5), var(--shadow-sm); border: 4px solid #d9931a; animation: pop .4s ease; }
.medal__label { font-weight: 900; font-size: 18px; color: #7a4d06; }
.medal__ribbon { width: 40px; height: 16px; background: repeating-linear-gradient(90deg, var(--red) 0 8px, #fff 8px 12px); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 78%, 0 100%); margin-top: -4px; }
.result-review { width: 100%; background: var(--blue-lt); border-radius: 16px; padding: 12px; }
.result-review__title { font-weight: 800; font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.result-review__chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.chip { background: #fff; border: 2px solid var(--line); border-radius: 12px; padding: 5px 12px; font-weight: 800; color: var(--red); }
.result-actions { width: 100%; display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }

/* ==========================================================================
   STATS · Painel
   ========================================================================== */
.kpi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 6px; }
.kpi { background: #fff; border-radius: 16px; padding: 12px 6px; text-align: center; box-shadow: var(--shadow-sm); }
.kpi__icon { font-size: 20px; }
.kpi__value { font-size: 20px; font-weight: 900; color: var(--blue); }
.kpi__label { font-size: 11px; color: var(--muted); font-weight: 700; }
.stat-section { background: #fff; border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-sm); margin-top: 14px; }
.stat-section__title { margin: 0 0 12px; font-size: 16px; color: var(--ink); }
.barchart-wrap { width: 100%; overflow-x: auto; }
.barchart { width: 100%; height: auto; }
.barchart__grid { stroke: var(--line); stroke-width: 1; }
.barchart__bar { animation: grow .6s ease backwards; }
@keyframes grow { from{ transform: scaleY(0) } to{ transform: scaleY(1) } }
.barchart__value { font-size: 11px; font-weight: 800; fill: var(--ink); text-anchor: middle; }
.barchart__label { font-size: 12px; font-weight: 700; fill: var(--muted); text-anchor: middle; }
.ranklist { display: flex; flex-direction: column; gap: 10px; }
.rankrow { display: flex; align-items: center; gap: 10px; }
.rankrow__pos { font-weight: 900; color: var(--muted); width: 26px; }
.rankrow__name { font-weight: 800; width: 54px; }
.rankrow__bar { flex: 1; height: 12px; background: var(--blue-lt); border-radius: 6px; overflow: hidden; }
.rankrow__fill { display: block; height: 100%; border-radius: 6px; }
.rankrow__val { font-weight: 800; font-size: 14px; width: 44px; text-align: right; }
.badge-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.badge-cell { border-radius: 16px; padding: 12px; text-align: center; border: 2px solid var(--line); }
.badge-cell.is-on { background: linear-gradient(180deg, #fff7e6, #fff); border-color: #f0d9a0; }
.badge-cell.is-off { opacity: .55; filter: grayscale(.6); }
.badge-cell__icon { font-size: 30px; }
.badge-cell__name { font-weight: 800; font-size: 14px; }
.badge-cell__desc { font-size: 11px; color: var(--muted); }
.export-row { margin-top: 16px; }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty__icon { font-size: 54px; }

/* ==========================================================================
   REVIEW · Revisão ativa
   ========================================================================== */
.review-intro { text-align: center; color: var(--muted); font-weight: 600; margin: 4px 0 14px; }
.review-all { margin-bottom: 16px; }
.review-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); margin-bottom: 14px; overflow: hidden; }
.review-card__head { background: linear-gradient(180deg, var(--blue), var(--blue-dk)); color: #fff; font-weight: 800; text-align: center; padding: 10px; letter-spacing: .5px; }
.review-card__body { display: flex; align-items: center; justify-content: space-around; gap: 8px; padding: 16px 12px; }
.review-fig { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.review-fig img { width: 92px; height: 92px; object-fit: contain; }
.review-fig__noimg { width: 92px; height: 92px; display: grid; place-items: center; font-size: 34px; background: var(--blue-lt); border-radius: 16px; }
.review-fig__label { font-weight: 800; font-size: 17px; }
.review-fig:active { transform: scale(.96); }
.review-card__vs { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.review-card__contrast { font-weight: 900; font-size: 20px; color: var(--red); background: var(--blue-lt); border-radius: 50%; width: 54px; height: 54px; display: grid; place-items: center; border: 3px dashed var(--red); }
.review-card__change { font-size: 12px; color: var(--muted); font-weight: 700; }
.review-card__foot { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-top: 1px solid var(--line); }
.review-card__stat { font-size: 13px; color: var(--muted); font-weight: 700; }

/* ==========================================================================
   Toasts / conquistas / confetes
   ========================================================================== */
.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%) translateY(20px); z-index: 80; background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 16px; font-weight: 700; opacity: 0; transition: all .3s ease; max-width: 88%; text-align: center; box-shadow: var(--shadow); }
.toast--show { opacity: 1; transform: translateX(-50%) translateY(0); }
.badgepop { position: fixed; top: calc(16px + var(--safe-top)); left: 50%; transform: translateX(-50%) translateY(-140%); z-index: 85; background: #fff; border-radius: 18px; box-shadow: var(--shadow); padding: 12px 18px; display: flex; align-items: center; gap: 12px; transition: transform .35s cubic-bezier(.2,.9,.3,1.3); border: 2px solid #f0d9a0; }
.badgepop--show { transform: translateX(-50%) translateY(0); }
.badgepop__icon { font-size: 34px; }
.badgepop__title { font-size: 12px; color: var(--amber); font-weight: 800; text-transform: uppercase; }
.badgepop__name { font-weight: 800; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 90; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 10px; height: 14px; border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(108vh) rotate(720deg); opacity: .9; } }

/* ---------- Movimento reduzido / acessibilidade ---------- */
.reduce-motion *, .reduce-motion *::before, .reduce-motion *::after { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; } }

/* foco visível para teclado */
button:focus-visible, input:focus-visible, .tile:focus-visible, .node:focus-visible { outline: 3px solid var(--blue-2); outline-offset: 2px; }
