/* ─── Gimmick store page ─────────────────────────────────── */

/* style.css locks html/body to `overflow:hidden; height:100%` for the game
   canvas. The store is a normal scrolling document, so undo that here or the
   catalog gets clipped at the viewport with no way to scroll down. */
html, body {
  overflow: auto;
  overflow-x: hidden;
  height: auto;
  min-height: 100%;
}

.store-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 24px 16px 40px;
  color: var(--text, #e0e0e0);
}

.store-header { text-align: center; margin-bottom: 24px; }
.store-header h1 { margin-bottom: 4px; }
.store-back { color: var(--accent, #4fc3f7); text-decoration: none; }
.store-back:hover { text-decoration: underline; }

.store-loading { text-align: center; opacity: 0.7; padding: 40px 0; }

.store-login-hint {
  text-align: center;
  background: var(--surface, #1e1e2e);
  border: 1px solid var(--border, #444);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}
.store-login-hint .account-btn { max-width: 260px; margin: 10px auto 0; }

.store-game-section { margin-bottom: 28px; }
.store-game-section > h2 {
  border-bottom: 1px solid var(--border, #444);
  padding-bottom: 6px;
  margin-bottom: 12px;
}

.store-slot-group > h3 {
  font-size: 0.95rem;
  opacity: 0.8;
  margin: 12px 0 8px;
}

.store-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

.store-item {
  background: var(--surface, #1e1e2e);
  border: 1px solid var(--border, #444);
  border-radius: 12px;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.store-item-equipped {
  border-color: var(--good, #4caf50);
  box-shadow: 0 0 0 1px var(--good, #4caf50);
}

.store-item-preview {
  font-size: 2.2rem;
  min-height: 2.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.store-color-name { font-weight: 700; font-size: 1.2rem; }
.store-title-preview { font-style: italic; font-size: 1rem; opacity: 0.95; }

.store-item-name { font-weight: 600; }
.store-item-price { font-size: 0.9rem; opacity: 0.85; }

.store-item-btn {
  padding: 8px 18px;
  border: none;
  border-radius: 8px;
  background: var(--accent, #4fc3f7);
  color: #000;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
  width: 100%;
}
.store-item-btn:hover:not(:disabled) { opacity: 0.85; }
.store-item-btn:disabled { opacity: 0.45; cursor: not-allowed; }

.store-item-error {
  color: var(--danger, #e57373);
  font-size: 0.8rem;
  min-height: 1em;
}

.store-account-section {
  margin-top: 36px;
  background: var(--surface, #1e1e2e);
  border: 1px solid var(--danger, #a33);
  border-radius: 12px;
  padding: 18px 20px;
  font-size: 0.92rem;
  line-height: 1.5;
}

.store-danger-btn {
  margin-top: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  background: var(--danger, #e53935);
  color: #fff;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
}
.store-danger-btn:hover { opacity: 0.85; }

.store-footer {
  margin-top: 36px;
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.75;
}
.store-footer .privacy-link { color: var(--accent, #4fc3f7); }

@media (max-width: 480px) {
  .store-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}
