*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f5f0eb;
  color: #2c2c2a;
  padding: 32px 16px;
}

.page-header {
  max-width: 900px;
  margin: 0 auto 32px;
}

.page-header h1 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 6px;
}

.page-header p {
  font-size: 14px;
  color: #6b6966;
}

section {
  max-width: 900px;
  margin: 0 auto 40px;
}

section h2 {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6b6966;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid #ddd9d0;
}

/* Piece cards */
.piece-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.piece-card {
  background: #fff;
  border: 1px solid #e0ddd5;
  border-radius: 10px;
  padding: 14px 16px;
}

.piece-name {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 2px;
}

.piece-sub {
  font-size: 11px;
  color: #9b9895;
  margin-bottom: 12px;
}

.layer-row {
  display: flex;
  gap: 20px;
}

.layer-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.layer-label {
  font-size: 10px;
  color: #b0ada6;
}

/* Voxel grid */
.voxel-grid {
  display: grid;
  grid-template-columns: repeat(5, 16px);
  grid-template-rows: repeat(5, 16px);
  gap: 2px;
}

.cell {
  width: 16px;
  height: 16px;
  border-radius: 2px;
  background: #eeece6;
}

/* Solution grids */
.solution-pair {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin-bottom: 28px;
}

.solution-layer {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.solution-layer-label {
  font-size: 11px;
  color: #9b9895;
  font-weight: 500;
}

.solution-grid {
  display: grid;
  grid-template-columns: repeat(5, 28px);
  grid-template-rows: repeat(5, 28px);
  gap: 3px;
}

.solution-cell {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,0.85);
}

.solution-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  color: #2c2c2a;
}

.solution-block {
  background: #fff;
  border: 1px solid #e0ddd5;
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 16px;
}

/* Legend */
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #5f5e5a;
}

.legend-swatch {
  width: 14px;
  height: 14px;
  border-radius: 3px;
}
