/**
 * City-specific product classes for the home and explore pages, ported from
 * the `city-*` (and adjacent) blocks of src/app.css.
 *
 * This is deliberately *not* every non-`--city-*` selector in src/app.css
 * verbatim: src/app.css and static/ui/base.css both define ~26 of the same
 * selectors (.field-input, .map-frame, .module-card, .section-heading,
 * .control-strip, .city-map-marker*, .city-map-legend, .city-legend-*,
 * .maplibregl-popup-*) with different declarations — src/app.css leans on
 * Tailwind utility classes in the markup for sizing/radius, base.css bakes
 * those into the class itself since static pages have no Tailwind. Loading
 * this file after base.css on the same page, both defining the same
 * selector, would mean whichever rule loads second wins per-property, not a
 * clean merge. Those ~26 selectors are intentionally omitted here — pages
 * that load both base.css and city.css get base.css's already
 * static-page-appropriate versions, not a redefinition. See the "Shared
 * modules" section of .claude/plans/vanilla-js-migration.md for how this
 * list was derived and verified (mechanical selector-string diff against
 * base.css, not hand review).
 */

/*
 * .shell (base.css) caps every static page at 68rem — right for a simple
 * list page, cramped for the denser map/card-grid layout home actually has.
 * The original Svelte home page (.city-main in src/app.css) wasn't capped
 * at 68rem either — it used `width: min(100%, 1440px)`. This is that same
 * cap, opted into per-page as `class="shell shell-wide"` rather than
 * changing .shell itself, so events/places/venues keep their narrower width
 * unless a person deliberately asks for it there too.
 */
.shell-wide {
  max-width: 1440px;
}

.maplibregl-ctrl-attrib {
  color: var(--control-attribution-fg);
}

.font-display {
  font-family: var(--font-display);
}

.surface-panel {
  border: 1px solid var(--border);
  background:
    var(--surface-glint), color-mix(in hsl, var(--card) 92%, var(--background));
  box-shadow: var(--shadow-soft), var(--shadow-edge);
}

.field-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid color-mix(in hsl, var(--border), var(--primary) 18%);
  border-radius: var(--radius);
  background:
    var(--field-hero-primary-glow), var(--field-hero-accent-glow),
    color-mix(in hsl, var(--card) 90%, var(--background));
  box-shadow: var(--shadow-soft), var(--shadow-edge);
}

.field-hero::before {
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--accent),
    var(--warning),
    var(--primary)
  );
  content: '';
}

.field-hero::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: var(--field-hero-pattern);
  background-size: 28px 28px;
  opacity: 0.38;
  content: '';
}

.hero-content {
  position: relative;
  z-index: 1;
}

.metric-rack {
  border: 1px solid color-mix(in hsl, var(--border), var(--primary) 24%);
  background: color-mix(in hsl, var(--background) 72%, transparent);
  box-shadow: var(--shadow-edge);
}

.stat-cell {
  border-left: 2px solid color-mix(in hsl, var(--primary), transparent 42%);
  padding-left: 0.75rem;
}

.field-hero > * {
  position: relative;
  z-index: 1;
}

.mini-tile {
  border: 1px solid color-mix(in hsl, var(--border), transparent 20%);
  background: color-mix(in hsl, var(--muted) 72%, transparent);
  box-shadow: var(--shadow-edge);
}

.city-page {
  display: grid;
  grid-template-columns: 5rem minmax(0, 1fr);
  background:
    linear-gradient(90deg, var(--city-page-grid-line) 1px, transparent 1px) 0 0
      / 56px 56px,
    var(--background);
}

.city-nav-rail {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  height: 100vh;
  border-right: 1px solid var(--nav-border);
  background: var(--nav-bg);
  padding: 1rem 0.5rem;
  color: var(--nav-fg-active);
}

.city-nav-mark {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  margin-bottom: 0.6rem;
  background: var(--primary);
  color: var(--primary-foreground);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: var(--weight-display);
}

.city-nav-items {
  display: grid;
  width: 100%;
  gap: 0.25rem;
}

.city-nav-item,
.city-theme-toggle,
.city-login-toggle {
  display: grid;
  justify-items: center;
  gap: 0.2rem;
  width: 100%;
  border: 0;
  border-left: 3px solid transparent;
  background: transparent;
  color: var(--nav-fg);
  padding: 0.55rem 0.2rem;
  font-size: 0.62rem;
  font-weight: var(--weight-label);
  line-height: 1;
  text-transform: uppercase;
  cursor: pointer;
}

.city-nav-item:hover,
.city-theme-toggle:hover,
.city-theme-toggle[aria-checked='true'],
.city-login-toggle:hover,
.city-login-toggle[aria-checked='true'] {
  border-left-color: var(--primary);
  color: var(--nav-fg-active);
}

.city-nav-actions {
  display: grid;
  width: 100%;
  gap: 0.25rem;
  margin-top: auto;
}

.city-theme-toggle[aria-checked='true'],
.city-login-toggle[aria-checked='true'] {
  background: var(--nav-active-bg);
}

.city-main {
  width: min(100%, 1440px);
  padding-bottom: 4rem;
  background: var(--background);
  box-shadow: var(--app-shell-border-shadow);
}

.city-offline {
  margin: 2rem;
}

.city-masthead {
  position: relative;
  display: grid;
  min-height: 285px;
  overflow: hidden;
  background: var(--masthead-bg);
  border-bottom: 3px solid var(--primary);
  color: var(--masthead-fg);
}

.city-masthead-content {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 100%;
  align-content: center;
  gap: 1.25rem;
  padding: 2.25rem 2.5rem;
}

.city-masthead-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
}

.city-kicker,
.city-section-kicker,
.city-filter-group h3,
.city-map-eyebrow {
  font-weight: var(--weight-label);
  letter-spacing: 0;
}

.city-kicker {
  color: var(--masthead-kicker);
}

.city-status-panel {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding-bottom: 0.45rem;
}

.city-weather-readout {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--foreground);
  font-size: 0.9rem;
  font-weight: var(--weight-strong);
  white-space: nowrap;
}

.city-weather-readout svg {
  flex: 0 0 auto;
  color: var(--weather-icon);
  filter: var(--weather-icon-shadow);
}

.city-time-readout {
  color: var(--muted-foreground);
  font-size: 0.82rem;
  font-weight: var(--weight-body);
  white-space: nowrap;
}

.city-title-row {
  display: flex;
  align-items: baseline;
  gap: 1.35rem;
  flex-wrap: wrap;
}

.city-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 5rem;
  font-weight: var(--weight-display);
  line-height: 0.92;
  text-transform: uppercase;
  letter-spacing: 0;
}

.city-name-kannada {
  margin-top: 0;
  color: var(--masthead-script);
  font-size: 1.7rem;
  font-weight: var(--weight-body);
}

.city-search-band {
  display: flex;
  justify-content: center;
  padding: 1rem 2.5rem;
  border-bottom: 1px solid var(--border);
  background: color-mix(in hsl, var(--card) 92%, var(--background));
}

.city-search {
  position: relative;
  display: block;
  width: min(100%, 44rem);
}

.city-console {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 560px;
  border-bottom: 3px solid var(--primary);
}

.city-filter-rail {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  border-right: 1px solid var(--border);
  background: color-mix(in hsl, var(--card) 72%, var(--background));
  padding: 1.25rem;
}

.city-filter-head {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
}

.city-filter-head h2,
.city-section-header h2,
.city-map-bar h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: var(--weight-heading);
  text-transform: uppercase;
  letter-spacing: 0;
}

.city-filter-head h2 {
  font-size: 1.1rem;
}

.city-filter-head p,
.city-map-eyebrow {
  color: var(--muted-foreground);
  font-size: 0.78rem;
  font-weight: var(--weight-label);
  text-transform: uppercase;
}

.city-filter-group {
  display: grid;
  gap: 0.55rem;
}

.city-filter-group h3 {
  color: var(--muted-foreground);
  font-size: 0.76rem;
  font-weight: var(--weight-label);
  text-transform: uppercase;
}

.city-filter-row,
.city-category-chip {
  border: 0;
  background: transparent;
  color: var(--foreground);
  cursor: pointer;
  text-align: left;
}

.city-filter-row:focus-visible,
.city-category-chip:focus-visible,
.city-nav-item:focus-visible,
.city-theme-toggle:focus-visible,
.city-login-toggle:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 3px;
  box-shadow: 0 0 0 5px color-mix(in hsl, var(--ring) 18%, transparent);
}

.city-filter-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 2rem;
  padding: 0.2rem 0;
  font-size: 0.9rem;
  font-weight: var(--weight-strong);
}

.city-radio-dot {
  width: 0.58rem;
  height: 0.58rem;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: transparent;
}

.city-filter-row.active,
.city-category-chip.active {
  color: var(--primary);
}

.city-filter-row.active .city-radio-dot {
  border-color: var(--primary);
  background: var(--primary);
  box-shadow: inset 0 0 0 2px var(--card);
}

.city-category-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.city-category-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2rem;
  border: 1px solid
    color-mix(in hsl, var(--category-color, var(--border)), var(--border) 64%);
  padding: 0.35rem 0.65rem;
  background: color-mix(in hsl, var(--card) 86%, transparent);
  font-size: 0.78rem;
  font-weight: var(--weight-label);
  text-transform: uppercase;
}

.city-category-chip.active {
  border-color: var(--category-color, var(--primary));
  background:
    linear-gradient(
      180deg,
      color-mix(in hsl, var(--category-color, var(--primary)) 12%, transparent),
      transparent 62%
    ),
    color-mix(in hsl, var(--primary) 12%, var(--card));
  box-shadow:
    inset 0 -3px 0 var(--category-color, var(--primary)),
    0 0 0 1px
      color-mix(in hsl, var(--category-color, var(--primary)) 24%, transparent);
}

.city-category-chip.active::after {
  width: 0.36rem;
  height: 0.36rem;
  border-radius: 999px;
  background: var(--category-color, var(--primary));
  content: '';
}

.city-category-chip.active .city-category-icon {
  transform: translateY(-1px);
}

.city-category-icon {
  flex: 0 0 auto;
  background-image: url('/map-assets/protomaps/sprites/v4/light.png');
  background-repeat: no-repeat;
  background-size: 256px 114px;
  filter: var(
    --category-icon-shadow,
    drop-shadow(0 1px 1px hsl(0 0% 0% / 20%))
  );
}

.city-category-all {
  --category-color: var(--foreground);
}

.city-category-food {
  --category-color: var(--category-food);
}

.city-category-park {
  --category-color: var(--category-park);
}

.city-category-nightlife {
  --category-color: var(--category-nightlife);
}

.city-category-culture {
  --category-color: var(--category-culture);
}

.city-category-other {
  --category-color: var(--category-other);
}

.city-map-stage {
  min-width: 0;
  background: var(--city-map-stage-bg);
}

.city-map-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.5rem;
  border-bottom: 1px solid var(--city-map-bar-border);
  background: var(--city-map-bar-bg);
  padding: 0.9rem 1.25rem;
  color: var(--city-map-bar-fg);
}

.city-map-bar h2 {
  margin-top: 0.1rem;
  font-size: 1.25rem;
}

.map-panel-console {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.map-panel-console > :first-child {
  display: none;
}

.map-panel-console .map-frame {
  height: 520px;
  min-height: 420px;
  border: 0;
  border-radius: 0;
}

.city-map-marker svg,
.city-legend-dot svg,
.city-pin-symbol svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.city-legend-sprite {
  flex: 0 0 auto;
  background-image: url('/map-assets/protomaps/sprites/v4/light.png');
  background-repeat: no-repeat;
  background-size: 256px 114px;
  filter: var(--sprite-shadow);
}

.city-fallback-pin {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  max-width: 11rem;
  transform: translate(-50%, -50%);
  border: 1px solid var(--fallback-pin-border);
  background: var(--fallback-pin-bg);
  color: var(--fallback-pin-fg);
  padding: 0.35rem 0.5rem;
  font-size: 0.74rem;
  font-weight: var(--weight-label);
  box-shadow: var(--fallback-pin-shadow);
}

.city-pin-symbol {
  display: grid;
  place-items: center;
  width: 1rem;
  height: 1rem;
  color: var(--pin-color, var(--category-other));
}

.city-fallback-pin-food,
.city-legend-food {
  --pin-color: var(--category-food);
}

.city-fallback-pin-park,
.city-legend-park {
  --pin-color: var(--category-park);
}

.city-fallback-pin-culture,
.city-legend-culture {
  --pin-color: var(--category-culture);
}

.city-fallback-pin-nightlife,
.city-legend-nightlife {
  --pin-color: var(--category-nightlife);
}

.city-fallback-pin-event,
.city-legend-event {
  --pin-color: var(--marker-event);
}

.city-section {
  padding: 2.25rem 2.5rem;
  border-bottom: 1px solid var(--border);
  background: color-mix(in hsl, var(--background) 92%, var(--card));
}

.city-section:nth-of-type(even) {
  background: color-mix(in hsl, var(--card) 86%, var(--background));
}

.city-section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.city-section-header h2 {
  font-size: 1.65rem;
}

.city-design-section-header {
  align-items: center;
}

.city-design-section-header > div {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}

.city-design-section-header h2 {
  color: var(--foreground);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: var(--weight-heading);
  text-transform: uppercase;
}

.city-section-mark {
  width: 1.25rem;
  height: 3px;
  background: var(--primary);
}

.city-section-action {
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: var(--weight-label);
  text-transform: uppercase;
}

.city-section-action:hover {
  color: var(--foreground);
}

.city-section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.35rem;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: var(--weight-label);
  text-transform: uppercase;
}

.city-curated {
  background:
    linear-gradient(
      135deg,
      color-mix(in hsl, var(--primary) 10%, transparent),
      transparent 38%
    ),
    color-mix(in hsl, var(--card) 82%, var(--background));
}

.city-curated-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.city-curated-panel {
  display: grid;
  gap: 1rem;
  min-width: 0;
  border: 1px solid color-mix(in hsl, var(--border), var(--primary) 18%);
  background:
    var(--panel-glint), color-mix(in hsl, var(--card) 94%, var(--background));
  padding: 1rem;
  box-shadow: var(--shadow-edge);
}

.city-curated-panel-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
}

.city-curated-section-icon,
.city-curated-item-icon {
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in hsl, var(--primary), var(--border) 38%);
  background: color-mix(in hsl, var(--primary) 12%, var(--card));
  color: var(--primary);
}

.city-curated-section-icon {
  width: 2.25rem;
  height: 2.25rem;
}

.city-curated-panel h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: var(--weight-heading);
  line-height: 1;
  text-transform: uppercase;
}

.city-curated-panel p {
  margin: 0.25rem 0 0;
  color: var(--muted-foreground);
  font-size: 0.86rem;
  line-height: 1.45;
}

.city-curated-list {
  display: grid;
  gap: 0.65rem;
}

.city-curated-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.65rem;
  min-width: 0;
  border: 1px solid color-mix(in hsl, var(--border), transparent 18%);
  background: color-mix(in hsl, var(--background) 76%, transparent);
  padding: 0.72rem;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.city-curated-item:hover {
  border-color: color-mix(in hsl, var(--primary), var(--border) 24%);
  background: color-mix(in hsl, var(--primary) 8%, var(--card));
  transform: translateY(-1px);
}

.city-curated-item:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 2px;
}

.city-curated-item-icon {
  width: 1.9rem;
  height: 1.9rem;
  color: var(--pin-color, var(--primary));
}

.city-curated-copy {
  display: grid;
  min-width: 0;
  gap: 0.22rem;
}

.city-curated-copy strong {
  overflow: hidden;
  color: var(--foreground);
  font-size: 0.94rem;
  font-weight: var(--weight-strong);
  line-height: 1.22;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.city-curated-copy > span:last-child {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted-foreground);
  font-size: 0.8rem;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.city-curated-item-topline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  color: var(--primary);
  font-size: 0.68rem;
  font-weight: var(--weight-label);
  text-transform: uppercase;
}

.city-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.place-card {
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--card-foreground);
  box-shadow: var(--shadow-edge);
}

.place-card-photo {
  position: relative;
  display: grid;
  place-items: center;
  height: 92px;
  border-bottom: 1px solid var(--border);
  background: var(--place-photo-bg);
}

.place-card-photo::before {
  position: absolute;
  inset: 0;
  background: var(--place-photo-glint);
  content: '';
}

.place-card-photo span {
  position: relative;
  color: var(--muted-foreground);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.68rem;
  text-transform: lowercase;
}

.place-card-photo strong {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: var(--place-initial-bg);
  color: var(--place-initial-fg);
  padding: 0.12rem 0.48rem;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: var(--weight-label);
}

.place-card-body {
  padding: 0.75rem 0.85rem 0.85rem;
}

.place-card-meta {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  margin-bottom: 0.4rem;
  color: var(--muted-foreground);
  font-size: 0.75rem;
}

.place-card-category {
  flex: 0 0 auto;
  border: 1px solid var(--place-accent, var(--muted-foreground));
  color: var(--place-accent, var(--muted-foreground));
  padding: 0.08rem 0.38rem;
  font-family: var(--font-sans);
  font-size: 0.66rem;
  font-weight: var(--weight-label);
  text-transform: uppercase;
}

.place-card h3 {
  margin: 0 0 0.3rem;
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: var(--weight-strong);
  line-height: 1.2;
}

.place-card p {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 0.83rem;
  line-height: 1.42;
}

.place-card-vibe {
  margin-top: 0.55rem !important;
  color: color-mix(
    in hsl,
    var(--foreground),
    var(--muted-foreground) 34%
  ) !important;
  font-size: 0.78rem !important;
  font-weight: var(--weight-body);
}

.place-card-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.7rem;
}

.place-card-actions button {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  border: 0;
  background: transparent;
  color: var(--muted-foreground);
  padding: 0;
  font-size: 0.75rem;
  font-weight: var(--weight-body);
  cursor: pointer;
}

.place-card-actions button:hover {
  color: var(--place-accent, var(--primary));
}

.place-card-food {
  --place-accent: var(--place-food);
}

.place-card-park {
  --place-accent: var(--place-park);
}

.place-card-culture {
  --place-accent: var(--place-culture);
}

.place-card-nightlife {
  --place-accent: var(--place-nightlife);
}

.place-card-other {
  --place-accent: var(--place-other);
}

.city-split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 1rem;
  align-items: start;
}

.city-list-stack {
  display: grid;
  gap: 0.85rem;
}

.city-topic-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.city-tools {
  background: var(--background);
}

.city-guest-panel {
  border: 1px solid var(--border);
  background: color-mix(in hsl, var(--card) 84%, var(--background));
  padding: 1.25rem;
  box-shadow: var(--shadow-edge);
}

.city-guest-panel h3 {
  margin: 0 0 0.45rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: var(--weight-heading);
  text-transform: uppercase;
}

.city-guest-panel p {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 0.92rem;
  font-weight: var(--weight-body);
  line-height: 1.5;
}

@media (max-width: 1100px) {
  .city-masthead-row {
    align-items: flex-start;
  }

  .city-status-panel {
    align-self: flex-start;
    padding-bottom: 0;
  }

  .city-split-section {
    grid-template-columns: 1fr;
  }

  .city-console {
    grid-template-columns: 1fr;
  }

  .city-filter-rail {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .city-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .city-page {
    grid-template-columns: 1fr;
  }

  .city-nav-rail {
    position: sticky;
    height: auto;
    flex-direction: row;
    justify-content: flex-start;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--nav-border);
    padding: 0.7rem;
  }

  .city-nav-mark {
    margin: 0 0.4rem 0 0;
    flex: 0 0 auto;
  }

  .city-nav-items {
    display: flex;
    order: 2;
    width: auto;
    min-width: max-content;
  }

  .city-nav-item,
  .city-theme-toggle,
  .city-login-toggle {
    width: 4.3rem;
    border-left: 0;
    border-bottom: 3px solid transparent;
  }

  .city-nav-item:hover,
  .city-theme-toggle:hover,
  .city-theme-toggle[aria-checked='true'],
  .city-login-toggle:hover,
  .city-login-toggle[aria-checked='true'] {
    border-left-color: transparent;
    border-bottom-color: var(--primary);
  }

  .city-nav-actions {
    display: flex;
    order: 1;
    margin: 0 0.2rem 0 0;
    flex: 0 0 auto;
    width: auto;
  }

  .city-masthead-content,
  .city-search-band,
  .city-section {
    padding-inline: 1rem;
  }

  .city-masthead-row {
    display: grid;
    gap: 1rem;
  }

  .city-status-panel {
    flex-wrap: wrap;
    gap: 0.65rem 1rem;
  }

  .city-weather-readout,
  .city-time-readout {
    font-size: 0.78rem;
  }

  .city-name {
    font-size: 3.3rem;
  }

  .city-card-grid,
  .city-curated-grid,
  .city-topic-bar {
    grid-template-columns: 1fr;
  }

  .map-panel-console .map-frame {
    height: 430px;
  }
}

/* Explore page --------------------------------------------------------- */

.explore-city-label {
  margin: 0 0 0.2rem;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: var(--weight-strong);
}

.explore-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
}

.explore-location {
  display: grid;
  justify-items: end;
  gap: 0.5rem;
  max-width: 22rem;
  text-align: right;
}

.explore-location-message {
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
  margin: 0;
  color: var(--muted-foreground);
  font-size: 0.75rem;
  line-height: 1.4;
}

.explore-location-message svg {
  flex: 0 0 auto;
  margin-top: 0.1rem;
  color: var(--accent);
}

.icon-spin {
  display: inline-flex;
}

.icon-spin svg {
  animation: explore-icon-spin 0.9s linear infinite;
}

@keyframes explore-icon-spin {
  to {
    transform: rotate(360deg);
  }
}

.explore-guide-list,
.explore-mode-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.explore-guide-summary {
  margin: 0;
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius);
  background: color-mix(in hsl, var(--secondary) 55%, transparent);
  color: var(--muted-foreground);
  font-size: 0.75rem;
  line-height: 1.4;
}

.explore-neighborhood-note {
  margin: 0;
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius);
  background: color-mix(in hsl, var(--secondary) 55%, transparent);
  color: var(--muted-foreground);
  font-size: 0.75rem;
  line-height: 1.4;
}

.explore-map-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.explore-map-bar h2 {
  margin: 0;
  font-size: 1.05rem;
}

.explore-map-status {
  display: block;
  margin-top: 0.2rem;
  color: var(--muted-foreground);
  font-size: 0.78rem;
}

.explore-compass-button {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: color-mix(in hsl, var(--card) 92%, var(--background));
  color: var(--foreground);
  cursor: pointer;
  transition: background 160ms ease;
}

.explore-compass-button:hover {
  background: color-mix(in hsl, var(--secondary) 70%, transparent);
}

.explore-compass-button svg {
  transition: transform 160ms ease;
}

.explore-detail {
  margin-top: 1rem;
  padding: 1rem;
}

.explore-detail-empty {
  display: grid;
  min-height: 6rem;
  place-items: center;
  color: var(--muted-foreground);
  font-size: 0.875rem;
  text-align: center;
}

.explore-detail-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.explore-detail-score {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: var(--weight-strong);
}

.explore-detail-title {
  margin: 0.4rem 0 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: var(--weight-heading);
}

.explore-detail-meta {
  margin: 0.2rem 0 0;
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

.explore-detail-description {
  margin: 0.75rem 0 0;
  color: var(--muted-foreground);
  font-size: 0.875rem;
  line-height: 1.6;
}

.explore-detail-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

/* Ported from explore-map.svelte's scoped .city-user-location-marker style. */
.city-user-location-marker {
  position: relative;
  width: 24px;
  height: 24px;
  border: 3px solid var(--primary-foreground);
  border-radius: 999px;
  background: var(--primary);
  box-shadow:
    0 0 0 2px color-mix(in hsl, var(--primary) 35%, transparent),
    0 12px 24px color-mix(in hsl, var(--foreground) 28%, transparent);
}

.city-user-location-marker::before {
  position: absolute;
  inset: -12px;
  content: '';
  border: 1px solid color-mix(in hsl, var(--primary) 45%, transparent);
  border-radius: 999px;
  animation: city-user-location-pulse 1.8s ease-out infinite;
}

.city-user-location-marker::after {
  position: absolute;
  inset: 5px;
  content: '';
  border-radius: 999px;
  background: var(--primary-foreground);
}

@keyframes city-user-location-pulse {
  0% {
    opacity: 0.8;
    transform: scale(0.7);
  }
  100% {
    opacity: 0;
    transform: scale(1.35);
  }
}

@media (prefers-reduced-motion: reduce) {
  .city-user-location-marker::before,
  .icon-spin svg {
    animation: none;
  }
}

@media (max-width: 700px) {
  .explore-location {
    justify-items: start;
    max-width: none;
    text-align: left;
  }
}

/* Bengaluru Atmosphere Group (explore) ----------------------------------- */

.group-panel {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding: 1rem;
  border-left: 3px solid var(--primary);
}

.group-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.group-handle {
  display: inline-block;
  max-width: 100%;
  margin-top: 0.15rem;
  overflow-wrap: anywhere;
  color: var(--primary);
  font-size: 0.8125rem;
  font-weight: var(--weight-label);
}

.group-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin: 0;
}

.group-counts div {
  display: flex;
  flex-direction: row-reverse;
  align-items: baseline;
  gap: 0.3rem;
}

.group-counts dt {
  color: var(--muted-foreground);
  font-size: 0.8125rem;
}

.group-counts dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: var(--weight-heading);
}

.group-status,
.group-message {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 0.8125rem;
  line-height: 1.45;
}

.group-status[data-tone='warning'] {
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius);
  background: color-mix(in hsl, var(--warning), transparent 86%);
  color: var(--foreground);
}

.group-status[data-tone='success'],
.group-message[data-tone='success'] {
  color: var(--success);
  font-weight: var(--weight-label);
}

.group-message[data-tone='error'] {
  color: var(--destructive);
  font-weight: var(--weight-label);
}

.group-message:empty {
  display: none;
}

.group-admin,
.group-join {
  display: grid;
  gap: 0.5rem;
  justify-items: start;
}

.group-admin p {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 0.8125rem;
  line-height: 1.45;
}

.group-join .filter,
.group-join textarea {
  width: 100%;
}

.group-byline {
  margin: 0.15rem 0 0;
  color: var(--muted-foreground);
  font-size: 0.78rem;
}

.event[data-source='group'] {
  border-left: 3px solid var(--primary);
}

/* Detail card for a group place */

.group-detail-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
}

.explore-detail-score.muted {
  color: var(--muted-foreground);
  font-weight: var(--weight-label);
}

.group-tags,
.group-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem 0.75rem;
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}

.group-tags {
  gap: 0.375rem;
}

.group-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  max-width: 100%;
  overflow-wrap: anywhere;
  font-size: 0.8125rem;
}

.group-reviews {
  display: grid;
  gap: 0.6rem;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.group-reviews h3 {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 0.76rem;
  font-weight: var(--weight-label);
  text-transform: uppercase;
}

.review-list {
  display: grid;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.review-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.6rem;
  font-size: 0.8125rem;
}

.review-author {
  font-weight: var(--weight-strong);
  overflow-wrap: anywhere;
}

.review-stars {
  color: var(--accent);
  letter-spacing: 0.05em;
}

.review-date {
  color: var(--muted-foreground);
  font-size: 0.75rem;
}

.review-text {
  margin: 0.2rem 0 0;
  color: var(--muted-foreground);
  font-size: 0.875rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.review-form,
.group-form {
  display: grid;
  gap: 0.75rem;
}

.rating-input,
.group-location {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.rating-input {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.rating-input legend,
.group-location legend {
  margin-bottom: 0.375rem;
  padding: 0;
  color: var(--muted-foreground);
  font-size: 0.75rem;
  font-weight: var(--weight-label);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.rating-option {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-width: 2.75rem;
  min-height: 2.25rem;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: color-mix(in hsl, var(--card) 86%, transparent);
  font-size: 0.875rem;
  font-weight: var(--weight-label);
  cursor: pointer;
}

.rating-option input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}

.rating-option:has(input:checked) {
  border-color: var(--accent);
  background: color-mix(in hsl, var(--accent), transparent 86%);
  color: var(--accent);
}

.rating-option:has(input:focus-visible) {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

.form-field {
  display: grid;
  gap: 0.3rem;
}

.form-row {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
}

.group-location {
  display: grid;
  gap: 0.4rem;
  padding: 0.75rem;
  border: 1px dashed color-mix(in hsl, var(--primary), transparent 50%);
  border-radius: var(--radius);
  background: color-mix(in hsl, var(--primary), transparent 94%);
}

.group-location .ghost-button {
  justify-self: start;
}

.group-latlng {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: 1fr 1fr;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.map-frame.picking {
  outline: 2px dashed var(--accent);
  outline-offset: 3px;
}

.city-pick-marker {
  cursor: grab;
}
