/* Word game board: 5x5 tiles. The player's own key shows as a thin mark under a tile. */

.clue-bar {
  display: flex; align-items: center; gap: var(--s3);
  padding: var(--s3) var(--s4);
  margin-bottom: var(--s4);
  background: var(--surface);
  border-radius: var(--r-l);
  box-shadow: var(--shadow-1);
}
.clue-bar .who { font-size: var(--fs-xs); color: var(--text-2); font-weight: 550; }
.clue-bar .clue { font-size: var(--fs-l); font-weight: 700; letter-spacing: -0.02em; }
.clue-bar .n {
  min-width: 32px; height: 32px; padding: 0 8px;
  border-radius: var(--r-full);
  display: grid; place-items: center;
  background: var(--accent); color: var(--on-accent);
  font-weight: 700; font-variant-numeric: tabular-nums;
}

.turns { display: flex; gap: 5px; align-items: center; }
.turns i { width: 7px; height: 7px; border-radius: 50%; background: var(--surface-3); }
.turns i.used { background: var(--text); }

.words {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}
.wtile {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--tile);
  color: var(--tile-text);
  border-radius: 10px;
  box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line);
  display: grid; place-items: center;
  padding: 2px;
  font-size: clamp(10px, 2.9vw, 14px);
  font-weight: 600;
  letter-spacing: -0.01em;
  text-align: center;
  line-height: 1.1;
  overflow-wrap: anywhere;
  hyphens: auto;
  transition: background var(--t) var(--ease), color var(--t) var(--ease), transform var(--t-fast) var(--ease);
}
.wtile:active { transform: scale(0.96); }
/* my key: targets my partner must find (green bar), traps (dark bar) */
.wtile.k-target::after,
.wtile.k-trap::after {
  content: ""; position: absolute; left: 22%; right: 22%; bottom: 5px;
  height: 3px; border-radius: 2px;
}
.wtile.k-target::after { background: var(--good); }
.wtile.k-trap::after { background: var(--text); }
/* revealed states */
.wtile.found { background: var(--good-bg); color: var(--good); box-shadow: none; }
.wtile.found::after { display: none; }
.wtile.miss { background: var(--surface-2); color: var(--text-3); box-shadow: none; }
.wtile.trap { background: var(--text); color: var(--bg); box-shadow: none; }
.wtile.pick { box-shadow: inset 0 0 0 2.5px var(--text); }

.legend { display: flex; gap: var(--s4); justify-content: center; margin-top: var(--s4); font-size: var(--fs-xs); color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }

.found-count { font-size: var(--fs-s); color: var(--text-2); }
.found-count b { color: var(--text); font-variant-numeric: tabular-nums; }
