/* Tic-tac-toe — local only */

.ttt-layout {
  display: grid;
  gap: 1.15rem;
  margin-top: 0.35rem;
  justify-items: center;
}

.ttt-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(4.5rem, 1fr));
  gap: 8px;
  width: 100%;
  max-width: 17rem;
  padding: 4px;
}

.ttt-cell {
  aspect-ratio: 1;
  border-radius: 0.55rem;
  border: 2px solid var(--border);
  background: var(--surface);
  font-size: clamp(1.75rem, 8vw, 2.35rem);
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, transform 120ms ease;
  color: var(--text);
  font-family: inherit;
}

.ttt-cell:hover:not(:disabled) {
  border-color: rgba(37, 99, 235, 0.4);
  background: rgba(37, 99, 235, 0.04);
}

.ttt-cell:focus-visible {
  outline: none;
  box-shadow: var(--ring-offset, 0 0 0 2px var(--surface)), var(--ring, 0 0 0 3px rgba(37, 99, 235, 0.35));
}

.ttt-cell:disabled {
  cursor: default;
  opacity: 1;
}

.ttt-cell--x {
  color: #2563eb;
}

.ttt-cell--o {
  color: #dc2626;
}

.ttt-cell--win {
  background: rgba(22, 163, 74, 0.12);
  border-color: rgba(22, 163, 74, 0.45);
}

.ttt-status {
  min-height: 1.5em;
  font-size: 0.95rem;
  font-weight: 700;
  text-align: center;
  color: var(--text);
}

.ttt-sub {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  text-align: center;
  max-width: 28rem;
}

.ttt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}
