/* Tutorial da primeira fase (js/tutorial.js): escurecido com buracos (máscara SVG), brilho nos alvos, mãozinha e cartão */
#tut-layer { position: fixed; inset: 0; z-index: 90; pointer-events: none; display: none; }
#tut-layer.show { display: block; }
#tut-svg { position: absolute; left: 0; top: 0; pointer-events: none; animation: tut-in 0.3s ease-out; }
.tut-glow-rect { stroke: #ffe28a; stroke-width: 3; animation: tut-pulse 0.9s ease-in-out infinite alternate; }
@keyframes tut-in { from { opacity: 0; } }
@keyframes tut-pulse { from { stroke-opacity: 0.5; stroke-width: 2.5; } to { stroke-opacity: 1; stroke-width: 4.5; } }

/* casas bloqueadas do passo "Ele bloqueia casas": um ✕ de mentira que pulsa */
.cell.tut-ghost::before {
  content: "✕";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: calc(var(--tile) * 0.5);
  font-weight: 800;
  color: #fff;
  text-shadow: 0 0 6px rgba(0, 0, 0, 0.45);
  animation: tut-ghost 0.9s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes tut-ghost { from { opacity: 0.35; transform: scale(0.8); } to { opacity: 0.95; transform: scale(1.05); } }

/* mão (Twemoji 👆, CC-BY 4.0) e os resultados de mentira que aparecem quando o dedo encosta */
#tut-hand { position: absolute; width: 46px; height: 46px; pointer-events: none; z-index: 3; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.45)); opacity: 0; }
#tut-hand[hidden] { display: none; }
#tut-hand svg { width: 100%; height: 100%; overflow: visible; }
#tut-demo { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.tut-ghost-x, .tut-ghost-fly { position: absolute; display: grid; place-items: center; opacity: 0; }
.tut-ghost-x .gx { position: relative; display: block; width: 58%; height: 58%; }
.tut-ghost-x .gx::before, .tut-ghost-x .gx::after { content: ""; position: absolute; left: 50%; top: 50%; width: 110%; height: 26%; background: #fff; border-radius: 999px; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.3); transform: translate(-50%, -50%) rotate(45deg); }
.tut-ghost-x .gx::after { transform: translate(-50%, -50%) rotate(-45deg); }
.tut-ghost-fly .mark-cat { animation: none; }

/* cartão */
#tut-card {
  position: absolute;
  left: 0; right: 0;
  margin: 0 auto;
  width: min(92vw, 400px);
  padding: 14px 16px 12px;
  border-radius: 22px;
  background: #fff;
  color: var(--text);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4), 0 4px 0 #e0a82e;
  pointer-events: auto;
  text-align: center;
}
#tut-card.pop { animation: tut-pop 0.4s cubic-bezier(0.3, 1.5, 0.5, 1); }
@keyframes tut-pop { from { transform: scale(0.9); opacity: 0; } }
#tut-title { margin: 0 0 4px; font-family: var(--font-title); font-size: 1.25rem; color: var(--accent-dark); }
#tut-text { margin: 0 0 8px; font-size: 1rem; line-height: 1.35; }
#tut-note { margin: 0 0 8px; padding: 6px 10px; border-radius: 12px; background: #fff3d6; color: #7a4a06; font-weight: 700; font-size: 0.92rem; }
#tut-note[hidden] { display: none; }
.tut-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 36px; }
.tut-skip { border: 0; background: none; color: var(--muted); font: inherit; font-weight: 700; padding: 6px 8px; cursor: pointer; }
.tut-skip[hidden], #tut-next[hidden] { display: none; }
#tut-dots { display: flex; gap: 5px; align-items: center; flex: 1; justify-content: center; }
#tut-dots i { width: 8px; height: 8px; border-radius: 50%; background: #e2cfc6; }
#tut-dots i.done { background: #f2b705; }
#tut-dots i.now { background: var(--accent); transform: scale(1.35); }

@media (prefers-reduced-motion: reduce) {
  #tut-svg, .tut-glow-rect, .cell.tut-ghost::before, #tut-card.pop { animation: none; }
  #tut-hand, .tut-ghost-x, .tut-ghost-fly { opacity: 0.95; }
  .cell.tut-ghost::before { opacity: 0.9; }
}
