/* ═══════════════════════════════════════════════════════════════════
   ILoveTheMoney — Editorial Design System
   Palette: Jet Black · Pure White · Warm Gray — Red only in the logo heart
   Inspired by: Achille Zibi — I ❤ The Money logo (I Love NY aesthetic)
   Typography: Cormorant Garamond (display) · Inter (body)
   ═══════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400;1,600&family=Inter:wght@300;400;500;600;700&display=swap');

/* ── Design Tokens ──────────────────────────────────────────────── */
:root {
  /* Core palette — Light (Crisp White) */
  --clr-bg:          #F8F8F8;
  --clr-surface:     #FFFFFF;
  --clr-surface-2:   #F0F0F0;
  --clr-border:      #E5E5E5;
  --clr-border-soft: #EBEBEB;

  /* Text */
  --clr-text:        #0D0D0D;
  --clr-text-2:      #4A4A4A;
  --clr-text-3:      #888888;
  --clr-text-inv:    #FFFFFF;

  /* Brand — Crimson Red (I ❤ The Money) */
  --clr-red:        #0D0D0D;
  --clr-red-light:  #333333;
  --clr-red-dark:   #000000;
  --clr-red-muted:  rgba(0,0,0,.06);
  --clr-red-glow:   rgba(0,0,0,.10);

  /* Status */
  --clr-success:     #2E7D52;
  --clr-error:       #C0392B;
  --clr-warning:     #B7791F;
  --clr-info:        #1A6B8A;

  /* Gradients */
  --grad-red:       linear-gradient(135deg, #0D0D0D 0%, #333333 50%, #000000 100%);
  --grad-surface:    linear-gradient(180deg, #FFFFFF 0%, #F8F8F8 100%);

  /* Shadows */
  --shadow-xs:       0 1px 2px rgba(0,0,0,.06);
  --shadow-sm:       0 2px 8px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:       0 4px 20px rgba(0,0,0,.10), 0 2px 6px rgba(0,0,0,.06);
  --shadow-lg:       0 12px 40px rgba(0,0,0,.12), 0 4px 12px rgba(0,0,0,.08);
  --shadow-red:     0 4px 24px rgba(0,0,0,.15);

  /* Geometry */
  --radius-xs:       4px;
  --radius-sm:       8px;
  --radius-md:       12px;
  --radius-lg:       18px;
  --radius-xl:       24px;
  --radius-pill:     999px;

  /* Motion */
  --ease-out:        cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out:     cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast:        140ms;
  --dur-base:        240ms;
  --dur-slow:        400ms;

  /* Layout */
  --navbar-h:        64px;
  --sidebar-l-w:     170px;
  --sidebar-r-w:     170px;
}

/* Dark mode tokens */
[data-theme="dark"] {
  --clr-bg:          #080808;
  --clr-surface:     #111111;
  --clr-surface-2:   #1A1A1A;
  --clr-border:      #2A2A2A;
  --clr-border-soft: #1A1A1A;

  --clr-text:        #F0F0F0;
  --clr-text-2:      #9A9A9A;
  --clr-text-3:      #555555;
  --clr-text-inv:    #080808;

  --clr-red-muted:  rgba(255,255,255,.07);
  --clr-red-glow:   rgba(255,255,255,.12);

  --grad-surface:    linear-gradient(180deg, #1A1A1A 0%, #111111 100%);

  --shadow-xs:       0 1px 2px rgba(0,0,0,.20);
  --shadow-sm:       0 2px 8px rgba(0,0,0,.30), 0 1px 2px rgba(0,0,0,.20);
  --shadow-md:       0 4px 20px rgba(0,0,0,.35), 0 2px 6px rgba(0,0,0,.20);
  --shadow-lg:       0 12px 40px rgba(0,0,0,.40), 0 4px 12px rgba(0,0,0,.25);
  --shadow-red:     0 4px 24px rgba(0,0,0,.30);
}

/* ── CSS Reset ──────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--clr-bg);
  color: var(--clr-text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-weight: 300;
  font-size: 15px;
  letter-spacing: 0.02em;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background var(--dur-base) var(--ease-in-out),
              color var(--dur-base) var(--ease-in-out);
}

a { color: var(--clr-red); text-decoration: none; }
a:hover { color: var(--clr-red-light); }
img { max-width: 100%; display: block; }
button { cursor: pointer; }

/* ── Typography scale ───────────────────────────────────────────── */
.display-serif {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.02em;
}

h1, h2, h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); }

.overline {
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--clr-red);
}

/* ── Gold text gradient ─────────────────────────────────────────── */
.text-gold {
  background: var(--grad-red);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-muted  { color: var(--clr-text-2) !important; }
.text-dimmed { color: var(--clr-text-3) !important; }
.text-reset  { color: var(--clr-text) !important; }

/* ── Navbar ─────────────────────────────────────────────────────── */
.iltm-navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--navbar-h);
  background: var(--clr-surface);
  border-bottom: 1px solid var(--clr-border);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  gap: 1rem;
  box-shadow: var(--shadow-xs);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.navbar-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

/* Logo image — naturally black on white; invert in dark mode */
.navbar-logo {
  height: 32px;
  width: auto;
  display: block;
  border-radius: 4px;
}

[data-theme="dark"] .navbar-logo {
  filter: invert(1);
}

/* Search bar */
.nav-search {
  flex: 1;
  max-width: 380px;
  position: relative;
}

.nav-search-input {
  width: 100%;
  height: 38px;
  padding: 0 1rem 0 2.5rem;
  background: var(--clr-surface-2);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-pill);
  color: var(--clr-text);
  font-size: .875rem;
  font-family: inherit;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast), background var(--dur-fast);
  outline: none;
}

.nav-search-input::placeholder { color: var(--clr-text-3); }
.nav-search-input:focus {
  border-color: var(--clr-red);
  box-shadow: 0 0 0 3px var(--clr-red-muted);
  background: var(--clr-surface);
}

.nav-search-icon {
  position: absolute;
  left: .8rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--clr-text-3);
  font-size: .9rem;
  pointer-events: none;
}

/* Nav icons */
.nav-icon-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-pill);
  background: transparent;
  border: none;
  color: var(--clr-text-2);
  font-size: 1.15rem;
  text-decoration: none;
  transition: color var(--dur-fast), background var(--dur-fast);
}

.nav-icon-btn:hover {
  color: var(--clr-red);
  background: var(--clr-red-muted);
}

/* Badge */
.badge-count {
  position: absolute;
  top: -3px;
  right: -3px;
  background: var(--clr-error);
  color: #fff;
  font-size: .6rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  border: 2px solid var(--clr-surface);
}

/* Avatar button */
.avatar-trigger {
  background: none;
  border: none;
  padding: 0;
  border-radius: var(--radius-pill);
  cursor: pointer;
}

/* Dropdown — hidden by default (defensive fallback; Bootstrap also sets this) */
.dropdown-menu {
  display: none;
  background: var(--clr-surface) !important;
  border: 1px solid var(--clr-border) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-lg) !important;
  padding: .4rem !important;
  min-width: 200px;
}
.dropdown-menu.show {
  display: block;
}

.dropdown-item {
  color: var(--clr-text) !important;
  border-radius: var(--radius-sm) !important;
  font-size: .875rem !important;
  padding: .55rem .9rem !important;
  transition: background var(--dur-fast), color var(--dur-fast) !important;
  display: flex;
  align-items: center;
  gap: .6rem;
}

.dropdown-item:hover {
  background: var(--clr-red-muted) !important;
  color: var(--clr-red) !important;
}

.dropdown-item i { width: 1rem; text-align: center; }
.dropdown-divider { border-color: var(--clr-border) !important; margin: .3rem 0 !important; }

/* Search dropdown */
.search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  z-index: 200;
}

/* ═══════════════════════════════════════════════════════════════
   Three-column layout — mobile-first progressive enhancement
   ═══════════════════════════════════════════════════════════════
   ≤ 960px   : 1 column. Both sidebars hidden. No drawer.
   961–1260  : 2 columns. Left + main. Right: CSS-class drawer only.
   ≥ 1261px  : 3 columns. Left + main + right.
   ═══════════════════════════════════════════════════════════════ */

/* Base (mobile): single column, both sidebars hidden */
.sidebar-left,
.sidebar-right { display: none; }

.iltm-layout {
  display: grid;
  grid-template-columns: 1fr;
  max-width: 1340px;
  margin: 0 auto;
  padding: .75rem .5rem 5rem;
  gap: 1.5rem;
  align-items: start;
}

.main-col { min-width: 0; }

/* Tablet 961px+: reveal left sidebar */
@media (min-width: 961px) {
  .sidebar-left { display: block; }
  .iltm-layout  { grid-template-columns: var(--sidebar-l-w) 1fr; padding: 1.5rem 1rem; }
  .main-col     { grid-column: 2; }
}

/* Desktop 1261px+: reveal right sidebar as sticky col-3 */
@media (min-width: 1261px) {
  .sidebar-right  { display: flex; grid-column: 3; }
  .iltm-layout    { grid-template-columns: var(--sidebar-l-w) 1fr var(--sidebar-r-w); }
  .drawer-close-btn { display: none; }
}

/* Tablet drawer (961–1260px): right sidebar slides in when body.drawer-open.
   CSS class toggled by JS — no inline style manipulation. */
@media (min-width: 961px) and (max-width: 1260px) {
  .drawer-close-btn { display: flex; }

  body.drawer-open .sidebar-right {
    display: flex;
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: 300px;
    z-index: 800;
    background: var(--clr-surface);
    border-left: 1px solid var(--clr-border);
    padding: 1.25rem;
    overflow-y: auto;
    box-shadow: -4px 0 24px rgba(0, 0, 0, .12);
  }

  body.drawer-open .sidebar-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    z-index: 799;
  }
}

/* ── Left Sidebar ───────────────────────────────────────────────── */
.sidebar-left {
  position: sticky;
  top: calc(var(--navbar-h) + 1.5rem);
  height: fit-content;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .5rem .9rem;
  border-radius: var(--radius-md);
  color: #1C1C1C;
  text-decoration: none;
  font-size: .62rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  transition: background var(--dur-fast), color var(--dur-fast);
  position: relative;
}

.sidebar-link i {
  font-size: .82rem;
  width: 1rem;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-link:hover {
  background: var(--clr-red-muted);
  color: var(--clr-red);
}

.sidebar-link.active {
  background: var(--clr-red-muted);
  color: var(--clr-red);
  font-weight: 600;
}

.sidebar-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  bottom: 20%;
  width: 3px;
  background: var(--grad-red);
  border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
}

.sidebar-divider {
  height: 1px;
  width: 55%;
  background: var(--clr-border);
  margin: .5rem 0;
}

/* Verify CTA in sidebar */
.sidebar-verify-cta {
  background: linear-gradient(135deg, rgba(0,0,0,.06), rgba(0,0,0,.03));
  border: 1px solid rgba(0,0,0,.12);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-top: 1rem;
}

/* ── Right Sidebar ──────────────────────────────────────────────── */
/* Desktop: sticky column — mobile/tablet: off-screen drawer via inline <style> */
.sidebar-right {
  position: sticky;
  top: calc(var(--navbar-h) + 1.5rem);
  height: fit-content;
  flex-direction: column;
  gap: 1rem;
}

/* Sidebar overlay — base hidden; tablet drawer shows it via body.drawer-open */
.sidebar-overlay { display: none; }

/* Drawer header close-button row — hidden by default; tablet drawer shows it */
.drawer-close-btn {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding-bottom: .75rem;
  margin-bottom: .25rem;
  border-bottom: 1px solid var(--clr-border);
}

/* ── Widget card ────────────────────────────────────────────────── */
.widget {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-xs);
}

.widget-title {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--clr-red);
  margin-bottom: 1rem;
}

/* ── Surface / Card ─────────────────────────────────────────────── */
.card-luxury {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--dur-base) var(--ease-out),
              border-color var(--dur-base) var(--ease-out);
}

.card-luxury:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(0,0,0,.12);
}

.card-pad { padding: 1.25rem; }
.card-pad-lg { padding: 1.75rem 2rem; }

/* ── Post card ──────────────────────────────────────────────────── */
.post-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--dur-base) var(--ease-out),
              border-color var(--dur-base) var(--ease-out);
  margin-bottom: 1rem;
}

.post-card:hover {
  box-shadow: var(--shadow-sm);
  border-color: rgba(0,0,0,.10);
}

/* Post image grid (1–4 images, Instagram-style) */
.post-img-grid {
  margin: .5rem 0 .65rem;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.post-img-grid:not(.multi) .post-img-item img {
  width: 100%;
  max-height: 480px;
  object-fit: contain;
  display: block;
  border-radius: var(--radius-md);
  background: #000;
}

.post-img-item {
  overflow: hidden;
  position: relative;
}

.post-img-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  transition: transform .2s var(--ease-out);
}

.post-img-item:hover img { transform: scale(1.03); }

/* ── Post video ─────────────────────────────────────────────────── */
.post-media {
  display: block;
  width: 100%;
  max-width: 100%;
  max-height: 480px;
  border-radius: var(--radius-md);
  margin: .5rem 0 .65rem;
  background: #000;
}

/* ── Post carousel (multi-image) ────────────────────────────────── */
.post-carousel {
  position: relative;
  margin: .5rem 0 .65rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #000;
  user-select: none;
}

.post-carousel-track {
  display: flex;
  transition: transform .28s ease;
  will-change: transform;
}

.post-carousel-img {
  flex: 0 0 100%;
  width: 100%;
  max-height: 480px;
  object-fit: contain;
  display: block;
}

.post-carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,.48);
  border: none;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  line-height: 1;
  z-index: 3;
  transition: background var(--dur-fast);
}

.post-carousel-btn:hover { background: rgba(0,0,0,.72); }
.post-carousel-btn.prev { left: .45rem; }
.post-carousel-btn.next { right: .45rem; }
@media (max-width: 640px) {
  .post-carousel-btn { width: 42px; height: 42px; font-size: 1.7rem; }
  .post-carousel { aspect-ratio: 1 / 1; }
  .post-carousel-track { height: 100%; }
  .post-carousel-img { height: 100%; max-height: none; object-fit: contain; }
}

.post-carousel-counter {
  position: absolute;
  top: .5rem;
  right: .6rem;
  background: rgba(0,0,0,.52);
  color: #fff;
  font-size: .7rem;
  font-weight: 600;
  padding: .18rem .55rem;
  border-radius: 999px;
  z-index: 3;
  pointer-events: none;
}

.post-carousel-dots {
  position: absolute;
  bottom: .55rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: .35rem;
  z-index: 3;
}

.post-carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,.45);
  cursor: pointer;
  transition: background var(--dur-fast), transform var(--dur-fast);
}

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

/* ── Full-page post comment section ────────────────────────────── */
.post-comments-section {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-top: 1rem;
}

.post-comments-header {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-weight: 600;
  font-size: .9rem;
  color: var(--clr-text);
  margin-bottom: 1.1rem;
}

.post-comments-header i {
  font-size: 1rem;
  color: var(--clr-text-2);
}

.post-comments-list {
  display: flex;
  flex-direction: column;
  gap: .1rem;
  margin-bottom: 1.1rem;
}

.post-comment-row {
  display: flex;
  gap: .6rem;
  align-items: flex-start;
  padding: .4rem 0;
}

.post-comment-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.post-comment-body {
  flex: 1;
  min-width: 0;
}

.post-comment-bubble {
  background: var(--clr-surface-2);
  border-radius: var(--radius-md);
  padding: .45rem .8rem;
  display: inline-block;
  max-width: 100%;
}

.post-comment-name {
  font-weight: 600;
  font-size: .8rem;
  color: var(--clr-text);
  text-decoration: none;
  display: block;
  margin-bottom: .1rem;
}

.post-comment-name:hover { text-decoration: underline; }

.post-comment-text {
  margin: 0;
  font-size: .855rem;
  color: var(--clr-text-2);
  line-height: 1.5;
  word-break: break-word;
}

.post-comment-time {
  font-size: .72rem;
  color: var(--clr-text-3);
  margin-left: .5rem;
  margin-top: .2rem;
  display: inline-block;
}

.post-comment-del {
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--clr-text-3);
  padding: .2rem .3rem;
  font-size: .9rem;
  opacity: .35;
  transition: opacity var(--dur-fast);
  line-height: 1;
  margin-top: .3rem;
}

.post-comment-del:hover { opacity: 1 !important; }

.post-comments-empty {
  text-align: center;
  color: var(--clr-text-3);
  font-size: .855rem;
  padding: 1rem 0;
}

.post-comment-input-row {
  display: flex;
  align-items: center;
  gap: .6rem;
  border-top: 1px solid var(--clr-border);
  padding-top: .9rem;
}

.post-comment-input {
  flex: 1;
  font-size: .855rem;
}

.post-comment-submit {
  padding: .42rem 1rem;
  font-size: .84rem;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Post detail modal ──────────────────────────────────────────── */
.pdm-inner {
  display: flex;
  max-width: 960px;
  width: 100%;
  max-height: 90vh;
  background: var(--clr-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
}

.pdm-image-col {
  flex: 0 0 58%;
  background: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  overflow: hidden;
}

.pdm-image-col img,
.pdm-image-col video {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  display: block;
}

.pdm-side-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-left: 1px solid var(--clr-border);
}

.pdm-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(0,0,0,.55);
  border: none;
  color: #fff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  line-height: 1;
  transition: background var(--dur-fast);
}

.pdm-nav-btn:hover { background: rgba(0,0,0,.75); }

.pdm-close-btn {
  position: absolute;
  top: .6rem;
  right: .6rem;
  z-index: 10;
  background: rgba(0,0,0,.45);
  border: none;
  color: #fff;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  line-height: 1;
  transition: background var(--dur-fast);
}

.pdm-close-btn:hover { background: rgba(0,0,0,.7); }

@media (max-width: 640px) {
  .pdm-inner {
    flex-direction: column;
    max-height: 95vh;
    overflow-y: auto;
  }
  .pdm-image-col {
    flex: 0 0 70vw;
    height: 70vw;
    max-height: 70vw;
    min-height: 0;
  }
  .pdm-image-col img,
  .pdm-image-col video {
    width: 100%;
    height: 100%;
    max-height: 100%;
    object-fit: contain;
  }
  .pdm-nav-btn {
    top: 35vw;
  }
  .pdm-side-col {
    border-left: none;
    border-top: 1px solid var(--clr-border);
    flex: 1;
    min-height: 300px;
  }
}

/* Filter strip */
.filter-btn {
  flex-shrink: 0;
  padding: .28rem .75rem;
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-pill);
  background: var(--clr-surface-2);
  color: var(--clr-text-2);
  font-size: .74rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: border-color var(--dur-fast), background var(--dur-fast), color var(--dur-fast);
  white-space: nowrap;
}

.filter-btn:hover {
  border-color: var(--clr-red);
  color: var(--clr-red);
}

.filter-btn.active {
  background: var(--clr-red);
  border-color: var(--clr-red);
  color: #fff;
}

.fit-btn {
  flex-shrink: 0;
  padding: .22rem .65rem;
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-pill);
  background: var(--clr-surface-2);
  color: var(--clr-text-3);
  font-size: .72rem;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  transition: border-color var(--dur-fast), background var(--dur-fast), color var(--dur-fast);
}

.fit-btn.active {
  border-color: var(--clr-text-2);
  color: var(--clr-text);
  background: var(--clr-surface);
}

/* Post composer */
.post-composer {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-xs);
}

.compose-textarea {
  width: 100%;
  background: var(--clr-surface-2);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  color: var(--clr-text);
  font-family: inherit;
  font-size: .9rem;
  line-height: 1.6;
  padding: .75rem 1rem;
  resize: none;
  outline: none;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}

.compose-textarea:focus {
  border-color: var(--clr-red);
  box-shadow: 0 0 0 3px var(--clr-red-muted);
  background: var(--clr-surface);
}

.compose-textarea::placeholder { color: var(--clr-text-3); }

/* Post actions bar */
.post-actions {
  display: flex;
  gap: .25rem;
  flex-wrap: wrap;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .4rem .75rem;
  border: none;
  background: transparent;
  border-radius: var(--radius-pill);
  color: var(--clr-text-3);
  font-size: .82rem;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: color var(--dur-fast), background var(--dur-fast);
}

.action-btn:hover {
  color: var(--clr-red);
  background: var(--clr-red-muted);
}

.action-btn.liked {
  color: #E53E3E;
  background: rgba(229,62,62,.08);
}

.action-btn.bookmarked {
  color: var(--clr-red);
  background: var(--clr-red-muted);
}

.action-btn i { font-size: .95rem; }

/* ── Avatars ─────────────────────────────────────────────────────── */
.avatar {
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.avatar-xs  { width: 28px;  height: 28px; }
.avatar-sm  { width: 40px;  height: 40px; }
.avatar-md  { width: 52px;  height: 52px; }
.avatar-lg  { width: 72px;  height: 72px; }
.avatar-xl  { width: 96px;  height: 96px; }

.avatar-gold-ring {
  box-shadow: 0 0 0 2px var(--clr-red);
}

/* Profile header avatar */
.profile-avatar-wrap {
  position: relative;
  display: inline-block;
  margin-top: -52px;
}

.profile-avatar-img {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--clr-surface);
  box-shadow: var(--shadow-sm);
}

/* ── Verified badge ─────────────────────────────────────────────── */
/* PREV: color: var(--clr-red) */
.verified {
  display: inline-flex;
  align-items: center;
  color: #22C55E;
  font-size: .8em;
  margin-left: .15em;
}
.verified-badge {
  display: inline-flex;
  align-items: center;
  color: #22C55E;
  font-size: .8em;
  margin-left: .15em;
}

/* ── Buttons ─────────────────────────────────────────────────────── */
.btn-gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .65rem 1.5rem;
  background: var(--grad-red);
  color: #FFFFFF;
  font-weight: 700;
  font-size: .875rem;
  font-family: inherit;
  letter-spacing: .02em;
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  text-decoration: none;
  transition: opacity var(--dur-fast), transform var(--dur-fast), box-shadow var(--dur-fast);
  box-shadow: 0 2px 12px rgba(201,168,76,.35);
}

.btn-gold:hover {
  opacity: .9;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(201,168,76,.45);
  color: #FFFFFF;
}

.btn-gold:active { transform: translateY(0); }

.btn-gold-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .6rem 1.4rem;
  background: transparent;
  color: var(--clr-red);
  font-weight: 600;
  font-size: .875rem;
  font-family: inherit;
  letter-spacing: .02em;
  border: 1.5px solid var(--clr-red);
  border-radius: var(--radius-pill);
  cursor: pointer;
  text-decoration: none;
  transition: background var(--dur-fast), color var(--dur-fast), box-shadow var(--dur-fast);
}

.btn-gold-outline:hover {
  background: var(--clr-red-muted);
  box-shadow: 0 2px 12px var(--clr-red-glow);
  color: var(--clr-red);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .55rem 1.2rem;
  background: transparent;
  color: var(--clr-gold);
  font-weight: 600;
  font-size: .875rem;
  font-family: inherit;
  border: 1.5px solid var(--clr-gold);
  border-radius: var(--radius-pill);
  cursor: pointer;
  text-decoration: none;
  transition: background var(--dur-fast), border-color var(--dur-fast), color var(--dur-fast);
}

.btn-ghost:hover {
  background: var(--clr-gold);
  border-color: var(--clr-gold);
  color: #0D0D0D;
}

.btn-danger {
  background: rgba(192,57,43,.1);
  color: var(--clr-error);
  border: 1px solid rgba(192,57,43,.2);
}

.btn-danger:hover {
  background: rgba(192,57,43,.18);
  border-color: rgba(192,57,43,.4);
  color: var(--clr-error);
}

.btn-sm  { padding: .4rem 1rem !important; font-size: .8rem !important; }
.btn-lg  { padding: .8rem 2rem !important; font-size: 1rem !important; }
.btn-full { width: 100% !important; }

/* ── Bootstrap modal shim (Bootstrap CSS not loaded) ────────────── */
.modal        { display: none; position: fixed; inset: 0; z-index: 1055; overflow-y: auto; }
.modal.show   { display: block; }
.modal-dialog { margin: 1.75rem auto; pointer-events: none; }
.modal-dialog-centered { display: flex; align-items: center; min-height: calc(100% - 3.5rem); }
.modal-content { pointer-events: auto; width: 100%; }
.modal-backdrop        { position: fixed; inset: 0; z-index: 1050; background: #000; opacity: 0; }
.modal-backdrop.show   { opacity: .45; }
.modal-sm .modal-dialog,
.modal-dialog.modal-sm { max-width: 320px; }
.btn-close { background: none; border: none; font-size: 1.2rem; cursor: pointer; opacity: .55; padding: .4rem; color: var(--clr-text); }
.btn-close:hover { opacity: 1; }

/* ── Form controls ──────────────────────────────────────────────── */
.lux-label {
  display: block;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--clr-text-3);
  margin-bottom: .4rem;
}

.lux-input,
.lux-select,
.lux-textarea {
  display: block;
  width: 100%;
  padding: .7rem 1rem;
  background: var(--clr-surface-2);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  color: var(--clr-text);
  font-family: inherit;
  font-size: .9rem;
  outline: none;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast), background var(--dur-fast);
}

.lux-input:focus,
.lux-select:focus,
.lux-textarea:focus {
  border-color: var(--clr-red);
  box-shadow: 0 0 0 3px var(--clr-red-muted);
  background: var(--clr-surface);
}

.lux-input::placeholder,
.lux-textarea::placeholder { color: var(--clr-text-3); }

.lux-textarea { resize: vertical; min-height: 100px; line-height: 1.6; }
.lux-select   { appearance: none; cursor: pointer; }

.lux-input-group {
  position: relative;
}

.lux-input-group .lux-input { padding-left: 2.5rem; }
.lux-input-group .lux-input-icon {
  position: absolute;
  left: .9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--clr-text-3);
  font-size: .9rem;
}

.form-group { margin-bottom: 1.25rem; }
.form-hint  { font-size: .78rem; color: var(--clr-text-3); margin-top: .3rem; }
.form-error { font-size: .78rem; color: var(--clr-error); margin-top: .3rem; }

/* ── Flash / Alert messages ─────────────────────────────────────── */
.flash-msg {
  margin: 0;
  border: none;
  border-radius: 0;
  border-bottom: 1px solid var(--clr-border);
  font-size: .875rem;
  padding: .85rem 1.5rem;
}

.alert-success { background: rgba(46,125,82,.08); color: var(--clr-success); }
.alert-danger  { background: rgba(192,57,43,.08); color: var(--clr-error);   }
.alert-warning { background: rgba(183,121,31,.08); color: var(--clr-warning); }
.alert-info    { background: rgba(26,107,138,.08); color: var(--clr-info);   }

.flash-msg .btn-close { filter: none; opacity: .6; }

/* ── Profile cover ──────────────────────────────────────────────── */
.profile-cover {
  height: 220px;
  background: linear-gradient(135deg, #0D0D0D 0%, #2C2518 60%, #3D3020 100%);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow: hidden;
  position: relative;
}

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

.profile-cover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, rgba(12,11,9,.5));
}

/* ── Story ring ──────────────────────────────────────────────────── */
.story-ring {
  border-radius: 50%;
  padding: 2px;
  background: var(--grad-red);
}

.story-ring-inner {
  border-radius: 50%;
  background: var(--clr-surface);
  padding: 2px;
}

/* ── Trending tags ───────────────────────────────────────────────── */
.trending-tag {
  display: flex;
  flex-direction: column;
  padding: .5rem .25rem;
  border-radius: var(--radius-sm);
  transition: background var(--dur-fast);
  text-decoration: none;
}

.trending-tag:hover {
  background: var(--clr-red-muted);
}

.trending-tag .tag-name {
  font-weight: 600;
  font-size: .88rem;
  color: var(--clr-red);
}

.trending-tag .tag-count {
  font-size: .75rem;
  color: var(--clr-text-3);
}

/* ── Trending masonry wall ───────────────────────────────────────── */
.trending-wall {
  columns: 2;
  column-gap: 1rem;
  margin-top: .5rem;
}
@media (max-width: 560px) {
  .trending-wall { columns: 1; }
}

.trending-card {
  break-inside: avoid;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  margin-bottom: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--dur-base) var(--ease-out),
              border-color var(--dur-base) var(--ease-out);
  display: inline-block; /* required for CSS columns masonry */
  width: 100%;
}
.trending-card:hover {
  box-shadow: var(--shadow-sm);
  border-color: rgba(0,0,0,.10);
}

.trending-card-img-wrap {
  display: block;
  position: relative;
  line-height: 0;
}

.trending-card-img {
  display: block;
  width: 100%;
  height: auto;
}

.trending-card-multi-badge {
  position: absolute;
  bottom: .5rem;
  right: .5rem;
  background: rgba(0,0,0,.62);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  padding: .18rem .52rem;
  border-radius: 99px;
  pointer-events: none;
  letter-spacing: .03em;
}

.trending-card-video-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #111;
  color: rgba(255,255,255,.55);
  font-size: 2rem;
}

.trending-card-body {
  padding: .75rem;
}

.trending-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  margin-bottom: .45rem;
}

.trending-card-user {
  display: flex;
  align-items: center;
  gap: .5rem;
  min-width: 0;
  text-decoration: none;
}

.trending-card-names {
  min-width: 0;
}

.trending-card-name {
  font-weight: 700;
  font-size: .82rem;
  color: var(--clr-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.trending-card-handle {
  font-size: .73rem;
  color: var(--clr-text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.trending-card-heat {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .02em;
  white-space: nowrap;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: .2rem;
}

.trending-card-text {
  font-size: .82rem;
  color: var(--clr-text-2);
  line-height: 1.45;
  margin: .35rem 0 .5rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.trending-card-actions {
  display: flex;
  align-items: center;
  gap: .9rem;
  margin-top: .4rem;
  padding-top: .45rem;
  border-top: 1px solid var(--clr-border);
}

.trending-card-stat {
  display: flex;
  align-items: center;
  gap: .25rem;
  font-size: .75rem;
  color: var(--clr-text-3);
}

.trending-card-view {
  margin-left: auto;
  font-size: .75rem;
  font-weight: 600;
  color: var(--clr-gold);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: .2rem;
}
.trending-card-view:hover { color: var(--clr-gold-dark, var(--clr-gold)); text-decoration: underline; }

.trending-card-text a {
  position: relative;
  z-index: 1;
  pointer-events: auto;
}

/* ── Divider with text ───────────────────────────────────────────── */
.divider-text {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--clr-text-3);
  font-size: .78rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  margin: 1rem 0;
}

.divider-text::before,
.divider-text::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--clr-border);
}

/* ── Gold separator ─────────────────────────────────────────────── */
.gold-rule {
  border: none;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--clr-red), transparent);
  margin: 1.5rem 0;
  opacity: .4;
}

/* ── Pill / Tag ──────────────────────────────────────────────────── */
.pill {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .25rem .7rem;
  border-radius: var(--radius-pill);
  font-size: .75rem;
  font-weight: 600;
}

.pill-gold   { background: var(--clr-red-muted); color: var(--clr-red); }
.pill-green  { background: rgba(46,125,82,.1);  color: var(--clr-success); }
.pill-red    { background: rgba(192,57,43,.1);  color: var(--clr-error); }
.pill-gray   { background: var(--clr-surface-2); color: var(--clr-text-3); }
.pill-blue   { background: rgba(26,107,138,.1); color: var(--clr-info); }

/* ── Follow button ───────────────────────────────────────────────── */
.follow-btn {
  padding: .35rem .9rem;
  font-size: .8rem;
  font-weight: 600;
  border-radius: var(--radius-pill);
}

/* ── Mobile bottom nav ───────────────────────────────────────────── */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--clr-surface);
  border-top: 1px solid var(--clr-border);
  z-index: 900;
  padding: .5rem 0;
  padding-bottom: env(safe-area-inset-bottom, .5rem);
  box-shadow: 0 -4px 24px rgba(0,0,0,.08);
}

@media (max-width: 820px) {
  .mobile-nav { display: flex; }
}

.mobile-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--clr-text-3);
  font-size: 1.3rem;
  text-decoration: none;
  padding: .4rem 0;
  transition: color var(--dur-fast);
  position: relative;
}

.mobile-nav-item:hover,
.mobile-nav-item.active { color: var(--clr-red); }

/* ── Auth layout ─────────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--clr-bg);
}

@media (max-width: 820px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-panel { display: none; }
}

/* ── Auth left panel ─────────────────────────────────────────────── */
/* Jet-black panel with the brand logo as hero */
.auth-panel {
  background: #0D0D0D;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 2.5rem;
}

/* Subtle red glow echoing the heart */
.auth-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 60%, rgba(255,255,255,.04) 0%, transparent 55%),
    radial-gradient(ellipse at 75% 20%, rgba(255,255,255,.02) 0%, transparent 45%);
  pointer-events: none;
}

/* Horizontal rule accent */
.auth-panel::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.15) 50%, transparent 100%);
}

.auth-panel-ornament {
  position: relative;
  z-index: 1;
  text-align: center;
}

/* The actual logo image, shown on a white pill so it reads perfectly on black */
.auth-panel-logo-img {
  display: inline-block;
  background: #FFFFFF;
  border-radius: 10px;
  padding: .75rem 1.5rem;
  margin-bottom: 2.25rem;
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
}

.auth-panel-logo-img img {
  height: 52px;
  width: auto;
  display: block;
}

.auth-panel-tagline {
  color: rgba(255,255,255,.55);
  font-size: .95rem;
  line-height: 1.7;
  max-width: 300px;
  margin: 0 auto 1.75rem;
}

.auth-panel-quote {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: 1.35rem;
  color: rgba(255,255,255,.8);
  margin-bottom: 2rem;
  line-height: 1.5;
}

.auth-panel-features {
  list-style: none;
  padding: 0;
  text-align: left;
}

.auth-panel-features li {
  display: flex;
  align-items: center;
  gap: .75rem;
  color: rgba(255,255,255,.55);
  font-size: .875rem;
  margin-bottom: .75rem;
}

/* Red heart bullet */
.auth-panel-features li::before {
  content: '❤';
  color: rgba(255,255,255,.5);
  font-size: .85rem;
  flex-shrink: 0;
}

/* Right form panel */
.auth-form-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  overflow-y: auto;
}

.auth-form-wrap {
  width: 100%;
  max-width: 400px;
}

.auth-logo-mobile {
  display: none;
  text-align: center;
  margin-bottom: 2rem;
}

.auth-logo-mobile img {
  height: 40px;
  width: auto;
}

@media (max-width: 820px) {
  .auth-logo-mobile { display: block; }
}

.auth-heading {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 2.2rem;
  font-weight: 600;
  color: var(--clr-text);
  margin-bottom: .25rem;
}

.auth-subheading {
  font-size: .9rem;
  color: var(--clr-text-3);
  margin-bottom: 2rem;
}

/* ── TOTP / 2FA card ─────────────────────────────────────────────── */
.totp-digits {
  display: flex;
  gap: .5rem;
  justify-content: center;
}

.totp-digit {
  width: 3rem;
  height: 3.5rem;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--clr-surface-2);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  color: var(--clr-text);
  outline: none;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}

.totp-digit:focus {
  border-color: var(--clr-red);
  box-shadow: 0 0 0 3px var(--clr-red-muted);
}

/* ── Message / Chat ──────────────────────────────────────────────── */
.msg-bubble {
  max-width: 70%;
  padding: .65rem 1rem;
  border-radius: var(--radius-lg);
  font-size: .88rem;
  line-height: 1.5;
}

.msg-bubble-mine {
  background: linear-gradient(135deg, rgba(255,255,255,.5), #9C1022);
  color: #080808;
  border-bottom-right-radius: var(--radius-xs);
  align-self: flex-end;
  margin-left: auto;
}

.msg-bubble-theirs {
  background: var(--clr-surface-2);
  color: var(--clr-text);
  border: 1px solid var(--clr-border);
  border-bottom-left-radius: var(--radius-xs);
  align-self: flex-start;
}

.msg-time {
  font-size: .68rem;
  color: var(--clr-text-3);
  margin-top: .25rem;
}

/* ── Payment / Checkout ──────────────────────────────────────────── */
.payment-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  max-width: 520px;
  margin: 0 auto;
}

.payment-header {
  background: #080808;
  padding: 2rem 2rem 1.5rem;
  position: relative;
  overflow: hidden;
}

.payment-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(0,0,0,.10) 0%, transparent 70%);
}

.payment-header-inner { position: relative; z-index: 1; }

.payment-logo {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.4rem;
  font-weight: 700;
  background: var(--grad-red);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
}

.payment-price-display {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 3.5rem;
  font-weight: 700;
  color: #F0F0F0;
  line-height: 1;
}

.payment-price-currency {
  font-size: 1.5rem;
  font-weight: 500;
  vertical-align: super;
  margin-right: .2rem;
  color: var(--clr-red);
}

.payment-price-label {
  font-size: .8rem;
  color: rgba(240,236,228,.5);
  margin-top: .4rem;
  letter-spacing: .04em;
}

.payment-body {
  padding: 2rem;
}

.payment-method-btn {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding: 1rem 1.25rem;
  background: var(--clr-surface-2);
  border: 1.5px solid var(--clr-border);
  border-radius: var(--radius-md);
  color: var(--clr-text);
  font-family: inherit;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--dur-fast);
  margin-bottom: .75rem;
}

.payment-method-btn:hover {
  border-color: var(--clr-red);
  background: var(--clr-red-muted);
  color: var(--clr-red);
  box-shadow: var(--shadow-red);
}

.payment-method-btn .method-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.payment-features {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
}

.payment-features li {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .5rem 0;
  font-size: .88rem;
  color: var(--clr-text-2);
  border-bottom: 1px solid var(--clr-border-soft);
}

.payment-features li:last-child { border-bottom: none; }

.payment-features .feat-icon {
  color: var(--clr-red);
  font-size: .9rem;
  width: 1rem;
  text-align: center;
  flex-shrink: 0;
}

/* Bank transfer details box */
.bank-details {
  background: var(--clr-surface-2);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.bank-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--clr-border-soft);
  font-size: .875rem;
}

.bank-detail-row:last-child { border-bottom: none; }

.bank-detail-label { color: var(--clr-text-3); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.bank-detail-value { font-weight: 600; color: var(--clr-text); font-family: 'Courier New', monospace; }
.bank-detail-ref   { color: var(--clr-red); font-weight: 700; }

/* ── Admin layout ────────────────────────────────────────────────── */
.admin-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: calc(100vh - var(--navbar-h));
}

.admin-sidebar {
  background: var(--clr-surface);
  border-right: 1px solid var(--clr-border);
  padding: 1.5rem 0;
  position: sticky;
  top: var(--navbar-h);
  height: calc(100vh - var(--navbar-h));
  overflow-y: auto;
}

.admin-sidebar-heading {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--clr-text-3);
  padding: 0 1.25rem .5rem;
  margin-top: 1rem;
}

.admin-sidebar-heading:first-child { margin-top: 0; }

.admin-sidebar-link,
.admin-nav-link {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .55rem 1.25rem;
  color: var(--clr-text-2);
  font-size: .875rem;
  text-decoration: none;
  transition: background var(--dur-fast), color var(--dur-fast);
}

.admin-sidebar-link:hover,
.admin-sidebar-link.active,
.admin-nav-link:hover,
.admin-nav-link.active {
  background: var(--clr-red-muted);
  color: var(--clr-red);
}

.admin-main {
  padding: 2rem 2.5rem;
  overflow: hidden;
}

/* Stat cards */
.stat-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-xs);
}

.stat-card-value {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--clr-warning);
  line-height: 1;
  margin-bottom: .25rem;
}

.stat-card-label {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--clr-text-3);
}

.stat-card-sub {
  font-size: .72rem;
  color: var(--clr-text-3);
  margin-top: .2rem;
  opacity: .7;
}

/* ── Tables ──────────────────────────────────────────────────────── */
.lux-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}

.lux-table th {
  text-align: left;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--clr-text-3);
  padding: .65rem 1rem;
  border-bottom: 1px solid var(--clr-border);
  background: var(--clr-surface-2);
}

.lux-table td {
  padding: .85rem 1rem;
  border-bottom: 1px solid var(--clr-border-soft);
  color: var(--clr-text);
  vertical-align: middle;
}

.lux-table tr:last-child td { border-bottom: none; }
.lux-table tr:hover td { background: var(--clr-red-muted); }

.table-wrap {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}

/* ── Skeleton loader ─────────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--clr-surface-2) 25%, var(--clr-border-soft) 50%, var(--clr-surface-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-sm);
}

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

/* ── Dark mode toggle animation ──────────────────────────────────── */
.theme-toggle-icon { transition: transform var(--dur-slow) var(--ease-out); }
[data-theme="dark"] .theme-toggle-icon { transform: rotate(180deg); }

/* ── Utility ─────────────────────────────────────────────────────── */
.truncate   { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-only    { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.flex-1     { flex: 1 1 0%; }
.gap-sm     { gap: .5rem; }
.gap-md     { gap: 1rem; }
.gap-lg     { gap: 1.5rem; }

/* ── Scroll track (webkit) ───────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--clr-border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--clr-red); }

/* ── PWA splash / offline ────────────────────────────────────────── */
@media (display-mode: standalone) {
  body { padding-top: env(safe-area-inset-top); }
}

/* ── Post body: links, hashtags, mentions ─────────────────────── */
.post-link {
  color: var(--clr-text);
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
  word-break: break-all;
  transition: color .15s;
  font-weight: 500;
}
.post-link:hover { color: var(--clr-text-2); }
.hashtag  { color: var(--clr-text); font-weight: 600; }
.hashtag:hover { color: var(--clr-text-2); text-decoration: none; }
.mention  { color: var(--clr-text); font-weight: 600; }
.mention:hover { color: var(--clr-text-2); text-decoration: none; }

/* ── Navbar dropdown: always open downward, never clipped ───────── */
.iltm-navbar .dropdown-menu {
  position: absolute !important;
  top: calc(100% + .5rem) !important;
  bottom: auto !important;
  right: 0 !important;
  left: auto !important;
  transform: none !important;
  z-index: 1100 !important;
  margin-top: 0 !important;
}

/* ── Navbar dropdown: shrink to content on mobile ───────────────── */
@media (max-width: 960px) {
  .iltm-navbar .dropdown-menu {
    width: auto !important;
    min-width: 0 !important;
    max-width: 180px !important;
    white-space: nowrap;
  }
}

/* ── Feed / page section headers ────────────────────────────────── */
.page-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}
.page-section-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--clr-text);
  letter-spacing: -.01em;
  margin: 0;
}

/* ── Empty state ─────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 3.5rem 1rem;
  color: var(--clr-text-3);
}
.empty-state-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  opacity: .45;
}
.empty-state-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--clr-text-2);
  margin-bottom: .4rem;
}
.empty-state-body {
  font-size: .875rem;
  color: var(--clr-text-3);
  max-width: 280px;
  margin: 0 auto .75rem;
  line-height: 1.6;
}

/* ── Community cards ─────────────────────────────────────────────── */
.community-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: box-shadow var(--dur-base), border-color var(--dur-base);
}
.community-card:hover {
  box-shadow: var(--shadow-sm);
  border-color: rgba(0,0,0,.12);
}
[data-theme="dark"] .community-card:hover { border-color: rgba(255,255,255,.1); }
.community-card-icon {
  width: 44px; height: 44px; flex-shrink: 0;
  border-radius: var(--radius-md);
  background: var(--clr-surface-2);
  border: 1px solid var(--clr-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; color: var(--clr-text-3);
}
.community-card-name {
  font-weight: 700;
  font-size: .9rem;
  color: var(--clr-text);
  text-decoration: none;
  display: block;
}
.community-card-name:hover { color: var(--clr-text); text-decoration: none; }
.community-card-meta {
  font-size: .78rem;
  color: var(--clr-text-3);
  margin-top: .1rem;
}

/* ── Explore people row ──────────────────────────────────────────── */
.people-row {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .65rem 0;
  border-bottom: 1px solid var(--clr-border);
}
.people-row:last-child { border-bottom: none; }
.people-row-info { flex: 1; min-width: 0; }
.people-row-name {
  font-weight: 700;
  font-size: .875rem;
  color: var(--clr-text);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}
.people-row-handle {
  font-size: .78rem;
  color: var(--clr-text-3);
}

/* ══════════════════════════════════════════════════════════════════
   Profile Page — White canvas
   ══════════════════════════════════════════════════════════════════ */
body.page-profile,
body.page-profile .sidebar-left,
body.page-profile .sidebar-right,
body.page-profile .main-col,
body.page-profile .iltm-layout { background: #FFFFFF !important; }

body.page-profile .sidebar-link { color: #1C1C1C; }
body.page-profile .sidebar-link:hover,
body.page-profile .sidebar-link.active { background: #F0F0F0; color: var(--clr-text); }
body.page-profile .widget { background: #F7F7F7; border-color: #E8E8E8; }


/* Profile: constrain card + tabs to old size, photo grid stays full width */
body.page-profile .profile-card,
body.page-profile .profile-tabs {
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

/* Profile: 3-column photo grid, slightly wider than the profile card */
body.page-profile .profile-photo-grid {
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  margin-left: -1.25rem;
  margin-right: -1.25rem;
  width: calc(100% + 2.5rem);
}

.profile-card {
  background: #FAFAF8;
  border: none;
  border-radius: 4px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(0,0,0,.07),
    0 2px 4px  rgba(0,0,0,.05),
    0 8px 24px rgba(0,0,0,.09),
    0 24px 60px rgba(0,0,0,.10);
  margin-bottom: 1.25rem;
}

/* Cover photo strip */
.profile-cover-strip {
  height: 210px;
  position: relative;
  overflow: hidden;
  z-index: 0; /* own stacking context — keeps rule/spotlight below the avatar */
  background: linear-gradient(145deg, #120A1A 0%, #0C0A0E 50%, #100810 100%);
}

/* Cover photo when user has uploaded one */
.profile-cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 0;
}

/* Key light — warm beam aimed at the avatar position */
.profile-cover-spotlight {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(
      ellipse 38% 110% at 18% 135%,
      rgba(215,168,30,.38) 0%,
      rgba(200,148,20,.16) 35%,
      transparent 65%
    ),
    radial-gradient(
      ellipse 75% 150% at 20% 140%,
      rgba(180,125,20,.14) 0%,
      rgba(160,100,15,.05) 45%,
      transparent 72%
    );
}

/* Bottom vignette */
.profile-cover-strip::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 90px;
  background: linear-gradient(to bottom, transparent, rgba(12,10,14,.55));
  z-index: 2;
  pointer-events: none;
}

/* Gold hairline at the threshold */
.profile-cover-rule {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    transparent          0%,
    rgba(190,150,40,.20) 10%,
    rgba(220,180,60,.85) 35%,
    rgba(240,200,70,.95) 50%,
    rgba(220,180,60,.85) 65%,
    rgba(190,150,40,.20) 90%,
    transparent         100%
  );
}

/* Identity area below cover */
.profile-identity {
  padding: 0 1.75rem 1.5rem;
}

/* Avatar that lifts off the cover */
.profile-avatar-lift {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #FAFAF8;
  box-shadow:
    0 8px 28px rgba(0,0,0,.22),
    0 3px 8px  rgba(0,0,0,.14);
  margin-top: -75px;
  display: block;
  background: var(--clr-surface-2);
  position: relative;
  z-index: 2;
  transition: transform .4s ease, box-shadow .4s ease;
}

.profile-avatar-wrap:hover .profile-avatar-lift {
  transform: translateY(-2px);
  box-shadow:
    0 12px 36px rgba(0,0,0,.26),
    0 3px 8px  rgba(0,0,0,.14);
}

/* Camera overlay for avatar upload */
.profile-avatar-wrap {
  position: relative;
  display: inline-block;
}

.profile-avatar-cam {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--clr-surface);
  border: 1.5px solid var(--clr-border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--dur-fast), border-color var(--dur-fast);
  box-shadow: var(--shadow-xs);
}

.profile-avatar-cam:hover {
  background: var(--clr-surface-2);
  border-color: var(--clr-text-3);
}

/* Row: avatar (left) + actions (right) */
.profile-top-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Action buttons cluster */
.profile-actions {
  display: flex;
  gap: .5rem;
  align-items: center;
  padding-top: .6rem;
}

/* Name + handle block */
.profile-name-block {
  margin-top: .85rem;
}

.profile-name {
  font-family: 'Plus Jakarta Sans', 'DM Sans', system-ui, sans-serif;
  font-size: 2.15rem;
  font-weight: 700;
  color: var(--clr-text);
  line-height: 1.05;
  letter-spacing: -.025em;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin: 0;
}

.profile-name .verified {
  font-size: 1rem;
  color: #22C55E; /* PREV: var(--clr-text-2) */
}

.profile-meta-line {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-top: .3rem;
  flex-wrap: wrap;
}

.profile-meta-sep { color: var(--clr-border); font-size: .75rem; }

.profile-handle {
  font-size: .74rem;
  color: var(--clr-text-3);
  letter-spacing: .015em;
}

.profile-category {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: #A07808;
  border: none;
  padding: 0;
}

.profile-bio {
  font-size: .875rem;
  color: var(--clr-text-2);
  line-height: 1.65;
  margin-top: .75rem;
  max-width: 500px;
}

.profile-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: .78rem;
  color: var(--clr-text-3);
  margin-top: .6rem;
}

.profile-meta-row a {
  color: var(--clr-text-3);
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
}

.profile-meta-row a:hover {
  color: var(--clr-text);
}

/* Stats strip — full bleed, 3 equal columns */
.profile-stats-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--clr-border);
  border-bottom: 1px solid var(--clr-border);
  margin: 1.1rem -1.75rem 0;
}

.profile-stat-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: .9rem .5rem 1.1rem;
  text-decoration: none;
  border-right: 1px solid var(--clr-border);
  transition: background var(--dur-fast);
  cursor: default;
  position: relative;
}

.profile-stat-cell--hero { background: rgba(184,146,10,.02); }
.profile-stat-cell--hero:hover { background: rgba(184,146,10,.04) !important; }

.profile-stat-pip {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #C8A020;
  display: block;
  margin-bottom: .3rem;
  box-shadow: 0 0 7px rgba(200,160,32,.55);
}

.profile-stat-cell:last-child {
  border-right: none;
}

a.profile-stat-cell:hover {
  background: var(--clr-surface-2);
  cursor: pointer;
}

.profile-stat-val {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--clr-text);
  line-height: 1;
  letter-spacing: .01em;
}

.profile-stat-lbl {
  font-size: .57rem;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--clr-text-3);
  margin-top: .28rem;
}

/* Social proof */
.profile-proof {
  display: flex;
  align-items: center;
  gap: .55rem;
  margin-top: .7rem;
}

.profile-proof-faces { display: flex; flex-shrink: 0; }

.profile-proof-face {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #FAFAF8;
  margin-right: -7px;
  object-fit: cover;
  background: var(--clr-surface-2);
}

.profile-proof-text {
  font-size: .74rem;
  color: var(--clr-text-3);
  padding-left: .55rem;
  line-height: 1.3;
  margin: 0;
}

.profile-proof-text strong { color: var(--clr-text-2); font-weight: 600; }

/* Profile page Follow button — Maison dark style */
.profile-actions .btn-gold {
  background: #0A0908;
  border-color: #0A0908;
  color: #F5F3EF;
  position: relative;
  overflow: hidden;
}

.profile-actions .btn-gold::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(108deg, transparent 20%, rgba(220,185,70,.28) 50%, transparent 80%);
  transform: translateX(-150%);
  transition: transform .55s cubic-bezier(.4,0,.2,1);
  pointer-events: none;
}

.profile-actions .btn-gold:hover {
  background: #1A1614;
  border-color: #C8A020;
  color: #F5F3EF;
}

.profile-actions .btn-gold:hover::after { transform: translateX(150%); }

/* Tabs */
.profile-tabs {
  display: flex;
  border-bottom: 1px solid var(--clr-border);
  margin-bottom: 1.25rem;
  gap: 0;
}

.profile-tab {
  padding: .75rem 1.5rem;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--clr-text-3);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color var(--dur-fast), border-color var(--dur-fast);
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}

.profile-tab:hover {
  color: var(--clr-text-2);
}

.profile-tab.active {
  color: var(--clr-text);
  border-bottom-color: var(--clr-text);
}

/* Photo grid */
.profile-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  margin-bottom: 1.5rem;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.profile-photo-item {
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--clr-surface-2);
  position: relative;
}

.profile-photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-base) var(--ease-out);
}

.profile-photo-item:hover img {
  transform: scale(1.04);
}

.profile-photo-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.42);
  opacity: 0;
  transition: opacity var(--dur-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  color: #fff;
  font-size: .82rem;
  font-weight: 600;
  pointer-events: none;
}

.profile-photo-item:hover .profile-photo-overlay {
  opacity: 1;
}

/* Empty state */
.profile-empty {
  text-align: center;
  padding: 3.5rem 1rem;
  color: var(--clr-text-3);
}

.profile-empty i {
  font-size: 2.25rem;
  display: block;
  margin-bottom: .85rem;
  opacity: .28;
}

.profile-empty p {
  font-size: .875rem;
  margin: 0;
}

/* State pages: private / blocked / suspended / reserved */
.profile-state-page {
  max-width: 520px;
  margin: 2.5rem auto;
  padding: 0 1rem;
}

.profile-state-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.profile-state-cover {
  height: 100px;
  background: linear-gradient(135deg, #0D0D0D 0%, #1C1C1C 60%, #2A2A2A 100%);
}

.profile-state-body {
  padding: 0 2rem 2rem;
}

.profile-state-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--clr-surface);
  margin-top: -44px;
  display: inline-block;
  background: var(--clr-surface-2);
}

.profile-state-name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.55rem;
  font-weight: 600;
  color: var(--clr-text);
  margin: .75rem 0 .1rem;
  display: block;
}

.profile-state-handle {
  font-size: .82rem;
  color: var(--clr-text-3);
  margin-bottom: 1.25rem;
  display: block;
}

.profile-state-stats {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  padding: 1rem 0;
  border-top: 1px solid var(--clr-border);
  border-bottom: 1px solid var(--clr-border);
  margin-bottom: 1.5rem;
}

.profile-state-stat-val {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--clr-text);
  line-height: 1;
}

.profile-state-stat-lbl {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--clr-text-3);
  margin-top: .2rem;
}

.profile-state-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--clr-surface-2);
  border: 1px solid var(--clr-border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.profile-state-icon i {
  font-size: 1.35rem;
  color: var(--clr-text-3);
}

.profile-state-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--clr-text);
  margin-bottom: .4rem;
}

.profile-state-desc {
  font-size: .83rem;
  color: var(--clr-text-3);
  line-height: 1.65;
  margin-bottom: 1.25rem;
}

/* Post card inside profile - slightly tighter */
.profile-post-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.25rem;
  margin-bottom: .75rem;
  transition: box-shadow var(--dur-base) var(--ease-out),
              border-color var(--dur-base);
}

.profile-post-card:hover {
  box-shadow: var(--shadow-sm);
  border-color: rgba(0,0,0,.1);
}

[data-theme="dark"] .profile-post-card:hover {
  border-color: rgba(255,255,255,.08);
}

/* Pinned label */
.pin-badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--clr-text-3);
  background: var(--clr-surface-2);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-pill);
  padding: .15rem .55rem;
  margin-left: .4rem;
  vertical-align: middle;
}

/* ══════════════════════════════════════════════════════════════════
   Messages & Chat  — v5
   ══════════════════════════════════════════════════════════════════ */

.messages-layout {
  display: flex;
  height: calc(100vh - var(--navbar-h) - 3.5rem);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--clr-surface);
  box-shadow: var(--shadow-xs);
}

.conversations-list {
  width: 280px;
  flex-shrink: 0;
  border-right: 1px solid var(--clr-border);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.conversations-head {
  padding: 1rem 1.25rem .9rem;
  border-bottom: 1px solid var(--clr-border);
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--clr-text);
  letter-spacing: -.01em;
  flex-shrink: 0;
}

.conversation-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .8rem 1.1rem;
  text-decoration: none;
  color: var(--clr-text);
  border-bottom: 1px solid var(--clr-border);
  transition: background var(--dur-fast);
}

.conversation-item:last-child { border-bottom: none; }
.conversation-item:hover { background: var(--clr-surface-2); color: var(--clr-text); text-decoration: none; }
.conversation-item.unread { background: var(--clr-red-muted); }

.conv-info { flex: 1; min-width: 0; }
.conv-name  { font-weight: 700; font-size: .875rem; color: var(--clr-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-preview { font-size: .78rem; color: var(--clr-text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-time  { font-size: .72rem; color: var(--clr-text-3); flex-shrink: 0; }
.conv-badge {
  min-width: 18px; height: 18px; border-radius: 9px;
  background: var(--clr-red); color: #fff;
  font-size: .68rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center; padding: 0 .35rem;
}

.thread-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.thread-header {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .85rem 1.25rem;
  border-bottom: 1px solid var(--clr-border);
  background: var(--clr-surface);
  flex-shrink: 0;
}

.thread-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .55rem;
}

.thread-input {
  padding: .75rem 1.1rem;
  border-top: 1px solid var(--clr-border);
  background: var(--clr-surface);
  display: flex;
  gap: .6rem;
  align-items: center;
  flex-shrink: 0;
}

.thread-msg-input {
  flex: 1;
  background: var(--clr-surface-2);
  border: 1px solid var(--clr-border);
  border-radius: 999px;
  padding: .55rem 1.1rem;
  font-size: .875rem;
  color: var(--clr-text);
  outline: none;
  transition: border-color var(--dur-fast);
  font-family: inherit;
}

.thread-msg-input:focus { border-color: var(--clr-red); }
.thread-msg-input::placeholder { color: var(--clr-text-3); }

.thread-send-btn {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--clr-red); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: #fff; flex-shrink: 0;
  transition: opacity var(--dur-fast);
}
.thread-send-btn:hover { opacity: .85; }

.msg {
  display: flex;
  align-items: flex-end;
  gap: .4rem;
  max-width: 72%;
}
.msg.mine   { align-self: flex-end; flex-direction: row-reverse; }
.msg.theirs { align-self: flex-start; }

.msg.mine .msg-bubble {
  background: linear-gradient(135deg, #9C1022, #C4152C);
  color: #fff;
  border-bottom-right-radius: var(--radius-xs);
}
.msg.theirs .msg-bubble {
  background: var(--clr-surface-2);
  color: var(--clr-text);
  border: 1px solid var(--clr-border);
  border-bottom-left-radius: var(--radius-xs);
}

.messages-placeholder {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 767px) {
  .messages-layout { height: calc(100vh - var(--navbar-h) - 1.5rem); border-radius: var(--radius-md); }
  .conversations-list { width: 100%; }
}

/* ══════════════════════════════════════════════════════════════════
   Notifications  — v5
   ══════════════════════════════════════════════════════════════════ */

.notification-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .9rem 1.1rem;
  border-bottom: 1px solid var(--clr-border);
  background: var(--clr-surface);
  transition: background var(--dur-fast);
  border-left: 3px solid transparent;
}
.notification-item:last-child { border-bottom: none; }
.notification-item.unread { background: var(--clr-red-muted); border-left-color: var(--clr-red); }

.notif-text {
  flex: 1;
  font-size: .875rem;
  line-height: 1.5;
  color: var(--clr-text-2);
}
.notif-text strong { color: var(--clr-text); font-weight: 700; }
.notif-time { font-size: .72rem; color: var(--clr-text-3); display: block; margin-top: .2rem; }

.notif-type-icon {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .875rem; flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════════════
   Settings  — v5
   ══════════════════════════════════════════════════════════════════ */

.settings-layout {
  display: grid;
  grid-template-columns: 196px 1fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 767px) {
  .settings-layout { grid-template-columns: 1fr; }
  .settings-nav-rail { display: none; }
}

.settings-nav-rail { position: sticky; top: calc(var(--navbar-h) + 1.25rem); }

.settings-nav-label {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--clr-text-3);
  padding: 0 .6rem;
  margin-bottom: .5rem;
  margin-top: 1rem;
}
.settings-nav-label:first-child { margin-top: 0; }

.settings-nav-link {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .52rem .75rem;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  color: var(--clr-text-2);
  text-decoration: none;
  transition: background var(--dur-fast), color var(--dur-fast);
  margin-bottom: .1rem;
}
.settings-nav-link:hover { background: var(--clr-surface-2); color: var(--clr-text); text-decoration: none; }
.settings-nav-link.active { background: var(--clr-red-muted); color: var(--clr-red); font-weight: 600; }

.settings-content { display: flex; flex-direction: column; gap: 1.5rem; }

.settings-section {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}

.settings-section-head {
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid var(--clr-border);
  display: flex;
  align-items: center;
  gap: .6rem;
}

.settings-section-title {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--clr-text);
  margin: 0;
  letter-spacing: -.01em;
}

.settings-section-body {
  padding: 1.35rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.settings-section-foot {
  padding: .9rem 1.5rem;
  border-top: 1px solid var(--clr-border);
  background: var(--clr-surface-2);
  display: flex;
  align-items: center;
  gap: .75rem;
}

/* iOS-style toggle */
.lux-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: .75rem 0;
  border-bottom: 1px solid var(--clr-border);
}
.lux-toggle:last-child { border-bottom: none; padding-bottom: 0; }
.lux-toggle:first-child { padding-top: 0; }
.lux-toggle-label { font-size: .875rem; font-weight: 600; color: var(--clr-text); display: block; }
.lux-toggle-desc  { font-size: .78rem; color: var(--clr-text-3); margin-top: .15rem; }

.switch-wrap { position: relative; display: inline-block; width: 44px; height: 26px; flex-shrink: 0; }
.switch-wrap input { opacity: 0; width: 0; height: 0; }
.switch-track {
  position: absolute; inset: 0;
  background: var(--clr-border);
  border-radius: 13px;
  cursor: pointer;
  transition: background var(--dur-base);
}
.switch-track::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
  transition: transform var(--dur-base);
}
.switch-wrap input:checked + .switch-track { background: var(--clr-red); }
.switch-wrap input:checked + .switch-track::after { transform: translateX(18px); }

/* Select with custom arrow */
.lux-select-wrap { position: relative; }
.lux-select-wrap::after {
  content: '\f282';
  font-family: 'bootstrap-icons';
  position: absolute; right: .85rem; top: 50%;
  transform: translateY(-50%);
  color: var(--clr-text-3);
  pointer-events: none; font-size: .75rem;
}
.lux-select-wrap .lux-select { padding-right: 2.25rem; }

/* Upgrade widget */
.upgrade-widget {
  background: linear-gradient(135deg, #0D0D0D 0%, #2C2518 100%);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.35rem;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.upgrade-widget::before {
  content: '';
  position: absolute;
  top: -24px; right: -24px;
  width: 96px; height: 96px; border-radius: 50%;
  background: rgba(156,16,34,.22);
}
.upgrade-widget-overline {
  font-size: .68rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: #B08C4A; margin-bottom: .6rem;
}
.upgrade-widget-title {
  font-family: var(--font-serif);
  font-size: 1.1rem; font-weight: 600; color: #fff; margin-bottom: .35rem;
}
.upgrade-widget-desc { font-size: .8rem; color: rgba(255,255,255,.6); margin-bottom: 1.1rem; line-height: 1.5; }

/* ── Explore page grid ───────────────────────────────────────────── */
.explore-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

@media (max-width: 640px) {
  .explore-grid { grid-template-columns: 1fr; }
}

/* ── Stories bar ─────────────────────────────────────────────────── */
.stories-bar {
  display: flex;
  gap: .75rem;
  overflow-x: auto;
  padding: .25rem .1rem .85rem;
  margin-bottom: 1rem;
  scrollbar-width: none;
}

.stories-bar::-webkit-scrollbar { display: none; }

.story-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: opacity var(--dur-fast);
}

.story-item:hover { opacity: .85; }

.story-item.viewed .story-avatar { opacity: .55; }

.story-item.viewed .story-ring {
  background: var(--clr-border);
}

.story-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 2.5px solid var(--clr-surface);
  background: var(--clr-surface-2);
}

/* Gold gradient ring around unviewed story */
.story-item:not(.viewed) .story-avatar {
  box-shadow: 0 0 0 2.5px var(--clr-red), 0 0 0 4.5px var(--clr-surface);
}

.story-username {
  font-size: .68rem;
  color: var(--clr-text-3);
  max-width: 54px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  text-align: center;
  letter-spacing: .01em;
}

/* Add-story tile */
.add-story .story-avatar { display: none; }

.story-add-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--clr-surface-2);
  border: 1.5px dashed var(--clr-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--clr-text-3);
  transition: background var(--dur-fast), color var(--dur-fast);
}

.add-story:hover .story-add-btn {
  background: var(--clr-red-muted);
  color: var(--clr-red);
  border-color: var(--clr-red);
}

/* ── Feed header tabs ────────────────────────────────────────────── */
.feed-tabs {
  display: flex;
  border-bottom: 1px solid var(--clr-border);
  margin-bottom: 1rem;
  gap: 0;
}

.feed-tab {
  flex: 1;
  text-align: center;
  padding: .7rem .5rem;
  font-size: .84rem;
  font-weight: 600;
  color: var(--clr-text-3);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color var(--dur-fast), border-color var(--dur-fast);
  letter-spacing: .01em;
}

.feed-tab:hover { color: var(--clr-text); }

.feed-tab.active {
  color: var(--clr-text);
  border-bottom-color: var(--clr-red);
}

/* ── Site Footer ────────────────────────────────────────────────── */
.site-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .3rem;
  padding: 1rem 1.5rem 1.25rem;
  font-size: .72rem;
  color: var(--clr-text-3);
  border-top: 1px solid var(--clr-border);
  margin-top: .5rem;
}
.site-footer-links {
  display: flex;
  align-items: center;
  gap: .45rem;
}
.site-footer-copy {
  opacity: .8;
}

/* logged-in users have a mobile bottom nav — give the footer room */
body[data-user]:not([data-user=""]) .site-footer {
  padding-bottom: calc(var(--mobile-nav-h, 56px) + 1.25rem);
}

@media (min-width: 821px) {
  body[data-user]:not([data-user=""]) .site-footer {
    padding-bottom: 1.25rem;
  }
}

.site-footer-link {
  color: var(--clr-text-3);
  text-decoration: none;
  transition: color var(--dur-fast);
}

.site-footer-link:hover {
  color: var(--clr-gold);
}

.site-footer-dot {
  opacity: .45;
}

/* ═══════════════════════════════════════════════════════════════════
   MOBILE PROFILE — full-bleed portrait layout (≤ 960px)
   Matches the layout breakpoint where the single-column grid activates.
   All desktop profile rules above are untouched.
   ═══════════════════════════════════════════════════════════════════ */

@media (max-width: 960px) {

  /* ── Profile card: remove card chrome, go full-bleed ─────────────── */
  .profile-card {
    border-radius: 0;
    border-left: none;
    border-right: none;
    margin-left:  -0.5rem;
    margin-right: -0.5rem;
    margin-bottom: 0;
    box-shadow: none;
  }

  /* ── Cover: cinematic, shorter ───────────────────────────────────── */
  .profile-cover-strip {
    height: 130px;
  }

  /* ── Identity area: tighter padding, centered text ───────────────── */
  .profile-identity {
    padding: 0 1.25rem 1.25rem;
    text-align: center;
  }

  /* ── Top row: stack avatar above buttons, both centered ──────────── */
  .profile-top-row {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }

  /* ── Avatar: proportional size on mobile ────────────────────────── */
  .profile-avatar-lift {
    width: 104px;
    height: 104px;
    margin-top: -52px;
    border-width: 3px;
  }

  /* ── Action buttons: centered, wrap on narrow screens ────────────── */
  .profile-actions {
    justify-content: center;
    flex-wrap: wrap;
    padding-top: 0.5rem;
  }

  /* ── Name block ──────────────────────────────────────────────────── */
  .profile-name-block {
    margin-top: 0.5rem;
  }

  .profile-name {
    font-size: 2rem;
    justify-content: center;
  }

  .profile-handle {
    text-align: center;
  }

  .profile-category {
    justify-content: center;
  }

  /* ── Bio + meta: centered ────────────────────────────────────────── */
  .profile-bio {
    text-align: center;
    max-width: 100%;
    margin: 0.6rem auto 0;
  }

  .profile-meta-row {
    justify-content: center;
    margin-top: 0.5rem;
  }

  /* ── Stats strip: bleed to card edges (match new 1.25rem padding) ── */
  .profile-stats-strip {
    margin: 1rem -1.25rem 0;
  }

  .profile-stat-val {
    font-size: 1.35rem;
  }

  .profile-stat-lbl {
    font-size: 0.6rem;
  }

  /* ── Tabs: full-bleed + sticky below the navbar ──────────────────── */
  .profile-tabs {
    position: sticky;
    top: var(--navbar-h, 64px);
    z-index: 90;
    background: var(--clr-surface);
    margin-left:  -0.5rem;
    margin-right: -0.5rem;
    padding-left:  0.5rem;
    padding-right: 0.5rem;
    border-top: 1px solid var(--clr-border);
    margin-bottom: 0;
  }

  .profile-tab {
    flex: 1;
    text-align: center;
    justify-content: center;
    padding: 0.85rem 0.5rem;
  }

  /* ── Photo grid: full-bleed, tighter gap — square tiles like desktop ── */
  .profile-photo-grid {
    border-radius: 0;
    gap: 2px;
    margin-left:  -0.5rem;
    margin-right: -0.5rem;
    margin-bottom: 0;
    grid-template-columns: repeat(3, 1fr);
  }

  /* Keep forced-square on mobile — same as desktop */
  .profile-photo-item {
    aspect-ratio: 1 / 1;
  }

  .profile-photo-item img {
    height: 100%;
    object-fit: cover;
    width: 100%;
  }


  /* ── Text post cards: edge-to-edge feed style ────────────────────── */
  .profile-post-card {
    border-radius: 0;
    border-left: none;
    border-right: none;
    margin-left:  -0.5rem;
    margin-right: -0.5rem;
    margin-bottom: 0;
    border-bottom: 1px solid var(--clr-border);
    box-shadow: none;
  }

  /* ── Empty state: less wasted space on mobile ────────────────────── */
  .profile-empty {
    padding: 2.5rem 1rem;
  }

}

/* ═══════════════════════════════════════════════════════════════════
   Language Switcher  (v56)
   ═══════════════════════════════════════════════════════════════════ */

/* Footer row — links left, switcher right */
.site-footer-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

/* Public footer divider between links and switcher */
.pub-footer-divider {
  display: inline-block;
  width: 1px;
  height: 13px;
  background: rgba(0,0,0,.15);
  flex-shrink: 0;
}

/* Switcher wrapper */
.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .78rem;
  color: var(--clr-text-3);
}
.lang-switcher .bi-globe2 {
  font-size: .8rem;
  flex-shrink: 0;
  color: var(--clr-text-3);
  transition: color .2s;
}
.lang-switcher:hover .bi-globe2 {
  color: var(--clr-gold);
}

/* The <select> element — pill shape with gold ring on focus */
.lang-select {
  background: transparent;
  border: 1px solid var(--clr-border);
  color: var(--clr-text-2);
  border-radius: 20px;
  padding: .28rem .75rem .28rem .55rem;
  font-size: .76rem;
  font-family: inherit;
  letter-spacing: .01em;
  cursor: pointer;
  outline: none;
  transition: border-color .2s, color .2s, box-shadow .2s;
}
.lang-select:hover {
  border-color: rgba(212,175,55,.5);
  color: var(--clr-text);
}
.lang-select:focus {
  border-color: var(--clr-gold);
  color: var(--clr-text);
  box-shadow: 0 0 0 3px rgba(212,175,55,.12);
}

/* Auth page: fixed bottom-right corner */
.auth-lang-switcher {
  position: fixed;
  bottom: 1.5rem;
  right: 1.75rem;
  z-index: 10;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: 24px;
  padding: .35rem .65rem;
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
}
@media (max-width: 768px) {
  .auth-lang-switcher {
    position: static;
    background: transparent;
    border: none;
    padding: 0;
    box-shadow: none;
    display: flex;
    justify-content: center;
    padding: 1rem 0 .5rem;
  }
}

/* RTL page tweaks (Arabic) */
[dir="rtl"] .lux-input-icon { left: auto; right: .75rem; }
[dir="rtl"] .lux-input       { padding-left: .875rem; padding-right: 2.5rem; }
[dir="rtl"] .nav-search-icon { left: auto; right: .75rem; }
[dir="rtl"] .nav-search-input { padding-left: .875rem; padding-right: 2.25rem; }


/* ═══════════════════════════════════════════════════════════
   Photo Tagging
═══════════════════════════════════════════════════════════ */

.post-img-wrap { position:relative; display:block; line-height:0; overflow:hidden; }
.post-img-wrap img { width:100%; }

/* ── Pin dot ─────────────────────────────────────────────── */
.photo-tag-dot {
  position:absolute;
  width:22px; height:22px; border-radius:50%;
  background:rgba(255,255,255,.96);
  box-shadow:0 2px 14px rgba(0,0,0,.55), 0 0 0 1.5px rgba(255,255,255,.35);
  transform:translate(-50%,-50%);
  cursor:pointer; z-index:6;
  /* Hidden by default — revealed on image hover */
  opacity:0;
  transition:transform .18s ease, box-shadow .18s ease, opacity .22s ease;
  display:flex; align-items:center; justify-content:center;
}
.photo-tag-dot::before {
  content:''; width:8px; height:8px; border-radius:50%;
  background:rgba(0,0,0,.72);
}
.photo-tag-dot:hover {
  transform:translate(-50%,-50%) scale(1.25);
  box-shadow:0 4px 20px rgba(0,0,0,.6), 0 0 0 2px rgba(255,255,255,.5);
}
/* Show dots when hovering the image container */
.post-img-wrap:hover .photo-tag-dot,
.post-carousel:hover .photo-tag-dot,
.photo-tags-modal-img-wrap .photo-tag-dot { opacity:1; }
/* Compose preview dots always visible */
#previewGrid .photo-tag-dot { opacity:1; }

/* ── Name badge ──────────────────────────────────────────── */
.photo-tag-badge {
  position:absolute;
  left:50%; bottom:calc(100% + 9px);
  transform:translateX(-50%) translateY(5px);
  background:rgba(8,8,8,.88);
  backdrop-filter:blur(10px); -webkit-backdrop-filter:blur(10px);
  color:#f0f0f0;
  font-size:.68rem; font-weight:600; letter-spacing:.02em;
  padding:.22rem .65rem;
  border-radius:var(--radius-pill);
  border:1px solid rgba(255,255,255,.07);
  white-space:nowrap; pointer-events:auto;
  opacity:0; transition:opacity .18s, transform .18s;
  z-index:7;
}
.photo-tag-badge a { color:#f0f0f0; text-decoration:none; }
.photo-tag-dot:hover .photo-tag-badge,
.photo-tag-dot.badge-visible .photo-tag-badge {
  opacity:1; transform:translateX(-50%) translateY(0);
}

/* ── Tagged indicator ────────────────────────────────────── */
.photo-tags-indicator {
  position:absolute; bottom:.55rem; left:.55rem;
  background:rgba(8,8,8,.72);
  backdrop-filter:blur(8px); -webkit-backdrop-filter:blur(8px);
  color:rgba(255,255,255,.9);
  border:1px solid rgba(255,255,255,.08);
  border-radius:var(--radius-pill);
  padding:.2rem .65rem;
  font-size:.67rem; font-weight:600; letter-spacing:.01em;
  display:flex; align-items:center; gap:.3rem;
  z-index:5; cursor:pointer; user-select:none;
  /* Hidden with dots — revealed on hover */
  opacity:0; transition:opacity .22s ease, background .15s;
}
.photo-tags-indicator:hover { background:rgba(8,8,8,.85); }
.post-img-wrap:hover .photo-tags-indicator,
.post-carousel:hover .photo-tags-indicator { opacity:1; }

/* ── Owner "Edit tags" button ────────────────────────────── */
.photo-tag-edit-btn {
  position:absolute; top:.55rem; right:.55rem;
  background:#C9A84C;
  color:#111;
  border:none;
  border-radius:var(--radius-pill);
  padding:.22rem .7rem; font-size:.67rem;
  font-weight:700; letter-spacing:.02em;
  cursor:pointer; z-index:5; opacity:0;
  transition:opacity .18s;
  display:flex; align-items:center; gap:.3rem;
  box-shadow:0 2px 8px rgba(0,0,0,.45);
}
.post-img-wrap:hover .photo-tag-edit-btn,
.post-carousel:hover .photo-tag-edit-btn { opacity:1; }

/* ── Compose: crosshair in tag mode ─────────────────────── */
.tag-mode-on .post-img-item { cursor:crosshair !important; }
.tag-mode-on .post-img-item img { pointer-events:none; }

.photo-tag-dot .tag-rm-btn {
  position:absolute; top:-8px; right:-8px;
  width:16px; height:16px; border-radius:50%;
  background:#e53; color:#fff; border:none;
  font-size:.65rem; cursor:pointer; padding:0;
  display:flex; align-items:center; justify-content:center;
  box-shadow:0 1px 4px rgba(0,0,0,.4);
}

/* ── Tag popover ─────────────────────────────────────────── */
.tag-popover {
  position:absolute; z-index:20;
  background:var(--clr-surface);
  border:1px solid var(--clr-border);
  border-radius:var(--radius-lg);
  padding:.8rem .75rem .75rem;
  width:220px;
  box-shadow:0 24px 64px rgba(0,0,0,.55), 0 4px 16px rgba(0,0,0,.3);
  transform:translateX(-50%);
}
.tag-popover-tabs {
  display:flex; gap:.25rem; margin-bottom:.6rem;
}
.tag-popover-tab {
  flex:1; padding:.3rem 0;
  border-radius:var(--radius-sm);
  border:1px solid var(--clr-border);
  background:transparent; color:var(--clr-text-3);
  font-size:.7rem; font-weight:600; letter-spacing:.02em;
  cursor:pointer;
  transition:background .15s, color .15s, border-color .15s;
}
.tag-popover-tab.active {
  background:var(--clr-gold); border-color:var(--clr-gold); color:#000;
}
.tag-popover .tp-input-wrap { position:relative; }
.tag-popover .tp-input-icon {
  position:absolute; left:.65rem; top:50%; transform:translateY(-50%);
  color:var(--clr-text-3); font-size:.75rem; pointer-events:none;
}
.tag-popover input {
  width:100%; box-sizing:border-box;
  background:var(--clr-surface-2); border:1px solid var(--clr-border);
  border-radius:var(--radius-md); color:var(--clr-text);
  font-size:.8rem; font-family:inherit;
  padding:.38rem .65rem .38rem 2rem; outline:none;
  transition:border-color .15s, box-shadow .15s;
}
.tag-popover input:focus {
  border-color:var(--clr-gold); box-shadow:0 0 0 2px rgba(201,168,76,.18);
}
.tag-popover input::placeholder { color:var(--clr-text-3); }
.tag-popover-results { max-height:150px; overflow-y:auto; margin-top:.35rem; }
.tag-popover-result {
  display:flex; align-items:center; gap:.5rem;
  padding:.3rem .35rem; border-radius:var(--radius-sm);
  cursor:pointer; transition:background .12s;
}
.tag-popover-result:hover { background:var(--clr-surface-2); }
.tag-popover-result img { width:26px; height:26px; border-radius:50%; object-fit:cover; flex-shrink:0; }
.tag-popover-close {
  position:absolute; top:.45rem; right:.6rem;
  background:none; border:none; color:var(--clr-text-3);
  font-size:1rem; cursor:pointer; line-height:1; padding:0;
  transition:color .12s;
}
.tag-popover-close:hover { color:var(--clr-text); }
.tag-popover-add-btn {
  width:100%; margin-top:.4rem; padding:.35rem;
  background:var(--clr-gold); border:none;
  border-radius:var(--radius-md); color:#000;
  font-size:.75rem; font-weight:700; letter-spacing:.03em;
  cursor:pointer; transition:opacity .15s;
}
.tag-popover-add-btn:hover { opacity:.88; }

/* ── Edit tags modal ─────────────────────────────────────── */
.photo-tags-modal-bg {
  position:fixed; inset:0; z-index:10001;
  background:rgba(0,0,0,.88);
  backdrop-filter:blur(4px); -webkit-backdrop-filter:blur(4px);
  display:flex; align-items:center; justify-content:center; padding:1rem;
}
.photo-tags-modal {
  background:var(--clr-surface); border:1px solid var(--clr-border);
  border-radius:var(--radius-xl); max-width:540px; width:100%;
  overflow:hidden; box-shadow:0 30px 80px rgba(0,0,0,.7);
}
.photo-tags-modal-img-wrap {
  position:relative; line-height:0; cursor:crosshair; background:#000;
}
.photo-tags-modal-img-wrap img {
  width:100%; max-height:360px; object-fit:contain; display:block; margin:0 auto;
}

/* ═══════════════════════════════════════════════════════════════════
   Touch / coarse-pointer devices  (v61)
   Feed photos are intentionally unchanged — same behaviour as desktop.
   Only tag UI visibility is handled here.
   ═══════════════════════════════════════════════════════════════════ */
@media (hover: none) and (pointer: coarse) {

  /* ── Tag dots: always visible ────────────────────────────────── */
  .post-img-wrap .photo-tag-dot,
  .post-carousel .photo-tag-dot { opacity: 1; }

  /* ── Tag badges: flip to BELOW the dot so they stay inside ──────
     Default badge floats above dot → outside image boundary → clipped.
     Below the dot it stays within the photo area.
     Tap a dot → JS adds .badge-visible → badge appears.             */
  .photo-tag-dot .photo-tag-badge {
    bottom: auto;
    top: calc(100% + 7px);
    transform: translateX(-50%) translateY(-4px);
  }
  .photo-tag-dot.badge-visible .photo-tag-badge {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }

  /* ── Tags indicator strip: always visible ────────────────────── */
  .post-img-wrap .photo-tags-indicator,
  .post-carousel .photo-tags-indicator { opacity: 1; }

  /* ── Edit-tags button: always visible ───────────────────────── */
  .photo-tag-edit-btn { opacity: 1; }

}

/* ── Single post detail page: portrait photos at full height on mobile ──
   Scoped entirely to .post-single-view — feed is completely unaffected.
   overflow:visible on all three container layers so the image can expand
   and position:absolute children (edit btn, dots) are not clipped.       */
@media (max-width: 768px) {
  .post-single-view .post-img-grid:not(.multi) {
    overflow: visible;
  }
  .post-single-view .post-img-grid:not(.multi) .post-img-item,
  .post-single-view .post-img-grid:not(.multi) .post-img-wrap {
    overflow: visible;
  }
  .post-single-view .post-img-grid:not(.multi) .post-img-item img {
    height: auto !important;
    max-height: 80vh;
    object-fit: contain !important;
    background: #000;
    border-radius: var(--radius-md);
  }
}
