/* Shelf board page */

body.shelf-body {
  margin: 0;
  border: none;
  border-radius: 0;
  background: #f5f5f5;
}

.shelf-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.shelf-layout {
  max-width: 1200px;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 280px) minmax(0, 1fr);
  gap: 24px;
  align-items: center;
}

.shelf-info h1 {
  font-family: pricedow;
  font-size: 2.4rem;
  margin: 0 0 0.5rem;
}

.shelf-info p {
  margin: 0.25rem 0;
  font-size: 0.95rem;
}

.shelf-status {
  font-weight: 600;
  margin-top: 0.75rem;
}

.shelf-message {
  min-height: 1.2rem;
}

#restart-btn {
  margin-top: 1rem;
  padding: 0.4rem 0.9rem;
  border-radius: 9999px;
  border: 2px solid #333;
  background: #fff;
  font-size: 0.95rem;
  cursor: pointer;
}

#restart-btn:hover {
  background: #333;
  color: #fff;
}

.outer-shelf {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.15), transparent 12px) padding-box,
    repeating-linear-gradient(90deg,
      #b87a3a 0,
      #b87a3a 40px,
      #c5893f 40px,
      #c5893f 80px);
  border: 12px solid #2b1a0b;
  border-radius: 20px;
  width: min(100%, 1024px);
  aspect-ratio: 1024 / 627;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
}

.shelf-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(5, 1fr);
  width: 100%;
  height: 100%;
}

.shelf-cell {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  border-right: 12px solid #2b1a0b;
  border-bottom: 12px solid #2b1a0b;
}

.shelf-cell:nth-child(5n) {
  border-right: none;
}

.shelf-cell:nth-child(n+21) {
  border-bottom: none;
}

.shelf-slots {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.shelf-slot {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: rgba(248, 242, 232, 0.9);
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

.shelf-item {
  cursor: grab;
  user-select: none;
  font-size: 2.4rem;
}

.shelf-item.dragging {
  opacity: 0.3;
}

.shelf-cell.drop-target .shelf-slot {
  box-shadow: inset 0 0 0 3px rgba(0, 0, 0, 0.5);
}

@media only screen and (max-width: 900px) {
  .shelf-layout {
    grid-template-columns: 1fr;
  }

  .shelf-info {
    text-align: center;
  }
}

@media only screen and (max-width: 768px) {
  .outer-shelf {
    width: 100%;
  }
}