/* Hub game picker — pixel-style overlay on hub screen */
.hub-game-picker {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}

.hub-game-picker[hidden] {
  display: none !important;
}

.hub-game-picker__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(14, 24, 36, 0.72);
}

.hub-game-picker__panel {
  position: relative;
  z-index: 1;
  width: min(92vw, 420px);
  max-height: min(88vh, 320px);
  padding: 14px 16px 16px;
  background: rgba(22, 38, 54, 0.96);
  border: 3px solid #1a2a3a;
  box-shadow: 4px 4px 0 rgba(8, 16, 24, 0.55);
  box-sizing: border-box;
  overflow: auto;
  animation: hub-game-picker-pop 0.18s ease-out;
}

@keyframes hub-game-picker-pop {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hub-game-picker__title {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(8px, 2.8vw, 11px);
  color: #ffe566;
  text-shadow: 1px 1px 0 #1a3a5a;
  text-align: center;
  margin: 0 0 14px;
  line-height: 1.6;
}

.hub-game-picker__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.hub-game-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 6px 10px;
  background: rgba(36, 52, 71, 0.95);
  border: 2px solid #1a2a3a;
  box-shadow: 2px 2px 0 rgba(8, 16, 24, 0.45);
  cursor: default;
  touch-action: manipulation;
  box-sizing: border-box;
}

.hub-game-card--enabled {
  cursor: pointer;
}

.hub-game-card--enabled:hover {
  border-color: #7dd3f3;
}

.hub-game-card--enabled:active {
  transform: translate(2px, 2px);
  box-shadow: none;
}

.hub-game-card--disabled {
  opacity: 0.55;
}

.hub-game-card__icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(14, 24, 36, 0.65);
  border: 2px solid #0f1824;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.hub-game-card__icon-bridge {
  display: grid;
  grid-template-columns: repeat(4, 8px);
  gap: 2px;
  width: 38px;
  height: 20px;
}

.hub-game-card__bridge-cell {
  background: #c4a574;
  border: 1px solid #6b4f2a;
  box-shadow: inset 0 -2px 0 #8b6914;
}

.hub-game-card__icon-glyph {
  font-family: 'Press Start 2P', monospace;
  font-size: 18px;
  color: #e8f4ff;
  line-height: 1;
}

.hub-game-card__name {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(5px, 1.8vw, 8px);
  color: #e8f8ff;
  text-align: center;
  line-height: 1.5;
  word-break: keep-all;
}

.hub-game-card__badge {
  font-size: clamp(5px, 1.6vw, 7px);
  color: #ffd48a;
  line-height: 1.4;
}

.hub-game-picker__back {
  display: block;
  margin: 0 auto;
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(6px, 2vw, 9px);
  color: #fff;
  background: #546e7a;
  border: 2px solid #263238;
  box-shadow: 2px 2px 0 #1a2a3a;
  padding: 8px 14px;
  cursor: pointer;
  touch-action: manipulation;
}

.hub-game-picker__back:active {
  transform: translate(2px, 2px);
  box-shadow: none;
}

.hub-prompt--no-hint .hub-prompt__hint {
  display: none;
}

.hub-prompt--no-hint .hub-prompt__enter {
  margin-top: calc(var(--hub-tile, 16px) * 0.15);
}
