:root {
  /* Paleta lúdica mas calma — pastel saturado, não neon; baixa estimulação */
  --bg: #eef3f7;
  --surface: #ffffff;
  --surface-2: #f3f7fa;
  --ink: #2b3a45;
  --ink-soft: #5b6b76;
  --accent: #5b9bd5;
  --accent-deep: #3f7ab8;
  --accent-soft: #d6e6f5;
  --good: #6bbf8a;
  --good-deep: #4a9668;
  --line: #dbe4ea;
  --shadow: 0 4px 16px rgba(43, 58, 69, 0.08);
  --font-display: "Fredoka", "Segoe UI", system-ui, -apple-system, sans-serif;

  /* Ball colors (colorblind-aware + number labels for redundancy) */
  --ball-1: #e8743b; /* orange */
  --ball-2: #4e9f7d; /* teal-green */
  --ball-3: #6a8ed4; /* blue */
  --ball-4: #b06fb0; /* purple */
  --radius: 22px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
}

body {
  position: relative;
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", sans-serif;
  background: linear-gradient(165deg, #eaf3fb 0%, #eef7f1 55%, #fdf4ec 100%);
  color: var(--ink);
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  overflow-x: hidden;
}

/* manchas coloridas decorativas, discretas, fixas atrás do conteúdo */
body::before, body::after {
  content: "";
  position: fixed;
  border-radius: 50%;
  z-index: -1;
  pointer-events: none;
  opacity: 0.6;
}
body::before {
  width: 440px; height: 440px; top: -180px; right: -160px;
  background: radial-gradient(circle, #cfe6fb 0%, rgba(207, 230, 251, 0) 70%);
}
body::after {
  width: 380px; height: 380px; bottom: -170px; left: -140px;
  background: radial-gradient(circle, #d9f0e0 0%, rgba(217, 240, 224, 0) 70%);
}

.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

/* ---------- Marca / logotipo ---------- */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  border: none;
  background: none;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 14px;
}
.brand:focus-visible { outline: 3px solid var(--accent-soft); }
.brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  font-size: 1.6rem;
  border-radius: 14px;
  background: linear-gradient(135deg, #eaf7ef, #eaf2fb);
  border: 1px solid var(--line);
  box-shadow: 0 2px 6px rgba(43, 58, 69, 0.10);
  animation: brand-breathe 4s ease-in-out infinite;
}
@keyframes brand-breathe {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.06) rotate(-2deg); }
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.brand-name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.2px;
  background: linear-gradient(135deg, #4e9f7d, #5b9bd5);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand-credit {
  position: fixed;
  right: 14px;
  bottom: 10px;
  font-size: 0.7rem;
  color: var(--ink-soft);
  opacity: 0.65;
  font-weight: 600;
  letter-spacing: 0.2px;
  pointer-events: none;
  z-index: 1;
}

.game-heading {
  font-family: var(--font-display);
  margin: 4px 0 18px;
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--ink);
}

.back-btn {
  border: none;
  background: var(--surface-2);
  color: var(--ink);
  font-size: 1rem;
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}
.back-btn:hover { background: var(--accent-soft); }
.back-btn:active { transform: scale(0.96); }

.sound-btn {
  margin-left: auto;
  border: none;
  background: var(--surface-2);
  color: var(--ink);
  font-size: 1.15rem;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}
.sound-btn:hover { background: var(--accent-soft); }
.sound-btn:active { transform: scale(0.92); }

.screen {
  max-width: 780px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}

/* ---------- Home ---------- */
.home-intro {
  color: var(--ink-soft);
  font-size: 1.08rem;
  margin: 4px 0 26px;
  line-height: 1.5;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
}

.game-grid .game-card:nth-child(1) { --card-bg: #eaf2ff; --card-border: #bcd6f0; --card-fg: #5b8fd8; }
.game-grid .game-card:nth-child(2) { --card-bg: #e8f8f0; --card-border: #bfe6d3; --card-fg: #3fa97e; }
.game-grid .game-card:nth-child(3) { --card-bg: #fff1e6; --card-border: #f6d9bf; --card-fg: #e8743b; }
.game-grid .game-card:nth-child(4) { --card-bg: #ffeaf1; --card-border: #f6c9da; --card-fg: #e2588f; }
.game-grid .game-card:nth-child(5) { --card-bg: #eafbe9; --card-border: #c9ecc4; --card-fg: #4e9f7d; }
.game-grid .game-card:nth-child(6) { --card-bg: #e6f9f7; --card-border: #bfe8e3; --card-fg: #2f9d94; }
.game-grid .game-card:nth-child(7) { --card-bg: #f3ecfb; --card-border: #ddc9f2; --card-fg: #8b6fd0; }
.game-grid .game-card:nth-child(8) { --card-bg: #eef1f4; --card-border: #d7dee3; --card-fg: #5b6b76; }
.game-grid .game-card:nth-child(n+9) { --card-bg: #eaf2ff; --card-border: #bcd6f0; --card-fg: #5b8fd8; }

.game-card {
  background: var(--card-bg, var(--surface));
  border: 2px solid var(--card-border, var(--line));
  border-radius: var(--radius);
  padding: 22px;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(43, 58, 69, 0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font: inherit;
  color: inherit;
}
.game-card:hover { transform: translateY(-4px) scale(1.015); box-shadow: 0 12px 24px rgba(43, 58, 69, 0.14); }
.game-card:active { transform: translateY(-1px) scale(0.99); }
.game-card[disabled] { opacity: 0.5; cursor: default; transform: none; box-shadow: var(--shadow); }
.game-card .emoji {
  width: 60px; height: 60px;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
  border-radius: 50%;
  background: var(--card-fg, var(--accent-soft));
  box-shadow: 0 3px 6px rgba(43, 58, 69, 0.15);
  transition: transform 0.18s ease;
}
.game-card:hover .emoji { transform: scale(1.1) rotate(-5deg); }
.game-card .title { font-family: var(--font-display); font-size: 1.22rem; font-weight: 600; color: var(--ink); }
.game-card .subtitle { color: var(--ink-soft); font-size: 0.95rem; }
.badge-soon {
  align-self: flex-start;
  font-size: 0.75rem;
  background: var(--surface-2);
  color: var(--ink-soft);
  padding: 3px 10px;
  border-radius: 999px;
}

/* ---------- Torre de Londres ---------- */
.tol-btn {
  font-family: var(--font-display);
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 4px 0 var(--accent-deep), 0 7px 12px rgba(43, 58, 69, 0.16);
  transition: transform 0.1s ease, box-shadow 0.1s ease, filter 0.15s ease;
}
.tol-btn:hover { filter: brightness(1.04); transform: translateY(-1px); }
.tol-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--accent-deep), 0 2px 4px rgba(43, 58, 69, 0.14); }
.tol-btn.secondary {
  background: var(--surface); color: var(--ink); border: 2px solid var(--line);
  box-shadow: 0 4px 0 var(--line), 0 6px 10px rgba(43, 58, 69, 0.08);
}
.tol-btn.secondary:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--line); }

.tol-stats {
  display: flex;
  gap: 22px;
  margin: 8px 0 18px;
  color: var(--ink-soft);
  font-size: 1.05rem;
}
.tol-stats b { color: var(--ink); font-size: 1.2rem; }

.tol-goal {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 18px;
}
.tol-goal .label { color: var(--ink-soft); font-size: 0.9rem; margin-bottom: 10px; }

.tol-board {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}

.pegs {
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  gap: 12px;
}
.pegs.mini { gap: 8px; }

.peg {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  flex: 1;
  cursor: pointer;
  padding-top: 6px;
}
.peg .post {
  position: absolute;
  bottom: 14px;
  width: 8px;
  background: var(--line);
  border-radius: 8px 8px 0 0;
  z-index: 0;
}
.peg .base {
  height: 14px;
  width: 100%;
  background: var(--ink-soft);
  border-radius: 8px;
  opacity: 0.85;
  transition: background 0.15s ease;
}
.peg .slots {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 6px;
  z-index: 1;
  min-height: 10px;
  margin-bottom: 6px;
}

.ball {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  font-weight: 700;
  box-shadow: inset 0 -3px 6px rgba(0,0,0,0.18), 0 2px 4px rgba(0,0,0,0.12);
  z-index: 1;
}
.ball.c1 { background: var(--ball-1); }
.ball.c2 { background: var(--ball-2); }
.ball.c3 { background: var(--ball-3); }
.ball.c4 { background: var(--ball-4); }

/* main board sizing (altura dos pinos é definida por capacidade no JS) */
.tol-board .ball { width: 58px; height: 58px; font-size: 1.4rem; }
.tol-board .peg { min-height: 220px; }

/* goal mini sizing */
.tol-goal .ball { width: 32px; height: 32px; font-size: 0.95rem; }
.tol-goal .peg { min-height: 124px; cursor: default; }

.peg.selected .post { background: var(--accent); }
.peg.lift .slots .ball:last-child {
  transform: translateY(-10px);
  box-shadow: inset 0 -3px 6px rgba(0,0,0,0.18), 0 8px 14px rgba(0,0,0,0.2);
}
.peg.hint-from { animation: nudge 0.9s ease infinite; }
.peg.hint-to .post { background: var(--good); }

.ball, .peg .slots .ball { transition: transform 0.18s ease, box-shadow 0.18s ease; }

@keyframes nudge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%,60% { transform: translateX(-6px); }
  40%,80% { transform: translateX(6px); }
}
.peg.invalid { animation: shake 0.35s ease; }

.tol-msg {
  margin-top: 16px;
  min-height: 28px;
  text-align: center;
  font-size: 1.1rem;
  color: var(--ink-soft);
}
.tol-msg.win { color: var(--good); font-weight: 700; font-size: 1.3rem; }

.stars { font-size: 1.6rem; letter-spacing: 4px; }

/* ---------- Modo Avaliação ---------- */
.aval-intro { display: flex; flex-direction: column; gap: 18px; max-width: 560px; }
.aval-text { color: var(--ink-soft); font-size: 1.05rem; margin: 0; line-height: 1.5; }
.aval-field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; color: var(--ink); }
.aval-input {
  font-size: 1.05rem; padding: 12px 14px; border-radius: 12px;
  border: 2px solid var(--line); background: var(--surface); color: var(--ink);
}
.aval-input:focus-visible { outline: none; border-color: var(--accent); }
.aval-intro .tol-btn { align-self: flex-start; }

.aval-progress { font-family: var(--font-display); font-weight: 600; color: var(--ink-soft); margin-bottom: 8px; }
.aval-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.tol-board.locked { pointer-events: none; opacity: 0.92; }

.aval-disclaimer {
  background: #fff7e6; border: 1px solid #f0d9a8; color: #6b5524;
  border-radius: var(--radius); padding: 14px 16px; font-size: 0.9rem; line-height: 1.5;
}

/* relatório */
.aval-report { display: flex; flex-direction: column; gap: 20px; }
.aval-report-head h3 { font-family: var(--font-display); margin: 0 0 8px; font-size: 1.5rem; font-weight: 600; }
.aval-meta { display: flex; flex-wrap: wrap; gap: 16px; color: var(--ink-soft); font-size: 0.95rem; }

.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.metric {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow);
}
.metric-value { font-family: var(--font-display); font-size: 1.9rem; font-weight: 700; color: var(--accent); line-height: 1; }
.metric-label { font-weight: 700; margin: 6px 0 4px; }
.metric-hint { font-size: 0.82rem; color: var(--ink-soft); line-height: 1.4; }

.aval-interpret {
  background: var(--surface-2); border-left: 4px solid var(--accent);
  border-radius: 10px; padding: 14px 16px; line-height: 1.5;
}

.aval-tbl { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.aval-tbl th, .aval-tbl td { padding: 8px 10px; text-align: center; border-bottom: 1px solid var(--line); }
.aval-tbl th { color: var(--ink-soft); font-weight: 700; }
.aval-tbl tbody tr:nth-child(even) { background: var(--surface-2); }

.aval-history h4 { margin: 0 0 8px; }

/* ---------- Padrões (matrizes visuais) ---------- */
.dots { display: flex; gap: 9px; justify-content: center; margin-bottom: 18px; }
.dot { width: 13px; height: 13px; border-radius: 50%; background: var(--line); transition: background 0.15s ease, transform 0.15s ease; }
.dot.done { background: var(--good); }
.dot.current { background: var(--accent); transform: scale(1.3); }

.matrix {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  max-width: 360px; margin: 0 auto 22px;
}
.matrix .cell {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center; padding: 8px;
  box-shadow: 0 2px 8px rgba(43, 58, 69, 0.06);
}
.matrix .cell.missing { border: 3px dashed var(--accent); background: var(--surface-2); box-shadow: none; }

.options {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  max-width: 420px; margin: 0 auto;
}
.opt {
  background: var(--surface); border: 2px solid var(--line); border-radius: 16px;
  aspect-ratio: 1; cursor: pointer; display: flex; align-items: center; justify-content: center;
  padding: 8px; transition: border-color 0.12s ease, background 0.12s ease, transform 0.12s ease, box-shadow 0.12s ease;
  box-shadow: 0 2px 8px rgba(43, 58, 69, 0.06);
}
.opt:hover { transform: translateY(-3px) scale(1.03); box-shadow: 0 6px 14px rgba(43, 58, 69, 0.12); }
.opt.selected { border-color: var(--accent); background: var(--accent-soft); }

.figure { width: 82%; height: 82%; display: block; }
.options .figure { width: 76%; height: 76%; }

.aval-actions { justify-content: center; }

/* ---------- Trilha (Trail Making) ---------- */
.trail-counter { color: var(--ink-soft); font-size: 0.92rem; margin-bottom: 10px; font-weight: 600; }

.trail-board {
  position: relative;
  width: 100%;
  max-width: 560px;
  aspect-ratio: 1;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.trail-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.trail-line { stroke: var(--accent); stroke-width: 2; stroke-linecap: round; }

.trail-node {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 3px solid var(--accent-soft);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(43, 58, 69, 0.15);
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
}
.trail-node:active { transform: translate(-50%, -50%) scale(0.94); }
.trail-node.visited { border-color: var(--good); background: var(--accent-soft); cursor: default; }
.trail-node.invalid { animation: shake 0.35s ease; }

.trail-flag {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  white-space: nowrap;
}
.trail-flag.end { top: auto; bottom: -20px; }

.trail-dots {
  display: flex; flex-wrap: wrap; align-content: center; justify-content: center;
  gap: 3px; width: 32px; height: 32px;
}
.trail-dot { width: 7px; height: 7px; border-radius: 50%; }
.trail-size-wrap { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; }
.trail-size-sq { background: var(--ink-soft); border-radius: 6px; }

/* ---------- Tangram ---------- */
.tangram-board-wrap { display: flex; justify-content: center; margin: 4px 0; }
.tangram-board {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: visible;
  touch-action: none;
}
.tan-target-shape { fill: #dbe4ea; stroke: none; }
.tan-divider { stroke: var(--line); stroke-width: 1.5; }
.tan-label { fill: var(--ink-soft); font-size: 12px; font-weight: 600; }

.tan-piece { cursor: grab; touch-action: none; }
.tan-shape {
  stroke: rgba(43, 58, 69, 0.22);
  stroke-width: 1.2;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 3px rgba(43, 58, 69, 0.18));
  transition: stroke 0.15s ease, stroke-width 0.15s ease;
}
/* manípulo de girar e botão de espelhar só aparecem na peça selecionada — evita
   que as hastes de todas as peças poluam a tela quando estão próximas */
.tan-handle-line, .tan-handle, .tan-flip {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease;
}
.tan-piece.active .tan-handle-line,
.tan-piece.active .tan-handle,
.tan-piece.active .tan-flip {
  opacity: 1;
  pointer-events: auto;
}
.tan-piece.active .tan-shape { stroke: var(--accent); stroke-width: 2.6; }
.tan-handle-line { stroke: var(--ink-soft); stroke-width: 1.4; }
.tan-handle {
  fill: var(--surface);
  stroke: var(--accent);
  stroke-width: 2.4;
  cursor: grab;
  touch-action: none;
}
.tan-flip circle { fill: var(--surface); stroke: var(--line); stroke-width: 1.4; cursor: pointer; }
.tan-flip text { font-size: 13px; fill: var(--ink-soft); cursor: pointer; user-select: none; }

/* relatório (área restrita) */
.tan-levels { display: flex; flex-direction: column; gap: 18px; }
.tan-level-box {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow);
}
.tan-level-title { font-weight: 700; margin-bottom: 10px; }
.tan-compare { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; }
.tan-thumb-box { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.tan-thumb-label { font-size: 0.82rem; color: var(--ink-soft); font-weight: 600; }
.tan-thumb { width: 170px; height: 170px; background: var(--surface-2); border-radius: 14px; }
.tan-final-shape { stroke: rgba(43, 58, 69, 0.22); stroke-width: 1; stroke-linejoin: round; }

/* ---------- Tela final neutra ---------- */
.end-screen {
  position: relative;
  text-align: center; max-width: 460px; margin: 40px auto 0;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.end-screen::before {
  content: "";
  position: absolute;
  top: -30px; left: 50%; transform: translateX(-50%);
  width: 220px; height: 220px;
  background: radial-gradient(circle, var(--accent-soft) 0%, rgba(214, 230, 245, 0) 72%);
  z-index: 0;
}
.end-emoji {
  position: relative; z-index: 1;
  font-size: 4.2rem;
  filter: drop-shadow(0 6px 10px rgba(43, 58, 69, 0.18));
  animation: end-bounce 1.8s ease-in-out infinite;
}
@keyframes end-bounce {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-8px) scale(1.05); }
}
.end-screen h3 { position: relative; z-index: 1; font-family: var(--font-display); margin: 0; font-size: 1.7rem; font-weight: 600; }
.end-screen p { position: relative; z-index: 1; }
.end-screen .tol-btn { position: relative; z-index: 1; }

/* ---------- PIN ---------- */
.pin-input { max-width: 260px; letter-spacing: 0.3em; }
.pin-err { color: #c0392b; min-height: 20px; font-weight: 600; }

/* ---------- Área da Psicopedagoga ---------- */
.analyst-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }

.patient-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.patient-card {
  display: flex; flex-direction: column; gap: 6px; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; cursor: pointer; box-shadow: var(--shadow); font: inherit; color: inherit;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.patient-card:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(43, 58, 69, 0.12); }
.patient-name { font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; }
.patient-count { color: var(--ink-soft); font-size: 0.9rem; }

.session-list { display: flex; flex-direction: column; gap: 10px; }
.session-row {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 16px; cursor: pointer; font: inherit; color: inherit; text-align: left;
  transition: border-color 0.12s ease;
}
.session-row:hover { border-color: var(--accent); }
.session-test { font-weight: 700; }
.session-date { color: var(--ink-soft); }
.session-sum { margin-left: auto; color: var(--accent); font-weight: 700; }

/* ---------- Descrever a figura ---------- */
.figure-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); max-width: 420px; margin: 0 auto 20px; padding: 10px;
  display: flex; align-items: center; justify-content: center; aspect-ratio: 6 / 5;
}
.figure-img {
  width: 100%; height: 100%; object-fit: contain; border-radius: calc(var(--radius) - 8px);
}

.mic-btn {
  display: block; margin: 0 auto; width: 96px; height: 96px; border-radius: 50%;
  border: none; background: var(--accent); color: #fff; font-size: 2.5rem; cursor: pointer;
  box-shadow: 0 4px 0 var(--accent-deep), 0 8px 14px rgba(43, 58, 69, 0.18);
  transition: transform 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
}
.mic-btn:hover { transform: scale(1.05); }
.mic-btn:active { transform: translateY(3px) scale(1.02); box-shadow: 0 1px 0 var(--accent-deep); }
.mic-btn.recording { background: #d9534f; box-shadow: 0 4px 0 #a83b38, 0 8px 14px rgba(43, 58, 69, 0.18); animation: pulse 1.1s ease infinite; }
.mic-timer { text-align: center; min-height: 24px; margin-top: 8px; color: #d9534f; font-weight: 700; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 4px 0 #a83b38, 0 0 0 0 rgba(217, 83, 79, 0.45); }
  50% { box-shadow: 0 4px 0 #a83b38, 0 0 0 14px rgba(217, 83, 79, 0); }
}

/* relatório de descrição (área restrita) */
.desc-list { display: flex; flex-direction: column; gap: 14px; }
.desc-item {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px;
}
.desc-fig { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 84px; }
.desc-img-thumb {
  width: 84px; height: 70px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line);
}
.desc-label { font-size: 0.78rem; color: var(--ink-soft); text-align: center; }
.desc-body { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.desc-transcript { margin: 0; font-size: 1.05rem; line-height: 1.5; }
.desc-body audio { width: 100%; max-width: 360px; }
.desc-audio-note { color: var(--ink-soft); font-size: 0.85rem; }

/* ---------- Perfil de Função Executiva (questionário do cuidador) ---------- */
.ef-scale-title { font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; margin: 0 0 4px; }
.ef-scale-hint { color: var(--ink-soft); font-size: 0.92rem; margin: 0 0 18px; line-height: 1.4; }

.ef-items { display: flex; flex-direction: column; max-width: 640px; }
.ef-item {
  display: flex; flex-direction: column; gap: 10px;
  padding: 16px 0; border-bottom: 1px solid var(--line);
}
.ef-item:last-child { border-bottom: none; }
.ef-item-text { margin: 0; font-size: 1.02rem; line-height: 1.45; }

.ef-opts { display: flex; gap: 10px; flex-wrap: wrap; }
.ef-opt {
  font-family: var(--font-display); font-weight: 600; font-size: 0.95rem;
  border: 2px solid var(--line); background: var(--surface); color: var(--ink);
  padding: 8px 16px; border-radius: 999px; cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease, color 0.12s ease, transform 0.1s ease;
}
.ef-opt:hover { border-color: var(--accent); transform: translateY(-1px); }
.ef-opt.selected { background: var(--accent); border-color: var(--accent-deep); color: #fff; }

.ef-tbl th:nth-child(3), .ef-tbl td.ef-text { text-align: left; }

@media print {
  .topbar, .no-print, .aval-actions { display: none !important; }
  body { background: #fff; }
  body::before, body::after { display: none !important; }
  .screen { max-width: none; }
  .metric, .aval-tbl, .aval-disclaimer { box-shadow: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, .peg.hint-from, .peg.invalid, .brand-mark, .end-emoji, .mic-btn.recording {
    animation: none !important; transition: none !important;
  }
}
