/* Tetris — arcade (design/Jeu - Tetris). The 10×20 well and its side panel sit on
   the shared arcade surface: a warm deep-ink band, the same in light and dark.
   Score / lines / level live in the page header (taken over by the game); the
   touch controls and keyboard hint sit below the band. Scoped under .gtet-root. */

.gtet-root { display: flex; flex-direction: column; align-items: center; gap: var(--space-3); inline-size: 100%; color: var(--color-text); user-select: none; -webkit-user-select: none; }

.gtet-band {
  inline-size: 100%; box-sizing: border-box;
  background: #211d19; border-block: 1px solid #12100d;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
  padding: var(--space-4); display: flex; justify-content: center;
}
.gtet-play { display: flex; gap: var(--space-4); align-items: flex-start; justify-content: center; inline-size: 100%; max-inline-size: 520px; }

.gtet-stage { position: relative; line-height: 0; flex: 1 1 auto; min-inline-size: 0; }
.gtet-board { display: block; inline-size: 100%; block-size: auto; touch-action: none; }
.gtet-overlay {
  position: absolute; inset: 0; display: none; flex-direction: column;
  align-items: center; justify-content: center; gap: var(--space-3);
  background: rgba(18, 16, 13, 0.6); text-align: center; padding: 16px;
}
.gtet-overlay.show { display: flex; }
.gtet-ov-text { font-family: var(--font-heading); font-weight: 600; font-size: clamp(1.1rem, 4vw, 1.5rem); color: var(--color-accent-400); line-height: 1.2; }

/* Side panel on the band: next piece + pause. */
.gtet-side { display: flex; flex-direction: column; gap: var(--space-3); inline-size: 116px; flex: none; }
.gtet-next { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; border: 1px solid rgba(242, 239, 230, 0.16); border-radius: var(--radius-sm); padding: 8px; }
.gtet-nextcv { inline-size: 96px; block-size: 96px; }
.gtet-label { font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(242, 239, 230, 0.66); }

.gtet-primary, .gtet-pause {
  font: inherit; font-family: var(--font-heading); font-weight: 600; cursor: pointer;
  min-block-size: 46px; padding: 0 16px; border-radius: var(--radius-md); box-sizing: border-box;
  border: 1px solid var(--color-accent-400); background: transparent; color: var(--color-accent-400);
}
.gtet-primary { background: var(--color-accent-400); color: #211d19; }
.gtet-pause { inline-size: 100%; }
.gtet-primary:active, .gtet-pause:active { transform: translateY(1px); }

/* Touch controls + hint below the band, on the page ground (theme-following). */
.gtet-touch { inline-size: 100%; max-inline-size: 360px; display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-2); }
.gtet-tb {
  font: inherit; font-size: 1.2rem; cursor: pointer; min-block-size: 52px; box-sizing: border-box;
  border: 1px solid var(--color-neutral-400); border-radius: var(--radius-md);
  background: transparent; color: var(--color-neutral-800); touch-action: manipulation;
}
.gtet-tb:hover { background: color-mix(in srgb, var(--color-text) 5%, transparent); }
.gtet-tb:active { transform: translateY(1px); }
.gtet-tb-wide { grid-column: span 4; }
:root[data-theme="dark"] .gtet-tb { color: #d7d3d3; border-color: #56514b; }

.gtet-hint { text-align: center; font-size: 12px; color: var(--color-neutral-600); max-inline-size: 520px; }
.lz-variants.gtet-inline { margin: 0; }

@media (prefers-reduced-motion: reduce) { .gtet-primary:active, .gtet-pause:active, .gtet-tb:active { transform: none; } }
