/* ----------------------------------------------------------
   Lendaz — Explore + Reels
   Clean, professional, monochrome-forward.
---------------------------------------------------------- */

:root {
  --bg: #ffffff;
  --fg: #0a0a0a;
  --fg-muted: #737373;
  --fg-subtle: #a3a3a3;
  --border: #e5e5e5;
  --border-strong: #d4d4d4;
  --surface: #fafafa;
  --surface-2: #f4f4f5;
  --hover: #f5f5f5;
  --accent: #0a0a0a;
  --danger: #ef4444;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --topbar-h: 64px;
  --container: 1100px;
  --grid-gap: 3px;
  --chip-h: 36px;
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.16);
}

.dark {
  --bg: #000000;
  --fg: #fafafa;
  --fg-muted: #a3a3a3;
  --fg-subtle: #737373;
  --border: #262626;
  --border-strong: #404040;
  --surface: #0a0a0a;
  --surface-2: #171717;
  --hover: #1f1f1f;
  --accent: #fafafa;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100dvh;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
  padding: 0;
}

img,
video {
  display: block;
  max-width: 100%;
}

/* ----------------------------------------------------------
   Top bar (Explore page)
---------------------------------------------------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--topbar-h);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
}

.brand {
  flex-shrink: 0;
  display: inline-block;
  width: 130px;
  height: 40px;
  background-image: url('../images/logo-lendaz.png');
  background-repeat: no-repeat;
  background-position: center;
  background-size: auto 200px;
  font-size: 0;
  line-height: 0;
  color: transparent;
  transition: opacity 0.15s ease;
}

.brand:hover {
  opacity: 0.78;
}

.dark .brand {
  filter: invert(1) hue-rotate(180deg);
}

@media (max-width: 560px) {
  .brand {
    width: 108px;
    height: 34px;
    background-size: auto 168px;
  }
}

.search {
  flex: 1;
  max-width: 420px;
  height: 40px;
  background: var(--surface-2);
  border: 1px solid transparent;
  border-radius: 999px;
  display: flex;
  align-items: center;
  padding: 0 6px 0 14px;
  gap: 10px;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.search:hover {
  background: var(--hover);
  border-color: var(--border);
}

.search:focus-visible {
  outline: none;
  border-color: var(--border-strong);
  background: var(--bg);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--fg) 8%, transparent);
}

.search-icon {
  width: 16px;
  height: 16px;
  color: var(--fg-muted);
  flex-shrink: 0;
}

.search-label {
  flex: 1;
  font-size: 13.5px;
  font-weight: 400;
  color: var(--fg-muted);
  letter-spacing: -0.005em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-kbd {
  display: inline-flex;
  gap: 3px;
  margin-left: auto;
  flex-shrink: 0;
  padding-right: 6px;
}

.search-kbd kbd {
  font-family: inherit;
  font-size: 11px;
  font-weight: 500;
  color: var(--fg-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0 5px;
  min-width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0;
  line-height: 1;
}

@media (max-width: 640px) {
  .search-kbd { display: none; }
  .search { padding: 0 14px; }
}

.nav-icons {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}

.icon-btn {
  min-width: 58px;
  height: 52px;
  padding: 6px 8px;
  border-radius: 12px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--fg);
  transition: background 0.15s ease, transform 0.1s ease;
}

.icon-btn:hover {
  background: var(--hover);
}

.icon-btn:active {
  transform: scale(0.96);
}

.icon-btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Theme toggle — moon in light mode, sun in dark mode */
.theme-toggle .theme-icon-sun {
  display: none;
}

.dark .theme-toggle .theme-icon-sun {
  display: block;
}

.dark .theme-toggle .theme-icon-moon {
  display: none;
}

.icon-btn-label {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--fg-muted);
  line-height: 1;
  white-space: nowrap;
  transition: color 0.15s ease;
}

.icon-btn:hover .icon-btn-label,
.icon-btn:focus-visible .icon-btn-label {
  color: var(--fg);
}

.avatar-btn {
  min-width: 58px;
  border: none;
  overflow: visible;
  margin-left: 2px;
}

.avatar-wrap {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border);
  flex-shrink: 0;
  display: inline-flex;
}

.avatar-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ----------------------------------------------------------
   Filter bar — category chips + granular filter row
---------------------------------------------------------- */

.explore {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 16px 80px;
}

.filter-bar {
  position: sticky;
  top: var(--topbar-h);
  z-index: 30;
  margin: 0 -16px 10px;
  padding: 14px 16px 8px;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}

.chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 10px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.chips::-webkit-scrollbar { display: none; }

.chip {
  height: var(--chip-h);
  padding: 0 16px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--fg);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
  border: 1px solid transparent;
}

.chip:hover { background: var(--hover); }
.chip:active { transform: scale(0.97); }
.chip.active {
  background: var(--fg);
  color: var(--bg);
}

/* Secondary granular filter row */
.controls-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.controls-scroll {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 2px 4px 2px 0;
}
.controls-scroll::-webkit-scrollbar { display: none; }

.controls-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  padding-left: 12px;
  border-left: 1px solid var(--border);
}

.filter-pill {
  height: 32px;
  padding: 0 11px 0 12px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  letter-spacing: -0.002em;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease, transform 0.08s ease;
  font-family: inherit;
}

/* The conditional University pill uses the `hidden` attribute; without this the
   `display: inline-flex` above would override the UA [hidden] rule and keep it visible. */
.filter-pill[hidden] { display: none; }

.filter-pill:hover {
  background: var(--surface);
  border-color: var(--border-strong);
}

.filter-pill:active { transform: scale(0.97); }

.filter-pill[aria-expanded="true"] {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}

.filter-pill.active {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
  padding-left: 10px;
}

.filter-pill.active::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.9;
  flex-shrink: 0;
}

.filter-pill-caret {
  width: 11px;
  height: 11px;
  flex-shrink: 0;
  transition: transform 0.18s cubic-bezier(0.2, 0.8, 0.2, 1);
  opacity: 0.7;
}

.filter-pill[aria-expanded="true"] .filter-pill-caret {
  transform: rotate(180deg);
}

.filter-pill-icon {
  padding: 0 12px;
}

.filter-pill-icon svg:first-child {
  width: 14px;
  height: 14px;
  opacity: 0.75;
}

#openAllFilters {
  border-style: dashed;
  gap: 7px;
}

#openAllFilters.active {
  border-style: solid;
}

.filter-count {
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--fg);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-variant-numeric: tabular-nums;
}

.filter-reset {
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: none;
  background: none;
  color: var(--fg-muted);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: -0.002em;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--border-strong);
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
  font-family: inherit;
  cursor: pointer;
  flex-shrink: 0;
}
.filter-reset:hover {
  color: var(--fg);
  text-decoration-color: var(--fg);
}

.result-count {
  font-size: 12px;
  font-weight: 500;
  color: var(--fg-muted);
  letter-spacing: -0.002em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.filter-sort {
  padding-left: 10px;
}
.filter-sort svg:first-child {
  width: 13px;
  height: 13px;
  opacity: 0.75;
}

.view-toggle {
  display: inline-flex;
  align-items: center;
  background: var(--surface-2);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}

.view-btn {
  width: 32px;
  height: 26px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--fg-muted);
  background: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.view-btn svg { width: 15px; height: 15px; }
.view-btn:hover { color: var(--fg); }
.view-btn.active {
  background: var(--bg);
  color: var(--fg);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

/* Popover — a titled chip-group, the same option UI the all-filters
   drawer uses, so picking a filter looks identical everywhere. */
.filter-popover {
  position: absolute;
  z-index: 120;
  min-width: 240px;
  max-width: 340px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow:
    0 20px 48px rgba(0, 0, 0, 0.12),
    0 4px 12px rgba(0, 0, 0, 0.05);
  padding: 12px;
  opacity: 0;
  transform: translateY(-6px) scale(0.97);
  transform-origin: top left;
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  max-height: 360px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}
.dark .filter-popover {
  box-shadow:
    0 20px 48px rgba(0, 0, 0, 0.5),
    0 4px 12px rgba(0, 0, 0, 0.3);
}

.filter-popover.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Popover head — same micro-label as the drawer's section titles; the
   mobile sheet variant restyles it with a grabber (see media query). */
.filter-sheet-head {
  padding: 2px 4px 10px;
}
.filter-sheet-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg);
}

@media (max-width: 900px) {
  .filter-bar {
    padding: 12px 14px 6px;
    margin: 0 0 8px;
  }
  .result-count { display: none; }
  .view-toggle { display: none; }
}

@media (max-width: 560px) {
  .controls-right {
    border-left: none;
    padding-left: 4px;
  }
  .filter-sort .filter-pill-value { display: none; }
}

/* Mobile: roomier pill tap targets + filter pickers as bottom sheets */
@media (max-width: 900px) {
  .filter-pill {
    height: 36px;
    font-size: 13px;
  }

  .filter-popover-backdrop {
    position: fixed;
    inset: 0;
    z-index: 205;
    background: rgba(10, 10, 10, 0.42);
    opacity: 0;
    transition: opacity 0.26s ease;
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
  }
  .filter-popover-backdrop.is-open { opacity: 1; }
  .dark .filter-popover-backdrop { background: rgba(0, 0, 0, 0.6); }

  .filter-popover--sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    width: 100%;
    min-width: 0;
    max-width: none;
    max-height: 72dvh;
    z-index: 210;
    border: none;
    border-top: 1px solid var(--border);
    border-radius: 22px 22px 0 0;
    padding: 6px 10px calc(14px + env(safe-area-inset-bottom));
    opacity: 1;
    transform: translateY(100%);
    transform-origin: bottom center;
    box-shadow: 0 -24px 60px rgba(0, 0, 0, 0.24);
    transition: transform 0.34s cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  .dark .filter-popover--sheet {
    box-shadow: 0 -24px 60px rgba(0, 0, 0, 0.7);
  }
  .filter-popover--sheet.is-open {
    transform: translateY(0);
  }

  .filter-popover--sheet .filter-sheet-head {
    position: relative;
    padding: 16px 8px 12px;
    margin-bottom: 12px;
    text-align: center;
    border-bottom: 1px solid var(--border);
  }
  .filter-popover--sheet .filter-sheet-head::before {
    content: '';
    position: absolute;
    top: 7px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 4px;
    border-radius: 999px;
    background: var(--border-strong);
  }
  .filter-popover--sheet .filter-sheet-title {
    font-size: 15px;
    letter-spacing: -0.01em;
    text-transform: none;
  }

  /* Sheet chips: same component, comfier tap targets */
  .filter-popover--sheet .panel-chip-group {
    padding: 0 4px 4px;
    gap: 8px;
  }
  .filter-popover--sheet .panel-chip {
    height: 40px;
    padding: 0 16px;
    font-size: 14px;
  }

  body.popover-open { overflow: hidden; }
}

/* ----------------------------------------------------------
   Explore grid — the mismatched 3-column layout
---------------------------------------------------------- */

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-flow: row dense;
  gap: var(--grid-gap);
}

.tile {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--surface-2);
  cursor: pointer;
  outline: none;
  isolation: isolate;
  opacity: 0;
  transform: translateY(16px) scale(0.985);
}

.tile.is-visible {
  animation: tile-in 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) var(--stagger, 0ms) both;
}

@keyframes tile-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Skeleton shimmer while image loads */
.tile:not(.loaded)::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(
      115deg,
      transparent 0%,
      rgba(0, 0, 0, 0.04) 40%,
      rgba(0, 0, 0, 0.08) 50%,
      rgba(0, 0, 0, 0.04) 60%,
      transparent 100%
    );
  background-size: 220% 100%;
  animation: tile-shimmer 1.6s ease-in-out infinite;
  pointer-events: none;
}

.dark .tile:not(.loaded)::before {
  background:
    linear-gradient(
      115deg,
      transparent 0%,
      rgba(255, 255, 255, 0.035) 40%,
      rgba(255, 255, 255, 0.07) 50%,
      rgba(255, 255, 255, 0.035) 60%,
      transparent 100%
    );
  background-size: 220% 100%;
}

@keyframes tile-shimmer {
  0% { background-position: 120% 0; }
  100% { background-position: -120% 0; }
}

.tile .media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.6s ease;
  will-change: transform;
}

.tile.loaded .media {
  opacity: 1;
}

.tile:hover .media {
  transform: scale(1.04);
}

.tile:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: -2px;
}

.tile.tall-right {
  grid-column: 3;
  grid-row: span 2;
  aspect-ratio: 1 / 2.01;
}

.tile.tall-left {
  grid-column: 1;
  grid-row: span 2;
  aspect-ratio: 1 / 2.01;
}

/* Hero tile — 2x2 rhythm break */
.tile.hero {
  grid-column: span 2;
  grid-row: span 2;
  aspect-ratio: 1 / 1;
}

.tile.hero .tile-overlay {
  padding: 20px 22px 18px;
}

.tile.hero .tile-avatar {
  width: 32px;
  height: 32px;
}

.tile.hero .tile-username {
  font-size: 14px;
}

.tile.hero .tile-caption {
  font-size: 13px;
  -webkit-line-clamp: 3;
}

.tile.hero .tile-specs {
  font-size: 12.5px;
  gap: 16px;
}

.tile.hero .tile-spec svg {
  width: 15px;
  height: 15px;
}

.tile.hero .tile-price-tag {
  font-size: 14px;
  padding: 6px 13px;
  left: 14px;
  bottom: 14px;
}

.tile.hero .tile-status {
  top: 14px;
  left: 14px;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .tile {
    opacity: 1;
    transform: none;
  }
  .tile.is-visible {
    animation: none;
  }
  .tile:not(.loaded)::before {
    animation: none;
  }
  .tile .media {
    transition: opacity 0.2s ease;
  }
}

/* Reel badge — video indicator, always visible */
.tile .reel-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 22px;
  height: 22px;
  color: #fff;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
  pointer-events: none;
  z-index: 3;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.2s ease;
}

.tile:hover .reel-badge {
  transform: scale(1.08) translateY(-1px);
}

/* ----------------------------------------------------------
   Tile hover overlay — post identity reveal
   Staggered slide-up of user, caption, stats on hover/focus
---------------------------------------------------------- */

.tile-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 14px 14px 12px;
  color: #fff;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.22s ease;
  background:
    linear-gradient(
      to top,
      rgba(0, 0, 0, 0.82) 0%,
      rgba(0, 0, 0, 0.55) 28%,
      rgba(0, 0, 0, 0.2) 55%,
      rgba(0, 0, 0, 0) 78%
    );
}

.tile:hover .tile-overlay,
.tile:focus-visible .tile-overlay {
  opacity: 1;
}

.tile-overlay {
  padding: 14px;
  justify-content: space-between;
}

.tile-overlay-top,
.tile-overlay-bottom {
  display: flex;
  flex-direction: column;
  transform: translateY(6px);
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.tile-overlay-top {
  transform: translateY(-6px);
}

.tile:hover .tile-overlay-top,
.tile:focus-visible .tile-overlay-top {
  transform: translateY(0);
  transition-delay: 20ms;
}

.tile:hover .tile-overlay-bottom,
.tile:focus-visible .tile-overlay-bottom {
  transform: translateY(0);
  transition-delay: 60ms;
}

.tile-user {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 11px 5px 5px;
  background: rgba(0, 0, 0, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 999px;
  align-self: flex-start;
  max-width: 100%;
}

.tile-avatar {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  object-fit: cover;
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.tile-user-text {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
  line-height: 1.15;
}

.tile-username {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #fff;
}

.tile-user-role {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.72);
}

.tile-caption {
  margin: 0 0 10px;
  font-size: 11.5px;
  line-height: 1.4;
  font-weight: 400;
  letter-spacing: -0.003em;
  color: rgba(255, 255, 255, 0.94);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.tile-specs {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.005em;
  flex-wrap: wrap;
  row-gap: 4px;
  color: #fff;
  margin-bottom: 8px;
}

.tile-spec {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
}

.tile-spec svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  opacity: 0.85;
}

.tile-location {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.003em;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.tile-location svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  opacity: 0.85;
}

/* Persistent status pill — top-left */
.tile-status {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #0a0a0a;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  pointer-events: none;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.tile:hover .tile-status {
  transform: translateY(-1px);
}

.tile-status[data-status="new"] {
  background: #0a0a0a;
  color: #fff;
}
.tile-status[data-status="sold"] {
  background: #0a0a0a;
  color: #fff;
  letter-spacing: 0.1em;
}
.tile-status[data-status="open"] {
  background: #fff6e8;
  color: #a0450a;
}

/* Persistent price tag — bottom-left */
.tile-price-tag {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 3;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
  background: rgba(10, 10, 10, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  pointer-events: none;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.2s ease;
}

.tile:hover .tile-price-tag {
  opacity: 0;
  transform: translateY(4px);
}

/* Persistent suburb + accommodation-type tag — stacked above the price */
.tile-info-tag {
  position: absolute;
  left: 10px;
  bottom: 42px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: calc(100% - 20px);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: #fff;
  background: rgba(10, 10, 10, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  white-space: nowrap;
  overflow: hidden;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.tile-info-tag svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  opacity: 0.85;
}

.tile-info-tag .tile-info-suburb {
  flex-shrink: 0;
}

.tile-info-tag .tile-info-type {
  font-weight: 400;
  opacity: 0.8;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tile:hover .tile-info-tag {
  opacity: 1;
  transform: none;
}

.tile.hero .tile-info-tag {
  left: 14px;
  bottom: 50px;
  font-size: 12px;
}

/* Price pill ticker — GSAP rolls the pill through price → bed/bath
   specs → lister faces, animating the pill's width to fit each face.
   Faces stack in one grid cell, left-anchored so the width tween
   clips on the right. Until the script marks the pill `.is-animated`
   (no GSAP, reduced motion) only the price face exists visually. */
.tile-price-tag.is-cycling {
  display: grid;
  overflow: hidden;
}

.tile-price-tag.is-cycling:not(.is-animated) .tag-face:not(.tag-face-price) {
  display: none;
}

.tile-price-tag .tag-face {
  grid-area: 1 / 1;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.tile-price-tag .tag-stat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.tile-price-tag .tag-stat svg {
  width: 13px;
  height: 13px;
  opacity: 0.85;
}

.tile-price-tag .tag-avatar {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  object-fit: cover;
}

.tile-price-tag .tag-handle {
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Save button — top-right, appears on hover */
.tile-save {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 4;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(10, 10, 10, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  opacity: 0;
  transform: translateY(-4px) scale(0.9);
  transition: opacity 0.2s ease, transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), background 0.15s ease;
  cursor: pointer;
}

.tile-save svg {
  width: 15px;
  height: 15px;
}

.tile:hover .tile-save,
.tile:focus-within .tile-save {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.tile-save:hover {
  background: rgba(10, 10, 10, 0.72);
}

.tile-save:active {
  transform: scale(0.9);
}

.tile-save.is-saved {
  background: #fff;
  color: #0a0a0a;
}

.tile-save.is-saved svg {
  fill: #0a0a0a;
}

.tile.is-video .tile-save {
  right: 40px;
}

/* Tall tiles get more caption room */
.tile.tall-right .tile-caption,
.tile.tall-left .tile-caption {
  -webkit-line-clamp: 3;
}

/* Touch devices — keep minimal info visible since no hover */
@media (hover: none) {
  .tile-overlay {
    display: none;
  }
  .tile-save { display: none; }
}

/* Empty state */
.grid-empty {
  max-width: var(--container);
  margin: 0 auto;
  padding: 80px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.grid-empty[hidden],
.grid[hidden] {
  display: none;
}

.grid-empty-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  max-width: 380px;
}

.grid-empty-glyph {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--surface-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--fg-muted);
  margin-bottom: 6px;
}

.grid-empty-glyph svg {
  width: 22px;
  height: 22px;
}

.grid-empty-title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 0;
  color: var(--fg);
}

.grid-empty-sub {
  font-size: 13px;
  line-height: 1.5;
  color: var(--fg-muted);
  margin: 0;
  letter-spacing: -0.003em;
}

.grid-empty-reset {
  margin-top: 12px;
  height: 36px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--fg);
  color: var(--bg);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.003em;
  border: none;
  cursor: pointer;
  transition: transform 0.1s ease, opacity 0.15s ease;
  font-family: inherit;
}

.grid-empty-reset:hover { opacity: 0.88; }
.grid-empty-reset:active { transform: scale(0.97); }

/* ----------------------------------------------------------
   Reel viewer (reel.html)
---------------------------------------------------------- */

body.page-reel {
  background: #000;
  color: #fff;
  overflow: hidden;
  height: 100dvh;
}

.reel-viewport {
  height: 100dvh;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  /* No `scroll-behavior: smooth` here: paired with `scroll-snap-type: mandatory`
     it leaves the snap stuck mid-way between reels. Programmatic scrolls (keyboard
     nav) still pass `behavior: 'smooth'` explicitly in reel.js. */
  overscroll-behavior-y: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.reel-viewport::-webkit-scrollbar {
  display: none;
}

.reel {
  position: relative;
  height: 100dvh;
  width: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

.reel-frame {
  position: relative;
  height: 100%;
  width: 100%;
  max-width: min(calc(100dvh * 9 / 16), 100vw);
  background: #000;
  overflow: hidden;
  /* Vertical gestures scroll the feed natively; horizontal gestures are the
     JS media-swipe. Without this the two fight and the feed sticks mid-swipe. */
  touch-action: pan-y;
}

.reel-frame video,
.reel-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.reel-frame img.still {
  animation: kenburns 16s ease-in-out infinite alternate;
}

@keyframes kenburns {
  0% {
    transform: scale(1) translate(0, 0);
  }
  100% {
    transform: scale(1.12) translate(-2%, -1%);
  }
}

/* Top bar inside reel */
.reel-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 16px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0));
  pointer-events: none;
}

.reel-top > * {
  pointer-events: auto;
}

.reel-top .icon-btn {
  color: #fff;
}

.reel-top .icon-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.reel-title {
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.01em;
}

/* Action rail on the right */
.reel-actions {
  position: absolute;
  right: 12px;
  bottom: 20%;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  z-index: 10;
}

/* Frosted pill buttons — icon + label inline, echoing the details CTA pill */
.reel-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px 9px 12px;
  border-radius: 999px;
  color: #fff;
  background: rgba(16, 16, 19, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(14px) saturate(125%);
  backdrop-filter: blur(14px) saturate(125%);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.reel-action-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.reel-action-label {
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.01em;
}

.reel-action-count {
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  opacity: 0.62;
  font-variant-numeric: tabular-nums;
}

.reel-action:hover {
  background: rgba(30, 30, 34, 0.56);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateX(-2px);
}

.reel-action:active {
  transform: scale(0.96);
}

.reel-action svg {
  width: 21px;
  height: 21px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: fill 0.2s ease, color 0.2s ease;
}

.reel-action.liked {
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(239, 68, 68, 0.5);
  box-shadow: 0 6px 22px rgba(239, 68, 68, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.reel-action.liked svg {
  fill: #ef4444;
  color: #ef4444;
  stroke: #ef4444;
}

/* Bottom info */
.reel-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  /* Right padding keeps content clear of the action rail while the
     gradient itself spans the full width — no bare strip on the right. */
  padding: 16px 84px 22px 14px;
  z-index: 10;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.35) 60%, rgba(0, 0, 0, 0));
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.reel-info > * {
  pointer-events: auto;
}

.reel-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.reel-user img {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.reel-user .username {
  font-weight: 600;
  font-size: 14px;
}

.reel-user .follow {
  margin-left: 6px;
  padding: 6px 12px;
  border-radius: 6px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.6);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  transition: background 0.15s ease;
}

.reel-user .follow:hover {
  background: rgba(255, 255, 255, 0.12);
}

.reel-user .follow.active {
  border-color: transparent;
  background: rgba(255, 255, 255, 0.12);
}

.reel-caption {
  font-size: 13px;
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 100%;
}

.reel-caption.expanded {
  -webkit-line-clamp: unset;
}

.reel-caption .more {
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
}

.reel-audio {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.9);
}

.reel-audio svg {
  width: 14px;
  height: 14px;
}

.reel-audio .audio-track {
  overflow: hidden;
  white-space: nowrap;
  max-width: 60vw;
}

.reel-audio .audio-track span {
  display: inline-block;
  animation: marquee 18s linear infinite;
}

/* Primary CTA inside the reel — go to the full property details page */
.reel-details-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  padding: 12px 16px;
  border-radius: 12px;
  background: #fff;
  color: #0a0a0a;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28);
  transition: transform 0.15s ease, background 0.15s ease;
}

/* Rotating value-prop phrases inside the CTA. Phrases stack in one grid
   cell so the button holds the width of the longest phrase instead of
   jumping on every swap; the active one rolls in from below while the
   old one rolls out the top. */
.reel-details-phrases {
  display: grid;
  overflow: hidden;
}

.reel-details-phrases .phrase {
  grid-area: 1 / 1;
  justify-self: center;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reel-details-phrases .phrase.is-active {
  opacity: 1;
  transform: none;
}

.reel-details-phrases .phrase.is-leaving {
  opacity: 0;
  transform: translateY(-10px);
}

@media (prefers-reduced-motion: reduce) {
  .reel-details-phrases .phrase {
    transition: none;
  }
}

.reel-details-btn:hover {
  background: #f1f5f9;
}

.reel-details-btn:active {
  transform: scale(0.985);
}

.reel-details-btn span {
  flex: 1;
}

.reel-details-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.reel-details-btn svg:last-child {
  width: 20px;
  height: 20px;
  opacity: 0.6;
}

@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Play/pause overlay */
.reel-play-hint {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
  z-index: 5;
}

.reel-play-hint.show {
  opacity: 1;
}

.reel-play-hint svg {
  width: 80px;
  height: 80px;
  color: rgba(255, 255, 255, 0.85);
  filter: drop-shadow(0 6px 20px rgba(0, 0, 0, 0.5));
}

/* Double-tap heart */
.reel-heart-burst {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 110px;
  height: 110px;
  color: #fff;
  transform: translate(-50%, -50%) scale(0);
  pointer-events: none;
  z-index: 6;
}

.reel-heart-burst.animate {
  animation: heart-burst 900ms cubic-bezier(0.2, 0.9, 0.3, 1) forwards;
}

@keyframes heart-burst {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
  }
  25% {
    transform: translate(-50%, -50%) scale(1.15);
    opacity: 1;
  }
  75% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.2);
    opacity: 0;
  }
}

.reel-heart-burst svg {
  width: 100%;
  height: 100%;
  fill: #ef4444;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.6));
}

/* Progress bar */
.reel-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.15);
  z-index: 11;
}

.reel-progress .fill {
  height: 100%;
  background: #fff;
  width: 0%;
  transition: width 0.1s linear;
}

/* ----------------------------------------------------------
   Comments bottom sheet — frosted glass, matches action pills
---------------------------------------------------------- */

.reel-comments-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.reel-comments-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.reel-comments-sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, 100%);
  width: min(520px, 100%);
  max-height: 72dvh;
  z-index: 201;
  display: flex;
  flex-direction: column;
  background: rgba(18, 18, 20, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: none;
  border-radius: 22px 22px 0 0;
  -webkit-backdrop-filter: blur(28px) saturate(140%);
  backdrop-filter: blur(28px) saturate(140%);
  box-shadow: 0 -24px 70px rgba(0, 0, 0, 0.55);
  color: #fff;
  transition: transform 0.36s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reel-comments-sheet.is-open {
  transform: translate(-50%, 0);
}

/* Grab handle + header */
.rc-head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 18px 14px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.rc-head::before {
  content: '';
  position: absolute;
  top: 7px;
  left: 50%;
  transform: translateX(-50%);
  width: 38px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
}

.rc-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.rc-count {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.55);
  font-variant-numeric: tabular-nums;
}

.rc-close {
  margin-left: auto;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.08);
  transition: background 0.15s ease, transform 0.12s ease;
}

.rc-close:hover { background: rgba(255, 255, 255, 0.16); }
.rc-close:active { transform: scale(0.92); }
.rc-close svg { width: 16px; height: 16px; }

/* Scrollable list */
.rc-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
  -webkit-overflow-scrolling: touch;
}

.rc-list::-webkit-scrollbar { width: 5px; }
.rc-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.22);
  border-radius: 3px;
}

.rc-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 4px;
  padding: 40px 20px;
  min-height: 140px;
}

.rc-empty-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

.rc-empty-sub {
  margin: 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}

.rc-item {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 8px 0;
}

.rc-avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
}

.rc-item-body {
  flex: 1;
  min-width: 0;
}

.rc-item-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.rc-item-name {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
}

.rc-item-time {
  font-size: 11.5px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.4);
}

.rc-item-text {
  margin: 2px 0 0;
  font-size: 13.5px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.86);
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

.rc-item-like {
  flex-shrink: 0;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 11px;
  font-weight: 600;
  min-width: 22px;
  transition: color 0.15s ease, transform 0.12s ease;
}

.rc-item-like svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rc-item-like:active { transform: scale(0.85); }

.rc-item-like.liked {
  color: #ef4444;
}

.rc-item-like.liked svg {
  fill: #ef4444;
  stroke: #ef4444;
}

/* Composer — pill input echoing the action rail */
.rc-composer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.rc-composer .rc-avatar {
  width: 32px;
  height: 32px;
  font-size: 13px;
}

.rc-input {
  flex: 1;
  min-width: 0;
  height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.rc-input::placeholder { color: rgba(255, 255, 255, 0.45); }

.rc-input:focus {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.12);
}

.rc-send {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #0a0a0a;
  background: #fff;
  transition: opacity 0.18s ease, transform 0.12s ease, background 0.15s ease;
}

.rc-send svg {
  width: 19px;
  height: 19px;
  transform: translateX(-1px);
}

.rc-send:active:not(:disabled) { transform: scale(0.9); }

.rc-send:disabled {
  opacity: 0.32;
  cursor: default;
  background: rgba(255, 255, 255, 0.5);
}

@media (max-width: 560px) {
  .reel-comments-sheet { max-height: 78dvh; }
}

/* ----------------------------------------------------------
   Post detail (post.html)
   Instagram-style modal, matched to explore aesthetic.
   Lendaz orange accent + logo placed around the page.
---------------------------------------------------------- */

body.page-post {
  background: #050505;
  color: var(--fg);
  font-family: var(--font);
  min-height: 100dvh;
  overflow: hidden;
}

/* Soft radial backdrop */
.post-backdrop {
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(20, 20, 22, 0.85), rgba(0, 0, 0, 0.96));
  z-index: 1;
}

/* Brand mark — top-left */
.post-brand {
  position: fixed;
  top: 18px;
  left: 22px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  z-index: 30;
  padding: 7px 14px 7px 7px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: background 0.2s ease, transform 0.15s ease;
}

.post-brand:hover {
  background: rgba(255, 255, 255, 0.10);
}

.post-brand:active {
  transform: scale(0.97);
}

.post-brand .logo-bg {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.post-brand .logo-bg img {
  width: 24px;
  height: auto;
  object-fit: contain;
}

.post-brand .label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.92);
}

/* Close button — top-right */
.post-close {
  position: fixed;
  top: 18px;
  right: 22px;
  width: 40px;
  height: 40px;
  color: #fff;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 30;
  transition: background 0.2s ease, transform 0.25s ease;
}

.post-close:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: rotate(90deg);
}

.post-close svg {
  width: 18px;
  height: 18px;
}

/* Side nav arrows */
.post-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  color: #fff;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 30;
  transition: background 0.2s ease, opacity 0.2s ease, transform 0.15s ease;
}

.post-nav:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.14);
}

.post-nav:active:not(:disabled) {
  transform: translateY(-50%) scale(0.92);
}

.post-nav.prev { left: 22px; }
.post-nav.next { right: 22px; }

.post-nav:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}

.post-nav svg {
  width: 18px;
  height: 18px;
}

/* Bottom-right watermark */
.post-watermark {
  position: fixed;
  bottom: 20px;
  right: 22px;
  z-index: 25;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px 7px 7px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  opacity: 0.85;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.post-watermark .logo-bg {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.post-watermark .logo-bg img {
  width: 18px;
  height: auto;
  object-fit: contain;
}

.post-watermark .meta {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
}

/* Container */
.post-container {
  position: relative;
  z-index: 2;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 90px;
}

/* Modal card */
.post-card {
  background: var(--bg);
  border-radius: var(--radius-lg);
  box-shadow:
    0 40px 100px -20px rgba(0, 0, 0, 0.6),
    0 12px 32px -8px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.04);
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.82fr);
  width: min(1080px, 100%);
  max-height: calc(100dvh - 160px);
  animation: card-in 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Image side */
.post-media {
  background: #0a0a0a;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.post-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Sidebar */
.post-sidebar {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--bg);
  font-family: var(--font);
}

/* Header */
.post-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.avatar-ring {
  position: relative;
  padding: 2px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ef6820 0%, #f59e0b 50%, #ef6820 100%);
  flex-shrink: 0;
  display: inline-flex;
}

.post-header img.avatar {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  object-fit: cover;
  border: 2px solid var(--bg);
  display: block;
}

.post-header .meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.post-header .username {
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.005em;
}

.post-header .location {
  font-size: 12px;
  color: var(--fg-muted);
}

.post-header .follow-btn {
  font-size: 13px;
  font-weight: 600;
  color: #ef6820;
  padding: 6px 8px;
  border-radius: 6px;
  transition: background 0.15s ease, color 0.15s ease;
}

.post-header .follow-btn:hover {
  background: rgba(239, 104, 32, 0.08);
}

.post-header .follow-btn.active {
  color: var(--fg-muted);
}

.post-header .post-more {
  color: var(--fg);
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.post-header .post-more:hover {
  background: var(--hover);
}

.post-header .post-more svg {
  width: 18px;
  height: 18px;
}

/* Body — caption + comments */
.post-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}

.post-body::-webkit-scrollbar {
  width: 6px;
}

.post-body::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 3px;
}

.post-caption {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.post-caption img.avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  object-fit: cover;
  flex-shrink: 0;
}

.post-caption .text {
  font-size: 14px;
  line-height: 1.45;
  color: var(--fg);
  flex: 1;
  min-width: 0;
}

.post-caption .text strong {
  margin-right: 6px;
  font-weight: 600;
}

.post-caption .time {
  margin-top: 6px;
  display: block;
  font-size: 11px;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Action bar */
.post-actions {
  padding: 8px 10px 4px;
  display: flex;
  align-items: center;
  gap: 2px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.post-actions .fill {
  flex: 1;
}

.action-btn {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--fg);
  transition: background 0.15s ease, transform 0.1s ease, color 0.15s ease;
}

.action-btn:hover {
  background: var(--hover);
}

.action-btn:active {
  transform: scale(0.9);
}

.action-btn svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: fill 0.2s ease, stroke 0.2s ease;
}

.action-btn.liked {
  color: #ef6820;
}

.action-btn.liked svg {
  fill: #ef6820;
  stroke: #ef6820;
}

.action-btn.saved svg {
  fill: var(--fg);
}

.post-stats {
  padding: 0 16px 4px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
  flex-shrink: 0;
}

.post-time {
  padding: 0 16px 14px;
  font-size: 11px;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  flex-shrink: 0;
}

/* ----------------------------------------------------------
   Responsive
---------------------------------------------------------- */

@media (max-width: 900px) {
  .topbar {
    padding: 0 14px;
    gap: 10px;
  }

  .search {
    max-width: none;
  }

  /* Profile / account button hidden on mobile */
  .nav-icons .avatar-btn {
    display: none;
  }

  .explore {
    padding: 0 0 80px;   /* no top gap — let the sticky filter bar hug the nav */
  }

  .chips {
    padding: 0 14px 14px;
  }

  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
  }

  /* Bento on mobile: keep two columns, but let the special tiles span two rows
     so the feed reads as an unequal mosaic instead of a uniform run of squares.
     Drop the desktop column pins (col 1 / col 3 / full-width) — those assume the
     3-column layout — and let the tall cards fall into either column. */
  .tile.tall-left,
  .tile.tall-right,
  .tile.hero {
    grid-column: auto;
    grid-row: span 2;
    aspect-ratio: 1 / 2.02;
  }

  /* No hover on touch: surface the key info directly, but only what matters to a
     buyer — price (the persistent pill), location and beds. Hide the social bits
     (avatar/username) and the long caption. */
  .tile-overlay {
    opacity: 1;
    padding-bottom: 44px;   /* clear the persistent price pill at bottom-left */
  }
  .tile-overlay-top,
  .tile-overlay-bottom {
    transform: none;
  }
  .tile-user,
  .tile-caption {
    display: none;
  }
  .tile:hover .tile-price-tag,    /* sticky touch-hover must not hide the price */
  .tile:hover .tile-info-tag {    /* …or the suburb/type tag above it */
    opacity: 1;
    transform: none;
  }

  /* Post modal collapses */
  .post-container {
    padding: 60px 12px 80px;
  }

  .post-card {
    grid-template-columns: 1fr;
    max-height: none;
    width: 100%;
  }

  .post-media {
    max-height: 55dvh;
  }

  .post-brand .label {
    display: none;
  }

  .post-watermark .meta {
    display: none;
  }

  .post-nav {
    width: 38px;
    height: 38px;
  }

  .post-nav.prev {
    left: 10px;
  }

  .post-nav.next {
    right: 10px;
  }

  .reel-actions {
    right: 8px;
    bottom: 18%;
  }
}

@media (max-width: 560px) {
  .nav-icons .icon-btn:not(.avatar-btn) {
    display: none;
  }

  .brand {
    font-size: 20px;
  }

  .post-container {
    padding: 0;
  }

  .post-card {
    border-radius: 0;
    min-height: 100dvh;
  }

  .post-media {
    max-height: 50dvh;
  }
}

/* ----------------------------------------------------------
   Post — property panel, amenities, landlord contact (lock gated)
---------------------------------------------------------- */

.property-panel {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.property-panel__price {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--fg);
  line-height: 1.2;
}

.property-panel__specs {
  font-size: 13px;
  color: var(--fg);
}

.property-panel__loc {
  font-size: 12px;
  color: var(--fg-muted);
  margin-top: 2px;
}

.property-section {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  overflow: hidden;
}

.property-section__title {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-muted);
}

.property-section__body {
  transition: filter 0.25s ease, opacity 0.25s ease;
}

.property-section.is-locked .property-section__body {
  filter: blur(7px);
  opacity: 0.85;
  pointer-events: none;
  user-select: none;
}

/* Amenities — pill chips, matches landing page treatment */

.property-amenities {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.amenity-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--fg);
  font-size: 12px;
  font-weight: 500;
  border: 1px solid var(--border);
  white-space: nowrap;
}

/* Landlord contact — label/value rows */

.property-contact {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.contact-row {
  display: grid;
  grid-template-columns: 64px 1fr;
  column-gap: 12px;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--fg);
}

.contact-row:last-child {
  border-bottom: none;
  padding-bottom: 2px;
}

.contact-row:first-child {
  padding-top: 2px;
}

.contact-row__label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg-muted);
}

.contact-row__value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

/* Lock overlay — clean, monochrome, site-aligned */

.property-lock {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.92) 55%, rgba(255, 255, 255, 0.98) 100%);
  text-align: center;
}

.dark .property-lock {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.9) 55%, rgba(0, 0, 0, 0.96) 100%);
}

.property-lock__icon {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--fg);
  color: var(--bg);
  margin-bottom: 2px;
}

.property-lock__icon svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.property-lock__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
  letter-spacing: -0.005em;
}

.property-lock__sub {
  font-size: 12px;
  color: var(--fg-muted);
}

.property-lock__btn {
  margin-top: 8px;
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--fg);
  color: var(--bg);
  font-size: 13px;
  font-weight: 600;
  transition: transform 0.1s ease, opacity 0.15s ease;
}

.property-lock__btn:hover {
  opacity: 0.9;
}

.property-lock__btn:active {
  transform: scale(0.97);
}

.property-lock__plans {
  margin-top: 6px;
  font-size: 11px;
  color: var(--fg-subtle);
  letter-spacing: 0.02em;
}

@media (max-width: 560px) {
  .property-panel__price {
    font-size: 18px;
  }

  .contact-row {
    grid-template-columns: 56px 1fr;
  }
}

/* ----------------------------------------------------------
   Utility
---------------------------------------------------------- */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ----------------------------------------------------------
   Scroll affordance — gradient fade hinting more content below
---------------------------------------------------------- */

.page-explore .scroll-fade {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 120px;
  z-index: 40;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.55) 45%,
    rgba(255, 255, 255, 0.9) 78%,
    rgba(255, 255, 255, 1) 100%
  );
  opacity: 1;
  transition: opacity 0.3s ease;
}

.page-explore.at-bottom .scroll-fade {
  opacity: 0;
}

.dark.page-explore .scroll-fade,
.page-explore.dark .scroll-fade {
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.55) 45%,
    rgba(0, 0, 0, 0.9) 78%,
    rgba(0, 0, 0, 1) 100%
  );
}

@media (prefers-reduced-motion: reduce) {
  .page-explore .scroll-fade {
    transition: none;
  }
}

/* ----------------------------------------------------------
   Grid sentinel — infinite scroll loader
---------------------------------------------------------- */

.grid-sentinel {
  max-width: var(--container);
  margin: 0 auto;
  padding: 48px 16px 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 80px;
}

.grid-sentinel-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--fg);
  opacity: 0.25;
  animation: sentinel-pulse 1.2s ease-in-out infinite;
}

.grid-sentinel-dot:nth-child(2) {
  animation-delay: 0.18s;
}

.grid-sentinel-dot:nth-child(3) {
  animation-delay: 0.36s;
}

@keyframes sentinel-pulse {
  0%, 60%, 100% {
    opacity: 0.2;
    transform: translateY(0) scale(1);
  }
  30% {
    opacity: 0.9;
    transform: translateY(-4px) scale(1.15);
  }
}

@media (prefers-reduced-motion: reduce) {
  .grid-sentinel-dot {
    animation: none;
    opacity: 0.5;
  }
}

/* ----------------------------------------------------------
   Dark theme topbar + dropdowns
---------------------------------------------------------- */

.dark .topbar {
  background: rgba(10, 10, 10, 0.78);
  border-bottom-color: var(--border);
}

/* ----------------------------------------------------------
   Spotlight command palette
---------------------------------------------------------- */

.spotlight {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 11vh 20px 40px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.spotlight[hidden] {
  display: none;
}

.spotlight.is-open {
  opacity: 1;
  pointer-events: auto;
}

.spotlight-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.5);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}

.dark .spotlight-backdrop {
  background: rgba(0, 0, 0, 0.65);
}

.spotlight-panel {
  position: relative;
  width: min(640px, 100%);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.5) inset,
    0 30px 80px rgba(0, 0, 0, 0.22),
    0 8px 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transform: translateY(-14px) scale(0.975);
  opacity: 0;
  transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.22s ease;
  display: flex;
  flex-direction: column;
}

.dark .spotlight-panel {
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.6),
    0 8px 20px rgba(0, 0, 0, 0.35);
}

.spotlight.is-open .spotlight-panel {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.spotlight-input-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 20px;
  height: 62px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.spotlight-input-wrap .search-icon {
  width: 18px;
  height: 18px;
  color: var(--fg-muted);
  flex-shrink: 0;
}

.spotlight-input {
  flex: 1;
  border: none;
  outline: none;
  background: none;
  font: inherit;
  font-size: 16px;
  letter-spacing: -0.01em;
  color: var(--fg);
  min-width: 0;
  padding: 0;
}

.spotlight-input::placeholder {
  color: var(--fg-subtle);
}

.spotlight-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

.spotlight-esc {
  font-family: inherit;
  font-size: 11px;
  font-weight: 500;
  color: var(--fg-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 3px 7px;
  letter-spacing: 0.04em;
  cursor: pointer;
  line-height: 1;
  transition: background 0.15s ease, color 0.15s ease;
}

.spotlight-esc:hover {
  background: var(--surface-2);
  color: var(--fg);
}

.spotlight-results {
  max-height: min(440px, 55vh);
  overflow-y: auto;
  padding: 6px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}

.spotlight-results::-webkit-scrollbar {
  width: 8px;
}
.spotlight-results::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 999px;
  border: 2px solid var(--bg);
}

.spotlight-group {
  padding: 4px 0 6px;
}

.spotlight-group-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  padding: 10px 12px 6px;
}

.spotlight-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  border-radius: 10px;
  cursor: pointer;
  color: var(--fg);
  text-decoration: none;
  transition: background 0.12s ease;
  position: relative;
}

.spotlight-item.is-active {
  background: var(--surface-2);
}

.dark .spotlight-item.is-active {
  background: var(--hover);
}

.spotlight-item-thumb {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--surface-2);
}

.spotlight-item-thumb.avatar {
  border-radius: 999px;
  border: 1px solid var(--border);
}

.spotlight-item-thumb.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  color: var(--fg-muted);
}

.spotlight-item-thumb.icon svg {
  width: 16px;
  height: 16px;
}

.spotlight-item-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.spotlight-item-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--fg);
  letter-spacing: -0.005em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.spotlight-item-sub {
  font-size: 12px;
  color: var(--fg-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.spotlight-item-meta {
  font-size: 11.5px;
  color: var(--fg-subtle);
  flex-shrink: 0;
  letter-spacing: 0.02em;
  white-space: nowrap;
  margin-left: 4px;
}

.spotlight-item-arrow {
  width: 14px;
  height: 14px;
  color: var(--fg-subtle);
  flex-shrink: 0;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.spotlight-item.is-active .spotlight-item-arrow {
  opacity: 1;
  transform: translateX(0);
}

.spotlight-empty {
  padding: 54px 30px 60px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}

.spotlight-empty-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--fg);
  letter-spacing: -0.005em;
}

.spotlight-empty-sub {
  font-size: 12.5px;
  color: var(--fg-muted);
  max-width: 280px;
  line-height: 1.45;
}

.spotlight-footer {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 18px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  font-size: 11.5px;
  color: var(--fg-muted);
  flex-shrink: 0;
}

.spotlight-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.spotlight-hint kbd {
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 500;
  padding: 0 5px;
  min-width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
  color: var(--fg-muted);
  letter-spacing: 0;
  line-height: 1;
}

.spotlight-hint kbd + kbd {
  margin-left: 2px;
}

/* Mobile: the command palette becomes a full-screen search experience */
@media (max-width: 640px) {
  .spotlight {
    padding: 0;
    align-items: stretch;
  }
  .spotlight-backdrop {
    background: var(--bg);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .spotlight-panel {
    width: 100%;
    height: 100dvh;
    max-height: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
    transform: translateY(12px);
  }
  .spotlight.is-open .spotlight-panel {
    transform: translateY(0);
  }
  .spotlight-input-wrap {
    height: calc(60px + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) 12px 0 16px;
    gap: 12px;
  }
  /* 16px keeps iOS from auto-zooming the field on focus */
  .spotlight-input {
    font-size: 16px;
  }
  .spotlight-results {
    flex: 1;
    max-height: none;
    padding: 6px 8px calc(24px + env(safe-area-inset-bottom));
  }
  .spotlight-item {
    padding: 12px;
  }
  .spotlight-item-thumb {
    width: 44px;
    height: 44px;
  }
  .spotlight-item-title { font-size: 15px; }
  .spotlight-item-sub { font-size: 13px; }
  .spotlight-item-meta { display: none; }
  .spotlight-footer { display: none; }

  .spotlight-esc.is-cancel {
    background: none;
    border: none;
    padding: 6px 4px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--fg);
  }
  .spotlight-esc.is-cancel:hover {
    background: none;
    color: var(--fg);
  }
}

/* ----------------------------------------------------------
   Profile dropdown menu
---------------------------------------------------------- */

.menu {
  position: fixed;
  z-index: 100;
  min-width: 248px;
  max-width: 280px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow:
    0 20px 48px rgba(0, 0, 0, 0.14),
    0 4px 12px rgba(0, 0, 0, 0.06);
  padding: 6px;
  opacity: 0;
  transform: translateY(-6px) scale(0.97);
  transform-origin: top right;
  pointer-events: none;
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.16s ease;
}

.dark .menu {
  box-shadow:
    0 20px 48px rgba(0, 0, 0, 0.55),
    0 4px 12px rgba(0, 0, 0, 0.3);
}

.menu.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.menu-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px 12px;
  min-width: 0;
}

.menu-avatar {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.menu-header-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.menu-name {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--fg);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu-handle {
  font-size: 12px;
  color: var(--fg-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 4px;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--fg);
  letter-spacing: -0.005em;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: background 0.12s ease;
  background: none;
  border: none;
  text-decoration: none;
  font-family: inherit;
}

.menu-item:hover,
.menu-item:focus-visible {
  background: var(--surface-2);
  outline: none;
}

.dark .menu-item:hover,
.dark .menu-item:focus-visible {
  background: var(--hover);
}

.menu-item svg {
  width: 16px;
  height: 16px;
  color: var(--fg-muted);
  flex-shrink: 0;
  stroke-width: 1.6;
}

.menu-item-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu-item-meta {
  font-size: 11px;
  color: var(--fg-subtle);
  letter-spacing: 0.02em;
}

.menu-item.danger {
  color: var(--danger);
}

.menu-item.danger svg {
  color: var(--danger);
}

.menu-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
}

.menu-toggle-label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--fg);
  letter-spacing: -0.005em;
}

.menu-toggle-label svg {
  width: 16px;
  height: 16px;
  color: var(--fg-muted);
  stroke-width: 1.6;
}

.menu-switch {
  position: relative;
  width: 32px;
  height: 18px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.22s ease, border-color 0.22s ease;
  flex-shrink: 0;
  padding: 0;
}

.menu-switch-thumb {
  position: absolute;
  top: 1px;
  left: 1px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--fg);
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1), background 0.22s ease;
}

.menu-switch.is-on {
  background: var(--fg);
  border-color: var(--fg);
}

.menu-switch.is-on .menu-switch-thumb {
  background: var(--bg);
  transform: translateX(14px);
}

@media (max-width: 560px) {
  .menu {
    min-width: 220px;
    max-width: calc(100vw - 24px);
  }
}

/* ----------------------------------------------------------
   Action toast (post / reel "more options" feedback)
---------------------------------------------------------- */

.post-toast,
.reel-toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translate(-50%, 12px);
  background: var(--fg);
  color: var(--bg);
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.005em;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
  opacity: 0;
  pointer-events: none;
  z-index: 120;
  transition: transform 0.24s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.2s ease;
}

.post-toast.is-visible,
.reel-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ----------------------------------------------------------
   Back-to-top floating button
---------------------------------------------------------- */

.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  background: var(--fg);
  color: var(--bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.18),
    0 2px 6px rgba(0, 0, 0, 0.08);
  opacity: 0;
  transform: translateY(16px) scale(0.9);
  pointer-events: none;
  transition:
    opacity 0.28s cubic-bezier(0.2, 0.8, 0.2, 1),
    transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.2s ease;
  z-index: 90;
  border: 1px solid color-mix(in srgb, var(--bg) 10%, transparent);
}

.back-to-top.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.back-to-top:hover {
  transform: translateY(-2px) scale(1);
  box-shadow:
    0 14px 32px rgba(0, 0, 0, 0.22),
    0 4px 10px rgba(0, 0, 0, 0.1);
}

.back-to-top:active {
  transform: translateY(0) scale(0.95);
}

.back-to-top:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--fg) 18%, transparent),
    0 10px 28px rgba(0, 0, 0, 0.18);
}

.back-to-top svg {
  width: 18px;
  height: 18px;
}

.dark .back-to-top {
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.5),
    0 2px 6px rgba(0, 0, 0, 0.25);
}

.dark .back-to-top:hover {
  box-shadow:
    0 14px 32px rgba(0, 0, 0, 0.6),
    0 4px 10px rgba(0, 0, 0, 0.3);
}

@media (max-width: 560px) {
  .back-to-top {
    bottom: 16px;
    right: 16px;
    width: 42px;
    height: 42px;
  }
  .back-to-top svg {
    width: 17px;
    height: 17px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .back-to-top {
    transition: opacity 0.15s ease;
    transform: none;
  }
  .back-to-top.is-visible {
    transform: none;
  }
  .back-to-top:hover,
  .back-to-top:active {
    transform: none;
  }
}

/* ----------------------------------------------------------
   Explore mesh gradient background
   Warm peach/coral blended with confidence blue + indigo bridge.
   Barely-there on light, slightly richer on dark. Slow drift adds
   fluidity. Sits on body::before behind all content.
---------------------------------------------------------- */

body.page-explore {
  isolation: isolate;
}

body.page-explore::before {
  content: '';
  position: fixed;
  inset: -8%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 55% 50% at 18% 20%, rgba(255, 172, 128, 0.22), transparent 62%),
    radial-gradient(ellipse 48% 42% at 82% 14%, rgba(255, 128, 100, 0.16), transparent 62%),
    radial-gradient(ellipse 60% 55% at 78% 78%, rgba(79, 98, 232, 0.22), transparent 64%),
    radial-gradient(ellipse 55% 50% at 18% 82%, rgba(136, 108, 238, 0.16), transparent 62%),
    radial-gradient(ellipse 85% 60% at 50% 50%, rgba(255, 208, 172, 0.08), transparent 70%);
  animation: mesh-drift 38s ease-in-out infinite alternate;
  will-change: transform;
}

.dark body.page-explore::before {
  background:
    radial-gradient(ellipse 55% 50% at 18% 20%, rgba(255, 140, 92, 0.28), transparent 62%),
    radial-gradient(ellipse 48% 42% at 82% 14%, rgba(255, 100, 80, 0.22), transparent 62%),
    radial-gradient(ellipse 60% 55% at 78% 78%, rgba(82, 112, 255, 0.34), transparent 64%),
    radial-gradient(ellipse 55% 50% at 18% 82%, rgba(120, 90, 232, 0.26), transparent 62%),
    radial-gradient(ellipse 85% 60% at 50% 50%, rgba(255, 180, 140, 0.1), transparent 70%);
}

@keyframes mesh-drift {
  0% {
    transform: translate3d(0%, 0%, 0) scale(1);
  }
  50% {
    transform: translate3d(1.6%, -1.2%, 0) scale(1.04);
  }
  100% {
    transform: translate3d(-1.2%, 1.6%, 0) scale(1.06);
  }
}

@media (prefers-reduced-motion: reduce) {
  body.page-explore::before {
    animation: none;
  }
}

/* ----------------------------------------------------------
   Filters panel — progressive disclosure drawer
---------------------------------------------------------- */

.filters-panel {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  justify-content: flex-end;
}

.filters-panel[hidden] {
  display: none;
}

.filters-panel-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.42);
  opacity: 0;
  transition: opacity 0.26s ease;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.filters-panel.is-open .filters-panel-backdrop { opacity: 1; }

.dark .filters-panel-backdrop {
  background: rgba(0, 0, 0, 0.6);
}

.filters-panel-sheet {
  position: relative;
  width: min(440px, 100%);
  height: 100%;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  box-shadow: -24px 0 60px rgba(0, 0, 0, 0.18);
  transform: translateX(20px);
  opacity: 0;
  transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.22s ease;
  border-left: 1px solid var(--border);
}

.filters-panel.is-open .filters-panel-sheet {
  transform: translateX(0);
  opacity: 1;
}

.dark .filters-panel-sheet {
  box-shadow: -24px 0 60px rgba(0, 0, 0, 0.7);
}

.filters-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.filters-panel-title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.012em;
  margin: 0;
  color: var(--fg);
}

.filters-panel-close {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--fg);
  background: none;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.2s ease;
}

.filters-panel-close svg { width: 16px; height: 16px; }
.filters-panel-close:hover { background: var(--surface-2); transform: rotate(90deg); }
.dark .filters-panel-close:hover { background: var(--hover); }

.filters-panel-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 6px 20px 20px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}

.filters-panel-body::-webkit-scrollbar { width: 6px; }
.filters-panel-body::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 3px;
}

.panel-section {
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}
.panel-section:last-child { border-bottom: none; }

.panel-section-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--fg);
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.panel-chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.panel-chip-group-wrap {
  max-height: 180px;
  overflow-y: auto;
  padding: 2px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}

.panel-chip-group-wrap::-webkit-scrollbar { width: 4px; }
.panel-chip-group-wrap::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 3px;
}

.panel-chip {
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.003em;
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease, transform 0.08s ease;
  font-family: inherit;
  white-space: nowrap;
}

.panel-chip:hover {
  background: var(--surface);
  border-color: var(--border-strong);
}

.panel-chip:active { transform: scale(0.97); }

.panel-chip.selected {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
  font-weight: 600;
}

.filters-panel-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
  background: var(--bg);
}

.panel-clear {
  height: 40px;
  padding: 0 4px;
  background: none;
  border: none;
  color: var(--fg);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.003em;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--border-strong);
  font-family: inherit;
  transition: text-decoration-color 0.15s ease;
}
.panel-clear:hover { text-decoration-color: var(--fg); }

.panel-apply {
  flex: 1;
  max-width: 280px;
  height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--fg);
  color: var(--bg);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.1s ease;
  font-family: inherit;
  font-variant-numeric: tabular-nums;
}

.panel-apply:hover { opacity: 0.88; }
.panel-apply:active { transform: scale(0.98); }
.panel-apply:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

body.panel-open {
  overflow: hidden;
}

@media (max-width: 640px) {
  .filters-panel {
    align-items: flex-end;
  }
  .filters-panel-sheet {
    width: 100%;
    height: 92dvh;
    max-height: 92dvh;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    border-left: none;
    border-top: 1px solid var(--border);
    transform: translateY(40px);
    box-shadow: 0 -24px 60px rgba(0, 0, 0, 0.22);
  }
  .filters-panel.is-open .filters-panel-sheet {
    transform: translateY(0);
  }
  .filters-panel-sheet::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 4px;
    border-radius: 999px;
    background: var(--border-strong);
  }
  .filters-panel-header { padding-top: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .filters-panel-backdrop,
  .filters-panel-sheet {
    transition: none;
  }
}

/* =========================================================
   Tile carousel (explore grid)
   ========================================================= */
.tile-carousel {
  position: absolute;
  inset: 0;
  overflow: hidden;
  touch-action: pan-y;
}

.tile-carousel-track {
  position: absolute;
  inset: 0;
  display: flex;
  width: 100%;
  height: 100%;
  transform: translate3d(0, 0, 0);
  transition: transform 0.38s cubic-bezier(0.22, 0.8, 0.22, 1);
  will-change: transform;
}

.tile-slide {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.tile-slide .media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Override the hover zoom so it only applies to the active slide — prevents
   hidden slides from jittering behind the active one */
.tile .tile-slide .media { transform: none; transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1); }
.tile:hover .tile-slide.is-active .media { transform: scale(1.04); }

/* Dots indicator */
.tile-dots {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 4;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.tile-carousel.has-many .tile-dots,
.tile:hover .tile-carousel.has-many .tile-dots,
.tile:focus-within .tile-carousel.has-many .tile-dots {
  opacity: 1;
}

.tile-dot {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  transition: background 0.2s ease, transform 0.2s ease;
}

.tile-dot.is-active {
  background: #fff;
  transform: scale(1.15);
}

/* Prev / next buttons */
.tile-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.82);
  color: #111;
  cursor: pointer;
  z-index: 5;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.tile-nav.prev { left: 8px; }
.tile-nav.next { right: 8px; }

.tile-nav svg {
  width: 14px;
  height: 14px;
}

.tile:hover .tile-nav,
.tile:focus-within .tile-nav {
  opacity: 1;
}

.tile-nav:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.06);
}

.tile-nav:active {
  transform: translateY(-50%) scale(0.96);
}

/* Hide nav arrows at the extremes */
.tile-carousel-track[style*="translate3d(0%"] ~ .tile-nav.prev,
.tile-carousel-track[style*="translate3d(0px"] ~ .tile-nav.prev {
  opacity: 0 !important;
  pointer-events: none;
}

/* Touch devices: no hover — dots are always visible, nav hidden */
@media (hover: none) {
  .tile-carousel.has-many .tile-dots { opacity: 1; }
  .tile-nav { display: none; }
}

/* =========================================================
   Reel carousel (horizontal inside each reel)
   ========================================================= */
.reel-carousel-track {
  position: absolute;
  inset: 0;
  display: flex;
  width: 100%;
  height: 100%;
  transform: translate3d(0, 0, 0);
  transition: transform 0.38s cubic-bezier(0.22, 0.8, 0.22, 1);
  will-change: transform;
  z-index: 1;
}

.reel-slide {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
}

.reel-slide > video,
.reel-slide > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.reel-slide > img.still {
  animation: kenburns 16s ease-in-out infinite alternate;
}

.reel-slide:not(.is-active) > img.still {
  animation: none;
}

/* Dots at the top of the reel, under the header */
.reel-dots {
  position: absolute;
  top: 58px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 9;
  pointer-events: none;
}

.reel-dot {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  transition: background 0.2s ease, transform 0.2s ease;
}

.reel-dot.is-active {
  background: #fff;
  transform: scale(1.2);
}

.reel-progress { transition: opacity 0.2s ease; }

/* Prev / next chevron buttons inside the reel frame */
.reel-carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.42);
  color: #fff;
  cursor: pointer;
  z-index: 9;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
  opacity: 0.82;
}

.reel-carousel-nav.prev { left: 10px; }
.reel-carousel-nav.next { right: 10px; }

.reel-carousel-nav svg { width: 18px; height: 18px; }

.reel-carousel-nav:hover {
  background: rgba(0, 0, 0, 0.6);
  opacity: 1;
  transform: translateY(-50%) scale(1.06);
}

.reel-carousel-nav:active {
  transform: translateY(-50%) scale(0.94);
}

/* Hide nav at the extremes so users know they've reached the edge */
.reel-frame[data-at-start="1"] .reel-carousel-nav.prev,
.reel-frame[data-at-end="1"] .reel-carousel-nav.next {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%) scale(0.9);
}

@media (prefers-reduced-motion: reduce) {
  .tile-carousel-track,
  .reel-carousel-track {
    transition: none;
  }
}

/* =========================================================
   Post modal carousel
   ========================================================= */
.post-carousel {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  touch-action: pan-y;
  background: #0a0a0a;
}

.post-carousel-track {
  position: absolute;
  inset: 0;
  display: flex;
  width: 100%;
  height: 100%;
  transform: translate3d(0, 0, 0);
  transition: transform 0.4s cubic-bezier(0.22, 0.8, 0.22, 1);
  will-change: transform;
}

.post-slide {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a0a0a;
}

.post-slide > img,
.post-slide > video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Prev / next buttons */
.post-carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #111;
  cursor: pointer;
  z-index: 5;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.post-carousel-nav.prev { left: 12px; }
.post-carousel-nav.next { right: 12px; }

.post-carousel-nav svg { width: 18px; height: 18px; }

.post-carousel:hover .post-carousel-nav,
.post-carousel:focus-within .post-carousel-nav {
  opacity: 1;
}

.post-carousel-nav:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.06);
}

.post-carousel-nav:active {
  transform: translateY(-50%) scale(0.96);
}

/* Dots */
.post-carousel-dots {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 4;
  pointer-events: none;
}

.post-carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  transition: background 0.2s ease, transform 0.2s ease;
}

.post-carousel-dot.is-active {
  background: #fff;
  transform: scale(1.2);
}

/* Video play/pause button overlay */
.post-slide-play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 62px;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  cursor: pointer;
  z-index: 3;
  transition: opacity 0.25s ease, transform 0.25s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.post-slide-play svg {
  width: 22px;
  height: 22px;
  margin-left: 3px;
}

.post-slide.is-playing .post-slide-play {
  opacity: 0;
  pointer-events: none;
}

.post-carousel:hover .post-slide.is-playing .post-slide-play {
  opacity: 1;
  pointer-events: auto;
}

/* Touch: no hover — always-visible chrome, hide prev/next arrows */
@media (hover: none) {
  .post-carousel-nav { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .post-carousel-track { transition: none; }
}

/* ==========================================================
   TELEGRAM — Settings (shared design tokens)
   ========================================================== */

:root {
  --tg-blue: #2AABEE;
  --tg-blue-hover: #1F9EDD;
  --tg-blue-soft: #EAF5FC;
  --tg-blue-line: #d6ebf9;
  --tg-bubble-out: #EFFDDE;
  --tg-bubble-out-text: #0B1F12;
  --tg-bubble-in: #FFFFFF;
  --tg-bubble-in-text: #1b1b1b;
  --tg-bubble-shadow: 0 1px 1.5px rgba(16, 35, 47, 0.12);
  --tg-time: #4FAE4E;
  --tg-time-in: #83898F;
  --tg-date-pill: rgba(84, 134, 176, 0.78);
  --tg-chat-surface: #F7F5EE;
  --tg-chat-tint: #DCE1DA;
  --tg-divider: rgba(16, 35, 47, 0.08);
  --tg-sep: #ECECEC;
  --tg-row-hover: #F3F4F6;
  --tg-row-active: #EAF5FC;
  --tg-ink: #111418;
  --tg-ink-2: #54606B;
  --tg-ink-3: #8c99a6;
  --tg-badge-mute: #B3BAC4;
  --tg-red: #E5484D;
  --tg-orange: #F59E0B;
  --tg-green: #3AB77F;
  --tg-purple: #8E75DA;
  --tg-teal: #2EB6B3;
  --tg-pink: #F05E9E;
  --tg-yellow: #F5C518;
  --tg-font: var(--font);
  --tg-wallpaper: linear-gradient(160deg, #EAF5FC 0%, #D6E9F8 45%, #C8DFF5 100%);
}

.dark {
  --tg-blue: #43A9EB;
  --tg-blue-hover: #5AB9F2;
  --tg-blue-soft: #18344E;
  --tg-blue-line: #1E4868;
  --tg-bubble-out: #2B5278;
  --tg-bubble-out-text: #FFFFFF;
  --tg-bubble-in: #182533;
  --tg-bubble-in-text: #F1F3F5;
  --tg-bubble-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
  --tg-time: #7BC862;
  --tg-time-in: #6A818E;
  --tg-date-pill: rgba(16, 52, 82, 0.9);
  --tg-chat-surface: #0E1621;
  --tg-chat-tint: #1F2D3D;
  --tg-divider: rgba(255, 255, 255, 0.08);
  --tg-sep: #1A222C;
  --tg-row-hover: #141E29;
  --tg-row-active: #1E3A52;
  --tg-ink: #F0F2F5;
  --tg-ink-2: #8a9aa8;
  --tg-ink-3: #6d7986;
  --tg-badge-mute: #3f4a56;
  --tg-wallpaper: linear-gradient(160deg, #0E1621 0%, #15263A 55%, #1B3453 100%);
}

.page-settings {
  font-family: var(--tg-font);
}

.page-settings .nav-icons .icon-btn.is-current {
  background: color-mix(in srgb, var(--tg-blue) 14%, transparent);
  color: var(--tg-blue);
}

.page-settings .nav-icons .icon-btn.is-current .icon-btn-label {
  color: var(--tg-blue);
}

/* ==========================================================
   SETTINGS — Telegram/iOS grouped list
   ========================================================== */

.settings {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 20px 96px;
  font-family: var(--tg-font);
}

.settings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0 20px;
}

.settings-heading {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--tg-ink);
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.settings-heading::before {
  content: '';
  width: 6px;
  height: 24px;
  border-radius: 3px;
  background: var(--tg-blue);
}

.settings-edit {
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: var(--tg-blue);
  background: var(--tg-blue-soft);
  transition: background 0.15s ease;
  letter-spacing: 0.01em;
}

.settings-edit:hover { background: color-mix(in srgb, var(--tg-blue) 22%, transparent); }

.settings-profile {
  position: relative;
  background: linear-gradient(160deg, var(--tg-blue) 0%, #1C7FBF 100%);
  color: #fff;
  border-radius: 22px;
  padding: 28px 22px 20px;
  overflow: hidden;
  margin-bottom: 18px;
  box-shadow: 0 8px 24px color-mix(in srgb, var(--tg-blue) 30%, transparent);
}

.settings-profile::before,
.settings-profile::after {
  content: '';
  position: absolute;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  pointer-events: none;
}

.settings-profile::before { width: 260px; height: 260px; right: -80px; top: -100px; }
.settings-profile::after  { width: 160px; height: 160px; right: 40px; bottom: -80px; background: rgba(255,255,255,0.06); }

.settings-profile-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  z-index: 1;
}

.settings-profile-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.settings-profile-avatar {
  width: 88px;
  height: 88px;
  border-radius: 999px;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.7);
  display: block;
}

.settings-profile-camera {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #fff;
  color: var(--tg-blue);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  transition: transform 0.15s ease;
}

.settings-profile-camera:hover { transform: scale(1.08); }
.settings-profile-camera svg { width: 16px; height: 16px; }

.settings-profile-text {
  min-width: 0;
  flex: 1;
}

.settings-profile-name {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
  display: flex;
  align-items: center;
  gap: 6px;
}

.settings-profile-verify {
  width: 18px;
  height: 18px;
  color: #fff;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,0.2));
  flex-shrink: 0;
}

.settings-profile-handle {
  font-size: 13.5px;
  opacity: 0.85;
  margin-top: 3px;
  letter-spacing: 0;
}

.settings-profile-status {
  font-size: 12px;
  margin-top: 8px;
  opacity: 0.82;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.settings-profile-status::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #7BC862;
  box-shadow: 0 0 0 2px rgba(123, 200, 98, 0.4);
}

.settings-profile-stats {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  padding: 14px 0;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 16px;
  margin-top: 16px;
  z-index: 1;
}

.settings-stat {
  text-align: center;
  padding: 0 6px;
}

.settings-stat-num {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.settings-stat-label {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.78);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 2px;
}

.settings-stat + .settings-stat {
  border-left: 1px solid rgba(255,255,255,0.22);
}

/* ---- Quick action row ---- */

.settings-quick {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}

.settings-quick-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 10px;
  background: var(--bg);
  border: 1px solid var(--tg-sep);
  border-radius: 16px;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
  font-family: var(--tg-font);
  cursor: pointer;
}

.settings-quick-btn:hover {
  background: var(--tg-blue-soft);
  border-color: var(--tg-blue);
  transform: translateY(-1px);
}

.settings-quick-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--tg-blue-soft);
  color: var(--tg-blue);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
}

.settings-quick-btn:hover .settings-quick-icon {
  background: var(--tg-blue);
  color: #fff;
}

.settings-quick-icon svg { width: 18px; height: 18px; }

.settings-quick-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--tg-ink);
}

/* ---- Grouped sections ---- */

.settings-section { margin-bottom: 22px; }

.settings-section-label {
  padding: 0 16px 6px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tg-ink-3);
}

.settings-group {
  background: var(--bg);
  border: 1px solid var(--tg-sep);
  border-radius: 16px;
  overflow: hidden;
}

.settings-row {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  column-gap: 14px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--tg-sep);
  transition: background 0.12s ease;
  cursor: pointer;
  font-family: var(--tg-font);
  text-decoration: none;
  color: inherit;
  background: var(--bg);
  width: 100%;
  text-align: left;
}

.settings-row:last-child { border-bottom: none; }
.settings-row:hover { background: var(--tg-row-hover); }

.settings-row-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

.settings-row-icon svg { width: 18px; height: 18px; }

.settings-row-icon.t-blue   { background: linear-gradient(140deg, #41A8F0, #1C70B8); }
.settings-row-icon.t-red    { background: linear-gradient(140deg, #F26868, #D23D3D); }
.settings-row-icon.t-orange { background: linear-gradient(140deg, #F5A623, #E0850F); }
.settings-row-icon.t-yellow { background: linear-gradient(140deg, #F5C518, #D9A700); }
.settings-row-icon.t-green  { background: linear-gradient(140deg, #3AB77F, #1C8E58); }
.settings-row-icon.t-teal   { background: linear-gradient(140deg, #2EB6B3, #1B8D8B); }
.settings-row-icon.t-purple { background: linear-gradient(140deg, #8E75DA, #5F48BA); }
.settings-row-icon.t-pink   { background: linear-gradient(140deg, #F05E9E, #C93D7D); }
.settings-row-icon.t-gray   { background: linear-gradient(140deg, #7F8A96, #596370); }
.settings-row-icon.t-indigo { background: linear-gradient(140deg, #5768DE, #3B4BBF); }

.settings-row-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.settings-row-title {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--tg-ink);
  letter-spacing: -0.003em;
  line-height: 1.3;
}

.settings-row-sub {
  font-size: 12.5px;
  color: var(--tg-ink-2);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 90%;
}

.settings-row-side {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--tg-ink-3);
  font-size: 13px;
  flex-shrink: 0;
}

.settings-row-value {
  color: var(--tg-ink-2);
  font-weight: 500;
  letter-spacing: -0.003em;
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.settings-row-chev {
  width: 18px;
  height: 18px;
  color: var(--tg-ink-3);
}

.settings-row-badge {
  min-width: 22px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--tg-red);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* iOS-style toggle */

.settings-toggle {
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: var(--tg-sep);
  position: relative;
  transition: background 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
  cursor: pointer;
  border: none;
  padding: 0;
  flex-shrink: 0;
}

.settings-toggle::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18), 0 2px 6px rgba(0, 0, 0, 0.06);
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.settings-toggle.is-on { background: var(--tg-blue); }
.settings-toggle.is-on::before { transform: translateX(18px); }

/* Danger */
.settings-row.is-danger .settings-row-title { color: var(--tg-red); }
.settings-row.is-danger .settings-row-icon { background: linear-gradient(140deg, #F26868, #D23D3D); }

/* About footer */

.settings-footer {
  text-align: center;
  padding: 24px 16px;
  color: var(--tg-ink-3);
  font-size: 12px;
  line-height: 1.55;
}

.settings-footer strong {
  color: var(--tg-blue);
  font-weight: 700;
  letter-spacing: 0.01em;
}

.settings-footer-version {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 11px;
  margin-top: 4px;
  opacity: 0.7;
}

/* Segmented control */

.settings-seg {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  margin: 12px 16px;
  background: var(--tg-row-hover);
  border-radius: 12px;
}

.settings-seg-btn {
  padding: 9px 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--tg-ink-2);
  background: transparent;
  border-radius: 9px;
  border: none;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
  font-family: var(--tg-font);
}

.settings-seg-btn.is-active {
  background: var(--bg);
  color: var(--tg-ink);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.settings-seg-btn:hover:not(.is-active) { color: var(--tg-ink); }

/* Slider row */

.settings-slider-row {
  padding: 12px 16px 14px;
  border-bottom: 1px solid var(--tg-sep);
}

.settings-slider-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13.5px;
  color: var(--tg-ink);
  margin-bottom: 10px;
  font-weight: 600;
}

.settings-slider-label span:last-child { color: var(--tg-blue); font-weight: 700; font-size: 13px; }

.settings-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: var(--tg-sep);
  outline: none;
  cursor: pointer;
}

.settings-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #fff;
  border: 2px solid var(--tg-blue);
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.settings-slider::-webkit-slider-thumb:hover { transform: scale(1.15); }

.settings-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #fff;
  border: 2px solid var(--tg-blue);
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  cursor: pointer;
}

/* Wallpaper preview strip */

.settings-wallpapers {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(74px, 1fr));
  gap: 8px;
  padding: 12px 16px 14px;
  border-bottom: 1px solid var(--tg-sep);
}

.settings-wallpaper {
  aspect-ratio: 3 / 4;
  border-radius: 10px;
  border: 2px solid transparent;
  cursor: pointer;
  background-size: cover;
  background-position: center;
  transition: border-color 0.15s ease, transform 0.1s ease;
  position: relative;
}

.settings-wallpaper:hover { transform: translateY(-2px); }
.settings-wallpaper.is-active { border-color: var(--tg-blue); }

.settings-wallpaper.is-active::after {
  content: '';
  position: absolute;
  right: 4px;
  top: 4px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--tg-blue) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><path d='m5 12 5 5 9-11'/></svg>") center / 12px 12px no-repeat;
}

/* Mobile settings */

@media (max-width: 580px) {
  .settings { padding: 16px 14px 80px; }
  .settings-profile { padding: 22px 16px 16px; border-radius: 18px; }
  .settings-profile-avatar { width: 72px; height: 72px; }
  .settings-profile-name { font-size: 18px; }
  .settings-profile-stats { padding: 10px 0; }
  .settings-stat-num { font-size: 16px; }
  .settings-quick { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .settings-quick-btn { padding: 10px 6px; border-radius: 12px; }
  .settings-quick-icon { width: 32px; height: 32px; border-radius: 10px; }
  .settings-quick-label { font-size: 11px; }
  .settings-row { padding: 11px 14px; grid-template-columns: 32px 1fr auto; column-gap: 12px; }
  .settings-row-icon { width: 32px; height: 32px; border-radius: 9px; }
}

/* ----------------------------------------------------------
   Share-property bottom sheet
   Mirrors the comments sheet's glass treatment; reuses .rc-head /
   .rc-title / .rc-close for the header.
---------------------------------------------------------- */
.reel-share-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.reel-share-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.reel-share-sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, 100%);
  width: min(520px, 100%);
  z-index: 201;
  display: flex;
  flex-direction: column;
  background: rgba(18, 18, 20, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: none;
  border-radius: 22px 22px 0 0;
  -webkit-backdrop-filter: blur(28px) saturate(140%);
  backdrop-filter: blur(28px) saturate(140%);
  box-shadow: 0 -24px 70px rgba(0, 0, 0, 0.55);
  color: #fff;
  padding-bottom: max(14px, env(safe-area-inset-bottom));
  transition: transform 0.36s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reel-share-sheet.is-open {
  transform: translate(-50%, 0);
}

.reel-share-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 18px 16px 6px;
}

/* Property preview card */
.reel-share-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease, transform 0.12s ease;
}

.reel-share-card:hover { background: rgba(255, 255, 255, 0.1); }
.reel-share-card:active { transform: scale(0.99); }

.reel-share-thumb {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.08);
}

.reel-share-card-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.reel-share-price {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.reel-share-meta,
.reel-share-cap {
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reel-share-meta { color: rgba(255, 255, 255, 0.6); }
.reel-share-cap { color: rgba(255, 255, 255, 0.42); }

.reel-share-card-chevron {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.35);
}

/* Share-target row */
.reel-share-targets {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.reel-share-targets::-webkit-scrollbar { display: none; }

.reel-share-target {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  width: 62px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: #fff;
}

.reel-share-disc {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: transform 0.14s ease;
}

.reel-share-disc.has-ring {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.reel-share-target:active .reel-share-disc { transform: scale(0.9); }
.reel-share-disc svg { width: 24px; height: 24px; }

.reel-share-target-label {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.7);
  white-space: nowrap;
}

/* Copy-link field */
.reel-share-copy {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 6px 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.reel-share-linkwrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
  color: rgba(255, 255, 255, 0.5);
}

.reel-share-linkwrap svg { width: 16px; height: 16px; flex-shrink: 0; }

.reel-share-url {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.82);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reel-share-copybtn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 999px;
  background: #fff;
  color: #0a0a0a;
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.12s ease;
}

.reel-share-copybtn:active { transform: scale(0.95); }
.reel-share-copybtn.is-done { background: #25d366; color: #04180b; }
.reel-share-copybtn svg { width: 15px; height: 15px; }
