/* .nav-link, .brand, .byline, .pages styles come from styles.css */

.arrange { border-top: 1px solid var(--faint); padding-top: 12px; }

.arrange .filter-heading { font-weight: 700; margin-bottom: 6px; }

.hint { color: var(--muted); }

.actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-top: 1px solid var(--faint);
  padding-top: 12px;
}

.action-btn {
  border: 0;
  background: none;
  font: inherit;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  text-align: left;
  transition: color 120ms ease;
}

.action-btn:hover { color: var(--ink); }

.quiet-link { color: inherit; }

/* ---------- stage ---------- */

.shelf-main {
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 24px 48px;
}

.shelf-stage {
  display: flex;
  justify-content: center;
  width: 100%;
}

.shelf-wrap {
  position: relative;
  user-select: none;
  -webkit-user-select: none;
}

#shelf-img {
  display: block;
  height: min(78vh, 900px);
  width: auto;
  pointer-events: none;
}

#slots { position: absolute; inset: 0; }

.slot { position: absolute; }

.slot.debug { outline: 1px solid rgba(200, 40, 40, 0.8); background: rgba(200, 40, 40, 0.12); }

.slot.drop-target { background: rgba(60, 120, 60, 0.14); }

.placed {
  position: absolute;
  cursor: grab;
  touch-action: none;
}

.placed img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom;
  display: block;
  pointer-events: none;
  transform-origin: bottom center;
}

/* visual equivalent of the placement clink: a quick settle */
@keyframes mug-pop {
  0% { transform: scale(1.05); }
  55% { transform: scale(0.99); }
  100% { transform: scale(1); }
}

.placed.just-placed img {
  animation: mug-pop 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

@media (prefers-reduced-motion: reduce) {
  .placed.just-placed img { animation: none; }
}

/* ---------- tray ---------- */

.tray {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 14px;
  padding: 22px 8px 0;
  max-width: 980px;
}

.tray-mug {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  cursor: grab;
  touch-action: none;
  opacity: 1;
  transition: opacity 120ms ease, transform 120ms ease;
}

.tray-mug:hover { transform: translateY(-2px); }

.tray-mug img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
}

.tray-mug.in-use { opacity: 0.25; }

/* ---------- drag ghost ---------- */

.ghost {
  position: fixed;
  z-index: 100;
  pointer-events: none;
  opacity: 0.9;
}

.ghost img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

@media (max-width: 720px) {
  .shelf-main { margin-left: 0; padding: 8px 16px 48px; }
  #shelf-img { height: auto; width: min(92vw, 480px); }
}
