/* Jogo da Velha: grade desenhada a traço sobre papel, X e O animados, linha da vitória riscada */
.jv-quadro { position: relative; width: min(420px, 84vw); aspect-ratio: 1; border-radius: 14px; padding: 4%;
  background: radial-gradient(ellipse at 30% 20%, #fffdf6, #f3ead6); box-shadow: var(--sombra), inset 0 0 0 1px rgba(0,0,0,.06); }
.jv-grade { position: absolute; inset: 4%; pointer-events: none; }
.jv-grade path { stroke: #5a3a24; stroke-width: 2.4; stroke-linecap: round; fill: none; }
.jv-casas { position: absolute; inset: 4%; display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); }
.jv-casa { position: relative; border: 0; background: transparent; cursor: pointer; padding: 12%; border-radius: 12px; }
.jv-casa:hover:not(:disabled) { background: rgba(122, 59, 46, .06); }
.jv-casa:disabled { cursor: default; }
.jv-casa:focus-visible { outline: 3px solid #2b6cb0; outline-offset: -4px; }
.jv-casa.dica { background: rgba(47, 158, 87, .16); box-shadow: inset 0 0 0 3px #2f9e57; }
.jv-casa svg { width: 100%; height: 100%; overflow: visible; }
.jv-x path { stroke: #c0392b; stroke-width: 9; stroke-linecap: round; fill: none; stroke-dasharray: 100; animation: jv-traco .28s ease-out both; }
.jv-x path + path { animation-delay: .16s; }
.jv-o circle { stroke: #2f6db3; stroke-width: 9; fill: none; stroke-dasharray: 260; animation: jv-traco-o .4s ease-out both; transform: rotate(-90deg); transform-origin: 50% 50%; }
@keyframes jv-traco { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }
@keyframes jv-traco-o { from { stroke-dashoffset: 260; } to { stroke-dashoffset: 0; } }
.jv-risco { position: absolute; inset: 4%; pointer-events: none; overflow: visible; }
.jv-risco line { stroke: #2b2620; stroke-width: 1.6; stroke-linecap: round; stroke-dasharray: 5; animation: jv-traco-l .5s ease-out both; }
@keyframes jv-traco-l { from { stroke-dashoffset: 5; } to { stroke-dashoffset: 0; } }
.jv-placar { grid-template-columns: repeat(3, 1fr); }
.jv-vez { display: flex; gap: .6rem; justify-content: center; font-family: var(--sans); font-size: .9rem; }
.jv-vez span { padding: .25rem .8rem; border-radius: 999px; border: 1px solid var(--fio); background: var(--papel); }
.jv-vez span.ativo { border-color: var(--realce); box-shadow: 0 0 0 2px rgba(122,59,46,.18); font-weight: 600; }
.jv-vez .x { color: #c0392b; } .jv-vez .o { color: #2f6db3; }

/* mini do tutorial */
.xz-mini.jv-mini { display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); width: 180px; border: 0; background: #fbf4e4; border-radius: 10px; padding: 8px; gap: 3px; }
.xz-mini.jv-mini div { background: #fffdf6; border-radius: 6px; font: 700 1.8rem Georgia, serif; }
.xz-mini.jv-mini div.x { color: #c0392b; } .xz-mini.jv-mini div.o { color: #2f6db3; }
.xz-mini.jv-mini div.alvo { box-shadow: inset 0 0 0 3px #2f9e57; background: rgba(47,158,87,.12); }
.xz-mini.jv-mini div.linha { background: #ffe08a; }

/* tela cheia: cresce até caber na largura e na altura que sobra abaixo da barra */
body.tc .jv-quadro { width: min(92vw, calc(var(--tc-alto, 700px) - 130px), 640px); }
