/*
 * Webview 2.0 stylesheet — the single visual language for every public share/preview page
 * (author, place, guide, and the 404). Mirrors the sl-spots app's gluestack/NativeWind screens
 * 1:1 (author-view, guide-view, place-view): same color tokens, type scale, card shapes, vibe
 * pill + heart, and badges. Mobile-first single column; per-page theme set by a body class
 * (webview-page--forest / --lime / --light). Plain CSS, no build step.
 *
 * Type system mirrors the app: the brand "Unbounded" (promo) font is used ONLY for the big hero
 * titles, section headings and vibe counts — everything else is the system sans (SF Pro). The app
 * weights are preserved: author/guide title = 500 (medium), place name = 900 (black), section
 * heading = 700 (bold).
 */

/* Brand promo font — Unbounded variable woff2 subsets (latin / latin-ext / cyrillic), self-hosted.
 * The webview ships EN + RU only. These are the full-axis variable files, so the declared
 * `font-weight: 400 900` range exposes medium → black to match the app. */
@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('/webview/fonts/unbounded-latin-edd24a2b43a9a3763e35d2cafcfee422.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('/webview/fonts/unbounded-latin-ext-3859ae518d17a80be0bb0f9d66b5268a.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('/webview/fonts/unbounded-cyrillic-4cfb17abc7db68aaa8238fd287c60c96.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

:root {
  --wv-font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro', system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --wv-font-promo: 'Unbounded', var(--wv-font);

  /* Type scale (tailwind px → rem) — matches gluestack heading/text sizes. */
  --wv-text-2xs: 0.625rem;   /* 10 */
  --wv-text-xs: 0.75rem;     /* 12 */
  --wv-text-sm: 0.875rem;    /* 14 */
  --wv-text-base: 1rem;      /* 16 */
  --wv-text-lg: 1.125rem;    /* 18  (heading md) */
  --wv-text-xl: 1.25rem;     /* 20  (heading lg) */
  --wv-text-2xl: 1.5rem;     /* 24  (heading xl) */
  --wv-text-3xl: 1.875rem;   /* 30 */

  /* Spacing (gluestack HStack/VStack `space`). */
  --wv-space-1: 0.25rem;     /* 4  xs  */
  --wv-space-2: 0.5rem;      /* 8  sm  */
  --wv-space-3: 0.75rem;     /* 12 md  */
  --wv-space-4: 1rem;        /* 16 lg  */
  --wv-space-5: 1.25rem;     /* 20 xl  */
  --wv-space-6: 1.5rem;      /* 24 2xl */
  --wv-space-8: 2rem;

  /* Radii (tailwind). */
  --wv-radius-lg: 0.5rem;    /* 8  rounded-lg  */
  --wv-radius-xl: 0.75rem;   /* 12 rounded-xl  */
  --wv-radius-2xl: 1rem;     /* 16 rounded-2xl */
  --wv-radius-3xl: 1.5rem;   /* 24 rounded-3xl */
  --wv-radius-pill: 62.5rem;

  /* Palette — exact gluestack tokens. */
  --wv-lime: #d3fe6c;            /* success-500 / brand */
  --wv-lime-300: #eafea6;        /* success-300 */
  --wv-forest: #122600;          /* primary-700 */
  --wv-forest-600: #30481a;      /* primary-600 */
  --wv-primary-400: #485d35;     /* primary-400 (place tile address) */
  --wv-primary-950: #060e00;     /* primary-950 */
  --wv-surface: #ffffff;
  --wv-secondary-50: #f3f5f1;
  --wv-secondary-100: #f1f2ef;
  --wv-secondary-200: #eeefec;
  --wv-secondary-700: #a6aaa2;
  --wv-secondary-900: #676d61;
  --wv-outline-100: #e6e6e6;
  --wv-typo-700: #525252;        /* body text */
  --wv-typo-900: #262627;        /* heading text */
  --wv-error: #ef4444;           /* error-400 — vibe heart fill */

  --wv-shadow-card: 0 1px 3px rgba(18, 38, 0, 0.06), 0 6px 16px rgba(18, 38, 0, 0.06);
  --wv-shadow-avatar: 0 0 2.5rem rgba(18, 38, 0, 0.25);

  --wv-container: 30rem;

  /* Theme slots (default = light). */
  --wv-bg: var(--wv-secondary-100);
  --wv-fg: var(--wv-typo-900);
  --wv-fg-body: var(--wv-typo-700);
  --wv-fg-muted: var(--wv-secondary-900);
  --wv-header-fg: var(--wv-forest);
  --wv-glass-bg: rgba(255, 255, 255, 0.55);
  --wv-glass-fg: var(--wv-primary-950);
}

.webview-page--forest {
  --wv-bg: var(--wv-forest);
  --wv-fg: #ffffff;
  --wv-fg-body: #ffffff;
  --wv-fg-muted: rgba(255, 255, 255, 0.6);
  --wv-header-fg: #ffffff;
  --wv-glass-bg: rgba(255, 255, 255, 0.5);
  --wv-glass-fg: var(--wv-primary-950);
}

.webview-page--lime {
  --wv-bg: var(--wv-lime);
  --wv-fg: var(--wv-typo-900);
  --wv-fg-body: var(--wv-typo-700);
  --wv-fg-muted: rgba(18, 38, 0, 0.6);
  --wv-header-fg: var(--wv-forest);
  --wv-glass-bg: rgba(255, 255, 255, 0.5);
  --wv-glass-fg: var(--wv-primary-950);
}

.webview-page--light {
  --wv-bg: var(--wv-secondary-100);
  --wv-fg: var(--wv-typo-900);
  --wv-fg-body: var(--wv-typo-700);
  --wv-fg-muted: var(--wv-secondary-900);
  --wv-header-fg: var(--wv-forest);
  --wv-glass-bg: rgba(255, 255, 255, 0.55);
  --wv-glass-fg: var(--wv-primary-950);
}

*, *::before, *::after { box-sizing: border-box; }

.webview-page {
  margin: 0;
  background: var(--wv-bg);
  color: var(--wv-fg);
  font-family: var(--wv-font);
  font-size: var(--wv-text-base);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }

/* Decorative app background texture (reused screen-bg.svg), faint behind content. */
.webview-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  display: flex;
  justify-content: center;
}
.webview-bg img {
  width: min(56rem, 200%);
  max-width: none;
  opacity: 0.1;
  margin-top: -1rem;
}

/* Glass top bar (share-page chrome; not part of the app screen). */
.webview-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--wv-space-3);
  max-width: var(--wv-container);
  margin: var(--wv-space-3) auto 0;
  /* Right padding matches the vertical padding so the "Open in app" button is evenly inset;
     the left keeps a wider inset for the wordmark. */
  padding: var(--wv-space-2) var(--wv-space-2) var(--wv-space-2) var(--wv-space-4);
  border-radius: var(--wv-radius-xl);
  background: var(--wv-glass-bg);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.webview-header__logo { height: 1.375rem; width: auto; display: block; }
.webview-header__logo path { fill: var(--wv-header-fg); }
/* "Open in app" deep-link button (Figma 17246:12061): blue→magenta gradient pill with a translucent
   white border and a white label. */
.webview-header__open {
  appearance: none;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.375rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 0.625rem;
  background: linear-gradient(to right, #4c94ff 0%, #004dff 48%, #f600ff 100%);
  font: inherit;
  font-size: var(--wv-text-sm);
  line-height: 1.25rem;
  font-weight: 500;
  color: #ffffff;
  white-space: nowrap;
  cursor: pointer;
}

.webview-page__container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: var(--wv-space-6);
  max-width: var(--wv-container);
  min-height: 100vh;
  margin: 0 auto;
  padding: var(--wv-space-6) var(--wv-space-4) var(--wv-space-8);
}

/* Inline lucide icons. */
.wv-icon { width: 1.25rem; height: 1.25rem; flex: none; stroke: currentColor; fill: none; }
.wv-icon--sm { width: 1rem; height: 1rem; }
.wv-icon--xs { width: 0.875rem; height: 0.875rem; }

[data-open-in-app] { cursor: pointer; }

/* Lime CTA pill (Follow / Open in app), matches the app's `action="positive"` button. */
.wv-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--wv-space-1);
  appearance: none;
  border: 0;
  border-radius: var(--wv-radius-pill);
  background: var(--wv-lime);
  color: var(--wv-forest);
  font: inherit;
  font-weight: 600;
  padding: var(--wv-space-3) var(--wv-space-5);
  cursor: pointer;
  text-decoration: none;
  transition: filter 140ms ease;
}
.wv-cta:hover { filter: brightness(0.96); }

/* Promo section headings (Unbounded bold). */
.wv-section-heading {
  font-family: var(--wv-font-promo);
  font-weight: 700;
  font-size: var(--wv-text-lg);
  letter-spacing: -0.01em;
  color: var(--wv-fg);
  display: flex;
  align-items: center;
  gap: var(--wv-space-2);
}

/* ---- Badges & chips (mirror components/badges) ---- */
.wv-chips { display: flex; flex-wrap: wrap; gap: var(--wv-space-2); }

/* Category chip — CategoryBadge default: rounded-full bg-secondary-50, secondary-900 medium. */
.wv-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--wv-space-1);
  padding: 0.3125rem var(--wv-space-3);
  border-radius: var(--wv-radius-pill);
  background: var(--wv-secondary-50);
  color: var(--wv-secondary-900);
  font-size: var(--wv-text-sm);
  font-weight: 500;
  line-height: 1.2;
}

/* Vibe badge — rounded-full bg-lime, red filled heart, bold forest "N vibes". */
.wv-vibe-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--wv-space-1);
  padding: 0.25rem 0.625rem;
  border-radius: var(--wv-radius-pill);
  background: var(--wv-lime);
  color: var(--wv-forest);
  font-size: var(--wv-text-sm);
  font-weight: 700;
  line-height: 1.2;
}
.wv-vibe-badge .wv-icon { width: 0.9375rem; height: 0.9375rem; color: var(--wv-error); fill: var(--wv-error); }

/* Location badge — bg forest, lime pin + lime semibold text. */
.wv-badge-location {
  display: inline-flex;
  align-items: center;
  gap: var(--wv-space-1);
  padding: 0.25rem var(--wv-space-2);
  border-radius: var(--wv-radius-lg);
  background: var(--wv-forest);
  color: var(--wv-lime);
  font-size: var(--wv-text-xs);
  font-weight: 600;
  line-height: 1.2;
}
.wv-badge-location .wv-icon { color: var(--wv-lime); }

/* Places-count badge — light chip, secondary-900. */
.wv-badge-places {
  display: inline-flex;
  align-items: center;
  gap: var(--wv-space-1);
  padding: 0.25rem var(--wv-space-2);
  border-radius: var(--wv-radius-lg);
  background: var(--wv-secondary-50);
  color: var(--wv-secondary-900);
  font-size: var(--wv-text-xs);
  font-weight: 500;
  line-height: 1.2;
}

/* ---- Author link (avatar + name [+ meta], optional chevron) ---- */
.wv-author-link {
  display: inline-flex;
  align-items: center;
  gap: var(--wv-space-3);
  text-decoration: none;
  color: inherit;
}
.wv-author-link__avatar {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--wv-radius-pill);
  object-fit: cover;
  flex: none;
  background: var(--wv-secondary-200);
}
.wv-author-link__avatar--fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--wv-font-promo);
  font-weight: 600;
  font-size: var(--wv-text-sm);
  line-height: 1;
  color: #fff;
  text-transform: uppercase;
  background: var(--wv-forest-600);
}
.wv-author-link__name { font-weight: 600; line-height: 1.1; color: var(--wv-fg); }
.wv-author-link__meta { font-size: var(--wv-text-sm); line-height: 1.1; color: var(--wv-fg-muted); margin-top: 2px; }

/* Author-link as a card (place page). */
.wv-author-link--card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--wv-space-3);
  padding: var(--wv-space-4);
  border-radius: var(--wv-radius-2xl);
  background: var(--wv-secondary-50);
}
.wv-author-link--card .wv-author-link__name,
.wv-author-link--card .wv-author-link__meta { color: var(--wv-typo-900); }
.wv-author-link--card .wv-author-link__meta { color: var(--wv-secondary-900); }
.wv-author-link__chevron { color: var(--wv-secondary-700); width: 1.5rem; height: 1.5rem; flex: none; }

/* ---- Vibe row: glass count pill + white heart button ---- */
.wv-vibe-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--wv-space-3);
}
.wv-vibe-pill {
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--wv-space-2);
  height: 3.125rem;
  padding: 0 var(--wv-space-4);
  border-radius: var(--wv-radius-pill);
  background: var(--wv-glass-bg);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--wv-glass-fg);
}
.wv-vibe-pill__emoji { font-size: var(--wv-text-xl); letter-spacing: 0.04em; }
.wv-vibe-pill__text { display: inline-flex; align-items: baseline; gap: 0.375rem; }
.wv-vibe-pill__count {
  font-family: var(--wv-font-promo);
  font-weight: 600;
  font-size: var(--wv-text-lg);
}
.wv-vibe-pill__label { font-size: var(--wv-text-base); }
.wv-vibe-pill--empty { font-size: var(--wv-text-base); }

.wv-heart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.75rem;
  height: 3.75rem;
  flex: none;
  border: 0;
  border-radius: var(--wv-radius-pill);
  background: #fff;
  color: var(--wv-forest);
  cursor: pointer;
  box-shadow: var(--wv-shadow-card);
}
.wv-heart .wv-icon { width: 1.75rem; height: 1.75rem; stroke-width: 3; }

/* The open-in-app controls are anchors (they must be real links for iOS to intercept them as
   Universal Links), so strip the default underline their button styling never had. */
.webview-header__open,
.wv-heart,
.webview-cta__button { text-decoration: none; }

/* ============================ White content tile (collection / place) ============================ */
/* Mirrors the app's GuidePlaceTile / author guide card: bg-white rounded-3xl p-3. */
.wv-tile {
  display: flex;
  flex-direction: column;
  gap: var(--wv-space-4);
  padding: var(--wv-space-3);
  border-radius: var(--wv-radius-3xl);
  background: var(--wv-surface);
  color: var(--wv-typo-900);
  text-decoration: none;
  box-shadow: var(--wv-shadow-card);
}
.wv-tile__row { display: flex; gap: var(--wv-space-4); }
.wv-tile__photo {
  flex: none;
  width: 7.625rem;   /* 122 */
  height: 7.625rem;
  border-radius: var(--wv-radius-2xl);
  object-fit: cover;
  background: var(--wv-secondary-100);
}
.wv-tile__body { display: flex; flex-direction: column; gap: var(--wv-space-1); min-width: 0; }
.wv-tile__title {
  font-size: var(--wv-text-lg);
  font-weight: 500;
  line-height: 1.25;
  color: var(--wv-typo-900);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.wv-tile__desc {
  font-size: var(--wv-text-sm);
  line-height: 1.4;
  color: var(--wv-typo-700);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.wv-tile__addr { font-size: var(--wv-text-xs); color: var(--wv-primary-400); margin-top: 2px; }

/* ============================ Author page ============================ */
.webview-author { display: flex; flex-direction: column; gap: var(--wv-space-6); }
.webview-author__hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--wv-space-4);
  text-align: center;
  padding-bottom: var(--wv-space-2);
}
.webview-author__avatar {
  width: 5.5rem;
  height: 5.5rem;
  border-radius: var(--wv-radius-pill);
  border: 4px solid var(--wv-lime);
  box-shadow: var(--wv-shadow-avatar);
  object-fit: cover;
  background: var(--wv-forest-600);
}
.webview-author__avatar--fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--wv-font-promo);
  font-weight: 600;
  font-size: var(--wv-text-2xl);
  line-height: 1;
  color: #fff;
  text-transform: uppercase;
}
.webview-author__name {
  font-family: var(--wv-font-promo);
  font-weight: 500;
  font-size: var(--wv-text-2xl);
  line-height: 1.2;
  color: var(--wv-fg);
}
.webview-author__bio { color: var(--wv-fg); max-width: 26rem; }

/* Followers pill (glass) with Follow CTA inside. */
.webview-followers {
  display: inline-flex;
  align-items: center;
  gap: var(--wv-space-5);
  padding: 0 0 0 var(--wv-space-2);
  border-radius: var(--wv-radius-pill);
  background: rgba(255, 255, 255, 0.1);
}
.webview-followers__avatars { display: inline-flex; padding-left: 0.25rem; }
.webview-followers__avatars img {
  width: 2rem;
  height: 2rem;
  border-radius: var(--wv-radius-pill);
  border: 2px solid var(--wv-bg);
  object-fit: cover;
  background: var(--wv-forest-600);
}
.webview-followers__avatars img + img { margin-left: -0.625rem; }
.webview-followers__count {
  font-size: var(--wv-text-lg);
  font-weight: 700;
  color: #fff;
}
/* No avatars: mirror the app's pl-3 so the count isn't cramped against the pill edge. */
.webview-followers__count:first-child { padding-left: var(--wv-space-3); }

/* Stat blocks (Based in / Places). */
.webview-author__stats { display: flex; flex-wrap: wrap; gap: var(--wv-space-2); width: 100%; }
.wv-stat {
  flex: 1 1 0;
  min-width: 9rem;
  display: flex;
  align-items: center;
  gap: var(--wv-space-2);
  padding: var(--wv-space-3) var(--wv-space-4);
  border-radius: var(--wv-radius-xl);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  text-decoration: none;
}
/* "Based in" is content-sized (self-start in the app); the Places block flexes to fill the rest. */
.wv-stat--auto { flex: 0 0 auto; min-width: 0; }
.wv-stat__icon { color: var(--wv-lime); }
.wv-stat__text { display: flex; flex-direction: column; min-width: 0; align-items: flex-start; }
.wv-stat__label { font-size: var(--wv-text-xs); color: rgba(255, 255, 255, 0.6); }
.wv-stat__value { font-size: var(--wv-text-sm); }
.wv-stat__value b { font-weight: 700; }
.wv-stat__covers { display: inline-flex; flex: none; }
.wv-stat__covers img {
  width: 2rem;
  height: 2rem;
  border-radius: var(--wv-radius-lg);
  border: 1px solid #fff;
  object-fit: cover;
}
.wv-stat__covers img + img { margin-left: -0.625rem; }

/* Social blocks (Telegram / Instagram). */
.webview-author__socials { display: flex; gap: var(--wv-space-2); }
.wv-social {
  position: relative;
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  gap: var(--wv-space-2);
  padding: var(--wv-space-4);
  border-radius: var(--wv-radius-xl);
  color: #fff;
  text-decoration: none;
  min-width: 0;
}
.wv-social--telegram { background: rgba(83, 200, 255, 0.1); }
.wv-social--instagram { background: rgba(243, 120, 187, 0.1); }
.wv-social__icon { width: 2rem; height: 2rem; flex: none; }
.wv-social__name {
  font-size: var(--wv-text-sm);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wv-social__label { font-size: var(--wv-text-xs); color: rgba(255, 255, 255, 0.6); }
.wv-social__ext { position: absolute; top: var(--wv-space-3); right: var(--wv-space-3); color: rgba(255, 255, 255, 0.5); }

.webview-author__empty { color: var(--wv-fg-muted); }

/* Collections (author) — heading + white tiles directly on the forest background. */
.webview-author__collections { display: flex; flex-direction: column; gap: var(--wv-space-3); }
.webview-author__heading { padding-bottom: var(--wv-space-1); }
.wv-tile-list { display: flex; flex-direction: column; gap: var(--wv-space-3); margin: 0; padding: 0; list-style: none; }

/* ============================ Place page ============================ */
.webview-place { display: flex; flex-direction: column; gap: var(--wv-space-6); }

/* Author "[name] recommends" row, centered above the title. */
.webview-place__recommend { display: flex; justify-content: center; }
.wv-recommend { display: inline-flex; align-items: center; gap: var(--wv-space-2); text-decoration: none; color: inherit; }
.wv-recommend__avatar { width: 2rem; height: 2rem; border-radius: 9999px; object-fit: cover; flex: none; background: var(--wv-secondary-200); }
.wv-recommend__avatar--fallback {
  display: flex; align-items: center; justify-content: center;
  font-family: var(--wv-font-promo); font-weight: 600; font-size: var(--wv-text-sm);
  color: #fff; text-transform: uppercase; line-height: 1; background: var(--wv-forest-600);
}
.wv-recommend__text { font-size: var(--wv-text-base); }
.wv-recommend__name { font-weight: 700; color: var(--wv-typo-900); }
.wv-recommend__verb { color: var(--wv-typo-700); }

.webview-place__titles { display: flex; flex-direction: column; align-items: center; gap: var(--wv-space-1); text-align: center; }
.webview-place__name {
  font-family: var(--wv-font-promo);
  font-weight: 900;
  font-size: var(--wv-text-2xl);
  line-height: 1.15;
  color: var(--wv-typo-900);
}
.webview-place__official { font-size: var(--wv-text-lg); font-weight: 500; color: var(--wv-typo-700); }

/* Gallery (horizontal scroll-snap) + images button + dots. */
.webview-gallery-wrap { position: relative; }
.webview-gallery {
  display: flex;
  gap: var(--wv-space-6);
  margin: 0 calc(-1 * var(--wv-space-4));
  padding: 0 var(--wv-space-4);
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.webview-gallery::-webkit-scrollbar { display: none; }
.webview-gallery__item {
  flex: 0 0 100%;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--wv-radius-2xl);
  object-fit: cover;
  scroll-snap-align: center;
}
.webview-gallery__btn {
  position: absolute;
  right: var(--wv-space-5);
  bottom: var(--wv-space-4);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border: 0;
  border-radius: var(--wv-radius-pill);
  background: var(--wv-secondary-50);
  color: var(--wv-typo-900);
  cursor: pointer;
  box-shadow: var(--wv-shadow-card);
}
.webview-dots { display: flex; justify-content: center; gap: var(--wv-space-1); margin-top: var(--wv-space-3); }
.webview-dots__dot { width: 0.5rem; height: 0.5rem; border-radius: var(--wv-radius-pill); background: var(--wv-typo-900); opacity: 0.2; }
.webview-dots__dot--active { opacity: 1; }

/* White content cards (About, Collections, Photos) — one per section in the design. */
.webview-place__card {
  display: flex;
  flex-direction: column;
  gap: var(--wv-space-4);
  background: var(--wv-surface);
  border-radius: var(--wv-radius-3xl);
  padding: var(--wv-space-6) var(--wv-space-4);
  color: var(--wv-typo-900);
}
.webview-place__card--tight { gap: var(--wv-space-3); padding: var(--wv-space-3); }
.webview-about { display: flex; flex-direction: column; gap: var(--wv-space-4); }
.webview-about__head { display: flex; flex-direction: column; gap: var(--wv-space-1); }
.webview-about__title { font-size: var(--wv-text-lg); font-weight: 500; color: var(--wv-typo-900); }
.webview-about__text { color: var(--wv-typo-700); }

/* Address card. */
.webview-address {
  display: flex;
  flex-direction: column;
  gap: var(--wv-space-3);
  background: var(--wv-secondary-100);
  border-radius: var(--wv-radius-2xl);
  padding: var(--wv-space-4) var(--wv-space-3);
}
.webview-address__title { font-size: var(--wv-text-lg); font-weight: 500; color: var(--wv-typo-900); }
.webview-address__map-wrap { position: relative; width: 100%; }
.webview-address__map { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--wv-radius-xl); }
.webview-address__pin {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  transform: translate(-50%, -50%);
  background: var(--wv-lime);
  border: 2px solid #fff;
  border-radius: 9999px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  pointer-events: none;
}
.webview-address__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--wv-space-2);
  align-self: flex-start;
  max-width: 100%;
  padding: 0.375rem var(--wv-space-3);
  border-radius: var(--wv-radius-lg);
  background: var(--wv-secondary-100);
  color: var(--wv-typo-900);
  font-size: var(--wv-text-sm);
  text-decoration: none;
}
.webview-address__badge .wv-icon { color: var(--wv-secondary-900); flex: none; }
.webview-address__badge span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* When the badge overlays the map it floats top-left with a blurred translucent backdrop. */
.webview-address__map-wrap .webview-address__badge {
  position: absolute;
  top: var(--wv-space-3);
  left: var(--wv-space-3);
  right: var(--wv-space-3);
  background: rgba(255, 255, 255, 0.62);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}
.webview-address__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--wv-space-2);
  padding: var(--wv-space-3);
  border: 0;
  border-radius: var(--wv-radius-lg);
  background: var(--wv-secondary-200);
  color: var(--wv-typo-900);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.webview-divider { height: 1px; background: var(--wv-outline-100); border: 0; margin: 0; }

.webview-section { display: flex; flex-direction: column; gap: var(--wv-space-4); }

/* Collection tile (GuideTile equivalent): cover stack + count, title, "N places by author". */
.wv-guide-tile {
  display: flex;
  flex-direction: column;
  gap: var(--wv-space-3);
  padding: var(--wv-space-3) var(--wv-space-4);
  border-radius: var(--wv-radius-2xl);
  background: var(--wv-secondary-100);
  color: var(--wv-typo-900);
  text-decoration: none;
}
.wv-guide-tile__head { display: flex; align-items: center; justify-content: space-between; }
.wv-guide-tile__covers { display: inline-flex; align-items: center; }
.wv-guide-tile__covers img,
.wv-guide-tile__count {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--wv-radius-xl);
  border: 2px solid var(--wv-surface);
  flex: none;
}
.wv-guide-tile__covers img { object-fit: cover; background: var(--wv-secondary-200); }
.wv-guide-tile__covers > * + * { margin-left: -0.625rem; }
.wv-guide-tile__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--wv-forest);
  color: var(--wv-lime);
  font-family: var(--wv-font-promo);
  font-weight: 800;
  font-size: var(--wv-text-xs);
}
.wv-guide-tile__title { font-size: var(--wv-text-base); font-weight: 600; line-height: 1.25; color: var(--wv-typo-900); }
.wv-guide-tile__meta { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 0.375rem; font-size: var(--wv-text-sm); color: var(--wv-typo-700); }
.wv-guide-tile__author-avatar { width: 1.5rem; height: 1.5rem; border-radius: 9999px; object-fit: cover; flex: none; background: var(--wv-secondary-200); }
.wv-guide-tile__author-avatar--fallback {
  display: flex; align-items: center; justify-content: center;
  font-family: var(--wv-font-promo); font-weight: 600; font-size: 0.625rem;
  color: #fff; text-transform: uppercase; line-height: 1; background: var(--wv-forest-600);
}
.wv-guide-tile__author { font-weight: 600; color: var(--wv-typo-900); }
.wv-guide-tile__chevron { color: var(--wv-secondary-700); width: 1.5rem; height: 1.5rem; flex: none; }

/* Section heading row with a count badge ("Photo from other users" 10). */
.wv-section-heading-row { display: flex; align-items: center; gap: var(--wv-space-2); }
.wv-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  height: 1.25rem;
  padding: 0 0.4rem;
  border-radius: 9999px;
  background: var(--wv-forest);
  color: var(--wv-lime);
  font-size: var(--wv-text-xs);
  font-weight: 700;
}

/* Other-users photo grid. */
.webview-photos-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--wv-space-2);
}
.webview-photos-grid img {
  min-width: 0;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--wv-radius-xl);
  object-fit: cover;
  background: var(--wv-secondary-100);
}
.webview-photos-grid a { display: block; min-width: 0; }

/* ============================ Guide page ============================ */
.webview-guide { display: flex; flex-direction: column; gap: var(--wv-space-6); }
.webview-guide__hero { display: flex; flex-direction: column; align-items: center; gap: var(--wv-space-4); text-align: center; }
.webview-guide__photo-stack { display: inline-flex; padding-left: 3.75rem; }
.webview-guide__photo-stack img {
  flex: none;
  width: 5rem;
  height: 5rem;
  /* Opt out of the global `img { max-width: 100% }`: the -3.75rem overlap collapses the stack's
     content box, and the percentage cap would then squeeze each 80px cover to that width (tall pill). */
  max-width: none;
  border-radius: var(--wv-radius-3xl);
  border: 2px solid var(--wv-bg);
  object-fit: cover;
  margin-left: -3.75rem;
  background: var(--wv-forest-600);
}
.webview-guide__title {
  font-family: var(--wv-font-promo);
  font-weight: 500;
  font-size: var(--wv-text-2xl);
  line-height: 1.2;
  color: var(--wv-typo-900);
}
.webview-guide__desc { color: var(--wv-typo-700); max-width: 28rem; }
.webview-guide__badges { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--wv-space-2); }
.webview-guide__vibe-row { align-self: stretch; }
.webview-guide__places { display: flex; flex-direction: column; gap: var(--wv-space-3); margin: 0; padding: 0; list-style: none; }

/* ============================ Exclusive guides ============================ */
/* Mirrors sl-spots exclusive-badge / exclusive-access-banner / hidden-place-tile (Figma). */
:root { --wv-exclusive: #ee00ff; --wv-exclusive-shadow: rgba(141, 1, 184, 0.3); }

.wv-exclusive-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--wv-space-1);
  height: 1.5rem;
  padding: 0 var(--wv-space-2);
  border-radius: var(--wv-radius-lg);
  background: var(--wv-exclusive);
  color: #ffffff;
  font-size: var(--wv-text-xs);
  font-weight: 600;
  line-height: 1;
  flex: none;
}
.wv-exclusive-badge--label {
  font-family: var(--wv-font-promo);
  font-weight: 900;
  font-size: var(--wv-text-2xs);
  letter-spacing: -0.02em;
}
.wv-exclusive-badge__lock { width: 0.75rem; height: 0.75rem; stroke-width: 1.2; flex: none; }

.wv-exclusive-banner {
  position: relative;
  overflow: hidden;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  gap: var(--wv-space-3);
  padding: 0.875rem;
  border-radius: 1.25rem;
  background: var(--wv-forest);
  color: #ffffff;
  text-align: left;
}
.wv-exclusive-banner__texture {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  stroke: #4f8a14;
  opacity: 0.2;
  pointer-events: none;
}
.wv-exclusive-banner__head,
.wv-exclusive-banner__cta { position: relative; }
.wv-exclusive-banner__head { display: flex; align-items: center; justify-content: space-between; gap: var(--wv-space-3); }
.wv-exclusive-banner__title { display: inline-flex; align-items: center; gap: var(--wv-space-3); font-size: var(--wv-text-lg); font-weight: 600; }
.wv-exclusive-banner__lock { width: 1.375rem; height: 1.375rem; stroke-width: 1.4; color: var(--wv-exclusive); flex: none; }
.wv-exclusive-banner__chip {
  display: inline-flex;
  align-items: center;
  gap: var(--wv-space-1);
  height: 1.5rem;
  padding: 0 var(--wv-space-2);
  border-radius: var(--wv-radius-lg);
  background: var(--wv-exclusive);
  font-size: var(--wv-text-xs);
  font-weight: 600;
  white-space: nowrap;
  flex: none;
}
.wv-exclusive-banner__cta { width: 100%; }

/* Frosted teaser tile: a place card under a blur + white-to-pink wash, CTA centered on top. */
.wv-hidden-tile {
  position: relative;
  display: block;
  height: 10.375rem;
  overflow: hidden;
  border-radius: 1.25rem;
  background: var(--wv-surface);
  text-decoration: none;
  box-shadow: var(--wv-shadow-card);
}
.wv-hidden-tile__under {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: var(--wv-space-3);
}
.wv-hidden-tile__photo {
  flex: none;
  width: 5.125rem;
  height: 6.25rem;
  border-radius: var(--wv-radius-2xl);
  border: 2px solid var(--wv-surface);
  object-fit: cover;
  background: var(--wv-secondary-100);
}
.wv-hidden-tile__title-bar { flex: 1; height: 1rem; margin-top: 0.25rem; border-radius: var(--wv-radius-pill); background: var(--wv-secondary-200); }
.wv-hidden-tile__frost {
  position: absolute;
  inset: 0;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  background: linear-gradient(rgba(255, 255, 255, 0.5), rgba(251, 212, 255, 0.5));
}
.wv-hidden-tile__content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--wv-space-1);
  padding: 0 var(--wv-space-4);
  text-align: center;
}
.wv-hidden-tile__heading {
  display: inline-flex;
  align-items: center;
  gap: var(--wv-space-2);
  font-family: var(--wv-font-promo);
  font-weight: 700;
  font-size: 0.9375rem;
  letter-spacing: -0.02em;
  color: var(--wv-forest);
}
.wv-hidden-tile__lock { width: 1.125rem; height: 1.125rem; color: var(--wv-exclusive); flex: none; }
.wv-hidden-tile__teaser { font-size: var(--wv-text-sm); color: var(--wv-secondary-900); }
.wv-hidden-tile__go {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  margin-top: var(--wv-space-1);
  border-radius: 9999px;
  background: var(--wv-exclusive);
  color: #ffffff;
  box-shadow: 0 0.5rem 1rem var(--wv-exclusive-shadow);
}
.wv-hidden-tile__go .wv-icon { stroke-width: 2.5; }

.wv-guide-tile__end { display: inline-flex; align-items: center; gap: var(--wv-space-2); }

/* ============================ 404 ============================ */
.webview-notfound { display: flex; flex-direction: column; align-items: center; gap: var(--wv-space-4); padding: var(--wv-space-8) 0; text-align: center; }
.webview-notfound__code { font-family: var(--wv-font-promo); font-size: var(--wv-text-3xl); font-weight: 900; color: var(--wv-lime); }
.webview-notfound__title { font-size: var(--wv-text-xl); font-weight: 700; }
.webview-notfound__message { max-width: 28rem; color: var(--wv-fg-muted); }

/* Floating app CTA banner (dark-green glass), revealed when the page is scrolled to the bottom.
   Inset from the screen edges with rounded corners; a translucent fill lets the backdrop blur show. */
.webview-cta {
  position: fixed;
  left: var(--wv-space-4);
  right: var(--wv-space-4);
  bottom: calc(var(--wv-space-4) + env(safe-area-inset-bottom));
  z-index: 30;
  max-width: var(--wv-container);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--wv-space-4);
  padding: var(--wv-space-6) var(--wv-space-5);
  border-radius: var(--wv-radius-3xl);
  background: rgba(9, 19, 0, 0.72);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  transform: translateY(150%);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.28s ease, opacity 0.28s ease, visibility 0.28s;
}
.webview-cta.is-visible {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}
.webview-cta__message {
  max-width: var(--wv-container);
  text-align: center;
  font-size: var(--wv-text-base);
  color: #ffffff;
}
.webview-cta__button {
  display: inline-flex;
  align-items: center;
  gap: var(--wv-space-3);
  height: 3.25rem;
  padding: 0 var(--wv-space-5);
  border: 0;
  border-radius: var(--wv-radius-pill);
  background: #ffffff;
  color: var(--wv-primary-950);
  font-size: var(--wv-text-base);
  font-weight: 500;
  cursor: pointer;
}
.webview-cta__app-icon {
  width: 2.375rem;
  height: 2.375rem;
  border-radius: var(--wv-radius-lg);
}

/* Reserve space so the last content clears the fixed CTA banner once it appears. The banner is tall
   (multi-line message + app-icon button), so this must exceed its full height plus the bottom inset. */
.webview-page__container--cta { padding-bottom: calc(14rem + env(safe-area-inset-bottom)); }

@media (min-width: 36em) {
  .webview-place__name,
  .webview-author__name,
  .webview-guide__title { font-size: var(--wv-text-3xl); }
}
