:root {
  --theme-1: #ffb400;
  /* warm gold */
  --theme-2: #ff6b35;
  /* orange-red */
  --theme-3: #ff4d4f;
  /* coral */
  --theme-4: #ff9f1c;
  /* amber */
  --muted: #6b6b6b;
  --card-bg: rgba(255, 255, 255, 0.75);
  --glass-blur: 10px;
}

* {
  box-sizing: border-box
}

body {
  margin: 0;
  font-family: Inter, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
  background: linear-gradient(180deg, #fff 0%, #f5f5f7 100%);
  color: #222;
  -webkit-font-smoothing: antialiased;
}

/* Topbar */
.topbar {
  background: #ffffff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  max-width: 1200px;
  margin: 0 auto
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 12px
}

.logo-icon {
  font-size: 28px;
  color: var(--theme-2);
  background: linear-gradient(90deg, var(--theme-1), var(--theme-2));
  -webkit-background-clip: text;
  background-clip: text
}

.site-title .title-main {
  font-weight: 700;
  font-size: 1.1rem;
  color: linear-gradient(90deg, var(--theme-2), var(--theme-3))
}

.site-title .title-sub {
  font-size: 0.85rem;
  color: var(--muted)
}

/* Section base (acrylic glass) */
.section {
  padding: 48px 20px
}

.container {
  max-width: 1200px;
  margin: 0 auto
}

.white-bg {
  /* fallback for older browsers */
  background: rgba(255, 255, 255, 0.96);
  border-radius: 14px;
  padding: 18px;
  /* backdrop blur when supported */
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  box-shadow: 0 10px 30px rgba(20, 20, 20, 0.06);
}

/* If browser doesn't support backdrop-filter, ensure legible fallback */
@supports not ((-webkit-backdrop-filter: blur(0px)) or (backdrop-filter: blur(0px))) {
  .white-bg {
    background: rgba(255, 255, 255, 0.98);
  }
}

/* Overview grid */
.overview-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
  align-items: start
}

.overview-left h2 {
  margin: 0;
  font-size: 1.6rem
}

.muted {
  color: var(--muted);
  margin-top: 8px
}

.cards-row {
  margin-top: 18px
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px
}

.stat-card {
  background: #fff;
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
}

.stat-card i {
  font-size: 22px;
  color: var(--theme-2);
  display: block;
  margin-bottom: 8px
}

.stat-card h3 {
  margin: 0;
  font-size: 1.4rem
}

.stat-card p {
  margin: 6px 0 0;
  color: var(--muted)
}

/* Legend */
.legend-card h3 {
  margin-top: 0
}

.legend-list {
  list-style: none;
  padding: 0;
  margin: 0
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 8px
}

.legend-swatch {
  width: 36px;
  height: 12px;
  border-radius: 4px
}

/* Map/filter */
.filter-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px
}

.filter-buttons {
  display: flex;
  gap: 8px
}

.filter-buttons .btn {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #fff;
  cursor: pointer
}

.filter-buttons .btn.active {
  box-shadow: 0 6px 18px rgba(255, 107, 53, 0.12);
  border-color: rgba(255, 107, 53, 0.25)
}

.map-container {
  height: 520px;
  border-radius: 12px;
  overflow: hidden
}

/* Ranking */
.regions-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0 18px
}

.region-btn {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #fff;
  cursor: pointer
}

.region-btn.active {
  background: linear-gradient(90deg, var(--theme-1), var(--theme-4));
  color: #fff;
  border: none;
  box-shadow: 0 8px 24px rgba(255, 107, 53, 0.12)
}

.store-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;

  margin-top: 18px .store-grid.list-mode {
    display: block;
  }

  .store-grid.list-mode .store-list-ol {
    margin-top: 0;
  }
}

.store-card {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
  transition: transform .25s ease
}

.store-card:hover {
  transform: translateY(-6px)
}

.store-card .store-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px
}

.store-card .store-title {
  font-weight: 700
}

/* Card header & rank badge */
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px
}

.rank-badge {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(90deg, var(--theme-2), var(--theme-3));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800
}

.card-body {
  margin-top: 6px
}

.card-body .store-snippet {
  margin: 6px 0;
  color: var(--muted)
}

/* New card row layout rules to match requested 4-line structure */
.card-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0
}

.card-row.row-1 .store-title {
  font-size: 1.05rem
}

.card-row.row-2 .card-address {
  color: var(--muted);
  font-size: 0.95rem
}

.card-address .status {
  display: inline-block;
  margin-right: 8px;
  padding: 4px 8px;
  border-radius: 8px;
  font-weight: 700
}

.status.open-now,
.open-now {
  background: linear-gradient(90deg, var(--theme-1), var(--theme-4));
  color: #fff
}

.status.closed {
  background: rgba(200, 200, 200, 0.2);
  color: var(--muted)
}

.card-meta-left {
  color: var(--muted);
  font-size: 0.95rem
}

.card-meta-right {
  display: flex;
  align-items: center
}

.goto-btn {
  background: linear-gradient(90deg, var(--theme-2), var(--theme-3));
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px
}

.goto-btn i {
  font-size: 0.95rem
}

.review-row {
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 6px
}

/* Ensure row stacking on small screens */
@media (max-width:640px) {
  .card-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px
  }

  .card-meta-right {
    align-self: flex-end
  }
}

.store-tag {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px
}

.open-now {
  background: linear-gradient(90deg, var(--theme-1), var(--theme-4));
  color: #fff;
  padding: 6px 8px;
  border-radius: 8px;
  font-weight: 600
}

/* Ranking as compact list for better readability and compatibility */
.store-list-ol {
  counter-reset: store-counter;
  margin: 0;
  padding: 0;
  list-style: none;
  margin-top: 12px
}

.store-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 12px 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04)
}

.store-item .left {
  display: flex;
  flex-direction: column;
  gap: 6px
}

.store-item .rank {
  font-weight: 700;
  color: var(--theme-2);
  min-width: 36px
}

.store-item .meta {
  color: var(--muted);
  font-size: 0.95rem
}

.store-item .right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px
}

.store-item .store-title {
  font-weight: 700
}

.store-item .store-snippet {
  font-size: 0.95rem;
  color: var(--muted)
}

/* Make list items touch-friendly on mobile */
@media (max-width:600px) {
  .store-item {
    padding: 14px 8px;
    flex-direction: column;
    align-items: stretch
  }

  .store-item .right {
    align-items: flex-start;
    margin-top: 8px
  }
}

/* Data source */
.datasource-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px
}

.store-grid.list-mode {
  display: block;
  max-width: 900px;
  margin: 18px auto 0;
  padding: 8px 12px;
}

padding: 18px;
border-radius: 12px;
box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);

/* List item improvements for PC and touch devices */
.store-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  background: transparent;
}

.store-item:hover {
  background: rgba(255, 255, 255, 0.6);
}

.store-item .left {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.store-item .rank {
  font-weight: 700;
  color: #fff;
  background: linear-gradient(90deg, var(--theme-2), var(--theme-3));
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  flex: 0 0 40px;
}

.store-item .store-title {
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 420px;
}

.store-item .store-snippet {
  color: var(--muted);
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.store-item .right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.store-item .right .store-tag {
  font-size: 0.86rem;
  padding: 6px 8px;
  border-radius: 8px;
}

.store-item .goto-btn {
  padding: 8px 10px;
  border-radius: 8px;
}

@media (max-width: 800px) {
  .store-grid.list-mode {
    max-width: 100%;
    margin: 8px 8px 0;
    padding: 6px;
  }

  .store-item {
    flex-direction: column;
    align-items: stretch;
    padding: 12px 10px;
  }

  .store-item .left {
    flex-direction: column;
    gap: 6px;
  }

  .store-item .store-title {
    max-width: 100%;
    white-space: normal;
  }

  .store-item .store-snippet {
    white-space: normal;
  }

  .store-item .right {
    align-items: flex-start;
    margin-top: 8px;
  }
}
}

.data-card i {
  font-size: 22px;
  color: var(--theme-2);
  margin-bottom: 8px
}

/* Info window and marker label styling */
.info-win h3 {
  margin: 0;
  font-size: 1rem;
}

.info-win .info-addr {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 6px;
}

.info-win .info-rating {
  margin-top: 6px;
}

.goto-btn {
  display: inline-block;
  padding: 8px 12px;
  background: var(--theme-2);
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
}

.marker-label {
  background: rgba(255, 255, 255, 0.95);
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  font-size: 0.9rem;
}

/* Footer */
.site-footer {
  background: #0b0b0c;
  color: #fff;
  padding: 18px;
  /* margin-top: 28px; */
  text-align: center
}

/* Responsive */
@media (max-width:1000px) {
  .overview-grid {
    grid-template-columns: 1fr
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr)
  }

  .map-container {
    height: 420px
  }
}

@media (max-width:600px) {
  .stats-grid {
    grid-template-columns: 1fr
  }

  .store-grid {
    grid-template-columns: 1fr
  }

  .topbar-inner {
    padding: 10px
  }
}