*{box-sizing:border-box}
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  background: #f6f8fa;
  color:#111;
  margin:20px;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:12px;
}

h1{margin:0 0 6px 0;font-size:20px}

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

.board{
  display:grid;
  background: #e9eef2;
  padding:6px;
  border-radius:8px;
  box-shadow: 0 6px 18px rgba(12,24,40,0.08);
}

.slot{
  border:1px dashed rgba(0,0,0,0.08);
  position:relative;
  overflow:hidden;
  background-size: cover;
  background-repeat:no-repeat;
  background-position:center;
}

.slot.placeholder{background:none}

.piece{
  cursor:grab;
  user-select:none;
  border-radius:4px;
  background-size: cover;
  background-repeat:no-repeat;
  background-position:center;
  box-shadow: 0 4px 10px rgba(12,24,40,0.08);
}

.piece.dragging{opacity:0.6; cursor:grabbing; transform:scale(0.98)}

.pieces{
  display:flex;
  flex-wrap:wrap;
  max-width:760px;
  background:#fff;
  padding:8px;
  border-radius:8px;
  box-shadow:0 6px 18px rgba(12,24,40,0.04);
  min-height:120px;
  align-items:flex-start;
}

/* controls */
.controls{display:flex;gap:8px;align-items:center;margin-top:6px}
button{padding:8px 12px;border-radius:6px;border:1px solid rgba(0,0,0,0.08);background:#fff;cursor:pointer}
label{font-size:14px}
select{padding:6px;border-radius:6px}

/* message */
.message{margin-top:8px;font-weight:600;color:#077;}

/* responsive */
@media (max-width:920px){
  .game{flex-direction:column;align-items:center}
  .pieces{max-width:100%}
}
