* {
  box-sizing: border-box;
}

:root {
  --bg: #0f1419;
  --surface: #1a2332;
  --text: #e6edf3;
  --muted: #8b949e;
  --accent: #58a6ff;
  --accent-hover: #79b8ff;
  --success: #3fb950;
  --radius: 12px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
}

html, body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-text-size-adjust: 100%;
  padding: var(--safe-top) var(--safe-right) var(--safe-bottom) var(--safe-left);
}

.landing-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1rem 2rem;
}

.landing-header {
  text-align: center;
  padding: 0 0 1.5rem;
}

/* App banner – same responsive treatment as other pages */
.landing-header .app-banner-wrap {
  width: 100%;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(180deg, #0a0e12 0%, #111922 100%);
  border-radius: var(--radius);
}
.landing-header .app-banner {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: clamp(72px, 18vw, 180px);
  object-fit: contain;
  object-position: center;
}
@media (min-width: 768px) {
  .landing-header .app-banner {
    max-height: clamp(100px, 14vw, 200px);
  }
}

.landing-section {
  margin-bottom: 2.5rem;
}

.landing-section-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 1rem;
  color: var(--text);
}

.dropdown-wrap {
  margin-bottom: 1.25rem;
}

.landing-select {
  width: 100%;
  max-width: 320px;
  padding: 0.65rem 2rem 0.65rem 0.75rem;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%238b949e' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
}

.landing-select:hover,
.landing-select:focus {
  border-color: var(--accent);
  outline: none;
}

.category-cards,
.store-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.category-card,
.store-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: border-color 0.2s, transform 0.2s;
}

.category-card:hover,
.store-card:hover {
  border-color: var(--accent);
}

.category-card-link,
.store-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.category-card-img-wrap,
.store-card-img-wrap {
  width: 100%;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--bg);
}

.category-card-img,
.store-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.category-card-name,
.store-card-name {
  padding: 0.5rem 0.65rem;
  font-weight: 600;
  font-size: 0.9rem;
  margin: 0;
}

.store-card-desc {
  padding: 0 0.65rem 0.5rem;
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.3;
}

.stores-section.hidden {
  display: none !important;
}

.stores-section .store-cards .store-card.filtered-out {
  display: none;
}

.landing-error {
  color: var(--muted);
  font-size: 0.95rem;
  padding: 1rem;
  margin: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (min-width: 768px) {
  .landing-wrap {
    padding: 1.5rem 1.5rem 3rem;
  }
  .category-cards,
  .store-cards {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

@media (min-width: 1024px) {
  .landing-wrap {
    padding: 2rem 2rem 4rem;
  }
}
