.art-puzzle-area {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(220px, 0.62fr) minmax(0, 1.38fr);
}

.art-puzzle-top {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.piece-tray,
.board-grid {
  position: relative;
  display: block;
  width: 100%;
}

.art-piece {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  border: 3px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.24);
  background-repeat: no-repeat;
  background-size: 600% 400%;
  overflow: hidden;
  touch-action: manipulation;
}

.jigsaw-piece,
.jigsaw-slot {
  position: absolute;
  display: block;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
}

.jigsaw-piece {
  cursor: grab;
  touch-action: none;
  user-select: none;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.28));
}

.jigsaw-piece.dragging {
  z-index: 1000;
  pointer-events: none;
  filter: drop-shadow(0 16px 28px rgba(0, 0, 0, 0.36));
}

.jigsaw-piece.drag-origin {
  opacity: 0.2;
}

.jigsaw-piece.placed {
  cursor: default;
  filter: none;
}

.jigsaw-slot {
  pointer-events: none;
}

.jigsaw-svg {
  display: block;
  width: 100%;
  height: 100%;
}

.art-piece::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 13px;
  border: 2px dashed rgba(255, 255, 255, 0.32);
  pointer-events: none;
}

.art-piece.selected {
  outline: 5px solid rgba(255, 216, 77, 0.95);
  transform: scale(1.03);
}

.art-piece:active {
  transform: scale(0.98);
}

.board-slot {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  border: 2px dashed rgba(138, 180, 255, 0.26);
  background: rgba(99, 181, 233, 0.14);
  overflow: hidden;
  touch-action: manipulation;
}

.board-slot.hint::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 10px;
  border: 2px dashed rgba(138, 180, 255, 0.16);
}

.board-slot.filled {
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.92);
  background-repeat: no-repeat;
}

.art-win-banner {
  margin-top: 16px;
}

.truck-puzzle-area {
  grid-template-columns: 1fr;
}

.truck-puzzle-card {
  display: grid;
  gap: 16px;
  align-content: start;
}

.truck-puzzle-controls {
  justify-content: flex-start;
}

.help-toggle-btn,
.help-toggle-btn.shuffle-btn {
  background: linear-gradient(180deg, #8ed9ff 0%, #58b8f2 100%);
  color: #0b1323;
}

.help-toggle-btn[aria-pressed="true"],
.help-toggle-btn.shuffle-btn[aria-pressed="true"] {
  background: linear-gradient(180deg, #fff0a4 0%, #ffd84d 100%);
}

.truck-puzzle-stage {
  position: relative;
  min-height: 620px;
  width: 100%;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(138, 180, 255, 0.18);
  background:
    radial-gradient(circle at top left, rgba(99, 181, 233, 0.18), rgba(255, 255, 255, 0) 36%),
    linear-gradient(180deg, rgba(11, 19, 35, 0.95), rgba(18, 28, 46, 0.9));
  box-shadow: inset 0 10px 22px rgba(0, 0, 0, 0.24);
}

.piece-ring {
  position: absolute;
  inset: 0;
  min-height: 0;
  z-index: 2;
}

.piece-ring .jigsaw-piece {
  pointer-events: auto;
}

.truck-board-grid {
  position: absolute;
  z-index: 1;
  border-radius: 26px;
  border: 1px solid rgba(138, 180, 255, 0.2);
  background: rgba(11, 19, 35, 0.7);
  box-shadow:
    inset 0 10px 18px rgba(0, 0, 0, 0.24),
    0 16px 30px rgba(0, 0, 0, 0.22);
  isolation: isolate;
}

.truck-board-grid::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: url("../../Images/monstertruck-puzzle.png");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0;
  transition: opacity 180ms ease;
  pointer-events: none;
}

.truck-board-grid.help-on::before {
  opacity: 0.34;
}

@media (max-width: 560px) {
  .truck-puzzle-stage {
    min-height: 500px;
  }
}
