/* Pattern Parade - a festival street where rules march by */

html,
body {
  height: 100%;
}

body {
  background: linear-gradient(180deg, #7B1FA2 0%, #AB47BC 45%, #FF7043 100%);
  overflow: hidden;
}

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

.shelf[hidden] {
  display: none;
}

.shelf {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0 auto 6px;
}

.shelf-item {
  width: 52px;
  height: 52px;
  min-width: 48px;
  min-height: 48px;
  font-size: 1.6rem;
  line-height: 1;
  background: var(--color-paper);
  border: var(--border-width) solid var(--border-color);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}

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

#canvas-container {
  position: relative;
  flex: 1;
  min-height: 200px;
  margin: 0 auto;
  width: min(100%, 900px);
  border: var(--border-width) solid var(--border-color);
  border-radius: 20px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  background: linear-gradient(180deg, #FFF8E1 0%, #FFE0B2 100%);
  touch-action: manipulation;
}

#canvas-container canvas {
  display: block;
}

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

@media (max-height: 480px) {
  .gravity-prompt {
    margin-bottom: 4px;
    padding: 4px 10px;
  }

  .shelf {
    gap: 5px;
  }

  .shelf-item {
    width: 44px;
    height: 44px;
    font-size: 1.35rem;
  }

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

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