.shell-home {
  max-width: 1240px;
  grid-template-rows: auto 1fr;
  padding-bottom: 1rem;
}

.home-stage {
  min-height: 0;
}

.map-screen {
  position: relative;
  min-height: 0;
  height: 100%;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow);
  background: #090909;
}

.map-screen.is-list .discovery-map,
.map-screen.is-list .map-overlay-bottom {
  display: none;
}

.discovery-map {
  width: 100%;
  height: 100%;
  min-height: 520px;
  background: #0b0d10;
}

.discovery-list-view {
  width: 100%;
  height: 100%;
  min-height: 520px;
  padding: 4.95rem 1rem 1rem;
  overflow-y: auto;
  overflow-x: hidden;
  background:
    radial-gradient(circle at top, rgba(250, 204, 21, 0.08), transparent 42%),
    #090909;
}

.discovery-list {
  display: grid;
  gap: 0.8rem;
}

.leaflet-container {
  font-family: "Space Grotesk", sans-serif;
  background: #0b0d10;
}

.leaflet-tile {
  opacity: 1 !important;
  filter: none;
}

.leaflet-control-zoom {
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25) !important;
}

.leaflet-control-zoom a {
  background: rgba(17, 17, 17, 0.92) !important;
  color: var(--accent) !important;
  border-bottom-color: rgba(255,255,255,0.06) !important;
}

.leaflet-control-attribution {
  background: rgba(17, 17, 17, 0.82) !important;
  color: var(--muted) !important;
  opacity: 0.42;
  font-size: 0.65rem !important;
  line-height: 1.1;
  padding: 0.08rem 0.32rem !important;
}

.leaflet-control-attribution a {
  color: var(--accent) !important;
}

.leaflet-control-attribution:hover {
  opacity: 0.9;
}

.leaflet-bottom .leaflet-control {
  margin-bottom: 6.6rem;
}

.map-overlay-card {
  position: absolute;
  z-index: 500;
  display: grid;
  gap: 0.18rem;
  min-width: 0;
  padding: 0.85rem 0.95rem;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(17, 17, 17, 0.86);
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.24);
}

.map-overlay-top {
  top: 1rem;
  left: 1rem;
  right: 1rem;
  z-index: 550;
  grid-auto-flow: column;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  width: auto;
  padding: 0.55rem 0.65rem;
}

.map-overlay-bottom {
  left: 1rem;
  bottom: 1rem;
  width: min(calc(100% - 2rem), 46rem);
}

.view-switch {
  display: inline-grid;
  grid-auto-flow: column;
  gap: 0.35rem;
  padding: 0.15rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(8, 8, 8, 0.84);
}

.view-switch-btn {
  appearance: none;
  min-height: 2.2rem;
  padding: 0 0.95rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.view-switch-btn.is-active {
  background: rgba(250, 204, 21, 0.08);
  border-color: rgba(250, 204, 21, 0.28);
  color: var(--accent);
}

.map-action-btn {
  appearance: none;
  min-height: 2.2rem;
  padding: 0 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(8, 8, 8, 0.84);
  color: var(--ink);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.map-action-btn.is-loading,
.map-action-btn.is-active {
  color: var(--accent);
}

.map-action-btn.is-error {
  color: #fda4af;
}

.shop-strip-list {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.shop-strip-list::-webkit-scrollbar {
  display: none;
}

.shop-strip-card {
  --shop-color: var(--accent);
  display: grid;
  gap: 0.22rem;
  min-width: min(14rem, 72vw);
  padding: 0.88rem 0.92rem;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(12, 12, 12, 0.92);
  color: inherit;
  text-decoration: none;
}

.shop-strip-card strong {
  color: var(--shop-color);
  font-size: 0.98rem;
  line-height: 1.2;
}

.shop-strip-card span,
.shop-strip-card em {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.28;
  font-style: normal;
  overflow-wrap: anywhere;
}

.shop-strip-card em {
  color: var(--ink);
}

.shop-strip-empty {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

.shop-list-card {
  --shop-color: var(--accent);
  display: grid;
  gap: 0.55rem;
  padding: 1rem 1.05rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(12, 12, 12, 0.9);
  color: inherit;
  text-decoration: none;
}

.shop-list-head {
  display: flex;
  align-items: center;
  gap: 0.68rem;
}

.shop-list-dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: var(--shop-color);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--shop-color) 18%, transparent);
  flex: none;
}

.shop-list-head strong {
  min-width: 0;
  color: var(--shop-color);
  font-size: 1rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.shop-list-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.85rem;
  align-items: baseline;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.3;
}

.shop-list-meta em {
  color: var(--ink);
  font-style: normal;
}

.shop-list-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.shop-list-empty {
  padding: 1.05rem 1.1rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(12, 12, 12, 0.9);
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.map-shop-marker {
  --shop-color: var(--accent);
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: var(--shop-color);
  border: 3px solid rgba(10, 10, 10, 0.92);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--shop-color) 18%, transparent);
}

.map-user-marker {
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: #38bdf8;
  border: 3px solid rgba(10, 10, 10, 0.92);
  box-shadow: 0 0 0 7px rgba(56, 189, 248, 0.2);
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  background: rgba(14, 14, 14, 0.96);
  color: var(--ink);
  border: 1px solid rgba(255,255,255,0.08);
}

.leaflet-popup-content {
  margin: 0;
  min-width: 9rem;
}

.map-popup {
  --shop-color: var(--accent);
  display: grid;
  gap: 0.18rem;
  padding: 0.8rem 0.85rem;
}

.map-popup strong {
  color: var(--shop-color);
  font-size: 0.92rem;
}

.map-popup span {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.28;
}

@media (max-width: 600px) {
  .shell-home {
    padding: 1rem;
    gap: 1rem;
    padding-bottom: 1rem;
  }

  .map-screen {
    border-radius: 20px;
  }

  .discovery-map {
    min-height: 0;
  }

  .map-overlay-bottom {
    left: 0.8rem;
    right: 0.8rem;
    bottom: 0.8rem;
    width: auto;
    padding: 0.75rem 0.8rem;
  }

  .map-overlay-top {
    left: 0.8rem;
    right: 0.8rem;
    top: 0.8rem;
    padding: 0.5rem 0.55rem;
    gap: 0.55rem;
  }

  .discovery-list-view {
    min-height: 0;
    padding: 4.4rem 0.8rem 0.8rem;
  }

  .shop-strip-card {
    min-width: 11.5rem;
    padding: 0.75rem 0.8rem;
  }

  .leaflet-bottom .leaflet-control {
    margin-bottom: 6.1rem;
  }

  .view-switch-btn,
  .map-action-btn {
    min-height: 2rem;
    padding: 0 0.78rem;
    font-size: 0.78rem;
  }
}
