/* La Grille: three clubs across, three criteria down, nine boxes to fill like album slots. */

.gr-card {
  position: relative;
  padding: 20px 20px 22px;
  background: var(--card);
  border: 2px solid var(--ink);
  box-shadow: 6px 7px 0 rgba(23, 33, 60, 0.85);
}

.gr-help {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--ink-soft);
  text-align: center;
}

.gr-grid {
  display: grid;
  grid-template-columns: minmax(70px, 0.8fr) repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 16px;
}

.gr-head,
.gr-side {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 4px;
  min-height: 44px;
  font-family: 'Anton', Impact, sans-serif;
  font-size: 15px;
  line-height: 1.1;
  letter-spacing: 0.02em;
  text-align: center;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--cover);
  overflow-wrap: anywhere;
}

.gr-side {
  background: var(--cover-deep);
}

.gr-flag {
  color: var(--gold);
  font-size: 10px;
}

.gr-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 86px;
  padding: 6px 4px;
  font: inherit;
  text-align: center;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.35);
  border: 2px dashed var(--rule);
}

button.gr-cell {
  cursor: pointer;
}

.gr-feedback .ghost {
  margin-left: 6px;
  vertical-align: middle;
}

button.gr-cell:hover,
button.gr-cell:focus-visible {
  border-color: var(--ink);
}

.gr-cell.is-choice {
  border: 2px solid var(--ink);
  background: #fff6d6;
  box-shadow: 3px 3px 0 var(--ink);
  animation: gr-pulse 1s ease-in-out infinite alternate;
}

.gr-here {
  font-family: 'Anton', Impact, sans-serif;
  font-size: 18px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink);
}

.gr-cell.is-dim {
  opacity: 0.45;
}

.gr-plus {
  font-family: 'Anton', Impact, sans-serif;
  font-size: 26px;
  color: var(--rule);
}

@keyframes gr-pulse {
  to { background: #f6d97a; }
}

.gr-cell.is-found {
  border: 2px solid var(--ink);
  background: linear-gradient(135deg, #f7e6a8 0%, #fff8dc 45%, #e3c96a 100%);
  box-shadow: 2px 2px 0 var(--ink);
  animation: gr-stick 0.3s ease-out;
}

.gr-cell.is-revealed {
  border: 2px solid var(--red-strong);
  background: rgba(255, 253, 246, 0.9);
}

.gr-name {
  font-weight: 800;
  font-size: 13px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.gr-points,
.gr-possible {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.gr-cell.is-found .gr-points {
  color: var(--red-strong);
}

.gr-cell.is-revealed .gr-name {
  color: var(--red-strong);
}

@keyframes gr-stick {
  from { transform: scale(1.12) rotate(-3deg); opacity: 0; }
}

.gr-feedback {
  min-height: 18px;
  margin: 8px 0 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--red-strong);
}

.gr-card .tried {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 16px 0 0;
  padding: 0;
}

.gr-card .tried li {
  font-size: 13px;
  font-weight: 700;
  padding: 4px 10px;
  border: 2px solid currentColor;
  color: var(--red-strong);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

@media (max-width: 560px) {
  .gr-card {
    padding: 16px 10px 18px;
  }

  .gr-grid {
    grid-template-columns: minmax(56px, 0.7fr) repeat(3, 1fr);
    gap: 4px;
  }

  .gr-head,
  .gr-side {
    font-size: 12px;
  }

  .gr-cell {
    min-height: 74px;
  }

  .gr-name {
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gr-cell.is-found,
  .gr-cell.is-choice {
    animation: none;
  }
}
