/* Pareamento: visual "Caderno de adesivos" (tokens copiados de site/style.css, para o jogo ser independente) */
:root {
  --y: #ffd43b;
  --y-dot: #f5bf0a;
  --ink: #3a2a17;
  --paper: #fffdf5;
  --pink: #ff6f91;
  --sky: #4cc3ff;
  --leaf: #4ccf7a;
  --orange: #ff9f1c;
  --red: #e5484d;
  --display: "Gluten", "Comic Sans MS", cursive;
  --body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --emoji: "Noto Color Emoji", "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--y);
  background-image: radial-gradient(var(--y-dot) 2.2px, transparent 2.6px);
  background-size: 26px 26px;
  color: var(--ink);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.4;
  -webkit-tap-highlight-color: transparent;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
h1, h2 { font-family: var(--display); font-weight: 800; margin: 0; line-height: 1.1; }
h1 { font-size: clamp(32px, 6vw, 46px); }

/* ---------- camadas ---------- */
.fx { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 50; pointer-events: none; }
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  display: flex; align-items: center;
  padding: calc(14px + var(--safe-t)) 16px 14px calc(16px + var(--safe-l));
  pointer-events: none;
}
/* nas páginas que rolam, uma faixa amarela atrás do Início e do som para o texto não passar por baixo */
body.paging .topbar { background: linear-gradient(var(--y) 75%, rgba(255, 212, 59, 0)); padding-bottom: 22px; }
.topbar .home-link { pointer-events: auto; }
body.playing .topbar { display: none; }
body.playing .gear { display: none; }

/* Botão "Início": volta para a lista de jogos do laurinha.net */
.home-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 16px 6px 10px;
  font-family: var(--display); font-weight: 800; font-size: 20px;
  color: var(--ink); text-decoration: none;
  background: var(--y); border: 3px solid var(--ink); border-radius: 999px;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform .12s ease, box-shadow .12s ease;
}
.home-link svg { width: 22px; height: 22px; }
.home-link:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }

/* ---------- som (sempre à mão) ---------- */
.sound-dock {
  position: fixed; z-index: 40; top: calc(12px + var(--safe-t)); right: calc(14px + var(--safe-r));
  display: flex; gap: 10px;
}
.round-btn {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; padding: 0;
  background: var(--paper); border: 3px solid var(--ink); box-shadow: 3px 3px 0 var(--ink);
  transition: transform .12s ease, box-shadow .12s ease;
}
.round-btn svg { width: 28px; height: 28px; }
.round-btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
#btnMute .off { display: none; }
#btnMute[aria-pressed="true"] { background: #ffd6de; }
#btnMute[aria-pressed="true"] .on { display: none; }
#btnMute[aria-pressed="true"] .off { display: inline; }

/* ---------- telas ---------- */
.screen {
  position: fixed; inset: 0; z-index: 1;
  display: grid; place-items: center;
  padding: calc(84px + var(--safe-t)) calc(16px + var(--safe-r)) calc(20px + var(--safe-b)) calc(16px + var(--safe-l));
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.screen.scroll { place-items: start center; }
.overlay {
  position: fixed; inset: 0; z-index: 20;
  display: grid; place-items: center;
  padding: calc(84px + var(--safe-t)) 16px calc(16px + var(--safe-b));
  background: rgba(58, 42, 23, .35);
  overflow: auto;
}
.overlay.top { z-index: 60; }

.panel {
  display: grid; gap: 14px; justify-items: center; text-align: center;
  width: min(560px, 100%);
  padding: 24px 22px 26px;
  background: var(--paper);
  border: 4px solid var(--ink); border-radius: 26px; box-shadow: 7px 7px 0 var(--ink);
  transform: rotate(-.8deg);
  animation: pop .35s cubic-bezier(.3, 1.4, .5, 1) both;
}
@keyframes pop { from { transform: scale(.85) rotate(-3deg); opacity: 0; } }
.sub { margin: -6px 0 2px; font-weight: 800; }
.lbl { font-family: var(--body); font-weight: 900; font-size: 15px; text-transform: uppercase; letter-spacing: .06em; opacity: .75; margin-top: 4px; }
.big-text { margin: 0; font-size: 22px; font-weight: 800; }
.muted { opacity: .7; }

/* ---------- botões ---------- */
.btn {
  display: inline-block; font-family: var(--display); font-weight: 800; font-size: 24px; line-height: 1.1;
  background: var(--pink); color: var(--paper); border: 3px solid var(--ink); border-radius: 16px;
  padding: 8px 22px 10px; box-shadow: 4px 4px 0 var(--ink); text-decoration: none; min-height: 52px;
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn.big { font-size: 34px; padding: 10px 34px 12px; border-radius: 20px; box-shadow: 5px 5px 0 var(--ink); min-height: 66px; }
.btn.alt { background: var(--sky); color: var(--ink); }
.btn.small { font-size: 18px; padding: 5px 14px 7px; min-height: 42px; box-shadow: 3px 3px 0 var(--ink); }
.btn.danger { background: var(--red); }
.btn.leaf { background: var(--leaf); color: var(--ink); }
.btn.sky { background: var(--sky); color: var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.btn:disabled { opacity: .45; cursor: default; transform: none; }
.btns { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.btns.col { flex-direction: column; align-items: stretch; width: min(360px, 100%); }
.link {
  background: none; border: 0; padding: 8px 10px; min-height: 44px;
  font-weight: 900; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px;
}
:focus-visible { outline: 4px solid var(--sky); outline-offset: 3px; }

/* ---------- perfis e nome ---------- */
.profiles { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.profile {
  display: grid; justify-items: center; gap: 6px; min-width: 120px; padding: 14px 14px 12px;
  background: #fff; border: 3px solid var(--ink); border-radius: 20px; box-shadow: 4px 4px 0 var(--ink);
  font-family: var(--display); font-weight: 800; font-size: 22px;
  transition: transform .12s ease, box-shadow .12s ease;
}
.profile:nth-child(odd) { transform: rotate(-2deg); }
.profile:nth-child(even) { transform: rotate(1.5deg); }
.profile:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.avatar {
  width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
  border: 3px solid var(--ink); font-size: 34px; color: var(--ink); background: var(--c, var(--y));
}
.profile small { font-family: var(--body); font-size: 14px; font-weight: 800; opacity: .7; }
.name-in {
  width: min(380px, 100%); font-family: var(--display); font-weight: 800; font-size: 32px; text-align: center;
  padding: 10px 14px; border: 3px solid var(--ink); border-radius: 16px; background: #fff;
  box-shadow: inset 3px 3px 0 rgba(58, 42, 23, .12);
}
.name-in:focus { outline: 4px solid var(--sky); }
.name-in, .field input.name-edit { text-transform: uppercase; }
.name-in::placeholder { text-transform: none; }

/* idades e modos: botões grandes que ficam "apertados" quando escolhidos */
.ages { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.age {
  min-width: 70px; height: 70px; padding: 0 12px; border-radius: 18px;
  background: #fff; border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--ink);
  font-family: var(--display); font-weight: 800; font-size: 34px; line-height: 1;
  display: grid; place-items: center;
  transition: transform .12s ease, box-shadow .12s ease, background .12s;
}
.age small { display: block; font-family: var(--body); font-size: 12px; font-weight: 900; margin-top: 2px; }
.age[aria-checked="true"] { background: var(--y); transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: 100%; }
.modes.two { grid-template-columns: repeat(2, 1fr); width: min(340px, 100%); }
.mode {
  display: grid; justify-items: center; align-content: center; gap: 2px; padding: 10px 6px; min-height: 64px;
  background: #fff; border: 3px solid var(--ink); border-radius: 16px; box-shadow: 4px 4px 0 var(--ink);
  font-weight: 900; font-size: 17px;
  transition: transform .12s ease, box-shadow .12s ease, background .12s;
}
.mode .mi { font-family: var(--display); font-size: 26px; line-height: 1; }
.mode[aria-checked="true"] { background: var(--leaf); transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
#menuLinguas .mode[aria-checked="true"] { background: var(--sky); }
#menuLinguas .mi { font-size: 22px; white-space: nowrap; }
.play { margin-top: 6px; }
.progress { display: grid; gap: 6px; justify-items: center; font-weight: 900; }
.dots { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; max-width: 360px; }
.dots i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--ink); background: #fff; }
.dots i.on { background: var(--y); box-shadow: inset 0 0 0 2px #fff6c8; }
.menu-foot { display: flex; flex-wrap: wrap; gap: 4px 14px; justify-content: center; margin-top: 6px; font-size: 16px; }

/* ---------- jogo ---------- */
.game {
  display: flex; flex-direction: column; gap: 10px; place-items: stretch;
  padding: calc(12px + var(--safe-t)) calc(12px + var(--safe-r)) calc(12px + var(--safe-b)) calc(12px + var(--safe-l));
  overflow: hidden;
  touch-action: none;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.game-head { display: flex; align-items: center; gap: 12px; min-height: 56px; padding-right: 76px; }
body:not(.playing) .game-head { visibility: hidden; }
.round-title {
  font-size: clamp(18px, 4.6vw, 32px); background: var(--ink); color: var(--y);
  padding: 4px 16px 6px; border-radius: 14px; transform: rotate(-1.5deg);
  min-width: 0; text-wrap: balance;
}
.board { flex: 1; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 14px; }
.board.wide { grid-template-columns: minmax(0, 1fr) minmax(170px, 32%); grid-template-rows: minmax(0, 1fr); }
.figs {
  min-height: 0; min-width: 0;
  display: grid; grid-template-columns: repeat(var(--cols, 3), var(--size, 140px)); grid-auto-rows: var(--size, 140px);
  gap: var(--gap, 14px); place-content: center;
}
.fig {
  position: relative; display: grid; grid-template-rows: minmax(0, 1fr) auto; place-items: center; gap: 4px;
  padding: calc(var(--size) * .05);
  background: var(--paper); border: 4px solid var(--ink); border-radius: calc(var(--size) * .14 + 6px);
  box-shadow: 5px 5px 0 var(--ink);
  touch-action: none; cursor: default;
  transition: transform .15s ease, box-shadow .15s ease, background .15s;
}
.fig:nth-child(3n+1) { transform: rotate(-1.4deg); }
.fig:nth-child(3n+2) { transform: rotate(1.1deg); }
.fig:nth-child(3n) { transform: rotate(-.6deg); }
.figs.picking .fig:not(.done), .board.picking .fig:not(.done) { cursor: pointer; }
.fig .art { font-family: var(--emoji); font-size: calc(var(--size) * .48); line-height: 1; display: grid; place-items: center; width: 100%; height: 100%; min-height: 0; }
.fig .slot {
  width: 100%; min-height: calc(var(--size) * .2); display: grid; place-items: center;
  border: 3px dashed rgba(58, 42, 23, .3); border-radius: 12px;
  font-family: var(--display); font-weight: 800; font-size: var(--slot-font, 18px); line-height: 1; padding: 2px 4px;
  white-space: nowrap; overflow: hidden;
}
.fig.over { transform: scale(1.06) rotate(0); box-shadow: 8px 8px 0 var(--ink); background: #fff6c8; }
.fig.over .slot { border-color: var(--pink); background: #ffe3ea; }
.fig.done { background: #f0fff4; }
.fig.done .slot { border: 3px solid var(--ink); background: var(--y); }
.fig.yay { animation: yay .8s cubic-bezier(.3, 1.4, .5, 1); }
@keyframes yay {
  0% { transform: scale(1); }
  30% { transform: scale(1.18) rotate(-6deg) translateY(-10px); }
  55% { transform: scale(.96) rotate(4deg); }
  80% { transform: scale(1.04) rotate(-1deg); }
  100% { transform: scale(1) rotate(0); }
}
.fig.hint:not(.done) { animation: hint 1.1s ease-in-out infinite; }
@keyframes hint {
  0%, 100% { box-shadow: 5px 5px 0 var(--ink), 0 0 0 0 rgba(255, 212, 59, 0); }
  50% { box-shadow: 5px 5px 0 var(--ink), 0 0 0 10px rgba(255, 212, 59, .9); background: #fff6c8; }
}

/* quantidades: arranjo de dado (até 6) e quadro de dez, medidos pelo espaço da figura (container query) */
.fig .art:has(.dice, .frames) { container-type: size; }
/* rodada de cores: mancha de tinta com brilho (contorno escuro para o branco aparecer) */
.tinta {
  display: block; width: 66%; aspect-ratio: 1; background: var(--c);
  border: 3px solid var(--ink); border-radius: 46% 54% 50% 50% / 55% 45% 55% 45%;
  box-shadow: inset -6px -8px 0 rgba(0, 0, 0, .14), inset 6px 6px 0 rgba(255, 255, 255, .35);
  transform: rotate(-8deg);
}
.dice {
  display: grid; grid-template: repeat(3, minmax(0, 1fr)) / repeat(3, minmax(0, 1fr));
  width: min(100cqw, 100cqh); height: min(100cqw, 100cqh); margin: auto;
}
.dice .c, .frame .c { display: grid; place-items: center; font-family: var(--emoji); line-height: 1; min-width: 0; min-height: 0; }
.dice .c { font-size: min(29cqw, 29cqh); }
.frames { display: grid; gap: 4px; width: 100%; height: 100%; align-content: center; justify-items: center; }
.frame {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; width: min(96cqw, 210cqh);
  border: 2px solid rgba(58, 42, 23, .45); border-radius: 8px; padding: 2px; background: #fff;
}
.frames.two .frame { width: min(96cqw, 108cqh); }
.frame .c { aspect-ratio: 1; font-size: min(14cqw, 31cqh); }
.frames.two .frame .c { font-size: min(14cqw, 16cqh); }
.frame .c.empty::before { content: ""; width: 42%; aspect-ratio: 1; border-radius: 50%; border: 2px dashed rgba(58, 42, 23, .25); }

.tray { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; align-content: center; padding: 4px 8px 8px 4px; min-height: 0; max-height: 44vh; overflow: hidden; }
.board.wide .tray { max-height: none; gap: 10px; }
.chip {
  min-height: max(48px, 2.2em); min-width: max(56px, 2.2em); padding: .28em .62em .36em;
  font-family: var(--display); font-weight: 800; font-size: var(--chip-font, 28px); line-height: 1; letter-spacing: .02em;
  color: var(--ink); background: #fff; border: 3px solid var(--ink); border-radius: 16px; box-shadow: 4px 4px 0 var(--ink);
  touch-action: none; cursor: grab;
  user-select: none; -webkit-user-select: none;
  transition: transform .12s ease, box-shadow .12s ease, opacity .12s;
}
.chip:nth-child(4n+1) { background: #ffe3ea; }
.chip:nth-child(4n+2) { background: #dff3ff; }
.chip:nth-child(4n+3) { background: #ddf7e6; }
.chip:nth-child(4n) { background: #fff0d6; }
/* rodada de cores: etiquetas brancas, para o fundo não competir com a cor escrita */
.board.cores .chip { background: #fff; }
.chip.lifting { opacity: .3; }
.chip.used { visibility: hidden; }
.chip.sel { transform: translateY(-6px) rotate(-2deg); box-shadow: 4px 10px 0 var(--ink); outline: 4px solid var(--pink); outline-offset: 2px; }
.chip.nope { animation: nope .45s ease; }
@keyframes nope {
  20% { transform: translateX(-8px) rotate(-3deg); }
  40% { transform: translateX(7px) rotate(2deg); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(3px); }
}
.chip-ghost {
  position: fixed; z-index: 45; margin: 0; pointer-events: none;
  box-shadow: 8px 12px 0 rgba(58, 42, 23, .45); cursor: grabbing; transition: none;
}

/* balão de fala e carimbo */
.bubble {
  position: fixed; z-index: 46; left: 50%; top: calc(76px + var(--safe-t));
  width: max-content; max-width: min(560px, calc(100% - 32px));
  transform: translate(-50%, -10px) scale(.9); opacity: 0; pointer-events: none;
  padding: 8px 20px 10px; background: var(--paper); border: 3px solid var(--ink); border-radius: 22px;
  box-shadow: 4px 4px 0 var(--ink);
  font-family: var(--display); font-weight: 800; font-size: clamp(20px, 4vw, 30px); text-align: center;
  transition: opacity .2s ease, transform .25s cubic-bezier(.3, 1.4, .5, 1);
}
.bubble.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
.stamp {
  position: fixed; z-index: 55; left: 50%; top: 24%; pointer-events: none; opacity: 0;
  font-family: var(--display); font-weight: 800; font-size: clamp(56px, 14vw, 120px); line-height: 1; white-space: nowrap;
  -webkit-text-stroke: 5px var(--ink); paint-order: stroke fill; text-shadow: 6px 6px 0 var(--ink);
  transform: translate(-50%, -50%) rotate(var(--rot, -10deg)) scale(3);
}
.stamp.go { animation: stamp 1.3s cubic-bezier(.2, 1.3, .4, 1) both; }
@keyframes stamp {
  0% { opacity: 0; transform: translate(-50%, -50%) rotate(var(--rot)) scale(3); }
  18% { opacity: 1; transform: translate(-50%, -50%) rotate(var(--rot)) scale(.92); }
  28% { transform: translate(-50%, -50%) rotate(var(--rot)) scale(1.04); }
  75% { opacity: 1; transform: translate(-50%, -50%) rotate(var(--rot)) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) rotate(var(--rot)) scale(1.1); }
}

/* fim de rodada e de faixa */
.party h1 { font-size: clamp(34px, 7vw, 52px); }
.medal { display: flex; gap: 6px; font-family: var(--emoji); font-size: 48px; line-height: 1; }
.medal span { animation: jump 1s cubic-bezier(.3, 1.4, .5, 1) both; }
.medal span:nth-child(2) { animation-delay: .15s; font-size: 62px; }
.medal span:nth-child(3) { animation-delay: .3s; }
@keyframes jump { from { transform: translateY(30px) scale(0) rotate(-40deg); } }
.trophy { font-family: var(--emoji); font-size: 84px; line-height: 1; animation: jump 1s cubic-bezier(.3, 1.4, .5, 1) both, wiggle 2s 1s ease-in-out infinite; }
@keyframes wiggle { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }
.ask { margin: 0; font-family: var(--display); font-weight: 800; font-size: 26px; }

/* continha para adultos */
.gate-out {
  display: block; min-width: 140px; min-height: 58px; padding: 6px 14px;
  font-family: var(--display); font-weight: 800; font-size: 40px; line-height: 1.2;
  background: #fff; border: 3px solid var(--ink); border-radius: 14px;
}
.gate.bad { animation: nope .45s ease; }
.keypad { display: grid; grid-template-columns: repeat(3, 72px); gap: 10px; }
.keypad button {
  height: 64px; border-radius: 16px; background: #fff; border: 3px solid var(--ink); box-shadow: 3px 3px 0 var(--ink);
  font-family: var(--display); font-weight: 800; font-size: 28px;
}
.keypad button.ok { background: var(--leaf); }
.keypad button:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }

/* tela de som */
.sliders { display: grid; gap: 14px; width: 100%; }
.slider { display: grid; grid-template-columns: 90px 1fr auto; gap: 12px; align-items: center; text-align: left; }
.slider label { font-weight: 900; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; background: transparent; touch-action: pan-y; }
input[type="range"]::-webkit-slider-runnable-track { height: 14px; border-radius: 999px; background: linear-gradient(90deg, var(--pink) var(--p, 50%), #fff var(--p, 50%)); border: 3px solid var(--ink); }
input[type="range"]::-moz-range-track { height: 8px; border-radius: 999px; background: #fff; border: 3px solid var(--ink); }
input[type="range"]::-moz-range-progress { height: 8px; border-radius: 999px; background: var(--pink); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 34px; height: 34px; margin-top: -13px; border-radius: 50%; background: var(--y); border: 3px solid var(--ink); box-shadow: 2px 2px 0 var(--ink); }
input[type="range"]::-moz-range-thumb { width: 28px; height: 28px; border-radius: 50%; background: var(--y); border: 3px solid var(--ink); }

/* ---------- área dos pais e "Como funciona" ---------- */
.page { width: min(980px, 100%); display: grid; gap: 18px; padding-bottom: 40px; text-align: left; }
.page-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.page-head h1 {
  display: inline-block; background: var(--ink); color: var(--y); padding: 4px 18px 6px; border-radius: 14px;
  transform: rotate(-1.5deg); font-size: clamp(28px, 6vw, 40px);
}
.pais-perfil { display: flex; gap: 10px; align-items: center; font-weight: 900; }
select {
  font-weight: 800; padding: 8px 12px; min-height: 46px; border: 3px solid var(--ink); border-radius: 12px; background: #fff;
}
.tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.tabs button {
  padding: 8px 14px; min-height: 46px; font-weight: 900; background: #fff;
  border: 3px solid var(--ink); border-radius: 12px; box-shadow: 3px 3px 0 var(--ink);
}
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--y); box-shadow: none; transform: translate(2px, 2px); }
.tab-body { display: grid; gap: 18px; }
.card-box {
  background: var(--paper); border: 3px solid var(--ink); border-radius: 18px; box-shadow: 5px 5px 0 var(--ink);
  padding: 16px 18px; display: grid; gap: 10px; min-width: 0;
}
.card-box h2 { font-size: 26px; }
.card-box h3 { margin: 0; font-size: 18px; font-weight: 900; }
.card-box p { margin: 0; max-width: 75ch; }
.card-box ul { margin: 0; padding-left: 22px; display: grid; gap: 6px; max-width: 75ch; }
.method .lead { margin: 0; font-size: 20px; font-weight: 800; max-width: 70ch; }
.method .benefit { background: #ddf7e6; border-radius: 10px; padding: 8px 12px; }
.method .levels { list-style: none; padding: 0; }
.method .levels li { padding: 6px 10px; background: #fff; border: 2px solid rgba(58, 42, 23, .2); border-radius: 10px; }
.refs { font-size: 15px; }
.method section { scroll-margin-top: 90px; }
.table-wrap { overflow-x: auto; }
.dose { border-collapse: collapse; width: 100%; max-width: 75ch; font-size: 16px; background: #fff; border: 2px solid rgba(58, 42, 23, .25); border-radius: 10px; }
.dose th, .dose td { padding: 7px 10px; text-align: left; border-bottom: 1px solid rgba(58, 42, 23, .15); }
.dose th { font-weight: 900; background: #fff6c8; }
.dose td:first-child { font-weight: 900; white-space: nowrap; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filters button {
  padding: 6px 12px; min-height: 42px; font-weight: 900; background: #fff; border: 2px solid var(--ink); border-radius: 999px;
}
.filters button[aria-pressed="true"] { background: var(--y); }

.list { display: grid; gap: 8px; }
.row {
  display: grid; grid-template-columns: auto 1fr auto; gap: 4px 12px; align-items: center;
  padding: 10px 12px; background: #fff; border: 2px solid rgba(58, 42, 23, .25); border-radius: 12px;
}
.row .st { font-family: var(--emoji); font-size: 22px; width: 30px; text-align: center; }
.row .info { display: grid; gap: 2px; min-width: 0; }
.row .info b { font-weight: 900; }
.row .info span { font-size: 15px; opacity: .8; }
.row.done { background: #f0fff4; }
.row.kid .inline { justify-content: flex-end; }
.empty-msg { margin: 0; padding: 14px; text-align: center; font-weight: 800; opacity: .75; }
.settings { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field > span { font-weight: 900; }
.field input[type="text"] { padding: 8px 12px; min-height: 46px; border: 3px solid var(--ink); border-radius: 12px; background: #fff; font-weight: 800; max-width: 320px; }
.inline { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.ok-msg { background: #ddf7e6; border-radius: 10px; padding: 8px 12px; font-weight: 800; }
.danger-zone { border-color: var(--red); box-shadow: 5px 5px 0 var(--red); }

/* gráficos */
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .ax { font: 800 12px var(--body); fill: var(--ink); fill-opacity: .7; }
.chart .rl { font: 800 13px var(--body); fill: var(--ink); }
.chart .hit { cursor: pointer; outline: none; }
.chart .hit:focus-visible { stroke: var(--ink); stroke-width: 2; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; font-weight: 800; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.lk { display: inline-block; position: relative; width: 22px; height: 10px; }
.lk::before { content: ""; position: absolute; left: 0; right: 0; top: 4px; height: 2px; background: var(--c); }
.lk.dot::after, .lk.ring::after { content: ""; position: absolute; left: 6px; top: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.lk.ring::after { background: #fff; box-shadow: inset 0 0 0 2.5px var(--c); }
.lk.dot::before, .lk.ring::before { opacity: .5; }
.lk.thin::before { height: 1.5px; opacity: .5; }
/* forma do tipo (palavras = círculo, números = quadrado) e cor da língua (só a marca, sem linha) */
.lk.shape::before { display: none; }
.lk.shape::after { content: ""; position: absolute; left: 6px; top: 0; width: 10px; height: 10px; background: var(--c); }
.lk.shape.circle::after { border-radius: 50%; }
.lk.shape.square::after { border-radius: 2px; }
.lk.swatch::before { display: none; }
.lk.swatch::after { content: ""; position: absolute; left: 2px; top: -1px; width: 18px; height: 12px; border-radius: 4px; background: var(--c); }
.tt {
  position: absolute; z-index: 5; pointer-events: none; min-width: 150px;
  padding: 8px 10px; background: var(--paper); border: 2px solid var(--ink); border-radius: 10px; box-shadow: 3px 3px 0 var(--ink);
  font-size: 13px; font-weight: 700; line-height: 1.35;
}
.tt-v { display: flex; align-items: center; gap: 6px; font-size: 18px; }
.tt-v strong { font-weight: 900; }
.tt-k { display: inline-block; width: 12px; height: 3px; border-radius: 2px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.stat { padding: 6px 12px; border-radius: 12px; background: #fff; border: 2px solid rgba(58, 42, 23, .25); font-weight: 800; font-size: 15px; }
.stat b { font-family: var(--display); font-size: 22px; display: block; line-height: 1.1; }

/* ---------- hover só onde existe mouse ---------- */
@media (hover: hover) {
  .home-link:hover, .home-link:focus-visible { transform: translate(-1px, -2px); box-shadow: 4px 5px 0 var(--ink); outline: none; }
  .btn:not(:disabled):hover { transform: translate(-1px, -2px); box-shadow: 5px 6px 0 var(--ink); }
  .round-btn:hover, .profile:hover, .age:not([aria-checked="true"]):hover, .mode:not([aria-checked="true"]):hover {
    transform: translate(-1px, -2px); box-shadow: 4px 5px 0 var(--ink);
  }
  .chip:not(.used):not(.sel):hover { transform: translateY(-3px); box-shadow: 4px 7px 0 var(--ink); }
}

@media (max-width: 520px) {
  .panel { padding: 20px 14px 22px; }
  .age { min-width: 58px; height: 62px; font-size: 28px; }
  .mode { font-size: 15px; }
  .btn.big { font-size: 30px; }
  .slider { grid-template-columns: 66px 1fr auto; gap: 8px; }
  .slider .btn { padding: 4px 10px 6px; font-size: 16px; }
  .row { grid-template-columns: auto 1fr; }
  .row .btn { grid-column: 1 / -1; justify-self: start; }
  .row.kid .inline { grid-column: 1 / -1; justify-content: flex-start; }
  .row.kid .inline .btn { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .stamp { display: none; }
}
