/* Trilha: tabuleiro de madeira com linhas, pontos e pedras desenhadas em CSS */
.tr-tabuleiro { position: relative; width: min(520px, 84vw); aspect-ratio: 1; border-radius: 6px;
  background: radial-gradient(ellipse at 30% 20%, #f3e2c0, #e4c99a 70%, #d8b985); }
.tr-linhas { position: absolute; overflow: visible; pointer-events: none; }
.tr-linhas rect, .tr-linhas line { fill: none; stroke: #5a3a24; stroke-width: 4px; vector-effect: non-scaling-stroke; stroke-linecap: square; }

.tr-ponto { position: absolute; width: 11.5%; aspect-ratio: 1; transform: translate(-50%, -50%); border: 0; padding: 0; margin: 0;
  border-radius: 50%; background: transparent; cursor: pointer; display: grid; place-items: center; font: inherit; }
.tr-ponto::before { content: ""; position: absolute; width: 26%; height: 26%; border-radius: 50%; background: #5a3a24; }
.tr-ponto:focus-visible { outline: 3px solid #2b6cb0; outline-offset: 2px; }
.tr-ponto:disabled { cursor: default; }
.tr-ponto.livre:hover::before { width: 40%; height: 40%; background: rgba(47, 158, 87, .7); }
.tr-ponto.ultimo { box-shadow: 0 0 0 4px rgba(255, 196, 0, .75); }
.tr-ponto.tirou::after { content: ""; position: absolute; inset: 12%; border-radius: 50%; border: 3px dashed rgba(200, 40, 40, .75); }
.tr-ponto.dica { box-shadow: 0 0 0 4px #2f9e57, 0 0 14px rgba(47, 158, 87, .7); }
.tr-ponto .alvo { position: absolute; width: 36%; height: 36%; border-radius: 50%; background: rgba(47, 158, 87, .8); pointer-events: none; z-index: 1; }

.tr-ponto .pedra { width: 88%; height: 88%; border-radius: 50%; position: relative; pointer-events: none; transition: transform .15s; z-index: 1; }
.pedra.w { background: radial-gradient(circle at 35% 30%, #fffdf6, #e9dcc3 60%, #cbb894); box-shadow: 0 3px 0 #9c8763, 0 5px 8px rgba(0,0,0,.35), inset 0 0 0 3px rgba(0,0,0,.08); }
.pedra.b { background: radial-gradient(circle at 35% 30%, #6b4a3a, #3a2418 60%, #1f120b); box-shadow: 0 3px 0 #0d0704, 0 5px 8px rgba(0,0,0,.45), inset 0 0 0 3px rgba(255,255,255,.07); }
.pedra::after { content: ""; position: absolute; inset: 20%; border-radius: 50%; border: 2px solid rgba(0,0,0,.12); }
.pedra.b::after { border-color: rgba(255,255,255,.12); }
.tr-ponto.selecionada .pedra { transform: scale(1.12) translateY(-2px); box-shadow: 0 0 0 3px #4a90e2, 0 6px 10px rgba(0,0,0,.4); }
.tr-ponto.pode-mover .pedra { box-shadow: 0 0 0 3px #2f9e57, 0 5px 8px rgba(0,0,0,.35); }
.tr-ponto.previa .pedra { opacity: .8; }
.tr-ponto.removivel .pedra { box-shadow: 0 0 0 3px #d33, 0 0 12px rgba(220, 50, 50, .8); animation: tr-pulsar 1s infinite alternate; }
@keyframes tr-pulsar { to { transform: scale(1.08); } }

.tr-coord { position: absolute; font-family: var(--sans); font-size: .66rem; font-weight: 700; color: #7a5638; pointer-events: none; transform: translate(-50%, -50%); }
.tr-coord.letra { bottom: -2px; transform: translateX(-50%); }
.tr-coord.numero { left: 2px; transform: translateY(-50%); }

.tr-contagem { min-height: 1.6rem; display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .5rem; font-family: var(--sans); font-size: .85rem; color: var(--tinta-suave); }
.tr-mao { display: inline-flex; gap: 2px; }
.mini-pedra { width: .9rem; height: .9rem; border-radius: 50%; display: inline-block; }
.mini-pedra.w { background: #e9dcc3; border: 1px solid #9c8763; }
.mini-pedra.b { background: #3a2418; border: 1px solid #1f120b; }

/* mini-tabuleiro do tutorial */
.xz-mini.tr-mini { display: block; position: relative; border: 5px solid #5a3a24; background: radial-gradient(ellipse at 30% 20%, #f3e2c0, #e4c99a 70%, #d8b985); }
.tr-mini .tr-linhas rect, .tr-mini .tr-linhas line { stroke-width: 2.5px; }
.tr-mini .tr-ponto { cursor: default; }
.tr-mini .tr-ponto.captura::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 3px solid #d33; z-index: 2; }
.tr-mini .tr-ponto.destaque { box-shadow: 0 0 0 3px rgba(255, 196, 0, .85); }

/* tela cheia: cresce até caber na largura e na altura que sobra abaixo da barra */
body.tc .tr-tabuleiro { width: min(92vw, calc(var(--tc-alto, 700px) - 175px), 720px); }
