/* ═══════════════════════════════════════════════════════════════
   TRAVEL BROS — Design Tokens
   Only these variables should be used for color, nowhere else.
   ═══════════════════════════════════════════════════════════════ */
:root {
  /* Brand */
  --gold:         #e9c898;   /* primary accent — links, highlights, active states */
  --green:        #3ecf6a;   /* online dot, success, joined */
  --red:          #e05252;   /* danger, error, delete */

  /* Backgrounds — darkest to lightest */
  --bg-page:      #0e1113;   /* page background */
  --bg-card:      #1a1a1a;   /* cards, panels */
  --bg-elevated:  #2a2a2a;   /* borders, elevated surfaces, hover */
  --bg-input:     #111111;   /* inputs, darker insets */

  /* UI */
  --btn-dark:     #3a3a3a;   /* dark buttons, tags */

  /* Forum-style thread row (used by .f2-thread + city-guides .cg-trow) */
  --f2-card-bg:     var(--bg-card);
  --f2-card-border: rgba(255,255,255,0.06);
  --f2-row-hover:   rgba(233,200,152,0.04);

  /* Text — brightest to dimmest */
  --text-primary: #ffffff;   /* headings, primary text */
  --text-body:    #e0e0e0;   /* body text */
  --text-muted:   #aaaaaa;   /* secondary, labels */
  --text-dim:     #555555;   /* timestamps, placeholders */

  /* Type scale — relative (scale with parent) */
  --fs-2xs: 0.75em;   /* badges, timestamps, fine print          ~10.5px */
  --fs-xs:  0.85em;   /* meta, labels, captions                  ~11.9px */
  --fs-sm:  0.9em;    /* secondary text, feed meta               ~12.6px */

  /* Type scale — absolute (px, immune to parent scaling) */
  --fs-label: 11px;   /* sidebar section headings, badge text */
  --fs-micro: 12px;   /* post meta, small supporting labels */
  --fs-ui:    13px;   /* compact UI: tabs, dropdowns, dense forms */
  --fs-title: 18px;   /* post titles, h2, action icons */

  /* Font */
  --font-ui: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Self-hosted Smooch Sans 750 (Latin subset). Replaces the external
   fonts.googleapis.com fetch — removes one DNS lookup + a second-hop
   request to fonts.gstatic.com, and lets us control cache headers. */
@font-face {
  font-family: 'Smooch Sans';
  font-style: normal;
  font-weight: 750;
  font-display: swap;
  src: url('/uploads/fonts/smooch-sans-750-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ─── .tb-prose ─────────────────────────────────────────────────────────
   Canonical body-paragraph wrapper. Use this on any block that should
   read like a forum post body (event description, intel-style writeups,
   future article-style content). Child <p>, <a>, <strong> get the post
   visual rhythm: 640px reading column, 1.65 line-height, --text-muted,
   grayscale font smoothing, smart wrapping.
   The richer markdown system in forum/thread.php (.thread-md) is a
   superset — eventually it should extend this. For now they share intent
   but live separately. */
.tb-prose {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-wrap: pretty;
  -webkit-hyphens: auto;
  hyphens: auto;
  overflow-wrap: break-word;
}
.tb-prose p {
  margin: 0 auto 1.5rem;
  max-width: 640px;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
  text-align: left;
}
.tb-prose p:last-child { margin-bottom: 0; }
.tb-prose a { color: var(--gold); }
.tb-prose strong { color: var(--text-primary); }

/* Global Styles */
body, html {
    margin: 0;
    padding: 0;
    font-family: var(--font-ui);
    color: var(--text-primary);
    background-color: var(--bg-page);
    /* Prevent horizontal page-scroll rubber-band on mobile when a descendant
       (long username, unbreakable text, etc.) overflows the viewport.
       Using `clip` rather than `hidden` so position:sticky descendants
       (left sidebar, page headers, sticky filter rows) keep working —
       `hidden` would turn body into a scroll container and break them. */
    overflow-x: clip;
}
input, textarea, select, button {
    box-sizing: border-box;
}

/* Ticker Banner */
.ticker-banner {
    position: fixed; 
    top: 0;
    left: 0;
    width: 100%;
    height: 30px;
    background-color: var(--bg-card); 
    color: var(--text-body);
    font-size: 14px;
    overflow: hidden;
    z-index: 1100;
    display: flex; 
    align-items: center;  
}
.ticker-wrapper {
    display: flex;
    animation: ticker-scroll 250s linear infinite;
    white-space: nowrap;
}
.ticker-content {
    padding-right: 50px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    line-height: 1.1;
    height: 100%;
}
@keyframes ticker-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* Navbar */
.navbar {
    position: fixed;
    top: 30px;
    left: 0;
    width: 100%;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 1000;
    background-color: var(--bg-page);
    border-bottom: 1px solid var(--bg-elevated);
}
.navbar-left {
    width: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.logo {
    max-height: 50px;
}
.navbar-logo {
    height: 42px;
    width: auto;
    display: block;
}
.navbar-middle {
    flex-grow: 1;
}
.navbar-right {
    width: 300px;
    min-width: 300px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 20px;
    gap: 12px;
}
.user-menu-photo {
    width: 40px;
    height: 40px;
}
.navbar-right .user-menu-wrapper {
    width: 36px !important;
    height: 36px !important;
    flex: 0 0 36px;
}
.navbar-right .user-menu-wrapper .user-menu-photo {
    width: 100% !important;
    height: 100% !important;
}

.mobile-nav-toggle {
    display: none;
    width: 38px;
    height: 38px;
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}
.mobile-nav-toggle:focus {
    outline: none;
}
.mobile-nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    margin: 3px 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
}
body.mobile-nav-open .mobile-nav-toggle span:nth-child(1) {
    transform: translateY(5px) rotate(45deg);
}
body.mobile-nav-open .mobile-nav-toggle span:nth-child(2) {
    opacity: 0;
}
body.mobile-nav-open .mobile-nav-toggle span:nth-child(3) {
    transform: translateY(-5px) rotate(-45deg);
}

.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 1195;
}
body.mobile-nav-open .mobile-nav-overlay {
    opacity: 1;
    pointer-events: auto;
}

body.mobile-nav-open {
    overflow: hidden;
}

.mobile-nav-panel {
    display: none;
}

.login-btn {
    padding: 10px 20px;
    font-size: 14px;
    color: white;
    background-color: var(--bg-elevated);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
}
.login-btn:hover {
    background-color: #40474D;
}

.form-hint {
    font-size: var(--fs-sm);
    color: #a0a0a0;
    margin-top: 6px;
}

.post-editor-form label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-body);
    font-weight: 600;
}

.post-editor-input,
.post-editor-textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    background: #0f141b;
    border: 1px solid #2b3442;
    border-radius: 10px;
    color: var(--text-body);
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.45;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.post-editor-input::placeholder,
.post-editor-textarea::placeholder {
    color: #8f99a5;
}

.post-editor-input:focus,
.post-editor-textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 2px rgba(233, 200, 152, 0.2);
}

.post-editor-title {
    font-size: 1.2rem;
    font-weight: 600;
}

.post-editor-textarea {
    min-height: 180px;
    resize: vertical;
    font-size: 1.08rem;
    line-height: 1.7;
}

h1, h2, h3, h4, h5, h6,
.section-heading,
.post-title {
    font-family: inherit;
}

/* Global type scale — one definition per element, applied everywhere */
h1 { font-size: 22px; font-weight: 700; color: var(--text-primary); margin: 0 0 12px; line-height: 1.25; }
h2 { font-size: var(--fs-title); font-weight: 700; color: var(--text-primary); margin: 0 0 10px; line-height: 1.3; }
h3 { font-size: 15px; font-weight: 600; color: var(--gold); margin: 0 0 8px; line-height: 1.35; }
h4 { font-size: 14px; font-weight: 600; color: var(--text-primary); margin: 0 0 6px; line-height: 1.4; }
p  { font-size: 15px; line-height: 1.65; color: #c8cdd3; margin: 0 0 12px; }

.btn-gray {
    background-color: var(--btn-dark);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
    display: inline-block;
    font-family: inherit;
}
.btn-gray:hover {
    text-decoration: none;
    background-color: var(--btn-dark);
}

/* Search Bar */
.search-bar {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
  }
  
  .search-input {
    width: 100%;
    border: none;
    outline: none;
    padding: 10px 10px 10px 44px;
    border-radius: 999px;
    background-color: #2e3338;
    color: white;
    font-size: 14px;
    font-family: inherit;
  }
  
  .search-input::placeholder {
    color: var(--text-muted);
  }

  .search-input:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--gold);
    background-color: #1e2226;
  }

  .search-bar:focus-within .search-icon {
    color: var(--gold);
  }

  .search-icon {
    position: absolute;
    left: 14px;
    font-size: var(--fs-title);
    color: var(--text-muted);
    pointer-events: none;
    line-height: 1;
  }


/* Left Sidebar */
.left-sidebar {
    position: fixed;
    top: 88px;
    left: 0;
    width: 225px;
    height: calc(100vh - 88px);
    background-color: var(--bg-page);
    border-right: 1px solid var(--bg-elevated);
    color: var(--text-body);
    padding: 10px;
    box-sizing: border-box;
    overflow-y: hidden;
    display: flex;
    flex-direction: column;
  }
.sidebar-section-nav {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}
.sidebar-nav-inner {
    margin: auto 0;
    width: 100%;
}
.sidebar-divider {
    flex-shrink: 0;
    margin-top: 0;
}
.sidebar-section-resources {
    flex-shrink: 0;
}

/* Main Area Wrapper */
.main-area-wrapper {
    margin-left: 225px;
    padding-top: 88px;
    width: calc(100% - 225px);
    display: flex;
    justify-content: center;
    box-sizing: border-box;
  }
  /* Inner Container */
.main-area {
    width: 100%;
    max-width: 1125px;
    display: flex;
    justify-content: center;
  }
  /* Main Feed  */
.main-feed {
    width: 100%;
    max-width: 715px;
    min-width: 0;
    flex: 1 1 auto;
    top: 88px;
    padding: 20px;
    box-sizing: border-box;
  }
.feed-header-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    margin-bottom: 0;
    padding: 2px 0;
    flex-wrap: nowrap;
}
.feed-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1 1 auto;
    min-width: 0;
    flex-wrap: wrap;
}
.feed-title {
    margin: 0;
    white-space: nowrap;
    flex: 0 0 auto;
}
.feed-filter {
    flex: 0 0 auto;
    min-width: 0;
}
.feed-filter .feed-location-filter {
    margin: 0 !important;
    padding: 7px !important;
    border: none !important;
    width: auto;
    display: inline-flex;
}
.feed-create {
    margin-left: auto;
    white-space: nowrap;
    min-width: max-content;
    flex: 0 0 auto;
}
@media (max-width: 900px) {
    .feed-header-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .feed-filter {
        width: 100%;
        max-width: none;
    }
}

/* Right Sidebar */
.right-sidebar {
    width: 300px;
    flex: 0 0 300px;
    top: 88px; 
    height: calc(100vh - 88px); 
    background-color: var(--bg-page);
    border-left: 1px solid var(--bg-elevated);
    border-right: 1px solid var(--bg-elevated);
    font-size: 14px;
    color: #eee;
    padding: 10px;
    box-sizing: border-box;
    overflow-y: auto;
    overflow-x: hidden;
    display: block;
  }

  



.sidebar-heading {
    color: var(--text-muted);
    font-size: var(--fs-label);
    font-weight: 700;
    padding: 0 0 8px 10px;
    margin: 0;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0;
  }
  
  .sidebar-list li {
    margin: 1px 0;
  }

  .sidebar-list li a {
    display: block;
    padding: 6px 16px;
    border-radius: 8px;
    color: #f8f8f8;
    font-size: 14px;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
  }
  
  .sidebar-list li a:hover {
    background-color: var(--bg-card);
    color: var(--text-primary);
  }

.sidebar-nav-list li a {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.sidebar-nav-list .nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    flex-shrink: 0;
    font-size: 27px;
    line-height: 1;
}

.sidebar-nav-list .nav-label {
    white-space: nowrap;
}

.sidebar-nav-list li a.active {
    color: var(--gold);
}

.sidebar-nav-list li a.active .nav-label {
    font-weight: 700;
}

.sidebar-nav-list .nav-badge {
    margin-left: auto;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #d43c3c;
    color: var(--text-primary);
    font-size: var(--fs-label);
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    box-sizing: border-box;
}

.sidebar-nav-list .nav-badge[hidden] {
    display: none !important;
}


/* Container for each dropdown group */
.sidebar-dropdown {
    margin-bottom: 10px;
  }
  
  /* Header (e.g., Brazil) */
  .dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    color: #eee;
    font-weight: 600;
    font-size: 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
  }
  
  .dropdown-header:hover {
    background-color: var(--bg-card);
  }
  
  /* Icon rotation */
  .dropdown-arrow {
    transition: transform 0.3s ease;
  }
  
  .dropdown-arrow.open {
    transform: rotate(180deg);
  }
  
  /* Sub-links (e.g., Rio, SP) */
  .dropdown-links {
    margin-left: 10px;
    padding-left: 10px;
    border-left: 1px solid var(--bg-elevated);
    display: none;
  }
  
  .dropdown-links.show {
    display: block;
  }
  
.dropdown-links a {
    display: block;
    padding: 8px 16px;
    margin: 4px 0;
    border-radius: 6px;
    font-size: var(--fs-ui);
    color: #f8f8f8;
    text-decoration: none;
    transition: background-color 0.2s ease;
  }
  
  .dropdown-links a:hover {
    background-color: var(--bg-card);
    color: var(--text-primary);
  }






.sidebar-divider {
    border: none;
    border-top: 1px solid var(--bg-elevated);
    margin: 5px -10px 10px -10px;
}

.sidebar-stats-widget {
    display: flex;
    padding: 2px 10px;
}
.sidebar-stat-row {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 20px;
    font-size: var(--fs-xs);
    color: #c8d0dc;
}
.sidebar-stat-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 6px rgba(62,207,106,0.7);
    flex-shrink: 0;
}
.sidebar-stat-icon {
    font-size: 1rem;
    color: var(--gold);
    flex-shrink: 0;
}
.sidebar-stat-val {
    font-weight: 700;
    color: #f0f3f8;
    font-size: var(--fs-sm);
}
.sidebar-stat-label {
    color: #8a96a8;
}

.tag-list {
    padding: 10px 0px 0px 0px;
}

.tag-list a {
    display: inline-block;
    margin: 5px 6px 5px 0px;
    padding: 5px 5px;
    background-color: #2a2d30;
    border: 1px solid var(--btn-dark);
    border-radius: 4px;
    color: var(--text-body);
    text-decoration: none;
    font-size: var(--fs-ui);
  }
.tag-list a:hover {
    background-color: #3a3d40;
    color: var(--text-primary);
  }
/* ── Founder video widget ────────────────────────────────── */
.founder-video-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
}
.founder-video-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.2s;
}
.founder-video-thumb:hover { opacity: 0.85; }
.founder-video-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 48px;
    color: rgba(255,255,255,0.85);
    pointer-events: none;
    text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}
.founder-video-wrap iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.contributor-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.contributor-list li {
    margin: 1px 0;
}
.contributor-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 1px 12px;
    border-radius: 8px;
    color: #f8f8f8;
    text-decoration: none;
    transition: background-color 0.2s ease;
    width: 100%;
    box-sizing: border-box;
}
.contributor-row:hover {
    background-color: var(--bg-card);
    color: var(--text-primary);
}


  
.logout-btn {
    background-color: var(--btn-dark);
    color: var(--text-primary);
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    text-decoration: none;
    display: inline-block;
    font-family: inherit;
}
.logout-btn:hover {
    background-color: var(--text-dim);
}

.embed-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    max-width: 100%;
}
.embed-container iframe,
.embed-container object,
.embed-container embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Posts */
.posts {
    padding: 20px;
}
.post {
    display: flex;
    gap: 15px;
    background-color: var(--bg-card);
    padding: 12px 16px;
    margin-bottom: 15px;
    border-radius: 8px;
    color: white;
    font-family: inherit;
}
.post[data-post-link] {
    cursor: pointer;
    position: relative;
}
.post[data-post-link]:focus { outline: none; }
.post[data-post-link]:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}
/* When hovering the image itself, give a subtle gold hint */
.post[data-post-link] .post-media-wrapper:not([data-no-post-link]) { cursor: pointer; }
.post[data-post-link] .post-media-wrapper:not([data-no-post-link]):hover::after {
    content: '';
    position: absolute;
    inset: 0;
    box-shadow: inset 0 0 0 2px rgba(233, 200, 152, 0.35);
    border-radius: 6px;
    pointer-events: none;
}
.post-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}
.post-icon {
    width: 40px;
    height: 40px;
    margin-right: 10px;
    border-radius: 4px;
}
.post-meta {
    display: flex;
    justify-content: space-between;
    width: 100%;
    font-size: var(--fs-micro);
    color: #ababab;
    font-family: inherit;
}
.post-date {
    color: var(--text-muted) !important;
    font-size: var(--fs-sm);
    font-family: inherit;
}
.post-thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
}
.post-body {
    flex-grow: 1;
}

/* Rendered markdown in feed card previews — clamp to 4 lines */
.post-preview-clamp {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.post-media-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
    padding-top: 56.25%; /* 16:9 — used for video/iframe */
    overflow: hidden;
    border-radius: 6px;
    background: #000;
    margin: 10px 0;
}
.post-media {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
/* YouTube subscribe button — used on feed, city, country pages */
.tb-yt-channel-name {
    color: var(--gold);
    font-weight: 700;
    text-decoration: none;
    transition: color .15s ease;
}
a.tb-yt-channel-name:hover { color: #c5ac67; }
.tb-yt-source-row {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0 0 8px;
    color: var(--text-dim);
    font-size: var(--fs-xs);
}
.tb-yt-source-label {
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 700;
    font-size: .82em;
}
.tb-yt-source-pill {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #f0f0f0;
    background: #171717;
    border: 1px solid #2a2a2a;
    border-radius: 999px;
    padding: 3px 9px;
    cursor: help;
}
.tb-yt-source-pill i {
    color: #ff4d4d;
    font-size: 1.05em;
}
.tb-yt-source-tooltip {
    position: absolute;
    left: 0;
    top: calc(100% + 8px);
    z-index: 1200;
    width: 270px;
    max-width: min(270px, 82vw);
    padding: 10px 12px;
    border: 1px solid var(--bg-elevated);
    border-radius: 9px;
    background: #050607;
    box-shadow: 0 10px 28px rgba(0,0,0,.42);
    color: var(--text-body);
    font-size: var(--fs-xs);
    font-weight: 500;
    line-height: 1.42;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-4px);
    transition: opacity .14s ease .18s, transform .14s ease .18s;
}
.tb-yt-source-tooltip::before {
    content: "";
    position: absolute;
    left: 18px;
    top: -6px;
    width: 10px;
    height: 10px;
    transform: rotate(45deg);
    background: #050607;
    border-left: 1px solid var(--bg-elevated);
    border-top: 1px solid var(--bg-elevated);
}
.tb-yt-source-pill:hover .tb-yt-source-tooltip,
.tb-yt-source-pill:focus-within .tb-yt-source-tooltip {
    opacity: 1;
    transform: translateY(0);
}

/* Image-only wrappers: natural aspect ratio with min/max height caps.
   Extreme shapes (ultra-wide or ultra-tall) letterbox with dark gray fill. */
.post-media-wrapper.post-media-wrapper--image {
    padding-top: 0;
    min-height: 220px;
    max-height: 640px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0a0a0a;
}
.post-media-wrapper.post-media-wrapper--image .post-media {
    position: static;
    top: auto;
    left: auto;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 640px;
    object-fit: contain;
}
/* YouTube lazy-load play button — circle outline + transparent fill + white triangle.
   Triangle is drawn in pure CSS via ::before so the button looks identical whether the
   caller put an inner <i> icon or left the button empty. Any inner icon is hidden. */
.yt-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 86px;
    height: 86px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.18);
    border: 2px solid rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    color: #fff;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, transform 0.15s;
    z-index: 2;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}
.yt-play-btn > i { display: none; }
.yt-play-btn::before {
    content: '';
    display: block;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 14px 0 14px 22px;
    border-color: transparent transparent transparent #fff;
    margin-left: 6px; /* optical centering — triangle is right-heavy */
}
.yt-play-btn:hover {
    background: rgba(0, 0, 0, 0.38);
    border-color: #fff;
    transform: translate(-50%, -50%) scale(1.05);
}
@media (max-width: 640px) {
    .yt-play-btn { width: 68px; height: 68px; border-width: 2px; }
    .yt-play-btn::before { border-width: 11px 0 11px 18px; margin-left: 5px; }
}
@media (max-width: 1024px) {
}
@media (max-width: 700px) {
}
.post p {
    color: #b0b0b0;
    font-family: inherit;
}
.post-title {
    font-size: var(--fs-title);
    color: var(--text-primary);
    font-weight: 700;
    font-family: inherit;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.post-title a {
    color: var(--text-primary);
    text-decoration: none;
    font-family: inherit;
}
.post-title a:hover {
    text-decoration: underline;
    color: #999999;
}
.post-footer {
    display: flex;
    gap: 15px;
    font-family: inherit; 
} 

.post-actions {
    display: flex;
    align-items: stretch;
    gap: 16px;
    flex-wrap: wrap;
    font-size: var(--fs-sm);
    color: var(--text-body);
    margin-top: 6px;
}

/* ── Reaction Bar ─────────────────────────────────────────────────────────── */
.reaction-bar {
    position: relative;
    display: inline-flex;
    align-items: stretch;
    align-self: stretch;
}
.rxn-summary-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0 10px;
    border: 1px solid var(--bg-elevated);
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-muted);
    font-size: var(--fs-xs);
    line-height: 1;
    transition: border-color .15s, color .15s;
    user-select: none;
}
.rxn-summary-btn:hover { border-color: var(--btn-dark); color: var(--text-body); }
.rxn-summary-btn.has-reaction { border-color: var(--gold); color: var(--gold); }
.rxn-top-icons { font-size: 1.75em; line-height: 1; }
.rxn-total { font-weight: 600; }
.rxn-add-label { font-size: 1em; color: inherit; }

.rxn-picker {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    background: var(--bg-card);
    border: 1px solid var(--bg-elevated);
    border-radius: 12px;
    padding: 6px 8px;
    gap: 2px;
    z-index: 300;
    box-shadow: 0 4px 24px rgba(0,0,0,0.65);
    white-space: nowrap;
    align-items: center;
}
.rxn-picker.is-open { display: flex; }
.rxn-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 8px;
    transition: transform .12s ease;
    font-size: 1.45em;
    line-height: 1;
}
.rxn-btn:hover { transform: scale(1.3); }
.rxn-btn.is-active { background: rgba(233,200,152,0.09); }
.rxn-btn-count {
    font-size: 0.42em;
    color: var(--text-dim);
    font-weight: 700;
    line-height: 1;
}
.rxn-btn-count:not(:empty) {
    min-height: 1em;
    margin-top: 4px;
}
.rxn-btn.is-active .rxn-btn-count { color: var(--gold); }

/* ── Field Report badge ───────────────────────────────────────────────────── */
.badge-field-report {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(233, 200, 152, 0.1);
    color: var(--gold);
    font-size: var(--fs-2xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ── Legacy vote controls (kept for compatibility) ────────────────────────── */
.vote-controls {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.vote-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border: 1px solid var(--bg-elevated);
    border-radius: 6px;
    background: var(--bg-card);
    color: var(--text-body);
    cursor: pointer;
    font-size: var(--fs-sm);
    transition: all 0.15s ease;
}

.vote-btn:hover {
    border-color: #61dafb;
    color: var(--text-primary);
}

.vote-btn.is-active {
    border-color: #61dafb;
    color: var(--text-primary);
    background: var(--bg-elevated);
}
.vote-btn.is-disabled {
    opacity: 0.45;
    cursor: not-allowed;
    border-color: var(--bg-elevated);
    background: var(--bg-card);
    color: #7a8599;
}
.vote-btn.is-disabled:hover {
    border-color: var(--bg-elevated);
    color: #7a8599;
}

.vote-btn i, .bookmark-btn i {
    font-size: var(--fs-title);
    line-height: 1;
}

.vote-icon-on { display: none; }
.vote-btn.is-active .vote-icon-off { display: none; }
.vote-btn.is-active .vote-icon-on { display: inline; }

.bm-icon-on { display: none; }
.bookmark-controls.is-bookmarked .bm-icon-off { display: none; }
.bookmark-controls.is-bookmarked .bm-icon-on { display: inline; }

.vote-btn .vote-count {
    font-weight: 600;
}

.post-comment-count {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 12px;
    border: 1px solid var(--bg-elevated);
    border-radius: 6px;
    background: var(--bg-card);
    color: var(--gold);
    font-size: var(--fs-xs);
    transition: border-color .15s, color .15s, background .15s;
    cursor: pointer;
    text-decoration: none;
}

.post-comment-count:hover {
    border-color: var(--gold);
    color: var(--gold);
    background: var(--bg-elevated);
}

.post-comment-count i {
    font-size: var(--fs-title);
}

.btn-read-more {
    margin-left: auto;
    padding: 6px 12px;
    background: #2a3344;
}

.bookmark-controls {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.bookmark-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 12px;
    border: 1px solid var(--bg-elevated);
    border-radius: 6px;
    background: var(--bg-card);
    color: var(--gold);
    cursor: pointer;
    font-size: var(--fs-xs);
    transition: border-color .15s, color .15s, background .15s;
}

.bookmark-btn:hover {
    border-color: var(--gold);
    color: var(--gold);
    background: var(--bg-elevated);
}
.bookmark-controls.is-bookmarked .bookmark-btn {
    border-color: var(--gold);
    color: var(--gold);
    background: rgba(233,200,152,0.08);
}


.bookmark-remove-link {
    display: none;
    font-size: var(--fs-xs);
    color: var(--text-dim);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    text-decoration: none;
}

.bookmark-controls.is-bookmarked .bookmark-remove-link {
    display: inline-flex;
}

.author-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.author-card-trigger {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.contributor-trigger {
    display: flex;
    width: 100%;
}

.author-card-trigger:hover .author-avatar {
    border-color: #c5ac67;
}

.author-card {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 290px;
    background: #0f1217;
    border: 1px solid var(--bg-elevated);
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.55);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity 0.1s ease, transform 0.1s ease;
    z-index: 20;
}

.author-card-trigger:not(.contributor-trigger):not(.comment-bubble-row):hover .author-card {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    transition: opacity 0.15s ease 1s, transform 0.15s ease 1s;
}

.author-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.author-card.align-right {
    left: auto;
    right: 0;
}

.author-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 4px;
}

.author-card-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--bg-elevated);
}

.author-card-view-btn {
    background: var(--btn-dark);
    color: var(--text-primary);
    border-radius: 6px;
    padding: 6px 14px;
    font-size: var(--fs-ui);
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    line-height: 1;
    align-self: center;
}

.author-card-view-btn:hover {
    background: var(--btn-dark);
}

/* City hover card */
.city-hover-trigger {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.city-card {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 260px;
    background: #0f1217;
    border: 1px solid var(--bg-elevated);
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.55);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity 0.15s ease 0.3s, transform 0.15s ease 0.3s;
    z-index: 20;
}

.city-hover-trigger:hover .city-card {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.author-card-name {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 15px;
    line-height: 1.2;
}

.author-card-handle {
    color: var(--text-muted);
    font-size: var(--fs-ui);
}

.author-card-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.author-card-location {
    color: var(--text-muted);
    font-size: var(--fs-ui);
}

.author-card-bio {
    color: var(--text-muted);
    font-size: var(--fs-ui);
    line-height: 1.4;
}

.author-card-stats {
    display: flex;
    gap: 12px;
    font-size: var(--fs-ui);
    color: var(--text-muted);
    flex-wrap: wrap;
    margin-top: 2px;
}

.author-card-stats strong {
    color: var(--text-primary);
}

.author-card-rep-badge {
    color: var(--gold);
    font-weight: 600;
}

.footer-item {
    font-size: var(--fs-micro);
    color: var(--text-muted);
    font-family: inherit;
}

.full-post {
    display: block;
    padding: 20px;
    background-color: var(--bg-card);
    border-radius: 8px;
    margin-bottom: 20px;
    font-family: inherit;
}
/* Stretch only post-body media (uploaded images, videos) — NOT author avatars,
   hover-card avatars, comment avatars, or icons. */
.full-post .post-media,
.full-post .post-content img,
.full-post .post-content video,
.full-post video {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px 0;
}
.full-post .post-content {
    margin-top: 20px;
    font-family: inherit;
}
.full-post .post-content p {
    font-size: 15px;
    line-height: 1.6;
    margin: 0 0 1rem;
}

.join-btn, .shop-btn {
    font-size: var(--fs-micro);
    padding: 5px 10px;
    color: white;
    background-color: #0079d3;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
}
.join-btn:hover, .shop-btn:hover {
    background-color: #005ea2;
}

a.read-more {
    text-decoration: none;
    transition: color 0.2s ease-in-out;
    font-family: inherit;
}
a.read-more:hover {
    color: #999999;
    text-decoration: underline;
}

.divider {
    border: none;
    border-top: 1px solid var(--bg-elevated);
    margin: 10px 0;
}

.subreddit, .user {
    font-size: 14px;
    color: var(--text-muted);
    font-family: inherit;
}



@media (max-width: 1323px) {
    .mobile-nav-toggle {
      display: flex;
    }
  
    .left-sidebar {
      display: none;
    }

    .mobile-nav-panel {
      display: block;
      position: fixed;
      top: 88px;
      left: 0;
      width: 260px;
      height: calc(100vh - 88px);
      background-color: var(--bg-page);
      border-right: 1px solid var(--bg-elevated);
      overflow-y: auto;
      z-index: 1205;
      transform: translateX(-270px);
      opacity: 0;
      pointer-events: none;
      transition: transform 0.25s ease, opacity 0.25s ease;
      padding: 12px;
      box-sizing: border-box;
    }

    body.mobile-nav-open .mobile-nav-panel {
      transform: translateX(0);
      opacity: 1;
      pointer-events: auto;
      box-shadow: 2px 0 10px rgba(0,0,0,0.4);
    }

    .main-area-wrapper {
      margin-left: 0;
      width: 100%;
    }
  
    .main-area {
      width: 100%;
      max-width: 1125px;
      margin: 0 auto;
    }
  
    .main-feed {
      width: auto;
      max-width: 715px;
      min-width: 0;
      flex: 1 1 auto;
    }
  
    .right-sidebar {
      display: block;
      width: 300px;
      flex: 0 0 300px;
    }
  }

@media (max-width: 1440px) and (min-width: 1324px) {
    .left-sidebar {
      width: 68px;
      padding: 8px 6px;
      overflow-x: hidden;
    }

    .main-area-wrapper {
      margin-left: 68px;
      width: calc(100% - 68px);
    }

    .left-sidebar .sidebar-section:not(:first-child),
    .left-sidebar .sidebar-divider {
      display: none;
    }

    .left-sidebar .sidebar-heading {
      display: none;
    }

    .sidebar-nav-list li {
      margin: 6px 0;
    }

    .sidebar-nav-list li a {
      justify-content: center;
      padding: 10px 8px;
      gap: 0;
    }

    .sidebar-nav-list .nav-label {
      display: none;
    }

    .sidebar-nav-list .nav-icon {
      margin-right: 0;
      width: auto;
      font-size: 30px;
    }

    .sidebar-nav-list .nav-badge {
      position: absolute;
      top: 5px;
      right: 5px;
      margin-left: 0;
      min-width: 16px;
      height: 16px;
      line-height: 16px;
      font-size: 10px;
      padding: 0 4px;
    }
}
@media (max-width: 1024px) {
    .right-sidebar {
      display: none;
    }

    .main-area-wrapper {
      margin-left: 0;
      width: 100%;
      justify-content: center;
    }

    .main-area {
      width: 100%;
      max-width: 100%;
      margin: 0 auto;
      justify-content: center;
    }
  
    .main-feed {
      width: 100%;
      min-width: 0;
      max-width: 100%;
      flex: 1 1 auto;
    }
  }
@media (max-width: 874px) {
    .main-area-wrapper {
      margin-left: 0;
      width: 100%;
      justify-content: center;
    }
  
    .main-area {
      width: 100%;
      justify-content: center;
    }
  
    .main-feed {
      width: 100%;
      min-width: 0;
      max-width: 100%;
    }
  }

@media (max-width: 700px) {
    .navbar {
      padding: 0 10px;
    }

    .navbar-left,
    .navbar-right {
      width: auto;
      min-width: 0;
    }

    .navbar-middle {
      display: none;
    }

    .navbar-right {
      padding-right: 0;
      gap: 8px;
    }
}

@media (max-device-width: 900px) {
    .ticker-banner {
      display: none;
    }

    .navbar {
      height: 58px;
      padding: 0 10px;
      top: 0;
    }

    .navbar-left {
      width: auto;
      justify-content: flex-start;
    }

    .navbar-logo {
      height: 44px;
      max-width: 100%;
    }

    .navbar-middle {
      display: none;
    }

    .navbar-right {
      width: auto;
      min-width: 0;
      padding-right: 0;
      gap: 12px;
      flex-shrink: 0;
    }

    .mobile-nav-toggle {
      width: 38px;
      height: 38px;
    }

    .mobile-nav-toggle span {
      width: 22px;
      height: 2px;
      margin: 3px 0;
    }

    .user-menu-photo {
      width: 34px;
      height: 34px;
    }

    .navbar,
    .navbar-right {
      box-sizing: border-box;
      max-width: 100%;
    }
 
    .navbar-right > * {
      max-width: 100%;
    }

    .main-area-wrapper {
      padding-top: 58px;
    }

    .right-sidebar {
      display: none;
    }
}

@media (min-width: 901px) {
    .navbar .user-menu-photo {
      width: 36px !important;
      height: 36px !important;
    }
}

/* =====================
   EVENTS
   ===================== */

/* Page header */
.events-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.events-page-header h1 {
    margin: 0;
}
/* ── Elite event gate ── */
.event-card-elite-wrap {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
}
.event-card-elite-blur {
    filter: blur(4px);
    pointer-events: none;
    user-select: none;
    opacity: 0.55;
}
.event-card-elite-gate {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(14,17,19,0.55);
}
.event-card-elite-gate i {
    font-size: 1.8em;
    color: var(--gold);
}
.event-card-elite-gate span {
    font-size: var(--fs-sm);
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.04em;
}
.event-card-elite-cta {
    display: inline-flex;
    align-items: center;
    padding: 8px 20px;
    background: var(--gold);
    color: #111;
    font-weight: 800;
    font-size: var(--fs-sm);
    border-radius: 8px;
    text-decoration: none;
    transition: opacity 0.15s;
}
.event-card-elite-cta:hover { opacity: 0.88; }

.btn-create-event {
    background: var(--gold);
    color: var(--bg-page);
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-size: var(--fs-sm);
    white-space: nowrap;
}
.btn-create-event:hover {
    background: #d4b07e;
}

/* Section labels */
.events-section-label {
    font-size: var(--fs-2xs);
    letter-spacing: 0.08em;
    color: var(--text-muted);
    font-weight: 700;
    margin: 20px 0 10px;
}
.events-section-label.past {
    margin-top: 32px;
}

/* Event card (listing) */
.events-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.events-list--past .event-card {
    opacity: 0.6;
}
.event-card {
    display: flex;
    gap: 0;
    background: var(--bg-card);
    border: 1px solid var(--bg-elevated);
    border-radius: 6px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.event-card:hover {
    border-color: var(--gold);
    background: var(--bg-card);
}
.event-card-photo {
    width: 285px;
    aspect-ratio: 5 / 4;
    flex-shrink: 0;
    overflow: hidden;
}
.event-card-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.event-card-body {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
    min-width: 0;
}
.event-card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: var(--fs-xs);
}
.event-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: var(--fs-2xs);
    font-weight: 600;
    flex-shrink: 0;
}
.event-type-badge.city {
    background: #1b2a1a;
    color: var(--green);
    border: 1px solid #2e4a2e;
}
.event-type-badge.online {
    background: #1a253a;
    color: #61dafb;
    border: 1px solid #1e3555;
}
.event-card-location {
    color: var(--text-muted);
    font-size: var(--fs-xs);
}
.event-card-title-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
}
.event-card-title {
    font-size: 1.75em;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.2;
}
.event-card-elite-mark {
    color: var(--gold);
    font-size: 0.85em;
    margin-right: 4px;
    vertical-align: middle;
    position: relative;
    top: -1px;
}
.event-card-going {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: var(--fs-xs);
    font-weight: 600;
    color: var(--green);
    white-space: nowrap;
    flex-shrink: 0;
}
.event-card-organizer {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: var(--fs-sm);
    color: var(--text-muted);
}
.event-card-organizer-by {
    color: var(--text-muted);
    flex-shrink: 0;
}
.event-card-organizer strong {
    color: var(--text-body);
    font-weight: 600;
}
.event-card-organizer-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg-elevated);
}
.event-card-date {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--fs-sm);
    color: var(--text-muted);
}
.event-tz {
    color: #61dafb;
    font-style: normal;
    font-size: var(--fs-sm);
}
.event-card-desc {
    color: #8899aa;
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}
/* In-person event: pin + flag + city (replaces green badge) */
.event-card-location-strip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: var(--fs-sm);
    font-size: var(--fs-sm);
    color: var(--text-muted);
}
.event-card-location-strip i {
    color: var(--red);
    font-size: 1em;
    flex-shrink: 0;
}
.event-card-recurrence-inline {
    color: var(--text-dim);
}
.events-load-more-btn {
    display: block;
    width: 100%;
    margin-top: 16px;
    padding: 10px 16px;
    background: var(--bg-card);
    border: 1px solid var(--btn-dark);
    border-radius: 12px;
    color: var(--text-muted);
    font-size: var(--fs-sm);
    font-weight: 600;
    cursor: pointer;
    transition: border-color .15s, color .15s;
    text-align: center;
}
.events-load-more-btn:hover { border-color: var(--gold); color: var(--gold); }
.event-card-footer {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: var(--fs-xs);
    color: var(--text-muted);
    flex-wrap: wrap;
}
.event-rsvp-counts {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--green);
}

/* Event detail page */
.event-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: var(--fs-xs);
    text-decoration: none;
}
.event-back-link:hover { color: var(--gold); }

.event-pre-photo {
    margin-bottom: 16px;
}

.event-hero-photo {
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
    height: 375px;
}
.event-hero-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.event-detail-header {
    margin-bottom: 24px;
}
.event-detail-title {
    font-size: 1.85em;
    font-weight: 700;
    color: #f0f0f0;
    margin: 10px 0 14px;
}
.event-detail-meta {
    display: flex;
    flex-direction: column;
    gap: 7px;
    font-size: var(--fs-sm);
    color: var(--text-muted);
    margin-bottom: 16px;
}
.event-detail-meta span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}
.event-join-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--gold);
    color: var(--bg-page);
    font-weight: 700;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-size: var(--fs-sm);
    margin-bottom: 10px;
}
.event-join-btn:hover { background: #d4b07e; }

.event-edit-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: var(--fs-xs);
    text-decoration: none;
    margin-left: 12px;
}
.event-edit-link:hover { color: var(--gold); }

.event-section-heading {
    font-size: var(--fs-xs);
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    margin: 0 0 12px;
}

/* RSVP + Attendees — stack vertically (one column) so they live cleanly
   inside the 640px reading column. */
.event-rsvp-and-attendees {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 20px;
    align-items: stretch;
}

/* Reading column for every section below the hero image — date, organizer,
   RSVP, attendees, description all share the same gutter so it reads like a
   forum post body. The image and title remain full-width above this. */
.event-detail-column {
    max-width: 640px;
    margin: 0 auto;
}
.event-rsvp-and-attendees > .event-rsvp-section,
.event-rsvp-and-attendees > .event-attendees {
    margin-bottom: 0;
    background: var(--bg-card);
    border: 1px solid var(--bg-elevated);
    border-radius: 4px;
    padding: 16px 20px;
}
@media (max-width: 768px) {
    .event-rsvp-and-attendees { grid-template-columns: 1fr; }
    .event-rsvp-and-attendees > .event-rsvp-section,
    .event-rsvp-and-attendees > .event-attendees {
        padding: 16px 12px;
    }
}

/* RSVP */
.event-rsvp-section {
    background: var(--bg-card);
    border: 1px solid var(--bg-elevated);
    border-radius: 4px;
    padding: 16px 20px;
    margin-bottom: 20px;
}
.event-attendees-empty {
    color: var(--text-muted);
    font-size: var(--fs-sm);
    margin: 0;
}
.rsvp-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.rsvp-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 6px;
    border: 1px solid var(--bg-elevated);
    background: var(--bg-card);
    color: var(--text-muted);
    font-size: var(--fs-sm);
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
}
.rsvp-btn:hover { border-color: var(--gold); color: var(--text-primary); }
@media (max-width: 768px) {
    .rsvp-buttons { gap: 5px; }
    .rsvp-btn { padding: 8px 10px; gap: 6px; }
}

.rsvp-btn--yes.rsvp-active { background: #1b2a1a; border-color: var(--green); color: var(--green); }
.rsvp-btn--maybe.rsvp-active { background: #2a2517; border-color: var(--gold); color: var(--gold); }
.rsvp-btn--no.rsvp-active { background: #2a1a1a; border-color: #f08080; color: #f08080; }

.rsvp-count {
    background: rgba(255,255,255,0.08);
    border-radius: 999px;
    padding: 1px 7px;
    font-size: var(--fs-xs);
}

/* RSVP scope note for occurrence */
.event-rsvp-scope-note {
    font-size: var(--fs-xs);
    color: var(--text-dim);
    margin: 0 0 10px;
}

/* Occurrence override section */
.event-occurrence-override {
    background: var(--bg-card);
    border: 1px dashed var(--bg-elevated);
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 20px;
}
.event-override-toggle {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: var(--fs-sm);
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
}
.event-override-toggle:hover { color: var(--gold); }
#occurrence-override-form { margin-top: 14px; }
#occurrence-override-form .form-group { margin-bottom: 12px; }
#occurrence-override-form .form-group label {
    display: block;
    font-size: var(--fs-xs);
    color: var(--text-dim);
    margin-bottom: 4px;
}
#occurrence-override-form .form-control {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--bg-elevated);
    border-radius: 8px;
    padding: 8px 12px;
    color: var(--text-primary);
    font-size: var(--fs-sm);
    box-sizing: border-box;
}
#occurrence-override-form textarea.form-control { resize: vertical; }
.btn-save-override {
    padding: 8px 20px;
    background: var(--gold);
    color: #13181d;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: var(--fs-sm);
    cursor: pointer;
}
.btn-save-override:hover { background: #c5ac67; }
.btn-cancel-override {
    padding: 8px 16px;
    background: var(--bg-elevated);
    color: var(--text-muted);
    border: none;
    border-radius: 8px;
    font-size: var(--fs-sm);
    cursor: pointer;
}
.btn-cancel-override:hover { color: var(--text-primary); }
.btn-clear-override {
    padding: 8px 16px;
    background: none;
    color: var(--text-dim);
    border: 1px solid var(--bg-elevated);
    border-radius: 8px;
    font-size: var(--fs-sm);
    cursor: pointer;
}
.btn-clear-override:hover { border-color: #f08080; color: #f08080; }
.event-override-tag {
    display: inline-block;
    background: rgba(233,200,152,0.12);
    color: var(--gold);
    border-radius: 4px;
    padding: 1px 6px;
    font-size: var(--fs-xs);
    margin-left: 6px;
    vertical-align: middle;
}

/* Past event banner */
.event-past-banner {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--bg-elevated);
    border-radius: 8px;
    padding: 10px 16px;
    color: var(--text-muted);
    font-size: var(--fs-sm);
    margin-bottom: 20px;
}

/* Description */
.event-description {
    margin-bottom: 24px;
}
/* .event-description-body now inherits all body-prose styling from .tb-prose;
   keep an empty hook here in case future event-specific overrides are needed. */

/* Attendees — overlapping avatar circles */
.event-attendees {
    margin-bottom: 24px;
}
.attendee-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
}
.attendee-item {
    display: block;
    background: none;
    border: none;
    border-radius: 50%;
    padding: 0;
    margin-left: -10px;
    text-decoration: none;
    position: relative;
    transition: transform 0.12s;
}
.attendee-item:first-child { margin-left: 0; }
.attendee-item:hover { transform: translateY(-2px); z-index: 1; }
.attendee-item span { display: none; }
.attendee-item.attendee-maybe { opacity: 0.6; }
.attendee-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--bg-page);
    display: block;
}

/* Create/Edit form */
.event-form {
    max-width: 640px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-top: 20px;
}
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.form-group label {
    font-size: var(--fs-xs);
    font-weight: 600;
    color: var(--text-muted);
}
.form-group input[type="text"],
.form-group input[type="url"],
.form-group input[type="datetime-local"],
.form-group select,
.form-group textarea {
    background: var(--bg-card);
    border: 1px solid var(--bg-elevated);
    border-radius: 8px;
    color: #f0f0f0;
    padding: 9px 12px;
    font-size: var(--fs-sm);
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s ease;
}
/* Remove native select OS styling */
.form-group select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}
/* Custom select wrapper with arrow */
.select-wrap {
    position: relative;
}
.select-wrap select {
    width: 100%;
    padding-right: 32px;
    cursor: pointer;
}
.select-wrap .select-arrow {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    font-size: var(--fs-xs);
    pointer-events: none;
}
/* City search autocomplete */
.city-search-wrap {
    position: relative;
}
.city-search-input {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--bg-elevated);
    border-radius: 8px;
    color: #f0f0f0;
    padding: 9px 12px;
    font-size: var(--fs-sm);
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s ease;
    box-sizing: border-box;
}
.city-search-input:focus { border-color: var(--gold); }
.city-search-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0; right: 0;
    background: var(--bg-card);
    border: 1px solid var(--bg-elevated);
    border-radius: 8px;
    z-index: 100;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}
.city-option {
    padding: 9px 14px;
    font-size: var(--fs-sm);
    color: var(--text-body);
    cursor: pointer;
    transition: background 0.1s;
}
.city-option:hover { background: var(--bg-elevated); color: var(--gold); }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--gold);
}
.form-group textarea { resize: vertical; }
.form-row {
    display: flex;
    gap: 16px;
}
.form-row .form-group { flex: 1; }

.radio-group {
    display: flex;
    gap: 12px;
}
.radio-option {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--bg-card);
    border: 1px solid var(--bg-elevated);
    border-radius: 8px;
    padding: 8px 14px;
    cursor: pointer;
    font-size: var(--fs-sm);
    color: var(--text-muted);
    transition: border-color 0.15s ease;
}
.radio-option:has(input:checked) {
    border-color: var(--gold);
    color: var(--gold);
}
.radio-option input { display: none; }

.form-errors {
    background: #2a1a1a;
    border: 1px solid #804040;
    border-radius: 8px;
    padding: 12px 16px;
    color: #f08080;
    font-size: var(--fs-sm);
}
.form-errors p { margin: 4px 0; }

.form-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}
.btn-submit-event {
    background: var(--gold);
    color: var(--bg-page);
    font-weight: 700;
    padding: 10px 22px;
    border-radius: 8px;
    border: none;
    font-size: var(--fs-sm);
    cursor: pointer;
    font-family: inherit;
}
.btn-submit-event:hover { background: #d4b07e; }
.btn-cancel {
    color: var(--text-muted);
    font-size: var(--fs-sm);
    text-decoration: none;
}
.btn-cancel:hover { color: var(--gold); }
.btn-delete-event {
    background: none;
    border: 1px solid #5a2020;
    color: #c0504a;
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s, color 0.2s;
}
.btn-delete-event:hover { background: #3a1515; color: var(--red); }

/* Sidebar events widget */
.sidebar-events-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}
.sidebar-event-item {
    position: relative;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    text-decoration: none;
    padding: 12px 8px;
    border-radius: 8px;
    color: inherit;
    transition: background 0.15s ease;
}
.sidebar-event-item:hover { background: var(--bg-card); }
.sidebar-event-thumb {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    border-radius: 4px;
    overflow: hidden;
    background: var(--bg-elevated);
}
.sidebar-event-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.sidebar-event-thumb-placeholder {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    border-radius: 4px;
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.2em;
}
.sidebar-event-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}
.sidebar-event-title {
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    order: 2;
}
.sidebar-event-date {
    color: var(--text-muted);
    font-size: var(--fs-2xs);
    font-weight: 500;
    order: 3;
}
/* Elite-only event in sidebar — blurred dark thumb with ELITE/ONLY label */
.sidebar-event-thumb--elite {
    position: relative;
    background: #111;
}
.sidebar-event-thumb--elite img {
    filter: blur(4px) brightness(0.38);
}
.sidebar-elite-label {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    font-size: 0.63rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    line-height: 1.2;
    pointer-events: none;
    gap: 0;
}
/* Blur date & location for locked events; title stays readable */
.sel-blur {
    filter: blur(3.5px);
    opacity: 0.45;
    pointer-events: none;
    user-select: none;
}
.sidebar-event-loc {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--gold);
    font-size: var(--fs-2xs);
    font-weight: 600;
    line-height: 1.2;
    order: 1;
    min-width: 0;
}
.sidebar-event-loc i { color: var(--gold); font-size: 1em; flex-shrink: 0; }
.sidebar-event-loc-flag { font-size: 1em; flex-shrink: 0; }
.sidebar-event-loc-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

/* ── City Hub Media Widget ── */
.city-media-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}
.city-media-thumb {
    display: block;
    aspect-ratio: 1;
    border-radius: 6px;
    overflow: hidden;
    background: var(--bg-card);
}
.city-media-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}
.city-media-thumb:hover img {
    transform: scale(1.05);
}
  

/* ── Hashtag pills ─────────────────────────────── */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.hashtag-pill {
    display: inline-block;
    background: rgba(177,164,145,0.08);
    border: 1px solid rgba(177,164,145,0.25);
    color: #b1a491;
    border-radius: 20px;
    padding: 2px 10px;
    font-size: var(--fs-2xs);
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: background 0.15s, border-color 0.15s;
}
.hashtag-pill:hover {
    background: rgba(177,164,145,0.18);
    border-color: rgba(177,164,145,0.5);
    color: #b1a491;
}

/* ── X-style 3-column layout ─────────────────────────────── */
.x-layout {
    display: flex;
    justify-content: center;
    min-height: 100vh;
    max-width: 1380px;
    margin: 0 auto;
}

/* Wide layout variant — 1500px outer (used on most pages going forward) */
.x-layout.x-layout-wide { max-width: 1500px; }

/* ── Sitewide page header bar (60px, matches left logo + right-top) ───── */
.x-page-header {
    position: sticky;
    top: 0;
    z-index: 45;
    height: 60px;
    box-sizing: border-box;
    border-bottom: 1px solid var(--bg-elevated);
    background: rgba(14,17,19,0.62);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 0 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.x-page-header-left,
.x-page-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.x-page-header-right { flex-shrink: 0; }
.x-page-title {
    font-family: 'Smooch Sans', sans-serif;
    font-size: 1.85rem;
    font-weight: 750;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--text-primary);
    line-height: 1;
    margin: 0;
}
@media (max-width: 540px) {
    .x-page-header { padding: 0 12px; }
    .x-page-title { font-size: 1.45rem; }
}

/* LEFT COLUMN */
.x-left {
    width: 240px;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    overflow-x: clip;
    border-left: 1px solid var(--bg-elevated);
    border-right: 1px solid var(--bg-elevated);
    display: flex;
    flex-direction: column;
    padding: 0;
    box-sizing: border-box;
}
.x-left::-webkit-scrollbar { display: none; }
.x-logo-link {
    display: flex;
    align-items: center;
    height: 60px;
    box-sizing: border-box;
    padding: 0 16px;
    border-bottom: 1px solid var(--bg-elevated);
    flex-shrink: 0;
    position: relative;
}
.x-logo-img {
    height: 36px;
    width: auto;
    display: block;
}
.x-logo-tooltip {
    position: absolute;
    left: 16px;
    right: 16px;
    top: calc(100% + 2px);
    transform: translateY(-4px);
    z-index: 30;
    width: auto;
    max-width: none;
    padding: 9px 12px;
    border: 1px solid var(--bg-elevated);
    border-radius: 9px;
    background: #050607;
    box-shadow: 0 10px 28px rgba(0,0,0,.42);
    color: var(--text-primary);
    font-size: var(--fs-xs);
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .14s ease 1.5s, transform .14s ease 1.5s;
}
.x-logo-tooltip::before {
    content: "";
    position: absolute;
    left: 18px;
    top: -6px;
    width: 10px;
    height: 10px;
    transform: rotate(45deg);
    background: #050607;
    border-left: 1px solid var(--bg-elevated);
    border-top: 1px solid var(--bg-elevated);
}
.x-logo-link:hover .x-logo-tooltip,
.x-logo-link:focus-visible .x-logo-tooltip {
    opacity: 1;
    transform: translateY(0);
}
.x-layout .sidebar-nav-list a:not(.nav-post-btn),
.x-layout .sidebar-nav-list .sidebar-more-toggle {
    font-size: 16px !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}
/* Full-width sidebar: badge sits on top-right corner of the icon.
   Nav links have padding-left:16px (from .sidebar-list li a), so
   icon starts at left:16px. Badge at left:30px = 14px into the 24px icon. */
.x-layout .sidebar-nav-list .nav-badge {
    position: absolute;
    top: 4px;
    left: 30px;
    right: auto;
    margin-left: 0;
    flex-shrink: 0;
}
.x-layout .left-sidebar {
    position: static !important;
    top: auto !important;
    width: auto !important;
    height: 100% !important;
    background: transparent !important;
    border: none !important;
    padding: 8px 4px !important;
    flex: 1;
    overflow-y: hidden !important;
}

/* CENTER COLUMN */
.x-center {
    flex: 1;
    min-width: 0;
    max-width: 715px;
    border-right: 1px solid var(--bg-elevated);
}
.x-center.x-center-wide {
    max-width: 1000px;
    width: 100%;
}
.x-center .main-feed {
    max-width: 100%;
    width: 100%;
    padding: 0;
}
.x-center .post,
.x-center > * {
    margin-left: 0;
    margin-right: 0;
}

/* RIGHT COLUMN */
.x-right {
    width: 310px;
    flex-shrink: 0;
    padding: 0 8px 0 8px;
    box-sizing: border-box;
    border-right: 1px solid var(--bg-elevated);
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
}
.x-right::-webkit-scrollbar { display: none; }

/* ── Feed tab bar ─────────────────────────────────────────── */
.feed-tabs-bar {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid var(--bg-elevated);
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(14,17,19,0.96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    min-height: 60px;
}
.feed-tabs-left {
    display: flex;
    align-items: stretch;
    flex: 1;
}
.feed-tabs-right {
    display: flex;
    align-items: center;
    padding: 0 14px;
    flex-shrink: 0;
}
.feed-tabs-locfilter {
    display: flex;
    align-items: center;
    padding-left: 4px;
    border-left: 1px solid var(--bg-elevated);
    margin-left: 4px;
}
.feed-tabs-mid {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 10px;
}
.feed-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 16px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: var(--fs-sm);
    font-weight: 700;
    letter-spacing: 0.03em;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    position: relative;
    bottom: -1px;
    transition: background 0.15s, color 0.15s;
}
.feed-tab:hover {
    background: rgba(255,255,255,0.05);
    color: #d0d8e8;
    text-decoration: none;
}
.feed-tab.is-active {
    color: var(--text-primary);
    border-bottom-color: #c5ac67;
}
.feed-create-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: var(--btn-dark);
    border: 1px solid var(--text-dim);
    border-radius: 999px;
    color: var(--text-primary);
    font-weight: 700;
    font-size: var(--fs-sm);
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}
.feed-create-btn:hover {
    background: var(--btn-dark);
    color: var(--text-primary);
}

/* ── Content-type filter pills (All / Posts / Media) ────── */
.feed-type-bar {
    display: flex;
    gap: 6px;
    padding: 12px 16px;
    border-bottom: 1px solid #1e2633;
    background: #0a0f17;
}
.feed-type-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: var(--fs-xs);
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-card);
    border: 1px solid var(--bg-elevated);
    text-decoration: none;
    transition: all 0.15s;
}
.feed-type-pill:hover {
    color: var(--text-body);
    border-color: var(--btn-dark);
    text-decoration: none;
}
.feed-type-pill.is-active {
    background: var(--gold);
    color: var(--bg-card);
    border-color: var(--gold);
}
.feed-type-pill i { font-size: 1em; }

/* ── Right col top bar ───────────────────────────────────── */
.x-right-top {
    position: sticky;
    top: 0;
    background: var(--bg-page);
    padding: 0;
    height: 60px;
    box-sizing: border-box;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--bg-elevated);
    margin-bottom: 4px;
}
.x-search-form {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}
.x-search-input {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--bg-elevated);
    border-radius: 999px;
    padding: 9px 16px 9px 36px;
    color: var(--text-primary);
    font-size: var(--fs-sm);
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s;
}
.x-search-input:focus { border-color: #c5ac67; }
.x-search-input::placeholder { color: #606878; }
.x-search-icon {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    color: #606878;
    font-size: 1em;
    pointer-events: none;
}
.x-avatar-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s;
    position: relative;
}
.x-avatar-btn:hover { border-color: #c5ac67; }
.x-avatar-btn:hover .x-avatar-dropdown,
.x-avatar-dropdown:hover { display: block; }
.x-avatar-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 50%;
    overflow: hidden;
}
.x-avatar-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    background: #181a1b;
    border: 1px solid var(--bg-elevated);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.55);
    min-width: 190px;
    z-index: 200;
    padding: 6px 0;
}
/* Invisible hover bridge so the mouse can cross the gap without the menu closing */
.x-avatar-dropdown::before {
    content: "";
    position: absolute;
    top: -12px;
    left: 0;
    right: 0;
    height: 12px;
}
.x-avatar-dropdown a {
    display: block;
    padding: 10px 18px;
    color: var(--text-body);
    text-decoration: none;
    font-size: var(--fs-sm);
    border-bottom: 1px solid #242424;
}
.x-avatar-dropdown a:last-child { border-bottom: none; }
.x-avatar-dropdown a:hover { background: var(--bg-card); color: var(--gold); }
.x-login-links { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.x-login-links a { font-size: var(--fs-xs); white-space: nowrap; }

/* ── Post styles inside x-layout ─────────────────────────── */
.x-center .post { background: var(--bg-card); }
.x-center .x2-actions {
    display: flex;
    align-items: center;
    gap: 25px;
    flex-wrap: nowrap;
}
.x-center .x2-actions .vote-controls,
.x-center .x2-actions .vote-btn,
.x-center .x2-actions .bookmark-btn,
.x-center .x2-actions .post-comment-count,
.x-center .x2-actions .rxn-summary-btn { font-size: var(--fs-2xs); }
.x-center .x2-actions .vote-btn { padding: 5px 8px; }
.x-center .x2-actions .reaction-bar { font-size: 1em; }

/* Unified action buttons in the home feed AND post page:
   React, Comment, Bookmark, Share — same height, padding, border, gold color. */
.x-center .x2-actions .rxn-summary-btn,
.x-center .x2-actions .bookmark-btn,
.x-center .x2-actions .post-comment-count,
.x-center .x2-actions .share-trigger-btn {
    padding: 7px 14px;
    min-height: 32px;
    box-sizing: border-box;
    border-color: var(--btn-dark);
    color: var(--gold);
}
.x-center .x2-actions .rxn-summary-btn:hover,
.x-center .x2-actions .bookmark-btn:hover,
.x-center .x2-actions .post-comment-count:hover,
.x-center .x2-actions .share-trigger-btn:hover {
    border-color: var(--gold);
    color: var(--gold);
    background: var(--bg-elevated);
}
.x-center .x2-actions .post-comment-count i,
.x-center .x2-actions .bookmark-btn i,
.x-center .x2-actions .share-trigger-btn i {
    font-size: 14px;
}
.x-center .x2-actions .x2-tags {
    margin-left: auto;
    margin-bottom: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}
.x-center .x2-tags a { font-size: var(--fs-sm); padding: 2px 8px; }
.x-center .post-author-row { gap: 22px !important; }
.x-center .post-author-row .post-date { font-size: var(--fs-xs); color: var(--text-muted); }

/* Override sidebars inside x-layout */
.x-layout .right-sidebar {
    position: static !important;
    top: auto !important;
    padding: 0 !important;
    border: none !important;
    width: 100% !important;
    box-sizing: border-box !important;
}
.x-layout .sidebar-divider {
    margin-left: -8px !important;
    margin-right: -8px !important;
}

/* Search suggestions (right col) */
.x-search-suggestions {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--bg-elevated);
    border-radius: 14px;
    box-shadow: 0 12px 28px rgba(0,0,0,0.3);
    overflow: hidden;
    z-index: 300;
}
.x-search-suggestions a {
    display: block;
    padding: 10px 14px;
    color: var(--text-primary);
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    font-size: var(--fs-sm);
}
.x-search-suggestions a:last-child { border-bottom: none; }

/* ── Post content (markdown rendered) ────────────────────────── */
.post-content { color: var(--text-body); font-size: 1.0em; line-height: 1.78; }
.post-content .pc-p  { margin: 0 0 1.1em; }
.post-content .pc-p:last-child { margin-bottom: 0; }
.post-content .pc-h2 {
    font-size: 1.35em; font-weight: 700; color: #f0f0f0;
    margin: 1.8em 0 0.55em; padding-top: 0.5em;
    border-top: 1px solid var(--bg-elevated);
}
.post-content .pc-h3 {
    font-size: 1.25em; font-weight: 700; color: var(--text-body);
    margin: 1.4em 0 0.4em;
}
.post-content .pc-h2:first-child,
.post-content .pc-h3:first-child { margin-top: 0; border-top: none; }
.post-content .pc-quote {
    border-left: 3px solid var(--gold);
    margin: 1em 0; padding: 8px 16px;
    color: var(--text-muted); font-style: italic;
    background: rgba(233,200,152,0.04);
    border-radius: 0 4px 4px 0;
}
.post-content .pc-list {
    margin: 0.6em 0 1em 1.4em; padding: 0;
}
.post-content .pc-list li { margin-bottom: 0.35em; }
.post-content .pc-hr {
    border: none; border-top: 1px solid var(--bg-elevated);
    margin: 1.8em 0;
}
.post-content strong { color: #e8e8e8; }
.post-content em     { font-style: italic; }

/* ── Compose format toolbar ───────────────────────────────────── */
.compose-tb-divider { width: 1px; height: 18px; background: var(--bg-elevated); margin: 0 2px; align-self: center; }
.compose-fmt-hint   { font-size: var(--fs-2xs); color: var(--btn-dark); padding: 0 6px; letter-spacing: 0.01em; }
.x-search-suggestions a:hover { background: var(--bg-elevated); }

/* ═══════════════════════════════════════════════════════════════
   X-LAYOUT RESPONSIVE BREAKPOINTS
   Total columns: x-left(240) + x-center(max 715) + x-right(310) = 1265px
   ═══════════════════════════════════════════════════════════════ */

/* Circle logo: hidden by default, shown at narrow breakpoints */
.x-logo-icon { display: none; height: 36px; width: auto; }

/* Mobile profile photo nav item: hidden on desktop, shown on mobile */
.nav-item-mobile-profile { display: none; }

/* ── Suppress old sidebar media queries inside x-layout ─────── */
/* Old rules at ≤1440px hide .nav-label and collapse sidebar width;
   old rules at ≤1323px hide .left-sidebar entirely. Both must be
   cancelled inside the new layout until our own BPs take over.  */
@media (max-width: 1440px) {
    .x-layout .sidebar-nav-list .nav-label { display: unset; }
    .x-layout .sidebar-nav-list li         { margin: 1px 0; } /* cancel old 6px margin */
    .x-layout .sidebar-nav-list li a:not(.nav-post-btn) { justify-content: flex-start !important; gap: 10px !important; padding-left: 16px !important; }
    .x-layout .sidebar-nav-list .nav-icon  { font-size: 27px; } /* cancel old 30px */
    .x-layout .left-sidebar .sidebar-section:not(:first-child):not(.sidebar-section-nav),
    .x-layout .left-sidebar .sidebar-divider { display: block; }
    .x-layout .left-sidebar .sidebar-section-nav { display: flex; flex-direction: column; }
    .x-layout .left-sidebar .sidebar-heading { display: block; }
}
@media (max-width: 1323px) {
    .x-layout .left-sidebar { display: flex !important; }
}

/* ── BP1: ≤1280px — icons-only left bar ─────────────────────── */
@media (max-width: 1280px) {
    .x-left { width: 68px !important; }
    /* The logo is now a <picture> element with a <source media> that swaps to
       tb-icon.webp at this breakpoint — only ONE <img> exists in DOM, so we
       no longer need to display:none one of two img tags here. The <img>
       always has class .x-logo-img; the swap happens at the markup level.
       We DO need to constrain the icon-mode img to a 36×36 square so it
       doesn't try to render at the wider logo's intrinsic ratio. */
    .x-logo-img  { width: 36px !important; height: 36px !important; object-fit: contain; }
    .x-logo-link { display: flex !important; justify-content: center; padding: 0 8px; height: 60px; }
    .x-logo-tooltip { display: none; }

    .x-layout .left-sidebar .sidebar-section-resources,
    .x-layout .left-sidebar .sidebar-section-invite,
    .x-layout .left-sidebar .sidebar-divider  { display: none !important; }
    .x-layout .left-sidebar .sidebar-heading  { display: none !important; }
    .x-layout .sidebar-nav-list .nav-label    { display: none !important; }
    .x-layout .sidebar-nav-list li a:not(.nav-post-btn) {
        justify-content: center !important;
        padding: 10px 8px !important;
        gap: 0 !important;
    }
    .x-layout .sidebar-nav-list .nav-icon { font-size: 26px !important; width: auto !important; }
    .x-layout .sidebar-nav-list .nav-badge {
        position: absolute; top: 4px; left: auto; right: 10px; margin-left: 0;
        min-width: 14px; height: 14px; font-size: 9px; line-height: 14px; padding: 0 3px;
    }
    .x-layout .sidebar-more-toggle { display: none !important; }
    /* Post button: gold circle with centered pencil icon */
    .x-layout .sidebar-nav-list .nav-post-btn {
        width: 46px !important;
        height: 46px !important;
        padding: 0 !important;
        border-radius: 50% !important;
        margin: 10px auto 4px !important;
    }
    .x-layout .sidebar-nav-list .nav-post-btn .nav-icon {
        display: inline-flex !important;
        font-size: 1.5rem !important;
        color: var(--bg-card);
    }
}

/* ── BP2: ≤1090px — hide right sidebar ──────────────────────── */
@media (max-width: 1090px) {
    .x-right { display: none !important; }
}

/* ── BP3: ≤768px — x-left becomes horizontal mobile top bar ─── */
@media (max-width: 768px) {
    div.x-layout > div.x-right,
    #xRightCol {
        display: none !important;
        position: static !important;
        width: 0 !important;
        min-width: 0 !important;
        flex: 0 0 0 !important;
        overflow: hidden !important;
        padding: 0 !important;
        border: none !important;
    }
    .x-layout {
        flex-direction: column;
        padding-top: 56px;
        max-width: 100%;
        width: 100%;
        margin: 0;
    }
    .x-left {
        position: fixed !important;
        top: 0; left: 0; right: 0;
        width: 100% !important;
        height: 56px;
        flex-direction: row;
        align-items: center;
        border-right: none;
        border-left: none;
        border-bottom: 1px solid var(--bg-elevated);
        overflow: visible;
        z-index: 500;
        padding: 0 4px;
        background: var(--bg-page);
    }
    .x-left { justify-content: flex-end; padding-right: 8px; }
    /* Mobile top bar owns the logo — hide the one from header2.php */
    .x-logo-link { display: none !important; }
    .x-logo-icon { height: 30px !important; width: 30px !important; object-fit: contain; }
    .x-layout .left-sidebar {
        display: flex !important;
        position: static !important;
        flex-direction: row !important;
        align-items: center;
        flex: 1 1 0;
        width: auto !important;
        overflow: visible;
        padding: 0 !important;
        min-width: 0;
    }
    .x-layout .left-sidebar .sidebar-section {
        display: flex !important;
        flex-direction: row;
        align-items: center;
    }
    .x-layout .left-sidebar .sidebar-section-nav,
    .x-layout .left-sidebar .sidebar-section-resources,
    .x-layout .left-sidebar .sidebar-divider { display: none !important; }
    .x-layout .left-sidebar .sidebar-heading { display: none !important; }
    .x-layout .sidebar-nav-list {
        display: flex !important;
        flex-direction: row !important;
        align-items: center;
        justify-content: center;
        margin: 0 !important; padding: 0 !important;
    }
    .x-layout .sidebar-nav-list li { margin: 0 !important; }
    .x-layout .sidebar-nav-list li a {
        padding: 0 8px !important;
        height: 56px;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0 !important;
    }
    .x-layout .sidebar-nav-list .nav-label { display: none !important; }
    .x-layout .sidebar-nav-list .nav-icon { font-size: 26px !important; width: auto !important; }
    .x-layout .sidebar-nav-list .nav-badge {
        position: absolute; top: 2px; right: 2px; margin-left: 0;
        min-width: 12px; height: 12px; font-size: 8px; line-height: 12px; padding: 0 2px;
    }
    .x-layout .sidebar-more-toggle { display: none !important; }
    /* Hide redundant/overflow icons — they move into the profile photo dropdown */
    .x-layout .nav-item-home    { display: none !important; }
    .x-layout .nav-item-admin   { display: none !important; }
    .x-layout .nav-item-explore { display: none !important; }
    .x-layout .nav-item-events  { display: none !important; }
    .x-layout .nav-item-profile { display: none !important; }
    .x-layout .nav-item-bookmarks { display: none !important; }
    /* Show mobile profile photo as the last nav item, in the flex flow */
    .x-layout .nav-item-mobile-profile {
        display: flex !important;
        align-items: center;
        position: relative;
        flex-shrink: 0;
    }
    /* Profile photo button — same height/padding as icon links */
    .nav-mobile-photo-btn {
        background: none;
        border: none;
        padding: 0 8px;
        cursor: pointer;
        display: flex;
        align-items: center;
        height: 56px;
    }
    .nav-mobile-photo-img {
        width: 28px;
        height: 28px;
        border-radius: 50%;
        object-fit: cover;
        border: 2px solid var(--text-dim);
    }
    /* Dropdown menu */
    .x-mobile-menu {
        position: absolute;
        top: calc(100% + 6px);
        right: 0;
        background: var(--bg-card);
        border: 1px solid var(--bg-elevated);
        border-radius: 10px;
        min-width: 190px;
        z-index: 1000;
        box-shadow: 0 8px 24px rgba(0,0,0,0.6);
        overflow: hidden;
    }
    .x-mobile-menu[hidden] { display: none; }
    .x-mobile-menu-item {
        display: block;
        padding: 12px 16px;
        color: var(--text-body);
        text-decoration: none;
        font-size: var(--fs-sm);
        border-bottom: 1px solid var(--bg-elevated);
    }
    .x-mobile-menu-item:last-child { border-bottom: none; }
    .x-mobile-menu-item:hover { background: var(--bg-elevated); color: var(--gold); }
    .x-mobile-menu-sep { height: 1px; background: var(--bg-elevated); margin: 2px 0; }
    .x-mobile-menu-logout { color: var(--text-muted); }

    .x-center { max-width: 100%; width: 100%; overflow-x: clip; }
    .x-right  { display: none !important; }
    /* Hide region tabs on mobile — too crowded */
    .feed-tabs-right { display: none !important; }
    /* Center Posts/FieldLogs/Following + Create Post as a unit */
    .feed-tabs-bar { justify-content: center; gap: 0; top: 56px; min-height: 0; }
    .author-card, .city-card { display: none !important; }
    .feed-tabs-mid { flex: 0 0 auto; padding: 8px 6px; }
    .feed-tab { font-size: var(--fs-ui); padding: 10px 12px; }
    /* Profile tab row: swipe horizontally, don't expand page */
    .profile-tab-row { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
    .profile-tab-row::-webkit-scrollbar { display: none; }
    /* Mobile nav bar wrapper — fills the full top bar */
    .mobile-nav-bar {
        display: flex;
        align-items: center;
        padding: 0 4px;
        height: 100%;
        position: relative;
        flex: 1 1 0;
        min-width: 0;
    }
    /* Left cluster: logo + search icon */
    .mob-bar-left {
        display: flex;
        align-items: center;
        gap: 2px;
        flex: 0 0 auto;
    }
    .mob-bar-logo-link {
        display: flex;
        align-items: center;
        text-decoration: none;
        flex-shrink: 0;
        padding: 0 2px;
    }
    .mob-bar-logo-icon {
        width: 30px;
        height: 30px;
        object-fit: contain;
        display: block;
    }
    .mob-bar-search-btn {
        background: none;
        border: none;
        color: var(--text-muted);
        font-size: 22px;
        cursor: pointer;
        padding: 4px 6px;
        display: flex;
        align-items: center;
        flex-shrink: 0;
        line-height: 1;
    }
    /* Center: location filter — absolutely covers full width, flex-centered.
       NO transform here: CSS transforms on positioned ancestors create a new
       containing block for position:fixed descendants, breaking iOS Safari. */
    .mob-bar-center {
        position: absolute;
        left: 0; right: 0; top: 0; bottom: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        pointer-events: none;
    }
    .mob-bar-center > * { pointer-events: auto; }
    .mob-bar-center .locfilter-pill {
        padding: 5px 12px;
        gap: 5px;
        border-radius: 18px;
        font-size: 0.82rem;
    }
    .mob-bar-center .locfilter-label {
        max-width: 80px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .mob-bar-center .locfilter-panel {
        z-index: 9999 !important;
    }
    /* Right cluster: hamburger + profile circle */
    .mob-bar-right {
        display: flex;
        align-items: center;
        gap: 4px;
        margin-left: auto;
        flex: 0 0 auto;
    }
    .mob-bar-profile-link {
        display: flex;
        align-items: center;
        text-decoration: none;
        flex-shrink: 0;
    }
    .mob-bar-profile-ring {
        position: relative;
        width: 32px;
        height: 32px;
        display: block;
        flex-shrink: 0;
    }
    .mob-bar-profile-ring svg {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
    }
    .mob-bar-profile-img {
        position: absolute;
        inset: 3px;
        width: calc(100% - 6px);
        height: calc(100% - 6px);
        border-radius: 50%;
        object-fit: cover;
        display: block;
        border: 1.5px solid var(--bg-page);
        box-sizing: border-box;
    }
    .mob-bar-profile-ring:not(.has-story) .mob-bar-profile-img {
        position: static;
        inset: auto;
        width: 32px;
        height: 32px;
        border-radius: 50%;
        border: 2px solid var(--bg-elevated);
    }
    .mobile-hamburger {
        background: none;
        border: none;
        color: var(--text-muted);
        font-size: 26px;
        cursor: pointer;
        padding: 4px;
        display: flex;
        align-items: center;
        flex-shrink: 0;
        line-height: 1;
    }
    /* Hide old icon nav on mobile — everything moves to drawer */
    .x-layout .sidebar-section { display: none !important; }
    .x-layout .sidebar-divider { display: none !important; }
    /* Drawer overlay */
    .mobile-drawer-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.55);
        z-index: 998;
    }
    .mobile-drawer-overlay.is-open { display: block; }
    /* Drawer panel */
    .mobile-drawer {
        position: fixed;
        top: 0; right: 0; bottom: 0;
        width: 320px;          /* was 280px — bumped to ~82% on typical phone */
        max-width: 88vw;
        background: var(--bg-input);
        border-left: 1px solid var(--bg-elevated);
        z-index: 999;
        transform: translateX(100%);
        transition: transform 0.22s ease;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
    }
    .mobile-drawer.is-open { transform: translateX(0); }
    .mobile-drawer-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px 16px 12px;
        border-bottom: 1px solid var(--bg-card);
    }
    .mobile-drawer-title { font-weight: 700; color: var(--text-primary); font-size: 1em; letter-spacing: 0.04em; }
    .mobile-drawer-close {
        background: none; border: none; color: var(--text-dim); font-size: 22px;
        cursor: pointer; padding: 4px; display: flex; align-items: center;
    }
    .mobile-drawer-nav { padding: 8px 0; }
    .mobile-drawer-item {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 16px 20px;                                       /* +4px top + bottom */
        color: var(--text-muted);
        text-decoration: none;
        font-size: 1rem;                                          /* was --fs-sm (~0.9em) */
        font-weight: 600;
        border-bottom: 1px solid rgba(255,255,255,0.05);          /* divider between rows */
        transition: background 0.1s, color 0.1s;
    }
    .mobile-drawer-item:last-child { border-bottom: none; }
    .mobile-drawer-item i { font-size: var(--fs-title); width: 20px; text-align: center; flex-shrink: 0; }
    .mobile-drawer-item:hover, .mobile-drawer-item.is-active { background: rgba(255,255,255,0.05); color: var(--text-primary); }
    .mobile-drawer-item.is-active { color: var(--gold); }
    .mobile-drawer-sep { border-top: 1px solid var(--bg-card); margin: 6px 0; }
    .mobile-drawer-badge {
        margin-left: auto;
        background: var(--gold);
        color: #000;
        font-size: var(--fs-2xs);
        font-weight: 700;
        padding: 1px 6px;
        border-radius: 99px;
    }
    .mobile-drawer-logout { color: #884444; }
    .mobile-drawer-logout:hover { color: #ff7b7b; }
    /* Event cards: stack vertically, photo on top full-width */
    .event-card { flex-direction: column; }
    .event-card-photo { width: 100%; aspect-ratio: 16 / 7; }
}

/* ── Comment Bubbles ─────────────────────────────────────────────────────── */
.comment-bubble {
    margin-bottom: 12px;
}
.comment-depth-1 {
    margin-left: 40px;
    padding-left: 12px;
    border-left: 2px solid var(--bg-elevated);
}
.comment-depth-2 {
    margin-left: 40px;
    padding-left: 12px;
    border-left: 2px solid var(--bg-card);
}
.nested-comments {
    margin-top: 8px;
}
.comment-bubble-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.comment-bubble-avatar img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    display: block;
}
.comment-bubble-body {
    flex: 1;
    min-width: 0;
    background: var(--bg-card);
    border: 1px solid var(--bg-elevated);
    border-radius: 12px;
    padding: 10px 14px;
}
.comment-bubble-meta {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}
.comment-bubble-name {
    font-size: var(--fs-sm);
}
.comment-bubble-name:hover { text-decoration: none; }
.comment-bubble-time {
    color: var(--text-dim);
    font-size: var(--fs-2xs);
}
.comment-bubble-text {
    color: var(--text-body);
    font-size: var(--fs-sm);
    line-height: 1.5;
    word-break: break-word;
}
/* Comment context menu */
.comment-ctx-menu {
    position: fixed;
    z-index: 9000;
    background: var(--bg-card);
    border: 1px solid var(--bg-elevated);
    border-radius: 10px;
    padding: 6px;
    min-width: 150px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
.comment-ctx-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    background: none;
    border: none;
    color: var(--text-body);
    font-size: var(--fs-xs);
    font-weight: 500;
    padding: 9px 14px;
    border-radius: 7px;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    transition: background 0.1s, color 0.1s;
}
.comment-ctx-item:hover { background: rgba(255,255,255,0.07); color: var(--text-primary); }
.comment-ctx-delete { color: #884444; }
.comment-ctx-delete:hover { background: rgba(255,60,60,0.1); color: #ff7b7b; }
.comment-rxn-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
    min-height: 0;
}
.rxn-chip {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px 2px 5px;
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-body);
    font-size: var(--fs-xs);
    cursor: pointer;
    font-family: inherit;
    transition: background 0.1s, border-color 0.1s;
    line-height: 1.4;
}
.rxn-chip:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.2); }
.rxn-chip.is-mine {
    background: rgba(233,200,152,0.12);
    border-color: rgba(233,200,152,0.45);
    color: var(--gold);
}
.comment-ctx-reactions {
    display: flex;
    gap: 2px;
    padding: 6px 6px 4px;
    justify-content: space-between;
}
.ctx-rxn-btn {
    background: none;
    border: none;
    font-size: 1.35em;
    padding: 5px 7px;
    border-radius: 7px;
    cursor: pointer;
    line-height: 1;
    transition: background 0.1s, transform 0.1s;
}
.ctx-rxn-btn:hover  { background: rgba(255,255,255,0.1); transform: scale(1.2); }
.ctx-rxn-btn.is-active { background: rgba(233,200,152,0.18); outline: 1px solid rgba(233,200,152,0.4); }
.comment-ctx-sep { height: 1px; background: var(--bg-elevated); margin: 4px 2px; }

/* @mention links in comments */
a.mention {
  font-weight: 600;
  text-decoration: none;
  border-radius: 3px;
  padding: 0 2px;
}
a.mention:hover { text-decoration: underline; }
a.mention.mention-user    { color: var(--gold); }
a.mention.mention-city    { color: #7ecfcf; }
a.mention.mention-country { color: #9dbf7e; }
span.mention.mention-everyone {
  color: var(--gold);
  font-weight: 700;
  background: rgba(233,200,152,0.08);
  border-radius: 3px;
  padding: 0 3px;
}

/* ── Username link — consistent across the whole site ─────────────────────── */
.tb-username {
  color: var(--text-body);
  font-weight: 650;
  font-size: 15px;
  text-decoration: none;
  transition: color 0.25s;
}
.tb-username:hover {
  color: var(--gold);
  text-decoration: none;
}

/* @username handle — sits underneath the display name, darker gray */
.tb-username-handle {
  color: var(--text-dim);
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  line-height: 1.2;
}

/* Two-line stacked author block: top = display name + elite badge,
   bottom = @username. Sits centered next to the avatar. */
.tb-author-stack {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
  line-height: 1.25;
}
.tb-author-stack-top {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}
.tb-author-stack-bottom {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: -1px;
}

/* Subtle dot separator between meta items in the post author row */
.tb-meta-dot {
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1;
}

/* Sibling of the avatar+stack block — holds " · 3 days ago " on a single
   line, vertically centered with the profile photo. */
.post-date-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: var(--fs-sm);
  white-space: nowrap;
}

/* Elite verified badge */
.elite-badge {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  position: relative;
  top: -1px;
  line-height: 1;
  text-decoration: none;
}
.elite-badge i {
  font-size: 1.2em;
  background: linear-gradient(135deg, #ECC890 0%, #7C5B45 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  transition: filter 0.15s;
}
.elite-badge:hover i {
  filter: brightness(1.2);
}

/* ── Active Story Ring ──────────────────────────────────────────────────────
   Universal gradient ring used wherever a user or destination has an active
   story. Apply .story-ring to the wrapper element around the photo/avatar.
   The inner element (img, .dest-avatar, etc.) gets a 2px gap border so the
   gradient shows as a ring rather than filling the circle.
   ───────────────────────────────────────────────────────────────────────── */
.story-ring {
  display: inline-flex;
  padding: 3px;
  border-radius: 50%;
  background: linear-gradient(45deg, #F1C691 0%, #7C6641 50%, #E0AC6C 100%);
  flex-shrink: 0;
  cursor: pointer;
}
/* Inner element — the gap between ring and photo */
.story-ring > img,
.story-ring > .dest-avatar,
.story-ring > .x-profile-img,
.story-ring > [class*="avatar"],
.story-ring > [class*="photo"] {
  display: block;
  border-radius: 50%;
  border: 2px solid var(--bg-page);
}
/* When placed inside a card/panel, match the inner gap to the card bg */
.story-ring--on-card > img,
.story-ring--on-card > [class*="avatar"],
.story-ring--on-card > [class*="photo"] {
  border-color: var(--bg-card);
}
/* Size variants */
.story-ring--sm  { padding: 2px; }
.story-ring--sm  > * { border-width: 1.5px; }
.story-ring--lg  { padding: 4px; }
.story-ring--lg  > * { border-width: 3px; }
/* Animated pulse (optional — add .story-ring--pulse for subtle glow) */
@keyframes story-ring-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(236, 200, 144, 0.0); }
  50%       { box-shadow: 0 0 0 4px rgba(236, 200, 144, 0.3); }
}
.story-ring--pulse { animation: story-ring-pulse 2.5s ease-in-out infinite; }

/* ── YouTube Lightbox Modal ─────────────────────────────────────────────── */
.yt-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.50);
  z-index: 9990;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.yt-modal-box {
  position: relative;
  width: 100%;
  max-width: 1150px;
}
.yt-modal-close {
  position: absolute;
  top: -42px;
  right: 0;
  background: none;
  border: none;
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 6px;
  opacity: 0.75;
  transition: opacity 0.15s;
}
.yt-modal-close:hover { opacity: 1; }
.yt-modal-video {
  position: relative;
  padding-top: 56.25%;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
}
.yt-modal-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ── Story Composer Modal ───────────────────────────────────────────────── */
.tb-sc-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.50);
  z-index: 9991;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.tb-sc-modal {
  position: relative;
  width: 100%; max-width: 460px;
  background: var(--bg-card);
  border-radius: 14px;
  padding: 22px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  box-shadow: 0 14px 40px rgba(0,0,0,0.5);
}
.tb-sc-close {
  position: absolute; top: 10px; right: 10px;
  background: none; border: none; color: var(--text-muted);
  font-size: 22px; cursor: pointer; padding: 4px 6px;
}
.tb-sc-close:hover { color: var(--text-primary); }
.tb-sc-header { margin-bottom: 14px; padding-right: 28px; }
.tb-sc-title { font-size: 17px; font-weight: 600; color: var(--text-primary); }
.tb-sc-sub   { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.tb-sc-preview {
  display: block; position: relative;
  width: 100%;
  min-height: 180px;
  max-height: 30vh;
  background: var(--bg-input);
  border: 1px dashed var(--bg-elevated);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
}
.tb-sc-preview img, .tb-sc-preview video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  background: #000;
}
.tb-sc-preview-empty {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; color: var(--text-muted); font-size: 13px;
  pointer-events: none;
}
.tb-sc-preview-empty i { font-size: 36px; color: var(--text-dim); }
.tb-sc-error {
  margin-top: 10px; padding: 8px 12px;
  background: rgba(224, 82, 82, 0.12); border: 1px solid var(--red);
  border-radius: 6px; color: var(--red); font-size: 13px;
}
.tb-sc-actions {
  display: flex; gap: 10px; justify-content: flex-end;
  margin-top: 14px;
}
.tb-sc-btn {
  padding: 8px 18px; border-radius: 999px;
  font-size: 14px; font-weight: 600;
  border: none; cursor: pointer;
  text-decoration: none; display: inline-flex; align-items: center;
}
.tb-sc-btn-ghost { background: transparent; color: var(--text-body); border: 1px solid var(--bg-elevated); }
.tb-sc-btn-ghost:hover { background: var(--bg-elevated); }
.tb-sc-btn-gold  { background: var(--gold); color: #13181d; }
.tb-sc-btn-gold:disabled { opacity: 0.45; cursor: not-allowed; }
.tb-sc-confirm {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.65);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  padding: 18px;
}
.tb-sc-confirm-card {
  background: var(--bg-card); border-radius: 10px;
  padding: 18px; max-width: 380px;
}
.tb-sc-confirm-title { font-weight: 600; font-size: 15px; margin-bottom: 8px; color: var(--text-primary); }
.tb-sc-confirm-body  { font-size: 13px; color: var(--text-body); line-height: 1.45; margin-bottom: 14px; }
.tb-sc-confirm-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

/* Composer location picker */
.tb-sc-loc { margin-top: 12px; }
.tb-sc-loc-add {
  background: transparent; border: 1px dashed var(--bg-elevated);
  color: var(--text-muted); font-size: 13px;
  padding: 8px 14px; border-radius: 999px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
}
.tb-sc-loc-add:hover { color: var(--gold); border-color: var(--gold); }
.tb-sc-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--bg-elevated); color: var(--text-primary);
  padding: 6px 6px 6px 12px; border-radius: 999px; font-size: 13px;
}
.tb-sc-pill i { color: var(--gold); }
.tb-sc-pill-x {
  background: rgba(255,255,255,0.08); border: none;
  color: var(--text-muted); width: 20px; height: 20px;
  border-radius: 50%; cursor: pointer; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
}
.tb-sc-pill-x:hover { background: var(--red); color: #fff; }
.tb-sc-loc-search {
  margin-top: 10px; background: var(--bg-input); border: 1px solid var(--bg-elevated);
  border-radius: 8px; padding: 8px;
}
.tb-sc-loc-input {
  width: 100%; background: transparent; border: none;
  color: var(--text-primary); font-size: 14px; padding: 6px 8px;
  outline: none;
}
.tb-sc-loc-results { max-height: 200px; overflow-y: auto; margin-top: 6px; }
.tb-sc-loc-result {
  display: flex; align-items: center; gap: 8px; width: 100%;
  background: transparent; border: none; color: var(--text-body);
  font-size: 13px; padding: 8px 10px; text-align: left; cursor: pointer;
  border-radius: 6px;
}
.tb-sc-loc-result:hover { background: var(--bg-elevated); }
.tb-sc-loc-result i { color: var(--gold); }
.tb-sc-loc-result-type {
  margin-left: auto; font-size: 10px; color: var(--text-dim);
  text-transform: uppercase;
}
.tb-sc-loc-empty { padding: 10px; color: var(--text-muted); font-size: 13px; text-align: center; }
.tb-sc-caption-wrap { margin-top: 12px; }
.tb-sc-caption-input {
  width: 100%;
  min-height: 76px;
  resize: vertical;
  background: var(--bg-input);
  border: 1px solid var(--bg-elevated);
  border-radius: 10px;
  color: var(--text-body);
  font-size: 14px;
  line-height: 1.45;
  padding: 10px 12px;
  box-sizing: border-box;
  font-family: inherit;
  outline: none;
}
.tb-sc-caption-input:focus { border-color: var(--gold); }
.tb-sc-caption-input::placeholder { color: var(--text-dim); }
.tb-sc-caption-meta {
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--text-muted);
  font-size: 12px;
}
.tb-sc-caption-count { color: var(--text-dim); }
.tb-sc-place-wrap {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}
.tb-sc-place-extra {
  display: grid;
  gap: 8px;
}
.tb-sc-place-url,
.tb-sc-place-label {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--bg-elevated);
  border-radius: 8px;
  color: var(--text-body);
  font-size: 13px;
  padding: 10px 12px;
  box-sizing: border-box;
  font-family: inherit;
  outline: none;
}
.tb-sc-place-url:focus,
.tb-sc-place-label:focus { border-color: var(--gold); }
.tb-sc-place-url::placeholder,
.tb-sc-place-label::placeholder { color: var(--text-dim); }
.tb-sc-place-note {
  color: var(--text-dim);
  font-size: 12px;
}

/* ── Story Viewer (lightbox) ────────────────────────────────────────────── */
.tb-sv-overlay {
  position: fixed;
  /* Constrain the modal to the safe area on iOS so the top header doesn't
     sit behind the notch and the bottom emoji bar doesn't get swallowed by
     Safari's URL bar / home indicator. Requires viewport-fit=cover (set in
     header2.php). Fallback to 0 on older browsers / non-notched devices. */
  top: env(safe-area-inset-top, 0px);
  right: env(safe-area-inset-right, 0px);
  bottom: env(safe-area-inset-bottom, 0px);
  left: env(safe-area-inset-left, 0px);
  background: #232323;
  z-index: 9992;
  display: flex; align-items: center; justify-content: center;
}
.tb-sv-shell {
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: min(1360px, 100vw - 60px);
  width: 100%;
  justify-content: center;
}
.tb-sv-rail {
  width: 336px;
  height: 620px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.tb-sv-rail-left { justify-content: flex-end; }
.tb-sv-rail-right { justify-content: flex-start; }
.tb-sv-rail-card {
  position: relative;
  width: 160px;
  height: 284px;
  border: none;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255,255,255,0.04);
  cursor: pointer;
  padding: 0;
  transform: scale(.95);
  opacity: .82;
}
.tb-sv-rail-card:hover { opacity: .95; transform: scale(.95); }
.tb-sv-rail-card.is-far {
  opacity: .62;
  transform: scale(.9);
}
.tb-sv-rail-card.is-far:hover {
  opacity: .78;
  transform: scale(.92);
}
.tb-sv-rail-media {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-color: #111;
  filter: saturate(.92) brightness(.78);
}
.tb-sv-rail-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.72) 0%, rgba(0,0,0,.18) 100%);
}
.tb-sv-rail-meta {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 16px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-align: left;
}
.tb-sv-rail-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(255,255,255,.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-size: 20px;
}
.tb-sv-rail-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tb-sv-rail-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.tb-sv-rail-name {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.15;
}
.tb-sv-rail-time {
  font-size: 12px;
  color: rgba(255,255,255,.8);
}
.tb-sv-stage {
  position: relative;
  width: 405px; height: 720px;
  max-width: 100vw; max-height: 100vh;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
}
.tb-sv-progress {
  position: absolute; top: 8px; left: 8px; right: 8px;
  display: flex; gap: 4px;
  z-index: 4;
}
.tb-sv-bar {
  flex: 1; height: 2px; background: rgba(255,255,255,0.3);
  border-radius: 999px; overflow: hidden;
}
.tb-sv-bar-fill { width: 0; height: 100%; background: #fff; }
.tb-sv-header {
  position: absolute; top: 18px; left: 12px; right: 12px;
  z-index: 3; color: #fff; font-size: 13px;
  /* Safe-area handling is on .tb-sv-overlay (the whole modal is inset to
     the safe zone), so we don't need to add env(safe-area-inset-top) here. */
}
.tb-sv-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.tb-sv-header-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
.tb-sv-author { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tb-sv-author-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
}
.tb-sv-author-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  text-decoration: none;
  min-width: 0;
  flex-wrap: wrap;
}
.tb-sv-author-link.is-static { cursor: default; }
.tb-sv-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(255,255,255,0.1); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.tb-sv-avatar img { width: 100%; height: 100%; object-fit: cover; }
.tb-sv-name { font-weight: 600; }
.tb-sv-time { color: rgba(255,255,255,0.65); font-size: 12px; }
.tb-sv-inline-location {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--gold);
  text-decoration: none;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
}
.tb-sv-inline-location i { font-size: 13px; }
.tb-sv-inline-location.is-static { cursor: default; }
.tb-sv-owner-link {
  color: rgba(255,255,255,0.74);
  text-decoration: none;
  font-size: 11px;
  line-height: 1.1;
  display: flex;
  align-items: center;
  gap: 3px;
}
.tb-sv-owner-link i { font-size: 11px; }
.tb-sv-author-link:hover .tb-sv-name,
.tb-sv-owner-link:hover { color: var(--gold); }

/* ── Segmented story ring SVG overlay ──────────────────────────── */
/* Drop storyRingSvg() output inside any ring container.           */
/* The container needs: position:relative; overflow:visible;       */
.tb-ring-svg {
  position: absolute;
  inset: -5px;
  width: calc(100% + 10px);
  height: calc(100% + 10px);
  pointer-events: none;
  overflow: visible;
  z-index: 1;
}
.tb-avatar-story {
  position: relative;
  display: inline-block;
  border-radius: 50%;
  overflow: visible;
  vertical-align: middle;
  line-height: 0;
  flex-shrink: 0;
  box-sizing: border-box;
}
.tb-avatar-story > img,
.tb-avatar-story > .tb-avatar-story-media {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
}
.tb-avatar-story > .tb-ring-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}
.tb-avatar-story.has-story > img,
.tb-avatar-story.has-story > .tb-avatar-story-media {
  position: absolute;
  inset: 8%;
  width: 84%;
  height: 84%;
  border: 2px solid var(--bg-page);
  background: var(--bg-elevated);
  /* border-box so the 2px border is inside the inset boundary — without this,
     any parent with overflow:hidden clips the bottom-right asymmetrically and
     the photo looks off-center inside the gold ring. */
  box-sizing: border-box;
}
/* Helper modifier: avatar fills its parent (used when parent controls dimensions). */
.tb-avatar-story.nav-mobile-full { width: 100%; height: 100%; }
.tb-sv-pause-btn {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 999px;
  background: rgba(0,0,0,0.35);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: 0 0 auto;
}
.tb-sv-pause-btn:hover { background: rgba(255,255,255,0.18); }
.tb-sv-pause-btn i { font-size: 16px; }
.tb-sv-owner-menu-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.tb-sv-menu-btn {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 999px;
  background: rgba(0,0,0,0.35);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.tb-sv-menu-btn:hover { background: rgba(255,255,255,0.18); }
.tb-sv-menu-btn i { font-size: 17px; }
.tb-sv-menu-btn .ph {
  font-size: 18px;
  line-height: 1;
  color: #fff;
}
.tb-sv-owner-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  padding: 8px;
  border-radius: 12px;
  background: rgba(20,20,20,.97);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 16px 32px rgba(0,0,0,.35);
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 8;
}
.tb-sv-owner-menu-item {
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.tb-sv-owner-menu-item:hover { background: rgba(255,255,255,.08); }
.tb-sv-owner-menu-item.is-danger { color: #ffb0b0; }
.tb-sv-owner-menu-item.is-danger:hover { background: rgba(255,120,120,.12); }
.tb-sv-media {
  position: absolute; top: 0; right: 0; left: 0; bottom: 88px; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  background: #000;
}
.tb-sv-media img, .tb-sv-media video {
  width: 100%; height: 100%; object-fit: contain;
  background: #000;
}
.tb-sv-tap-prev, .tb-sv-tap-next {
  position: absolute; top: 0; bottom: 0; width: 30%;
  z-index: 2; cursor: pointer;
}
.tb-sv-tap-prev { left: 0; }
.tb-sv-tap-next { right: 0; }
.tb-sv-close {
  position: absolute; top: 18px; right: 14px;
  background: none; border: none; color: #fff;
  font-size: 22px; cursor: pointer; z-index: 5;
  padding: 4px 6px; line-height: 1;
}
.tb-sv-arrow {
  position: relative;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,0.1); border: none;
  color: #fff; font-size: 20px; cursor: pointer;
  z-index: 5;
  display: flex; align-items: center; justify-content: center;
}
.tb-sv-arrow:hover { background: rgba(255,255,255,0.2); }
@media (max-width: 600px) {
  .tb-sv-shell { max-width: 100vw; gap: 0; }
  .tb-sv-rail { display: none; }
  .tb-sv-stage { width: 100vw; height: 100vh; border-radius: 0; }
  /* Arrows: dark-bg-on-dark-photo was invisible. Bump to a brighter
     translucent white with a backdrop blur so they read against any photo. */
  .tb-sv-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(255,255,255,0.28);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.35);
    box-shadow: 0 2px 12px rgba(0,0,0,0.45);
    color: #fff;
  }
  .tb-sv-arrow:hover { background: rgba(255,255,255,0.42); }
  .tb-sv-arrow-prev { left: 8px; }
  .tb-sv-arrow-next { right: 8px; }
}

/* ── Story viewer action bar ─────────────────────────────────────────────── */
.tb-sv-actions-wrap {
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 4;
  background: linear-gradient(to top, rgba(0,0,0,.65) 0%, transparent 100%);
  padding: 28px 14px 14px;
  min-height: 88px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-end;
  gap: 10px;
  /* Safe-area handling is on .tb-sv-overlay (the whole modal is inset to
     the safe zone), so we don't need padding-bottom: env(...) here. */
}
.tb-sv-caption {
  color: #fff;
  font-size: 14px;
  line-height: 1.45;
  text-shadow: 0 2px 14px rgba(0,0,0,.45);
}
.tb-sv-place {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
.tb-sv-place-label {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}
.tb-sv-place-link {
  color: rgba(255,255,255,.86);
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.tb-sv-place-link:hover { color: var(--gold); }
.tb-sv-caption a { text-decoration: none; }
.tb-sv-actions {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.tb-sv-actions--muted { justify-content: center; }
.tb-sv-actions-note {
  color: rgba(255,255,255,.72);
  font-size: 13px;
  font-weight: 500;
}
.tb-sv-login-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.22);
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}
.tb-sv-login-btn:hover { background: rgba(255,255,255,.18); }
.tb-sv-emoji-row {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(20,20,20,.92);
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 10px 26px rgba(0,0,0,.28);
}
.tb-sv-emoji-btn {
  background: transparent; border: none;
  padding: 0; font-size: 1.65rem;
  cursor: pointer; transition: transform .12s, background .12s;
  line-height: 1;
}
.tb-sv-emoji-btn:hover { transform: scale(1.15); }
.tb-sv-emoji-btn--sent { transform: scale(1.28); }
.tb-sv-emoji-btn.is-active {
  transform: scale(1.16);
  filter: drop-shadow(0 0 10px rgba(236,200,144,.4));
}
.tb-sv-reply-btn {
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2);
  border-radius: 50%; width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.2rem; cursor: pointer;
}
.tb-sv-reply-btn:hover { background: rgba(255,255,255,.22); }
.tb-sv-reply-wrap {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
}
.tb-sv-reply-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 40px;
  background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.3);
  border-radius: 8px; padding: 0 14px; color: #fff; font-size: 15px;
  outline: none;
}
.tb-sv-reply-input::placeholder { color: rgba(255,255,255,.55); }
.tb-sv-reply-send {
  background: var(--gold); color: #13181d; border: none; border-radius: 16px;
  height: 40px;
  border-radius: 8px;
  padding: 0 16px; font-size: 14px; font-weight: 700; cursor: pointer; white-space: nowrap;
  flex: 0 0 auto;
}
.tb-sv-reply-send:disabled { opacity: .5; }
.tb-sv-reply-cancel {
  background: transparent; border: none; color: rgba(255,255,255,.7);
  font-size: 28px; cursor: pointer; padding: 0 6px; line-height: 1;
  flex: 0 0 auto;
}
.tb-sv-editor-wrap,
.tb-sv-delete-wrap {
  width: 100%;
  box-sizing: border-box;
  padding: 14px;
  border-radius: 6px;
  background: rgba(20,20,20,.94);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 12px 28px rgba(0,0,0,.28);
}
.tb-sv-delete-wrap {
  width: min(100%, 360px);
  margin: 0 auto;
}
.tb-sv-editor-header,
.tb-sv-delete-title {
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
}
.tb-sv-delete-copy {
  margin-top: 8px;
  color: rgba(255,255,255,.76);
  font-size: 13px;
  line-height: 1.45;
}
.tb-sv-editor-caption {
  width: 100%;
  min-height: 82px;
  margin-top: 12px;
  padding: 12px 14px;
  resize: vertical;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.15);
  background: rgba(255,255,255,.08);
  color: #fff;
  font: inherit;
  line-height: 1.45;
  outline: none;
}
.tb-sv-editor-caption::placeholder { color: rgba(255,255,255,.52); }
.tb-sv-editor-meta {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: rgba(255,255,255,.62);
  font-size: 11px;
}
.tb-sv-editor-location {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tb-sv-editor-pill,
.tb-sv-editor-loc-add {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.15);
  background: rgba(255,255,255,.08);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}
.tb-sv-editor-loc-add {
  width: fit-content;
  cursor: pointer;
}
.tb-sv-editor-pill {
  position: relative;
  padding-right: 36px;
}
.tb-sv-editor-pill-x {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.82);
  cursor: pointer;
  line-height: 1;
}
.tb-sv-editor-loc-search {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tb-sv-editor-loc-input {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.15);
  background: rgba(255,255,255,.08);
  color: #fff;
  font-size: 13px;
  outline: none;
}
.tb-sv-editor-loc-results {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 170px;
  overflow-y: auto;
}
.tb-sv-editor-loc-result {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  background: rgba(255,255,255,.04);
  color: #fff;
  font-size: 13px;
  cursor: pointer;
  text-align: left;
}
.tb-sv-editor-loc-result:hover { background: rgba(255,255,255,.08); }
.tb-sv-editor-loc-type {
  margin-left: auto;
  color: rgba(255,255,255,.5);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.tb-sv-editor-loc-empty {
  color: rgba(255,255,255,.54);
  font-size: 12px;
  padding: 6px 2px 0;
}
.tb-sv-editor-place {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}
.tb-sv-editor-place-url,
.tb-sv-editor-place-label {
  width: 100%;
  background: rgba(255,255,255,.05);
  color: #fff;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 8px;
  padding: 11px 13px;
  box-sizing: border-box;
  font-size: 13px;
  font-family: inherit;
  outline: none;
}
.tb-sv-editor-place-url:focus,
.tb-sv-editor-place-label:focus { border-color: rgba(233, 200, 152, .7); }
.tb-sv-editor-place-url::placeholder,
.tb-sv-editor-place-label::placeholder { color: rgba(255,255,255,.42); }
.tb-sv-editor-place-note {
  color: rgba(255,255,255,.55);
  font-size: 12px;
}
.tb-sv-editor-actions,
.tb-sv-delete-actions {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.tb-sv-delete-wrap .tb-sv-delete-actions {
  margin-top: 12px;
}
.tb-sv-editor-cancel,
.tb-sv-delete-cancel {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.12);
  background: transparent;
  color: rgba(255,255,255,.82);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.tb-sv-editor-save,
.tb-sv-delete-confirm {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 6px;
  border: none;
  background: var(--gold);
  color: #13181d;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.tb-sv-delete-confirm {
  background: #f0b6b6;
}
.tb-sv-editor-error,
.tb-sv-delete-error {
  margin-top: 10px;
  color: #ffb0b0;
  font-size: 12px;
  line-height: 1.45;
}
.tb-sv-inline-confirm {
  margin-left: 6px;
  padding: 0;
  border: none;
  background: none;
  color: var(--gold);
  font-size: inherit;
  font-weight: 700;
  cursor: pointer;
}
.tb-sv-actions-flash {
  width: 100%;
  margin-top: 10px;
  color: rgba(255,255,255,.86);
  font-size: 12px;
  font-weight: 600;
}
.tb-sv-actions-flash.is-success { color: #d8efc4; }
.tb-sv-actions-flash.is-error { color: #ff9b9b; }
/* Shrink tap zones so they don't block the action bar */
.tb-sv-tap-prev, .tb-sv-tap-next { bottom: 88px; }

/* ── Story Add (sidebar profile photo "+" overlay) ──────────────────────── */
.nav-profile-wrap { position: relative; display: inline-block; }
.nav-story-add {
  position: absolute;
  right: -4px; bottom: -4px;
  width: 22px; height: 22px;
  padding: 0;
  background: var(--gold);
  color: #13181d;
  border-radius: 50%;
  border: 2px solid var(--bg-page);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  text-decoration: none;
  line-height: 1;
  box-sizing: border-box;
  z-index: 4;
}
.nav-story-add i { font-size: 13px; line-height: 1; }
.nav-story-add:hover { background: #f3d4a9; }

/* ── Feed widget cards (interstitial: events / guides / contributors) ─────── */
.feed-widget-card {
    background: var(--bg-card);
    border: 1px solid rgba(233, 200, 152, 0.32);
    border-radius: 12px;
    margin: 0 0 10px;
    overflow: hidden;
}
.fw-header {
    padding: 12px 16px 11px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.fw-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Smooch Sans', sans-serif;
    font-size: 1.6em;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #ffffff;
    line-height: 1;
}
.fw-label i { font-size: 0.58em; color: var(--gold); }
.fw-rows { padding: 4px 0; }
.fw-row {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 10px 16px;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    transition: background 0.14s;
}
.fw-row:last-child { border-bottom: none; }
.fw-row:hover { background: rgba(255,255,255,0.03); }
.fw-row--clickable { cursor: pointer; }
.fw-row-thumb {
    width: 110px;
    height: 72px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
}
.fw-row-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fw-row-thumb--icon { color: var(--text-muted); font-size: 1.6em; }
.fw-row-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg-elevated);
}
.fw-row-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
    gap: 3px;
}
.fw-row-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 5px;
}
.fw-row-date {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gold) !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.fw-row-loc {
    font-size: 0.75rem !important;
    color: #888 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 400 !important;
}
.fw-footer {
    padding: 9px 16px 10px;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.fw-footer-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.82rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.15s;
}
.fw-footer-link i { font-size: 0.85em; }
.fw-footer-link:hover { color: var(--gold); }
.fw-empty {
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 12px 16px;
    margin: 0;
}

/* ── Mobile search overlay ───────────────────────────────────────────────── */
.mob-search-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--bg-page);
    z-index: 1000;
    flex-direction: column;
}
.mob-search-overlay.is-open { display: flex; }
.mob-search-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--bg-elevated);
    flex-shrink: 0;
}
.mob-search-back {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 22px;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    line-height: 1;
}
.mob-search-form {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--bg-elevated);
    border-radius: 12px;
    padding: 0 12px;
    height: 40px;
    flex: 1;
    min-width: 0;
}
.mob-search-input {
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 1rem;
    width: 100%;
    min-width: 0;
}
.mob-search-input::placeholder { color: var(--text-dim); }
.mob-search-overlay #mobileSearchSuggestions {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 1001;
}

/* ── Explore page subtitle ────────────────────────────────────────────────── */
.ex-page-subtitle {
    padding: 8px 16px 4px;
    font-size: 0.83rem;
    color: var(--text-muted);
    margin: 0;
}

/* ── button.ex-add-btn (story composer trigger) ──────────────────────────── */
button.ex-add-btn {
    cursor: pointer;
    font-family: inherit;
}

/* ── Forum post-type badge colors ────────────────────────────────────────────
   Used by .f2-badge (forum index) and .thread-tag (thread page).
   Slate  = analytical  (Question, Comparison)
   Sage   = place-based (City Review, Field Report)
   Earth  = community   (Discussion, Resource)
   Gold   = admin-only  (Official Guide)
   ────────────────────────────────────────────────────────────────────────── */
.f2-badge {
  display: inline-block;
  padding: 2px 7px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  border-radius: 3px;
  text-transform: uppercase;
  line-height: 1.5;
  flex-shrink: 0;
}
.pt-badge-slate { background: rgba(86,110,138,0.2);    border: 1px solid rgba(86,110,138,0.38);  color: #8ab2cc; }
.pt-badge-sage  { background: rgba(72,104,80,0.2);     border: 1px solid rgba(72,104,80,0.38);   color: #7aaa88; }
.pt-badge-earth { background: rgba(120,90,65,0.2);     border: 1px solid rgba(120,90,65,0.4);    color: #b08860; }
.pt-badge-gold  { background: rgba(233,200,152,0.14);  border: 1px solid rgba(233,200,152,0.35); color: var(--gold); }

/* Card thumbnail overlays — keep dark bg, just swap text color */
.pt-text-slate { color: #8ab2cc; }
.pt-text-sage  { color: #7aaa88; }
.pt-text-earth { color: #b08860; }
.pt-text-gold  { color: var(--gold); }

/* ═════════════════════════════════════════════════════════════════════════
   RIGHT SIDEBAR — moved here from inline <style> in includes/right-sidebar.php
   to eliminate FOUC. Originally lived inside <body> AFTER the sidebar HTML
   had already streamed in, causing visible repaint flashes (event thumb
   imgs, member rows, etc. rendering at native size before CSS applied).
   The @import for Smooch Sans was removed — already loaded via <link> in
   header2.php line 70.
   ═════════════════════════════════════════════════════════════════════════ */

/* ── Right sidebar shell ─────────────────────────────────────────────────── */
.right-sidebar {
    position: sticky;
    top: 64px;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 64px);
    overflow: hidden;
}
.rs-scroll-body {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    scrollbar-width: none;
}
.rs-scroll-body::-webkit-scrollbar { display: none; }

/* ── Footer links ────────────────────────────────────────────────────────── */
.rs-footer {
    flex-shrink: 0;
    padding: 10px 4px 10px;
    background: var(--bg-page);
}
.rs-footer-row {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    line-height: 1.3;
}
.rs-footer-link {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.15s;
    padding: 0 1px;
}
.rs-footer-link:hover { color: var(--text-primary); text-decoration: underline; }
.rs-footer-dot { font-size: 0.72rem; color: var(--text-muted); padding: 0 3px; user-select: none; }
.rs-footer-copy { font-size: 0.72rem; color: var(--text-muted); white-space: nowrap; padding: 0 1px; }

/* Subscribe to Elite widget */
.tb-elite-sidebar-box { padding-top: 2px; padding-bottom: 14px; }
.tb-elite-sidebar-title-row {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px;
}
.tb-elite-sidebar-heading {
    margin: 0; color: #fff;
    font-family: 'Smooch Sans', sans-serif;
    font-size: 1.85em; font-weight: 750; line-height: 0.95;
    letter-spacing: 0.03em; text-transform: uppercase;
}
.tb-elite-discount-pill {
    display: inline-flex; align-items: center; justify-content: center;
    background: #064a24; color: #64d58d; border-radius: 8px;
    padding: 3px 9px; font-size: 0.78em; font-weight: 800;
    line-height: 1.1; white-space: nowrap;
}
.tb-elite-title-badge {
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--gold); font-size: 1.5em; line-height: 1;
}
.tb-elite-sidebar-copy { margin: 0 0 12px 14px; color: var(--text-muted); font-size: 0.85em; line-height: 1.35; }
.tb-elite-sidebar-btn {
    display: inline-block; background: var(--gold); color: var(--bg-card);
    font-weight: 800; font-size: 1em; line-height: 1;
    margin-left: 14px; padding: 9px 18px; border-radius: 8px; text-decoration: none;
}
.tb-elite-sidebar-btn:hover { background: #f0d5a8; text-decoration: none; }

/* Stats widget at top */
.sidebar-stats-widget {
    display: flex !important; flex-direction: row !important;
    align-items: center !important; justify-content: center !important;
    gap: 24px; padding: 2px 0;
}
.sidebar-stats-link {
    display: flex;
    text-decoration: none;
    border-radius: 10px;
    transition: background 0.18s ease;
}
.sidebar-stats-link:hover {
    background: rgba(255,255,255,0.04);
}
.sidebar-stats-widget .sidebar-stat-row {
    display: flex !important; flex-direction: row !important;
    align-items: center; gap: 6px; flex-shrink: 0; width: auto !important;
}

/* Trending placeholder thumbnail */
.sw-trend-thumb {
    background: var(--bg-elevated) !important;
    display: flex !important; align-items: center; justify-content: center; flex-shrink: 0;
}
.sw-trend-icon { font-size: 1.4rem; color: var(--gold); opacity: 0.5; }

/* ── Sliding Activity Widget ─────────────────────────────────────────────── */
.sw-widget { padding: 0 0 4px; }
.sw-controls {
    display: flex; align-items: center; justify-content: center;
    gap: 10px; margin-top: 16px;
}
.sw-dots { display: flex; align-items: center; gap: 8px; }
.sw-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--text-muted); border: none; padding: 0;
    cursor: pointer; transition: background 0.2s, transform 0.2s;
}
.sw-dot--active { background: var(--gold); transform: scale(1.3); }
.sw-panel-title {
    font-family: 'Smooch Sans', sans-serif;
    font-size: 1.85em; font-weight: 750; letter-spacing: 0.03em;
    text-transform: uppercase; color: var(--text-primary);
    line-height: 0.95; margin-bottom: 10px;
}
/* Peek-slider layout */
.sw-viewport {
    position: relative;
    overflow: hidden;
}
.sw-track {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: flex-start;
    transition: transform 0.38s cubic-bezier(0.25,0.46,0.45,0.94);
    will-change: transform;
}
.sw-panel {
    flex: 0 0 calc(100% - 34px);
    margin-right: 8px;
    min-width: 0;
}
/* right-edge fade + arrow overlay */
.sw-peek-fade {
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 52px;
    background: linear-gradient(to right, transparent 0%, rgba(14,17,19,0.65) 42%, rgba(14,17,19,0.88) 100%);
    pointer-events: none;
    z-index: 2;
}
.sw-arrow-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 26px; height: 26px;
    background: rgba(35,35,35,0.92);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 50%;
    color: var(--text-primary);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.78rem;
    padding: 0;
    transition: background 0.15s, color 0.15s;
    line-height: 1;
}
.sw-arrow-btn:hover { background: rgba(60,60,60,0.96); color: var(--gold); }
.sw-panel .sidebar-events-list > li { border-bottom: 1px solid rgba(255,255,255,0.10); }
.sw-panel .sidebar-events-list > li:last-child { border-bottom: none; }

/* Member rows */
.sw-member-row {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 8px; border-bottom: 1px solid rgba(255,255,255,0.10);
    border-radius: 8px;
    text-decoration: none; color: inherit; cursor: pointer;
    transition: background 0.15s ease;
}
.sw-member-row:hover { background: var(--bg-card); }
.sw-member-row:last-of-type { border-bottom: none; }
.sw-member-avatar {
    width: 52px; height: 52px; border-radius: 50%; object-fit: cover;
    flex-shrink: 0; background: var(--bg-elevated);
}
.sw-member-info { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.sw-member-name-row {
    display: flex; align-items: center; gap: 3px; flex-wrap: nowrap; min-width: 0;
}
.sw-member-name {
    flex-shrink: 1; min-width: 0; font-size: 0.9rem; font-weight: 600;
    color: var(--text-primary); white-space: nowrap; overflow: hidden;
    text-overflow: ellipsis; transition: color 0.15s;
}
.sw-member-row:hover .sw-member-name { color: var(--gold); }
.sw-member-sub {
    font-size: 0.75rem; color: var(--text-muted); white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis; margin-top: 1px;
}
.sw-loc-pin { font-size: 10px; color: var(--gold); opacity: 0.7; flex-shrink: 0; }
.sw-member-name-row .elite-badge { flex-shrink: 0; margin-left: 0; }
.sw-see-more { display: inline-block; margin-top: 8px; padding-left: 8px; font-size: 0.82em; color: var(--text-muted); text-decoration: underline; text-underline-offset: 2px; text-decoration-color: rgba(255,255,255,0.22); }
.sw-see-more:hover { color: var(--text-primary); text-decoration: underline; }
.sw-empty { color: var(--text-muted); font-size: 0.82rem; padding: 12px 0; margin: 0; }
.sw-copy-muted { color: var(--text-muted) !important; font-weight: 500; }
/* Panel title links */
.sw-panel-title { padding-left: 8px; }
.sw-panel-title-link { color: inherit; text-decoration: none; transition: color 0.15s; }
.sw-panel-title-link:hover { color: var(--gold); }
/* Events panel footer: see-all + create */
.sw-events-footer { display: flex; align-items: center; justify-content: flex-start; gap: 18px; margin-top: 10px; padding-left: 8px; }
.sw-events-footer-all,
.sw-events-footer-create { font-size: 0.82em; color: var(--text-muted); text-decoration: underline; text-underline-offset: 2px; text-decoration-color: rgba(255,255,255,0.22); white-space: nowrap; }
.sw-events-footer-all:hover,
.sw-events-footer-create:hover { color: var(--text-primary); text-decoration: underline; }

/* ─── Travel Bros dialog (tbAlert / tbConfirm / tbPrompt) ─────────────
   Site-wide dark-theme replacement for window.alert / confirm / prompt.
   Backdrop fades in; modal slides up 8px. JS lives in /public/js/tb-dialog.js. */
.tb-modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.65);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999; padding: 20px;
  opacity: 0; transition: opacity .15s ease;
}
.tb-modal-backdrop[hidden] { display: none; }
.tb-modal-backdrop.is-open { opacity: 1; }
.tb-modal {
  background: var(--bg-card); border: 1px solid var(--bg-elevated);
  border-radius: 8px; max-width: 460px; width: 100%;
  box-shadow: 0 18px 50px rgba(0,0,0,0.5);
  padding: 22px 22px 18px;
  font-family: inherit;
  transform: translateY(8px); transition: transform .15s ease;
}
.tb-modal-backdrop.is-open .tb-modal { transform: translateY(0); }
.tb-modal-title {
  margin: 0 0 12px; color: var(--text-primary);
  font-size: 1.05rem; font-weight: 700; letter-spacing: 0.01em;
}
.tb-modal-message {
  margin: 0 0 16px; color: var(--text-body);
  font-size: 0.92rem; line-height: 1.5;
}
.tb-modal-input {
  width: 100%; box-sizing: border-box;
  background: var(--bg-input, var(--bg-elevated));
  border: 1px solid var(--bg-elevated);
  color: var(--text-primary); font-family: inherit;
  font-size: 0.95rem; padding: 10px 12px;
  border-radius: 8px; outline: none;
  transition: border-color .12s;
}
.tb-modal-input:focus { border-color: var(--gold); }
.tb-modal-input[hidden] { display: none; }
.tb-modal-actions {
  display: flex; justify-content: flex-end; gap: 8px;
  margin-top: 16px;
}
.tb-modal-btn {
  font-family: inherit; cursor: pointer;
  font-size: 0.88rem; font-weight: 600;
  padding: 9px 18px; border-radius: 8px;
  border: 1px solid transparent;
  transition: background .12s, border-color .12s, color .12s;
}
.tb-modal-btn[hidden] { display: none; }
.tb-modal-btn--cancel {
  background: transparent; color: var(--text-muted);
  border-color: var(--bg-elevated);
}
.tb-modal-btn--cancel:hover { color: var(--text-primary); border-color: rgba(255,255,255,0.18); }
.tb-modal-btn--confirm {
  background: var(--gold); color: #13181d; border-color: var(--gold);
}
.tb-modal-btn--confirm:hover { background: #f0d5a8; }
