/* Heavy vs Light - tower drop yard for Galileo's falling race */

html,
body {
  height: 100%;
}

body {
  background: linear-gradient(180deg, #4FC3F7 0%, #81D4FA 45%, #FFE0B2 100%);
  overflow: hidden;
}

.game-container {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  padding: 0 10px;
}

/* Free-play shelf: tap two objects to load them onto the drop spots */
.shelf[hidden] {
  display: none;
}

.shelf {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0 auto 8px;
  max-width: min(92vw, 560px);
}

.shelf-item {
  width: 54px;
  height: 54px;
  min-width: 48px;
  min-height: 48px;
  font-size: 1.7rem;
  line-height: 1;
  background: rgba(255, 255, 255, 0.92);
  border: var(--border-width) solid var(--border-color);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease;
}

.shelf-item:active {
  transform: scale(0.92);
}

.shelf-item[aria-pressed="true"] {
  background: var(--color-accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

#canvas-container {
  position: relative;
  flex: 1;
  min-height: 220px;
  margin: 0 auto;
  width: min(100%, 900px);
  border: var(--border-width) solid var(--border-color);
  border-radius: 20px;
  background:
    radial-gradient(circle at 18% 22%, rgba(255, 255, 255, 0.75) 0 24px, transparent 25px),
    radial-gradient(circle at 78% 14%, rgba(255, 255, 255, 0.7) 0 30px, transparent 31px),
    radial-gradient(circle at 50% 38%, rgba(255, 255, 255, 0.5) 0 18px, transparent 19px),
    linear-gradient(180deg, #81D4FA 0%, #B3E5FC 70%, #FFF3E0 100%);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

#canvas-container canvas {
  display: block;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  padding: 10px 0 max(10px, env(safe-area-inset-bottom));
}

/* Short landscape phones: tighten vertical rhythm */
@media (max-height: 480px) {
  .gravity-prompt {
    margin-bottom: 4px;
    padding: 4px 10px;
  }

  .shelf {
    gap: 6px;
    margin-bottom: 4px;
  }

  .shelf-item {
    width: 48px;
    height: 48px;
    font-size: 1.4rem;
  }

  .controls {
    padding: 6px 0 max(6px, env(safe-area-inset-bottom));
  }

  #canvas-container {
    min-height: 150px;
  }
}
