/**
 * Cities tile → Uniqlo-style city sub-page (golden-ratio split).
 * Right panel colors match home-flock / InvitationCardPalette.
 */
.city-panel {
  --cp-major: 61.8%;
  --cp-minor: 38.2%;
  --cp-ink: #1e1b18;
  --cp-paper: #f2eee8;
  --cp-bg: #f5be41;
  --cp-fg: #1e1b18;
  --cp-line: rgba(30, 27, 24, 0.22);
  --cp-muted: rgba(30, 27, 24, 0.72);

  position: fixed;
  inset: 0;
  z-index: 12000;
  display: none;
  font-family: Poppins, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  color: var(--cp-fg);
  background: #0a0a0a;
}

.city-panel.is-open {
  display: flex;
  flex-direction: row;
}

.city-panel[data-dark="true"] {
  --cp-line: rgba(242, 238, 232, 0.28);
  --cp-muted: rgba(242, 238, 232, 0.78);
}

.city-panel__media {
  position: relative;
  flex: 0 0 var(--cp-major);
  width: var(--cp-major);
  height: 100%;
  overflow: hidden;
  background: #111;
}

.city-panel__video,
.city-panel__poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.9s ease;
}

.city-panel__video.is-on,
.city-panel__poster.is-on {
  opacity: 1;
}

.city-panel__caption {
  position: absolute;
  left: 1.1rem;
  bottom: 1rem;
  right: 5rem;
  margin: 0;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.88);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

/* Licence credit for a clip the editor replaced (CC BY / CC BY-SA need this).
   Deliberately a separate class from .city-panel__credit, which is the
   "Weather data by Open-Meteo" line in the panel footer. */
.city-panel__clip-credit {
  position: absolute;
  left: 1.1rem;
  bottom: 2.35rem;
  right: 5rem;
  margin: 0;
  font-size: 10px;
  line-height: 1.4;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.6);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}
.city-panel__clip-credit[hidden] { display: none; }
.city-panel__clip-credit a {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: underline;
  text-underline-offset: 2px;
  /* The line itself ignores pointer events so it never blocks the video
     controls; the licence link stays clickable. */
  pointer-events: auto;
}

.city-panel__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 3;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.42);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  backdrop-filter: blur(8px);
  transition: opacity 0.18s ease, background 0.18s ease;
}

/* The east arrow shares the close button's corner on short (phone) media, so
   the close steps aside while a swipe is in flight. */
.city-panel.is-swiping .city-panel__close {
  opacity: 0;
  pointer-events: none;
}

.city-panel__close .ms {
  font-size: 22px;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
}

.city-panel__close:hover {
  background: rgba(0, 0, 0, 0.62);
}

.city-panel__side {
  flex: 0 0 var(--cp-minor);
  width: var(--cp-minor);
  height: 100%;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  grid-template-rows: minmax(38%, auto) 1fr auto auto;
  background: var(--cp-bg);
  color: var(--cp-fg);
  box-sizing: border-box;
  border-left: 1px solid var(--cp-line);
}

.city-panel__cell {
  position: relative;
  min-height: 0;
  border-right: 1px solid var(--cp-line);
  border-bottom: 1px solid var(--cp-line);
  box-sizing: border-box;
}

.city-panel__cell--date {
  grid-column: 1;
  grid-row: 1;
  position: relative;
  text-align: center;
}

/* Two stacked layers: calendar and weather alternate every 7s. */
.city-panel__layer {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(10px, 1.9vw, 24px) 0.5rem;
  opacity: 0;
  visibility: hidden;
}

.city-panel__layer.is-on {
  opacity: 1;
  visibility: visible;
  animation: cp-pop 0.18s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* Pop in, then a short two-beat settle — deliberately restrained. */
@keyframes cp-pop {
  0%   { opacity: 0; transform: scale(0.88) translateY(6px); }
  50%  { opacity: 1; transform: scale(1.03) translateY(0); }
  70%  { transform: scale(0.992) rotate(-0.55deg); }
  86%  { transform: scale(1.006) rotate(0.38deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}

/* Weather layer — Material Symbols (MD3) bold, FILL 1 / wght 700. */
.cp-weather__icons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  margin: 0 0 0.5rem;
}

.cp-wicon {
  font-family: "Material Symbols Outlined";
  font-weight: normal;
  font-style: normal;
  line-height: 1;
  display: inline-block;
  font-variation-settings: "FILL" 1, "wght" 700, "GRAD" 0, "opsz" 48;
  /* Most states are one condition, so the glyph carries the whole cell. */
  font-size: clamp(44px, 5vw, 72px);
  user-select: none;
}

/* Cloud-bearing and moon-bearing weather glyphs render as outline (FILL 0) for
   a wireframe look; sun / fog stay filled so the row keeps one clear focal point. */
.cp-wicon.cp-wicon--outline {
  font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 48;
}

/* Compound states keep two half-size glyphs either side of the slash. */
.cp-weather__icons--pair .cp-wicon {
  font-size: clamp(30px, 3.6vw, 50px);
}

.cp-weather__slash {
  display: block;
  width: 2px;
  height: clamp(34px, 3.9vw, 54px);
  background: currentColor;
  border-radius: 2px;
  transform: rotate(21deg);
  margin: 0 5px;
}

.cp-weather__label {
  margin: 0;
  font-size: clamp(12px, 1.1vw, 16px);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.25;
  text-transform: uppercase;
  max-width: 100%;
}

/* Temperature sits to the right of the glyph+label, split by a vertical bar. */
.cp-weather {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
}

.cp-weather__main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Sits between the glyph column and the temperature. It used to stretch from
   the top of the row and stop at max-height, which left its centre well above
   the middle of the cell. Centring it in the row puts its centre on the cell
   centre, level with the temperature it separates. */
.cp-weather__divider {
  flex: 0 0 auto;
  align-self: center;
  width: 2px;
  height: clamp(40px, 5vw, 64px);
  background: currentColor;
  opacity: 0.45;
  border-radius: 2px;
}

.cp-weather__temp {
  flex: 0 0 auto;
  font-size: clamp(22px, 2.6vw, 34px);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.city-panel__month,
.city-panel__weekday {
  margin: 0;
  font-size: clamp(11px, 1.05vw, 15px);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.15;
}

.city-panel__day {
  margin: 0.12em 0;
  font-size: clamp(64px, 9.2vw, 128px);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.03em;
}

.city-panel__clock {
  margin: 0.45rem 0 0;
  font-size: clamp(13px, 1.2vw, 18px);
  font-weight: 600;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  opacity: 0.95;
}

.city-panel__cell--meta {
  grid-column: 1;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: clamp(14px, 1.8vw, 24px);
  gap: 0.35rem;
}

.city-panel__city {
  margin: auto 0 0;
  font-size: clamp(18px, 1.85vw, 28px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.city-panel__place {
  margin: 0;
  font-size: clamp(11px, 1vw, 14px);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cp-muted);
}

/* Country · continent on the left, lat/lng pinned to its right. */
.city-panel__geo {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.city-panel__coords {
  margin: 0;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: clamp(10px, 0.85vw, 12px);
  font-weight: 500;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--cp-muted);
  white-space: nowrap;
}

/* ——— wireframe world map with a radar pin ——— */
.cp-map-wrap {
  flex: 0 0 auto;
  margin: 0 0 0.35rem;
}

.cp-map {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.cp-map__grid line {
  stroke: currentColor;
  stroke-width: 0.4;
  opacity: 0.12;
}

.cp-map__land path {
  fill: none;
  stroke: currentColor;
  stroke-width: 0.7;
  stroke-linejoin: round;
  stroke-linecap: round;
  opacity: 0.32;
}

.cp-map__cross {
  stroke: currentColor;
  stroke-width: 0.9;
  opacity: 0.6;
}

.cp-map__dot {
  fill: currentColor;
}

/* Two staggered rings expand outward like a radar sweep. */
.cp-map__ping {
  fill: none;
  stroke: currentColor;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  transform-box: fill-box;
  transform-origin: center;
  animation: cp-ping 2.6s ease-out infinite;
}

.cp-map__ping--2 {
  animation-delay: 1.3s;
}

@keyframes cp-ping {
  0% {
    transform: scale(0.22);
    opacity: 0.9;
  }
  70% {
    opacity: 0;
  }
  100% {
    transform: scale(2.6);
    opacity: 0;
  }
}

.city-panel__cell--invites {
  grid-column: 2;
  grid-row: 1 / 4;
  border-right: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

/* ——— links grid: also the tab control for the right column ——— */
.city-panel__cell--links {
  grid-column: 1;
  grid-row: 3;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 0;
}

.city-panel__link {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 2.6rem;
  padding: 0.55rem 0.85rem;
  border: 0;
  border-right: 1px solid var(--cp-line);
  border-bottom: 1px solid var(--cp-line);
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  font-size: clamp(10px, 0.85vw, 12px);
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  line-height: 1.25;
  -webkit-tap-highlight-color: transparent;
}

.city-panel__link:nth-child(2n) {
  border-right: 0;
}

.city-panel__link:hover {
  background: rgba(255, 255, 255, 0.12);
}

.city-panel[data-dark="false"] .city-panel__link:hover {
  background: rgba(0, 0, 0, 0.06);
}

.city-panel__link.is-on {
  font-weight: 700;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 2px 0 0 currentColor;
}

.city-panel[data-dark="false"] .city-panel__link.is-on {
  background: rgba(0, 0, 0, 0.09);
}

.cp-tabs__body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.cp-tabpane {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0.75rem;
}

/* `hidden` loses to `display:flex`, so restore it explicitly. */
.cp-tabpane[hidden] {
  display: none;
}

.cp-tabpane.is-on {
  animation: cp-tab-in 0.34s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes cp-tab-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Places pane — venues projected out of the invitation addresses. */
.cp-place {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.6rem 0.7rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: inherit;
  text-decoration: none;
}

.city-panel[data-dark="false"] .cp-place {
  background: rgba(0, 0, 0, 0.05);
}

.cp-place:hover {
  background: rgba(255, 255, 255, 0.17);
}

.cp-place__icon {
  font-size: 17px;
  opacity: 0.85;
  margin-top: 1px;
}

.cp-place__text {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}

.cp-place__name {
  font-size: clamp(12px, 1vw, 14px);
  font-weight: 600;
  line-height: 1.25;
}

.cp-place__addr {
  font-size: clamp(10px, 0.85vw, 12px);
  opacity: 0.72;
  line-height: 1.3;
}

/* Explore pane — facts then ways out. */
.cp-facts {
  margin: 0;
  display: flex;
  flex-direction: column;
}

.cp-fact {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--cp-line);
}

.cp-fact:last-child {
  border-bottom: 0;
}

.cp-fact dt {
  font-size: clamp(9px, 0.78vw, 11px);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.62;
  white-space: nowrap;
}

.cp-fact dd {
  margin: 0;
  font-size: clamp(11px, 0.9vw, 13px);
  font-weight: 600;
  text-align: right;
  word-break: break-word;
}

.cp-action {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.6rem;
  border-radius: 10px;
  border: 1px solid var(--cp-line);
  color: inherit;
  text-decoration: none;
  font-size: clamp(11px, 0.9vw, 13px);
  font-weight: 600;
}

.cp-action:hover {
  background: rgba(255, 255, 255, 0.12);
}

.city-panel[data-dark="false"] .cp-action:hover {
  background: rgba(0, 0, 0, 0.06);
}

/* Shrinkable label keeps the trailing arrow on screen in the narrow column. */
.cp-action__label {
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.25;
}

.cp-action__go {
  flex: 0 0 auto;
  font-size: 14px;
  opacity: 0.6;
}

/* Cities pane — every catalog city, current one marked. */
.cp-cities {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.cp-city {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  width: 100%;
  padding: 0.42rem 0.55rem;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.cp-city:hover {
  background: rgba(255, 255, 255, 0.12);
}

.city-panel[data-dark="false"] .cp-city:hover {
  background: rgba(0, 0, 0, 0.06);
}

.cp-city.is-on {
  background: rgba(255, 255, 255, 0.2);
  box-shadow: inset 2px 0 0 currentColor;
}

.city-panel[data-dark="false"] .cp-city.is-on {
  background: rgba(0, 0, 0, 0.1);
}

.cp-city__name {
  font-size: clamp(12px, 0.95vw, 14px);
  font-weight: 600;
  line-height: 1.2;
}

.cp-city.is-on .cp-city__name {
  font-weight: 700;
}

.cp-city__meta {
  font-size: clamp(9px, 0.75vw, 11px);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.62;
  line-height: 1.2;
}

/* Promo panes (Download app, Ambassadors). */
.cp-promo {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.cp-promo__icon {
  font-size: 26px;
  opacity: 0.85;
}

.cp-promo__title {
  margin: 0;
  font-size: clamp(13px, 1.05vw, 16px);
  font-weight: 700;
  line-height: 1.25;
}

.cp-promo__body {
  margin: 0;
  font-size: clamp(11px, 0.9vw, 13px);
  line-height: 1.4;
  opacity: 0.78;
}

/* ——— compass arrows ——— */
.cp-nav {
  display: none;
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  --cp-swipe: 0;
}

@media (hover: hover) and (pointer: fine) {
  .cp-nav {
    display: block;
  }
}

/* Touch: hidden at rest, lit for the direction being dragged. The armed arrow
   sits exactly where the laptop arrow does, so the gesture and the click read
   as the same control. */
.city-panel.is-swiping .cp-nav {
  display: block;
}

.city-panel.is-swiping .cp-nav__btn {
  opacity: 0;
  pointer-events: none;
}

.city-panel.is-swiping .cp-nav__btn.is-armed {
  opacity: 1;
  background: #f2eee8;
  color: #16130f;
  box-shadow: 0 0 0 4px rgba(242, 238, 232, 0.22), 0 10px 26px rgba(0, 0, 0, 0.34);
}

/* Same dial as the close button: same diameter, no ring, same veil and glyph
   weight, so the two read as one family of controls. */
.cp-nav__btn {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.42);
  color: #fff;
  cursor: pointer;
  pointer-events: auto;
  opacity: 0.86;
  backdrop-filter: blur(8px);
  transition: opacity 0.18s ease, background 0.18s ease, color 0.18s ease,
    box-shadow 0.18s ease, transform 0.12s ease;
}

.cp-nav__btn:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.62);
}

.cp-nav__btn .ms {
  font-size: 14px;
  line-height: 1;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
  opacity: 0.7;
}

/* Heaviest direction letter, shown inside the compass dial. */
.cp-nav__letter {
  margin-top: 1px;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 900;
  font-size: 15px;
  line-height: 1;
  letter-spacing: 0;
  pointer-events: none;
}

.cp-nav__btn--n {
  top: 16px;
  left: 50%;
  transform: translateX(-50%) scale(calc(1 + 0.22 * var(--cp-swipe, 0)));
}

.cp-nav__btn--s {
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%) scale(calc(1 + 0.22 * var(--cp-swipe, 0)));
}

.cp-nav__btn--w {
  left: 16px;
  top: 50%;
  transform: translateY(-50%) scale(calc(1 + 0.22 * var(--cp-swipe, 0)));
}

.cp-nav__btn--e {
  right: 16px;
  top: 50%;
  transform: translateY(-50%) scale(calc(1 + 0.22 * var(--cp-swipe, 0)));
}

.city-panel__invites-empty {
  margin: auto;
  padding: 1rem;
  text-align: center;
  font-size: clamp(11px, 0.95vw, 13px);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cp-muted);
  line-height: 1.4;
}

.city-panel__invite {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.85rem 0.9rem 0.75rem;
  border-radius: 12px;
  background: var(--inv-bg, rgba(255, 255, 255, 0.18));
  color: var(--inv-fg, var(--cp-fg));
  text-decoration: none;
  min-height: 6.5rem;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

.city-panel__invite-title {
  font-size: clamp(13px, 1.05vw, 15.5px);
  font-weight: 600;
  line-height: 1.25;
}

.city-panel__invite-meta {
  font-size: clamp(11px, 0.9vw, 13px);
  font-weight: 400;
  opacity: 0.78;
  line-height: 1.3;
}

.city-panel__invite-foot {
  margin-top: auto;
  font-size: clamp(11px, 0.85vw, 12px);
  font-weight: 500;
  opacity: 0.85;
}

.city-panel__foot {
  grid-column: 1 / -1;
  grid-row: 4;
  border-right: 0;
  border-bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.55rem 0.9rem;
  font-size: clamp(10px, 0.8vw, 12px);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.city-panel__foot a {
  color: inherit;
  text-decoration: none;
}

.city-panel__credit {
  font-size: 0.92em;
  font-weight: 500;
  letter-spacing: 0.05em;
  opacity: 0.72;
  text-transform: none;
  white-space: nowrap;
}

.city-panel__credit a {
  border-bottom: 1px solid currentColor;
}

body.city-panel-lock {
  overflow: hidden;
}

.tile__city {
  cursor: pointer;
}

.tile__city:focus-visible {
  outline: 2px solid #6c2624;
  outline-offset: 2px;
}

@media screen and (max-width: 991px) {
  /* The whole panel is locked to the viewport; inner cells scroll instead of
     the page pushing the tab bar out of view (e.g. a city with many invites). */
  .city-panel.is-open {
    flex-direction: column;
    /* 100dvh tracks the address bar: the panel always fills exactly what is
       visible, whether the bar is shown or hidden (elastic, gap-free).
       svh is kept first as a fallback for browsers without dvh support. */
    height: 100svh;
    height: 100dvh;
    max-height: 100svh;
    max-height: 100dvh;
    overflow: hidden;
  }

  /* The photo takes a fixed share and gives up the rest to the info column.
     Sized in dvh so the media share stays proportional to the address-bar-aware
     viewport, matching the panel height. svh kept first as a fallback. */
  .city-panel__media {
    flex: 0 0 auto;
    width: 100%;
    height: clamp(20svh, 28svh, 32svh);
    height: clamp(20dvh, 28dvh, 32dvh);
    min-height: 18svh;
    min-height: 18dvh;
  }

  .city-panel__side {
    flex: 1 1 auto;
    width: 100%;
    height: auto;
    min-height: 0;
    border-left: 0;
    border-top: 1px solid var(--cp-line);
    grid-template-columns: 1.05fr 0.95fr;
    /* Row 2 is the flexible track. The invites cell spans rows 1–3, so it is
       bounded by the side height and its inner tab body scrolls; the date,
       tab bar and foot stay fixed and reachable. */
    grid-template-rows: auto minmax(0, 1fr) auto auto;
  }

  .city-panel__cell--invites {
    min-height: 0;
  }

  /* Both date faces are absolutely positioned, so an `auto` row has no
     intrinsic height and collapses — the calendar and the weather then spill
     out of the cell. Give the row a floor sized to the taller face. */
  .city-panel__cell--date {
    min-height: clamp(120px, 18svh, 168px);
    min-height: clamp(120px, 18dvh, 168px);
  }

  /* The map is the one element here that can give up width without losing its
     meaning; the city name and coordinates must stay on one line. */
  .cp-map-wrap {
    max-width: 196px;
    margin: 0 auto 0.35rem;
  }

  .city-panel__day {
    font-size: clamp(52px, 15vw, 84px);
  }

  .city-panel__month,
  .city-panel__weekday {
    font-size: clamp(11px, 2.8vw, 14px);
  }

  .city-panel__link {
    min-height: 2.3rem;
    padding: 0.45rem 0.7rem;
  }

  /* Keep the gesture inside the list (no chained scroll to the page). */
  .city-panel__cell--invites,
  .cp-tabs__body {
    overscroll-behavior: contain;
  }
}

/* Very short viewports (landscape phones, small windows): the info column no
   longer fits alongside the photo, so the locator map is the first thing to go
   rather than letting cells overlap. */
@media screen and (max-width: 991px) and (max-height: 560px) {
  .cp-map-wrap {
    display: none;
  }

  .city-panel__cell--date {
    min-height: 132px;
  }

  .city-panel__day {
    font-size: clamp(44px, 12vw, 66px);
  }

  .city-panel__link {
    min-height: 2.1rem;
  }
}

/* ——— ambassador card ——— */
.cp-amb {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease;
}

.cp-amb:hover {
  background: rgba(255, 255, 255, 0.10);
}

.cp-amb__photo {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.12);
}

.cp-amb__photo--lg {
  width: 72px;
  height: 72px;
  display: block;
  margin: 0 auto 0.6rem;
}

.cp-amb__photo--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--cp-fg);
  opacity: 0.7;
}

.cp-amb__body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.cp-amb__role {
  font-size: clamp(9px, 0.75vw, 11px);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.6;
}

.cp-amb__name {
  font-size: clamp(12px, 1.05vw, 15px);
  font-weight: 600;
  line-height: 1.25;
}

.cp-amb__hint {
  font-size: clamp(9px, 0.75vw, 11px);
  opacity: 0.45;
}

/* ——— ambassador share modal ——— */
.cp-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.cp-modal[hidden] {
  display: none;
}

.cp-modal__veil {
  position: absolute;
  inset: 0;
  background: rgba(10, 8, 6, 0.72);
  backdrop-filter: blur(8px);
}

.cp-modal__card {
  position: relative;
  width: min(380px, 92vw);
  max-height: 88vh;
  overflow: auto;
  padding: clamp(18px, 2.4vw, 28px);
  border-radius: 16px;
  background: #1a1714;
  color: #f2eee8;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  text-align: center;
}

.cp-modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #f2eee8;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.15s ease;
}

.cp-modal__close:hover {
  background: rgba(255, 255, 255, 0.18);
}

.cp-modal__role {
  margin: 0 0 0.2rem;
  font-size: clamp(9px, 0.75vw, 11px);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.55;
}

.cp-modal__name {
  margin: 0 0 0.9rem;
  font-size: clamp(16px, 1.4vw, 20px);
  font-weight: 600;
}

.cp-modal__intro {
  margin: 0 0 1rem;
  font-size: 12px;
  line-height: 1.5;
  opacity: 0.78;
}

.cp-promo__button {
  width: 100%;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.cp-place-suggestion {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  text-align: left;
}

.cp-modal__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.cp-modal__input {
  width: 100%;
  min-height: 44px;
  box-sizing: border-box;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(242, 238, 232, 0.28);
  border-radius: 9px;
  outline: none;
  background: rgba(255, 255, 255, 0.08);
  color: #f2eee8;
  font: inherit;
  font-size: 12px;
}

.cp-modal__input::placeholder {
  color: rgba(242, 238, 232, 0.46);
}

.cp-modal__input:focus {
  border-color: rgba(242, 238, 232, 0.7);
}

.cp-modal__error {
  min-height: 1.2em;
  margin: 0;
  color: #ffb4a5;
  font-size: 11px;
  line-height: 1.35;
}

.cp-modal__actions .cp-action {
  width: 100%;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.cp-modal__actions .cp-action--primary {
  background: rgba(255, 255, 255, 0.12);
}

.cp-modal__actions .cp-action:disabled {
  opacity: 0.55;
  cursor: wait;
}

.cp-place-suggestion__honeypot {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
}

.cp-modal__url {
  margin: 0.6rem 0 0;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  opacity: 0.45;
  word-break: break-all;
}

.cp-qr {
  display: inline-block;
  padding: 10px;
  border-radius: 10px;
  background: #fff;
  line-height: 0;
}

.cp-qr svg {
  display: block;
  width: clamp(140px, 18vw, 180px);
  height: auto;
}

.cp-modal__actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
}

.cp-action--primary {
  background: rgba(255, 255, 255, 0.12);
}

.cp-action--primary:hover {
  background: rgba(255, 255, 255, 0.22);
}

@media (prefers-reduced-motion: reduce) {
  .city-panel__video,
  .city-panel__poster {
    transition: none;
  }

  .city-panel__layer.is-on {
    animation: none;
  }

  .cp-tabpane.is-on {
    animation: none;
  }

  .cp-map__ping {
    animation: none;
  }
}
