.tetris-layout {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  justify-content: center;
}

.tetris-field {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  grid-template-rows: repeat(20, 1fr);
  width: min(70vw, 260px);
  height: calc(min(70vw, 260px) * 2);
  background: var(--surface-2);
  border: 2px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.tetris-cell {
  border: 0.5px solid rgba(0, 0, 0, 0.06);
}

.tetris-cell[data-c="I"] { background: #06b6d4; }
.tetris-cell[data-c="O"] { background: #eab308; }
.tetris-cell[data-c="T"] { background: #a855f7; }
.tetris-cell[data-c="S"] { background: #22c55e; }
.tetris-cell[data-c="Z"] { background: #ef4444; }
.tetris-cell[data-c="J"] { background: #3b82f6; }
.tetris-cell[data-c="L"] { background: #f97316; }

.tetris-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}

.stat-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  min-width: 120px;
}

.stat-block .label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.tetris-next {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, 1fr);
  width: 80px;
  height: 80px;
  gap: 2px;
  margin: 0 auto;
}

.tetris-next .tetris-cell {
  background: transparent;
}

.tetris-next .tetris-cell[data-c] {
  border-radius: 3px;
}

@media (max-width: 520px) {
  .tetris-layout {
    flex-direction: column;
    align-items: center;
  }
  .tetris-side {
    flex-direction: row;
    align-items: center;
  }
}

.tetris-pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: min(70vw, 260px);
  margin: 16px auto 0;
}

.pad-btn {
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1;
  padding: 14px 0;
  touch-action: manipulation;
  transition: background 0.15s ease, transform 0.1s ease;
}

.pad-btn.pad-wide {
  grid-column: span 1;
}

.pad-btn:nth-child(4) { grid-column: 1; }
.pad-btn:nth-child(5) { grid-column: span 2; }

.pad-btn:hover {
  background: color-mix(in srgb, var(--primary) 20%, var(--surface-2));
}

.pad-btn:active {
  transform: scale(0.94);
}

@media (max-width: 480px) {
  .tetris-pad { gap: 5px; width: min(88vw, 340px); }
  .pad-btn { font-size: 1.05rem; padding: 14px 0; }
}
