/* Loved Scents V2: X-style shell. Mobile first, light + dark, no external fonts. */
:root {
  --bg: #ffffff;
  --bg-2: #f7f9f9;
  --bg-3: #eff3f4;
  --bg-hover: rgba(15, 20, 25, 0.04);
  --bg-elev: #ffffff;
  --fg: #0f1419;
  --fg-2: #536471;
  --line: #eff3f4;
  --line-2: #cfd9de;
  --accent: #c8102e;
  --accent-hover: #a50d26;
  --accent-soft: rgba(200, 16, 46, 0.1);
  --like: #f91880;
  --like-soft: rgba(249, 24, 128, 0.1);
  --repost: #00ba7c;
  --repost-soft: rgba(0, 186, 124, 0.1);
  --link: #1d9bf0;
  --link-soft: rgba(29, 155, 240, 0.1);
  --link-text: #1366b0;
  --overlay: rgba(0, 0, 0, 0.4);
  --topbar: rgba(255, 255, 255, 0.85);
  --sk: #eff3f4;
  --sk-2: #f7f9f9;
  --shadow: 0 0 15px rgba(101, 119, 134, 0.2), 0 0 3px 1px rgba(101, 119, 134, 0.15);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --r: 16px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --link-text: #1d9bf0;
  --bg: #000000; --bg-2: #16181c; --bg-3: #202327; --bg-hover: rgba(231, 233, 234, 0.03); --bg-elev: #000000;
    --fg: #e7e9ea; --fg-2: #71767b; --line: #2f3336; --line-2: #3e4144;
    --accent: #f4364f; --accent-hover: #ff5a70; --accent-soft: rgba(244, 54, 79, 0.15);
    --overlay: rgba(91, 112, 131, 0.4); --topbar: rgba(0, 0, 0, 0.65); --sk: #202327; --sk-2: #16181c;
    --shadow: 0 0 15px rgba(255, 255, 255, 0.2), 0 0 3px 1px rgba(255, 255, 255, 0.15);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --link-text: #1d9bf0;
  --bg: #000000; --bg-2: #16181c; --bg-3: #202327; --bg-hover: rgba(231, 233, 234, 0.03); --bg-elev: #000000;
  --fg: #e7e9ea; --fg-2: #71767b; --line: #2f3336; --line-2: #3e4144;
  --accent: #f4364f; --accent-hover: #ff5a70; --accent-soft: rgba(244, 54, 79, 0.15);
  --overlay: rgba(91, 112, 131, 0.4); --topbar: rgba(0, 0, 0, 0.65); --sk: #202327; --sk-2: #16181c;
  --shadow: 0 0 15px rgba(255, 255, 255, 0.2), 0 0 3px 1px rgba(255, 255, 255, 0.15);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
.x-body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 15px/1.3125 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
.x-body a { color: inherit; text-decoration: none; }
.x-body img { max-width: 100%; }
.x-body button { font: inherit; color: inherit; }
.x-body h1, .x-body h2, .x-body h3, .x-body p { margin: 0; }
.x-body input, .x-body textarea { font: inherit; color: var(--fg); }
.x-noscroll { overflow: hidden; }
.x-muted { color: var(--fg-2); }
.x-fine { font-size: 13px; }
.x-pad { padding: 12px 16px; }
.x-center { text-align: center; justify-content: center; }
.x-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.x-links a { color: var(--link-text, var(--link)); }
.x-links a:hover { text-decoration: underline; }
.x-preview-banner { background: #fff4d6; color: #5a4300; font-size: 12px; text-align: center; padding: 6px 12px; }

/* Icons */
.x-ico, .x-tabs svg, .x-back svg, .x-fab svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.x-more .x-ico circle, #x-pmore .x-ico circle { fill: currentColor; stroke: none; }

/* ---------- Layout ---------- */
.x-layout { display: block; min-height: 100vh; }
.x-main { max-width: 600px; margin: 0 auto; min-height: 100vh; padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
.x-view { min-height: 70vh; }
.x-side { display: none; }
.x-topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 8px;
  min-height: 53px;
  padding: calc(4px + env(safe-area-inset-top)) 12px 4px 16px;
  background: var(--topbar);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.x-topbar h1 { flex: 1; min-width: 0; font-size: 20px; font-weight: 800; line-height: 24px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; outline: none; }
.x-back, .x-icon-btn {
  border: 0; background: none; width: 36px; height: 36px; border-radius: 50%;
  display: inline-grid; place-items: center; cursor: pointer; flex: none; color: var(--fg);
  transition: background-color .15s;
}
.x-back { margin-left: -8px; }
.x-back:hover, .x-icon-btn:hover { background: var(--bg-hover); }
.x-icon-btn-line { border: 1px solid var(--line-2); }
.x-account { display: inline-flex; align-items: center; min-height: 36px; padding: 0 4px; font-weight: 700; font-size: 15px; }
.x-admin-link { margin-right: 2px; }

/* Bottom tab bar (phones) */
.x-tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; justify-content: space-around; align-items: center;
  height: calc(53px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: var(--topbar); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
}
.x-tabs a { flex: 1; display: flex; align-items: center; justify-content: center; height: 53px; color: var(--fg); }
.x-tabs svg { width: 26px; height: 26px; stroke-width: 1.8; }
.x-tabs a span:not(.x-tab-icon) { display: none; }
.x-tabs a.is-active svg { stroke-width: 2.7; }
.x-tabs .x-rail-logo, .x-tabs .x-rail-extra { display: none; }
.x-tab-post svg { background: var(--accent); color: #fff; border-radius: 50%; padding: 9px; width: 42px !important; height: 42px !important; stroke-width: 2.4 !important; }
.x-tab-icon { position: relative; display: inline-flex; }
.x-badge {
  position: absolute; top: -5px; right: -9px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--link); color: #fff; font: 700 11px/18px var(--font); text-align: center;
  border: 2px solid var(--bg); box-sizing: content-box;
}
.x-fab { display: none; }

@media (min-width: 700px) {
  .x-layout { display: flex; justify-content: center; }
  .x-main { margin: 0; flex: 0 1 600px; min-width: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); padding-bottom: 40px; }
  .x-tabs {
    position: sticky; top: 0; height: 100vh; width: 88px; flex: none;
    flex-direction: column; justify-content: flex-start; align-items: center; gap: 4px;
    border-top: 0; padding: 4px 8px 12px; background: var(--bg);
    -webkit-backdrop-filter: none; backdrop-filter: none;
  }
  .x-tabs a { flex: none; width: 52px; height: 52px; border-radius: 26px; transition: background-color .15s; }
  .x-tabs a:hover { background: var(--bg-hover); }
  .x-tabs .x-rail-logo, .x-tabs .x-rail-extra { display: flex; }
  .x-tab-post { order: 10; margin-top: 8px; }
  .x-tab-post svg { width: 52px !important; height: 52px !important; padding: 14px; }
}
@media (min-width: 1280px) {
  .x-tabs { width: 260px; align-items: stretch; padding: 4px 12px 12px; }
  .x-tabs a { width: auto; justify-content: flex-start; gap: 20px; padding: 0 16px; font-size: 20px; }
  .x-tabs a span:not(.x-tab-icon) { display: inline; }
  .x-tabs a.is-active { font-weight: 700; }
  .x-tab-post { background: var(--accent); color: #fff !important; justify-content: center !important; height: 52px; font-weight: 700; font-size: 17px !important; }
  .x-tab-post:hover { background: var(--accent-hover) !important; }
  .x-tab-post svg { background: none; padding: 0; width: 24px !important; height: 24px !important; }
}
@media (min-width: 1000px) {
  .x-side { display: block; position: sticky; top: 0; align-self: flex-start; width: 350px; flex: none; padding: 6px 0 24px 28px; max-height: 100vh; overflow-y: auto; scrollbar-width: none; }
  .x-side::-webkit-scrollbar { display: none; }
}

/* Inside the native iOS/Android app: native tab bar replaces the web one; floating Post button. */
.x-in-app .x-tabs { display: none !important; }
.x-in-app .x-main { padding-bottom: 24px; max-width: none; border: 0; }
.x-in-app .x-foot { padding-bottom: 96px; }
.x-in-app .x-topbar { padding-top: 6px; }
.x-in-app .x-side { display: none !important; }
.x-in-app .x-fab {
  position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 40;
  display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%;
  background: var(--accent); color: #fff; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}
.x-in-app .x-fab svg { width: 26px; height: 26px; stroke-width: 2.4; }
.x-in-app body.x-route-compose .x-fab, body.x-route-compose .x-fab { display: none !important; }

.x-foot { padding: 20px 16px calc(80px + env(safe-area-inset-bottom)); font-size: 13px; color: var(--fg-2); line-height: 1.8; }
.x-foot a:hover { text-decoration: underline; }
@media (min-width: 1000px) { .x-foot { display: none; } }

/* ---------- Buttons ---------- */
.x-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 36px; padding: 0 16px; border-radius: 9999px;
  border: 1px solid var(--line-2); background: transparent; color: var(--fg) !important;
  font-weight: 700; font-size: 15px; line-height: 1; white-space: nowrap; cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s, opacity .15s;
}
.x-btn:hover { background: var(--bg-hover); }
.x-btn-primary { background: var(--fg); border-color: var(--fg); color: var(--bg) !important; }
.x-btn-primary:hover { background: var(--fg); opacity: .88; }
.x-btn-sm { min-height: 32px; padding: 0 14px; font-size: 14px; }
.x-btn-quiet { border-color: transparent; }
.x-btn[disabled] { opacity: .5; cursor: default; pointer-events: none; }
.x-btn.is-busy { opacity: .6; }
.x-btn-following { min-width: 104px; }
.x-btn-following:hover { border-color: rgba(244, 33, 46, 0.4); color: #f4212e !important; background: rgba(244, 33, 46, 0.1); }
.x-btn-following:hover { font-size: 0; }
.x-btn-following:hover::after { content: "Unfollow"; font-size: 15px; }
.x-btn-sm.x-btn-following:hover::after { font-size: 14px; }
.x-row-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.x-row-actions.x-center { justify-content: center; }

/* ---------- Avatars, badges ---------- */
.x-avatar { --s: 40px; width: var(--s); height: var(--s); border-radius: 50%; overflow: hidden; display: inline-block; flex: none; background: var(--bg-3); vertical-align: middle; }
.x-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.x-avatar-frag { display: inline-grid; place-items: center; font-weight: 800; font-size: calc(var(--s) * 0.42); color: var(--accent); background: var(--accent-soft); border-radius: 12px; }
.x-av-link { display: block; border-radius: 50%; }
.x-av-link:hover .x-avatar { filter: brightness(.92); }
.x-bdgs { display: inline-flex; gap: 3px; margin-left: 4px; vertical-align: -2px; flex: none; }
.x-bdgs:empty { display: none; }
.x-bdg { display: inline-block; font-size: 10.5px; font-weight: 700; line-height: 1; padding: 3px 6px; border-radius: 999px; letter-spacing: .02em; }
.x-bdg-official { background: var(--fg); color: var(--bg); }
.x-bdg-ai { background: #7c3aed; color: #fff; }
.x-bdg-brand { background: #b45309; color: #fff; }
.x-bdg-verified { background: var(--link); color: #fff; padding: 3px 5px; }
.x-bdg-founding { background: #fde68a; color: #713f12; }
/* 118: paid club member checkmark. Rose seal, distinct from Official (black), AI (purple), Brand (amber), Verified (blue pill). */
.x-bdg-member { display: inline-flex; align-items: center; color: #be185d; line-height: 0; }
[data-theme="dark"] .x-bdg-member { color: #f472b6; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .x-bdg-member { color: #f472b6; } }
/* 118: ad-free perk. Any future ad slot must carry data-ad-slot; paid members never see it. */
html[data-ad-free="1"] [data-ad-slot] { display: none !important; }
.x-pill { display: inline-block; font-size: 12px; padding: 2px 6px; border-radius: 4px; background: var(--bg-3); color: var(--fg-2); }

/* ---------- Sub tabs ---------- */
.x-subtabs { display: flex; border-bottom: 1px solid var(--line); background: var(--topbar); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.x-sticky-sub { position: sticky; top: calc(53px + env(safe-area-inset-top)); z-index: 15; }
.x-in-app .x-sticky-sub { top: 53px; }
.x-subtabs a { flex: 1; display: flex; justify-content: center; min-height: 53px; color: var(--fg-2); font-weight: 500; transition: background-color .15s; }
.x-subtabs a:hover { background: var(--bg-hover); }
.x-subtabs a span { display: flex; align-items: center; position: relative; }
.x-subtabs a.is-active { color: var(--fg); font-weight: 700; }
.x-subtabs a.is-active span::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; border-radius: 2px; background: var(--accent); }

/* ---------- Home extras ---------- */
.x-hero { margin: 12px 16px; border-radius: var(--r); overflow: hidden; background: var(--bg-2); border: 1px solid var(--line); }
.x-hero-art { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.x-hero-text { padding: 16px; }
.x-hero-text h2 { font-size: 23px; font-weight: 800; line-height: 28px; }
.x-hero-text p { color: var(--fg-2); margin-top: 6px; }
.x-prompt { display: flex; gap: 12px; margin: 12px 16px; padding: 12px; border-radius: var(--r); background: var(--bg-2); border: 1px solid var(--line); }
.x-prompt-art { width: 72px; height: 72px; border-radius: 12px; object-fit: cover; flex: none; }
.x-prompt-body { min-width: 0; }
.x-prompt-day { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.x-prompt-text { font-weight: 700; margin-top: 2px; }
.x-prompt .x-row-actions { margin-top: 8px; }
.x-compose-inline { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.x-compose-inline-ph { flex: 1; font-size: 20px; color: var(--fg-2); }
.x-compose-inline:hover { background: var(--bg-hover); }

/* ---------- Posts ---------- */
.x-post { position: relative; padding: 12px 16px 4px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background-color .15s; outline: none; }
.x-post:hover { background: var(--bg-hover); }
.x-post:focus-visible { box-shadow: inset 0 0 0 2px var(--link); }
.x-post.is-focus { cursor: default; }
.x-post.is-focus:hover { background: none; }
.x-post-grid { display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 12px; }
.x-post.is-focus .x-post-grid { grid-template-columns: 44px minmax(0, 1fr); }
.x-post-av { position: relative; }
.x-post.has-line { border-bottom: 0; padding-bottom: 0; }
.x-post.has-line .x-post-av::after { content: ""; position: absolute; left: 50%; top: 44px; bottom: -12px; width: 2px; margin-left: -1px; background: var(--line-2); }
.x-post.has-line-above::before { content: ""; position: absolute; left: 35px; top: 0; height: 12px; width: 2px; background: var(--line-2); }
.x-social-ctx { display: flex; align-items: center; gap: 6px; margin: -4px 0 4px 28px; font-size: 13px; font-weight: 700; }
.x-social-ctx .x-ico { width: 16px; height: 16px; }
.x-social-ctx a:hover { text-decoration: underline; }
.x-post-head { display: flex; align-items: center; min-width: 0; gap: 4px; line-height: 20px; }
.x-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 55%; }
.x-name:hover { text-decoration: underline; }
.x-handle, .x-time, .x-dot { color: var(--fg-2); white-space: nowrap; }
.x-handle { overflow: hidden; text-overflow: ellipsis; min-width: 0; flex-shrink: 1; }
.x-time:hover { text-decoration: underline; }
.x-more { margin: -8px -8px -8px auto; border: 0; background: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--fg-2); cursor: pointer; flex: none; }
.x-more:hover { background: var(--link-soft); color: var(--link); }
.x-more .x-ico { width: 18px; height: 18px; }
.x-text { margin-top: 2px; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.x-text a, .x-bio a, .x-replying a { color: var(--link-text, var(--link)); }
.x-text a:hover, .x-bio a:hover { text-decoration: underline; }
.x-text-lg { font-size: 17px; line-height: 24px; margin-top: 12px; }
.x-post.is-focus .x-post-grid { display: block; }
.x-post.is-focus .x-post-av { float: left; margin-right: 12px; }
.x-post.is-focus .x-post-head { position: relative; flex-wrap: wrap; align-content: center; min-height: 44px; padding-right: 36px; row-gap: 0; }
.x-post.is-focus .x-name { max-width: calc(100% - 60px); }
.x-post.is-focus .x-handle { flex-basis: 100%; }
.x-post.is-focus .x-more { position: absolute; right: 0; top: 5px; margin: 0; }
.x-post.is-focus .x-post-main > :not(.x-post-head) { clear: left; }
.x-replying { font-size: 15px; margin-top: 2px; }
.x-pending { margin: 6px 0; padding: 8px 10px; border-radius: 10px; background: #fff7e0; color: #6b4e00; font-size: 13px; }
:root[data-theme="dark"] .x-pending { background: #2a2208; color: #f3d77a; }
.x-meta-card { margin-top: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; display: flex; flex-direction: column; gap: 2px; }
.x-meta-kind { font-size: 12px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .04em; }
.x-stars { color: #f5a524; letter-spacing: 2px; margin-top: 6px; }
.x-frag-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.x-quote { display: block; margin-top: 10px; border: 1px solid var(--line-2); border-radius: var(--r); padding: 10px 12px; overflow: hidden; transition: background-color .15s; }
.x-quote:hover { background: var(--bg-hover); }
.x-quote-head { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.x-quote-body { display: block; margin-top: 4px; white-space: pre-wrap; overflow-wrap: anywhere; }
.x-quote-img { display: block; width: calc(100% + 24px); margin: 8px -12px -10px; aspect-ratio: 16 / 9; object-fit: cover; }
.x-media { margin-top: 10px; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); display: grid; gap: 2px; background: var(--line); }
.x-media-1 { grid-template-columns: 1fr; }
.x-media-2 { grid-template-columns: 1fr 1fr; aspect-ratio: 16 / 9; }
.x-media-3 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; aspect-ratio: 16 / 9; }
.x-media-3 .x-media-item:first-child { grid-row: 1 / 3; }
.x-media-4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; aspect-ratio: 16 / 9; }
.x-media-item { border: 0; padding: 0; margin: 0; background: var(--bg-3); cursor: zoom-in; display: block; min-height: 0; overflow: hidden; }
.x-media-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.x-media-1 .x-media-item img { height: auto; max-height: 510px; aspect-ratio: 4 / 5; }
.x-media video { width: 100%; max-height: 510px; display: block; background: #000; }
.x-actions { display: flex; justify-content: space-between; max-width: 425px; margin: 4px 0 0 -8px; }
.x-act { display: inline-flex; align-items: center; gap: 2px; min-width: 34px; height: 34px; padding: 0 8px 0 8px; border: 0; background: none; border-radius: 9999px; color: var(--fg-2); font-size: 13px; cursor: pointer; transition: color .15s, background-color .15s; }
.x-act .x-ico { width: 18.75px; height: 18.75px; }
.x-act span { min-width: 1ch; font-variant-numeric: tabular-nums; }
.x-act-reply:hover { color: var(--link); background: var(--link-soft); }
.x-act-repost:hover, .x-act-repost.is-on { color: var(--repost); }
.x-act-repost:hover { background: var(--repost-soft); }
.x-act-like:hover, .x-act-like.is-on { color: var(--like); }
.x-act-like:hover { background: var(--like-soft); }
.x-act-like.is-on .x-ico { fill: currentColor; }
.x-act-bm:hover, .x-act-bm.is-on { color: var(--link); }
.x-act-bm:hover, .x-act-share:hover { background: var(--link-soft); }
.x-act-share:hover { color: var(--link); }
.x-act-bm.is-on .x-ico { fill: currentColor; }
.x-act-repost.is-on .x-ico { stroke-width: 2.6; }
.x-pop .x-ico { animation: x-pop .35s ease; }
@keyframes x-pop { 0% { transform: scale(1); } 40% { transform: scale(1.3); } 100% { transform: scale(1); } }
.x-focus-time { padding: 14px 0; border-bottom: 1px solid var(--line); }
.x-focus-stats { display: flex; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--line); color: var(--fg-2); }
.x-focus-stats strong { color: var(--fg); }
.x-post.is-focus .x-actions { max-width: none; padding: 4px 0; justify-content: space-around; margin: 0; }
.x-post.is-focus { padding-bottom: 0; }

/* Skeletons */
.x-skel { cursor: default; }
.x-skel:hover { background: none; }
.x-sk { display: block; background: linear-gradient(90deg, var(--sk) 0%, var(--sk-2) 50%, var(--sk) 100%); background-size: 200% 100%; animation: x-shimmer 1.2s ease-in-out infinite; border-radius: 6px; }
.x-sk-av { width: 40px; height: 40px; border-radius: 50%; }
.x-sk-line { height: 12px; margin: 6px 0 10px; width: 100%; }
@keyframes x-shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
.x-sentinel { height: 1px; }
.x-feed-end { padding: 24px 16px 40px; text-align: center; font-size: 14px; }
.x-empty { padding: 40px 24px; text-align: center; max-width: 400px; margin: 0 auto; }
.x-empty p { color: var(--fg-2); margin-bottom: 16px; }
.x-empty > p:first-of-type { color: var(--fg); font-size: 17px; font-weight: 700; }
.x-empty-art { width: 200px; height: 200px; object-fit: contain; margin: 0 auto 12px; display: block; }

/* New posts pill (sticky inside the main column, so it centers on every layout) */
.x-newpill-wrap { position: sticky; top: calc(64px + env(safe-area-inset-top)); height: 0; z-index: 25; display: flex; justify-content: center; }
.x-newpill {
  display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 16px 0 12px;
  border: 0; border-radius: 9999px; background: var(--link); color: #fff !important; font-weight: 700; font-size: 15px;
  box-shadow: 0 4px 12px rgba(29, 155, 240, 0.4); cursor: pointer; animation: x-drop .25s ease;
}
.x-newpill[hidden] { display: none; }
.x-newpill .x-ico { width: 18px; height: 18px; stroke-width: 2.6; }
.x-newpill-faces { display: inline-flex; }
.x-newpill-faces .x-avatar { border: 2px solid var(--link); margin-left: -6px; }
.x-newpill-faces .x-avatar:first-child { margin-left: 0; }
@keyframes x-drop { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

/* ---------- Search, typeahead, lists ---------- */
.x-search { padding: 6px 16px; background: var(--topbar); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.x-searchbox { position: relative; display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 16px; border-radius: 9999px; background: var(--bg-3); border: 1px solid transparent; color: var(--fg-2); }
.x-searchbox:focus-within { background: var(--bg); border-color: var(--link); color: var(--link); }
.x-searchbox input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: transparent; font-size: 15px; }
.x-searchbox input::placeholder { color: var(--fg-2); }
.x-searchbox-sm { height: 40px; }
.x-ta { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 50; background: var(--bg-elev); border-radius: 12px; box-shadow: var(--shadow); max-height: min(70vh, 420px); overflow-y: auto; padding: 4px 0; color: var(--fg); }
.x-ta[hidden] { display: none; }
.x-ta-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 16px; border: 0; background: none; text-align: left; cursor: pointer; min-height: 48px; }
.x-ta-item:hover, .x-ta-item.is-sel { background: var(--bg-hover); }
.x-ta-item.is-sel { box-shadow: inset 3px 0 0 var(--link); }
.x-ta-hash { width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--bg-3); font-weight: 800; flex: none; }
.x-ta-compose { top: auto; margin-top: 4px; }
.x-h2 { font-size: 20px; font-weight: 800; line-height: 24px; padding: 14px 16px 10px; }
.x-person-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; transition: background-color .15s; }
.x-person-row:hover { background: var(--bg-hover); }
.x-person-row .x-person { padding: 0; flex: 1; min-width: 0; }
.x-person-row .x-person:hover { background: none; }
.x-person { display: flex; align-items: flex-start; gap: 12px; padding: 12px 16px; transition: background-color .15s; min-width: 0; }
.x-person:hover { background: var(--bg-hover); }
.x-person-text { display: flex; flex-direction: column; min-width: 0; }
.x-person-text strong, .x-person-text .x-muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.x-person-name { display: flex; align-items: center; min-width: 0; }
.x-person-bio { margin-top: 4px; font-size: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.x-trend-row { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; transition: background-color .15s; }
.x-trend-row:hover { background: var(--bg-hover); }
.x-trend-row strong { font-size: 15px; }
.x-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.x-chips:empty { display: none; }
.x-chip { display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; border-radius: 9999px; border: 1px solid var(--line-2); background: none; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background-color .15s; }
.x-chip:hover { background: var(--bg-hover); }
.x-chip.is-picked { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.x-chip-sm { min-height: 26px; padding: 0 10px; font-size: 13px; }
.x-topics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 0 16px 8px; }
.x-topic { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; }
.x-topic img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 12px; display: block; }
.x-topic:hover img { filter: brightness(.95); }
@media (max-width: 420px) { .x-topics { grid-template-columns: repeat(4, 1fr); gap: 6px; } .x-topic { font-size: 11px; } }

/* ---------- Profile ---------- */
.x-profile { border-bottom: 0; }
.x-banner { display: block; width: 100%; aspect-ratio: 3 / 1; background: var(--bg-3); overflow: hidden; }
.x-banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.x-profile-top { display: flex; justify-content: space-between; align-items: flex-start; padding: 12px 16px 0; min-height: 68px; }
.x-profile-av { margin-top: calc(-15% - 12px); border: 0; padding: 0; background: none; border-radius: 50%; cursor: pointer; flex: none; }
.x-profile-av .x-avatar, .x-profile-av-sk { --s: clamp(72px, 25vw, 134px) !important; border: 4px solid var(--bg); box-sizing: content-box; }
.x-profile-av-sk { margin-top: calc(-15% - 12px); }
.x-profile-actions { display: flex; gap: 8px; align-items: center; }
.x-profile-id { padding: 4px 16px 0; }
.x-profile-name { font-size: 20px; font-weight: 800; line-height: 24px; display: flex; align-items: center; flex-wrap: wrap; overflow-wrap: anywhere; }
.x-bio { padding: 12px 16px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.x-profile-meta { display: flex; align-items: center; gap: 4px; padding: 12px 16px 0; }
.x-profile-meta .x-ico { width: 18px; height: 18px; }
.x-counts { display: flex; gap: 20px; padding: 12px 16px; font-size: 14px; }
.x-counts a:hover { text-decoration: underline; }
.x-counts strong { color: var(--fg); }

/* ---------- Thread, inline reply ---------- */
.x-inline-reply { display: flex; gap: 12px; align-items: flex-start; width: 100%; padding: 12px 16px; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; position: relative; }
.x-inline-reply-join { align-items: center; cursor: pointer; }
.x-inline-reply-join .x-muted { flex: 1; font-size: 17px; }
.x-inline-reply-main { flex: 1; min-width: 0; position: relative; }
.x-inline-reply textarea { width: 100%; min-height: 40px; padding: 8px 0; border: 0; outline: none; resize: none; background: none; font-size: 17px; line-height: 24px; overflow: hidden; }
.x-inline-reply-bar { display: flex; justify-content: flex-end; align-items: center; gap: 12px; }

/* ---------- Compose ---------- */
.x-compose { padding: 4px 0 12px; }
.x-compose-parent .x-post { cursor: default; }
.x-compose-parent .x-post:hover { background: none; }
.x-compose-row { display: flex; gap: 12px; padding: 12px 16px 0; }
.x-compose-field { flex: 1; min-width: 0; position: relative; }
.x-compose textarea { width: 100%; min-height: 96px; padding: 8px 0; border: 0; outline: none; resize: none; background: none; font-size: 20px; line-height: 28px; overflow: hidden; }
.x-compose textarea::placeholder, .x-inline-reply textarea::placeholder { color: var(--fg-2); }
.x-compose-media { display: grid; gap: 8px; margin: 8px 0; grid-template-columns: repeat(2, 1fr); }
.x-compose-media.x-media-1 { grid-template-columns: 1fr; }
.x-compose-photo { position: relative; border-radius: var(--r); overflow: hidden; aspect-ratio: 1; background: var(--bg-3); }
.x-compose-media.x-media-1 .x-compose-photo { aspect-ratio: 4 / 5; max-height: 420px; }
.x-compose-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.x-photo-x { position: absolute; top: 6px; left: 6px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(15, 20, 25, 0.75); color: #fff !important; cursor: pointer; font-size: 14px; }
.x-photo-x:hover { background: rgba(39, 44, 48, 0.75); }
.x-frag-picker { position: relative; padding: 8px 16px 0 68px; }
.x-frag-picker .x-ta { left: 68px; right: 16px; }
.x-templates { display: flex; gap: 8px; padding: 12px 16px 0 68px; overflow-x: auto; scrollbar-width: none; }
.x-templates::-webkit-scrollbar { display: none; }
.x-compose-bar { display: flex; align-items: center; gap: 12px; margin: 12px 16px 0 68px; padding-top: 10px; border-top: 1px solid var(--line); }
.x-compose-bar .x-icon-btn { color: var(--accent); }
.x-compose-bar .x-icon-btn:hover { background: var(--accent-soft); }
.x-draft-state { flex: 1; }
.x-ring { position: relative; display: inline-grid; place-items: center; width: 24px; height: 24px; }
.x-ring svg { transform: rotate(-90deg); }
.x-ring circle { fill: none; stroke-width: 2; }
.x-ring-bg { stroke: var(--line); }
.x-ring-fg { stroke: var(--link); transition: stroke-dashoffset .1s; }
.x-ring.is-warn .x-ring-fg { stroke: #ffd400; }
.x-ring.is-over .x-ring-fg { stroke: #f4212e; }
.x-ring b { position: absolute; font-size: 11px; font-weight: 500; color: var(--fg-2); }
.x-ring.is-warn, .x-ring.is-over { width: 30px; height: 30px; }
.x-ring.is-over b { color: #f4212e; }
.x-quote-static { cursor: default; }
@media (max-width: 500px) {
  .x-frag-picker, .x-templates { padding-left: 16px; }
  .x-frag-picker .x-ta { left: 16px; }
  .x-compose-bar { margin-left: 16px; }
}

/* ---------- Notifications ---------- */
.x-note { display: flex; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); transition: background-color .15s; }
.x-note:hover { background: var(--bg-hover); }
.x-note.is-unread { background: var(--link-soft); }
.x-note-ic { width: 32px; display: flex; justify-content: flex-end; flex: none; }
.x-note-ic .x-ico { width: 26px; height: 26px; }
.x-note-like .x-ico { color: var(--like); fill: var(--like); }
.x-note-repost .x-ico, .x-note-quote .x-ico { color: var(--repost); stroke-width: 2.4; }
.x-note-follow .x-ico { color: var(--link); fill: var(--link); }
.x-note-reply .x-ico, .x-note-mention .x-ico { color: var(--link); }
.x-note-main { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.x-note-snippet { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- Tag, fragrance, dupes ---------- */
.x-tag-head { display: flex; gap: 14px; align-items: center; padding: 16px; }
.x-tag-head img { width: 96px; height: 96px; border-radius: var(--r); object-fit: cover; flex: none; }
.x-tag-head h2 { font-size: 23px; font-weight: 800; }
.x-tag-head-plain { padding-bottom: 0; }
.x-tag-cta { padding-top: 0; border-bottom: 1px solid var(--line); }
.x-frag { padding: 16px; border-bottom: 1px solid var(--line); }
.x-frag > p:first-child a:hover { text-decoration: underline; }
.x-frag > * + * { margin-top: 8px; }
.x-notes { margin: 12px 0 0; display: grid; gap: 10px; }
.x-notes div { display: grid; grid-template-columns: 60px 1fr; gap: 8px; align-items: start; }
.x-notes dt { font-weight: 700; font-size: 13px; color: var(--fg-2); padding-top: 4px; }
.x-notes dd { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.x-note-chip { display: inline-block; padding: 3px 10px; border-radius: 9999px; background: var(--bg-3); font-size: 14px; }
.x-frag-dupes { border-bottom: 1px solid var(--line); }
.x-dupe { padding: 10px 16px; border-bottom: 1px solid var(--line); }
.x-dupe:last-child { border-bottom: 0; }
.x-dupe p { margin-top: 4px; }
.x-dupe a, .x-frag a[target] { color: var(--link-text, var(--link)); }

/* ---------- Right sidebar ---------- */
.x-side-search { position: sticky; top: 0; z-index: 5; padding: 0 0 12px; background: var(--bg); }
.x-side-card { margin-bottom: 16px; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.x-side-card h2 { font-size: 20px; font-weight: 800; padding: 12px 16px; }
.x-side-more { display: block; padding: 16px; color: var(--link) !important; }
.x-side-more:hover { background: var(--bg-hover); }
.x-side-foot { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 0 16px; font-size: 13px; }
.x-side-foot a:hover { text-decoration: underline; }

/* ---------- Menus, lightbox, sheets ---------- */
.x-menu { position: absolute; z-index: 60; width: 240px; background: var(--bg-elev); border-radius: 12px; box-shadow: var(--shadow); padding: 4px 0; overflow: hidden; animation: x-fade .12s ease; }
.x-menu button { display: block; width: 100%; padding: 12px 16px; border: 0; background: none; text-align: left; font-weight: 700; cursor: pointer; }
.x-menu button:hover, .x-menu button:focus-visible { background: var(--bg-hover); outline: none; }
.x-menu .is-danger { color: #f4212e; }
@keyframes x-fade { from { opacity: 0; } to { opacity: 1; } }
.x-lightbox { position: fixed; inset: 0; z-index: 1100; background: rgba(0, 0, 0, 0.92); display: grid; place-items: center; animation: x-fade .15s ease; }
.x-lb-img { max-width: 100vw; max-height: 100vh; object-fit: contain; }
.x-lb-close, .x-lb-nav { position: absolute; border: 0; width: 40px; height: 40px; border-radius: 50%; background: rgba(15, 20, 25, 0.75); color: #fff !important; font-size: 20px; cursor: pointer; display: grid; place-items: center; }
.x-lb-close { top: calc(12px + env(safe-area-inset-top)); left: 12px; font-size: 16px; }
.x-lb-prev { left: 12px; top: 50%; transform: translateY(-50%); font-size: 28px; }
.x-lb-next { right: 12px; top: 50%; transform: translateY(-50%); font-size: 28px; }
.x-lb-close:hover, .x-lb-nav:hover { background: rgba(39, 44, 48, 0.9); }
.x-lb-count { position: absolute; bottom: calc(16px + env(safe-area-inset-bottom)); color: #fff; font-size: 14px; }
.x-sheet-wrap { position: fixed; inset: 0; z-index: 1000; background: var(--overlay); display: flex; align-items: flex-end; justify-content: center; animation: x-fade .15s ease; }
.x-sheet { background: var(--bg); color: var(--fg); width: 100%; max-width: 520px; border-radius: 20px 20px 0 0; padding: 20px 20px calc(20px + env(safe-area-inset-bottom)); max-height: 90vh; overflow: auto; }
@media (min-width: 700px) { .x-sheet-wrap { align-items: center; } .x-sheet { border-radius: 20px; } }
.x-sheet h2 { margin: 12px 0 6px; font-size: 23px; font-weight: 800; }
.x-sheet-art { width: 100%; height: auto; border-radius: 14px; aspect-ratio: 3 / 2; object-fit: cover; display: block; }
.x-sheet-actions, .x-share-grid { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.x-sheet-actions .x-btn { flex: 1 1 140px; min-height: 44px; }
.x-share-grid .x-btn { flex: 1 1 140px; min-height: 44px; }
.x-share-preview { display: flex; justify-content: center; min-height: 80px; }
.x-share-preview img { border-radius: 12px; box-shadow: var(--shadow); width: 216px; height: auto; }
.x-sheet-close { width: 100%; margin-top: 4px; }

/* ---------- A11y ---------- */
.x-skip { position: absolute; left: -9999px; top: 0; z-index: 2000; background: var(--fg); color: var(--bg) !important; padding: 10px 14px; border-radius: 0 0 8px 0; font-weight: 700; }
.x-skip:focus { left: 0; }
.x-body a:focus-visible, .x-body button:focus-visible, .x-body input:focus-visible, .x-body textarea:focus-visible, .x-body [tabindex]:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.x-body .x-searchbox input:focus-visible, .x-body .x-compose textarea:focus-visible, .x-body .x-inline-reply textarea:focus-visible { outline: none; }
@media (prefers-reduced-motion: reduce) { .x-body *, .x-body *::before, .x-body *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
@media (forced-colors: active) { .x-act.is-on { outline: 1px solid; } }

/* Reserve space so the footer does not jump while the feed loads (CLS). */
#x-view { min-height: 100vh; min-height: 100dvh; }
/* Links inside running text need more than color to stand out (WCAG 1.4.1). */
p.x-muted a:not(.x-btn), p.x-fine a:not(.x-btn) { text-decoration: underline; text-underline-offset: 2px; }

/* Video posts (Cloudflare Stream) */
.x-video{position:relative;margin-top:10px;border-radius:16px;overflow:hidden;background:#000;aspect-ratio:var(--ar,16/9);max-height:520px;border:1px solid var(--x-line,#e5e7eb);cursor:pointer}
.x-video.is-tall{max-width:320px}
.x-video-frame,.x-video-frame iframe,.x-video-poster{position:absolute;inset:0;width:100%;height:100%;border:0;object-fit:cover}
.x-video-play{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:56px;height:56px;border-radius:50%;border:0;background:rgba(0,0,0,.6);color:#fff;font-size:22px;cursor:pointer}
.x-video.is-playing .x-video-play,.x-video.is-playing .x-video-poster{display:none}
.x-video-sound{position:absolute;right:10px;bottom:10px;border:0;border-radius:999px;padding:6px 12px;background:rgba(0,0,0,.65);color:#fff;font:600 13px/1 inherit;cursor:pointer}
.x-video.has-sound .x-video-sound,.x-video.has-sound .x-video-time{display:none}
.x-video-time{position:absolute;left:10px;bottom:10px;padding:3px 7px;border-radius:6px;background:rgba(0,0,0,.65);color:#fff;font-size:12px}
.x-video-pending{display:flex;align-items:center;justify-content:center;gap:8px;min-height:120px;aspect-ratio:auto;background:var(--x-soft,#f3f4f6);color:var(--x-muted,#6b7280);font-size:14px;text-align:center;padding:12px;cursor:default}
.x-video-pending img{max-height:96px;border-radius:8px}
.x-compose-video video{width:100%;max-height:360px;border-radius:12px;background:#000}

/* Home > Vault tab: the member's Scent Vault inline in the feed column. */
.x-vault-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;border-bottom:1px solid rgba(15,20,25,.08)}
.x-vault-head p{margin:0}
.x-vault-total{font-size:24px;font-weight:800;line-height:1.2}
.x-vault-list{list-style:none;margin:0;padding:0}
.x-vault-item a{display:flex;align-items:center;gap:12px;padding:12px 16px;border-bottom:1px solid rgba(15,20,25,.08);color:inherit;text-decoration:none}
.x-vault-item a:hover{background:rgba(15,20,25,.03)}
.x-vault-thumb{flex:none;width:56px;height:56px;border-radius:12px;overflow:hidden;background:#f6f1ec}
.x-vault-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.x-vault-text{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.x-vault-brand{font-size:12px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:#be185d}
.x-vault-name{font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.x-vault-val{flex:none;font-weight:700}
html[data-theme="dark"] .x-vault-head,html[data-theme="dark"] .x-vault-item a{border-color:#2f3336}
@media (prefers-color-scheme:dark){html:not([data-theme="light"]) .x-vault-head,html:not([data-theme="light"]) .x-vault-item a{border-color:#2f3336}html:not([data-theme="light"]) .x-vault-thumb{background:#16181c}}
