/* ==========================================================================
   Glassay — glass UI
   Light theme is the base; dark overrides follow. Tokens drive everything.
   ========================================================================== */

:root {
  --app-version: "2.27.0"; /* must match APP_VERSION — lets pages detect an outdated cached stylesheet */
  --font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --bg: #eef0fb;
  --blob-1: #c4b5fd;
  --blob-2: #a5f3fc;
  --blob-3: #fbcfe8;
  --blob-4: #bfdbfe;
  --blob-opacity: .75;

  --glass: rgba(255, 255, 255, .55);
  --glass-strong: rgba(255, 255, 255, .72);
  --glass-hover: rgba(255, 255, 255, .78);
  --glass-border: rgba(255, 255, 255, .85);
  --glass-edge: rgba(15, 23, 42, .06);
  --glass-shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 10px 30px -12px rgba(49, 46, 129, .18), 0 2px 6px -2px rgba(49, 46, 129, .08);
  --input: rgba(255, 255, 255, .7);
  --input-border: rgba(15, 23, 42, .1);

  --text: #141428;
  --text-soft: #3b3b55;
  --muted: #6a6a85;
  --line: rgba(15, 23, 42, .08);

  --accent: #7c3aed;
  --accent-2: #0891b2;
  --accent-3: #db2777;
  --accent-ink: #6d28d9;
  --grad: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 55%, #ec4899 110%);
  --grad-soft: linear-gradient(135deg, rgba(139,92,246,.14), rgba(6,182,212,.12));
  --like: #e11d48;
  --danger: #dc2626;
  --success: #059669;
  --focus: 0 0 0 3px rgba(124, 58, 237, .35);

  --blur: 22px;
  --r-lg: 22px;
  --r-md: 16px;
  --r-sm: 12px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}

/* Dark palette — applied by data-theme, or by the OS when JS is off. */
:root[data-theme="dark"] {
  --bg: #07070f;
  --blob-1: #6d28d9;
  --blob-2: #0e7490;
  --blob-3: #be185d;
  --blob-4: #1d4ed8;
  --blob-opacity: .55;
  --glass: rgba(255, 255, 255, .055);
  --glass-strong: rgba(18, 18, 34, .62);
  --glass-hover: rgba(255, 255, 255, .09);
  --glass-border: rgba(255, 255, 255, .11);
  --glass-edge: rgba(255, 255, 255, .04);
  --glass-shadow: 0 1px 0 rgba(255,255,255,.07) inset, 0 20px 40px -20px rgba(0,0,0,.6);
  --input: rgba(255, 255, 255, .06);
  --input-border: rgba(255, 255, 255, .12);
  --text: #f3f3fb;
  --text-soft: #cfd0e6;
  --muted: #9a9bb8;
  --line: rgba(255, 255, 255, .08);
  --accent: #a78bfa;
  --accent-2: #22d3ee;
  --accent-3: #f472b6;
  --accent-ink: #c4b5fd;
  --grad-soft: linear-gradient(135deg, rgba(167,139,250,.18), rgba(34,211,238,.12));
  --like: #fb7185;
  --danger: #f87171;
  --success: #34d399;
  --focus: 0 0 0 3px rgba(167, 139, 250, .45);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #07070f; --blob-1: #6d28d9; --blob-2: #0e7490; --blob-3: #be185d; --blob-4: #1d4ed8; --blob-opacity: .55;
    --glass: rgba(255,255,255,.055); --glass-strong: rgba(18,18,34,.62); --glass-hover: rgba(255,255,255,.09);
    --glass-border: rgba(255,255,255,.11); --glass-edge: rgba(255,255,255,.04);
    --glass-shadow: 0 1px 0 rgba(255,255,255,.07) inset, 0 20px 40px -20px rgba(0,0,0,.6);
    --input: rgba(255,255,255,.06); --input-border: rgba(255,255,255,.12);
    --text: #f3f3fb; --text-soft: #cfd0e6; --muted: #9a9bb8; --line: rgba(255,255,255,.08);
    --accent: #a78bfa; --accent-2: #22d3ee; --accent-3: #f472b6; --accent-ink: #c4b5fd;
    --like: #fb7185; --danger: #f87171; --success: #34d399; color-scheme: dark;
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  transition: background-color .4s var(--ease), color .3s var(--ease);
}
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -.02em; }
p { margin: 0 0 .75em; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 10px; }
code { font-size: .88em; padding: .1em .4em; border-radius: 6px; background: var(--input); border: 1px solid var(--input-border); }
.sr-only, .hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; border-radius: 10px; background: var(--glass-strong); }
.skip-link:focus { top: 12px; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.center { text-align: center; }
.right { text-align: right; }
[hidden] { display: none !important; }
.icon { width: 20px; height: 20px; flex: none; }

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Background ---------- */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.blob {
  position: absolute;
  width: 46vmax; height: 46vmax;
  border-radius: 50%;
  filter: blur(70px);
  opacity: var(--blob-opacity);
  transition: background-color .6s var(--ease), opacity .6s var(--ease);
  animation: drift 28s ease-in-out infinite alternate;
}
.b1 { background: var(--blob-1); top: -18vmax; left: -12vmax; }
.b2 { background: var(--blob-2); top: 20vh; right: -18vmax; animation-duration: 34s; animation-delay: -6s; }
.b3 { background: var(--blob-3); bottom: -22vmax; left: 18vw; animation-duration: 38s; animation-delay: -12s; }
.b4 { background: var(--blob-4); top: 40vh; left: -20vmax; width: 30vmax; height: 30vmax; animation-duration: 30s; animation-delay: -3s; }
.grain {
  position: absolute; inset: 0; opacity: .06; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@keyframes drift {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(6vw, 4vh) scale(1.08); }
  100% { transform: translate(-4vw, 8vh) scale(.95); }
}

/* ---------- Glass surfaces ---------- */
.glass, .glass-strong {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(160%);
  backdrop-filter: blur(var(--blur)) saturate(160%);
  border-radius: var(--r-lg);
  transition: background-color .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.glass-strong { background: var(--glass-strong); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background: var(--glass-strong); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 650;
  font-size: .95rem;
  line-height: 1.2;
  text-decoration: none !important;
  white-space: nowrap;
  transition: transform .15s var(--ease), box-shadow .2s var(--ease), background-color .2s var(--ease), opacity .2s;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .55; cursor: default; }
.btn .icon { width: 18px; height: 18px; }
.btn-primary {
  color: #fff;
  background: var(--grad);
  background-size: 140% 140%;
  box-shadow: 0 8px 22px -10px rgba(124, 58, 237, .7), inset 0 1px 0 rgba(255,255,255,.3);
}
.btn-primary:hover { box-shadow: 0 10px 28px -8px rgba(124, 58, 237, .8), inset 0 1px 0 rgba(255,255,255,.35); background-position: 100% 0; }
.btn-ghost {
  background: var(--glass);
  border-color: var(--glass-border);
  color: var(--text);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.btn-ghost:hover { background: var(--glass-hover); }
.btn-danger { background: transparent; color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.btn-danger:hover { background: color-mix(in srgb, var(--danger) 12%, transparent); }
.btn-sm { padding: 7px 14px; font-size: .85rem; }
.btn-lg { padding: 13px 22px; font-size: 1rem; }
.btn-block { width: 100%; }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 0; background: transparent;
  color: var(--text-soft);
  transition: background-color .2s var(--ease), color .2s, transform .15s;
  flex: none;
}
.icon-btn:hover { background: var(--glass-hover); color: var(--text); text-decoration: none; }
.icon-btn:active { transform: scale(.92); }
.icon-btn.accent { color: var(--accent); }
.icon-btn.tiny { width: 26px; height: 26px; }
.icon-btn.tiny .icon { width: 14px; height: 14px; }
.glass-btn { background: var(--glass); border: 1px solid var(--glass-border); }

/* Theme toggle shows the icon for the current preference. */
.theme-toggle .ti { display: none; }
:root:not([data-theme-pref]) .theme-toggle .ti-system,
:root[data-theme-pref="system"] .theme-toggle .ti-system,
:root[data-theme-pref="light"] .theme-toggle .ti-light,
:root[data-theme-pref="dark"] .theme-toggle .ti-dark { display: grid; }
.theme-toggle .ti { animation: spin-in .35s var(--ease); }
@keyframes spin-in { from { transform: rotate(-60deg) scale(.6); opacity: 0; } }

/* ---------- Forms ---------- */
.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 6px; font-size: .86rem; font-weight: 600; color: var(--text-soft); }
input:not([type=checkbox]):not([type=radio]):not([type=file]), textarea, select {
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--input-border);
  background: var(--input);
  color: var(--text);
  font-weight: 500;
  font-size: .95rem;
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .85; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
textarea { resize: vertical; min-height: 44px; }
fieldset { border: 0; padding: 0; margin: 0 0 6px; display: grid; gap: 12px; }
legend { font-weight: 750; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 10px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.input-prefix { display: flex; align-items: center; border-radius: var(--r-sm); border: 1px solid var(--input-border); background: var(--input); }
.input-prefix:focus-within { border-color: var(--accent); box-shadow: var(--focus); }
.input-prefix > span { padding-left: 14px; color: var(--muted); font-weight: 600; }
.input-prefix input { border: 0 !important; background: transparent !important; box-shadow: none !important; padding-left: 4px !important; }
.check { display: flex !important; grid-template-columns: none; align-items: center; gap: 8px; font-weight: 500 !important; }
.checks:empty { display: none; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 16px; height: 16px; }

.seg { display: flex; flex-wrap: wrap; gap: 6px; padding: 5px; border-radius: 999px; background: var(--input); border: 1px solid var(--input-border); width: fit-content; }
.seg label { display: flex !important; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; cursor: pointer; font-weight: 600 !important; font-size: .88rem; color: var(--text-soft); transition: background-color .2s, color .2s; }
.seg label .icon { width: 16px; height: 16px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:checked) { background: var(--glass-strong); color: var(--text); box-shadow: 0 2px 10px -4px rgba(0,0,0,.25); }
.seg label:has(input:focus-visible) { box-shadow: var(--focus); }

/* ---------- Alerts / pills / badges ---------- */
.alert { padding: 12px 16px; border-radius: var(--r-md); font-weight: 600; font-size: .92rem; margin-bottom: 14px; }
.alert-success { color: var(--success); border-color: color-mix(in srgb, var(--success) 35%, transparent); }
.alert-error { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
.pill { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px; font-size: .72rem; font-weight: 700; letter-spacing: .02em; color: #fff; background: var(--grad); vertical-align: middle; }
.pill-soft { background: var(--input); color: var(--text-soft); border: 1px solid var(--input-border); }
.pill-danger { background: color-mix(in srgb, var(--danger) 16%, transparent); color: var(--danger); }
.badge {
  position: absolute; top: -6px; right: -9px;
  min-width: 18px; height: 18px; padding: 0 5px;
  display: grid; place-items: center;
  border-radius: 999px;
  font-size: .68rem; font-weight: 800; line-height: 1;
  color: #fff; background: linear-gradient(135deg, #f43f5e, #ec4899);
  box-shadow: 0 0 0 2px var(--bg), 0 4px 10px -2px rgba(236, 72, 153, .6);
  animation: pop .35s var(--ease);
}
.badge.inline { position: static; display: inline-grid; box-shadow: none; margin-left: 4px; }
@keyframes pop { from { transform: scale(.4); } 60% { transform: scale(1.15); } }

/* ---------- Avatars ---------- */
.avatar { border-radius: 50%; object-fit: cover; flex: none; background: var(--input); }
.avatar-sm { width: 34px; height: 34px; }
.avatar-md { width: 44px; height: 44px; }
.avatar-xl { width: 112px; height: 112px; }
.avatar-initial {
  display: inline-grid; place-items: center;
  color: #fff; font-weight: 750;
  background: linear-gradient(135deg, hsl(var(--h) 80% 62%), hsl(calc(var(--h) + 50) 85% 55%));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35);
}
.avatar-sm.avatar-initial { font-size: .85rem; }
.avatar-md.avatar-initial { font-size: 1.05rem; }
.avatar-xl.avatar-initial { font-size: 2.6rem; }

/* ---------- Shell ---------- */
.shell {
  display: grid;
  grid-template-columns: 250px minmax(0, 620px) 320px;
  gap: 24px;
  max-width: 1290px;
  margin: 0 auto;
  padding: 20px 20px 40px;
  align-items: start;
}
.shell.no-right { grid-template-columns: 250px minmax(0, 1fr); max-width: 1150px; }
.main { min-width: 0; outline: none; display: grid; gap: 14px; align-content: start; }

.sidebar { position: sticky; top: 20px; height: calc(100vh - 40px); }
.sidebar-inner { height: 100%; display: flex; flex-direction: column; gap: 8px; padding: 18px 14px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.25rem; letter-spacing: -.03em; color: var(--text); padding: 4px 8px 14px; }
.brand:hover { text-decoration: none; }
.logo-mark { filter: drop-shadow(0 4px 10px rgba(124,58,237,.45)); }
.nav { display: grid; gap: 2px; }
.nav-link {
  display: flex; align-items: center; gap: 14px;
  padding: 11px 14px;
  border-radius: 14px;
  color: var(--text-soft);
  font-weight: 600;
  transition: background-color .2s var(--ease), color .2s, transform .15s;
}
.nav-link:hover { background: var(--glass-hover); color: var(--text); text-decoration: none; }
.nav-link[aria-current="page"] { background: var(--grad-soft); color: var(--text); font-weight: 750; box-shadow: inset 0 0 0 1px var(--glass-border); }
.nav-link[aria-current="page"] .icon { color: var(--accent); }
.nav-icon { position: relative; display: grid; place-items: center; }
.nav-icon .icon { width: 22px; height: 22px; }
.compose-btn { margin: 10px 4px 0; }
.sidebar-me { margin-top: auto; display: flex; align-items: center; gap: 4px; padding-top: 12px; border-top: 1px solid var(--line); }
.sidebar-me-link { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 12px; color: var(--text); }
.sidebar-me-link:hover { background: var(--glass-hover); text-decoration: none; }
.sidebar-me-link span { min-width: 0; display: grid; line-height: 1.25; }
.sidebar-me-link strong, .sidebar-me-link small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-me-link small { color: var(--muted); font-size: .8rem; }
.sidebar-me form { margin: 0; }
.sidebar-me > .muted { flex: 1; padding-left: 8px; }

.rightbar { position: sticky; top: 20px; display: grid; gap: 14px; }
.panel { padding: 18px; }
.panel-title { display: flex; align-items: center; gap: 8px; font-size: 1rem; font-weight: 750; margin-bottom: 12px; }
.panel-title .icon { width: 18px; height: 18px; color: var(--accent); }
.search-pill { display: flex; align-items: center; gap: 10px; padding: 4px 6px 4px 16px; border-radius: 999px; }
.search-pill .icon { color: var(--muted); width: 18px; height: 18px; }
.search-pill input { border: 0 !important; background: transparent !important; box-shadow: none !important; padding: 9px 4px !important; }
.trend-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.trend-list a { display: flex; justify-content: space-between; align-items: baseline; padding: 8px 10px; border-radius: 10px; color: var(--text); font-weight: 650; }
.trend-list a:hover { background: var(--glass-hover); text-decoration: none; }
.trend-list small { color: var(--muted); font-weight: 500; }
.footer-note { color: var(--muted); font-size: .78rem; text-align: center; margin: 0; }

.topbar, .tabbar { display: none; }

/* ---------- Page bits ---------- */
.page-head { display: flex; align-items: center; gap: 12px; padding: 2px 4px; }
.page-head h1 { font-size: 1.5rem; font-weight: 800; }
.section-title { font-size: 1.05rem; font-weight: 750; margin: 8px 4px 0; }
.tabs { display: flex; padding: 5px; gap: 4px; border-radius: 999px; }
.tab { flex: 1; text-align: center; padding: 9px 12px; border-radius: 999px; color: var(--muted); font-weight: 650; font-size: .92rem; transition: background-color .2s, color .2s; }
.tab:hover { color: var(--text); text-decoration: none; background: var(--glass-hover); }
.tab[aria-selected="true"] { color: var(--text); background: var(--glass-strong); box-shadow: 0 4px 14px -6px rgba(0,0,0,.25), inset 0 0 0 1px var(--glass-border); }
.empty { padding: 40px 24px; text-align: center; display: grid; justify-items: center; gap: 8px; }
.empty h2 { font-size: 1.15rem; }
.empty p { margin: 0; }
.empty-icon { width: 44px; height: 44px; color: var(--accent); opacity: .85; margin-bottom: 4px; }
.feed { display: grid; gap: 14px; }
.load-more { justify-self: center; margin: 4px auto; }
.feed-end { text-align: center; margin: 6px 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 8px 14px; border-radius: 999px; font-weight: 650; color: var(--text); }
.chip small { color: var(--muted); margin-left: 4px; }
.chip:hover { text-decoration: none; background: var(--glass-hover); }
.search-hero { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 18px; border-radius: 999px; }
.search-hero > .icon { color: var(--muted); }
.search-hero input { border: 0 !important; background: transparent !important; box-shadow: none !important; padding: 10px 4px !important; font-size: 1rem !important; }

/* ---------- Composer ---------- */
.composer { padding: 16px 16px 12px; }
.composer-row { display: flex; gap: 12px; align-items: flex-start; }
.composer textarea {
  border: 0 !important; background: transparent !important; box-shadow: none !important;
  padding: 10px 2px !important; font-size: 1.08rem !important; resize: none; min-height: 48px; max-height: 360px;
}
.composer-preview { position: relative; margin: 8px 0 4px 56px; border-radius: var(--r-md); overflow: hidden; width: fit-content; max-width: calc(100% - 56px); }
.composer-preview img { max-height: 320px; border-radius: var(--r-md); }
.composer-remove { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,.55); color: #fff; }
.composer-remove:hover { background: rgba(0,0,0,.75); color: #fff; }
.composer-bar { display: flex; align-items: center; gap: 8px; margin-left: 50px; padding-top: 8px; border-top: 1px solid var(--line); }
.composer-bar label.icon-btn { cursor: pointer; }
.char-count { margin-left: auto; font-size: .8rem; font-weight: 650; color: var(--muted); font-variant-numeric: tabular-nums; }
.char-count.warn { color: #d97706; }
.char-count.over { color: var(--danger); }

/* ---------- Posts ---------- */
.post { padding: 16px 18px 10px; }
.post:hover { border-color: color-mix(in srgb, var(--accent) 22%, var(--glass-border)); }
.post-head { display: flex; align-items: center; gap: 12px; }
.post-avatar { display: block; border-radius: 50%; }
.post-meta { flex: 1; min-width: 0; display: grid; line-height: 1.3; }
.post-name { color: var(--text); font-weight: 750; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-sub { color: var(--muted); font-size: .85rem; }
.post-sub a { color: inherit; }
.post-body { margin: 10px 0 4px; font-size: 1rem; line-height: 1.6; overflow-wrap: anywhere; color: var(--text); }
.post-body a, .profile-bio a, .comment-bubble a, .msg-bubble a { font-weight: 600; }
.post-image {
  display: block; width: 100%; margin: 12px 0 4px; padding: 0;
  border: 1px solid var(--glass-border); border-radius: var(--r-md); overflow: hidden; background: var(--input);
  cursor: zoom-in;
}
.post-image img { width: 100%; max-height: 560px; object-fit: cover; transition: transform .6s var(--ease); }
.post-image:hover img { transform: scale(1.02); }
.post-actions { display: flex; gap: 6px; margin-top: 8px; margin-left: -8px; }
.action {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 12px; border-radius: 999px; border: 0; background: transparent;
  color: var(--muted); font-weight: 650; font-size: .88rem;
  transition: background-color .2s, color .2s;
}
.action:hover { background: var(--glass-hover); color: var(--text); text-decoration: none; }
.action .icon { width: 19px; height: 19px; }
.action-share { margin-left: auto; }
.like:hover { color: var(--like); }
.like.is-liked { color: var(--like); }
.like.is-liked .icon { fill: currentColor; }
.like.pulse .icon { animation: heart .45s var(--ease); }
@keyframes heart { 30% { transform: scale(1.35); } 60% { transform: scale(.9); } }

.menu-wrap { position: relative; }
.menu {
  position: absolute; right: 0; top: 40px; z-index: 20;
  min-width: 190px; padding: 6px; border-radius: var(--r-md);
  display: grid; gap: 2px;
  animation: menu-in .18s var(--ease);
}
.menu button { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 0; border-radius: 10px; background: transparent; text-align: left; font-weight: 600; font-size: .9rem; color: var(--text); }
.menu button:hover { background: var(--glass-hover); }
.menu button .icon { width: 17px; height: 17px; color: var(--muted); }
.menu .danger, .menu .danger .icon { color: var(--danger); }
@keyframes menu-in { from { opacity: 0; transform: translateY(-6px) scale(.97); } }

.comments { margin: 8px -6px 4px; padding: 12px 6px 4px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.comment-list { display: grid; gap: 10px; }
.comment { display: flex; gap: 10px; align-items: flex-start; animation: rise .3s var(--ease); }
.comment-bubble { flex: 1; min-width: 0; padding: 8px 12px; border-radius: 4px 16px 16px 16px; background: var(--input); border: 1px solid var(--input-border); }
.comment-head { display: flex; align-items: center; gap: 8px; }
.comment-head .post-name { font-size: .9rem; }
.comment-head .icon-btn { margin-left: auto; }
.comment-bubble p { margin: 2px 0 0; font-size: .93rem; overflow-wrap: anywhere; }
.comment-form { display: flex; align-items: center; gap: 8px; }
.comment-form input { border-radius: 999px !important; padding: 9px 14px !important; }
.empty-comments { margin: 0; padding: 2px 4px; }

/* ---------- People ---------- */
.user-row { display: flex; align-items: center; gap: 12px; padding: 8px 4px; }
.user-row + .user-row { border-top: 1px solid var(--line); }
.user-row-meta { flex: 1; min-width: 0; display: grid; line-height: 1.3; }
.user-row-meta .post-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.people-list { padding: 8px 16px; }

/* ---------- Profile ---------- */
.profile { overflow: hidden; padding: 0; }
.profile-cover {
  height: 200px;
  background: var(--grad);
  background-size: cover; background-position: center;
  position: relative;
}
.profile-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.25)); }
.profile-main { padding: 0 22px 20px; position: relative; }
.profile-avatar { margin-top: -58px; position: relative; z-index: 1; width: fit-content; border-radius: 50%; padding: 5px; background: var(--glass-strong); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: 0 10px 30px -10px rgba(0,0,0,.4); }
.profile-actions { position: absolute; top: 14px; right: 22px; display: flex; gap: 8px; align-items: center; }
.profile-name { font-size: 1.5rem; font-weight: 800; margin-top: 12px; }
.profile-handle { color: var(--muted); margin: 2px 0 10px; font-weight: 500; }
.profile-bio { font-size: 1rem; color: var(--text); white-space: pre-line; }
.profile-facts { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); font-size: .9rem; }
.profile-facts li { display: flex; align-items: center; gap: 6px; }
.profile-facts .icon { width: 16px; height: 16px; }
.profile-stats { display: flex; gap: 22px; }
.profile-stats a { color: var(--muted); font-size: .92rem; }
.profile-stats strong { color: var(--text); font-weight: 800; margin-right: 3px; }

/* ---------- Notifications ---------- */
.notif-list { display: grid; gap: 10px; }
.notif { display: flex; align-items: center; gap: 12px; padding: 14px 16px; color: var(--text); }
.notif:hover { text-decoration: none; background: var(--glass-hover); }
.notif.unread { border-color: color-mix(in srgb, var(--accent) 45%, var(--glass-border)); background: var(--grad-soft), var(--glass); }
.notif-icon { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.notif-icon .icon { width: 17px; height: 17px; }
.notif-like { color: var(--like); background: color-mix(in srgb, var(--like) 14%, transparent); }
.notif-like .icon { fill: currentColor; }
.notif-comment { color: var(--accent-2); background: color-mix(in srgb, var(--accent-2) 14%, transparent); }
.notif-follow { color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.notif-mention { color: var(--accent-3); background: color-mix(in srgb, var(--accent-3) 14%, transparent); }
.notif-text { flex: 1; min-width: 0; font-size: .94rem; }
.notif-text time { color: var(--muted); }
.notif-snippet { display: block; color: var(--muted); font-size: .86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }

/* ---------- Messages ---------- */
.dm { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 14px; height: calc(100vh - 40px); min-height: 480px; }
.dm-list { display: flex; flex-direction: column; overflow: hidden; }
.dm-list-head { padding: 18px 18px 10px; }
.dm-list-head h1 { font-size: 1.35rem; font-weight: 800; }
.dm-convos { overflow-y: auto; padding: 4px 8px 12px; display: grid; gap: 2px; align-content: start; }
.dm-convo { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; color: var(--text); position: relative; }
.dm-convo:hover { background: var(--glass-hover); text-decoration: none; }
.dm-convo.is-active { background: var(--grad-soft); box-shadow: inset 0 0 0 1px var(--glass-border); }
.dm-convo-text { min-width: 0; flex: 1; display: grid; line-height: 1.35; }
.dm-convo-text strong { font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-convo-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .84rem; }
.dm-convo.is-unread .dm-convo-text small { color: var(--text); font-weight: 650; }
.dot-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--grad); color: #fff; font-size: .72rem; font-weight: 800; display: grid; place-items: center; }
.dm-empty { padding: 20px; text-align: center; display: grid; justify-items: center; gap: 8px; }
.dm-thread { display: flex; flex-direction: column; overflow: hidden; }
.dm-thread-head { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.dm-who { display: flex; align-items: center; gap: 10px; color: var(--text); }
.dm-who:hover { text-decoration: none; }
.dm-who span { display: grid; line-height: 1.25; }
.dm-who small { font-size: .8rem; }
.dm-back { display: none; }
.dm-messages { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 6px; scroll-behavior: smooth; }
.dm-start { margin: auto 0 12px; }
.msg { display: flex; flex-direction: column; max-width: 76%; animation: rise .25s var(--ease); }
.msg-out { align-self: flex-end; align-items: flex-end; }
.msg-in { align-self: flex-start; align-items: flex-start; }
.msg-bubble { padding: 9px 14px; border-radius: 18px; font-size: .95rem; overflow-wrap: anywhere; line-height: 1.45; }
.msg-in .msg-bubble { background: var(--glass-strong); border: 1px solid var(--glass-border); border-bottom-left-radius: 6px; }
.msg-out .msg-bubble { background: var(--grad); color: #fff; border-bottom-right-radius: 6px; box-shadow: 0 6px 18px -10px rgba(124,58,237,.8); }
.msg-out .msg-bubble a { color: #fff; text-decoration: underline; }
.msg-time { font-size: .7rem; color: var(--muted); margin: 2px 6px 4px; }
.dm-compose { display: flex; align-items: flex-end; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.dm-compose textarea { border-radius: 22px !important; resize: none; max-height: 160px; padding: 11px 16px !important; }
.send-btn { width: 44px; height: 44px; background: var(--grad); color: #fff !important; box-shadow: 0 6px 16px -8px rgba(124,58,237,.9); }
.send-btn:hover { background: var(--grad); filter: brightness(1.08); }
.dm-placeholder { margin: auto; text-align: center; display: grid; justify-items: center; gap: 8px; padding: 24px; }

/* ---------- Settings ---------- */
.settings-section { scroll-margin-top: 90px; }
.settings-media { position: relative; margin-bottom: 52px; }
.settings-cover { height: 140px; border-radius: var(--r-md); background: var(--grad); background-size: cover; background-position: center; }
.settings-avatar { position: absolute; left: 18px; bottom: -48px; padding: 4px; border-radius: 50%; background: var(--glass-strong); }
.settings-avatar .avatar { width: 96px; height: 96px; }
.file-btn { cursor: pointer; display: inline-flex !important; grid-template-columns: none; }
.danger-zone { border-color: color-mix(in srgb, var(--danger) 30%, var(--glass-border)); }
.danger-zone .panel-title .icon { color: var(--danger); }
.mobile-only { display: none; }

/* ---------- Admin ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stat { padding: 18px; display: grid; gap: 2px; }
.stat-icon { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--grad-soft); color: var(--accent); margin-bottom: 8px; }
.stat-label { color: var(--muted); font-weight: 650; font-size: .85rem; }
.stat-num { font-size: 1.9rem; font-weight: 800; letter-spacing: -.03em; }
.table-wrap { overflow-x: auto; padding: 6px; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 10px 12px; }
.table td { padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: middle; }
.table th.right, .table td.right { text-align: right; }
.table-user { display: flex; align-items: center; gap: 10px; color: var(--text); }
.table-user span { display: grid; line-height: 1.25; }
.inline-actions { display: inline-flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; margin: 0; }
.admin-search { max-width: 460px; }
.pager { display: flex; justify-content: center; align-items: center; gap: 12px; }
.report { padding: 16px; display: grid; gap: 10px; }
.report-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.report-reasons { margin: 0; padding-left: 18px; font-size: .9rem; color: var(--text-soft); }
.report-post .post { box-shadow: none; }

/* ---------- Auth & install ---------- */
.auth-page { display: grid; min-height: 100vh; }
.auth-theme { position: fixed; top: 16px; right: 16px; z-index: 5; }
.auth-theme .icon-btn { background: var(--glass); border: 1px solid var(--glass-border); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.auth-shell { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; max-width: 1080px; width: 100%; margin: auto; padding: 48px 24px; }
.auth-brand { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 1.4rem; letter-spacing: -.03em; margin-bottom: 26px; }
.hero-title { font-size: clamp(2.2rem, 4.6vw, 3.6rem); font-weight: 800; letter-spacing: -.045em; line-height: 1.05; }
.hero-sub { font-size: 1.12rem; color: var(--text-soft); margin-top: 18px; max-width: 30ch; }
.hero-cards { position: relative; height: 210px; margin-top: 30px; }
.hero-card { position: absolute; display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-radius: 18px; animation: float 7s ease-in-out infinite; }
.hero-card p { margin: 0; font-size: .9rem; color: var(--text-soft); }
.hero-card strong { font-size: .9rem; }
.hero-card.c1 { top: 0; left: 0; }
.hero-card.c2 { top: 70px; left: 300px; animation-delay: -2s; }
.hero-card.c3 { top: 130px; left: 60px; animation-delay: -4s; }
.hero-like { display: flex; align-items: center; gap: 6px; color: var(--like); font-weight: 800; }
.hero-like .icon { fill: currentColor; }
@keyframes float { 50% { transform: translateY(-10px); } }
.auth-card { padding: 30px; width: 100%; max-width: 440px; justify-self: center; }
.auth-card h2 { font-size: 1.5rem; font-weight: 800; margin-bottom: 18px; }
.auth-switch { text-align: center; margin: 18px 0 0; color: var(--muted); font-size: .92rem; }
.install-card { grid-column: 1 / -1; max-width: 560px; }
.install-card .auth-brand h1 { font-size: 1.5rem; }
.checklist { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 6px; font-size: .9rem; font-weight: 600; }
.checklist li { display: flex; align-items: center; gap: 8px; }
.checklist .icon { width: 18px; height: 18px; }
.checklist .ok { color: var(--success); }
.checklist .bad { color: var(--danger); }

/* ---------- Overlays ---------- */
.lightbox { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 24px; background: rgba(5, 5, 15, .72); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); animation: fade .2s; cursor: zoom-out; }
.lightbox img { max-width: min(1100px, 100%); max-height: 88vh; border-radius: 18px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.7); animation: zoom-in .25s var(--ease); }
.lightbox-close { position: absolute; top: 16px; right: 16px; color: #fff; background: rgba(255,255,255,.12); }
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 70; display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { padding: 11px 18px; border-radius: 999px; font-weight: 650; font-size: .9rem; background: var(--glass-strong); border: 1px solid var(--glass-border); box-shadow: 0 14px 30px -12px rgba(0,0,0,.4); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); animation: toast-in .3s var(--ease); }
.toast.error { color: var(--danger); }
.toast.out { opacity: 0; transform: translateY(8px); transition: .3s; }
@keyframes fade { from { opacity: 0; } }
@keyframes zoom-in { from { transform: scale(.94); opacity: 0; } }
@keyframes toast-in { from { transform: translateY(14px); opacity: 0; } }
@keyframes rise { from { transform: translateY(6px); opacity: 0; } }
.reveal { animation: rise .45s var(--ease) both; }
.post.removing { opacity: 0; transform: scale(.98); transition: .3s var(--ease); }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .shell { grid-template-columns: 230px minmax(0, 620px); justify-content: center; }
  .rightbar { display: none; }
}

@media (max-width: 820px), (max-height: 500px) and (pointer: coarse) {
  body { font-size: 15px; }
  .shell, .shell.no-right { grid-template-columns: minmax(0, 1fr); padding: 76px 12px 96px; gap: 12px; }
  .sidebar { display: none; }
  .topbar {
    display: flex; align-items: center; justify-content: space-between;
    position: fixed; top: 0; left: 0; right: 0; z-index: 30;
    height: 60px; padding: 0 12px 0 14px;
    padding-top: env(safe-area-inset-top);
    border-radius: 0; border-width: 0 0 1px;
  }
  .topbar .brand { padding: 0; font-size: 1.12rem; }
  .topbar-actions { display: flex; align-items: center; gap: 2px; }
  .topbar-me { margin-left: 6px; border-radius: 50%; }
  .tabbar {
    display: flex; justify-content: space-around; align-items: center;
    position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 30;
    padding: 6px; border-radius: 24px;
  }
  .tabbar .nav-link { flex-direction: column; gap: 2px; padding: 7px 10px; font-size: .68rem; border-radius: 16px; min-width: 56px; }
  .tabbar .nav-link[aria-current="page"] { box-shadow: none; }
  .tab-compose .nav-icon { width: 44px; height: 44px; border-radius: 16px; background: var(--grad); color: #fff; box-shadow: 0 8px 20px -8px rgba(124,58,237,.9); }
  .tab-compose:hover { background: transparent; }
  .post { padding: 14px 14px 8px; border-radius: 20px; }
  .composer-bar { margin-left: 0; }
  .composer-preview { margin-left: 0; max-width: 100%; }
  .profile-cover { height: 140px; }
  .profile-main { padding: 0 16px 18px; }
  .profile-actions { right: 16px; top: 10px; }
  .avatar-xl { width: 92px; height: 92px; }
  .profile-avatar { margin-top: -48px; }
  .dm { grid-template-columns: 1fr; height: calc(100vh - 76px - 96px); height: calc(100dvh - 76px - 96px); }
  .dm.has-thread .dm-list { display: none; }
  .dm:not(.has-thread) .dm-thread { display: none; }
  .dm-back { display: grid; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .table th:nth-child(2), .table td:nth-child(2), .table th:nth-child(3), .table td:nth-child(3) { display: none; }
  .mobile-only { display: flex; }
  .toasts { bottom: 100px; }
  .auth-shell { grid-template-columns: 1fr; gap: 20px; padding: 70px 16px 32px; }
  .auth-hero { text-align: center; }
  .auth-hero .auth-brand { justify-content: center; margin-bottom: 14px; }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .hero-cards { display: none; }
  .hero-title { font-size: 2.1rem; }
  .grid-2 { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

.form > .btn:not(.btn-block) { justify-self: start; }

/* ==========================================================================
   App experience: transitions, touch, install, pull-to-refresh
   ========================================================================== */

/* Page changes: the browser keeps the old page on screen until the new one is ready, and only the page
   content fades in — the dock and top bar are never snapshotted, faded or redrawn, so they stay put. */
@view-transition { navigation: none; }
#main { animation: page-in .2s ease-out backwards; } /* no fill afterwards: a lasting animation would trap sheets inside the page under the dock */
@keyframes page-in { from { opacity: .82; } } /* 2.18.1: never fully see-through, so the wallpaper alone never flashes between pages */

/* Touch: no grey flash, no double-tap zoom delay, no accidental text selection on controls */
html { -webkit-tap-highlight-color: transparent; }
a, button, label, input, textarea, select, summary { touch-action: manipulation; }
.nav-link, .tab, .btn, .icon-btn, .action, .brand, .chip, .dm-convo, .notif, .tabbar, .topbar {
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
img { -webkit-user-drag: none; }
.nav-link:active, .action:active, .tab:active, .chip:active, .dm-convo:active, .notif:active { transform: scale(.97); }
@media (hover: none) {
  .post:hover { border-color: var(--glass-border); }
  .post-image:hover img { transform: none; }
  .nav-link:hover, .action:hover, .tab:hover { background: transparent; }
  .nav-link[aria-current="page"]:hover { background: var(--grad-soft); }
}

/* Installed app (standalone window) */
@media (display-mode: standalone) {
  html, body { overscroll-behavior-y: none; }
}
.is-standalone [data-install], .is-standalone [data-install-banner] { display: none !important; }

/* Notch & home-indicator safe areas */
@media (max-width: 820px), (max-height: 500px) and (pointer: coarse) {
  .topbar { height: calc(60px + env(safe-area-inset-top)); padding-left: max(14px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right)); }
  .shell, .shell.no-right { padding-top: calc(76px + env(safe-area-inset-top)); padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .dm { height: calc(100dvh - 76px - 96px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
  /* iOS zooms into inputs smaller than 16px — keep them at 16px */
  input:not([type=checkbox]):not([type=radio]):not([type=file]), textarea, select { font-size: 16px !important; }
}
.auth-theme { top: calc(16px + env(safe-area-inset-top)); }

/* Tablet portrait: a centered column instead of edge-to-edge cards */
@media (min-width: 600px) and (max-width: 820px), (min-width: 600px) and (max-height: 500px) and (pointer: coarse) {
  .shell, .shell.no-right { max-width: 680px; margin: 0 auto; }
  .tabbar { left: max(12px, calc(50% - 300px)); right: max(12px, calc(50% - 300px)); }
}

/* Install */
.install-side { margin: 6px 4px 0; }
.install-banner {
  position: fixed; z-index: 40;
  left: 12px; right: 12px; bottom: calc(100px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 12px;
  padding: 12px 12px 12px 14px; border-radius: 20px;
  animation: toast-in .4s var(--ease);
}
.install-banner img { border-radius: 12px; flex: none; }
.install-banner div { flex: 1; min-width: 0; display: grid; line-height: 1.3; }
.install-banner small { color: var(--muted); font-size: .8rem; }
@media (min-width: 821px) and (pointer: fine), (min-width: 821px) and (min-height: 501px) { .install-banner { left: auto; right: 24px; bottom: 24px; width: 380px; } }

.sheet-backdrop { position: fixed; inset: 0; z-index: 80; display: flex; align-items: flex-end; justify-content: center; background: rgba(5, 5, 15, .5); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: fade .2s; }
.sheet {
  width: 100%; max-width: 480px;
  padding: 10px 22px calc(22px + env(safe-area-inset-bottom));
  border-radius: 28px 28px 0 0; border-bottom: 0;
  display: grid; justify-items: center; gap: 12px; text-align: center;
  animation: sheet-up .35s var(--ease);
}
@media (min-width: 600px) { .sheet-backdrop { align-items: center; } .sheet { border-radius: 28px; border-bottom: 1px solid var(--glass-border); padding-bottom: 22px; } }
.sheet-grip { width: 40px; height: 5px; border-radius: 99px; background: var(--line); margin-bottom: 6px; }
.sheet-icon { border-radius: 16px; box-shadow: 0 10px 24px -10px rgba(0,0,0,.5); }
.sheet h2 { font-size: 1.2rem; font-weight: 800; }
.sheet-steps { list-style: none; margin: 4px 0 8px; padding: 0; display: grid; gap: 12px; text-align: left; width: 100%; }
.sheet-steps li { display: flex; align-items: center; gap: 12px; font-size: .95rem; }
.step-n { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .85rem; color: #fff; background: var(--grad); }
.ios-share { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--input); color: #0a84ff; vertical-align: middle; }
.ios-share svg { width: 16px; height: 16px; }
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } }

/* Pull to refresh (installed app) */
.ptr {
  position: fixed; top: calc(70px + env(safe-area-inset-top)); left: 50%; z-index: 35;
  width: 40px; height: 40px; margin-left: -20px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--glass-strong); border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: 0 8px 20px -8px rgba(0,0,0,.4);
  color: var(--accent);
  opacity: 0; transform: translateY(-60px); pointer-events: none;
}
.ptr .icon { transform: rotate(-90deg); transition: transform .2s; }
.ptr.ready .icon { transform: rotate(90deg); }
.ptr.loading .icon { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (min-width: 821px) and (pointer: fine), (min-width: 821px) and (min-height: 501px) { .ptr { top: 20px; } }

.offline-shell { grid-template-columns: 1fr; }

/* ==========================================================================
   Glints — 24-hour photos, clips and notes
   ========================================================================== */

.gbg-0 { background: linear-gradient(150deg, #7c3aed, #06b6d4); }
.gbg-1 { background: linear-gradient(150deg, #f97316, #db2777); }
.gbg-2 { background: linear-gradient(150deg, #1d4ed8, #0d9488); }
.gbg-3 { background: linear-gradient(150deg, #65a30d, #047857); }
.gbg-4 { background: linear-gradient(150deg, #0f172a, #5b21b6); }
.gbg-5 { background: linear-gradient(150deg, #fb7185, #f59e0b); }

/* Tray */
.glint-tray { padding: 14px 6px 10px; overflow: hidden; }
.glint-scroll { display: flex; gap: 6px; overflow-x: auto; padding: 0 8px 2px; scrollbar-width: none; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.glint-scroll::-webkit-scrollbar { display: none; }
.glint-item { position: relative; flex: none; width: 76px; display: grid; justify-items: center; gap: 6px; scroll-snap-align: start; }
.glint-name { max-width: 74px; font-size: .74rem; font-weight: 650; color: var(--text-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.glint-ring {
  position: relative; display: grid; place-items: center;
  width: 70px; height: 70px; padding: 3px; border: 0; border-radius: 50%;
  background: var(--line); cursor: pointer;
  transition: transform .2s var(--ease);
}
.glint-ring:active { transform: scale(.94); }
.glint-ring.is-unseen { background: conic-gradient(from 210deg, #a78bfa, #22d3ee, #f472b6, #fbbf24, #a78bfa); }
.glint-ring.is-unseen::after {
  content: ""; position: absolute; inset: -3px; border-radius: 50%;
  background: inherit; filter: blur(8px); opacity: .45; z-index: -1;
}
.glint-ring.is-seen { background: color-mix(in srgb, var(--muted) 45%, transparent); }
.glint-ring.is-empty { background: transparent; border: 2px dashed color-mix(in srgb, var(--muted) 60%, transparent); padding: 3px; }
.glint-ring .avatar { box-shadow: 0 0 0 3px var(--bg); }
.glint-ring.is-empty .avatar { box-shadow: none; opacity: .9; }
.avatar-glint { width: 62px; height: 62px; }
.avatar-glint.avatar-initial { font-size: 1.4rem; }
.glint-add {
  position: absolute; top: 48px; left: 50px;
  width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--bg);
  display: grid; place-items: center; padding: 0;
  background: var(--grad); color: #fff; box-shadow: 0 4px 10px -4px rgba(124,58,237,.8);
}
.glint-add .icon { width: 14px; height: 14px; stroke-width: 3; }
.glint-hint { align-self: center; margin: 0 0 18px 8px; max-width: 34ch; line-height: 1.4; }

/* Profile photo with a live Glint */
.profile-avatar.glint-ring { width: auto; height: auto; padding: 4px; cursor: pointer; backdrop-filter: none; -webkit-backdrop-filter: none; }
.profile-avatar.glint-ring .avatar { box-shadow: 0 0 0 4px var(--bg); }

/* Creator */
.glint-create { max-width: 460px; gap: 12px; text-align: left; justify-items: stretch; max-height: 96dvh; overflow-y: auto; }
.glint-create .sheet-grip { justify-self: center; }
.glint-create-head { display: flex; align-items: center; justify-content: space-between; }
.glint-create-head h2 { font-size: 1.2rem; font-weight: 800; }
.glint-mode { justify-self: center; }
.glint-canvas {
  position: relative; justify-self: center;
  width: min(100%, calc(50dvh * 9 / 16)); aspect-ratio: 9 / 16;
  border-radius: 22px; overflow: hidden;
  box-shadow: 0 20px 40px -20px rgba(0,0,0,.6), inset 0 0 0 1px rgba(255,255,255,.15);
}
.glint-pick { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 6px; color: #fff; text-align: center; cursor: pointer; padding: 16px; }
.glint-pick .icon { width: 44px; height: 44px; padding: 10px; border-radius: 50%; background: rgba(255,255,255,.22); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.glint-pick small { opacity: .85; }
.glint-canvas .glint-preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.glint-text-input {
  position: absolute !important; inset: 0; width: 100% !important; height: 100% !important;
  border: 0 !important; background: transparent !important; box-shadow: none !important; resize: none;
  color: #fff !important; text-align: center; font-weight: 800; font-size: 1.45rem !important; line-height: 1.3;
  padding: 38% 20px 20px !important; text-shadow: 0 2px 12px rgba(0,0,0,.25);
}
.glint-text-input::placeholder { color: rgba(255,255,255,.75) !important; }
.glint-clear { position: absolute; top: 10px; right: 10px; background: rgba(0,0,0,.5); color: #fff; }
.glint-swatches { display: flex; justify-content: center; gap: 10px; }
.swatch { width: 30px; height: 30px; border-radius: 50%; cursor: pointer; box-shadow: inset 0 0 0 2px rgba(255,255,255,.4); transition: transform .15s; }
.swatch input { position: absolute; opacity: 0; pointer-events: none; }
.swatch:has(input:checked) { transform: scale(1.15); box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--accent); }
.glint-progress { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.glint-progress span { display: block; height: 100%; width: 0; background: var(--grad); transition: width .2s; }
.glint-note { margin: 0; }

/* Player */
.gv {
  position: fixed; inset: 0; z-index: 90;
  display: grid; place-items: center;
  background: rgba(4, 4, 12, .9);
  -webkit-backdrop-filter: blur(24px) saturate(140%); backdrop-filter: blur(24px) saturate(140%);
  animation: fade .2s;
  color: #fff;
  touch-action: none;
}
.gv-stage {
  position: relative; overflow: hidden; background: #000;
  height: min(92dvh, 900px); aspect-ratio: 9 / 16; max-width: 100vw;
  border-radius: 24px;
  box-shadow: 0 40px 100px -30px rgba(0,0,0,.9), inset 0 0 0 1px rgba(255,255,255,.08);
  animation: zoom-in .25s var(--ease);
  -webkit-user-select: none; user-select: none;
}
.gv-stage.swiping { transition: none; }
.gv-bars { position: absolute; z-index: 4; top: calc(10px + env(safe-area-inset-top)); left: 10px; right: 10px; display: flex; gap: 4px; }
.gv-bar { flex: 1; height: 3px; border-radius: 9px; background: rgba(255,255,255,.32); overflow: hidden; }
.gv-bar span { display: block; height: 100%; width: 0; background: #fff; border-radius: 9px; }
.gv-head {
  position: absolute; z-index: 4; top: calc(20px + env(safe-area-inset-top)); left: 0; right: 0;
  display: flex; align-items: center; gap: 8px; padding: 6px 8px 22px 14px;
  background: linear-gradient(180deg, rgba(0,0,0,.45), transparent);
}
.gv-who { display: flex; align-items: center; gap: 8px; color: #fff; font-weight: 750; font-size: .95rem; text-shadow: 0 1px 6px rgba(0,0,0,.5); }
.gv-who:hover { text-decoration: none; }
.gv-who .avatar { width: 32px; height: 32px; }
.gv-time { color: rgba(255,255,255,.75); font-size: .85rem; font-weight: 600; }
.gv-spacer { flex: 1; }
.gv-btn { width: 38px; height: 38px; border: 0; border-radius: 50%; background: transparent; color: #fff; display: grid; place-items: center; }
.gv-btn:hover { background: rgba(255,255,255,.15); }
.gv-btn .icon { width: 22px; height: 22px; filter: drop-shadow(0 1px 3px rgba(0,0,0,.5)); }
.gv-media { position: absolute; inset: 0; display: grid; place-items: center; }
.gv-media img, .gv-media video { width: 100%; height: 100%; object-fit: contain; }
.gv-text { position: absolute; inset: 0; display: grid; place-items: center; padding: 28px; text-align: center; font-size: clamp(1.4rem, 4.4dvh, 2.1rem); font-weight: 800; line-height: 1.25; overflow-wrap: anywhere; text-shadow: 0 2px 16px rgba(0,0,0,.25); }
.gv-caption {
  position: absolute; z-index: 3; left: 16px; right: 16px; bottom: calc(86px + env(safe-area-inset-bottom));
  padding: 10px 14px; border-radius: 16px; text-align: center; font-weight: 600; font-size: .95rem; overflow-wrap: anywhere;
  background: rgba(0,0,0,.38); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.gv-tap { position: absolute; z-index: 2; top: 80px; bottom: 80px; border: 0; background: transparent; -webkit-tap-highlight-color: transparent; }
.gv-tap:focus-visible { box-shadow: none; }
.gv-tap-prev { left: 0; width: 32%; }
.gv-tap-next { right: 0; width: 68%; }
.gv-foot {
  position: absolute; z-index: 4; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; gap: 8px;
  padding: 26px 12px calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(0deg, rgba(0,0,0,.5), transparent);
}
.gv-reply { flex: 1; display: flex; }
.gv-reply input {
  flex: 1; border-radius: 999px !important; padding: 11px 16px !important;
  background: rgba(255,255,255,.12) !important; border: 1px solid rgba(255,255,255,.35) !important; color: #fff !important;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.gv-reply input::placeholder { color: rgba(255,255,255,.75) !important; }
.gv-heart.is-on { color: #fb7185; }
.gv-heart.is-on .icon { fill: currentColor; animation: heart .45s var(--ease); }
.gv-seen { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; border: 0; color: #fff; font-weight: 700; font-size: .9rem; background: rgba(255,255,255,.14); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.gv-seen .icon { width: 18px; height: 18px; }
.gv-foot .gv-spacer { flex: 1; }
.gv-viewers { position: absolute; z-index: 6; left: 0; right: 0; bottom: 0; max-height: 62%; overflow-y: auto; padding: 8px 16px calc(16px + env(safe-area-inset-bottom)); border-radius: 24px 24px 0 0; color: var(--text); animation: sheet-up .3s var(--ease); }
.gv-viewers h3 { font-size: 1rem; font-weight: 800; margin: 8px 0 6px; display: flex; justify-content: space-between; align-items: center; }
.gv-arrow { position: fixed; top: 50%; width: 46px; height: 46px; margin-top: -23px; border-radius: 50%; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.1); color: #fff; display: grid; place-items: center; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.gv-arrow:hover { background: rgba(255,255,255,.2); }
.gv-arrow-prev { left: max(20px, calc(50% - min(92dvh, 900px) * 9 / 32 - 80px)); }
.gv-arrow-next { right: max(20px, calc(50% - min(92dvh, 900px) * 9 / 32 - 80px)); }
.gv-arrow-next .icon { transform: rotate(180deg); }
.gv-loading .gv-media::after { content: ""; width: 36px; height: 36px; border-radius: 50%; border: 3px solid rgba(255,255,255,.25); border-top-color: #fff; animation: spin .8s linear infinite; position: absolute; }
.gv-paused .gv-bar span { opacity: .75; }

@media (max-width: 820px), (max-aspect-ratio: 3/4), (max-height: 500px) and (pointer: coarse) {
  .gv { background: #000; }
  .gv-stage { width: 100vw; height: 100dvh; aspect-ratio: auto; border-radius: 0; box-shadow: none; }
  .gv-arrow { display: none; }
}

/* Admin: reported Glints */
.report-glint { display: grid; gap: 8px; justify-items: start; }
.report-glint img, .report-glint video { max-height: 340px; border-radius: 14px; background: #000; }
.report-glint-text { width: 190px; aspect-ratio: 9 / 16; border-radius: 14px; display: grid; place-items: center; padding: 14px; text-align: center; color: #fff; font-weight: 800; }
/* Photos that don't fill the frame sit on a blurred, glassy copy of themselves */
.gv-media::before { content: ""; position: absolute; inset: -60px; background: var(--gv-backdrop, none) center / cover no-repeat; filter: blur(42px) saturate(140%) brightness(.55); transform: scale(1.15); }
.gv-media > * { position: relative; }
.gv-media .gv-text { position: absolute; }

/* ---------- Fixes from iPad testing ---------- */
/* Installed app on iPad: keep content clear of the status bar / window controls,
   and size the sidebar to the visible screen (Safari's toolbars made 100vh too tall). */
@media (min-width: 821px) and (pointer: fine), (min-width: 821px) and (min-height: 501px) {
  .shell {
    padding-top: calc(20px + env(safe-area-inset-top));
    padding-bottom: calc(40px + env(safe-area-inset-bottom));
    padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
  }
  .sidebar, .rightbar { top: calc(20px + env(safe-area-inset-top)); }
  .sidebar {
    height: calc(100vh - 40px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    height: calc(100dvh - 40px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  }
  .sidebar-inner { overflow-y: auto; scrollbar-width: none; }
  .sidebar-inner::-webkit-scrollbar { display: none; }
  .dm { height: calc(100dvh - 40px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
  .install-banner { bottom: calc(24px + env(safe-area-inset-bottom)); }
}
/* iPadOS windowed apps put the close/resize controls in the top-left corner */
@media (min-width: 821px) and (display-mode: standalone) and (pointer: fine), (min-width: 821px) and (min-height: 501px) and (display-mode: standalone) {
  .shell { padding-top: calc(28px + env(safe-area-inset-top)); }
}

/* ---------- 2.24.1: normal text by default; the all-lowercase look is a choice (settings → customize) ---------- */
html[data-lowercase] { text-transform: lowercase; }
input, textarea, select, button, option { text-transform: inherit; }
html[data-lowercase] ::placeholder { text-transform: lowercase; }
input[type="password"] { text-transform: none; }

/* ---------- Glints camera ---------- */
.glint-cam { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.glint-cam.is-mirrored { transform: scaleX(-1); }
.glint-cam-ui { position: absolute; inset: 0; pointer-events: none; }
.glint-cam-ui > * { pointer-events: auto; }
.glint-flip { position: absolute; top: 10px; right: 10px; color: #fff; background: rgba(0,0,0,.35); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.glint-flip:hover { background: rgba(0,0,0,.5); color: #fff; }
.glint-rec-time { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); padding: 4px 12px; border-radius: 99px; background: #ef4444; color: #fff; font-weight: 800; font-size: .85rem; font-variant-numeric: tabular-nums; animation: pop .3s var(--ease); }
.glint-shutter {
  position: absolute; left: 50%; bottom: 34px; width: 78px; height: 78px; margin-left: -39px;
  border: 0; padding: 0; border-radius: 50%; background: transparent;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: none;
}
.glint-shutter svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.glint-shutter .ring-bg { fill: none; stroke: rgba(255,255,255,.9); stroke-width: 5; }
.glint-shutter .ring-fg { fill: none; stroke: #ef4444; stroke-width: 5; stroke-linecap: round; stroke-dasharray: 227; stroke-dashoffset: 227; opacity: 0; }
.glint-shutter-core { position: absolute; inset: 11px; border-radius: 50%; background: rgba(255,255,255,.92); box-shadow: 0 4px 16px rgba(0,0,0,.35); transition: inset .2s var(--ease), border-radius .2s, background-color .2s; }
.glint-shutter:active .glint-shutter-core { inset: 14px; }
.is-recording .glint-shutter .ring-bg { stroke: rgba(255,255,255,.4); }
.is-recording .glint-shutter .ring-fg { opacity: 1; }
.is-recording .glint-shutter-core { inset: 24px; border-radius: 8px; background: #ef4444; }
.glint-cam-hint { position: absolute; left: 0; right: 0; bottom: 12px; text-align: center; color: rgba(255,255,255,.85); font-size: .75rem; font-weight: 650; text-shadow: 0 1px 6px rgba(0,0,0,.6); }
.is-recording .glint-cam-hint, .is-recording .glint-flip { opacity: 0; pointer-events: none; }
.glint-cam-msg { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; padding: 20px; color: #fff; text-align: center; }
.glint-cam-msg > .icon { width: 44px; height: 44px; padding: 10px; border-radius: 50%; background: rgba(255,255,255,.18); }
.glint-canvas::after { content: ""; position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; transition: opacity .25s; }
.flash .glint-canvas::after { opacity: .85; transition: none; }
.glint-mode label { padding: 8px 12px; }

/* ---------- Mobile polish (1.4) ---------- */
.install-banner.is-inline { position: relative; left: auto; right: auto; bottom: auto; width: auto; z-index: 1; }
/* Comfortable 44px touch targets on phones and tablets */
@media (pointer: coarse) {
  .icon-btn { width: 44px; height: 44px; }
  .icon-btn.tiny { width: 32px; height: 32px; }
  .action { padding: 9px 12px; min-height: 40px; }
  .comment-form input { min-height: 44px; }
  .btn-sm { padding: 9px 15px; }
}
/* Bigger invisible hit area for the small "+" on your Glint */
.glint-add::before { content: ""; position: absolute; inset: -12px; border-radius: 50%; }
/* Inside a chat on phones: hide the tab bar (like native messaging apps) so the reply box sits at the bottom */
@media (max-width: 820px), (max-height: 500px) and (pointer: coarse) {
  .page-messages:has(.dm.has-thread) .tabbar { display: none; }
  .page-messages:has(.dm.has-thread) .shell { padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
  .page-messages .dm.has-thread { height: calc(100dvh - 76px - 10px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
}

/* ==========================================================================
   1.5 — Profile header, movable blocks, customize mode, photo editor
   ========================================================================== */

/* Profile themes (MySpace-style personal colors) */
.pf-theme-aurora   { --pf-grad: linear-gradient(135deg, #7c3aed, #06b6d4 60%, #ec4899); --pf-accent: #a78bfa; }
.pf-theme-sunset   { --pf-grad: linear-gradient(135deg, #f97316, #db2777 60%, #7c3aed); --pf-accent: #fb923c; }
.pf-theme-ocean    { --pf-grad: linear-gradient(135deg, #1d4ed8, #0891b2 60%, #14b8a6); --pf-accent: #38bdf8; }
.pf-theme-forest   { --pf-grad: linear-gradient(135deg, #166534, #65a30d 60%, #0d9488); --pf-accent: #4ade80; }
.pf-theme-midnight { --pf-grad: linear-gradient(135deg, #0f172a, #312e81 60%, #581c87); --pf-accent: #818cf8; }
.pf-theme-candy    { --pf-grad: linear-gradient(135deg, #f472b6, #c084fc 60%, #fbbf24); --pf-accent: #f472b6; }

.pf { display: grid; gap: 16px; }
.pf .panel-title .icon { color: var(--pf-accent, var(--accent)); }
.pf .pf-block { border-top: 2px solid color-mix(in srgb, var(--pf-accent, var(--accent)) 55%, transparent); }

/* Header: the cover fills the whole block, info sits on a soft scrim */
.pf-header {
  position: relative; overflow: hidden; padding: 0; isolation: isolate;
  min-height: 360px; display: flex; flex-direction: column; justify-content: flex-end;
  border-radius: 26px;
}
.pf-cover {
  position: absolute; inset: 0; z-index: -2;
  background: var(--pf-grad); background-size: cover; background-position: center;
  transform: scale(1.01);
}
.pf-scrim { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(0,0,0,.05) 0%, rgba(0,0,0,.08) 35%, rgba(6,6,16,.72) 100%); }
.pf-header:not(.has-cover) .pf-scrim { background: linear-gradient(180deg, transparent 30%, rgba(6,6,16,.45) 100%); }
.pf-top-actions { position: absolute; top: 14px; right: 14px; display: flex; gap: 8px; align-items: center; z-index: 2; }
.pf-glass-btn {
  color: #fff !important; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.28);
  -webkit-backdrop-filter: blur(14px) saturate(160%); backdrop-filter: blur(14px) saturate(160%);
}
.pf-glass-btn:hover { background: rgba(255,255,255,.26); }
.pf-cover-edit {
  position: absolute; top: 14px; left: 14px; z-index: 2;
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.28); background: rgba(0,0,0,.28); color: #fff; font-weight: 700; font-size: .82rem;
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.pf-cover-edit .icon { width: 16px; height: 16px; }
.pf-identity { display: flex; align-items: flex-end; gap: 18px; padding: 90px 24px 22px; color: #fff; }
.pf-avatar-wrap { position: relative; flex: none; }
.pf-identity .profile-avatar { margin-top: 0; background: rgba(255,255,255,.18); }
.pf-identity .profile-avatar .avatar { box-shadow: 0 0 0 4px rgba(10,10,20,.35); }
.pf-avatar-edit {
  position: absolute; right: 2px; bottom: 6px; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; border: 2px solid rgba(255,255,255,.85); color: #fff;
  background: var(--grad); box-shadow: 0 6px 16px -6px rgba(0,0,0,.6);
}
.pf-avatar-edit .icon { width: 17px; height: 17px; }
.pf-text { min-width: 0; text-shadow: 0 1px 12px rgba(0,0,0,.35); }
.pf-text .profile-name { margin-top: 0; color: #fff; font-size: 1.7rem; }
.pf-text .profile-handle { color: rgba(255,255,255,.78); }
.pf-text .profile-bio { color: #fff; }
.pf-text .profile-bio a, .pf-text .profile-facts a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.pf-text .profile-facts { color: rgba(255,255,255,.8); }
.pf-text .profile-stats a { color: rgba(255,255,255,.8); }
.pf-text .profile-stats strong { color: #fff; }
.pill-glass { background: rgba(255,255,255,.18); color: #fff; border: 1px solid rgba(255,255,255,.3); }

/* Columns */
.shell.wide.no-right { max-width: 1240px; }
.pf-cols { display: grid; grid-template-columns: minmax(0, 330px) minmax(0, 1fr); gap: 16px; align-items: start; }
.pf-arrange-side-right .pf-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 330px); }
.pf-arrange-side-right .pf-side { order: 2; }
.pf-arrange-single .pf-cols { grid-template-columns: minmax(0, 1fr); }
.lcol { display: grid; gap: 14px; align-content: start; min-width: 0; }
.pf-about { white-space: pre-line; overflow-wrap: anywhere; line-height: 1.6; }
.panel-title .panel-more { margin-left: auto; font-size: .8rem; font-weight: 650; }
.friend-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px 6px; }
.friend { display: grid; justify-items: center; gap: 6px; color: var(--text); font-size: .8rem; font-weight: 650; text-align: center; min-width: 0; }
.friend span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.friend:hover { text-decoration: none; }
.avatar-lg { width: 56px; height: 56px; }
.avatar-lg.avatar-initial { font-size: 1.25rem; }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.photo-grid a { display: block; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--input); }
.photo-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.photo-grid a:hover img { transform: scale(1.05); }
.pf-posts, .home-feed { display: grid; gap: 14px; }
.customize-link { justify-self: center; display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .85rem; font-weight: 650; padding: 8px 14px; border-radius: 999px; }
.customize-link .icon { width: 16px; height: 16px; }
.customize-link:hover { background: var(--glass-hover); text-decoration: none; color: var(--text); }

/* "Your profile" card block */
.me-card { position: relative; overflow: hidden; display: grid; justify-items: center; gap: 2px; padding: 0 16px 16px; text-align: center; color: var(--text); }
.me-card:hover { text-decoration: none; }
.me-cover { display: block; width: calc(100% + 32px); height: 76px; margin: 0 -16px 0; background: var(--pf-grad); background-size: cover; background-position: center; }
.me-card .avatar { margin-top: -30px; box-shadow: 0 0 0 4px var(--bg); }
.me-card small { color: var(--muted); }
.me-stats { margin-top: 6px; font-size: .8rem; color: var(--muted); }
.me-stats b { color: var(--text); }

/* ---------- Customize mode ---------- */
.customize-bar {
  position: sticky; top: calc(10px + env(safe-area-inset-top)); z-index: 25;
  display: grid; gap: 10px; padding: 14px 16px; border-radius: 20px;
}
@media (max-width: 820px), (max-height: 500px) and (pointer: coarse) { .customize-bar { top: calc(68px + env(safe-area-inset-top)); } }
.customize-head { display: grid; gap: 2px; }
.customize-head strong { display: flex; align-items: center; gap: 8px; }
.customize-head strong .icon { color: var(--accent); width: 18px; height: 18px; }
.grip-hint .icon { width: 14px; height: 14px; vertical-align: -2px; }
.customize-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.customize-label { font-size: .78rem; font-weight: 750; color: var(--muted); min-width: 56px; }
.seg-sm label { padding: 6px 11px; font-size: .8rem; }
.theme-swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.pf-swatch { background: var(--pf-grad); }
.customize-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.zone-label { font-size: .75rem; font-weight: 800; letter-spacing: .06em; color: var(--muted); padding: 4px 6px 0; }
.layout-edit .lcol { min-height: 90px; padding: 10px; border-radius: 20px; border: 2px dashed color-mix(in srgb, var(--muted) 35%, transparent); transition: background-color .2s, border-color .2s; }
.layout-edit .lcol:hover, .is-dragging-block .layout-edit .lcol { border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.layout-edit .lcol.no-drop { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 8%, transparent); }
.layout-edit .lcol.is-empty::after { content: "drop blocks here"; display: grid; place-items: center; min-height: 64px; color: var(--muted); font-size: .85rem; font-weight: 650; }
.layout-edit .lcol-hidden { background: color-mix(in srgb, var(--muted) 6%, transparent); }
.layout-edit .lblock { position: relative; border-radius: 22px; transition: transform .2s var(--ease), opacity .2s; }
.layout-edit .lblock > :not(.lb-bar) { pointer-events: none; user-select: none; -webkit-user-select: none; }
.layout-edit .lblock.is-hidden-block > :not(.lb-bar) { opacity: .45; filter: grayscale(.6); max-height: 160px; overflow: hidden; }
.layout-edit .lblock.is-dragging { transform: scale(1.02); opacity: .92; z-index: 10; box-shadow: 0 24px 50px -20px rgba(0,0,0,.6); outline: 2px solid var(--accent); }
.layout-edit .lblock.just-moved { animation: lb-flash .5s var(--ease); }
@keyframes lb-flash { 0% { transform: scale(.98); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 60%, transparent); } 100% { transform: none; box-shadow: none; } }
.lb-bar {
  display: flex; align-items: center; gap: 6px; margin-bottom: 8px; padding: 6px 8px; border-radius: 14px;
  background: var(--glass-strong); border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
.lb-grip { touch-action: none; cursor: grab; width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 10px; background: var(--input); color: var(--text-soft); }
.lb-grip:active { cursor: grabbing; background: var(--grad-soft); }
.lb-name { flex: 1; min-width: 0; font-weight: 750; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-actions { display: flex; gap: 2px; }
.lb-btn { width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 10px; background: transparent; color: var(--text-soft); }
.lb-btn:hover:not(:disabled) { background: var(--glass-hover); color: var(--text); }
.lb-btn:disabled { opacity: .3; cursor: default; }
.lb-btn .icon, .lb-grip .icon { width: 18px; height: 18px; }
.is-dragging-block, .is-dragging-block * { cursor: grabbing !important; user-select: none !important; -webkit-user-select: none !important; }
.lblock-empty { padding: 18px; text-align: center; }

/* ---------- Photo editor ---------- */
.pe { max-width: 560px; gap: 12px; text-align: left; justify-items: stretch; max-height: 96dvh; overflow-y: auto; }
.pe-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pe-head h2 { font-size: 1.05rem; font-weight: 800; }
.pe-stage {
  position: relative; justify-self: center; overflow: hidden; touch-action: none; cursor: grab;
  width: 100%; aspect-ratio: 16 / 9; border-radius: 18px; background: #000;
  -webkit-user-select: none; user-select: none;
}
.pe-avatar .pe-stage { width: min(100%, 340px); aspect-ratio: 1; }
.pe-stage:active { cursor: grabbing; }
.pe-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.pe-frame { position: absolute; inset: 0; pointer-events: none; border-radius: inherit; box-shadow: inset 0 0 0 2px rgba(255,255,255,.55); }
.pe-frame::before, .pe-frame::after { content: ""; position: absolute; background: rgba(255,255,255,.25); }
.pe-frame::before { left: 33.33%; right: 33.33%; top: 0; bottom: 0; border-left: 1px solid rgba(255,255,255,.3); border-right: 1px solid rgba(255,255,255,.3); background: none; }
.pe-frame::after { top: 33.33%; bottom: 33.33%; left: 0; right: 0; border-top: 1px solid rgba(255,255,255,.3); border-bottom: 1px solid rgba(255,255,255,.3); background: none; }
.pe-avatar .pe-frame { box-shadow: none; background: radial-gradient(circle at center, transparent 0, transparent calc(50% - 1px), rgba(0,0,0,.55) 50%); }
.pe-avatar .pe-frame::before, .pe-avatar .pe-frame::after { display: none; }
.pe-empty, .pe-busy { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.4); }
.pe-busy span { width: 36px; height: 36px; border-radius: 50%; border: 3px solid rgba(255,255,255,.3); border-top-color: #fff; animation: spin .8s linear infinite; }
.pe-hint { margin: 0; text-align: center; }
.pe-tools { display: flex; align-items: center; gap: 8px; }
.pe-slider { flex: 1; display: flex; align-items: center; gap: 8px; color: var(--muted); }
.pe-slider .icon { width: 18px; height: 18px; flex: none; }
.pe input[type=range] { flex: 1; width: 100%; accent-color: var(--accent); height: 28px; }
.pe-filters { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: none; }
.pe-filters::-webkit-scrollbar { display: none; }
.pe-filter { flex: none; display: grid; justify-items: center; gap: 4px; font-size: .74rem; font-weight: 650; color: var(--text-soft); cursor: pointer; }
.pe-filter input { position: absolute; opacity: 0; pointer-events: none; }
.pe-filter-thumb { width: 62px; height: 62px; border-radius: 14px; background: var(--input) center / cover; box-shadow: inset 0 0 0 1px var(--glass-border); transition: transform .15s; }
.pe-filter:has(input:checked) .pe-filter-thumb { box-shadow: 0 0 0 3px var(--accent); transform: scale(1.04); }
.pe-filter:has(input:checked) { color: var(--text); }
.pe-adjust summary { cursor: pointer; font-weight: 700; font-size: .9rem; padding: 6px 0; }
.pe-adjust label { display: grid; grid-template-columns: 90px 1fr; align-items: center; gap: 10px; font-size: .85rem; font-weight: 600; color: var(--text-soft); margin: 6px 0; }

/* ---------- Responsive ---------- */
@media (max-width: 820px), (max-height: 500px) and (pointer: coarse) {
  .pf-cols, .pf-arrange-side-right .pf-cols { grid-template-columns: minmax(0, 1fr); }
  .pf-arrange-side-right .pf-side { order: 0; }
  .pf-header { min-height: 420px; border-radius: 22px; }
  .pf-identity { flex-direction: column; align-items: flex-start; gap: 12px; padding: 80px 18px 18px; }
  .pf-text .profile-name { font-size: 1.45rem; }
  .pf-top-actions { top: 12px; right: 12px; }
  .pf-cover-edit span { display: none; }
  .pf-cover-edit { padding: 9px; }
  .friend-grid { grid-template-columns: repeat(4, 1fr); }
  .lb-btn { width: 36px; height: 36px; }
}
.pf-avatar-edit { z-index: 3; }
/* Customize mode on phones: options scroll with the page, save/cancel live in a slim bottom bar */
@media (max-width: 820px), (max-height: 500px) and (pointer: coarse) {
  .customize-bar { position: relative; top: auto; }
  .customize-actions {
    position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 40;
    padding: 10px; border-radius: 20px; justify-content: space-between;
    background: var(--glass-strong); border: 1px solid var(--glass-border); box-shadow: 0 14px 34px -14px rgba(0,0,0,.6);
    -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%);
  }
  .customize-actions .btn { flex: 1; }
  body:has(.customize-bar) .tabbar { display: none; }
  body:has(.customize-bar) .shell { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
}
/* Don't let the browser scroll to follow a block while it's being dragged */
html:has(.customize-bar), html:has(.customize-bar) body { overflow-anchor: none; }
/* A blurred parent traps "fixed" children; keep the phone toolbar unblurred so the save bar pins to the screen */
@media (max-width: 820px), (max-height: 500px) and (pointer: coarse) {
  .customize-bar { -webkit-backdrop-filter: none; backdrop-filter: none; background: color-mix(in srgb, var(--bg) 82%, transparent); }
}
/* While customizing, the header shrinks so the blocks are within reach */
.layout-edit .pf-header { min-height: 0; }
.layout-edit .pf-identity { padding-top: 64px; }
@media (max-width: 820px), (max-height: 500px) and (pointer: coarse) {
  .customize-columns { display: none; } /* phones always show one column */
  .layout-edit .pf-header .profile-bio, .layout-edit .pf-header .profile-facts { display: none; }
  .layout-edit .pf-identity { flex-direction: row; align-items: center; padding: 56px 16px 16px; }
  .layout-edit .pf-identity .avatar-xl { width: 64px; height: 64px; }
}
.profile-stats { flex-wrap: wrap; gap: 6px 18px; }
.profile-stats a { white-space: nowrap; }
/* Previews stay short while customizing, so long feeds don't bury the other blocks */
.layout-edit .lblock > :not(.lb-bar) { max-height: 320px; overflow: hidden; -webkit-mask-image: linear-gradient(180deg, #000 75%, transparent); mask-image: linear-gradient(180deg, #000 75%, transparent); }

/* ==========================================================================
   1.6 — Liquid glass: edge light, sheen, deeper blur, glossy controls
   ========================================================================== */
:root {
  --glass: rgba(255, 255, 255, .40);
  --glass-strong: rgba(255, 255, 255, .62);
  --glass-tint: rgba(255, 255, 255, .30);
  --edge-hi: rgba(255, 255, 255, .95);
  --edge-lo: rgba(255, 255, 255, .40);
  --sheen: rgba(255, 255, 255, .55);
  --depth: 0 18px 40px -20px rgba(49, 46, 129, .35), 0 3px 10px -4px rgba(49, 46, 129, .12);
  --blur: 26px;
}
:root[data-theme="dark"] {
  --glass: rgba(255, 255, 255, .045);
  --glass-strong: rgba(22, 22, 40, .55);
  --glass-tint: rgba(255, 255, 255, .07);
  --edge-hi: rgba(255, 255, 255, .26);
  --edge-lo: rgba(255, 255, 255, .06);
  --sheen: rgba(255, 255, 255, .09);
  --depth: 0 24px 50px -24px rgba(0, 0, 0, .75), 0 3px 10px -4px rgba(0, 0, 0, .35);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --glass: rgba(255,255,255,.045); --glass-strong: rgba(22,22,40,.55); --glass-tint: rgba(255,255,255,.07);
    --edge-hi: rgba(255,255,255,.26); --edge-lo: rgba(255,255,255,.06); --sheen: rgba(255,255,255,.09);
    --depth: 0 24px 50px -24px rgba(0,0,0,.75), 0 3px 10px -4px rgba(0,0,0,.35);
  }
}

/* Every glass surface: light catches the top edge, a soft sheen sweeps across, depth below */
.glass, .glass-strong {
  background-color: var(--glass);
  background-image:
    linear-gradient(var(--surf-tint, transparent), var(--surf-tint, transparent)),
    radial-gradient(120% 80% at var(--mx, 12%) var(--my, -10%), var(--sheen), transparent 58%),
    linear-gradient(165deg, var(--glass-tint), transparent 42%);
  box-shadow:
    inset 0 1px 0 var(--edge-hi),
    inset 0 -1px 0 var(--edge-lo),
    inset 1px 0 0 var(--edge-lo),
    inset -1px 0 0 var(--edge-lo),
    var(--depth);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(190%) brightness(1.03);
  backdrop-filter: blur(var(--blur)) saturate(190%) brightness(1.03);
}
.glass-strong { background-color: var(--glass-strong); }

/* Navigation bars: thicker "liquid" glass */
.topbar, .tabbar, .sidebar-inner {
  -webkit-backdrop-filter: blur(32px) saturate(210%) brightness(1.05);
  backdrop-filter: blur(32px) saturate(210%) brightness(1.05);
}
.tabbar { border-radius: 30px; }
.tabbar .nav-link[aria-current="page"], .nav-link[aria-current="page"] {
  background:
    linear-gradient(180deg, rgba(255,255,255,.22), rgba(255,255,255,.04)),
    var(--grad-soft);
  box-shadow: inset 0 1px 0 var(--edge-hi), inset 0 -1px 0 var(--edge-lo), 0 6px 16px -10px rgba(124,58,237,.6);
}

/* Glossy buttons — a highlight on the upper half, like light on a glass bead */
.btn-primary { position: relative; overflow: hidden; isolation: isolate; }
.btn-primary::after {
  content: ""; position: absolute; left: 2px; right: 2px; top: 1px; height: 52%;
  border-radius: 999px 999px 60% 60% / 999px 999px 30% 30%;
  background: linear-gradient(180deg, rgba(255,255,255,.42), rgba(255,255,255,.04));
  pointer-events: none; z-index: -1;
}
.btn-ghost, .glass-btn, .chip, .search-pill, .search-hero {
  background-image: linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,.02));
  box-shadow: inset 0 1px 0 var(--edge-hi), inset 0 -1px 0 var(--edge-lo), 0 6px 18px -12px rgba(0,0,0,.4);
}
.send-btn, .tab-compose .nav-icon, .glint-add, .pf-avatar-edit { box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 8px 20px -8px rgba(124,58,237,.8); }

/* Inputs look like recessed glass */
input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]), textarea, select, .input-prefix {
  box-shadow: inset 0 1px 2px rgba(0,0,0,.08), inset 0 -1px 0 var(--edge-lo);
}
.composer textarea, .search-pill input, .search-hero input, .input-prefix input { box-shadow: none !important; }

/* Tabs and segmented controls: a glass "bead" for the selected item */
.tab[aria-selected="true"], .seg label:has(input:checked) {
  background: linear-gradient(180deg, rgba(255,255,255,.28), rgba(255,255,255,.06)), var(--glass-strong);
  box-shadow: inset 0 1px 0 var(--edge-hi), inset 0 -1px 0 var(--edge-lo), 0 6px 16px -8px rgba(0,0,0,.35);
}

/* Avatars get a thin glass rim */
.avatar { box-shadow: 0 0 0 1px rgba(255,255,255,.25), 0 4px 12px -6px rgba(0,0,0,.4); }
.glint-ring .avatar, .pf-identity .profile-avatar .avatar { box-shadow: 0 0 0 3px var(--bg); }

/* Background: a slow light sweep across the whole scene */
.bg::after {
  content: ""; position: absolute; inset: -20%;
  background: linear-gradient(115deg, transparent 38%, rgba(255,255,255,.07) 48%, rgba(255,255,255,.02) 52%, transparent 62%);
  animation: light-sweep 18s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes light-sweep { from { transform: translateX(-25%); } to { transform: translateX(25%); } }
.b1, .b2, .b3 { filter: blur(70px) saturate(140%); }

/* Toasts, menus and sheets share the same glass */
.toast, .menu, .sheet {
  background-image: radial-gradient(120% 90% at 20% -10%, var(--sheen), transparent 60%);
  box-shadow: inset 0 1px 0 var(--edge-hi), inset 0 -1px 0 var(--edge-lo), var(--depth);
}

@media (prefers-reduced-motion: reduce) { .bg::after { animation: none; } }
/* Keep the busiest glass lighter on phones so scrolling stays smooth */
@media (max-width: 820px), (max-height: 500px) and (pointer: coarse) {
  .post.glass { -webkit-backdrop-filter: blur(18px) saturate(170%); backdrop-filter: blur(18px) saturate(170%); }
}
.remember-me { margin-top: -4px; }
/* Save / cancel float at the bottom of the screen on every device */
.customize-actions {
  position: fixed; z-index: 40; right: 24px; bottom: calc(24px + env(safe-area-inset-bottom));
  display: flex; gap: 8px; padding: 10px; border-radius: 22px;
}
@media (max-width: 820px), (max-height: 500px) and (pointer: coarse) {
  .customize-actions { left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); justify-content: space-between; }
}
body:has(.customize-bar) .shell { padding-bottom: calc(120px + env(safe-area-inset-bottom)); }

/* ==========================================================================
   1.7 — Create menu, composer sheet, rich media posts, backgrounds, GIFs, memes
   ========================================================================== */

/* Post backgrounds (gradients + bundled pictures) */
.pbg-aurora   { background: linear-gradient(135deg, #7c3aed, #06b6d4); }
.pbg-sunset   { background: linear-gradient(135deg, #f97316, #db2777); }
.pbg-ocean    { background: linear-gradient(135deg, #1e3a8a, #0891b2); }
.pbg-forest   { background: linear-gradient(135deg, #14532d, #65a30d); }
.pbg-midnight { background: linear-gradient(135deg, #0f172a, #4c1d95); }
.pbg-candy    { background: linear-gradient(135deg, #f472b6, #a78bfa); }
.pbg-peach    { background: linear-gradient(135deg, #fb923c, #fde68a); }
.pbg-mint     { background: linear-gradient(135deg, #10b981, #a7f3d0); }
.pbg-img-nebula { background: #1e1b4b url("backgrounds/img-nebula.webp") center / cover; }
.pbg-img-bokeh  { background: #2e1065 url("backgrounds/img-bokeh.webp") center / cover; }
.pbg-img-waves  { background: #0c4a6e url("backgrounds/img-waves.webp") center / cover; }
.pbg-img-dunes  { background: #c2410c url("backgrounds/img-dunes.webp") center / cover; }
.pbg-img-marble { background: #e5e7eb url("backgrounds/img-marble.webp") center / cover; }
.pbg-img-prism  { background: #0b0b18 url("backgrounds/img-prism.webp") center / cover; }

.post-bg-card {
  margin: 12px 0 4px; min-height: 220px; border-radius: 18px; overflow: hidden;
  display: grid; place-items: center; padding: 28px 24px; text-align: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), inset 0 0 0 1px rgba(255,255,255,.12);
}
.post-bg-card p { margin: 0; color: #fff; font-weight: 800; line-height: 1.25; overflow-wrap: anywhere; text-shadow: 0 2px 14px rgba(0,0,0,.35); }
.post-bg-card a { color: #fff; text-decoration: underline; }
.pbg-size-xl p, .ps-canvas.pbg-size-xl textarea { font-size: 1.9rem !important; }
.pbg-size-lg p, .ps-canvas.pbg-size-lg textarea { font-size: 1.45rem !important; }
.pbg-size-md p { font-size: 1.15rem; }
.post-bg-card.pbg-img-marble p, .post-bg-card.pbg-peach p, .post-bg-card.pbg-mint p { color: #1f1235; text-shadow: 0 1px 8px rgba(255,255,255,.5); }
.post-bg-card.pbg-img-marble a { color: #1f1235; }

/* Media gallery: 1–4 photos / videos / GIFs */
.post-media { display: grid; gap: 4px; margin: 12px 0 4px; border-radius: 18px; overflow: hidden; }
.media-1 { grid-template-columns: 1fr; }
.media-2 { grid-template-columns: 1fr 1fr; }
.media-3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.media-3 .pm-item:first-child { grid-row: span 2; }
.media-4 { grid-template-columns: 1fr 1fr; }
.pm-item { position: relative; display: block; padding: 0; border: 0; background: #000; overflow: hidden; cursor: zoom-in; min-height: 0; }
.media-1 .pm-item img { width: 100%; max-height: 560px; object-fit: cover; }
.media-2 .pm-item, .media-4 .pm-item { aspect-ratio: 1; }
.media-3 .pm-item { aspect-ratio: auto; min-height: 140px; }
.media-3 .pm-item:first-child { aspect-ratio: 3 / 4; }
.media-2 img, .media-3 img, .media-4 img { width: 100%; height: 100%; object-fit: cover; }
.pm-item img { transition: transform .5s var(--ease); }
.pm-item:hover img { transform: scale(1.02); }
.pm-video { cursor: default; }
.pm-video video { width: 100%; height: 100%; max-height: 560px; display: block; background: #000; object-fit: contain; }
.media-2 .pm-video video, .media-3 .pm-video video, .media-4 .pm-video video { object-fit: cover; }
.gif-badge {
  position: absolute; left: 8px; bottom: 8px; padding: 2px 8px; border-radius: 6px;
  font-size: .7rem; font-weight: 900; letter-spacing: .04em; color: #fff;
  background: rgba(0,0,0,.55); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.giphy-credit { margin: 2px 2px 0; font-size: .72rem; color: var(--muted); text-align: right; }

/* Create menu */
.create-menu { max-width: 520px; }
.create-menu h2 { font-size: 1.15rem; font-weight: 800; }
.create-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: 100%; }
.create-tile {
  display: grid; justify-items: center; gap: 4px; padding: 16px 8px 14px; border-radius: 20px;
  border: 1px solid var(--glass-border); color: var(--text);
  background: linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.02)), var(--glass);
  box-shadow: inset 0 1px 0 var(--edge-hi), var(--depth);
  transition: transform .15s var(--ease), background-color .2s;
}
.create-tile:active { transform: scale(.96); }
.create-tile:hover { background-color: var(--glass-hover); }
.create-tile strong { font-size: .9rem; }
.create-tile small { font-size: .72rem; color: var(--muted); line-height: 1.25; }
.ct-icon { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; color: #fff; margin-bottom: 4px; box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 8px 18px -10px rgba(0,0,0,.6); }
.ct-icon .icon { width: 24px; height: 24px; }
.ct-post { background: linear-gradient(135deg, #8b5cf6, #6366f1); }
.ct-media { background: linear-gradient(135deg, #06b6d4, #3b82f6); }
.ct-glint { background: conic-gradient(from 210deg, #a78bfa, #22d3ee, #f472b6, #fbbf24, #a78bfa); }
.ct-gif { background: linear-gradient(135deg, #10b981, #84cc16); }
.ct-meme { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.ct-bg { background: linear-gradient(135deg, #ec4899, #f97316); }
.ct-gif-text, .ps-gif { font-weight: 900; font-size: .78rem; letter-spacing: .04em; border: 2px solid currentColor; border-radius: 6px; padding: 0 4px; line-height: 1.3; }
.ct-gif-text { font-size: .95rem; }

/* Composer sheet */
.post-sheet { max-width: 600px; gap: 12px; text-align: left; justify-items: stretch; max-height: 96dvh; overflow-y: auto; }
.ps-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ps-head h2 { font-size: 1.05rem; font-weight: 800; }
.ps-compose { display: flex; gap: 12px; align-items: flex-start; }
.ps-canvas { flex: 1; min-width: 0; border-radius: 18px; transition: background .3s, padding .3s; }
.ps-canvas textarea {
  border: 0 !important; background: transparent !important; box-shadow: none !important; resize: none;
  font-size: 1.08rem !important; min-height: 96px; max-height: 40dvh; padding: 8px 2px !important;
}
.ps-canvas.has-bg { min-height: 220px; display: grid; place-items: center; padding: 18px; box-shadow: inset 0 1px 0 rgba(255,255,255,.35); }
.ps-canvas.has-bg textarea { color: #fff !important; text-align: center; font-weight: 800; font-size: 1.15rem !important; text-shadow: 0 2px 12px rgba(0,0,0,.35); min-height: 120px; }
.ps-canvas.has-bg textarea::placeholder { color: rgba(255,255,255,.8) !important; }
.ps-canvas.pbg-img-marble textarea, .ps-canvas.pbg-peach textarea, .ps-canvas.pbg-mint textarea { color: #1f1235 !important; text-shadow: none; }
.ps-media { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ps-media:empty { display: none; }
.ps-item { position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: #000; animation: pop .25s var(--ease); }
.ps-item img, .ps-item video { width: 100%; height: 100%; object-fit: cover; }
.ps-remove { position: absolute; top: 5px; right: 5px; width: 26px; height: 26px; border-radius: 50%; border: 0; display: grid; place-items: center; color: #fff; background: rgba(0,0,0,.6); }
.ps-remove .icon { width: 14px; height: 14px; }
.ps-panel { display: grid; gap: 10px; padding: 12px; border-radius: 18px; background: var(--input); border: 1px solid var(--input-border); animation: rise .2s var(--ease); }
.ps-panel-title { font-weight: 750; font-size: .88rem; }
.bg-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.bg-swatch { position: relative; width: 42px; height: 42px; border-radius: 12px; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(255,255,255,.3); display: grid; place-items: center; transition: transform .15s; }
.bg-swatch input { position: absolute; opacity: 0; pointer-events: none; }
.bg-swatch:has(input:checked) { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--accent); transform: scale(1.06); }
.bg-swatch:has(input:disabled) { opacity: .35; cursor: not-allowed; }
.bg-none { background: var(--glass-strong); color: var(--muted); }
.bg-none .icon { width: 18px; height: 18px; }
.ps-tools { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 10px; }
.ps-tool {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; border: 0;
  background: transparent; color: var(--accent); font-weight: 700; font-size: .82rem; cursor: pointer;
}
.ps-tool:hover, .ps-tool.is-on { background: var(--grad-soft); }
.ps-tool .icon { width: 18px; height: 18px; }
.ps-tools .char-count { margin-left: auto; }
.ps-progress { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.ps-progress span { display: block; height: 100%; width: 0; background: var(--grad); transition: width .2s; }
.composer-more { width: 36px; height: 36px; }
.composer-more .ps-gif { font-size: .66rem; }
@media (max-width: 480px) {
  .ps-tool span:not(.ps-gif) { display: none; }
  .ps-tool { padding: 10px; }
  .composer-more { display: none; } /* phones use the + menu */
}

/* GIF search */
.gif-search { display: flex; align-items: center; gap: 8px; padding: 0 12px; border-radius: 999px; background: var(--glass-strong); border: 1px solid var(--glass-border); }
.gif-search .icon { width: 18px; height: 18px; color: var(--muted); }
.gif-search input { border: 0 !important; background: transparent !important; box-shadow: none !important; padding: 10px 2px !important; }
.gif-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; max-height: 300px; overflow-y: auto; border-radius: 12px; }
.gif-pick { padding: 0; border: 0; border-radius: 10px; overflow: hidden; aspect-ratio: 1; background: var(--line); cursor: pointer; }
.gif-pick img { width: 100%; height: 100%; object-fit: cover; }
.gif-pick:hover { outline: 3px solid var(--accent); }

/* Meme maker */
.meme-stage { position: relative; border-radius: 16px; overflow: hidden; background: #111; justify-self: center; width: min(100%, 360px); }
.meme-stage canvas { display: block; width: 100%; height: auto; }
.meme-pick { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 6px; color: #fff; cursor: pointer; text-align: center; padding: 16px; background: linear-gradient(135deg, #1f2937, #312e81); }
.meme-pick .icon { width: 40px; height: 40px; padding: 8px; border-radius: 50%; background: rgba(255,255,255,.18); }
.meme-pick small { opacity: .8; }
.meme-bgs { display: flex; gap: 8px; overflow-x: auto; }
.meme-bg { flex: none; width: 52px; height: 52px; border-radius: 12px; border: 0; background-size: cover; background-position: center; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(255,255,255,.3); }
.meme-text { text-align: center; font-weight: 800; }

/* ==========================================================================
   1.8 — No whole-app zoom, one composer everywhere, in-app alerts, notification settings
   ========================================================================== */

/* Double-tap never zooms the app (pinch is handled in app.js) */
html { touch-action: manipulation; }

/* Home composer card: opens the full composer, with every post option one tap away */
.composer-launch { padding: 14px 16px 10px; }
.composer-launch .composer-row { align-items: center; }
.composer-field {
  flex: 1; min-width: 0; text-align: left; padding: 12px 16px; border-radius: 999px; cursor: text;
  border: 1px solid var(--input-border); background: var(--input); color: var(--muted);
  font-weight: 500; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.08);
  transition: border-color .2s, background-color .2s;
}
.composer-field:hover { border-color: var(--accent); }
.composer-launch .composer-bar { margin-left: 0; margin-top: 10px; gap: 4px; justify-content: space-between; }
.composer-opt {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px 6px 6px; border: 0; border-radius: 999px;
  background: transparent; color: var(--text-soft); font-weight: 650; font-size: .86rem; cursor: pointer;
  transition: background-color .2s, transform .15s var(--ease);
}
.composer-opt:hover { background: var(--glass-hover); }
.composer-opt:active { transform: scale(.94); }
.co-ic {
  width: 32px; height: 32px; border-radius: 11px; display: grid; place-items: center; color: #fff; flex: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 6px 14px -8px rgba(0,0,0,.6);
}
.co-ic .icon { width: 17px; height: 17px; }
.co-ic .ps-gif { font-size: .6rem; border-width: 1.5px; padding: 0 3px; }
.co-media { background: linear-gradient(135deg, #06b6d4, #3b82f6); }
.co-gif { background: linear-gradient(135deg, #10b981, #84cc16); }
.co-meme { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.co-bg { background: linear-gradient(135deg, #ec4899, #f97316); }
.co-glint { background: conic-gradient(from 210deg, #a78bfa, #22d3ee, #f472b6, #fbbf24, #a78bfa); }
@media (max-width: 640px) {
  .composer-launch .composer-bar { justify-content: space-around; }
  .composer-opt { flex-direction: column; gap: 4px; padding: 4px 6px; font-size: .7rem; }
  .co-ic { width: 38px; height: 38px; border-radius: 13px; }
}
@media (max-width: 340px) { .co-l { display: none; } }

/* In-app alert banner (slides down like a native notification) */
.notice-banners {
  position: fixed; z-index: 120; left: 0; right: 0; top: calc(env(safe-area-inset-top, 0px) + 10px);
  display: grid; justify-items: center; padding: 0 12px; pointer-events: none;
}
.notice-banner {
  pointer-events: auto; width: min(100%, 440px); display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 22px; color: var(--text); text-decoration: none !important;
  box-shadow: 0 22px 50px -18px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.35);
  animation: nb-in .45s var(--ease) both;
}
.notice-banner.out { animation: nb-out .35s var(--ease) both; }
.nb-text { flex: 1; min-width: 0; display: grid; line-height: 1.3; }
.nb-text strong { font-size: .95rem; }
.nb-text span { color: var(--text-soft); font-size: .88rem; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.nb-kind { width: 10px; height: 10px; border-radius: 50%; background: var(--grad); flex: none; box-shadow: 0 0 0 4px rgba(124,58,237,.18); }
@keyframes nb-in { from { opacity: 0; transform: translateY(-120%) scale(.96); } }
@keyframes nb-out { to { opacity: 0; transform: translateY(-120%) scale(.96); } }

/* Notification settings */
.push-row { display: flex; align-items: center; gap: 14px; justify-content: space-between; padding: 6px 0 12px; }
.push-row + .push-row, .push-types + .push-row, [data-push-test] + .push-row { border-top: 1px solid var(--line); padding-top: 14px; }
.push-row p { margin: 2px 0 0; }
.push-types { display: grid; gap: 8px; margin: 0 0 12px; transition: opacity .2s; }
.push-types.is-off { opacity: .55; }
.chip-checks { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-check {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--glass-border); background: var(--glass); font-weight: 650; font-size: .86rem;
}
.chip-check:has(input:checked) { background: var(--grad-soft); border-color: var(--accent); }
[data-push-test] { margin-bottom: 12px; }

/* iOS-style switch */
.switch { position: relative; flex: none; width: 52px; height: 32px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch span {
  position: absolute; inset: 0; border-radius: 999px; background: var(--line); border: 1px solid var(--glass-border);
  transition: background .25s; pointer-events: none;
}
.switch span::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 26px; height: 26px; border-radius: 50%; background: #fff;
  box-shadow: 0 3px 8px rgba(0,0,0,.3); transition: transform .25s var(--ease);
}
.switch input:checked + span { background: var(--grad); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { box-shadow: var(--focus); }

/* "Turn on notifications" card on the notifications page */
.push-promo { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin-bottom: 14px; }
.push-promo[hidden] { display: none; }
.push-promo-icon { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; flex: none; color: #fff; background: var(--grad); box-shadow: inset 0 1px 0 rgba(255,255,255,.45); }
.push-promo-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.push-promo-actions { display: flex; align-items: center; gap: 4px; }
@media (max-width: 480px) {
  .push-promo { flex-wrap: wrap; }
  .push-promo-actions { width: 100%; justify-content: flex-end; }
}
/* banner sits over the top bar, so it gets a denser pane than ordinary glass */
.notice-banner {
  background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(246,244,255,.9));
  -webkit-backdrop-filter: blur(28px) saturate(1.6); backdrop-filter: blur(28px) saturate(1.6);
  border: 1px solid rgba(255,255,255,.7);
}
:root[data-theme="dark"] .notice-banner { background: linear-gradient(180deg, rgba(40,36,72,.94), rgba(24,22,46,.92)); border-color: rgba(255,255,255,.14); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .notice-banner { background: linear-gradient(180deg, rgba(40,36,72,.94), rgba(24,22,46,.92)); border-color: rgba(255,255,255,.14); }
}
.chip-check input { width: 15px; height: 15px; }

/* ==========================================================================
   1.9 — Reactions, menu drawer, compact feed switch, GIF grid fix, sparkle burst
   ========================================================================== */

/* GIF results: fixed square tiles (Safari ignored aspect-ratio on buttons, so tiles overlapped) */
.gif-grid { grid-auto-rows: auto; align-content: start; }
.gif-pick { position: relative; display: block; width: 100%; height: 0; padding: 0 0 100% !important; aspect-ratio: auto; }
.gif-pick img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* No character counter on posts */
[data-ps-count] { display: none !important; }

/* Reaction button + summary */
.react-group { display: inline-flex; align-items: center; gap: 2px; }
.react-btn { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.react-face { display: grid; place-items: center; width: 20px; height: 20px; }
.react-emoji { font-size: 1.15rem; line-height: 1; }
.react-btn.is-on { color: var(--text); background: var(--grad-soft); }
.react-btn.react-heart { color: var(--like); }
.react-btn.pulse .react-face { animation: heart .45s var(--ease); }
.react-sum {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px 5px 6px; border: 0; border-radius: 999px;
  background: transparent; color: var(--muted); font-weight: 700; font-size: .85rem; cursor: pointer;
  transition: background-color .2s;
}
.react-sum:hover { background: var(--glass-hover); }
.react-sum.is-empty { display: none; }
.rs-emojis { display: inline-flex; }
.rs-e { display: grid; place-items: center; width: 22px; height: 22px; margin-left: -6px; border-radius: 50%; font-size: .78rem; background: var(--glass-strong); box-shadow: 0 0 0 2px var(--bg); }
.rs-e:first-child { margin-left: 0; }
@media (max-width: 380px) { .react-label { display: none; } }

/* Emoji picker */
.react-picker {
  position: fixed; z-index: 200; display: flex; gap: 2px; padding: 6px; border-radius: 999px;
  box-shadow: 0 20px 50px -16px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.35);
  transform-origin: 50% 100%; opacity: 0; transform: translateY(8px) scale(.9);
  transition: opacity .18s, transform .25s var(--ease);
}
.react-picker.below { transform-origin: 50% 0; }
.react-picker.open { opacity: 1; transform: none; }
.rp-btn {
  position: relative; width: 46px; height: 46px; border: 0; border-radius: 50%; background: transparent; cursor: pointer;
  display: grid; place-items: center; transition: transform .18s var(--ease), background-color .15s;
}
.rp-btn span { font-size: 1.75rem; line-height: 1; }
.react-picker.open .rp-btn span { animation: rp-in .4s var(--ease) both; animation-delay: calc(var(--i) * 35ms); }
.rp-btn small { position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); padding: 2px 8px; border-radius: 99px; background: rgba(0,0,0,.75); color: #fff; font-size: .68rem; font-weight: 700; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s; }
.rp-btn:hover { transform: translateY(-6px) scale(1.25); }
.rp-btn:hover small { opacity: 1; }
.rp-btn.is-current { background: var(--grad-soft); }
@keyframes rp-in { from { transform: translateY(14px) scale(.3); opacity: 0; } }
@media (max-width: 400px) { .rp-btn { width: 42px; height: 42px; } .rp-btn span { font-size: 1.55rem; } }

/* Who reacted */
.reactors-sheet { justify-items: stretch; text-align: left; max-height: 80vh; max-height: 80dvh; grid-template-rows: auto auto auto 1fr; }
.reactors-head { display: flex; align-items: center; justify-content: space-between; }
.reactors-head h2 { margin: 0; font-size: 1.15rem; }
.reactors-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.rt { flex: none; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--glass-border); background: var(--glass); font-weight: 700; font-size: .88rem; cursor: pointer; color: var(--text); }
.rt b { font-weight: 800; margin-left: 2px; }
.rt.is-on { background: var(--grad); color: #fff; border-color: transparent; }
.reactors-list { overflow-y: auto; min-height: 120px; display: grid; align-content: start; gap: 4px; }
.reactor { position: relative; }
.reactor .user-row { padding-right: 34px; }
.reactor-e { position: absolute; top: 50%; right: 4px; transform: translateY(-50%); font-size: 1.3rem; }
.reactor .user-row .btn { margin-right: 8px; }
.gv-viewers .reactors-tabs { margin-bottom: 8px; }
.gv-viewers .rt { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.2); }
.gv-viewers .rt.is-on { background: var(--grad); }

/* Glint player reactions */
.gv-react.is-on { background: rgba(255,255,255,.16); }
.gv-react-e { font-size: 1.4rem; line-height: 1; }
.gv-react.pulse { animation: heart .45s var(--ease); }
.gv-reacts { margin-left: 8px; }
.gv-re { letter-spacing: -2px; }

/* Topbar menu button (avatar + ☰) */
.topbar-menu {
  position: relative; display: inline-flex; align-items: center; gap: 6px; margin-left: 6px; padding: 3px 10px 3px 3px;
  border-radius: 999px; border: 1px solid var(--glass-border); background: var(--glass); color: var(--text); cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.3);
}
.topbar-menu .avatar { width: 32px; height: 32px; }
.topbar-menu-ic .icon { width: 20px; height: 20px; display: block; }
.topbar-menu-dot { position: absolute; top: -3px; right: -3px; }
.topbar-menu:active { transform: scale(.95); }

/* Drawer */
.drawer-backdrop { position: fixed; inset: 0; z-index: 90; background: rgba(5,5,15,.0); transition: background-color .3s; }
.drawer-backdrop.open { background: rgba(5,5,15,.45); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.drawer {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(86vw, 360px); overflow-y: auto; overscroll-behavior: contain;
  padding: calc(16px + env(safe-area-inset-top)) 16px calc(20px + env(safe-area-inset-bottom));
  border-radius: 28px 0 0 28px; border-right: 0;
  display: flex; flex-direction: column; gap: 14px;
  transform: translateX(105%); transition: transform .32s var(--ease);
  box-shadow: -30px 0 60px -30px rgba(0,0,0,.6);
}
.drawer-backdrop.open .drawer { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.drawer-me { display: flex; align-items: center; gap: 12px; min-width: 0; color: var(--text); text-decoration: none !important; }
.drawer-me span { display: grid; min-width: 0; }
.drawer-me strong { font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawer-me small { color: var(--muted); }
.drawer-group { display: grid; gap: 2px; padding: 6px; border-radius: 20px; background: var(--glass); border: 1px solid var(--glass-border); }
.drawer-link {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 10px; border: 0; border-radius: 14px;
  background: transparent; color: var(--text); font-weight: 650; font-size: .98rem; text-align: left; text-decoration: none !important; cursor: pointer;
}
.drawer-link:hover, .drawer-link:active { background: var(--glass-hover); }
.drawer-link.danger { color: var(--danger); }
.dl-ic { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; flex: none; background: var(--grad-soft); color: var(--accent); }
.drawer-link.danger .dl-ic { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.dl-ic .icon { width: 19px; height: 19px; }
.dl-label { flex: 1; min-width: 0; }
.dl-go { color: var(--muted); display: grid; }
.dl-go .icon { width: 16px; height: 16px; }
.dl-badge { position: static; }
.drawer-theme { display: flex; align-items: center; justify-content: space-between; padding: 8px 8px 8px 14px; font-weight: 650; }
.drawer-theme .seg { margin: 0; }
.drawer-theme .seg label { padding: 7px 12px; }
.drawer-logout { margin: 0; }
.drawer-foot { text-align: center; margin: auto 0 0; }

/* Following / everyone: a compact glass switch instead of a full-width bar */
.home-feed .tabs {
  display: flex; width: fit-content; margin: 0 auto; padding: 4px; gap: 2px;
  border-radius: 999px; position: relative;
}
.home-feed .tab { flex: none; padding: 7px 18px; font-size: .86rem; border-radius: 999px; }
.home-feed .tab[aria-selected="true"] {
  color: #fff; background: var(--grad);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 6px 16px -8px rgba(124,58,237,.9);
}

/* Sparkle burst when a Glint is shared */
.sparkle-burst { position: fixed; inset: 0; z-index: 300; pointer-events: none; animation: fade .2s; }
.sparkle-burst canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.sparkle-burst.out { opacity: 0; transition: opacity .28s; }
.sb-core {
  position: absolute; left: var(--cx); top: var(--cy); width: 120px; height: 120px; margin: -60px 0 0 -60px;
  background: radial-gradient(circle, #fff 0%, rgba(255,255,255,.9) 12%, rgba(196,181,253,.6) 30%, rgba(34,211,238,.25) 50%, transparent 70%);
  clip-path: polygon(50% 0, 58% 42%, 100% 50%, 58% 58%, 50% 100%, 42% 58%, 0 50%, 42% 42%);
  animation: sb-core 1.1s var(--ease) both; filter: drop-shadow(0 0 18px #fff);
}
.sb-ring {
  position: absolute; left: var(--cx); top: var(--cy); width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,.9); box-shadow: 0 0 30px #a78bfa, inset 0 0 20px #22d3ee;
  animation: sb-ring 1s var(--ease) .05s both;
}
.sb-label {
  position: absolute; left: 0; right: 0; top: calc(var(--cy) + 90px); text-align: center; font-weight: 900; font-size: 1.6rem;
  background: linear-gradient(90deg, #a78bfa, #22d3ee, #f472b6, #fbbf24, #a78bfa); background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 2px 10px rgba(0,0,0,.4));
  animation: sb-label 1.4s var(--ease) both, sb-shine 1.4s linear both;
}
.sb-label span { -webkit-text-fill-color: initial; color: #fff; }
@keyframes sb-core { 0% { transform: scale(0) rotate(-60deg); opacity: 0; } 35% { transform: scale(1.5) rotate(0); opacity: 1; } 100% { transform: scale(.2) rotate(45deg); opacity: 0; } }
@keyframes sb-ring { from { transform: scale(.2); opacity: 1; } to { transform: scale(9); opacity: 0; border-width: 1px; } }
@keyframes sb-label { 0% { opacity: 0; transform: translateY(16px) scale(.9); } 25%, 75% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-10px); } }
@keyframes sb-shine { to { background-position: -200% 0; } }

/* …and your ring shimmers once on the refreshed page */
.glint-item.just-posted .glint-ring { position: relative; animation: jp-pop .7s var(--ease); }
.glint-item.just-posted .glint-ring::before {
  content: ""; position: absolute; inset: -3px; border-radius: 50%; z-index: 0;
  background: conic-gradient(from 0deg, #a78bfa, #22d3ee, #f472b6, #fbbf24, #a78bfa); animation: jp-spin 1.6s linear 2;
  -webkit-mask: radial-gradient(circle, transparent 62%, #000 64%); mask: radial-gradient(circle, transparent 62%, #000 64%);
}
.glint-item.just-posted .glint-ring::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.8) 48%, transparent 66%); background-size: 250% 100%;
  animation: jp-sweep 1.2s ease-out .2s 2 both;
}
@keyframes jp-spin { to { transform: rotate(360deg); } }
@keyframes jp-sweep { from { background-position: 150% 0; } to { background-position: -100% 0; } }
@keyframes jp-pop { 40% { transform: scale(1.12); } }
@media (prefers-reduced-motion: reduce) { .sb-core, .sb-ring { display: none; } }
.sparkle-burst::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at var(--cx) var(--cy), rgba(196,181,253,.38), rgba(34,211,238,.12) 30%, rgba(5,5,15,.35) 70%);
  animation: sb-bg 1.6s ease both;
}
@keyframes sb-bg { 0% { opacity: 0; } 15%, 70% { opacity: 1; } 100% { opacity: 0; } }

/* ==========================================================================
   2.0 — Composer that grows out of the bubble, in-app panels, smoother & lighter
   ========================================================================== */

/* Home: just the bubble — every option unfolds inside the composer */
.composer-launch { padding: 12px 14px; }
.composer-launch .composer-row { gap: 10px; }
.composer-field { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 8px 11px 18px; }
.composer-field > span:first-child { overflow: hidden; text-overflow: ellipsis; }
.cf-plus { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--grad); box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 6px 14px -8px rgba(124,58,237,.9); transition: transform .25s var(--ease); }
.cf-plus .icon { width: 16px; height: 16px; }
.composer-field:active .cf-plus { transform: rotate(90deg) scale(.9); }

/* Composer: flex column — header and tools stay put, the middle scrolls */
.ps-backdrop { animation: none; -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(5,5,15,.45); }
.post-sheet { display: flex; flex-direction: column; gap: 12px; overflow-y: auto; overscroll-behavior: contain; padding-bottom: 0; animation: none; }
.post-sheet > * { flex: none; }
.post-sheet .ps-head { position: sticky; top: -10px; z-index: 3; margin: -10px -22px 0; padding: 12px 22px 10px; background: color-mix(in srgb, var(--bg) 55%, transparent); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.post-sheet .ps-tools {
  position: sticky; bottom: 0; z-index: 3; margin: auto -22px 0; padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  justify-content: space-between; flex-wrap: nowrap; gap: 2px;
  background: color-mix(in srgb, var(--bg) 60%, transparent); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
}
.ps-backdrop.kb-open .post-sheet .ps-tools { padding-bottom: 8px; }
.ps-tool { flex-direction: column; gap: 4px; padding: 4px 6px; border-radius: 14px; color: var(--text-soft); font-size: .7rem; min-width: 56px; }
.ps-tool .co-ic { width: 38px; height: 38px; border-radius: 13px; transition: transform .2s var(--ease); }
.ps-tool:active .co-ic { transform: scale(.9); }
.ps-tool.is-on { background: transparent; color: var(--text); }
.ps-tool.is-on .co-ic { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); }
@media (max-width: 480px) {
  .ps-tool span:not(.ps-gif) { display: inline; }
  .ps-tool .co-ic { display: grid; }
  .ps-tool { padding: 4px 2px; min-width: 0; flex: 1; }
}
.post-sheet.is-edit .ps-tool-glint { display: none; }
.ps-canvas textarea { min-height: 96px; }

/* Opening: the tools and text rise in, one after another */
.ps-opening .ps-compose { animation: rise .4s var(--ease) .04s both; }
.ps-opening .ps-tools > * { animation: tool-in .5s var(--ease) both; }
.ps-opening .ps-tools > :nth-child(1) { animation-delay: .08s; }
.ps-opening .ps-tools > :nth-child(2) { animation-delay: .12s; }
.ps-opening .ps-tools > :nth-child(3) { animation-delay: .16s; }
.ps-opening .ps-tools > :nth-child(4) { animation-delay: .20s; }
.ps-opening .ps-tools > :nth-child(5) { animation-delay: .24s; }
@keyframes tool-in { from { opacity: 0; transform: translateY(14px) scale(.7); } }

/* Phones: a full-screen composer that always fits above the keyboard */
@media (max-width: 640px) {
  .ps-backdrop { position: fixed; inset: auto 0 auto 0; top: var(--vvt, 0px); height: var(--vvh, 100dvh); align-items: stretch; background: transparent; }
  .ps-backdrop .post-sheet {
    width: 100%; max-width: none; max-height: none; height: 100%; border-radius: 0; border: 0;
    padding: calc(10px + env(safe-area-inset-top)) 16px 0;
  }
  .post-sheet .ps-head { top: calc(-10px - env(safe-area-inset-top)); margin: calc(-10px - env(safe-area-inset-top)) -16px 0; padding: calc(12px + env(safe-area-inset-top)) 16px 10px; }
  .post-sheet .ps-tools { margin: auto -16px 0; padding-left: 10px; padding-right: 10px; }
  .post-sheet .ps-head h2 { font-size: 1rem; }
}
@media (min-width: 641px) {
  .ps-backdrop { align-items: center; }
  .ps-backdrop .post-sheet { max-height: min(86vh, 860px); border-radius: 28px; }
}
body.composing .tabbar { visibility: hidden; }

/* New / edited posts animate in; everything else just appears (faster pages) */
.reveal { animation: none; }
.post.pop-in { animation: rise .45s var(--ease) both; }
.post.just-edited { animation: edited-glow 1.2s ease both; }
@keyframes edited-glow { 0% { box-shadow: 0 0 0 2px var(--accent), var(--depth); } 100% { box-shadow: inset 0 1px 0 var(--edge-hi), var(--depth); } }
.edited { font-style: italic; }

/* In-app panels (notifications, messages) — glass that slides over the page, like the menu */
.ap-backdrop { position: fixed; left: 0; right: 0; top: var(--vvt, 0px); height: var(--vvh, 100%); z-index: 85; background: rgba(5,5,15,0); transition: background-color .3s; }
.ap-backdrop.open { background: rgba(5,5,15,.42); }
.app-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(100vw, 460px);
  display: grid; overflow: hidden; border-radius: 28px 0 0 28px; border-right: 0;
  padding-top: env(safe-area-inset-top);
  transform: translateX(104%); transition: transform .34s var(--ease);
  box-shadow: -30px 0 60px -30px rgba(0,0,0,.6);
}
.ap-backdrop.open .app-panel { transform: none; }
@media (max-width: 640px) { .app-panel { width: 100vw; border-radius: 0; border: 0; } }
.ap-view { grid-area: 1 / 1; display: flex; flex-direction: column; min-height: 0; visibility: hidden; }
.ap-view.is-on { visibility: visible; }
.ap-view.is-on.anim.from-right { animation: ap-push .34s var(--ease) both; }
.ap-view.is-on.anim.from-left { animation: ap-pop .34s var(--ease) both; }
@keyframes ap-push { from { transform: translateX(40%); opacity: 0; } }
@keyframes ap-pop { from { transform: translateX(-30%); opacity: 0; } }
.ap-head { display: flex; align-items: center; gap: 8px; padding: 14px 12px 12px 18px; border-bottom: 1px solid var(--line); flex: none; }
.ap-head h2 { flex: 1; display: flex; align-items: center; gap: 10px; margin: 0; font-size: 1.25rem; font-weight: 800; }
.ap-head h2 .icon { width: 22px; height: 22px; color: var(--accent); }
.ap-thread .ap-head { padding-left: 8px; }
.ap-thread .dm-who { flex: 1; min-width: 0; }
.ap-thread .dm-who strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 12px 12px calc(18px + env(safe-area-inset-bottom)); -webkit-overflow-scrolling: touch; }
.ap-body .notif-list { gap: 8px; }
.ap-body .notif { border-radius: 18px; }
.ap-body .dm-convos { padding: 0; overflow: visible; }
.ap-body .dm-convo { padding: 12px; }
.ap-msgs { display: flex; flex-direction: column; gap: 6px; padding: 16px 14px; }
.ap-compose { flex: none; padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
.ap-skel i { display: block; height: 62px; margin-bottom: 10px; border-radius: 16px; background: linear-gradient(90deg, var(--glass) 0%, var(--glass-hover) 50%, var(--glass) 100%); background-size: 200% 100%; animation: ap-shimmer 1.1s linear infinite; }
@keyframes ap-shimmer { to { background-position: -200% 0; } }
.nav-link.is-panel { color: var(--text); }
.tabbar .nav-link.is-panel { background: var(--grad-soft); }
.ap-body .empty { margin-top: 10px; }

/* ---------- Performance: smoother scrolling on phones ---------- */
/* Glass blurs whatever is behind it every frame. On phones the background stays still and is drawn
   with plain gradients (no live blur), so cards don't have to re-blur a moving scene while you scroll. */
@media (pointer: coarse) {
  .blob { animation: none !important; filter: none !important; background: radial-gradient(closest-side, var(--c) 0%, color-mix(in srgb, var(--c) 45%, transparent) 55%, transparent 100%) !important; }
  .b1 { --c: var(--blob-1); } .b2 { --c: var(--blob-2); } .b3 { --c: var(--blob-3); } .b4 { --c: var(--blob-4); }
  .bg::after { animation: none; display: none; }
  .grain { display: none; }
}
@media (max-width: 820px), (max-height: 500px) and (pointer: coarse) {
  :root { --blur: 16px; }
  .post.glass { -webkit-backdrop-filter: blur(14px) saturate(160%); backdrop-filter: blur(14px) saturate(160%); }
}


/* Phones: the tab bar floats above the panel so you can hop between alerts, messages and home */
@media (max-width: 820px), (max-height: 500px) and (pointer: coarse) {
  body.ap-open .tabbar, body.ap-closing .tabbar { z-index: 95; }
  body.ap-open .ap-body { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
  body.ap-in-thread:has([data-app-panel].open) .tabbar { visibility: hidden; } /* 2.23.13: only while the panel is really open */
}
.app-panel { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
.ps-tool span.co-ic { display: grid; place-items: center; }
@media (max-width: 640px) {
  .ps-backdrop .post-sheet { background-color: color-mix(in srgb, var(--bg) 82%, transparent); }
}
.app-panel { background-color: color-mix(in srgb, var(--bg) 70%, transparent); }
.notif-list { grid-template-columns: minmax(0, 1fr); }
.notif-glint { color: #a78bfa; background: color-mix(in srgb, #a78bfa 16%, transparent); }
.menu-open, .post:has(.menu:not([hidden])) { position: relative; z-index: 6; }
@media (min-width: 641px) {
  .ps-backdrop { background: rgba(5,5,15,.5); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
}

/* ==========================================================================
   2.1 — Themes (oled, solid), accent colors, wallpapers, readable text
   ========================================================================== */

/* Accent colors (light theme uses deeper tones, dark theme lighter ones — both stay readable) */
:root[data-accent="ocean"] { --accent: #0369a1; --accent-ink: #0369a1; --accent-2: #06b6d4; --accent-3: #14b8a6; --grad: linear-gradient(135deg, #2563eb 0%, #06b6d4 55%, #14b8a6 110%); --grad-soft: linear-gradient(135deg, rgba(37,99,235,.14), rgba(6,182,212,.12)); --focus: 0 0 0 3px rgba(3,105,161,.35); }
:root[data-accent="ocean"][data-theme="dark"] { --accent: #38bdf8; --accent-ink: #38bdf8; --grad-soft: linear-gradient(135deg, rgba(37,99,235,.2), rgba(6,182,212,.14)); --focus: 0 0 0 3px rgba(56,189,248,.45); }
:root[data-accent="rose"] { --accent: #be123c; --accent-ink: #be123c; --accent-2: #f472b6; --accent-3: #fb923c; --grad: linear-gradient(135deg, #e11d48 0%, #f472b6 55%, #fb923c 110%); --grad-soft: linear-gradient(135deg, rgba(225,29,72,.14), rgba(244,114,182,.12)); --focus: 0 0 0 3px rgba(190,18,60,.35); }
:root[data-accent="rose"][data-theme="dark"] { --accent: #fb7185; --accent-ink: #fb7185; --grad-soft: linear-gradient(135deg, rgba(225,29,72,.2), rgba(244,114,182,.14)); --focus: 0 0 0 3px rgba(251,113,133,.45); }
:root[data-accent="sunset"] { --accent: #c2410c; --accent-ink: #c2410c; --accent-2: #ef4444; --accent-3: #db2777; --grad: linear-gradient(135deg, #f97316 0%, #ef4444 55%, #db2777 110%); --grad-soft: linear-gradient(135deg, rgba(249,115,22,.14), rgba(239,68,68,.12)); --focus: 0 0 0 3px rgba(194,65,12,.35); }
:root[data-accent="sunset"][data-theme="dark"] { --accent: #fb923c; --accent-ink: #fb923c; --grad-soft: linear-gradient(135deg, rgba(249,115,22,.2), rgba(239,68,68,.14)); --focus: 0 0 0 3px rgba(251,146,60,.45); }
:root[data-accent="forest"] { --accent: #15803d; --accent-ink: #15803d; --accent-2: #65a30d; --accent-3: #0d9488; --grad: linear-gradient(135deg, #16a34a 0%, #65a30d 55%, #0d9488 110%); --grad-soft: linear-gradient(135deg, rgba(22,163,74,.14), rgba(101,163,13,.12)); --focus: 0 0 0 3px rgba(21,128,61,.35); }
:root[data-accent="forest"][data-theme="dark"] { --accent: #4ade80; --accent-ink: #4ade80; --grad-soft: linear-gradient(135deg, rgba(22,163,74,.2), rgba(101,163,13,.14)); --focus: 0 0 0 3px rgba(74,222,128,.45); }
:root[data-accent="gold"] { --accent: #a16207; --accent-ink: #a16207; --accent-2: #f59e0b; --accent-3: #f97316; --grad: linear-gradient(135deg, #eab308 0%, #f59e0b 55%, #f97316 110%); --grad-soft: linear-gradient(135deg, rgba(234,179,8,.14), rgba(245,158,11,.12)); --focus: 0 0 0 3px rgba(161,98,7,.35); }
:root[data-accent="gold"][data-theme="dark"] { --accent: #facc15; --accent-ink: #facc15; --grad-soft: linear-gradient(135deg, rgba(234,179,8,.2), rgba(245,158,11,.14)); --focus: 0 0 0 3px rgba(250,204,21,.45); }
:root[data-accent="mint"] { --accent: #0f766e; --accent-ink: #0f766e; --accent-2: #22c55e; --accent-3: #06b6d4; --grad: linear-gradient(135deg, #14b8a6 0%, #22c55e 55%, #06b6d4 110%); --grad-soft: linear-gradient(135deg, rgba(20,184,166,.14), rgba(34,197,94,.12)); --focus: 0 0 0 3px rgba(15,118,110,.35); }
:root[data-accent="mint"][data-theme="dark"] { --accent: #5eead4; --accent-ink: #5eead4; --grad-soft: linear-gradient(135deg, rgba(20,184,166,.2), rgba(34,197,94,.14)); --focus: 0 0 0 3px rgba(94,234,212,.45); }
:root[data-accent="berry"] { --accent: #86198f; --accent-ink: #86198f; --accent-2: #9333ea; --accent-3: #ec4899; --grad: linear-gradient(135deg, #c026d3 0%, #9333ea 55%, #ec4899 110%); --grad-soft: linear-gradient(135deg, rgba(192,38,211,.14), rgba(147,51,234,.12)); --focus: 0 0 0 3px rgba(134,25,143,.35); }
:root[data-accent="berry"][data-theme="dark"] { --accent: #e879f9; --accent-ink: #e879f9; --grad-soft: linear-gradient(135deg, rgba(192,38,211,.2), rgba(147,51,234,.14)); --focus: 0 0 0 3px rgba(232,121,249,.45); }
:root[data-accent="sky"] { --accent: #1d4ed8; --accent-ink: #1d4ed8; --accent-2: #60a5fa; --accent-3: #a78bfa; --grad: linear-gradient(135deg, #3b82f6 0%, #60a5fa 55%, #a78bfa 110%); --grad-soft: linear-gradient(135deg, rgba(59,130,246,.14), rgba(96,165,250,.12)); --focus: 0 0 0 3px rgba(29,78,216,.35); }
:root[data-accent="sky"][data-theme="dark"] { --accent: #93c5fd; --accent-ink: #93c5fd; --grad-soft: linear-gradient(135deg, rgba(59,130,246,.2), rgba(96,165,250,.14)); --focus: 0 0 0 3px rgba(147,197,253,.45); }
:root[data-accent="crimson"] { --accent: #b91c1c; --accent-ink: #b91c1c; --accent-2: #9f1239; --accent-3: #ea580c; --grad: linear-gradient(135deg, #dc2626 0%, #9f1239 55%, #ea580c 110%); --grad-soft: linear-gradient(135deg, rgba(220,38,38,.14), rgba(159,18,57,.12)); --focus: 0 0 0 3px rgba(185,28,28,.35); }
:root[data-accent="crimson"][data-theme="dark"] { --accent: #f87171; --accent-ink: #f87171; --grad-soft: linear-gradient(135deg, rgba(220,38,38,.2), rgba(159,18,57,.14)); --focus: 0 0 0 3px rgba(248,113,113,.45); }
:root[data-accent="lavender"] { --accent: #6d28d9; --accent-ink: #6d28d9; --accent-2: #c084fc; --accent-3: #f0abfc; --grad: linear-gradient(135deg, #a78bfa 0%, #c084fc 55%, #f0abfc 110%); --grad-soft: linear-gradient(135deg, rgba(167,139,250,.14), rgba(192,132,252,.12)); --focus: 0 0 0 3px rgba(109,40,217,.35); }
:root[data-accent="lavender"][data-theme="dark"] { --accent: #c4b5fd; --accent-ink: #c4b5fd; --grad-soft: linear-gradient(135deg, rgba(167,139,250,.2), rgba(192,132,252,.14)); --focus: 0 0 0 3px rgba(196,181,253,.45); }
:root[data-accent="mono"] { --accent: #334155; --accent-ink: #334155; --accent-2: #64748b; --accent-3: #94a3b8; --grad: linear-gradient(135deg, #475569 0%, #64748b 55%, #94a3b8 110%); --grad-soft: linear-gradient(135deg, rgba(71,85,105,.14), rgba(100,116,139,.12)); --focus: 0 0 0 3px rgba(51,65,85,.35); }
:root[data-accent="mono"][data-theme="dark"] { --accent: #e2e8f0; --accent-ink: #e2e8f0; --grad-soft: linear-gradient(135deg, rgba(71,85,105,.2), rgba(100,116,139,.14)); --focus: 0 0 0 3px rgba(226,232,240,.45); }
:root[data-accent="mono"] .btn-primary, :root[data-accent="mono"][data-theme="dark"] .tab[aria-selected="true"] { color: #fff; }

/* Wallpapers */
.bg-wall { position: absolute; inset: 0; background: var(--wall, none); }
:root[data-wall]:not([data-wall="glassay"]) .blob,
:root[data-wall]:not([data-wall="glassay"]) .grain,
:root[data-wall]:not([data-wall="glassay"]) .bg::after { display: none; }
:root[data-wall="plain"] .bg { background: var(--bg); }

/* Glass gets a little thicker over a wallpaper, and much thicker when the wallpaper fights the theme,
   so text on cards always stays easy to read. */
:root[data-wall]:not([data-wall="glassay"]):not([data-wall="plain"])[data-theme="light"] { --glass: rgba(255,255,255,.72); --glass-strong: rgba(255,255,255,.82); --glass-hover: rgba(255,255,255,.88); }
:root[data-wall]:not([data-wall="glassay"]):not([data-wall="plain"])[data-theme="dark"] { --glass: rgba(16,16,30,.52); --glass-strong: rgba(16,16,30,.72); --glass-hover: rgba(30,30,52,.62); }
:root[data-wall-clash][data-theme="light"] { --glass: rgba(255,255,255,.88); --glass-strong: rgba(255,255,255,.93); --glass-hover: rgba(255,255,255,.96); }
:root[data-wall-clash][data-theme="dark"] { --glass: rgba(14,14,26,.84); --glass-strong: rgba(14,14,26,.9); --glass-hover: rgba(30,30,50,.9); }
/* Bits of text that sit straight on the wallpaper get their own small glass pill */
:root[data-wall]:not([data-wall="glassay"]):not([data-wall="plain"]) :is(.page-head h1, .feed-end, .customize-link, .footer-note) {
  width: fit-content; padding: 3px 12px; border-radius: 999px; background: var(--glass-strong);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
:root[data-wall]:not([data-wall="glassay"]):not([data-wall="plain"]) .feed-end { margin-inline: auto; }

/* OLED: true black, no glow, no blur — great on OLED screens and for battery */
:root[data-skin="oled"] {
  --bg: #000; --blob-opacity: 0;
  --glass: rgba(255,255,255,.04); --glass-strong: #0b0b0f; --glass-hover: rgba(255,255,255,.08);
  --glass-border: rgba(255,255,255,.1); --glass-tint: transparent; --sheen: transparent;
  --edge-hi: rgba(255,255,255,.1); --edge-lo: rgba(255,255,255,.03); --depth: none;
  --input: rgba(255,255,255,.06); --input-border: rgba(255,255,255,.14);
  --text: #f5f5f7; --text-soft: #d4d4dc; --muted: #9a9aa8; --line: rgba(255,255,255,.1);
}
:root[data-skin="oled"][data-wall="glassay"] .bg, :root[data-skin="oled"][data-wall="plain"] .bg { background: #000; }
:root[data-skin="oled"][data-wall="glassay"] .blob, :root[data-skin="oled"][data-wall="glassay"] .grain, :root[data-skin="oled"][data-wall="glassay"] .bg::after { display: none; }
:root[data-skin="oled"]:is([data-wall="glassay"], [data-wall="plain"]) :is(.glass, .glass-strong, .topbar, .tabbar, .sidebar-inner, .post.glass) { -webkit-backdrop-filter: none; backdrop-filter: none; }
:root[data-skin="oled"]:is([data-wall="glassay"], [data-wall="plain"]) .topbar { background: rgba(0,0,0,.92); }
:root[data-skin="oled"]:is([data-wall="glassay"], [data-wall="plain"]) .tabbar { background: rgba(14,14,18,.96); }
:root[data-skin="oled"] .msg-in .msg-bubble { background: #16161c; }

/* Solid light: crisp white cards, nothing see-through */
:root[data-skin="solid"] {
  --bg: #eceef5;
  --glass: #ffffff; --glass-strong: #ffffff; --glass-hover: #f3f4f8;
  --glass-border: rgba(15,23,42,.08); --glass-tint: transparent; --sheen: transparent;
  --edge-hi: transparent; --edge-lo: transparent;
  --depth: 0 1px 2px rgba(15,23,42,.06), 0 10px 26px -18px rgba(15,23,42,.35);
  --input: #f3f4f8; --input-border: rgba(15,23,42,.12);
  --text: #0f1222; --text-soft: #32364d; --muted: #5f6378; --line: rgba(15,23,42,.09);
}
:root[data-skin="solid"][data-wall="glassay"] .blob, :root[data-skin="solid"][data-wall="glassay"] .grain, :root[data-skin="solid"][data-wall="glassay"] .bg::after { display: none; }
:root[data-skin="solid"][data-wall="glassay"] .bg { background: #eceef5; }
:root[data-skin="solid"] :is(.glass, .glass-strong, .topbar, .tabbar, .sidebar-inner, .post.glass, .sheet, .menu, .toast) { -webkit-backdrop-filter: none; backdrop-filter: none; }
:root[data-skin="solid"] :is(.glass, .glass-strong) { background-image: none; border-color: rgba(15,23,42,.08); }
:root[data-skin="solid"] .topbar, :root[data-skin="solid"] .tabbar { background: rgba(255,255,255,.97); }
:root[data-skin="solid"] .sheet, :root[data-skin="solid"] .menu, :root[data-skin="solid"] .app-panel, :root[data-skin="solid"] .drawer { background: #fff; }

/* Theme toggle icons for the new themes */
.theme-toggle .ti-oled, .theme-toggle .ti-solid { display: none; }
:root[data-theme-pref="oled"] .theme-toggle .ti-oled, :root[data-theme-pref="solid"] .theme-toggle .ti-solid { display: grid; }
.drawer-theme { flex-wrap: wrap; gap: 8px; }
.drawer-theme .seg label { padding: 7px 9px; }

/* Settings: theme cards, accents, wallpapers, text colors */
.set-sub { margin: 18px 0 10px; font-size: .92rem; font-weight: 800; }
.set-sub:first-of-type { margin-top: 4px; }
.theme-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.theme-card { position: relative; display: grid; gap: 2px; padding: 8px 8px 10px; border-radius: 18px; border: 1px solid var(--glass-border); background: var(--glass); cursor: pointer; transition: transform .2s var(--ease), box-shadow .2s; }
.theme-card input { position: absolute; opacity: 0; }
.theme-card:has(input:checked) { box-shadow: 0 0 0 2px var(--accent); }
.theme-card:active { transform: scale(.97); }
.theme-card strong { font-size: .85rem; margin-top: 6px; }
.theme-card small { font-size: .72rem; color: var(--muted); line-height: 1.3; }
.tc-preview { height: 62px; border-radius: 12px; display: grid; grid-template-columns: 1fr; gap: 5px; padding: 8px; overflow: hidden; }
.tc-preview i { display: block; border-radius: 6px; height: 10px; }
.tc-preview i:nth-child(2) { width: 70%; } .tc-preview i:nth-child(3) { width: 45%; }
.tc-light .tc-preview { background: linear-gradient(135deg, #c4b5fd, #a5f3fc 60%, #fbcfe8); } .tc-light .tc-preview i { background: rgba(255,255,255,.75); }
.tc-dark .tc-preview { background: linear-gradient(135deg, #2e1065, #0e7490 60%, #831843); } .tc-dark .tc-preview i { background: rgba(255,255,255,.18); }
.tc-oled .tc-preview { background: #000; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); } .tc-oled .tc-preview i { background: #1a1a20; }
.tc-solid .tc-preview { background: #eceef5; box-shadow: inset 0 0 0 1px rgba(15,23,42,.1); } .tc-solid .tc-preview i { background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.tc-system .tc-preview { background: linear-gradient(90deg, #eef0fb 50%, #0b0b16 50%); } .tc-system .tc-preview i { background: linear-gradient(90deg, #fff 50%, #2a2a40 50%); }

.accent-swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.acc { position: relative; width: 40px; height: 40px; border-radius: 50%; background: var(--g); cursor: pointer; box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 4px 12px -6px rgba(0,0,0,.5); transition: transform .2s var(--ease); }
.acc input { position: absolute; opacity: 0; }
.acc:has(input:checked) { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--text); transform: scale(1.06); }
.acc:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 4px; }

.wall-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px; margin-bottom: 10px; }
.wall-opt { position: relative; display: grid; gap: 4px; justify-items: center; cursor: pointer; }
.wall-opt input[type=radio] { position: absolute; opacity: 0; }
.wall-thumb { width: 100%; aspect-ratio: 3 / 4; border-radius: 14px; display: grid; place-items: center; background-size: cover; background-position: center; box-shadow: inset 0 0 0 1px rgba(255,255,255,.25), 0 6px 16px -10px rgba(0,0,0,.6); transition: transform .2s var(--ease); }
.wall-opt small { font-size: .72rem; font-weight: 650; color: var(--text-soft); text-align: center; }
.wall-opt:has(input:checked) .wall-thumb { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); }
.wall-opt:active .wall-thumb { transform: scale(.95); }
.wt-glassay { background: radial-gradient(60% 50% at 25% 25%, #8b5cf6, transparent), radial-gradient(60% 50% at 80% 40%, #06b6d4, transparent), radial-gradient(60% 50% at 40% 90%, #ec4899, transparent), #12122a; }
.wt-plain { background: var(--bg); }
.wall-upload .wall-thumb { border: 2px dashed color-mix(in srgb, var(--muted) 60%, transparent); box-shadow: none; color: var(--accent); }
.wall-upload .wall-thumb .icon { width: 26px; height: 26px; }
.wall-opt.is-busy .wall-thumb { animation: ap-shimmer 1s linear infinite; background: linear-gradient(90deg, var(--glass), var(--glass-hover), var(--glass)); background-size: 200% 100%; }

.text-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.txt { position: relative; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; cursor: pointer; background: var(--glass-strong); border: 1px solid var(--glass-border); }
.txt input { position: absolute; opacity: 0; }
.txt span { font-weight: 800; font-size: 1.05rem; color: var(--c, var(--text)); }
.txt-auto span { font-size: .72rem; }
.txt:has(input:checked) { box-shadow: 0 0 0 2px var(--accent); }
.txt.is-unreadable { opacity: .45; }
.txt.is-unreadable::after { content: ""; position: absolute; left: 8px; right: 8px; top: 50%; height: 2px; background: var(--muted); transform: rotate(-35deg); border-radius: 2px; }
.text-note { margin: 8px 0 0; }
:root:root[data-skin="solid"][data-wall][data-theme] { --glass: #ffffff; --glass-strong: #ffffff; --glass-hover: #f3f4f8; }

/* Replies: tap the bubble — the full composer opens above the keyboard */
.reply-launch { display: flex; align-items: center; gap: 8px; }
.reply-field {
  flex: 1; min-width: 0; text-align: left; padding: 10px 16px; border-radius: 999px; cursor: text;
  border: 1px solid var(--input-border); background: var(--input); color: var(--muted); font-weight: 500; font-size: .95rem;
}
.reply-launch .icon-btn { width: 38px; height: 38px; }
.reply-gif .ps-gif { font-size: .62rem; }
.post-sheet.is-reply :is([data-ps-toggle="bg"], [data-ps-glint], [data-ps-panel="bg"]) { display: none !important; }
.comment-bubble .post-media { margin: 8px 0 2px; border-radius: 14px; }
.comment-bubble .post-media.media-1 .pm-item img { max-height: 320px; }
.comment-actions { margin: 4px 0 0 -8px; }
.comment-actions .action { padding: 4px 8px; font-size: .78rem; }
.comment-actions .react-face { width: 16px; height: 16px; }
.comment-actions .react-face .icon { width: 15px; height: 15px; }
.comment-actions .react-emoji { font-size: .95rem; }
.comment-actions .react-label { display: none; }
.comment-actions .react-sum { padding: 2px 8px 2px 4px; font-size: .78rem; }
.comment-actions .rs-e { width: 19px; height: 19px; font-size: .68rem; }
.comment-bubble { min-width: 0; }
.migrate-alert { position: relative; z-index: 50; margin: calc(70px + env(safe-area-inset-top)) 12px -60px; text-transform: none; }

/* ---------- 2.2: the dock as real liquid glass ---------- */
@media (max-width: 820px), (max-height: 500px) and (pointer: coarse) {
  .tabbar {
    border: 1px solid rgba(255,255,255,.32);
    background:
      linear-gradient(180deg, rgba(255,255,255,.22) 0%, rgba(255,255,255,.06) 42%, rgba(255,255,255,.02) 100%),
      var(--glass-strong);
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.65),
      inset 0 -1px 0 rgba(255,255,255,.12),
      inset 0 0 18px rgba(255,255,255,.06),
      0 20px 44px -14px rgba(0,0,0,.5),
      0 2px 8px -2px rgba(0,0,0,.18);
    -webkit-backdrop-filter: blur(26px) saturate(230%) brightness(1.08);
    backdrop-filter: blur(26px) saturate(230%) brightness(1.08);
    isolation: isolate;
  }
  .tabbar::before {
    content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1;
    background:
      radial-gradient(120% 140% at 50% -40%, rgba(255,255,255,.35), transparent 55%),
      linear-gradient(100deg, transparent 18%, rgba(255,255,255,.14) 32%, transparent 46%);
  }
  :root[data-theme="dark"] .tabbar { border-color: rgba(255,255,255,.16); box-shadow: inset 0 1px 0 rgba(255,255,255,.28), inset 0 -1px 0 rgba(255,255,255,.05), 0 22px 48px -14px rgba(0,0,0,.75); }
  :root[data-theme="dark"] .tabbar::before { opacity: .45; }
  .tabbar .nav-link { transition: color .2s, background-color .25s, transform .15s var(--ease); }
  .tabbar .nav-link:active { transform: scale(.92); }
}
:root[data-skin="solid"] .tabbar::before, :root[data-skin="oled"] .tabbar::before { display: none; }
html { background-color: var(--bg); }

/* ==========================================================================
   2.2 — Huddles, Top 8, promises
   ========================================================================== */
.avatar-xs { width: 22px; height: 22px; font-size: .62rem; }
.huddle-dot { display: inline-block; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255,255,255,.3); }
.btn-link { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 650; cursor: pointer; }

/* Huddles list */
.huddles-head { display: flex; align-items: center; justify-content: space-between; }
.huddles-intro { display: flex; gap: 14px; align-items: flex-start; padding: 16px; margin-bottom: 14px; }
.huddles-intro p { margin: 4px 0 0; }
.hi-icon { width: 44px; height: 44px; flex: none; border-radius: 15px; display: grid; place-items: center; color: #fff; background: var(--grad); box-shadow: inset 0 1px 0 rgba(255,255,255,.45); }
.huddle-list { display: grid; gap: 10px; }
.huddle-card { position: relative; display: flex; align-items: center; gap: 14px; padding: 12px; color: var(--text); text-decoration: none !important; transition: transform .2s var(--ease); }
.huddle-card:active { transform: scale(.98); }
.hc-wall { width: 58px; height: 58px; flex: none; border-radius: 18px; background-size: cover !important; box-shadow: inset 0 0 0 1px rgba(255,255,255,.25), 0 6px 14px -8px rgba(0,0,0,.5); }
.hc-body { flex: 1; min-width: 0; display: grid; gap: 3px; }
.hc-body strong { font-size: 1.02rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hc-meta { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .82rem; }
.hc-faces { display: inline-flex; }
.hc-faces .avatar { margin-left: -6px; box-shadow: 0 0 0 2px var(--bg); }
.hc-faces .avatar:first-child { margin-left: 0; }
.hc-plan { display: flex; align-items: center; gap: 5px; font-size: .78rem; color: var(--accent); font-weight: 650; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.hc-plan .icon { width: 13px; height: 13px; flex: none; }
.home-huddles .huddle-card { padding: 8px; background: transparent; box-shadow: none; border: 0; -webkit-backdrop-filter: none; backdrop-filter: none; }
.home-huddles .hc-wall { width: 42px; height: 42px; border-radius: 13px; }
.home-huddles .hc-body strong { font-size: .92rem; }
.huddle-new { justify-items: stretch; text-align: left; }
.huddle-new label { display: grid; gap: 6px; font-weight: 650; font-size: .88rem; }

/* Huddle page */
.huddle-page { display: grid; gap: 14px; }
.hud-hero { position: relative; overflow: hidden; padding: 14px 18px 18px; display: grid; gap: 8px; }
.hud-wall { position: absolute; inset: 0 0 auto 0; height: 92px; background-size: cover !important; opacity: .95; -webkit-mask: linear-gradient(#000 40%, transparent); mask: linear-gradient(#000 40%, transparent); }
.hud-top { position: relative; display: flex; align-items: center; gap: 8px; }
.hud-top .icon-btn { background: rgba(0,0,0,.28); color: #fff; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.hud-private { margin-right: auto; display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 99px; background: rgba(0,0,0,.3); color: #fff; font-size: .74rem; font-weight: 700; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.hud-private .icon { width: 13px; height: 13px; }
.hud-hero h1 { position: relative; margin: 28px 0 0; font-size: 1.7rem; font-weight: 850; line-height: 1.15; }
.hud-about { margin: 0; color: var(--text-soft); }
.hud-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 4px; }
.hud-faces { display: inline-flex; align-items: center; gap: 0; border: 0; background: none; padding: 0; color: var(--muted); font-weight: 650; font-size: .85rem; cursor: pointer; }
.hud-faces .avatar { margin-left: -8px; box-shadow: 0 0 0 2px var(--bg); }
.hud-faces .avatar:first-child { margin-left: 0; }
.hud-faces span { margin-left: 10px; }
.hud-tabs { display: flex; width: 100%; padding: 4px; gap: 2px; border-radius: 999px; }
.hud-tabs .tab { flex: 1; border: 0; background: transparent; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 6px; font-size: .86rem; }
.hud-tabs .tab small { opacity: .7; }
.hud-tabs .tab[aria-selected="true"] { color: #fff; background: var(--grad); box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 6px 16px -8px rgba(124,58,237,.9); }
.hud-tabs .dot-badge { min-width: 18px; height: 18px; font-size: .66rem; }
.hud-pane { display: grid; gap: 14px; }
.hud-pane[hidden] { display: none; }
.hud-glints { display: flex; align-items: center; gap: 14px; padding: 12px 14px; }
.hud-glint-ring { width: 64px; height: 64px; flex: none; }
.hud-glint-ring .avatar-glint { width: 56px; height: 56px; background-size: cover !important; }
.hud-glints-text { flex: 1; min-width: 0; display: grid; gap: 2px; }

/* Group chat */
.hud-chat { display: flex; flex-direction: column; height: calc(100dvh - 300px); min-height: 380px; overflow: hidden; padding: 0; }
.hud-msgs { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 16px 14px; display: flex; flex-direction: column; gap: 4px; }
.hmsg { max-width: 80%; }
.hmsg.is-grouped { margin-top: -2px; }
.hmsg-who { display: inline-flex; align-items: center; gap: 6px; font-size: .74rem; font-weight: 700; color: var(--muted); margin: 6px 0 3px 4px; }
.hmsg-system { align-self: center; margin: 8px 0; padding: 4px 12px; border-radius: 99px; background: var(--glass); border: 1px solid var(--glass-border); font-size: .76rem; color: var(--muted); font-weight: 650; text-align: center; }
.hud-compose { flex: none; }
@media (max-width: 820px), (max-height: 500px) and (pointer: coarse) {
  body.hud-in-chat .tabbar { display: none; }
  body.hud-in-chat .shell { padding-bottom: 12px; }
  .hud-chat { height: calc(100dvh - 300px - env(safe-area-inset-top)); }
}

/* Plans */
.plan-new { padding: 0; overflow: hidden; }
.plan-new summary { list-style: none; cursor: pointer; padding: 14px 16px; font-weight: 750; display: flex; align-items: center; gap: 8px; color: var(--accent); }
.plan-new summary::-webkit-details-marker { display: none; }
.plan-new .form { padding: 0 16px 16px; }
.plan-list { display: grid; gap: 10px; }
.plan { display: flex; align-items: center; gap: 14px; padding: 12px 14px; }
.plan-date time { width: 54px; height: 58px; display: grid; place-content: center; text-align: center; border-radius: 16px; color: #fff; background: var(--grad); line-height: 1.05; box-shadow: inset 0 1px 0 rgba(255,255,255,.45); }
.plan-date b { font-size: 1.35rem; font-weight: 850; }
.plan-date span { font-size: .72rem; font-weight: 750; text-transform: lowercase; }
.plan-main { flex: 1; min-width: 0; display: grid; gap: 3px; }
.plan-main strong { font-size: 1rem; }
.plan-going { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--muted); }
.plan-faces { display: inline-flex; }
.plan-faces .avatar { margin-left: -6px; box-shadow: 0 0 0 2px var(--bg); }
.plan-faces .avatar:first-child { margin-left: 0; }
.plan-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.plan-actions .is-in { color: var(--accent); }
@media (max-width: 480px) { .plan { flex-wrap: wrap; } .plan-actions { flex-direction: row; width: 100%; justify-content: flex-end; } }

/* People + invite */
.invite-card { padding: 16px; display: grid; gap: 8px; }
.invite-card strong { display: flex; align-items: center; gap: 8px; }
.invite-row { display: flex; gap: 8px; }
.invite-row input { flex: 1; min-width: 0; font-size: .82rem !important; }
.hud-member { position: relative; display: flex; align-items: center; }
.hud-member .user-row { flex: 1; min-width: 0; }
.hud-settings { justify-items: stretch; text-align: left; max-height: 88dvh; overflow-y: auto; }
.hud-settings label { display: grid; gap: 6px; font-weight: 650; font-size: .88rem; }
.hud-walls { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); }

/* Invite landing */
.join-card { position: relative; overflow: hidden; display: grid; justify-items: center; gap: 10px; text-align: center; padding: 120px 24px 28px; max-width: 520px; margin: 0 auto; }
.join-wall { position: absolute; inset: 0 0 auto 0; height: 110px; background-size: cover !important; -webkit-mask: linear-gradient(#000 50%, transparent); mask: linear-gradient(#000 50%, transparent); }
.join-kicker { margin: 0; font-size: .8rem; font-weight: 750; color: var(--accent); letter-spacing: .02em; }
.join-card h1 { margin: 0; font-size: 1.8rem; font-weight: 850; }
.join-faces { display: flex; }
.join-faces .avatar { margin-left: -8px; box-shadow: 0 0 0 3px var(--bg); }
.join-faces .avatar:first-child { margin-left: 0; }

/* Top 8 */
.top8-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 6px; }
.top8-friend { position: relative; display: grid; justify-items: center; gap: 4px; color: var(--text); font-size: .78rem; font-weight: 700; text-decoration: none !important; }
.top8-friend .avatar { transition: transform .2s var(--ease); }
.top8-friend:hover .avatar { transform: scale(1.06) rotate(-2deg); }
.top8-rank { position: absolute; top: -4px; left: 50%; margin-left: -30px; z-index: 1; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: .66rem; font-weight: 850; color: #fff; background: var(--grad); box-shadow: 0 0 0 2px var(--bg); }
.top8-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top8-empty { width: 100%; display: flex; align-items: center; gap: 10px; padding: 14px; border-radius: 16px; border: 2px dashed color-mix(in srgb, var(--muted) 50%, transparent); background: transparent; color: var(--text-soft); text-align: left; cursor: pointer; font-weight: 600; }
.top8-empty .icon { flex: none; color: var(--accent); }
.top8-sheet { justify-items: stretch; text-align: left; max-height: 90dvh; overflow-y: auto; }
.top8-slots { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 6px; }
.top8-slot { position: relative; display: grid; justify-items: center; gap: 4px; min-height: 78px; font-size: .74rem; font-weight: 700; cursor: pointer; }
.top8-slot .avatar { width: 52px; height: 52px; }
.top8-slot .top8-rank { margin-left: -28px; }
.top8-plus { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; border: 2px dashed color-mix(in srgb, var(--muted) 55%, transparent); color: var(--muted); font-size: 1.3rem; }
.top8-search { margin-top: 4px; }
.top8-people { display: grid; gap: 2px; max-height: 38dvh; overflow-y: auto; }
.top8-person { display: flex; align-items: center; gap: 10px; padding: 8px; border: 0; border-radius: 14px; background: transparent; color: var(--text); text-align: left; cursor: pointer; }
.top8-person span { display: grid; }
.top8-person.is-picked { background: var(--grad-soft); box-shadow: inset 0 0 0 1px var(--accent); }

/* "No algorithm, no ads" — said plainly on the way in */
.promise-chips { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.promise-chips li { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: .8rem; font-weight: 650; background: var(--glass); border: 1px solid var(--glass-border); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.promise-chips .icon { width: 15px; height: 15px; color: var(--accent); }

/* ==========================================================================
   2.3 — glass dialogs, search, zoomable photos, swipe to delete, chat depth,
   chat themes and tools, live audio rooms, compact feed switch
   ========================================================================== */

/* Layers: the composer and chat-theme sheet open on top of the in-app panels */
.ps-backdrop, [data-ct-sheet] { z-index: 120; }

/* Glass dialog (replaces the browser's confirm box) */
.gd-backdrop {
  position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; padding: 20px;
  background: rgba(5,5,15,0); transition: background-color .2s;
}
.gd-backdrop.open { background: rgba(5,5,15,.42); }
.gd {
  width: min(340px, 100%); padding: 22px 20px 16px; border-radius: 26px; text-align: center;
  border: 1px solid var(--glass-border);
  box-shadow: inset 0 1px 0 var(--edge-hi, rgba(255,255,255,.4)), 0 30px 70px -20px rgba(0,0,0,.55);
  -webkit-backdrop-filter: blur(30px) saturate(200%); backdrop-filter: blur(30px) saturate(200%);
  opacity: 0; transform: scale(.94); transition: opacity .2s, transform .26s var(--ease);
}
.gd-backdrop.open .gd { opacity: 1; transform: none; }
.gd-title { margin: 0 0 6px; font-size: 1.08rem; font-weight: 800; line-height: 1.3; }
.gd-text { margin: 0 0 16px; font-size: .9rem; line-height: 1.45; }
.gd-title:last-child { margin-bottom: 14px; }
.gd-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gd-actions.is-stack { grid-template-columns: 1fr; }
.gd-actions .btn { justify-content: center; min-height: 44px; }
.gd-actions .btn-danger { background: var(--danger); color: #fff; border-color: transparent; box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 8px 18px -10px var(--danger); }

/* Search: opens over the page, ready to type */
.search-ov { position: fixed; inset: 0; z-index: 92; background: rgba(5,5,15,0); transition: background-color .22s; }
.search-ov.open { background: rgba(5,5,15,.38); }
.search-ov-panel {
  position: absolute; left: 10px; right: 10px; top: calc(env(safe-area-inset-top) + 8px);
  max-width: 620px; margin: 0 auto; border-radius: 26px; padding: 8px; border: 1px solid var(--glass-border);
  box-shadow: inset 0 1px 0 var(--edge-hi, rgba(255,255,255,.4)), 0 24px 60px -20px rgba(0,0,0,.55);
  -webkit-backdrop-filter: blur(32px) saturate(210%); backdrop-filter: blur(32px) saturate(210%);
  opacity: 0; transform: translateY(-10px) scale(.98); transition: opacity .2s, transform .26s var(--ease);
  max-height: calc(100dvh - 120px); display: flex; flex-direction: column;
}
.search-ov.open .search-ov-panel { opacity: 1; transform: none; }
.search-ov-form { display: flex; align-items: center; gap: 8px; padding: 4px 4px 4px 14px; }
.search-ov-form > .icon { color: var(--muted); flex: none; }
.search-ov-form input { flex: 1; min-width: 0; border: 0 !important; background: transparent !important; box-shadow: none !important; padding: 10px 4px !important; font-size: 1rem; }
.search-ov-form input::-webkit-search-cancel-button { display: none; }
.search-ov-results { overflow-y: auto; overscroll-behavior: contain; display: grid; gap: 2px; padding: 4px; }
.search-ov-results:empty { display: none; }
.so-row { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 16px; color: var(--text); }
.so-row:hover, .so-row:focus-visible, .so-row.is-active { background: var(--glass-hover); text-decoration: none; }
.so-row > span:last-child { display: grid; min-width: 0; }
.so-row strong { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.so-ic { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--grad-soft); color: var(--accent); flex: none; }
.so-label { font-size: .72rem; font-weight: 750; letter-spacing: .04em; color: var(--muted); padding: 8px 10px 2px; }

/* Photos: pinch, double-tap or scroll-wheel to zoom, drag to look around — no scroll bars */
.lightbox { z-index: 250; padding: 0; display: block; overflow: hidden; cursor: default; touch-action: none; overscroll-behavior: contain; }
.lb-stage { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; touch-action: none; }
.lb-stage img {
  max-width: 100vw; max-height: 100vh; max-height: 100dvh; border-radius: 0; box-shadow: none; animation: zoom-in .25s var(--ease);
  transform-origin: 0 0; will-change: transform; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; cursor: zoom-in;
}
.lightbox.is-zoomed .lb-stage img { cursor: grab; }
.lightbox.is-dragging .lb-stage img { cursor: grabbing; }
.lbx-bar {
  position: absolute; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  display: flex; align-items: center; gap: 6px; padding: 5px; border-radius: 999px; color: #fff;
  background: rgba(20,20,34,.55) !important; border: 1px solid rgba(255,255,255,.16);
}
.lbx-bar .icon-btn { color: #fff; }
.lb-hint { font-size: .78rem; font-weight: 650; opacity: .8; padding: 0 6px; white-space: nowrap; }
.lightbox.is-zoomed .lb-hint { display: none; }
.lightbox-close { display: none; }

/* Swipe left to delete (notifications and messages) */
.notif-wrap { position: relative; border-radius: var(--radius, 22px); }
.notif-wrap > .notif { position: relative; z-index: 1; touch-action: pan-y; will-change: transform; }
.notif-wrap.is-swiping > .notif { transition: none; }
.notif-wrap:not(.is-swiping) > .notif { transition: transform .28s var(--ease); }
.notif-del, .msg-del {
  position: absolute; top: 50%; right: 6px; width: 46px; height: 46px; margin-top: -23px; border-radius: 50%;
  display: grid; place-items: center; border: 0; color: #fff; cursor: pointer;
  background: linear-gradient(180deg, #fb7185, #e11d48); box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 8px 18px -8px rgba(225,29,72,.9);
  opacity: 0; transform: scale(.4); transition: opacity .2s, transform .25s var(--ease);
  pointer-events: none;
}
.notif-wrap.is-open .notif-del, .msg.is-open .msg-del { opacity: 1; transform: none; pointer-events: auto; }
.notif-wrap.is-removing, .msg.is-removing { animation: swipe-out .3s ease-in forwards; }
@keyframes swipe-out { to { opacity: 0; transform: translateX(-40%); max-height: 0; margin: 0; } }
.notif-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ap-clear { margin-left: auto; padding: 6px 12px; font-size: .8rem; }
.ap-head h2 + .ap-clear + .icon-btn { margin-left: 0; }

/* Messages: deeper glass bubbles */
.msg { position: relative; }
.msg-row { display: flex; flex-direction: column; align-items: inherit; max-width: 100%; touch-action: pan-y; will-change: transform; }
.msg:not(.is-swiping) .msg-row, .msg:not(.is-swiping) .hmsg-who { transition: transform .28s var(--ease); }
.msg-bubble { position: relative; isolation: isolate; }
.msg-in .msg-bubble {
  background:
    linear-gradient(180deg, rgba(255,255,255,.2), rgba(255,255,255,.03) 60%),
    linear-gradient(var(--bubble-in-tint, transparent), var(--bubble-in-tint, transparent)),
    var(--glass-strong);
  border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(18px) saturate(190%); backdrop-filter: blur(18px) saturate(190%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.42), inset 0 -1px 0 rgba(0,0,0,.06), 0 10px 24px -14px rgba(0,0,0,.55);
}
:root[data-theme="dark"] .msg-in .msg-bubble { box-shadow: inset 0 1px 0 rgba(255,255,255,.16), inset 0 -1px 0 rgba(0,0,0,.25), 0 12px 26px -14px rgba(0,0,0,.8); }
.msg-out .msg-bubble {
  background: linear-gradient(180deg, rgba(255,255,255,.3), rgba(255,255,255,0) 52%), var(--bubble-out, var(--grad));
  border: 1px solid rgba(255,255,255,.22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55), inset 0 -2px 6px rgba(0,0,0,.12), 0 10px 22px -12px color-mix(in srgb, var(--accent) 80%, transparent);
  text-shadow: 0 1px 1px rgba(0,0,0,.12);
}
.msg-bubble::after { /* soft specular glint on the top edge */
  content: ""; position: absolute; left: 12%; right: 12%; top: 1px; height: 40%; border-radius: inherit; z-index: -1;
  background: linear-gradient(180deg, rgba(255,255,255,.22), transparent); pointer-events: none; opacity: .7;
}
.msg-bubble.media-only { padding: 4px; }
.msg-bubble.has-media:not(.media-only) { padding: 4px 4px 9px; }
.msg-bubble.has-media .msg-text { padding: 6px 10px 0; }
.msg-media { display: grid; gap: 3px; border-radius: 14px; overflow: hidden; width: min(260px, 62vw); }
.msg-media.mm-2, .msg-media.mm-4 { grid-template-columns: 1fr 1fr; }
.msg-media.mm-3 { grid-template-columns: 1fr 1fr; }
.msg-media.mm-3 > :first-child { grid-column: span 2; }
.mm-item { position: relative; padding: 0; border: 0; background: rgba(0,0,0,.2); display: block; cursor: zoom-in; }
.mm-item img, .mm-item video { display: block; width: 100%; max-height: 320px; object-fit: cover; }
.msg-media:not(.mm-1) .mm-item img, .msg-media:not(.mm-1) .mm-item video { aspect-ratio: 1; height: 100%; }
.mm-item .gif-badge { position: absolute; left: 6px; bottom: 6px; }
/* Desktop: a small delete button appears beside a message on hover */
@media (hover: hover) and (pointer: fine) {
  .msg:not(.is-open):not(.is-swiping) .msg-del { width: 32px; height: 32px; margin-top: -16px; }
  .msg-out:not(.is-open):not(.is-swiping) .msg-del { right: auto; left: -40px; }
  .msg-in:not(.is-open):not(.is-swiping) .msg-del { right: -40px; }
  .msg:not(.is-swiping):hover .msg-del { opacity: .9; transform: none; pointer-events: auto; }
}

/* Chat themes */
.chat-themed { --bubble-out: var(--grad); }
.chat-themed .dm-messages, .chat-themed .hud-msgs, .ap-msgs.chat-themed { background-image: var(--chat-wash, none); background-attachment: local; }
.ap-thread.chat-themed .ap-msgs { background-image: var(--chat-wash, none); }
.chat-themes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 12px 0 14px; }
.ct-opt { display: grid; justify-items: center; gap: 4px; cursor: pointer; font-size: .74rem; font-weight: 650; color: var(--muted); }
.ct-opt input { position: absolute; opacity: 0; pointer-events: none; }
.ct-swatch {
  width: 54px; height: 54px; border-radius: 18px; display: grid; align-content: center; gap: 4px; padding: 8px;
  background: var(--glass); border: 1px solid var(--glass-border); box-shadow: inset 0 1px 0 rgba(255,255,255,.3);
  transition: transform .2s var(--ease), box-shadow .2s;
}
.ct-swatch i { display: block; height: 10px; border-radius: 6px; background: var(--sw); }
.ct-swatch i:first-child { width: 70%; justify-self: end; }
.ct-swatch i:last-child { width: 55%; background: var(--glass-strong); border: 1px solid var(--glass-border); }
.ct-opt input:checked + .ct-swatch { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); transform: scale(1.06); }
.ct-opt input:checked ~ small { color: var(--text); }
.ct-opt input:focus-visible + .ct-swatch { outline: 2px solid var(--accent); outline-offset: 3px; }
.ct-preview { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 20px; margin-bottom: 14px; border: 1px solid var(--glass-border); background-color: var(--glass); background-image: var(--chat-wash, none); }
.ct-preview .msg { animation: none; }
.ct-sheet h2 { display: flex; align-items: center; gap: 8px; }

/* Chat tools: + opens photo / gif / meme */
.dm-compose { position: relative; align-items: flex-end; }
.chat-plus { flex: none; width: 42px; height: 42px; border-radius: 50%; background: var(--glass-strong); border: 1px solid var(--glass-border); transition: transform .25s var(--ease), background-color .2s; }
.chat-plus[aria-expanded="true"] { transform: rotate(45deg); background: var(--grad-soft); color: var(--accent); }
.chat-tray {
  position: absolute; left: 10px; bottom: calc(100% + 6px); z-index: 5; display: flex; gap: 6px; padding: 6px; border-radius: 22px;
  background: var(--glass-strong); border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(24px) saturate(200%); backdrop-filter: blur(24px) saturate(200%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 16px 34px -16px rgba(0,0,0,.55);
  transform-origin: 20px 100%; animation: tray-in .26s var(--ease);
}
@keyframes tray-in { from { opacity: 0; transform: translateY(8px) scale(.9); } }
.chat-tool { display: grid; justify-items: center; gap: 3px; padding: 6px 8px; border: 0; background: transparent; border-radius: 16px; color: var(--text); font: inherit; font-size: .7rem; font-weight: 650; cursor: pointer; min-width: 62px; }
.chat-tool:hover { background: var(--glass-hover); }
.chat-tool .co-ic { width: 38px; height: 38px; border-radius: 13px; display: grid; place-items: center; }
.post-sheet.is-chat .char-count { display: none; }

/* Huddle chat bar: live audio + theme */
.hud-chat-bar { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.hud-voice-btn { margin-left: auto; }
.hud-voice-btn .icon { color: #f43f5e; }
.hud-live { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: .8rem; font-weight: 700; }
.hud-live .live-dot { width: 8px; height: 8px; border-radius: 50%; background: #f43f5e; box-shadow: 0 0 0 0 rgba(244,63,94,.6); animation: live-pulse 1.6s infinite; flex: none; }
@keyframes live-pulse { 70% { box-shadow: 0 0 0 8px rgba(244,63,94,0); } 100% { box-shadow: 0 0 0 0 rgba(244,63,94,0); } }
.hud-live .avatar { margin-left: -6px; box-shadow: 0 0 0 2px var(--bg); }
.hud-live .avatar:first-of-type { margin-left: 0; }
.live-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 99px; font-size: .72rem; font-weight: 800; color: #fff; background: linear-gradient(135deg, #f43f5e, #ec4899); box-shadow: 0 6px 14px -8px #f43f5e; }

/* Live audio room: a glass bar that floats above the dock */
.voice-dock {
  position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 70; transform: translateX(-50%);
  width: min(560px, calc(100% - 24px)); padding: 10px 10px 10px 14px; border-radius: 26px;
  display: flex; align-items: center; gap: 10px;
  background: color-mix(in srgb, var(--glass-strong) 92%, transparent); border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(30px) saturate(210%); backdrop-filter: blur(30px) saturate(210%);
  box-shadow: inset 0 1px 0 var(--edge-hi, rgba(255,255,255,.4)), 0 22px 50px -20px rgba(0,0,0,.6);
  animation: vd-in .35s var(--ease);
}
@media (min-width: 821px) and (pointer: fine), (min-width: 821px) and (min-height: 501px) { .voice-dock { bottom: 22px; } }
@keyframes vd-in { from { opacity: 0; transform: translate(-50%, 20px) scale(.96); } }
.vd-label { display: grid; line-height: 1.2; min-width: 0; }
.vd-label strong { font-size: .86rem; display: flex; align-items: center; gap: 6px; }
.vd-label small { color: var(--muted); font-size: .72rem; }
.vd-people { display: flex; gap: 6px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; padding: 4px 2px; }
.vd-people::-webkit-scrollbar { display: none; }
.vd-person { position: relative; flex: none; border-radius: 50%; transition: box-shadow .12s; }
.vd-person .avatar { width: 38px; height: 38px; }
.vd-person.is-speaking { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px #22c55e, 0 0 16px 2px rgba(34,197,94,.55); }
.vd-person.is-muted::after { content: ""; position: absolute; right: -2px; bottom: -2px; width: 16px; height: 16px; border-radius: 50%; background: #f43f5e url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M4 4l16 16'/%3E%3C/svg%3E") center / 10px no-repeat; box-shadow: 0 0 0 2px var(--bg); }
.vd-person.is-connecting { opacity: .55; }
.vd-btn { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--glass-border); background: var(--glass); color: var(--text); cursor: pointer; }
.vd-btn.is-muted { background: color-mix(in srgb, #f43f5e 18%, var(--glass)); color: #f43f5e; }
.vd-leave { background: linear-gradient(180deg, #fb7185, #e11d48); color: #fff; border-color: transparent; box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 8px 18px -8px rgba(225,29,72,.9); }
body.in-voice .toasts { bottom: 170px; }

/* Following / everyone: one slim glass switch with a sliding pill, sitting in a tidy feed header */
.feed-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 2px; }
.feed-seg {
  position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 3px; border-radius: 999px;
  width: 232px; max-width: 64%;
}
.feed-seg .fs-ind {
  position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px); border-radius: 999px;
  background: var(--grad); box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 6px 14px -8px rgba(124,58,237,.9);
  transition: transform .32s var(--ease);
}
.feed-seg[data-feed="all"] .fs-ind { transform: translateX(100%); }
.feed-seg .tab {
  position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  padding: 6px 8px; font-size: .8rem; font-weight: 700; border-radius: 999px; background: transparent !important; box-shadow: none !important;
}
.feed-seg .tab .icon { width: 15px; height: 15px; }
.feed-seg .tab[aria-selected="true"] { color: #fff; }
.feed-order { display: inline-flex; align-items: center; gap: 5px; font-size: .74rem; font-weight: 650; color: var(--muted); white-space: nowrap; }
.feed-order .icon { width: 14px; height: 14px; }

/* 2.3 additions: swipe rows, viewer UI, live banner, room bar placement */
.convo-wrap { position: relative; border-radius: 14px; }
.swipe-wrap > .swipe-row { position: relative; z-index: 1; touch-action: pan-y; }
.swipe-wrap.is-swiping > .swipe-row { transition: none !important; }
.swipe-wrap:not(.is-swiping) > .swipe-row { transition: transform .28s var(--ease), background-color .2s; }
.convo-wrap.is-open > .dm-convo, .convo-wrap.is-swiping > .dm-convo { background: var(--glass-strong); }
.convo-wrap.is-open .notif-del, .convo-wrap.is-swiping .notif-del, .notif-wrap.is-swiping .notif-del, .msg.is-swiping .msg-del { opacity: 1; transform: none; pointer-events: auto; }
.swipe-wrap.is-armed .notif-del, .msg.is-armed .msg-del { transform: scale(1.18); box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 0 0 6px rgba(244,63,94,.22), 0 10px 22px -8px rgba(225,29,72,1); }
.msg.is-swiping .msg-row, .msg.is-swiping .hmsg-who { transition: none !important; }
.notif-wrap.is-removing, .convo-wrap.is-removing, .msg.is-removing { overflow: hidden; pointer-events: none; }
@media (hover: hover) and (pointer: fine) {
  .swipe-wrap:not(.is-open):not(.is-swiping) .notif-del { z-index: 2; width: 30px; height: 30px; margin-top: -15px; right: 10px; }
  .swipe-wrap:not(.is-swiping):hover .notif-del { opacity: .92; transform: none; pointer-events: auto; }
  .swipe-wrap .notif-del .icon { width: 15px; height: 15px; }
}
.lightbox.hide-ui .lbx-bar { opacity: 0; pointer-events: none; transform: translate(-50%, 12px); }
.lbx-bar { transition: opacity .2s, transform .25s var(--ease); }
.lightbox:focus { outline: none; }
.home-feed .feed { transition: opacity .22s ease, transform .28s var(--ease); }
.home-feed .feed.is-switching { opacity: 0; transform: translateY(6px); transition-duration: .15s; pointer-events: none; }
.home-feed .feed.is-arriving { opacity: 0; transform: translateY(-6px); transition: none; }

/* "maya + 2 more live now — join" inside the huddle header */
.hud-live-banner {
  display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 14px; padding: 10px 12px 10px 14px; border-radius: 18px;
  border: 1px solid color-mix(in srgb, #f43f5e 40%, transparent); color: var(--text); font: inherit; font-weight: 700; font-size: .88rem; cursor: pointer;
  background: linear-gradient(135deg, color-mix(in srgb, #f43f5e 18%, transparent), color-mix(in srgb, #ec4899 10%, transparent));
}
.hud-live-banner .live-dot, .live-chip .live-dot, .vd-label .live-dot { width: 8px; height: 8px; border-radius: 50%; background: #f43f5e; animation: live-pulse 1.6s infinite; flex: none; display: inline-block; }
.live-chip .live-dot { background: #fff; }
.hud-live-banner .hlb-join { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; border-radius: 99px; color: #fff; background: linear-gradient(135deg, #f43f5e, #ec4899); font-size: .8rem; }
.hud-live-banner .hlb-join .icon { width: 15px; height: 15px; }
.huddle-card .live-chip { vertical-align: 2px; margin-left: 4px; }

/* The room bar sits under the top bar on phones, so it never covers the chat box or the keyboard */
@media (max-width: 820px), (max-height: 500px) and (pointer: coarse) {
  .voice-dock { top: calc(env(safe-area-inset-top) + 68px); bottom: auto; animation-name: vd-in-top; }
  body.in-voice .toasts { bottom: 110px; }
}
@media (min-width: 821px) and (pointer: fine), (min-width: 821px) and (min-height: 501px) { .voice-dock { top: 18px; bottom: auto; animation-name: vd-in-top; } }
@keyframes vd-in-top { from { opacity: 0; transform: translate(-50%, -16px) scale(.96); } }
.voice-dock.out { opacity: 0; transform: translate(-50%, -12px) scale(.96); transition: opacity .2s, transform .25s; }
.vd-audio { display: none; }
body.in-voice .hud-chat { scroll-margin-top: 140px; }
.gd-actions .gd-alt { font-weight: 750; background: var(--glass-strong); }
@media (max-width: 820px), (max-height: 500px) and (pointer: coarse) { body.in-voice .main { padding-top: 70px; } }

/* ---------- 2.3.1: text size (everything is sized in rem, so the whole app scales together) ---------- */
html[data-text-size="xs"]  { font-size: 87.5%; }
html[data-text-size="sm"]  { font-size: 93.75%; }
html[data-text-size="lg"]  { font-size: 112.5%; }
html[data-text-size="xl"]  { font-size: 125%; }
html[data-text-size="xxl"] { font-size: 137.5%; }
/* iPhone / iPad: follow Dynamic Type (Settings → Display & Brightness → Text Size). Other browsers ignore this
   and keep 100% of their own default size, which already follows the browser's font-size setting. */
html[data-text-size="device"] { font: -apple-system-body; font-family: inherit; }
/* The dock, top bar and menus keep their shape at any text size */
.tabbar .nav-link { font-size: min(.68rem, 12.5px); }
.topbar .brand { font-size: min(1.12rem, 19px); }
html[data-text-size="xl"] .post-actions, html[data-text-size="xxl"] .post-actions { flex-wrap: wrap; row-gap: 4px; }

.text-size { display: grid; gap: 10px; margin-top: 6px; }
.ts-row { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 18px; background: var(--glass); border: 1px solid var(--glass-border); transition: opacity .2s; }
.ts-row.is-off { opacity: .45; }
.ts-a { font-weight: 800; line-height: 1; color: var(--muted); }
.ts-a-sm { font-size: 13px; } .ts-a-lg { font-size: 24px; }
.ts-row input[type=range] { flex: 1; accent-color: var(--accent); height: 28px; }
.ts-label { margin: 0; text-align: center; font-weight: 750; font-size: .9rem; }
.ts-device { display: flex; align-items: center; gap: 14px; justify-content: space-between; }
.ts-device > span { display: grid; gap: 2px; }
.reset-look { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); display: grid; gap: 6px; justify-items: start; }
.reset-look p { margin: 0; }
/* Large text: long one-line labels shrink with "…" instead of pushing the page sideways */
.lblock, .composer-row, .composer-field { min-width: 0; }
.composer-field > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-head { flex-wrap: wrap; row-gap: 6px; }
.feed-seg { width: min(100%, 14.5rem); max-width: none; }

/* 2.3.2: the page color lives on <html>; <body> stays see-through so the wallpaper layer behind it shows.
   (An opaque body painted over the wallpaper ever since <html> got its own background color.)
   Body text is in rem so it follows the text-size setting. */
body { background: transparent; font-size: .9375rem; }
/* Sheets follow the visible screen: with the keyboard up they sit right above it and scroll inside */
.sheet-backdrop:not(.ps-backdrop) { top: var(--vv-top, 0px); bottom: auto; height: var(--vv-h, 100%); transition: height .18s ease-out; }
.sheet-backdrop:not(.ps-backdrop) .sheet { max-height: calc(var(--vv-h, 100dvh) - 16px - env(safe-area-inset-top)); overflow-y: auto; overscroll-behavior: contain; }
/* A bigger, easier ✕ on the alerts and messages panels */
.ap-head [data-ap-close] { width: 44px; height: 44px; margin: -4px -4px -4px 0; flex: none; }
.ap-head [data-ap-close] .icon { width: 22px; height: 22px; }

/* ---------- 2.4: one compact tab style everywhere (feed, profile, huddles, admin) ---------- */
.tabs { padding: 3px; gap: 2px; }
.tabs .tab {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  padding: 6px 10px; font-size: .8rem; font-weight: 700; border: 0; background: transparent;
}
.tabs .tab .icon { width: 15px; height: 15px; flex: none; }
.tabs .tab[aria-selected="true"] {
  color: #fff; background: var(--grad);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 6px 14px -8px color-mix(in srgb, var(--accent) 90%, transparent);
}
.tabs .tab .dot-badge { min-width: 17px; height: 17px; font-size: .64rem; margin-left: 2px; }
.tabs-compact { width: fit-content; max-width: 100%; justify-self: start; }
.tabs-compact .tab { flex: none; padding: 6px 14px; }
.hud-tabs .tab { padding: 6px 6px; font-size: .8rem; }

/* Friend buttons */
.friend-btns { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.friend-btns .btn .icon { width: 15px; height: 15px; }
.friend-btns .fb-friends .icon { color: var(--success, #22c55e); }
.friend-btns .fb-decline { padding-left: 9px; padding-right: 9px; }
.pf-top-actions .friend-btns .btn-ghost { background: rgba(255,255,255,.16); color: #fff; border-color: rgba(255,255,255,.28); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.pf-req-link strong { color: var(--accent); }
.profile-handle .pill .icon { width: 12px; height: 12px; vertical-align: -1px; }

/* A friend request right inside the notification */
.notif-wrap.has-actions > .notif { padding-bottom: 56px; }
.notif-actions { position: absolute; left: 70px; bottom: 12px; z-index: 2; display: flex; gap: 6px; transition: opacity .2s; }
.notif-wrap.is-open .notif-actions, .notif-wrap.is-swiping .notif-actions { opacity: 0; pointer-events: none; }
.notif-done { font-size: .8rem; font-weight: 700; color: var(--muted); padding: 6px 2px; }
.notif-icon.notif-freq, .notif-icon.notif-follow, .notif-icon.notif-friend { color: var(--accent); }
.profile-handle .pill .icon { margin-right: 3px; }

/* Alerts and messages on phones: a strip of the page stays visible on the left — tap it (or any empty
   space in the panel) to close. Chats still use the whole screen. */
@media (max-width: 640px) {
  .app-panel { width: calc(100vw - 44px); border-radius: 26px 0 0 26px; border-left: 1px solid var(--glass-border); }
  body.ap-in-thread .app-panel { width: 100vw; border-radius: 0; border-left: 0; }
}

/* ---------- 2.4.3: glints creator goes full screen on phones, like a native camera ---------- */
.glint-bottom { display: grid; gap: 12px; }
@media (max-width: 820px), (hover: none) and (pointer: coarse) {
  .glint-create-backdrop { padding: 0 !important; align-items: stretch !important; background: #000 !important; -webkit-backdrop-filter: none; backdrop-filter: none; top: 0 !important; height: 100% !important; }
  .glint-create {
    position: fixed; inset: 0; width: 100vw; max-width: none; height: 100dvh; max-height: none;
    margin: 0; padding: 0; border: 0; border-radius: 0; background: #000 !important; display: block; overflow: hidden;
    -webkit-backdrop-filter: none; backdrop-filter: none; animation: gc-in .28s var(--ease);
  }
  @keyframes gc-in { from { opacity: 0; transform: scale(1.03); } }
  .glint-create .sheet-grip { display: none; }
  .glint-create .glint-canvas { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; border-radius: 0; box-shadow: none; }
  /* top: close + type switch float over the picture */
  .glint-create-head { position: absolute; z-index: 6; top: calc(env(safe-area-inset-top) + 10px); left: 12px; right: auto; }
  .glint-create-head h2 { display: none; }
  .glint-create-head .icon-btn, .glint-create .glint-flip { width: 44px; height: 44px; color: #fff; background: rgba(0,0,0,.38); border: 1px solid rgba(255,255,255,.18); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
  .glint-create .glint-mode {
    position: absolute; z-index: 6; top: calc(env(safe-area-inset-top) + 12px); left: 50%; transform: translateX(-50%);
    background: rgba(0,0,0,.38) !important; border: 1px solid rgba(255,255,255,.16); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  }
  .glint-create .glint-mode label { color: rgba(255,255,255,.85); padding: 7px 11px; font-size: .8rem; }
  .glint-create .glint-flip { top: calc(env(safe-area-inset-top) + 10px); right: 12px; }
  .glint-create .glint-rec-time { top: calc(env(safe-area-inset-top) + 66px); }
  .glint-create .glint-clear { top: calc(env(safe-area-inset-top) + 10px); right: 12px; width: 44px; height: 44px; }
  .glint-create .glint-shutter { bottom: calc(env(safe-area-inset-bottom) + 46px); width: 84px; height: 84px; margin-left: -42px; }
  .glint-create .glint-cam-hint { bottom: calc(env(safe-area-inset-bottom) + 16px); }
  .glint-create .glint-text-input { padding-top: 45% !important; font-size: 1.7rem !important; }
  /* bottom: caption + share float over the picture once there's something to share */
  .glint-create .glint-bottom {
    position: absolute; z-index: 6; left: 0; right: 0; bottom: var(--kb, 0px); gap: 10px;
    padding: 40px 14px calc(env(safe-area-inset-bottom) + 14px);
    background: linear-gradient(180deg, transparent, rgba(0,0,0,.55) 40%, rgba(0,0,0,.75));
  }
  .glint-create .glint-caption { background: rgba(255,255,255,.14) !important; border-color: rgba(255,255,255,.2) !important; color: #fff !important; }
  .glint-create .glint-caption::placeholder { color: rgba(255,255,255,.7); }
  .glint-create .glint-note { color: rgba(255,255,255,.65); }
  /* while the camera is live, only the shutter shows at the bottom */
  .glint-create:has(.glint-cam-ui:not([hidden])) .glint-bottom { display: none; }
  .glint-create:has(.glint-pick:not([hidden])) .glint-bottom .btn { opacity: .6; }
}
/* GIPHY credit: still there (their terms ask for it) but tiny and quiet */
.giphy-credit { margin: -2px 4px 0; font-size: .56rem; font-weight: 600; letter-spacing: .02em; line-height: 1.2; color: var(--muted); opacity: .45; text-align: right; }
/* Photo editor: cropping photos in posts, and the cover's phone / computer guides */
.pe-backdrop { z-index: 130; }
.pe-cover .pe-stage { aspect-ratio: 4 / 3; }
.pe-post .pe-stage { width: min(100%, calc(52dvh * var(--ar, 1))); }
.pe-aspects { justify-self: center; }
.pe-guides { display: none; position: absolute; inset: 0; pointer-events: none; }
.pe-cover .pe-guides { display: block; }
.pe-guides span { position: absolute; border: 1.5px dashed rgba(255,255,255,.75); border-radius: 10px; box-shadow: 0 0 0 1px rgba(0,0,0,.25); }
.pe-guides i { position: absolute; left: 6px; top: 4px; font-style: normal; font-size: .62rem; font-weight: 750; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.7); }
/* phones show a tall slice of the middle (about 4:5), computers a wide band (about 5:2) */
.pg-phone { top: 3%; bottom: 3%; left: 50%; width: 57%; transform: translateX(-50%); }
.pg-wide { left: 3%; right: 3%; top: 50%; height: 55%; transform: translateY(-50%); border-color: rgba(125,211,252,.85) !important; }
.pg-wide i { left: auto; right: 6px; }
.ps-edit {
  position: absolute; left: 6px; top: 6px; width: 30px; height: 30px; border-radius: 50%; border: 0; display: grid; place-items: center;
  color: #fff; background: rgba(0,0,0,.55); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); cursor: pointer;
}
.ps-edit .icon { width: 15px; height: 15px; }
@media (max-width: 820px), (hover: none) and (pointer: coarse) {
  .glint-create-backdrop .glint-create { max-height: none !important; height: 100dvh !important; overflow: hidden !important; }
  .glint-create .glint-mode { display: flex; flex-wrap: nowrap; white-space: nowrap; padding: 3px; gap: 2px; max-width: calc(100vw - 128px); }
  .glint-create .glint-mode label { display: inline-flex; align-items: center; gap: 4px; padding: 7px 10px; font-size: .74rem; }
  .glint-create .glint-mode label .icon { width: 14px; height: 14px; }
}
/* While typing in a sheet, the page behind can't scroll away (iPhone would otherwise move the page, not the sheet) */
html.sheet-typing, html.sheet-typing body { overflow: hidden; }

/* ---------- 2.4.5: a slimmer dock that tucks away while you scroll down ---------- */
@media (max-width: 820px), (max-height: 500px) and (pointer: coarse) {
  .tabbar {
    padding: 4px; border-radius: 26px; bottom: calc(10px + env(safe-area-inset-bottom));
    /* its own layer: no jumping when the page height changes mid-scroll (some themes on iPhone) */
    transform: translate3d(0, 0, 0); will-change: transform; -webkit-backface-visibility: hidden; backface-visibility: hidden;
    transition: transform .45s cubic-bezier(.34, 1.4, .64, 1), opacity .3s ease;
  }
  .tabbar .nav-link { padding: 5px 8px 4px; gap: 1px; min-width: 52px; font-size: min(.64rem, 11.5px); border-radius: 18px; }
  .tabbar .nav-link .icon { width: 21px; height: 21px; }
  .tab-compose .nav-icon { width: 40px; height: 40px; border-radius: 14px; }
  body.dock-away .tabbar { transform: translate3d(0, calc(100% + 26px + env(safe-area-inset-bottom)), 0); opacity: 0; transition: transform .32s cubic-bezier(.5, 0, .75, 0), opacity .25s ease .05s; pointer-events: none; }
  .shell, .shell.no-right { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
}

/* Glint rings: room for the colored ring and its glow (it was clipped at the top) */
.glint-scroll { padding-top: 6px; padding-bottom: 4px; margin-top: -6px; }
.glint-tray { overflow: visible; }

/* Notifications: a little more air between lines */
.notif { gap: 12px; padding: 14px 16px; align-items: flex-start; }
.notif > .avatar, .notif > .notif-icon { margin-top: 2px; }
.notif-text { line-height: 1.38; font-size: .92rem; }
.notif-text strong { font-weight: 750; }
.notif-snippet { margin-top: 4px; }
.notif-wrap.has-actions > .notif { padding-bottom: 58px; }
.notif-actions { left: 82px; }
.notif-done { display: inline-block; padding: 6px 12px; border-radius: 99px; background: var(--grad-soft); color: var(--accent); }

/* Invite sheet */
.hud-invite { justify-items: stretch; text-align: left; gap: 12px; }
.hud-invite h2 { text-align: center; font-size: 1.1rem; }
.hi-share { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.hi-opt { display: grid; justify-items: center; gap: 2px; padding: 12px 8px; border-radius: 18px; border: 1px solid var(--glass-border); background: var(--glass); color: var(--text); font: inherit; font-weight: 750; font-size: .86rem; cursor: pointer; }
.hi-opt small { font-weight: 600; font-size: .7rem; color: var(--muted); }
.hi-ic { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; color: #fff; margin-bottom: 4px; }
.hi-ic-share { background: linear-gradient(135deg, #22c55e, #0ea5e9); }
.hi-ic-copy { background: linear-gradient(135deg, #8b5cf6, #ec4899); }
.hi-search { display: flex; align-items: center; gap: 8px; padding: 0 12px; border-radius: 16px; background: var(--input); border: 1px solid var(--input-border); }
.hi-search .icon { color: var(--muted); }
.hi-search input { flex: 1; min-width: 0; border: 0 !important; background: transparent !important; box-shadow: none !important; padding: 11px 0 !important; }
.hi-label { font-size: .74rem; font-weight: 750; color: var(--muted); letter-spacing: .03em; padding: 0 4px; }
.hi-list { display: grid; gap: 2px; max-height: 40vh; overflow-y: auto; overscroll-behavior: contain; }
.hi-row { display: flex; align-items: center; gap: 10px; padding: 6px 4px; }
.hi-who { flex: 1; min-width: 0; display: grid; line-height: 1.25; }
.hi-who strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.join-kicker { display: inline-flex; align-items: center; gap: 6px; }
.join-actions { display: grid; gap: 8px; width: 100%; max-width: 320px; margin-top: 8px; }

/* ---------- 2.5: videos — a full-screen, swipe-up feed of public video posts ---------- */
.feed-videos {
  display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px 6px 10px; border-radius: 999px;
  font-size: .8rem; font-weight: 700; color: var(--text); white-space: nowrap;
}
.feed-videos .icon { width: 13px; height: 13px; color: var(--accent); fill: currentColor; }
.feed-videos:hover { background: var(--glass-hover); }
.feed-head .feed-order { margin-left: auto; }
.pm-vfeed {
  position: absolute; top: 8px; right: 8px; z-index: 2; display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 10px 5px 8px; border-radius: 999px; font-size: .72rem; font-weight: 700; color: #fff;
  background: rgba(0,0,0,.42); -webkit-backdrop-filter: blur(12px) saturate(160%); backdrop-filter: blur(12px) saturate(160%);
  border: 1px solid rgba(255,255,255,.22);
}
.pm-vfeed .icon { width: 12px; height: 12px; fill: currentColor; }

body.page-videos { --vs-bottom: 22px; --vs-top: 16px; }
body.page-videos .main { display: block; }
.vfeed {
  position: relative; height: calc(100vh - 40px); height: calc(100dvh - 40px); max-width: 470px; margin: 0 auto;
  overflow-y: auto; overscroll-behavior: contain; scroll-snap-type: y mandatory; scrollbar-width: none;
  border-radius: 28px; background: #000; color: #fff; isolation: isolate;
  box-shadow: 0 30px 70px -30px rgba(0,0,0,.7), inset 0 0 0 1px rgba(255,255,255,.08);
}
body.page-videos .shell { padding-top: 20px; padding-bottom: 20px; }
.vfeed::-webkit-scrollbar { display: none; }
.vf-head {
  position: sticky; top: 0; z-index: 8; height: 0; display: flex; align-items: flex-start; justify-content: space-between;
  pointer-events: none;
}
.vf-head > * { pointer-events: auto; margin-top: var(--vs-top); }
.vf-head .icon-btn { margin-left: 10px; margin-right: 10px; color: #fff; background: rgba(0,0,0,.28); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: 1px solid rgba(255,255,255,.18); }
.vf-title { margin-top: calc(var(--vs-top) + 8px); font-size: 1.02rem; font-weight: 800; letter-spacing: -.01em; text-shadow: 0 1px 8px rgba(0,0,0,.6); pointer-events: none; }
.vf-back { visibility: hidden; }

.vslide.post, .vslide.vs-live {
  position: relative; height: 100%; padding: 0; margin: 0; border: 0; border-radius: 0; background: #000; overflow: hidden;
  scroll-snap-align: start; scroll-snap-stop: always; color: #fff; contain: layout paint;
}
.vslide.post:hover { border-color: transparent; }
.vs-stage { position: absolute; inset: 0; display: grid; place-items: center; cursor: pointer; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: pan-y; }
.vs-stage video { width: 100%; height: 100%; object-fit: contain; display: block; background: #000; pointer-events: none; }
.vslide.is-portrait .vs-stage video { object-fit: cover; }
.vs-stage::before, .vs-stage::after { content: ""; position: absolute; left: 0; right: 0; pointer-events: none; z-index: 1; }
.vs-stage::before { top: 0; height: 120px; background: linear-gradient(rgba(0,0,0,.45), transparent); }
.vs-stage::after { bottom: 0; height: 46%; background: linear-gradient(transparent, rgba(0,0,0,.2) 35%, rgba(0,0,0,.72)); }
.vs-paused {
  position: absolute; z-index: 2; width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(0,0,0,.3); -webkit-backdrop-filter: blur(16px) saturate(160%); backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid rgba(255,255,255,.22); opacity: 0; transform: scale(1.3); transition: opacity .2s, transform .25s var(--ease); pointer-events: none;
}
.vs-paused .icon { width: 30px; height: 30px; fill: #fff; margin-left: 4px; }
.vslide.is-paused .vs-paused { opacity: 1; transform: none; }
.vs-burst { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.vs-heart { position: absolute; width: 96px; height: 96px; margin: -48px 0 0 -48px; font-size: 84px; line-height: 96px; text-align: center; animation: vs-heart .9s cubic-bezier(.2,.9,.3,1.2) forwards; filter: drop-shadow(0 6px 18px rgba(244,63,94,.6)); }
@keyframes vs-heart { 0% { transform: scale(.2) rotate(-14deg); opacity: 0; } 18% { transform: scale(1.15) rotate(-8deg); opacity: 1; } 32% { transform: scale(.95) rotate(-8deg); } 70% { transform: scale(1) rotate(-8deg) translateY(0); opacity: 1; } 100% { transform: scale(.9) rotate(-8deg) translateY(-90px); opacity: 0; } }
.vs-progress { position: absolute; left: 14px; right: 14px; bottom: calc(var(--vs-bottom) - 10px); height: 3px; border-radius: 3px; background: rgba(255,255,255,.22); z-index: 2; overflow: hidden; }
.vs-progress i { display: block; height: 100%; width: 100%; transform-origin: left; transform: scaleX(0); background: #fff; border-radius: inherit; }

.vs-info { position: absolute; left: 14px; right: 78px; bottom: var(--vs-bottom); z-index: 4; display: grid; gap: 8px; text-shadow: 0 1px 6px rgba(0,0,0,.55); }
.vs-author { display: flex; align-items: center; gap: 10px; min-width: 0; }
.vs-avatar .avatar { box-shadow: 0 0 0 2px rgba(255,255,255,.85); }
.vs-name { display: grid; min-width: 0; color: #fff; line-height: 1.25; }
.vs-name strong { font-size: .98rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vs-name small { font-size: .76rem; opacity: .82; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vs-author .friend-btns { flex: none; }
.vs-author .friend-btns .btn { padding: 5px 11px; font-size: .74rem; text-shadow: none; }
.vs-author .friend-btns .btn .icon { width: 14px; height: 14px; }
.vs-caption {
  font-size: .9rem; line-height: 1.4; overflow-wrap: anywhere; cursor: pointer;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.vs-caption.is-open { display: block; max-height: 38vh; overflow-y: auto; }
.vs-caption a { color: #fff; font-weight: 700; }
.vs-more { justify-self: start; font-size: .74rem; color: #fff; background: rgba(255,255,255,.16); text-shadow: none; }

.vs-rail { position: absolute; right: 8px; bottom: var(--vs-bottom); z-index: 4; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.vs-rail .vs-act { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.vs-rail .action, .vs-rail button.vs-act {
  display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 0; border: 0; background: none !important;
  color: #fff; font-size: .7rem; font-weight: 700; text-shadow: 0 1px 6px rgba(0,0,0,.6); box-shadow: none; min-width: 0; cursor: pointer;
}
.vs-rail .action > .icon, .vs-rail .react-face, .vs-rail .vs-snd-off, .vs-rail .vs-snd-on {
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; box-sizing: border-box; padding: 12px;
  background: rgba(255,255,255,.14); -webkit-backdrop-filter: blur(16px) saturate(170%); backdrop-filter: blur(16px) saturate(170%);
  border: 1px solid rgba(255,255,255,.22); box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 8px 20px -10px rgba(0,0,0,.7);
  transition: transform .2s var(--ease), background-color .2s;
}
.vs-rail .vs-snd-off .icon, .vs-rail .vs-snd-on .icon { width: 22px; height: 22px; }
.vs-rail .action:active > .icon, .vs-rail .action:active .react-face, .vs-rail .action:active .vs-snd-off, .vs-rail .action:active .vs-snd-on { transform: scale(.9); }
.vs-rail .react-face .icon { width: 24px; height: 24px; }
.vs-rail .react-emoji { font-size: 1.5rem; }
.vs-rail .react-btn.is-on .react-face { background: rgba(255,255,255,.24); }
.vs-rail .react-btn.react-heart { color: #fb7185; }
.vs-rail .react-btn.react-heart .react-face .icon { fill: currentColor; }
.vs-rail .react-label { font-size: .7rem; }
.vs-rail .react-btn.is-on .react-label { display: none; }
.vs-rail .react-sum { padding: 2px 7px 2px 4px; gap: 3px; color: #fff; font-size: .7rem; background: rgba(0,0,0,.25); }
.vs-rail .react-sum .rs-e { font-size: .82rem; }
.vs-rail .count { color: #fff; font-size: .7rem; }
.vfeed:not(.is-muted) .vs-snd-off, .vfeed.is-muted .vs-snd-on { display: none !important; }
.vs-rail .menu { right: 54px; left: auto; bottom: 0; top: auto; color: var(--text); text-shadow: none; }

.vs-comments {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 7; max-height: 72%; display: flex; flex-direction: column;
  border-radius: 26px 26px 0 0; color: var(--text); padding: 0 14px calc(14px + env(safe-area-inset-bottom));
  animation: vs-sheet .32s var(--ease); text-shadow: none;
}
.vs-comments[hidden] { display: none; }
@keyframes vs-sheet { from { transform: translateY(100%); } }
.vs-comments-head { position: relative; display: flex; align-items: center; justify-content: center; padding: 14px 0 8px; flex: none; }
.vs-comments-head .sheet-grip { position: absolute; top: 6px; left: 50%; margin-left: -18px; }
.vs-comments-head h2 { margin: 0; font-size: .95rem; }
.vs-comments-head .icon-btn { position: absolute; right: -4px; top: 8px; }
.vs-comments .comment-list { flex: 1 1 auto; min-height: 90px; overflow-y: auto; overscroll-behavior: contain; padding: 4px 2px 10px; }
.vs-comments .comment-form { flex: none; padding-top: 10px; border-top: 1px solid var(--line); }
.vs-end { height: 0; }
.vs-end:not([hidden]) { height: 90px; display: grid; place-items: center; scroll-snap-align: end; }
.vs-end .pill { color: #fff; background: rgba(255,255,255,.12); }
.vs-empty { display: grid; place-items: center; padding: 24px; }
.vs-empty .empty { max-width: 320px; color: var(--text); }
.vs-empty .empty .btn { margin-top: 8px; }

@media (max-width: 820px), (max-height: 500px) and (pointer: coarse) {
  body.page-videos { --vs-bottom: calc(80px + env(safe-area-inset-bottom)); --vs-top: calc(8px + env(safe-area-inset-top)); overflow: hidden; }
  body.page-videos .topbar { display: none; }
  body.page-videos .shell { padding: 0; }
  body.page-videos #main { animation: none; }
  .vfeed { position: fixed; inset: 0; height: auto; max-width: none; border-radius: 0; box-shadow: none; z-index: 1; }
  .vf-back { visibility: visible; }
  body.page-videos .tabbar { background: rgba(20,20,24,.38); border-color: rgba(255,255,255,.14); color: #fff; }
  body.page-videos .tabbar .nav-link { color: rgba(255,255,255,.86); }
  .vs-comments { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
  .vs-rail { right: 6px; }
}
@media (min-width: 821px) and (max-height: 640px) and (pointer: fine), (min-width: 821px) and (min-height: 501px) and (max-height: 640px) { .vs-rail { gap: 8px; } .vs-rail .action > .icon, .vs-rail .react-face, .vs-rail .vs-snd-off, .vs-rail .vs-snd-on { width: 42px; height: 42px; padding: 10px; } }
@media (prefers-reduced-motion: reduce) { .vs-heart { animation-duration: .01s; } .vs-comments { animation: none; } }
/* replies over a bright video: thicker glass so text stays readable */
.vs-comments.glass-strong { background: color-mix(in srgb, var(--bg) 84%, transparent); -webkit-backdrop-filter: blur(30px) saturate(170%); backdrop-filter: blur(30px) saturate(170%); }
.vs-rail .react-sum .rs-e { box-shadow: none; background: transparent; width: 16px; height: 16px; margin-left: -3px; }
.feed-head { flex-wrap: nowrap; }
@media (max-width: 520px) { .feed-head .feed-order { display: none; } }
.vslide:has(.vs-comments:not([hidden])) .vs-info, .vslide:has(.vs-comments:not([hidden])) .vs-progress { opacity: 0; transition: opacity .2s; }

/* ---------- 2.5: link preview cards ---------- */
.link-card {
  position: relative; display: grid; margin: 10px 0 4px; border-radius: 18px; overflow: hidden;
  background: var(--input); border: 1px solid var(--glass-border); box-shadow: var(--glass-shadow);
}
.link-card.lc-in { animation: rise .35s var(--ease); }
.link-card a { color: inherit; text-decoration: none; }
.lc-media { position: relative; display: block; background: #0b0b12; overflow: hidden; max-height: 520px; }
.lc-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s var(--ease); }
.lc-media:hover img { transform: scale(1.02); }
.lc-tall .lc-media { max-height: 480px; }
.lc-media iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.lc-media.is-playing { aspect-ratio: 16 / 9 !important; }
.lc-tall .lc-media.is-playing { aspect-ratio: 9 / 16 !important; max-height: 600px; }
.lc-play {
  position: absolute; left: 50%; top: 50%; width: 62px; height: 62px; margin: -31px 0 0 -31px; border-radius: 50%;
  display: grid; place-items: center; color: #fff; background: rgba(0,0,0,.38);
  -webkit-backdrop-filter: blur(14px) saturate(160%); backdrop-filter: blur(14px) saturate(160%);
  border: 1px solid rgba(255,255,255,.3); box-shadow: 0 10px 30px -10px rgba(0,0,0,.7); transition: transform .2s var(--ease);
}
.lc-play .icon { width: 24px; height: 24px; fill: currentColor; margin-left: 3px; }
.lc-media:hover .lc-play { transform: scale(1.08); }
.lc-text { display: grid; gap: 3px; padding: 11px 14px 12px; min-width: 0; }
.lc-site { display: inline-flex; align-items: center; gap: 5px; font-size: .74rem; font-weight: 650; color: var(--muted); text-transform: lowercase; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.lc-site .icon { width: 13px; height: 13px; flex: none; }
.lc-title { font-size: .95rem; line-height: 1.3; font-weight: 750; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.lc-desc { font-size: .84rem; line-height: 1.38; color: var(--text-soft); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.lc-thumb { grid-template-columns: 96px minmax(0, 1fr); align-items: center; }
.lc-thumb .lc-media { aspect-ratio: 1 !important; height: 100%; min-height: 96px; max-height: none; border-right: 1px solid var(--line); }
.lc-thumb .lc-desc { -webkit-line-clamp: 1; }
.lc-plain .lc-text { padding: 12px 14px; }
.link-card:hover { border-color: color-mix(in srgb, var(--accent) 30%, var(--glass-border)); }
.lc-pending { min-height: 74px; align-content: end; padding: 12px 14px; }
.lc-shimmer { position: absolute; inset: 0; background: linear-gradient(100deg, transparent 20%, color-mix(in srgb, var(--text) 7%, transparent) 50%, transparent 80%); background-size: 220% 100%; animation: lc-shimmer 1.3s linear infinite; }
@keyframes lc-shimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }
.lc-pending .lc-site { position: relative; }
/* in the composer */
.ps-link { position: relative; margin: 2px 14px 6px; }
.ps-link .link-card { margin: 0; }
.ps-link .lc-media { max-height: 220px; }
.ps-link .lc-play { width: 48px; height: 48px; margin: -24px 0 0 -24px; }
.ps-link-x {
  position: absolute; top: 8px; right: 8px; z-index: 3; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,.35); background: rgba(0,0,0,.5); color: #fff; cursor: pointer;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.ps-link-x .icon { width: 16px; height: 16px; }
@media (max-width: 820px), (max-height: 500px) and (pointer: coarse) { .link-card { border-radius: 16px; } .lc-thumb { grid-template-columns: 84px minmax(0, 1fr); } .lc-thumb .lc-media { min-height: 84px; } }

/* ---------- 2.5: reactions on chat messages ---------- */
.msg .msg-bubble { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; transition: transform .2s var(--ease); }
.msg .msg-bubble.rx-held { transform: scale(.96); }
.msg-rx {
  position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 1px; margin: -9px 8px 0; padding: 2px 7px 2px 5px;
  border-radius: 999px; border: 1px solid var(--glass-border); background: var(--glass-strong); color: var(--text);
  -webkit-backdrop-filter: blur(14px) saturate(170%); backdrop-filter: blur(14px) saturate(170%);
  box-shadow: 0 4px 12px -6px rgba(0,0,0,.45); font-size: .8rem; line-height: 1.25; cursor: pointer;
}
.msg-rx span { font-size: .85rem; }
.msg-rx b { margin-left: 3px; font-size: .72rem; font-weight: 750; color: var(--muted); }
.msg-rx.is-mine { border-color: color-mix(in srgb, var(--accent) 45%, var(--glass-border)); }
.msg-rx.pop { animation: rx-pop .35s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes rx-pop { from { transform: scale(.3); opacity: 0; } }
.msg-rx + .msg-time { margin-top: 3px; }
.msg-rb {
  position: absolute; top: 50%; margin-top: -16px; width: 32px; height: 32px; border-radius: 50%; display: none; place-items: center;
  border: 1px solid var(--glass-border); background: var(--glass-strong); color: var(--muted); cursor: pointer; opacity: 0; transition: opacity .15s;
}
.msg-rb .icon { width: 16px; height: 16px; }
.msg-out .msg-rb { left: -76px; }
.msg-in .msg-rb { right: -76px; }
@media (hover: hover) and (pointer: fine) {
  .msg-rb { display: grid; }
  .msg:hover .msg-rb, .msg-rb:focus-visible { opacity: 1; }
  .msg .msg-bubble { -webkit-user-select: text; user-select: text; }
}
.msg.is-swiping .msg-rb, .msg.is-open .msg-rb { display: none; }
/* 2.5.2: videos from other sites play inside the card */
.lc-media.is-playing { aspect-ratio: 16 / 9 !important; background: #000; max-height: none; }
.lc-media.is-playing.is-tall { aspect-ratio: 9 / 16 !important; width: min(100%, 340px); margin: 0 auto; border-radius: 0; }
.lc-tall:has(.is-playing) { background: #000; }
.lc-media.is-playing video { position: absolute; inset: 0; width: 100%; height: 100%; background: #000; }
.lc-stop {
  position: absolute; top: 8px; right: 8px; z-index: 3; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,.3); background: rgba(0,0,0,.5); color: #fff; cursor: pointer; opacity: .75;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.lc-stop .icon { width: 15px; height: 15px; }
.lc-stop:hover { opacity: 1; }
.lc-noimg { display: grid; place-items: center; background: radial-gradient(120% 90% at 20% 10%, color-mix(in srgb, var(--accent) 55%, #000), #0b0b14 70%); }
.lc-noimg-site { position: absolute; left: 14px; bottom: 10px; color: rgba(255,255,255,.75); font-size: .74rem; font-weight: 700; }
.lc-playable .lc-media { cursor: pointer; }

/* ---------- 2.5.3: sound groups ---------- */
.snd-types { margin-top: 4px; transition: opacity .2s; }
.snd-types.is-off { opacity: .45; pointer-events: none; }
.snd-grid { display: grid; gap: 6px; margin-top: 6px; }
.snd-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 16px; background: var(--input); border: 1px solid var(--input-border); cursor: pointer; }
.snd-ic { width: 34px; height: 34px; flex: none; border-radius: 11px; display: grid; place-items: center; background: var(--grad-soft); color: var(--accent); }
.snd-ic .icon { width: 18px; height: 18px; }
.snd-txt { flex: 1; min-width: 0; display: grid; line-height: 1.25; }
.snd-txt strong { font-size: .9rem; }
.snd-txt small { font-size: .74rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.snd-try { flex: none; color: var(--muted); }
.snd-item .switch { transform: scale(.85); transform-origin: right center; }

/* ---------- 2.5.3: profile music ---------- */
.pf-music .panel-title .icon { color: var(--accent); }
.pm-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.pm-track {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 8px; border: 0; border-radius: 12px; background: transparent;
  color: var(--text); text-align: left; cursor: pointer; font: inherit; transition: background-color .15s;
}
.pm-track:hover, .pm-track.is-current { background: var(--glass-hover); }
.pm-n { position: relative; width: 26px; height: 26px; flex: none; display: grid; place-items: center; font-size: .78rem; font-weight: 750; color: var(--muted); }
.pm-n .pm-pi { position: absolute; width: 14px; height: 14px; fill: currentColor; opacity: 0; }
.pm-track:hover .pm-num { opacity: 0; }
.pm-track:hover .pm-pi { opacity: 1; color: var(--accent); }
.pm-eq { display: none; align-items: flex-end; gap: 2px; height: 14px; }
.pm-eq i { width: 3px; border-radius: 2px; background: var(--accent); animation: pm-eq 0.9s ease-in-out infinite; }
.pm-eq i:nth-child(2) { animation-delay: -.3s; } .pm-eq i:nth-child(3) { animation-delay: -.6s; }
@keyframes pm-eq { 0%, 100% { height: 3px; } 50% { height: 14px; } }
.pm-track.is-playing .pm-num, .pm-track.is-playing:hover .pm-pi { opacity: 0; }
.pm-track.is-playing .pm-eq { display: inline-flex; }
.pm-meta { flex: 1; min-width: 0; display: grid; line-height: 1.3; }
.pm-meta strong { font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-meta small { font-size: .76rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-track.is-current .pm-meta strong { color: var(--accent-ink); }
.pm-star { color: #f59e0b; font-size: .9rem; }

.pmusic {
  position: fixed; z-index: 29; left: 50%; bottom: 20px; transform: translateX(-50%); width: min(420px, calc(100vw - 24px));
  display: flex; align-items: center; gap: 10px; padding: 8px 8px 10px 8px; border-radius: 22px; overflow: hidden;
  box-shadow: 0 18px 40px -18px rgba(0,0,0,.6); animation: rise .4s var(--ease);
}
.pmusic[hidden] { display: none; }
.pmusic-art { position: relative; width: 44px; height: 44px; flex: none; border-radius: 14px; display: grid; place-items: center; color: #fff; background: var(--grad); box-shadow: inset 0 1px 0 rgba(255,255,255,.4); }
.pmusic-art .icon { width: 20px; height: 20px; }
.pmusic-art .pm-eq { position: absolute; }
.pmusic-art .pm-eq i { background: #fff; }
.pmusic.is-playing .pmusic-art .icon { display: none; }
.pmusic.is-playing .pmusic-art .pm-eq { display: inline-flex; height: 18px; }
.pmusic-meta { flex: 1; min-width: 0; display: grid; line-height: 1.25; }
.pmusic-meta small { font-size: .7rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pmusic-meta strong { font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pmusic-meta small:empty { display: none; }
.pmusic-btn { width: 42px; height: 42px; flex: none; border-radius: 50%; border: 0; display: grid; place-items: center; color: #fff; background: var(--grad); cursor: pointer; box-shadow: 0 8px 18px -8px rgba(124,58,237,.9); }
.pmusic-btn .icon { width: 18px; height: 18px; fill: currentColor; }
.pmusic-btn .pm-play { margin-left: 2px; }
.pmusic .pm-pause, .pmusic.is-playing .pm-play { display: none; }
.pmusic.is-playing .pm-pause { display: block; }
.pmusic.needs-tap .pmusic-btn { animation: pm-pulse 1.6s ease-in-out infinite; }
@keyframes pm-pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); } 50% { box-shadow: 0 0 0 9px transparent; } }
.pmusic-x { width: 30px; height: 30px; flex: none; border: 0; border-radius: 50%; display: grid; place-items: center; background: transparent; color: var(--muted); cursor: pointer; }
.pmusic-x .icon { width: 16px; height: 16px; }
.pmusic-progress { position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px; border-radius: 2px; background: var(--line); overflow: hidden; }
.pmusic-progress i { display: block; height: 100%; background: var(--accent); transform-origin: left; transform: scaleX(0); transition: transform .25s linear; }
@media (max-width: 820px), (max-height: 500px) and (pointer: coarse) {
  .pmusic { bottom: calc(80px + env(safe-area-inset-bottom)); }
}

/* settings → music */
.ms-list { display: grid; gap: 6px; margin: 8px 0 10px; }
.ms-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 16px; background: var(--input); border: 1px solid var(--input-border); }
.ms-row.is-song { border-color: color-mix(in srgb, #f59e0b 55%, var(--input-border)); }
.ms-play { width: 36px; height: 36px; flex: none; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--grad-soft); color: var(--accent); cursor: pointer; }
.ms-play .icon { width: 15px; height: 15px; fill: currentColor; }
.ms-play.is-playing { background: var(--grad); color: #fff; }
.ms-fields { flex: 1; min-width: 0; display: grid; gap: 2px; }
.ms-fields input { padding: 4px 8px !important; border-radius: 9px !important; background: transparent !important; border-color: transparent !important; font-size: .88rem; min-width: 0; }
.ms-fields input:focus { background: var(--input) !important; border-color: var(--input-border) !important; }
.ms-fields input[data-ms-title] { font-weight: 700; }
.ms-fields input[data-ms-artist] { font-size: .78rem; color: var(--muted); }
.ms-star { width: 34px; height: 34px; flex: none; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 1.1rem; cursor: pointer; opacity: .55; }
.ms-row.is-song .ms-star { color: #f59e0b; opacity: 1; }
.ms-move .icon { transform: rotate(90deg); }
.ms-row:first-child .ms-move { visibility: hidden; }
.ms-add { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.ms-progress { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; margin: 8px 0; }
.ms-progress span { display: block; height: 100%; width: 0; background: var(--grad); transition: width .2s; }
.ms-visit { margin-top: 14px; }
.seg-choice { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.seg-choice label { cursor: pointer; }
.seg-choice input { position: absolute; opacity: 0; pointer-events: none; }
.seg-choice span { display: inline-block; padding: 7px 13px; border-radius: 999px; font-size: .82rem; font-weight: 700; background: var(--input); border: 1px solid var(--input-border); }
.seg-choice input:checked + span { background: var(--grad); color: #fff; border-color: transparent; }
.seg-choice input:focus-visible + span { box-shadow: var(--focus); }

/* 2.5.3: video links show just the video */
.link-card.lc-bare { background: #000; }
.lc-bare .lc-media { max-height: 640px; }
.lc-bare.lc-tall .lc-media:not(.is-playing) { aspect-ratio: 9 / 16 !important; width: min(100%, 360px); margin: 0 auto; max-height: none; }
.lc-bare.lc-tall { background: #000; }
.lc-src {
  position: absolute; top: 10px; left: 10px; z-index: 3; display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px 5px 8px; border-radius: 999px;
  font-size: .72rem; font-weight: 750; color: #fff !important; background: rgba(0,0,0,.42); border: 1px solid rgba(255,255,255,.22);
  -webkit-backdrop-filter: blur(12px) saturate(160%); backdrop-filter: blur(12px) saturate(160%);
}
.lc-src .icon { width: 11px; height: 11px; fill: currentColor; }
.lc-media.is-loading .lc-play { animation: lc-load 1s ease-in-out infinite; }
@keyframes lc-load { 50% { transform: scale(.88); opacity: .7; } }
.lc-media.is-playing.is-tall { max-height: none; }
/* videos feed: clips from other sites */
.vs-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; filter: saturate(1.05); }
.vslide.is-portrait .vs-poster { object-fit: cover; }
.vs-stage > video ~ .vs-poster { display: none; }
.vs-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; z-index: 3; background: #000; }
.vs-embed [data-vs-mute] { display: none !important; }
.vs-src {
  position: absolute; z-index: 4; left: 14px; top: calc(var(--vs-top) + 52px); display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px 5px 8px;
  border-radius: 999px; font-size: .72rem; font-weight: 750; color: #fff; background: rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.2);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.vs-src .icon { width: 11px; height: 11px; fill: currentColor; }
.vs-embed .vs-src { display: none; }
.vs-unplayable .vs-paused { opacity: 1; transform: none; }

/* ---------- 2.5.4: top 10 from Apple Music & Spotify ---------- */
.ms-src { display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: 999px; font-size: .64rem; font-weight: 800; letter-spacing: .01em; white-space: nowrap; line-height: 1.4; }
.ms-src::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.ms-src-apple { color: #fa2d48; background: color-mix(in srgb, #fa2d48 14%, transparent); }
.ms-src-spotify { color: #1db954; background: color-mix(in srgb, #1db954 15%, transparent); }
.ms-src-upload { color: var(--muted); background: var(--input); }
.ms-search { display: grid; gap: 8px; margin: 10px 0 6px; }
.ms-search-row { display: flex; align-items: center; gap: 8px; padding: 0 12px; border-radius: 999px; background: var(--input); border: 1px solid var(--input-border); }
.ms-search-row .icon { width: 18px; height: 18px; color: var(--muted); flex: none; }
.ms-search-row input { flex: 1; min-width: 0; border: 0 !important; background: transparent !important; padding: 11px 0 !important; box-shadow: none !important; }
.ms-results { display: grid; gap: 4px; max-height: 420px; overflow-y: auto; overscroll-behavior: contain; padding: 4px; border-radius: 18px; background: color-mix(in srgb, var(--input) 60%, transparent); margin-bottom: 8px; }
.msr-row, .ms-row { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 14px; }
.msr-row:hover { background: var(--glass-hover); }
.ms-play { position: relative; width: 48px; height: 48px; flex: none; padding: 0; border: 0; border-radius: 10px; overflow: hidden; background: var(--grad-soft); cursor: pointer; }
.ms-play:disabled { cursor: default; }
.ms-art, .pm-art { display: grid; place-items: center; width: 100%; height: 100%; color: var(--accent); }
.ms-art img, .pm-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ms-art .icon, .pm-art .icon { width: 20px; height: 20px; }
.ms-pi { position: absolute; inset: 0; margin: auto; width: 18px; height: 18px; color: #fff; fill: #fff; opacity: 0; filter: drop-shadow(0 1px 4px rgba(0,0,0,.6)); transition: opacity .15s; }
.ms-play:not(:disabled):hover .ms-pi, .ms-play.is-current .ms-pi { opacity: 1; }
.ms-play.is-playing::after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.35); }
.ms-play.is-playing .ms-pi { opacity: 0; }
.ms-play.is-playing { box-shadow: 0 0 0 2px var(--accent); }
.ms-meta { flex: 1; min-width: 0; display: grid; gap: 1px; justify-items: start; line-height: 1.3; }
.ms-meta strong { font-size: .9rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-meta small { font-size: .76rem; color: var(--muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-meta .ms-src { margin-top: 2px; }
.ms-h { display: flex; align-items: baseline; gap: 8px; margin: 14px 0 4px; font-size: .95rem; }
.ms-list { counter-reset: rank; gap: 4px; }
.ms-row { background: var(--input); border: 1px solid var(--input-border); padding: 6px 8px 6px 4px; }
.ms-rank { width: 22px; flex: none; text-align: center; font-weight: 800; font-size: .85rem; color: var(--muted); }
.ms-rank::before { counter-increment: rank; content: counter(rank); }
.ms-row.is-song .ms-rank { color: #f59e0b; }
.ms-wait { padding: 8px; }
.msr-row .btn { flex: none; }

/* on the profile */
.pm-li { display: flex; align-items: center; gap: 4px; }
.pm-li .pm-track { flex: 1; min-width: 0; }
.pm-track .pm-n { width: 20px; font-size: .82rem; }
.pm-cover { position: relative; width: 44px; height: 44px; flex: none; border-radius: 9px; overflow: hidden; background: var(--grad-soft); display: grid; place-items: center; }
.pm-cover .pm-pi { position: absolute; width: 16px; height: 16px; fill: #fff; color: #fff; opacity: 0; filter: drop-shadow(0 1px 4px rgba(0,0,0,.6)); }
.pm-track:hover .pm-cover .pm-pi { opacity: 1; }
.pm-cover .pm-eq { position: absolute; inset: 0; margin: auto; width: max-content; height: 16px; }
.pm-cover .pm-eq i { background: #fff; }
.pm-track.is-playing .pm-cover::after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.4); }
.pm-track.is-playing .pm-cover .pm-eq { display: inline-flex; z-index: 1; }
.pm-track.is-playing .pm-cover .pm-pi { opacity: 0 !important; }
.pm-track:hover .pm-num { opacity: 1; }
.pm-out { flex: none; padding: 4px; border-radius: 999px; }
.pm-note { margin: 8px 4px 0; font-size: .72rem; }
.pm-meta .pm-star { font-size: .8rem; }

/* the mini player */
.pmusic { flex-wrap: wrap; row-gap: 8px; }
.pmusic-art { overflow: hidden; }
.pmusic-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pmusic.has-art .pmusic-art > .icon { display: none; }
.pmusic.has-art.is-playing .pmusic-art::after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.35); }
.pmusic.has-art .pmusic-art .pm-eq { z-index: 1; }
.pmusic-out { flex: none; text-decoration: none; }
.pmusic-embed { flex-basis: 100%; height: 80px; border-radius: 14px; overflow: hidden; }
.pmusic-embed iframe { width: 100%; height: 80px; border: 0; display: block; }
.pmusic.is-embed .pmusic-btn, .pmusic.is-embed .pmusic-progress { display: none; }
@media (max-width: 420px) { .pmusic-out .ms-src { font-size: 0; padding: 4px; } .pmusic-out .ms-src::before { width: 9px; height: 9px; } }

/* 2.5.5: people allowed to keep their capitals */
.keep-case, .keep-case * { text-transform: none; }
html:not([data-lowercase]) input:not([type=password]), html:not([data-lowercase]) textarea { text-transform: none; }
.case-row { margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }

/* 2.5.5: the music player tucks away with the dock while you scroll down, and comes back with it */
@media (max-width: 820px), (max-height: 500px) and (pointer: coarse) {
  .pmusic {
    transform: translate3d(-50%, 0, 0); will-change: transform; -webkit-backface-visibility: hidden; backface-visibility: hidden;
    transition: transform .45s cubic-bezier(.34, 1.4, .64, 1), opacity .3s ease;
  }
  body.dock-away .pmusic {
    transform: translate3d(-50%, calc(100% + 110px + env(safe-area-inset-bottom)), 0); opacity: 0; pointer-events: none;
    transition: transform .32s cubic-bezier(.5, 0, .75, 0), opacity .25s ease .05s;
  }
}
.ms-upload-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin: 2px 0 6px; }
.ms-upload-row .muted { flex: 1 1 200px; font-size: .74rem; }
.ms-edit input { padding: 3px 8px !important; border-radius: 8px !important; background: transparent !important; border-color: transparent !important; font-size: .88rem; min-width: 0; width: 100%; }
.ms-edit input:focus { background: var(--input) !important; border-color: var(--input-border) !important; }
.ms-edit input[data-ms-title] { font-weight: 700; }
.ms-edit input[data-ms-artist] { font-size: .76rem; color: var(--muted); }
.pmusic { animation: pm-in .4s var(--ease); }
@keyframes pm-in { from { transform: translate3d(-50%, 14px, 0); opacity: 0; } }
.ms-meta.ms-edit { justify-items: stretch; }
.ms-edit input { width: 100% !important; max-width: none; }
.ms-edit .ms-src { justify-self: start; }
/* 2.5.6: clips from other sites in the videos feed — sized to the clip, centred on black, shown once drawn */
.vs-embed .vs-frame { position: absolute; inset: auto; top: 50%; left: 50%; bottom: auto; transform: translate(-50%, -50%); max-width: 100%; max-height: 100%;
  border: 0; z-index: 3; background: #000; opacity: 0; transition: opacity .35s ease; }
.vs-embed .vs-frame.is-ready { opacity: 1; }
.vs-ext .vs-stage { background: #000; }
.vs-ext.vs-loading .vs-paused { opacity: 1; transform: none; animation: lc-load 1s ease-in-out infinite; }

/* ---------- 2.5.7: one switch for friends / everyone / videos ---------- */
.feed-seg { grid-template-columns: repeat(3, 1fr); width: min(100%, 21.5rem); }
.feed-seg .fs-ind { width: calc(33.333% - 2px); }
.feed-seg[data-feed="all"] .fs-ind { transform: translateX(100%); }
.feed-seg[data-feed="videos"] .fs-ind { transform: translateX(200%); }
.feed-seg .tab-videos .icon { fill: currentColor; width: 12px; height: 12px; }
.feed-seg[data-feed="videos"] .tab-videos { color: #fff; }
.feed-videos { display: none !important; }

/* ---------- 2.5.7: the official updates account ---------- */
.official-badge { display: inline-grid; place-items: center; width: 1.05em; height: 1.05em; margin-left: 3px; border-radius: 50%; vertical-align: -0.12em;
  background: linear-gradient(135deg, #8b5cf6, #22d3ee); color: #fff; box-shadow: 0 2px 8px -2px rgba(124,58,237,.8); }
.official-badge .icon { width: 68%; height: 68%; stroke-width: 3.2; }
.post.is-update { border-color: color-mix(in srgb, #a78bfa 45%, var(--glass-border)); box-shadow: var(--glass-shadow), 0 0 0 1px color-mix(in srgb, #22d3ee 18%, transparent), 0 18px 40px -24px rgba(124,58,237,.75); }
.update-tag { display: inline-flex; align-items: center; gap: 3px; font-weight: 750; background: linear-gradient(90deg, #a78bfa, #22d3ee); -webkit-background-clip: text; background-clip: text; color: transparent; }
.update-tag .icon { width: 12px; height: 12px; color: #a78bfa; }
.update-hide { margin-left: auto; opacity: .7; }
.update-hide + .menu-wrap { margin-left: 0; }
.pf-official { display: inline-flex; align-items: center; gap: 4px; color: #fff; background: rgba(0,0,0,.28); border: 1px solid rgba(255,255,255,.25); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.pf-official .icon { width: 14px; height: 14px; }
/* a profile color only the updates account has */
.pf-theme-prism { --pf-grad: linear-gradient(120deg, #6d28d9, #2563eb 30%, #06b6d4 55%, #d946ef 80%, #f59e0b); --pf-accent: #c4b5fd; }
@media (max-width: 820px), (max-height: 500px) and (pointer: coarse) { .feed-head .feed-seg { width: 100%; } }

/* ---------- 2.5.8: tagging friends ---------- */
.mention-box { position: fixed; z-index: 400; max-height: 264px; overflow-y: auto; overscroll-behavior: contain; padding: 6px; border-radius: 18px;
  box-shadow: 0 18px 44px -18px rgba(0,0,0,.6); animation: rise .18s var(--ease); }
.mention-box[hidden] { display: none; }
.mb-row { width: 100%; display: flex; align-items: center; gap: 10px; padding: 7px 8px; border: 0; border-radius: 12px; background: transparent; color: var(--text); text-align: left; cursor: pointer; font: inherit; }
.mb-row:hover, .mb-row.is-active { background: var(--glass-hover); }
.mb-meta { flex: 1; min-width: 0; display: grid; line-height: 1.25; }
.mb-meta strong { font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mb-meta small { font-size: .74rem; color: var(--muted); }
.mb-friend { flex: none; font-size: .66rem; font-weight: 750; padding: 2px 8px; border-radius: 999px; background: var(--grad-soft); color: var(--accent-ink); }
.mb-empty { margin: 6px 10px; font-size: .82rem; color: var(--muted); }
.co-tag { background: linear-gradient(135deg, #22d3ee, #6366f1); }
.co-tag .icon { color: #fff; }

/* ---------- 2.6: polls ---------- */
.co-poll { background: linear-gradient(135deg, #a855f7, #ec4899); }
.co-poll .icon { color: #fff; }
.post-sheet:is(.is-reply, .is-chat) :is([data-ps-toggle="poll"], [data-ps-panel="poll"]) { display: none !important; }
.poll-inputs { display: grid; gap: 6px; margin: 6px 0 8px; }
.poll-inputs input[hidden] { display: none; }
.poll-length { margin-top: 8px; }
.poll { display: grid; gap: 7px; margin: 10px 0 4px; }
.poll-opt {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; padding: 10px 14px;
  border-radius: 14px; border: 1px solid var(--input-border); background: var(--input); color: var(--text); font: inherit; font-weight: 650;
  text-align: left; cursor: pointer; overflow: hidden; isolation: isolate; transition: border-color .2s, transform .15s;
}
.poll-opt:not(:disabled):active { transform: scale(.985); }
.poll:not(.is-results) .poll-opt:not(:disabled):hover { border-color: var(--accent); }
.poll-bar { position: absolute; inset: 0; z-index: -1; width: var(--pct); background: var(--grad-soft); border-radius: inherit; transition: width .6s var(--ease); }
.poll-opt.is-lead .poll-bar { background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 34%, transparent), color-mix(in srgb, #22d3ee 22%, transparent)); }
.poll-opt.is-mine { border-color: color-mix(in srgb, var(--accent) 60%, var(--input-border)); }
.poll-label { display: inline-flex; align-items: center; gap: 6px; min-width: 0; overflow-wrap: anywhere; }
.poll-label .icon { width: 16px; height: 16px; color: var(--accent); flex: none; }
.poll-pct { flex: none; font-variant-numeric: tabular-nums; font-weight: 750; color: var(--text-soft); }
.poll-opt:disabled { cursor: default; opacity: 1; }
.poll-meta { margin: 2px 2px 0; font-size: .76rem; color: var(--muted); }
.poll.just-voted .poll-bar { animation: poll-grow .6s var(--ease); }
@keyframes poll-grow { from { width: 0; } }

/* ---------- 2.6: shared albums ---------- */
.albums-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.albums-head p { margin: 2px 0 0; max-width: 34rem; }
.alb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.alb-card { display: grid; padding: 8px; border-radius: 20px; color: var(--text); text-decoration: none; transition: transform .2s var(--ease); }
.alb-card:hover { transform: translateY(-2px); }
.alb-cover { aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: var(--grad-soft); display: grid; place-items: center; }
.alb-cover img { width: 100%; height: 100%; object-fit: cover; }
.alb-empty-art .icon { width: 34px; height: 34px; color: var(--accent); }
.alb-meta { display: grid; padding: 8px 4px 2px; line-height: 1.3; min-width: 0; }
.alb-meta strong { font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alb-meta small { font-size: .74rem; color: var(--muted); display: inline-flex; align-items: center; gap: 3px; flex-wrap: wrap; }
.alb-meta small .icon { width: 12px; height: 12px; }
.alb-head { position: relative; display: flex; align-items: flex-start; flex-wrap: wrap; gap: 12px; padding: 14px 16px; border-radius: 22px; }
.alb-back { flex: none; }
.alb-head-text { flex: 1 1 200px; min-width: 0; }
.alb-head h1 { margin: 2px 0 2px; font-size: 1.4rem; letter-spacing: -.02em; }
.alb-head p { margin: 0; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.alb-head p .icon { width: 13px; height: 13px; }
.alb-faces { display: flex; margin-top: 8px; align-items: center; }
.alb-faces .avatar { margin-right: -8px; box-shadow: 0 0 0 2px var(--bg); }
.alb-faces .muted { margin-left: 14px; }
.alb-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.alb-actions .btn { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.alb-progress { flex-basis: 100%; }
.alb-tip { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.alb-tip p { margin: 0; flex: 1 1 240px; font-size: .88rem; }
.alb-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; border-radius: 18px; overflow: hidden; }
@media (min-width: 821px) and (pointer: fine), (min-width: 821px) and (min-height: 501px) { .alb-photos { grid-template-columns: repeat(4, 1fr); } }
.alb-cell { position: relative; aspect-ratio: 1; background: var(--input); overflow: hidden; }
.alb-item { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.alb-item img, .alb-item video { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s var(--ease); }
.alb-item:hover img { transform: scale(1.04); }
.alb-play { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.alb-play .icon { width: 30px; height: 30px; fill: #fff; color: #fff; filter: drop-shadow(0 2px 8px rgba(0,0,0,.6)); }
.alb-by { position: absolute; left: 6px; bottom: 6px; padding: 2px 7px; border-radius: 999px; font-size: .64rem; font-weight: 700; color: #fff; background: rgba(0,0,0,.4); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); pointer-events: none; max-width: calc(100% - 12px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alb-del { position: absolute; top: 5px; right: 5px; width: 26px; height: 26px; border-radius: 50%; border: 0; display: grid; place-items: center; color: #fff; background: rgba(0,0,0,.45); cursor: pointer; opacity: 0; transition: opacity .15s; }
.alb-del .icon { width: 14px; height: 14px; }
.alb-cell:hover .alb-del { opacity: 1; }
@media (hover: none) { .alb-del { opacity: .85; } }
.alb-video-view { position: fixed; inset: 0; z-index: 500; display: grid; place-items: center; background: rgba(0,0,0,.92); padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); }
.alb-video-view video { max-width: 100%; max-height: 100%; }
.alb-video-x { position: absolute; top: calc(12px + env(safe-area-inset-top)); right: 12px; color: #fff; background: rgba(255,255,255,.14); }
.alb-peek { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; border-radius: 16px; overflow: hidden; margin-bottom: 14px; }
.alb-peek img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.album-new label { display: grid; gap: 4px; margin-bottom: 10px; }

/* ---------- 2.6: invites ---------- */
.invite-landing { text-align: center; }
.invite-hero-face { display: flex; justify-content: center; margin-bottom: 10px; }
.invite-hero-face .avatar { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 40%, transparent), 0 14px 34px -14px rgba(124,58,237,.8); }
.invite-card .invite-row { display: flex; gap: 8px; }
.invite-card .invite-row input { flex: 1; min-width: 0; font-size: .82rem; }

/* ---------- 2.6: memories ---------- */
.mem-card { position: relative; display: grid; gap: 8px; padding: 12px 14px; margin-bottom: 12px; border-radius: 20px; color: var(--text); text-decoration: none;
  border-color: color-mix(in srgb, #f59e0b 30%, var(--glass-border)); }
.mem-kicker { display: inline-flex; align-items: center; gap: 5px; font-size: .74rem; font-weight: 750; color: #f59e0b; }
.mem-kicker .icon { width: 13px; height: 13px; }
.mem-thumbs { display: flex; gap: 6px; }
.mem-thumbs img { width: 64px; height: 64px; object-fit: cover; border-radius: 12px; }
.mem-text { font-size: .9rem; color: var(--text-soft); }
.mem-x { position: absolute; top: 8px; right: 8px; }
.mem-year { display: grid; gap: 12px; margin-bottom: 18px; }

/* the composer's tool row scrolls sideways when there are more tools than room */
.ps-tools { overflow-x: auto; scrollbar-width: none; }
.ps-tools::-webkit-scrollbar { display: none; }
.ps-tools .ps-tool { flex: none; }

/* ==========================================================================
   2.7 — songs from youtube, soundcloud, deezer and other links
   ========================================================================== */
.ms-src-youtube { color: #ff3b30; background: color-mix(in srgb, #ff3b30 14%, transparent); }
.ms-src-soundcloud { color: #ff7a1a; background: color-mix(in srgb, #ff7a1a 15%, transparent); }
.ms-src-deezer { color: #a238ff; background: color-mix(in srgb, #a238ff 15%, transparent); }
.ms-src-web { color: var(--accent-ink); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.ms-services { display: flex; flex-wrap: wrap; gap: 5px; margin: 2px 0 10px; }
.ms-search-row { position: relative; }
.ms-paste { flex: none; display: inline-flex; align-items: center; gap: 5px; border: 0; border-radius: 999px; padding: 5px 10px; font: inherit; font-size: .74rem; font-weight: 700;
  color: var(--accent-ink); background: color-mix(in srgb, var(--accent) 14%, transparent); cursor: pointer; white-space: nowrap; }
.ms-paste .icon { width: 13px; height: 13px; }
.ms-paste[hidden] { display: none; }
/* the floating player with a youtube / soundcloud player tucked inside */
.pmusic-vid { display: none; width: 30px; height: 30px; flex: none; border: 0; border-radius: 50%; place-items: center; background: transparent; color: var(--muted); cursor: pointer; }
.pmusic-vid .icon { width: 16px; height: 16px; }
.pmusic.emb-youtube .pmusic-vid { display: grid; }
.pmusic.show-embed .pmusic-vid { color: var(--accent-ink); }
.pmusic.is-ctl-embed .pmusic-embed { height: 0; margin: -8px 0 0; transition: height .35s var(--ease), margin .35s var(--ease); position: relative; }
.pmusic.is-ctl-embed.show-embed .pmusic-embed { margin: 0; }
.pmusic.emb-youtube.show-embed .pmusic-embed { height: auto; aspect-ratio: 16 / 9; }
.pmusic.emb-soundcloud.show-embed .pmusic-embed { height: 120px; }
.pmusic.emb-youtube .pmusic-embed iframe { width: 100%; height: auto; aspect-ratio: 16 / 9; }
.pmusic.emb-soundcloud .pmusic-embed iframe { height: 120px; }
.pmusic.emb-deezer .pmusic-embed, .pmusic.emb-deezer .pmusic-embed iframe { height: 92px; }
.pmusic-embed-tip { display: none; margin: 0 0 6px; font-size: .72rem; font-weight: 700; color: var(--accent-ink); text-align: center; }
.pmusic.is-ctl-embed.needs-tap.show-embed .pmusic-embed-tip { display: block; }
.pmusic.needs-tap.show-embed .pmusic-embed { height: auto; }
.pmusic.emb-youtube.needs-tap.show-embed .pmusic-embed { aspect-ratio: auto; }

/* 2.7 — wallpaper packs */
.packs { margin: 18px 0 6px; padding-top: 16px; border-top: 1px solid var(--line); }
.packs-head { display: flex; align-items: center; gap: 8px; }
.packs-gem { width: 26px; height: 26px; border-radius: 9px; display: grid; place-items: center; color: #fff; background: var(--grad); box-shadow: 0 6px 16px -6px rgba(124,58,237,.8); }
.packs-gem .icon { width: 15px; height: 15px; }
.packs-excl { font-size: .62rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; color: #fff;
  background: linear-gradient(120deg, #f59e0b, #ec4899 50%, #8b5cf6); background-size: 200% 100%; animation: excl-shine 4s ease-in-out infinite; }
@keyframes excl-shine { 50% { background-position: 100% 0; } }
.packs-admin { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 10%, transparent); }
.packs-admin .icon { width: 15px; height: 15px; flex: none; }
.pack-list { display: grid; gap: 12px; margin-top: 10px; }
.pack { padding: 12px; border-radius: 22px; position: relative; overflow: hidden; }
.pack::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(135deg, rgba(255,255,255,.55), transparent 40%, transparent 60%, rgba(255,255,255,.25));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.pack-top { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; margin-bottom: 10px; }
.pack-title { flex: 1 1 210px; min-width: 0; display: grid; line-height: 1.3; }
.pack-title strong { font-size: 1rem; }
.pack-title small { color: var(--muted); font-size: .76rem; }
.pack-buy { white-space: nowrap; }
.pack-buy.is-busy { opacity: .7; pointer-events: none; }
.pack-owned { display: inline-flex; align-items: center; gap: 4px; font-size: .74rem; font-weight: 800; padding: 5px 10px; border-radius: 999px; color: #16a34a; background: color-mix(in srgb, #22c55e 16%, transparent); }
.pack-owned .icon { width: 13px; height: 13px; }
.pack-soon { font-size: .72rem; font-weight: 700; color: var(--muted); padding: 5px 10px; border-radius: 999px; background: var(--input); }
.pack-walls { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.pack-wall { display: grid; gap: 5px; justify-items: center; padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; position: relative; }
.pack-wall input { position: absolute; opacity: 0; pointer-events: none; }
.pw-img { position: relative; display: block; width: 100%; aspect-ratio: 3 / 4; border-radius: 14px; overflow: hidden; box-shadow: 0 8px 20px -12px rgba(0,0,0,.6);
  transition: transform .2s var(--ease), box-shadow .2s; outline: 2px solid transparent; outline-offset: 2px; }
.pw-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pack-wall small { font-size: .7rem; color: var(--muted); text-align: center; line-height: 1.2; }
.pack-wall:hover .pw-img { transform: translateY(-2px); }
.pack-wall input:checked + .pw-img, .pack-wall.is-trying .pw-img { outline-color: var(--accent); }
.pack-wall input:checked + .pw-img::after { content: "✓"; position: absolute; right: 6px; top: 6px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  font-size: .7rem; font-weight: 900; color: #fff; background: var(--accent); }
.pack-wall input:focus-visible + .pw-img { outline-color: var(--accent); }
.pw-lock { position: absolute; left: 50%; bottom: 7px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px;
  font-size: .64rem; font-weight: 800; color: #fff; background: rgba(0,0,0,.42); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); white-space: nowrap; }
.pw-lock .icon { width: 11px; height: 11px; }
.pack-wall.is-trying .pw-lock { background: var(--accent); }
.pack.just-got { animation: pack-got 1.6s var(--ease) 2; }
@keyframes pack-got { 30% { box-shadow: 0 0 0 3px var(--accent), 0 20px 50px -20px var(--accent); transform: scale(1.015); } }
.packs-foot { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: .72rem; }
.packs-foot .icon { width: 13px; height: 13px; }
.pack-try-bar { position: fixed; z-index: 60; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(440px, calc(100vw - 24px));
  display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 16px; border-radius: 20px; box-shadow: 0 18px 44px -16px rgba(0,0,0,.6); animation: rise .35s var(--ease); }
.pack-try-bar.out { opacity: 0; transform: translate(-50%, 20px); transition: .25s ease; }
.ptb-text { flex: 1; min-width: 0; display: grid; line-height: 1.25; }
.ptb-text small { font-size: .7rem; color: var(--muted); }
.ptb-text strong { font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 820px), (max-height: 500px) and (pointer: coarse) { .pack-try-bar { bottom: calc(84px + env(safe-area-inset-bottom)); } }
body.pack-trying .settings-section:not(#appearance) { opacity: .5; }
@media (max-width: 480px) { .pack-walls { gap: 6px; } .pack-buy { flex: 1 1 100%; } }
/* admin */
.setup-steps { margin: 6px 0 10px; padding-left: 20px; display: grid; gap: 6px; }
.setup-steps code, .copy-code { font-size: .74rem; padding: 1px 6px; border-radius: 6px; background: var(--input); word-break: break-all; }
.pill.ok { color: #16a34a; background: color-mix(in srgb, #22c55e 15%, transparent); }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.sales-list { display: grid; gap: 4px; margin-bottom: 10px; }
.sale-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: .84rem; padding: 6px 10px; border-radius: 12px; background: var(--input); }
.gift-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.gift-row input { flex: 1 1 160px; }
.check-row { display: flex !important; align-items: center; gap: 8px; align-self: end; padding-bottom: 10px; }
.check-row input { width: auto !important; }

/* ==========================================================================
   2.7 — status in messages
   ========================================================================== */
/* presence dots */
.pres-dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; background: #94a3b8; flex: none; }
.pres-online { background: #22c55e; }
.pres-available { background: #10b981; box-shadow: 0 0 0 2px color-mix(in srgb, #10b981 35%, transparent); }
.pres-busy { background: #ef4444; }
.pres-busy::after { content: ""; display: block; width: 55%; height: 2px; margin: 4.5px auto 0; border-radius: 2px; background: #fff; }
.pres-away { background: #f59e0b; }
.pres-offline { background: transparent; box-shadow: inset 0 0 0 2px #94a3b8; }
.dm-convo-av, .st-ring, .st-person-av, .st-card-who { position: relative; flex: none; }
.dm-convo-av > .pres-dot, .st-ring > .pres-dot, .st-person-av > .pres-dot, .st-card-who > .pres-dot {
  position: absolute; right: -1px; bottom: -1px; width: 13px; height: 13px; border: 2.5px solid var(--surface, #fff); box-sizing: content-box; }
html[data-theme="dark"] .dm-convo-av > .pres-dot, html[data-theme="dark"] .st-ring > .pres-dot, html[data-theme="dark"] .st-person-av > .pres-dot, html[data-theme="dark"] .st-card-who > .pres-dot { border-color: #14122a; }
.st-card-who > .pres-dot { left: 24px; right: auto; bottom: -1px; width: 10px; height: 10px; border-width: 2px; }
.pres-busy.pres-dot::after { margin-top: 5px; }
.pres-t-online, .pres-t-available { color: #16a34a; }
.pres-t-busy { color: #ef4444; }
.pres-t-away { color: #d97706; }
html[data-theme="dark"] .pres-t-online, html[data-theme="dark"] .pres-t-available { color: #4ade80; }
html[data-theme="dark"] .pres-t-away { color: #fbbf24; }
.dm-pres { display: flex; align-items: center; gap: 4px; font-size: .74rem; color: var(--muted); min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-pres > span { display: inline-flex; align-items: center; gap: 4px; }
.dm-pres .pres-dot { width: 8px; height: 8px; }
.dm-pres .pres-busy::after { width: 5px; height: 1.5px; margin-top: 3.2px; }
.dm-pres-st { overflow: hidden; text-overflow: ellipsis; color: var(--text-soft); display: inline !important; }

/* chats / status switch */
.dm-st-head { padding: 0 12px 4px; }
.dm-tabs { display: flex; width: 100%; padding: 4px; gap: 4px; }
.dm-tabs .seg-btn { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 10px; border: 0; border-radius: 999px; background: none;
  font: inherit; font-size: .86rem; font-weight: 700; color: var(--text-soft); cursor: pointer; transition: background-color .2s, color .2s; }
.dm-tabs .seg-btn .icon { width: 15px; height: 15px; }
.dm-tabs .seg-btn.is-on { background: var(--glass-strong); color: var(--text); box-shadow: 0 2px 10px -4px rgba(0,0,0,.25); }
.dm-tabs .dot-badge { position: static; margin-left: 2px; }
.ap-body > .dm-st-head { padding: 4px 4px 2px; }

/* the rail */
.st-rail { display: flex; gap: 12px; overflow-x: auto; padding: 10px 4px 8px; scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; }
.st-rail::-webkit-scrollbar { display: none; }
.st-bub { flex: none; width: 66px; display: grid; justify-items: center; gap: 4px; padding: 0; border: 0; background: none; color: var(--text); font: inherit; cursor: pointer; scroll-snap-align: start; position: relative; }
.st-bub small { font-size: .7rem; font-weight: 600; max-width: 66px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-soft); }
.st-ring { width: 60px; height: 60px; border-radius: 50%; padding: 3px; display: grid; place-items: center;
  background: conic-gradient(from 210deg, #f59e0b, #ec4899, #8b5cf6, #06b6d4, #f59e0b); transition: transform .2s var(--ease); }
.st-ring .avatar { width: 54px; height: 54px; border: 3px solid var(--surface, #fff); box-sizing: border-box; }
html[data-theme="dark"] .st-ring .avatar { border-color: #14122a; }
.st-ring.is-seen { background: var(--line); }
.st-me .st-ring:not(.is-seen) { background: transparent; }
.st-bub:active .st-ring { transform: scale(.94); }
.st-emo, .st-add { position: absolute; right: -3px; bottom: -3px; min-width: 24px; height: 24px; padding: 0 3px; border-radius: 999px; display: grid; place-items: center; font-size: .82rem; line-height: 1;
  background: var(--glass-strong); box-shadow: 0 2px 8px rgba(0,0,0,.25); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.st-emo .icon { width: 13px; height: 13px; }
.st-add { color: #fff; background: var(--grad); border: 2px solid var(--surface, #fff); }
.st-add .icon { width: 13px; height: 13px; stroke-width: 3; }
.st-pres-chip { position: absolute; top: -4px; left: 50%; transform: translateX(-50%); font-size: .56rem; font-weight: 800; letter-spacing: .02em; padding: 1px 6px; border-radius: 999px; color: #fff; background: #22c55e; white-space: nowrap; box-shadow: 0 2px 6px rgba(0,0,0,.2); }
.st-pres-chip.pres-busy { background: #ef4444; } .st-pres-chip.pres-away { background: #f59e0b; } .st-pres-chip.pres-offline { background: #64748b; } .st-pres-chip.pres-available { background: #10b981; }
.st-pres-chip.pres-busy::after { display: none; }
.st-rail-empty { align-self: center; max-width: 200px; margin: 0 0 14px; font-size: .74rem; line-height: 1.35; }

/* the status tab */
.dm-pane-status { padding: 0 12px 16px; }
.ap-body > .dm-pane-status { padding: 0 4px 12px; }
.st-feed { display: grid; gap: 10px; }
.st-h { font-size: .78rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin: 8px 4px 0; display: flex; gap: 6px; align-items: baseline; }
.st-mine { padding: 12px; border-radius: 20px; display: grid; gap: 10px; }
.st-mine-top { display: flex; align-items: center; gap: 10px; }
.st-mine-text { flex: 1; min-width: 0; display: grid; line-height: 1.3; }
.st-mine-text small { color: var(--muted); font-size: .76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-mine-text small .icon { width: 12px; height: 12px; vertical-align: -2px; }
.pres-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.pres-opt { position: relative; cursor: pointer; }
.pres-opt input { position: absolute; opacity: 0; pointer-events: none; }
.pres-opt span { display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border-radius: 999px; font-size: .8rem; font-weight: 700; color: var(--text-soft);
  background: var(--input); border: 1px solid var(--input-border); transition: all .2s; }
.pres-opt .pres-dot { width: 9px; height: 9px; }
.pres-opt .pres-busy::after { width: 5px; margin-top: 3.5px; }
.pres-opt input:checked + span { color: var(--text); background: var(--glass-strong); border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.pres-opt input:focus-visible + span { box-shadow: var(--focus); }
.pres-desc { margin: -2px 2px 0; font-size: .74rem; }
.st-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 10px; }
.st-card { border-radius: 20px; overflow: hidden; display: flex; flex-direction: column; cursor: pointer; transition: transform .2s var(--ease); --sh: 260; }
.st-card:hover { transform: translateY(-2px); }
.st-card:focus-visible { box-shadow: var(--focus); outline: 0; }
.st-card-img { display: block; aspect-ratio: 16 / 10; max-height: 210px; overflow: hidden; }
.st-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.st-card-emo { display: grid; place-items: center; height: 96px; font-size: 2.6rem;
  background: radial-gradient(120% 120% at 20% 10%, hsl(var(--sh) 85% 72% / .9), hsl(calc(var(--sh) + 50) 80% 58% / .85) 60%, hsl(calc(var(--sh) + 100) 75% 50% / .8)); }
.st-card-body { padding: 10px 12px 12px; display: grid; gap: 8px; }
.st-card-who { display: flex; align-items: center; gap: 8px; }
.st-card-who > span { flex: 1; min-width: 0; display: grid; line-height: 1.25; }
.st-card-who strong { font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-card-who small { font-size: .7rem; color: var(--muted); }
.st-new-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--grad); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.st-card-text { font-size: .95rem; line-height: 1.35; font-weight: 600; overflow-wrap: anywhere; }
.st-card.is-seen { opacity: .86; }
.st-card-rx { display: flex; align-items: center; gap: 4px; }
.st-qrx { width: 34px; height: 34px; border: 0; border-radius: 50%; display: grid; place-items: center; font-size: 1.05rem; background: var(--input); cursor: pointer; transition: transform .15s; }
.st-qrx:active, .st-qrx.pop { transform: scale(1.25); }
.st-qreply { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; border: 0; border-radius: 999px; padding: 7px 12px; font: inherit; font-size: .78rem; font-weight: 700;
  color: var(--accent-ink); background: color-mix(in srgb, var(--accent) 13%, transparent); cursor: pointer; }
.st-qreply .icon { width: 14px; height: 14px; }
.st-empty { padding: 18px; border-radius: 20px; display: flex; align-items: center; gap: 14px; }
.st-empty-art { width: 46px; height: 46px; border-radius: 16px; display: grid; place-items: center; color: #fff; background: var(--grad); flex: none; }
.st-empty p { font-size: .9rem; line-height: 1.4; }
.st-none { margin: 0 4px; }
.st-around { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 6px; }
.st-person { display: grid; justify-items: center; gap: 3px; padding: 8px 4px; border-radius: 16px; color: var(--text); text-align: center; }
.st-person:hover { background: var(--glass-hover); text-decoration: none; }
.st-person small { font-size: .74rem; font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-person-p { font-size: .64rem; font-weight: 700; }

/* the share sheet */
.st-sheet-bd { z-index: 126; }
.st-sheet { text-align: left; justify-items: stretch; gap: 12px; }
.st-sheet-head { display: flex; align-items: center; justify-content: space-between; }
.st-sheet .sheet-grab { justify-self: center; width: 40px; height: 5px; border-radius: 99px; background: var(--line); }
.st-compose { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 20px; background: var(--input); border: 1px solid var(--input-border); }
.st-compose:focus-within { border-color: var(--accent); }
.st-emoji-btn { width: 46px; height: 46px; border-radius: 15px; border: 0; font-size: 1.5rem; display: grid; place-items: center; cursor: pointer; background: var(--glass-strong); box-shadow: 0 2px 8px rgba(0,0,0,.12); flex: none; }
.st-compose input[type=text] { flex: 1; min-width: 0; border: 0 !important; background: transparent !important; box-shadow: none !important; padding: 10px 0 !important; font-size: 1rem; font-weight: 600; }
.st-count { font-size: .72rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.st-emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; padding: 8px; border-radius: 16px; background: var(--input); }
.st-emoji-grid[hidden] { display: none; }
.st-emoji-grid button { aspect-ratio: 1; border: 0; border-radius: 10px; background: none; font-size: 1.3rem; cursor: pointer; }
.st-emoji-grid button:hover { background: var(--glass-hover); }
.st-suggest { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -22px; padding: 0 22px; }
.st-suggest::-webkit-scrollbar { display: none; }
.st-chip { flex: none; border: 1px solid var(--input-border); border-radius: 999px; padding: 6px 11px; font: inherit; font-size: .78rem; font-weight: 600; background: var(--input); color: var(--text-soft); cursor: pointer; white-space: nowrap; }
.st-chip:active { transform: scale(.96); }
.st-selfie-row { display: flex; align-items: center; gap: 8px; }
.st-selfie-btn { flex: 1; display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 18px; cursor: pointer; border: 1px dashed var(--input-border); }
.st-selfie-btn:hover { background: var(--glass-hover); }
.st-selfie-btn > span:last-child { display: grid; line-height: 1.3; }
.st-selfie-btn small { font-size: .72rem; }
.st-selfie-thumb { width: 52px; height: 52px; border-radius: 14px; overflow: hidden; display: grid; place-items: center; color: #fff; background: var(--grad); flex: none; }
.st-selfie-thumb img { width: 100%; height: 100%; object-fit: cover; transform: scaleX(1); }
.st-selfie-thumb .icon { width: 22px; height: 22px; }
.st-clear-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.st-hours label span { padding: 6px 12px; }
.st-actions { display: flex; gap: 8px; justify-content: flex-end; }
.st-actions .btn-primary { flex: 1; max-width: 260px; }
.st-actions [hidden] { display: none; }

/* the viewer */
.st-viewer { position: fixed; inset: 0; z-index: 125; display: grid; grid-template-rows: auto auto 1fr auto; background: #07060f; color: #fff;
  padding: calc(env(safe-area-inset-top) + 8px) 0 calc(env(safe-area-inset-bottom) + 10px); opacity: 0; transform: scale(.98); transition: opacity .22s ease, transform .22s var(--ease); --sh: 260; }
.st-viewer.open { opacity: 1; transform: none; }
.st-viewer[hidden] { display: none; }
.st-viewer::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(90% 60% at 50% 30%, hsl(var(--sh) 80% 45% / .55), transparent 70%), #07060f; }
.st-viewer > * { width: 100%; max-width: 520px; margin: 0 auto; }
.stv-bars { display: flex; gap: 4px; padding: 0 12px; }
.stv-bars span { flex: 1; height: 3px; border-radius: 3px; background: rgba(255,255,255,.28); overflow: hidden; }
.stv-bars span i { display: block; height: 100%; background: #fff; transform-origin: left; transform: scaleX(0); }
.stv-bars span.done i { transform: scaleX(1); }
.stv-bars span.on i { animation: stv-fill linear forwards; }
.st-viewer.is-paused .stv-bars span.on i { animation-play-state: paused; }
@keyframes stv-fill { to { transform: scaleX(1); } }
.stv-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.stv-who { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; color: #fff; }
.stv-who:hover { text-decoration: none; }
.stv-who > span { display: grid; line-height: 1.25; min-width: 0; }
.stv-who strong { font-size: .95rem; }
.stv-who small { font-size: .74rem; color: rgba(255,255,255,.7); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stv-x { width: 40px; height: 40px; border: 0; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(255,255,255,.12); cursor: pointer; }
.stv-x .icon { width: 20px; height: 20px; }
.stv-stage { position: relative; min-height: 0; display: grid; place-items: center; padding: 6px 12px; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.stv-img { width: 100%; height: 100%; max-height: 100%; object-fit: cover; border-radius: 22px; box-shadow: 0 30px 70px -30px rgba(0,0,0,.8); }
.stv-cap { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); max-width: calc(100% - 60px); padding: 10px 16px; border-radius: 18px; font-size: 1.05rem; font-weight: 700; text-align: center;
  background: rgba(10,8,25,.45); -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4); border: 1px solid rgba(255,255,255,.18); overflow-wrap: anywhere; }
.stv-card { width: 100%; height: 100%; max-height: 640px; border-radius: 28px; display: grid; place-content: center; justify-items: center; gap: 18px; padding: 30px; text-align: center;
  background: radial-gradient(120% 90% at 15% 10%, hsl(var(--sh) 85% 66%), hsl(calc(var(--sh) + 45) 80% 52%) 55%, hsl(calc(var(--sh) + 95) 75% 40%));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 30px 70px -30px rgba(0,0,0,.8); }
.stv-emo { font-size: 5.2rem; line-height: 1; filter: drop-shadow(0 10px 24px rgba(0,0,0,.25)); animation: stv-emo .5s var(--ease); }
@keyframes stv-emo { from { transform: scale(.5) rotate(-12deg); opacity: 0; } }
.stv-text { font-size: 1.6rem; font-weight: 800; line-height: 1.2; text-shadow: 0 2px 14px rgba(0,0,0,.2); overflow-wrap: anywhere; }
.stv-nav { position: absolute; top: 90px; bottom: 120px; width: 30%; border: 0; background: none; cursor: pointer; z-index: 1; -webkit-tap-highlight-color: transparent; }
.stv-prev { left: 0; } .stv-next { right: 0; width: 45%; }
@media (min-width: 700px) { .stv-prev { left: calc(50% - 360px); width: 100px; } .stv-next { right: calc(50% - 360px); width: 100px; } .stv-nav::after { content: "‹"; font-size: 2.4rem; color: rgba(255,255,255,.6); } .stv-next::after { content: "›"; } }
.stv-foot, .stv-mine { position: relative; z-index: 2; display: grid; gap: 10px; padding: 8px 12px 0; }
.stv-foot[hidden], .stv-mine[hidden] { display: none; }
.stv-rx { display: flex; justify-content: center; gap: 8px; }
.stv-rx button { width: 44px; height: 44px; border: 0; border-radius: 50%; font-size: 1.35rem; background: rgba(255,255,255,.1); cursor: pointer; transition: transform .15s var(--ease); }
.stv-rx button:hover { background: rgba(255,255,255,.18); }
.stv-rx button:active, .stv-rx button.pop { transform: scale(1.3); }
.stv-reply { display: flex; gap: 8px; align-items: center; }
.stv-reply input { flex: 1; min-width: 0; padding: 12px 16px !important; border-radius: 999px !important; color: #fff !important; background: rgba(255,255,255,.1) !important; border: 1px solid rgba(255,255,255,.22) !important; }
.stv-reply input::placeholder { color: rgba(255,255,255,.6); }
.stv-mine { grid-template-columns: 1fr auto; align-items: center; }
.stv-seen { display: inline-flex; align-items: center; gap: 6px; border: 0; background: rgba(255,255,255,.1); color: #fff; padding: 9px 14px; border-radius: 999px; font: inherit; font-size: .84rem; font-weight: 700; cursor: pointer; justify-self: start; }
.stv-seen .icon { width: 16px; height: 16px; }
.stv-mine-btns { display: flex; gap: 6px; }
.stv-mine .btn-ghost { color: #fff; background: rgba(255,255,255,.1); }
.stv-viewers { grid-column: 1 / -1; max-height: 40vh; overflow-y: auto; display: grid; gap: 6px; padding: 10px; border-radius: 18px; background: rgba(255,255,255,.08); }
.stv-viewers[hidden] { display: none; }
.stv-viewer { display: flex; align-items: center; gap: 10px; }
.stv-viewer > span:nth-child(2) { flex: 1; display: grid; line-height: 1.25; }
.stv-viewer small { color: rgba(255,255,255,.6); font-size: .72rem; }
.stv-vrx { font-size: 1.2rem; }
.stv-burst { position: absolute; left: 50%; top: 50%; font-size: 4rem; transform: translate(-50%, -50%); animation: stv-burst .9s var(--ease) forwards; pointer-events: none; }
@keyframes stv-burst { 0% { transform: translate(-50%, -50%) scale(.3); opacity: 0; } 30% { transform: translate(-50%, -60%) scale(1.3); opacity: 1; } 100% { transform: translate(-50%, -150%) scale(1); opacity: 0; } }

/* a reply to a status, in the chat */
.msg-stq { display: flex; align-items: center; gap: 8px; max-width: 78%; margin: 0 0 3px; padding: 6px 10px 6px 6px; border-radius: 14px; background: var(--input); border-left: 3px solid var(--accent); font-size: .76rem; }
.msg-out .msg-stq { margin-left: auto; }
.msg-stq-art { width: 34px; height: 44px; border-radius: 9px; overflow: hidden; display: grid; place-items: center; font-size: 1.1rem; background: var(--grad-soft); flex: none; }
.msg-stq-art img { width: 100%; height: 100%; object-fit: cover; }
.msg-stq-text { display: grid; line-height: 1.3; min-width: 0; }
.msg-stq-text small { color: var(--muted); font-size: .68rem; }
.msg-stq-text span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }

/* ==========================================================================
   2.8 — no news or politics
   ========================================================================== */
.topic-rule { display: flex; align-items: center; gap: 7px; margin: 2px 2px 0; font-size: .74rem; font-weight: 600; color: var(--muted); }
.topic-rule .icon { width: 14px; height: 14px; flex: none; color: var(--accent-ink); }
.post-sheet:is(.is-reply, .is-chat) .topic-rule { display: none; }
.review-intro { display: flex; gap: 8px; align-items: flex-start; margin: 0 4px 12px; line-height: 1.45; }
.review-intro .icon { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.held-item .report-head { flex-wrap: wrap; gap: 8px; }
.held-why { flex: 1 1 200px; }
.held-item .pill .icon { width: 12px; height: 12px; margin-right: 4px; }
.gd-actions:has(> :only-child) { justify-content: stretch; }
.gd-actions > .btn:only-child { flex: 1; }

/* ==========================================================================
   2.8 — clear glass: as see-through as glass gets. Light or dark text is
   picked from the wallpaper's brightness (yours, or the profile you visit),
   and text carries a soft shadow so it reads over any picture.
   ========================================================================== */
.theme-toggle .ti-clear { display: none; }
:root[data-theme-pref="clear"] .theme-toggle .ti-clear { display: grid; }
.tc-clear .tc-preview { background: linear-gradient(135deg, #7c3aed, #06b6d4 60%, #ec4899); }
.tc-clear .tc-preview i { background: rgba(255,255,255,.16); box-shadow: inset 0 0 0 1px rgba(255,255,255,.55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
:root:root[data-skin="clear"][data-theme="dark"] {
  --glass: rgba(255,255,255,.035); --glass-strong: rgba(255,255,255,.07); --glass-hover: rgba(255,255,255,.1);
  --glass-border: rgba(255,255,255,.3); --glass-edge: rgba(255,255,255,.08);
  --glass-shadow: inset 0 1px 0 rgba(255,255,255,.35), inset 0 0 0 1px rgba(255,255,255,.04), 0 18px 40px -24px rgba(0,0,0,.55);
  --input: rgba(255,255,255,.08); --input-border: rgba(255,255,255,.28);
  --text: #ffffff; --text-soft: rgba(255,255,255,.9); --muted: rgba(255,255,255,.74); --line: rgba(255,255,255,.18);
  --blur: 6px; --clear-shadow: 0 1px 2px rgba(0,0,0,.55), 0 0 14px rgba(0,0,0,.35);
}
:root:root[data-skin="clear"][data-theme="light"] {
  --glass: rgba(255,255,255,.1); --glass-strong: rgba(255,255,255,.22); --glass-hover: rgba(255,255,255,.3);
  --glass-border: rgba(255,255,255,.7); --glass-edge: rgba(255,255,255,.3);
  --glass-shadow: inset 0 1px 0 rgba(255,255,255,.85), 0 18px 40px -24px rgba(30,20,80,.3);
  --input: rgba(255,255,255,.28); --input-border: rgba(255,255,255,.75);
  --text: #0c0c1c; --text-soft: rgba(12,12,28,.86); --muted: rgba(12,12,28,.66); --line: rgba(12,12,28,.12);
  --blur: 6px; --clear-shadow: 0 1px 2px rgba(255,255,255,.7), 0 0 14px rgba(255,255,255,.55);
}
:root[data-skin="clear"] :is(.glass, .glass-strong, .post.glass, .topbar, .tabbar, .sidebar-inner, .panel) {
  -webkit-backdrop-filter: blur(6px) saturate(140%); backdrop-filter: blur(6px) saturate(140%);
}
:root[data-skin="clear"] :is(.glass, .glass-strong) { background-image: linear-gradient(var(--surf-tint, transparent), var(--surf-tint, transparent)), linear-gradient(135deg, rgba(255,255,255,.14), rgba(255,255,255,0) 45%); }
:root[data-skin="clear"] .topbar { background: rgba(255,255,255,.04); }
:root[data-skin="clear"][data-theme="light"] .topbar { background: rgba(255,255,255,.18); }
:root[data-skin="clear"] .tabbar { background: rgba(255,255,255,.06); }
:root[data-skin="clear"][data-theme="light"] .tabbar { background: rgba(255,255,255,.24); }
/* text that sits on see-through glass gets a soft halo in the opposite tone */
:root[data-skin="clear"] body { text-shadow: var(--clear-shadow); }
:root[data-skin="clear"] :is(.btn-primary, .pill, .badge, .dot-badge, .st-pres-chip, .packs-excl, input, textarea, select, .msg-out .msg-bubble, img, video, iframe, .stv-stage, .st-viewer) { text-shadow: none; }
/* sheets, menus and panels you read for a while stay a little frostier */
:root[data-skin="clear"][data-theme="dark"] :is(.sheet, .menu, .app-panel, .drawer, .gd) { background: rgba(14,14,28,.55); -webkit-backdrop-filter: blur(22px) saturate(160%); backdrop-filter: blur(22px) saturate(160%); }
:root[data-skin="clear"][data-theme="light"] :is(.sheet, .menu, .app-panel, .drawer, .gd) { background: rgba(255,255,255,.6); -webkit-backdrop-filter: blur(22px) saturate(160%); backdrop-filter: blur(22px) saturate(160%); }
:root[data-skin="clear"] .msg-in .msg-bubble { background: rgba(255,255,255,.12); }
:root[data-skin="clear"][data-theme="light"] .msg-in .msg-bubble { background: rgba(255,255,255,.45); }

/* ==========================================================================
   2.8.1 — posts with several photos / videos: swipe through them
   ========================================================================== */
.pm-carousel { position: relative; display: block; background: #000; touch-action: pan-y pinch-zoom; }
.pmc-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; aspect-ratio: 4 / 5; max-height: 620px; }
.pmc-track::-webkit-scrollbar { display: none; }
.pmc-track > .pm-item { flex: 0 0 100%; width: 100%; height: 100%; scroll-snap-align: center; scroll-snap-stop: always; display: grid; place-items: center; background: #000; }
.pmc-track > .pm-item img { width: 100%; height: 100%; object-fit: cover; }
.pmc-track > .pm-item.pm-video video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.pm-carousel .pm-item:hover img { transform: none; }
.pmc-count { position: absolute; top: 10px; right: 10px; z-index: 2; padding: 3px 9px; border-radius: 999px; font-size: .72rem; font-weight: 800; color: #fff;
  background: rgba(0,0,0,.45); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); font-variant-numeric: tabular-nums; pointer-events: none; text-shadow: none; }
.pmc-dots { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); z-index: 2; display: flex; gap: 5px; padding: 5px 8px; border-radius: 999px;
  background: rgba(0,0,0,.3); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); pointer-events: none; max-width: 80%; overflow: hidden; }
.pmc-dots i { width: 6px; height: 6px; flex: none; border-radius: 50%; background: rgba(255,255,255,.5); transition: transform .2s, background-color .2s; }
.pmc-dots i.on { background: #fff; transform: scale(1.25); }
.pm-carousel:has(.pm-video) .pmc-dots { bottom: auto; top: 12px; }
.pmc-nav { position: absolute; top: 50%; z-index: 2; width: 36px; height: 36px; margin-top: -18px; border: 0; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  color: #111; background: rgba(255,255,255,.85); box-shadow: 0 4px 14px rgba(0,0,0,.3); opacity: 0; transition: opacity .2s; }
.pmc-nav .icon { width: 18px; height: 18px; }
.pmc-prev { left: 10px; } .pmc-next { right: 10px; } .pmc-next .icon { transform: scaleX(-1); }
.pmc-nav[hidden] { display: none; }
@media (hover: hover) and (pointer: fine) { .pm-carousel:hover .pmc-nav { opacity: 1; } }
.comment-bubble .pm-carousel .pmc-track { max-height: 360px; }
/* the photo viewer, with several photos */
.lb-nav { position: absolute; top: 50%; z-index: 3; width: 44px; height: 44px; margin-top: -22px; border: 0; border-radius: 50%; display: grid; place-items: center; cursor: pointer; color: #fff; background: rgba(255,255,255,.14); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.lb-nav .icon { width: 22px; height: 22px; }
.lb-prev { left: 12px; } .lb-next { right: 12px; } .lb-next .icon { transform: scaleX(-1); }
.lb-nav[hidden] { display: none; }
.lightbox.hide-ui .lb-nav { opacity: 0; pointer-events: none; }
@media (hover: none) { .lb-nav { display: none; } }

/* 2.8.2 — a youtube song plays in a small video where the album art goes (no big box) */
.pmusic.emb-youtube .pmusic-embed, .pmusic.emb-youtube.show-embed .pmusic-embed, .pmusic.emb-youtube.needs-tap.show-embed .pmusic-embed {
  order: -1; flex: 0 0 112px; width: 112px; height: 63px !important; aspect-ratio: auto !important; margin: 0 !important; border-radius: 12px; overflow: hidden; background: #000; }
.pmusic.emb-youtube .pmusic-embed iframe { width: 112px !important; height: 63px !important; aspect-ratio: auto !important; }
.pmusic.emb-youtube .pmusic-art, .pmusic.emb-youtube .pmusic-vid, .pmusic.emb-youtube .pmusic-embed-tip { display: none !important; }
.pmusic.emb-youtube { flex-wrap: nowrap; }
.pmusic.emb-youtube.needs-tap .pmusic-embed { box-shadow: 0 0 0 2px var(--accent); animation: pm-pulse 1.6s ease-in-out infinite; }

/* 2.8.3 — page titles that use gradient letters stay readable on wallpapers (the glass pill used to replace the gradient that colors the letters) */
:root[data-wall]:not([data-wall="glassay"]):not([data-wall="plain"]) .page-head h1.grad-text,
:root[data-wall]:not([data-wall="glassay"]):not([data-wall="plain"]) .page-head .grad-text {
  color: var(--text); -webkit-text-fill-color: currentColor; background: var(--glass-strong); -webkit-background-clip: border-box; background-clip: border-box;
}
.page-head h1 { white-space: nowrap; }
.page-head:has(> p) { flex-wrap: wrap; }
.page-head > p { flex-basis: 100%; margin: 0 0 0 4px; }

/* 2.8.4 — editing a poll */
.poll-edit-note { margin: 4px 2px 8px; font-size: .74rem; }
.poll-length .pl-keep span { border-style: dashed; }
.review-intro > span { flex: 1; min-width: 0; }
/* admin and other tab rows: never wider than the screen — they scroll sideways instead */
.tabs { max-width: 100%; min-width: 0; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.tabs::-webkit-scrollbar { display: none; }
.tabs .tab { flex: 1 0 auto; white-space: nowrap; }
main > * { min-width: 0; max-width: 100%; }

/* 2.9.2 — home-screen app: the dock sits lower, just above the iPhone's home bar
   (in the browser it stays where it was, above Safari's own toolbar) */
@media (max-width: 820px) and (display-mode: standalone), (max-height: 500px) and (pointer: coarse) and (display-mode: standalone) {
  :root { --dock-b: max(10px, calc(env(safe-area-inset-bottom) - 12px)); }
}
@media (max-width: 820px), (max-height: 500px) and (pointer: coarse) {
  :root.is-standalone { --dock-b: max(10px, calc(env(safe-area-inset-bottom) - 12px)); }
  .tabbar, .customize-actions { bottom: var(--dock-b, calc(12px + env(safe-area-inset-bottom))); }
  .shell, .shell.no-right { padding-bottom: calc(84px + var(--dock-b, calc(12px + env(safe-area-inset-bottom)))); }
  .dm { height: calc(100dvh - 76px - 84px - env(safe-area-inset-top) - var(--dock-b, calc(12px + env(safe-area-inset-bottom)))); }
  body.ap-open .ap-body { padding-bottom: calc(88px + var(--dock-b, calc(12px + env(safe-area-inset-bottom)))); }
  .install-banner { bottom: calc(88px + var(--dock-b, calc(12px + env(safe-area-inset-bottom)))); }
}

/* 2.10 — profile posts */
.post-meta:has(.pp-to) { grid-template-columns: auto 1fr; column-gap: 6px; align-items: baseline; }
.post-meta:has(.pp-to) .post-sub { grid-column: 1 / -1; }
.pp-to { display: inline-flex; align-items: baseline; gap: 6px; min-width: 0; font-weight: 700; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pp-to a { color: var(--text); text-decoration: none; overflow: hidden; text-overflow: ellipsis; }
.pp-to a:hover { text-decoration: underline; }
.pp-arrow { color: var(--accent, #a78bfa); font-size: .8em; }
.pp-pending { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin: -4px -4px 12px; padding: 10px 12px; border-radius: 14px; font-size: .84rem; font-weight: 600;
  background: color-mix(in srgb, var(--accent, #a78bfa) 16%, transparent); border: 1px solid color-mix(in srgb, var(--accent, #a78bfa) 38%, transparent); }
.pp-pending > span:first-child { display: inline-flex; align-items: center; gap: 6px; }
.pp-pending .icon { width: 16px; height: 16px; flex: none; }
.pp-pending.is-waiting { background: var(--glass); border-color: var(--glass-border); color: var(--muted); }
.pp-pending-acts { display: flex; gap: 6px; margin-left: auto; }
.post.is-pp-pending { outline: 1px dashed color-mix(in srgb, var(--accent, #a78bfa) 50%, transparent); outline-offset: -1px; }
.pp-composer { margin-bottom: 14px; }
.pp-hint { display: flex; align-items: center; gap: 6px; margin: 8px 2px 0; }
.pp-hint .icon { width: 14px; height: 14px; }
.pp-waiting-note { margin: 0 0 14px; padding: 10px 14px; border-radius: 16px; font-size: .86rem; font-weight: 600; line-height: 1.45; }
.pp-waiting-note .icon { width: 16px; height: 16px; vertical-align: -3px; margin-right: 4px; }
.pp-waiting { display: inline-flex; align-items: center; gap: 6px; margin: 4px 0 10px; text-decoration: none; }
.pp-waiting .icon { width: 14px; height: 14px; }
.pp-who { border: 0; padding: 0; margin: 4px 0 6px; display: grid; gap: 8px; }
.pp-who legend { font-weight: 700; margin-bottom: 6px; padding: 0; }
.pp-opt { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--glass-border); background: var(--glass); cursor: pointer; transition: border-color .2s, box-shadow .2s; }
.pp-opt:has(input:checked) { border-color: var(--accent, #a78bfa); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent, #a78bfa) 22%, transparent); }
.pp-opt input { accent-color: var(--accent, #a78bfa); width: 18px; height: 18px; flex: none; }
.pp-opt span { display: grid; gap: 2px; }
.pp-opt small { color: var(--muted); font-size: .8rem; }

/* 2.10.1 — everything that floats above the dock follows it down in the home-screen app */
@media (max-width: 820px), (max-height: 500px) and (pointer: coarse) {
  .pmusic { bottom: calc(68px + var(--dock-b, calc(12px + env(safe-area-inset-bottom)))); }
  body.dock-away .pmusic { transform: translate3d(-50%, calc(100% + 98px + var(--dock-b, calc(12px + env(safe-area-inset-bottom)))), 0); }
  .voice-dock { bottom: calc(84px + var(--dock-b, calc(12px + env(safe-area-inset-bottom)))); }
  .pack-try-bar { bottom: calc(72px + var(--dock-b, calc(12px + env(safe-area-inset-bottom)))); }
  body.page-videos { --vs-bottom: calc(68px + var(--dock-b, calc(12px + env(safe-area-inset-bottom)))); }
}

/* 2.11 — read receipts, typing dots, replies */
.msg-receipt { align-self: flex-end; margin: -2px 6px 4px 0; font-size: .7rem; font-weight: 650; color: var(--muted); letter-spacing: .01em; animation: rise .25s var(--ease); }
.msg-receipt.is-seen { color: var(--accent, #a78bfa); }
.msg-typing { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; margin: 2px 0 4px; animation: rise .25s var(--ease); }
.mt-dots { display: inline-flex; gap: 4px; padding: 11px 14px; border-radius: 18px; border-bottom-left-radius: 6px; background: var(--glass-strong); border: 1px solid var(--glass-border); }
.mt-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: mt-bounce 1.2s infinite ease-in-out; }
.mt-dots i:nth-child(2) { animation-delay: .15s; }
.mt-dots i:nth-child(3) { animation-delay: .3s; }
.msg-typing small { color: var(--muted); font-size: .72rem; font-weight: 600; }
@keyframes mt-bounce { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-4px); opacity: 1; } }

.msg-quote { display: grid; gap: 1px; max-width: 100%; margin: 0 0 -6px; padding: 7px 12px 12px; border: 0; border-radius: 14px 14px 6px 6px; text-align: left; font: inherit; cursor: pointer;
  background: color-mix(in srgb, var(--text) 8%, transparent); border-left: 3px solid var(--accent, #a78bfa); color: var(--text); opacity: .92; }
.msg-out .msg-quote { align-self: flex-end; }
.msg-in .msg-quote { align-self: flex-start; }
.mq-who { font-size: .7rem; font-weight: 800; color: var(--accent, #a78bfa); }
.mq-text { font-size: .8rem; color: var(--muted); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.msg-quote.is-gone { cursor: default; font-style: italic; }
.msg-quote.is-gone .icon { width: 12px; height: 12px; vertical-align: -1px; }
.msg-flash .msg-bubble { animation: msg-flash 1.2s ease; }
@keyframes msg-flash { 0%, 100% { box-shadow: none; } 25%, 60% { box-shadow: 0 0 0 3px var(--accent, #a78bfa); } }

.reply-bar { display: flex; align-items: center; gap: 10px; margin: 0 10px 6px; padding: 8px 8px 8px 12px; border-radius: 16px; background: var(--glass-strong); border: 1px solid var(--glass-border); border-left: 3px solid var(--accent, #a78bfa); animation: rise .2s var(--ease); }
.rb-ic { font-size: 1.05rem; color: var(--accent, #a78bfa); }
.rb-text { flex: 1; min-width: 0; display: grid; }
.rb-text b { font-size: .78rem; font-weight: 800; }
.rb-text small { font-size: .78rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rb-x { width: 30px; height: 30px; font-size: .9rem; flex: none; }

/* swipe right to reply: a little arrow appears behind the bubble */
.msg.is-reply-drag::before { content: "↩"; position: absolute; left: 4px; top: 50%; transform: translateY(-50%) scale(.6); opacity: 0; font-size: 1.1rem; color: var(--accent, #a78bfa); transition: transform .15s, opacity .15s; }
.msg.is-reply-drag.reply-armed::before { transform: translateY(-50%) scale(1); opacity: 1; }
.rp-reply span { font-size: 1.45rem; color: var(--accent, #a78bfa); font-weight: 800; }

/* 2.11 — journal */
.jr-kicker { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; margin: 0 0 6px; font-size: .74rem; font-weight: 700; color: var(--accent, #a78bfa); letter-spacing: .02em; }
.jr-kicker .icon { width: 14px; height: 14px; }
.jr-friends { display: inline-flex; align-items: center; gap: 3px; color: var(--muted); }
.jr-friends .icon { width: 12px; height: 12px; }
.jr-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; margin: 6px 0 2px; font-size: .8rem; color: var(--text-soft, var(--muted)); }
.jr-meta > span { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 99px; background: var(--glass); border: 1px solid var(--glass-border); }
.jr-meta b { font-weight: 700; color: var(--muted); font-size: .72rem; }
.jr-meta .icon { width: 13px; height: 13px; }
/* the card in feeds */
.jr-card { display: grid; grid-template-columns: 1fr; gap: 0; margin: 10px 0 4px; border-radius: 18px; overflow: hidden; text-decoration: none; color: var(--text); background: color-mix(in srgb, var(--text) 4%, transparent); border: 1px solid var(--glass-border); transition: transform .2s var(--ease), box-shadow .2s; }
.jr-card:hover { transform: translateY(-1px); box-shadow: 0 12px 30px -18px rgba(0,0,0,.5); }
.jr-card-cover { display: block; aspect-ratio: 2.2 / 1; overflow: hidden; }
.jr-card-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.jr-card-text { display: grid; gap: 4px; padding: 14px 16px 14px; }
.jr-card .jr-title { font-size: 1.22rem; font-weight: 800; line-height: 1.25; letter-spacing: -.01em; }
.jr-excerpt { color: var(--text-soft, var(--muted)); font-size: .92rem; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.jr-more { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; font-size: .84rem; font-weight: 750; color: var(--accent, #a78bfa); }
.jr-more .icon { width: 14px; height: 14px; }
/* the entry page */
.jr-page { max-width: 720px; margin: 0 auto; }
.jr-page .post { padding: 18px 20px 10px; }
.jr-entry { margin: 14px 0 8px; }
.jr-cover { margin: 0 -20px 16px; aspect-ratio: 2 / 1; overflow: hidden; cursor: zoom-in; }
.jr-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.jr-entry .jr-title { margin: 2px 0 6px; font-size: clamp(1.6rem, 6vw, 2.2rem); font-weight: 850; line-height: 1.15; letter-spacing: -.02em; }
.jr-body { margin-top: 16px; font-size: 1.06rem; line-height: 1.75; overflow-wrap: anywhere; color: var(--text); }
.jr-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.jr-nav a { display: grid; gap: 2px; padding: 12px 14px; border-radius: 16px; text-decoration: none; color: var(--text); min-width: 0; }
.jr-nav a small { color: var(--muted); font-size: .72rem; font-weight: 700; }
.jr-nav a span { font-weight: 750; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jr-nav .jr-older { text-align: right; grid-column: 2; }
/* profile box */
.jr-list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 2px; }
.jr-list a { display: grid; gap: 1px; padding: 9px 10px; margin: 0 -10px; border-radius: 12px; text-decoration: none; color: var(--text); }
.jr-list a:hover { background: var(--glass); }
.jr-list strong { font-weight: 750; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jr-list small { color: var(--muted); font-size: .76rem; }
.jr-write { width: 100%; justify-content: center; }
/* editor */
.jr-editor { display: grid; gap: 12px; max-width: 760px; margin: 0 auto; }
.jr-in-title { font-size: 1.4rem !important; font-weight: 800; padding: 12px 14px !important; }
.jr-in-body { min-height: 300px; font-size: 1.02rem !important; line-height: 1.7; }
.jr-moods { display: flex; flex-wrap: wrap; gap: 6px; margin-top: -4px; }
.jr-moods .chip { cursor: pointer; font-size: .8rem; padding: 5px 10px; }
.jr-cover-now { display: flex; align-items: center; gap: 12px; }
.jr-cover-now img { width: 96px; height: 56px; object-fit: cover; border-radius: 10px; }
.jr-actions { display: flex; justify-content: flex-end; gap: 8px; }
.jr-list-head { display: flex; align-items: center; gap: 12px; }
.jr-list-head > div { flex: 1; min-width: 0; }

/* 2.12 — who can see a post */
.ps-aud-row { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; padding: 0 16px 8px; }
.post-sheet.is-reply .ps-aud-row, .post-sheet.is-chat .ps-aud-row, .post-sheet.is-huddle .ps-aud-row, .post-sheet.is-pp .ps-aud-row { display: none; }
.ps-aud { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px 6px 8px; border-radius: 99px; font: inherit; font-size: .82rem; font-weight: 750; cursor: pointer;
  color: var(--accent, #a78bfa); background: color-mix(in srgb, var(--accent, #a78bfa) 14%, transparent); border: 1px solid color-mix(in srgb, var(--accent, #a78bfa) 40%, transparent); transition: background .2s, transform .15s; }
.ps-aud:active { transform: scale(.96); }
.ps-aud .icon { width: 15px; height: 15px; }
.ps-aud-chev .icon { width: 12px; height: 12px; transform: rotate(90deg); opacity: .7; }
.ps-aud[data-value="everyone"] .ps-aud-friends, .ps-aud[data-value="friends"] .ps-aud-everyone { display: none; }
.ps-aud[data-value="friends"] { color: #22c55e; background: color-mix(in srgb, #22c55e 14%, transparent); border-color: color-mix(in srgb, #22c55e 42%, transparent); }
.ps-aud-hint { font-size: .74rem; }
.aud-badge { display: inline-flex; align-items: center; gap: 3px; color: #22c55e; font-weight: 650; }
.aud-badge .icon { width: 12px; height: 12px; }

/* 2.12 — message settings, one tap from any chat */
.dm-list-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.chat-prefs { display: grid; gap: 14px; }
.chat-prefs h2 { display: flex; align-items: center; gap: 8px; margin: 0; }
.chat-prefs h2 .icon { width: 20px; height: 20px; }
.chat-prefs .push-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; }

/* 2.12.1 — message settings open on top of the messages panel (and the dock above it) */
.sheet-backdrop[data-sheet="chat-prefs"] { z-index: 140; }
.chat-prefs .push-row > div { text-align: left; }
.chat-prefs .push-row p { margin: 4px 0 0; }
.chat-prefs .cp-chat { padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.chat-prefs [data-cp-reset] { margin-top: 4px; padding: 0; border: 0; background: none; color: var(--accent, #a78bfa); font: inherit; font-size: .78rem; font-weight: 700; cursor: pointer; }

/* 2.13 — more backgrounds (glass + halloween) and longer background posts */
.pbg-img-lagoon   { background: #0891b2 url("backgrounds/img-lagoon.webp") center / cover; }
.pbg-img-orchid   { background: #a21caf url("backgrounds/img-orchid.webp") center / cover; }
.pbg-img-citrus   { background: #ea580c url("backgrounds/img-citrus.webp") center / cover; }
.pbg-img-berry    { background: #6d28d9 url("backgrounds/img-berry.webp") center / cover; }
.pbg-img-cotton   { background: #c4b5fd url("backgrounds/img-cotton.webp") center / cover; }
.pbg-hw-candy     { background: #fed7aa url("backgrounds/hw-candy.webp") center / cover; }
.pbg-hw-pumpkins  { background: #f97316 url("backgrounds/hw-pumpkins.webp") center / cover; }
.pbg-hw-ghosts    { background: #a78bfa url("backgrounds/hw-ghosts.webp") center / cover; }
.pbg-hw-sweet     { background: #f0abfc url("backgrounds/hw-sweet.webp") center / cover; }
.pbg-hw-potion    { background: #14532d url("backgrounds/hw-potion.webp") center / cover; }
.pbg-hw-moon      { background: #1e1b4b url("backgrounds/hw-moon.webp") center / cover; }
.pbg-hw-haunted   { background: #4c1d95 url("backgrounds/hw-haunted.webp") center / cover; }
.pbg-hw-web       { background: #0c0a09 url("backgrounds/hw-web.webp") center / cover; }
.pbg-hw-jack      { background: #0c0a09 url("backgrounds/hw-jack.webp") center / cover; }
.pbg-hw-graveyard { background: #14532d url("backgrounds/hw-graveyard.webp") center / cover; }
/* light backgrounds get dark text */
.post-bg-card:is(.pbg-img-cotton, .pbg-hw-candy, .pbg-hw-sweet) p { color: #2e1065; text-shadow: 0 1px 10px rgba(255,255,255,.65); }
.post-bg-card:is(.pbg-img-cotton, .pbg-hw-candy, .pbg-hw-sweet) a { color: #2e1065; }
.ps-canvas.has-bg:is(.pbg-img-cotton, .pbg-hw-candy, .pbg-hw-sweet, .pbg-peach, .pbg-mint, .pbg-img-marble) textarea { color: #2e1065 !important; text-shadow: 0 1px 10px rgba(255,255,255,.6); }
.ps-canvas.has-bg:is(.pbg-img-cotton, .pbg-hw-candy, .pbg-hw-sweet, .pbg-peach, .pbg-mint, .pbg-img-marble) textarea::placeholder { color: rgba(46,16,101,.6) !important; }
/* busy pictures: a soft glass plate behind the words keeps them readable */
.post-bg-card:is([class*="pbg-hw-"], [class*="pbg-img-"]) p { padding: 10px 16px; border-radius: 18px; background: rgba(10, 8, 24, .22); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.post-bg-card:is(.pbg-img-cotton, .pbg-hw-candy, .pbg-hw-sweet, .pbg-img-marble) p { background: rgba(255, 255, 255, .35); }
/* longer posts (up to 600 characters) */
.pbg-size-sm p { font-size: 1rem; font-weight: 700; line-height: 1.5; }
.ps-canvas.pbg-size-sm textarea { font-size: 1rem !important; font-weight: 700; }
.post-bg-card.pbg-size-sm { min-height: 260px; padding: 24px 20px; }
/* the picker, in groups */
.bg-swatches { display: grid; gap: 10px; }
.bg-group { display: grid; gap: 6px; }
.bg-group-label { font-size: .74rem; font-weight: 750; color: var(--muted); letter-spacing: .02em; }
.bg-group-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* 2.14 — recent searches */
.rs-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rs-head .so-label { margin: 0; }
.rs-clear { padding: 4px 6px; border: 0; background: none; color: var(--accent, #a78bfa); font: inherit; font-size: .78rem; font-weight: 700; cursor: pointer; }
.rs-row { display: flex; align-items: center; gap: 4px; }
.rs-row .so-row { flex: 1; min-width: 0; }
.rs-del { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 50%; background: none; color: var(--muted); cursor: pointer; }
.rs-del:hover { background: var(--glass); color: var(--text); }
.rs-del .icon { width: 15px; height: 15px; }
.recent-searches.rs-rows { margin-bottom: 6px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.recent-searches.rs-chips { margin: 0 0 18px; }
.rs-chip-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.rs-chip { display: inline-flex; align-items: center; gap: 2px; padding: 4px 4px 4px 12px; border-radius: 99px; background: var(--glass); border: 1px solid var(--glass-border); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.rs-chip a { display: inline-flex; align-items: center; gap: 6px; color: var(--text); text-decoration: none; font-weight: 650; font-size: .88rem; max-width: 220px; }
.rs-chip a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rs-chip a .icon { width: 14px; height: 14px; color: var(--muted); flex: none; }
.rs-chip .rs-del { width: 26px; height: 26px; }

/* 2.15 — the dock stays readable over anything (white embeds, photos, black video):
   a tinted glass base in your accent color, plus a soft outline on icons and labels */
@media (max-width: 820px), (max-height: 500px) and (pointer: coarse) {
  :root[data-theme="dark"] body .tabbar {
    background:
      linear-gradient(180deg, rgba(255,255,255,.12) 0%, rgba(255,255,255,0) 55%),
      color-mix(in srgb, var(--accent) 24%, rgba(13, 11, 28, .80));
    border-color: color-mix(in srgb, var(--accent) 50%, rgba(255,255,255,.22));
  }
  :root[data-theme="light"] body .tabbar {
    background:
      linear-gradient(180deg, rgba(255,255,255,.5) 0%, rgba(255,255,255,0) 60%),
      color-mix(in srgb, var(--accent) 16%, rgba(255, 255, 255, .84));
    border-color: color-mix(in srgb, var(--accent) 40%, rgba(255,255,255,.6));
  }
  :root[data-theme="dark"] body .tabbar .nav-link { color: rgba(255,255,255,.92); text-shadow: 0 1px 2px rgba(0,0,0,.7), 0 0 8px rgba(0,0,0,.35); }
  :root[data-theme="dark"] body .tabbar .nav-link .icon { filter: drop-shadow(0 1px 1.5px rgba(0,0,0,.7)); }
  :root[data-theme="light"] body .tabbar .nav-link { color: #1c1530; text-shadow: 0 1px 2px rgba(255,255,255,.8), 0 0 8px rgba(255,255,255,.5); }
  :root[data-theme="light"] body .tabbar .nav-link .icon { filter: drop-shadow(0 1px 1.5px rgba(255,255,255,.85)); }
  /* the page you're on: a bright accent pill */
  :root[data-theme="dark"] body .tabbar .nav-link[aria-current="page"] { background: color-mix(in srgb, var(--accent) 48%, rgba(255,255,255,.08)); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.3); }
  :root[data-theme="light"] body .tabbar .nav-link[aria-current="page"] { background: color-mix(in srgb, var(--accent) 22%, rgba(255,255,255,.7)); color: color-mix(in srgb, var(--accent) 75%, #1c1530); box-shadow: inset 0 1px 0 rgba(255,255,255,.8); }
  body .tabbar .tab-compose .nav-icon { box-shadow: 0 0 0 2px rgba(255,255,255,.35), 0 8px 20px -8px color-mix(in srgb, var(--accent) 80%, transparent); }
}

/* 2.15 — live streams in the feed */
.lc-live-badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px 3px 7px; border-radius: 999px;
  background: #e5193c; color: #fff; font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; line-height: 1;
  box-shadow: 0 4px 14px -4px rgba(229, 25, 60, .7);
}
.lc-live-badge i { width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: lc-live-dot 1.4s ease-in-out infinite; }
@keyframes lc-live-dot { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
.lc-media > .lc-live-badge { position: absolute; bottom: 10px; left: 10px; z-index: 3; pointer-events: none; }
.lc-site .lc-live-badge { margin-left: 6px; padding: 2px 6px 2px 5px; font-size: .6rem; box-shadow: none; }
.lc-live .lc-play { background: rgba(229, 25, 60, .55); }
.lc-live-note { display: inline-flex; align-items: center; gap: 5px; font-size: .74rem; color: var(--muted); }
.lc-live-note .icon { width: 13px; height: 13px; }
.lc-media.is-auto .lc-stop { opacity: .6; }
@media (prefers-reduced-motion: reduce) { .lc-live-badge i { animation: none; } }

/* 2.15 — ages & family */
.age-card { text-align: center; }
.age-card .form { text-align: left; margin-top: 14px; }
.age-ic { display: inline-grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; margin-bottom: 6px;
  background: color-mix(in srgb, var(--accent, #a78bfa) 22%, transparent); color: var(--accent, #a78bfa); border: 1px solid color-mix(in srgb, var(--accent, #a78bfa) 40%, transparent); }
.age-ic .icon { width: 26px; height: 26px; }
.age-card h2 { margin: 6px 0 8px; }
.age-logout { display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; }
.age-logout .icon { width: 15px; height: 15px; }
.age-switch { margin: 12px 0; text-align: left; }
.age-switch summary { cursor: pointer; color: var(--muted); }
.age-parent { padding: 12px 14px; border-radius: 16px; border: 1px solid color-mix(in srgb, var(--accent, #a78bfa) 40%, var(--glass-border)); background: color-mix(in srgb, var(--accent, #a78bfa) 10%, transparent); display: grid; gap: 8px; }
.age-parent[hidden] { display: none; }
.age-parent p { margin: 0; }
.age-parent .icon { width: 15px; height: 15px; vertical-align: -2px; }
.field-hint { margin: -6px 0 2px; display: flex; align-items: center; gap: 5px; }
.field-hint .icon { width: 13px; height: 13px; }
.age-pill { white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.age-pill .icon { width: 12px; height: 12px; }
.age-verified { background: color-mix(in srgb, #22c55e 22%, transparent); color: #16a34a; border-color: color-mix(in srgb, #22c55e 45%, transparent); }
:root[data-theme="dark"] .age-verified, :root[data-theme="oled"] .age-verified { color: #4ade80; }
.age-minor { background: color-mix(in srgb, #f59e0b 18%, transparent); }
.age-teen { padding: 14px; border-radius: 18px; border: 1px solid var(--glass-border); background: var(--glass); display: grid; gap: 10px; margin-top: 12px; }
.age-teen-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.age-decide { display: flex; gap: 8px; justify-content: flex-end; }
.age-controls .pp-opt { margin-bottom: 8px; }
.age-rules { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.age-rules li { display: flex; gap: 8px; align-items: center; font-size: .9rem; }
.age-rules .icon { width: 16px; height: 16px; opacity: .7; }
.age-verify { margin-top: 10px; }
.age-gate { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border-radius: 18px; }
.age-gate > .icon { width: 26px; height: 26px; flex: none; color: var(--accent, #a78bfa); }
.age-gate p { margin: 4px 0 10px; }
.age-check { flex-wrap: wrap; }
.age-check small { display: block; }
a.set-link { color: inherit; text-decoration: none; }
.ps-aud-row.is-locked .ps-aud { opacity: .75; cursor: default; }
.ps-aud-row.is-locked .ps-aud-chev { display: none; }

/* 2.15.1 — clear theme: a see-through dock (the text glow keeps it readable) */
@media (max-width: 820px), (max-height: 500px) and (pointer: coarse) {
  :root[data-skin="clear"][data-theme="dark"] body .tabbar { background: linear-gradient(180deg, rgba(255,255,255,.10) 0%, rgba(255,255,255,0) 55%), color-mix(in srgb, var(--accent) 14%, rgba(13, 11, 28, .34)); border-color: color-mix(in srgb, var(--accent) 38%, rgba(255,255,255,.22)); -webkit-backdrop-filter: blur(12px) saturate(170%); backdrop-filter: blur(12px) saturate(170%); }
  :root[data-skin="clear"][data-theme="light"] body .tabbar { background: linear-gradient(180deg, rgba(255,255,255,.34) 0%, rgba(255,255,255,0) 60%), color-mix(in srgb, var(--accent) 10%, rgba(255, 255, 255, .40)); border-color: color-mix(in srgb, var(--accent) 32%, rgba(255,255,255,.55)); -webkit-backdrop-filter: blur(12px) saturate(170%); backdrop-filter: blur(12px) saturate(170%); }
  :root[data-skin="clear"][data-theme="dark"] body .tabbar .nav-link[aria-current="page"] { background: color-mix(in srgb, var(--accent) 38%, rgba(255,255,255,.06)); }
}
.age-share { margin-top: 14px; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--glass-border); background: var(--glass); text-align: left; display: grid; gap: 8px; }
.age-share p { margin: 0; }
.age-share .icon { width: 15px; height: 15px; vertical-align: -2px; }
.age-share-row { display: flex; gap: 8px; align-items: center; }
.age-share-row input { flex: 1; min-width: 0; font-size: .8rem; }
.age-card .invite-hero-face { display: flex; justify-content: center; margin-bottom: 8px; }

/* 2.15.2 — the header wears the same accent glass as the dock; clear theme is properly see-through */
@media (max-width: 820px), (max-height: 500px) and (pointer: coarse) {
  :root[data-theme="dark"] { --bar-bg: linear-gradient(180deg, rgba(255,255,255,.12) 0%, rgba(255,255,255,0) 55%), color-mix(in srgb, var(--accent) 24%, rgba(13, 11, 28, .80)); --bar-border: color-mix(in srgb, var(--accent) 50%, rgba(255,255,255,.22)); --bar-blur: blur(22px) saturate(170%); }
  :root[data-theme="light"] { --bar-bg: linear-gradient(180deg, rgba(255,255,255,.5) 0%, rgba(255,255,255,0) 60%), color-mix(in srgb, var(--accent) 16%, rgba(255, 255, 255, .84)); --bar-border: color-mix(in srgb, var(--accent) 40%, rgba(255,255,255,.6)); --bar-blur: blur(22px) saturate(170%); }
  :root[data-skin="clear"][data-theme="dark"] { --bar-bg: linear-gradient(180deg, rgba(255,255,255,.07) 0%, rgba(255,255,255,0) 55%), color-mix(in srgb, var(--accent) 9%, rgba(13, 11, 28, .14)); --bar-border: color-mix(in srgb, var(--accent) 30%, rgba(255,255,255,.2)); --bar-blur: blur(8px) saturate(160%); }
  :root[data-skin="clear"][data-theme="light"] { --bar-bg: linear-gradient(180deg, rgba(255,255,255,.22) 0%, rgba(255,255,255,0) 60%), color-mix(in srgb, var(--accent) 7%, rgba(255, 255, 255, .18)); --bar-border: color-mix(in srgb, var(--accent) 26%, rgba(255,255,255,.5)); --bar-blur: blur(8px) saturate(160%); }

  :root:is([data-theme="dark"], [data-theme="light"]):not([data-skin="solid"]) body :is(.tabbar, .topbar) { background: var(--bar-bg); -webkit-backdrop-filter: var(--bar-blur); backdrop-filter: var(--bar-blur); }
  :root:is([data-theme="dark"], [data-theme="light"]):not([data-skin="solid"]) body .tabbar { border-color: var(--bar-border); }
  :root:is([data-theme="dark"], [data-theme="light"]):not([data-skin="solid"]) body .topbar { border-bottom: 1px solid var(--bar-border); box-shadow: 0 8px 24px -18px color-mix(in srgb, var(--accent) 70%, transparent); }
  /* oled keeps its black header on the plain walls */
  :root[data-skin="oled"]:is([data-wall="glassay"], [data-wall="plain"]) body .topbar { background: rgba(0,0,0,.92); }

  /* header icons and logo stay readable on anything, like the dock's */
  :root[data-theme="dark"] body .topbar :is(.brand, .icon-btn, a, button) { color: rgba(255,255,255,.94); text-shadow: 0 1px 2px rgba(0,0,0,.6); }
  :root[data-theme="dark"] body .topbar .icon { filter: drop-shadow(0 1px 1.5px rgba(0,0,0,.65)); }
  :root[data-theme="light"] body .topbar :is(.brand, .icon-btn, a, button) { color: #1c1530; text-shadow: 0 1px 2px rgba(255,255,255,.8); }
  :root[data-theme="light"] body .topbar .icon { filter: drop-shadow(0 1px 1.5px rgba(255,255,255,.85)); }
  :root[data-skin="clear"][data-theme="dark"] body .tabbar .nav-link[aria-current="page"] { background: color-mix(in srgb, var(--accent) 34%, rgba(255,255,255,.05)); }
}

/* 2.15.3 — one glass everywhere: every surface carries a whisper of the accent so the header, dock,
   panels, menus and slide-overs read as one set. Clear stays see-through (the tint is only ~4%). */
:root { --surf-tint: color-mix(in srgb, var(--accent) 9%, transparent); }
:root[data-theme="light"] { --surf-tint: color-mix(in srgb, var(--accent) 7%, transparent); }
:root[data-skin="clear"] { --surf-tint: color-mix(in srgb, var(--accent) 4%, transparent); }
:root[data-skin="oled"] { --surf-tint: color-mix(in srgb, var(--accent) 6%, transparent); }

:root[data-theme="dark"] { --bar-bg: linear-gradient(180deg, rgba(255,255,255,.12) 0%, rgba(255,255,255,0) 55%), color-mix(in srgb, var(--accent) 24%, rgba(13, 11, 28, .80)); --bar-border: color-mix(in srgb, var(--accent) 50%, rgba(255,255,255,.22)); --bar-blur: blur(22px) saturate(170%); }
:root[data-theme="light"] { --bar-bg: linear-gradient(180deg, rgba(255,255,255,.5) 0%, rgba(255,255,255,0) 60%), color-mix(in srgb, var(--accent) 16%, rgba(255, 255, 255, .84)); --bar-border: color-mix(in srgb, var(--accent) 40%, rgba(255,255,255,.6)); --bar-blur: blur(22px) saturate(170%); }
/* clear: barely there — the wallpaper shows straight through the header and dock */
:root[data-skin="clear"][data-theme="dark"] { --bar-bg: linear-gradient(180deg, rgba(255,255,255,.06) 0%, rgba(255,255,255,0) 50%), color-mix(in srgb, var(--accent) 6%, rgba(13, 11, 28, .05)); --bar-border: color-mix(in srgb, var(--accent) 28%, rgba(255,255,255,.22)); --bar-blur: blur(5px) saturate(150%); }
:root[data-skin="clear"][data-theme="light"] { --bar-bg: linear-gradient(180deg, rgba(255,255,255,.18) 0%, rgba(255,255,255,0) 55%), color-mix(in srgb, var(--accent) 5%, rgba(255, 255, 255, .08)); --bar-border: color-mix(in srgb, var(--accent) 24%, rgba(255,255,255,.55)); --bar-blur: blur(5px) saturate(150%); }

/* the menu button (avatar + ☰) matches the bars */
:root:not([data-skin="solid"]) body .topbar-menu { background: var(--bar-bg); border-color: var(--bar-border); -webkit-backdrop-filter: var(--bar-blur); backdrop-filter: var(--bar-blur);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 6px 16px -10px color-mix(in srgb, var(--accent) 70%, transparent); }

/* slide-over menus, sheets and pop-up menus: same accent edge as the bars */
:root:not([data-skin="solid"]) body :is(.drawer, .app-panel, .sheet, .menu, .post-sheet) { border-color: var(--bar-border); }
:root:not([data-skin="solid"]) body .drawer-group { background-color: color-mix(in srgb, var(--accent) 6%, var(--glass)); border-color: color-mix(in srgb, var(--accent) 22%, var(--glass-border)); }
:root:not([data-skin="solid"]) body .app-panel { background-color: color-mix(in srgb, color-mix(in srgb, var(--accent) 14%, var(--bg)) 70%, transparent); }
/* clear: slide-overs stay glass you can see the wallpaper through, with enough frost to read */
:root[data-skin="clear"] body :is(.drawer, .app-panel) { background-color: color-mix(in srgb, color-mix(in srgb, var(--accent) 12%, var(--bg)) 38%, transparent); -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%); }
:root[data-skin="clear"] body .drawer-backdrop.open { background: rgba(5,5,15,.22); }
:root[data-skin="clear"] body .drawer-group { background-color: rgba(255,255,255,.05); }
:root[data-skin="clear"][data-theme="light"] body .drawer-group { background-color: rgba(255,255,255,.18); }

/* 2.15.4 — on someone else's profile or huddle the app's own bars, menus and slide-overs keep your accent:
   the glass recipes are worked out again inside them so they pick up that accent. */
:root[data-app-accent][data-theme="dark"] :is(.topbar, .tabbar, .sidebar, .drawer-backdrop, .ap-backdrop, .sheet-backdrop, .ps-backdrop) { --surf-tint: color-mix(in srgb, var(--accent) 9%, transparent); --bar-bg: linear-gradient(180deg, rgba(255,255,255,.12) 0%, rgba(255,255,255,0) 55%), color-mix(in srgb, var(--accent) 24%, rgba(13, 11, 28, .80)); --bar-border: color-mix(in srgb, var(--accent) 50%, rgba(255,255,255,.22)); }
:root[data-app-accent][data-theme="light"] :is(.topbar, .tabbar, .sidebar, .drawer-backdrop, .ap-backdrop, .sheet-backdrop, .ps-backdrop) { --surf-tint: color-mix(in srgb, var(--accent) 7%, transparent); --bar-bg: linear-gradient(180deg, rgba(255,255,255,.5) 0%, rgba(255,255,255,0) 60%), color-mix(in srgb, var(--accent) 16%, rgba(255, 255, 255, .84)); --bar-border: color-mix(in srgb, var(--accent) 40%, rgba(255,255,255,.6)); }
:root[data-app-accent][data-skin="oled"] :is(.topbar, .tabbar, .sidebar, .drawer-backdrop, .ap-backdrop, .sheet-backdrop, .ps-backdrop) { --surf-tint: color-mix(in srgb, var(--accent) 6%, transparent); }
:root[data-app-accent][data-skin="clear"][data-theme="dark"] :is(.topbar, .tabbar, .sidebar, .drawer-backdrop, .ap-backdrop, .sheet-backdrop, .ps-backdrop) { --surf-tint: color-mix(in srgb, var(--accent) 4%, transparent); --bar-bg: linear-gradient(180deg, rgba(255,255,255,.06) 0%, rgba(255,255,255,0) 50%), color-mix(in srgb, var(--accent) 6%, rgba(13, 11, 28, .05)); --bar-border: color-mix(in srgb, var(--accent) 28%, rgba(255,255,255,.22)); }
:root[data-app-accent][data-skin="clear"][data-theme="light"] :is(.topbar, .tabbar, .sidebar, .drawer-backdrop, .ap-backdrop, .sheet-backdrop, .ps-backdrop) { --surf-tint: color-mix(in srgb, var(--accent) 4%, transparent); --bar-bg: linear-gradient(180deg, rgba(255,255,255,.18) 0%, rgba(255,255,255,0) 55%), color-mix(in srgb, var(--accent) 5%, rgba(255, 255, 255, .08)); --bar-border: color-mix(in srgb, var(--accent) 24%, rgba(255,255,255,.55)); }

/* 2.15.5 — OLED is true black again: black bars, black menus and panels, no color wash on surfaces.
   Your accent only shows as a thin edge and on the highlighted tab / buttons. */
:root[data-skin="oled"],
:root[data-skin="oled"] :is(.topbar, .tabbar, .sidebar, .drawer-backdrop, .ap-backdrop, .sheet-backdrop, .ps-backdrop),
:root[data-app-accent][data-skin="oled"] :is(.topbar, .tabbar, .sidebar, .drawer-backdrop, .ap-backdrop, .sheet-backdrop, .ps-backdrop) {
  --surf-tint: transparent;
  --bar-bg: #000;
  --bar-border: color-mix(in srgb, var(--accent) 34%, rgba(255,255,255,.08));
  --bar-blur: none;
}
:root[data-skin="oled"] body :is(.topbar, .tabbar) { box-shadow: none; }
:root[data-skin="oled"] body .tabbar { box-shadow: 0 -1px 0 rgba(0,0,0,1), 0 10px 30px -12px rgba(0,0,0,.9); }
:root[data-skin="oled"] body :is(.drawer, .app-panel, .sheet, .post-sheet, .menu) { background-color: #000; background-image: none; }
:root[data-skin="oled"] body .drawer-group { background-color: #0b0b0f; border-color: rgba(255,255,255,.08); }
:root[data-skin="oled"] body .topbar-menu { background: #0b0b0f; box-shadow: none; }
:root[data-skin="oled"] body .tabbar .nav-link { text-shadow: none; }
:root[data-skin="oled"] body .tabbar .nav-link .icon, :root[data-skin="oled"] body .topbar .icon { filter: none; }
:root[data-skin="oled"] body .topbar :is(.brand, .icon-btn, a, button) { text-shadow: none; }

/* 2.15.6 — one design everywhere: posts, the composer, tabs, profile boxes and every other card use the
   exact glass recipe of the header and dock (same tint, same top shine, same accent edge) in every theme.
   Pop-ups, menus, sheets, buttons and pills keep their own look. Clear stays see-through; OLED stays black. */
:root[data-skin="solid"],
:root[data-skin="solid"] :is(.topbar, .tabbar, .sidebar, .drawer-backdrop, .ap-backdrop, .sheet-backdrop, .ps-backdrop),
:root[data-app-accent][data-skin="solid"] :is(.topbar, .tabbar, .sidebar, .drawer-backdrop, .ap-backdrop, .sheet-backdrop, .ps-backdrop) {
  --surf-tint: transparent;
  --bar-bg: linear-gradient(180deg, rgba(255,255,255,.7) 0%, rgba(255,255,255,0) 60%), color-mix(in srgb, var(--accent) 7%, #ffffff);
  --bar-border: color-mix(in srgb, var(--accent) 30%, rgba(0,0,0,.08));
  --bar-blur: none;
}
@media (max-width: 820px), (max-height: 500px) and (pointer: coarse) {
  :root[data-skin="solid"] body :is(.tabbar, .topbar) { background: var(--bar-bg); border-color: var(--bar-border); }
  :root[data-skin="solid"] body .topbar { border-bottom: 1px solid var(--bar-border); }
  :root[data-skin="solid"] body .topbar-menu { background: var(--bar-bg); border-color: var(--bar-border); }
}
:root body :is(.glass, .glass-strong):not(:is(.topbar, .tabbar, .sheet, .menu, .drawer, .app-panel, .post-sheet, .search-ov-panel, .react-picker, .reactors-sheet, .st-sheet, .lbx-bar, .pe, .toast, .alert, .icon-btn, .btn, .pill, .pill-glass, .pf-glass-btn, .search-pill, .chat-themed, .install-banner)):not([style*="background"]) {
  background: var(--bar-bg);
  border-color: var(--bar-border);
}
/* inside a box, the inner fields and sub-boxes stay quiet so the card reads as one piece of glass */
:root body :is(.glass, .glass-strong) :is(.glass, .glass-strong):not(:is(.btn, .icon-btn, .pill, .menu)) { background: color-mix(in srgb, var(--accent) 5%, transparent); }
:root[data-skin="oled"] body :is(.glass, .glass-strong) :is(.glass, .glass-strong):not(:is(.btn, .icon-btn, .pill, .menu)) { background: transparent; }

/* ==========================================================================
   2.16 — chat rooms (18+) and live panels
   ========================================================================== */
.dl-tag { font-size: .66rem; font-weight: 800; padding: 2px 6px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--text); margin-left: auto; margin-right: 6px; }
.dl-live { background: #e5193c !important; color: #fff !important; margin-left: auto; margin-right: 6px; }

/* rooms list */
.room-list { display: grid; gap: 10px; }
.room-card { border-radius: 20px; padding: 4px; }
.room-link { display: flex; align-items: center; gap: 12px; padding: 10px 12px; color: var(--text); text-decoration: none !important; }
.room-emoji { font-size: 1.7rem; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; background: color-mix(in srgb, var(--accent) 14%, transparent); flex: none; }
.room-text { display: grid; min-width: 0; flex: 1; }
.room-text strong { font-size: 1rem; }
.room-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room-count { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 700; color: var(--muted); white-space: nowrap; }
.room-count i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); opacity: .5; }
.room-count.is-on { color: var(--text); }
.room-count.is-on i { background: #22c55e; opacity: 1; box-shadow: 0 0 8px #22c55e; }
.room-admin { padding: 0 12px 10px; }
.room-admin summary { cursor: pointer; }
.room-admin-acts { display: flex; gap: 8px; justify-content: flex-end; }

/* a room: the old-school chat window */
body.page-room .shell { padding-bottom: 0; }
.room { display: flex; flex-direction: column; border-radius: 22px; overflow: hidden; height: calc(100dvh - 180px); min-height: 380px; }
@media (max-width: 820px), (max-height: 500px) and (pointer: coarse) { .room { height: calc(100dvh - 76px - 104px - env(safe-area-inset-bottom)); } }
.room-bar { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.room-bar .room-emoji { width: 38px; height: 38px; font-size: 1.35rem; }
.room-title { display: grid; min-width: 0; flex: 1; }
.room-title small { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.room-who-btn { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--glass-border); background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--text); border-radius: 999px; padding: 6px 11px; font-weight: 700; cursor: pointer; }
.room-who-btn .icon { width: 16px; height: 16px; }
.room-body { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 190px; min-height: 0; }
.room-log { overflow-y: auto; padding: 10px 14px; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .86rem; line-height: 1.5; overscroll-behavior: contain; }
.room-line { margin: 0 0 2px; position: relative; word-wrap: break-word; }
.room-line time { color: var(--muted); font-size: .76em; margin-right: 6px; }
.room-nick { font-weight: 800; color: hsl(var(--hue) 80% 72%); text-decoration: none !important; }
:root[data-theme="light"] .room-nick { color: hsl(var(--hue) 70% 36%); }
.room-nick sup { color: #facc15; margin-left: 1px; }
.room-colon { color: var(--muted); }
.room-me { font-style: italic; color: var(--text-soft); }
.room-sys, .room-line.room-sys { color: var(--muted); font-size: .92em; }
.room-join .room-sys { color: color-mix(in srgb, #22c55e 70%, var(--muted)); }
.room-leave .room-sys { color: color-mix(in srgb, #f97316 60%, var(--muted)); }
.room-mod { position: absolute; right: 0; top: 0; border: 0; background: none; color: var(--muted); cursor: pointer; opacity: .5; }
.room-mod:hover { opacity: 1; color: #ef4444; }
.room-who { border-left: 1px solid var(--line); overflow-y: auto; padding: 10px; }
.room-who h3 { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 8px; }
.room-who ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.room-who li { display: flex; align-items: center; gap: 6px; }
.room-who li a { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; text-decoration: none !important; }
.room-who li .room-nick { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: inherit; font-size: .86rem; }
.room-kick { border: 0; background: none; color: var(--muted); font-size: .7rem; cursor: pointer; }
.room-say { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }
.room-say input { flex: 1; min-width: 0; }
.room-banned { padding: 12px; text-align: center; border-top: 1px solid var(--line); margin: 0; }
@media (max-width: 640px) {
  .room-body { grid-template-columns: minmax(0, 1fr); }
  .room-who { display: none; }
  .room.show-who .room-who { display: block; position: absolute; right: 12px; top: 66px; width: 200px; max-height: 60%; border-radius: 16px; background: var(--glass-strong); border: 1px solid var(--glass-border); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); z-index: 4; }
  .room { position: relative; }
}

/* live list */
.lives-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.credits-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-weight: 800; font-size: .85rem; background: color-mix(in srgb, var(--accent) 18%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); }
.credits-pill .icon { width: 16px; height: 16px; }
.golive-form { display: flex; gap: 8px; }
.golive-form input { flex: 1; min-width: 0; }
.golive-note { display: flex; gap: 6px; align-items: center; }
.live-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.live-grid .empty { grid-column: 1 / -1; }
.live-card { display: grid; gap: 10px; padding: 14px; border-radius: 22px; color: var(--text); text-decoration: none !important; min-height: 150px;
  background-image: radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, #e5193c 28%, transparent), transparent 60%) !important; }
.live-card-top { display: flex; justify-content: space-between; align-items: center; }
.live-card-n { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-size: .8rem; }
.live-card-n .icon { width: 15px; height: 15px; }
.live-card-title { font-size: 1.05rem; line-height: 1.25; }
.live-card-host { display: flex; align-items: center; gap: 8px; font-size: .84rem; color: var(--text-soft); }
.live-card-faces { display: flex; }
.live-card-faces .avatar { margin-right: -8px; border: 2px solid var(--bg); }

/* the live stage: full screen, TikTok-style */
body.page-live-room .topbar, body.page-live-room .tabbar, body.page-live-room .sidebar, body.page-live-room .pmusic { display: none !important; }
body.page-live-room .shell { padding: 0 !important; display: block; max-width: none; }
body.page-live-room { overflow: hidden; }
.lv { position: fixed; inset: 0; z-index: 50; background: #05050a; color: #fff; overflow: hidden; }
.lv-stage { position: absolute; inset: 0; display: grid; gap: 3px; padding: calc(64px + env(safe-area-inset-top)) 3px calc(150px + env(safe-area-inset-bottom)); grid-template-columns: 1fr; grid-auto-rows: 1fr; }
.lv-stage[data-n="0"], .lv-stage[data-n="1"] { padding: 0; }
.lv-stage[data-n="2"] { grid-template-columns: 1fr 1fr; }
.lv-stage[data-n="3"], .lv-stage[data-n="4"] { grid-template-columns: 1fr 1fr; }
.lv-stage[data-n="5"], .lv-stage[data-n="6"] { grid-template-columns: 1fr 1fr; }
.lv-stage[data-n="7"], .lv-stage[data-n="8"] { grid-template-columns: 1fr 1fr; }
@media (min-width: 900px) {
  .lv-stage[data-n="3"] { grid-template-columns: repeat(3, 1fr); }
  .lv-stage[data-n="5"], .lv-stage[data-n="6"] { grid-template-columns: repeat(3, 1fr); }
  .lv-stage[data-n="7"], .lv-stage[data-n="8"] { grid-template-columns: repeat(4, 1fr); }
}
.lv-stage[data-n="3"] .lv-tile:first-child { grid-column: 1 / -1; }
.lv-stage[data-n="5"] .lv-tile:first-child, .lv-stage[data-n="7"] .lv-tile:first-child { grid-column: 1 / -1; }
.lv-tile { position: relative; overflow: hidden; border-radius: 16px; background: radial-gradient(120% 100% at 50% 0%, #1d1b33, #0a0a12); min-height: 0; cursor: pointer; }
.lv-stage[data-n="0"] .lv-tile, .lv-stage[data-n="1"] .lv-tile { border-radius: 0; }
.lv-tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .3s; }
.lv-tile.has-video video { opacity: 1; }
.lv-tile.is-me video { transform: scaleX(-1); }
.lv-tile.cam-off video { opacity: 0 !important; }
.lv-face { position: absolute; inset: 0; display: grid; place-items: center; }
.lv-face .avatar { width: 34%; height: auto; aspect-ratio: 1; max-width: 120px; box-shadow: 0 0 0 4px rgba(255,255,255,.12); }
.lv-tag { position: absolute; left: 8px; bottom: 8px; display: flex; align-items: center; gap: 5px; max-width: calc(100% - 16px); padding: 3px 9px 3px 4px; border-radius: 999px; background: rgba(0,0,0,.45); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); font-size: .78rem; }
.lv-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.lv-role:empty { display: none; }
.lv-role { font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: 2px 6px; border-radius: 999px; background: var(--accent); color: #fff; }
.lv-role.role-host { background: linear-gradient(135deg, #f43f5e, #f97316); }
.lv-role.role-cohost { background: linear-gradient(135deg, #8b5cf6, #06b6d4); }
.lv-role.is-mod { background: #ca8a04; }
.lv-earned:empty { display: none; }
.lv-earned { position: absolute; right: 8px; top: 8px; font-size: .74rem; font-weight: 800; padding: 3px 8px; border-radius: 999px; background: rgba(0,0,0,.45); color: #fde68a; }

.lv-top { position: absolute; left: 0; right: 0; top: 0; z-index: 5; display: flex; align-items: center; gap: 8px; padding: calc(10px + env(safe-area-inset-top)) 12px 10px; background: linear-gradient(180deg, rgba(0,0,0,.55), transparent); }
.lv-hostpill { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; padding: 3px 12px 3px 3px; border-radius: 999px; background: rgba(0,0,0,.35); color: #fff; text-decoration: none !important; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.lv-hostpill span { display: grid; min-width: 0; line-height: 1.15; }
.lv-hostpill strong { font-size: .84rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.lv-hostpill small { font-size: .72rem; opacity: .8; }
.lv-stat { display: inline-flex; align-items: center; gap: 4px; padding: 6px 10px; border-radius: 999px; background: rgba(0,0,0,.35); font-size: .8rem; white-space: nowrap; }
.lv-stat .icon { width: 15px; height: 15px; }
.lv-likes { color: #fda4af; }
.lv-x { width: 36px; height: 36px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(0,0,0,.4); color: #fff; cursor: pointer; flex: none; }
.lv-x .icon { width: 18px; height: 18px; }

.lv-feed { position: absolute; left: 10px; bottom: calc(70px + env(safe-area-inset-bottom)); z-index: 4; width: min(72%, 420px); max-height: 34vh; overflow-y: auto; display: flex; flex-direction: column; gap: 5px; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 22%); mask-image: linear-gradient(180deg, transparent, #000 22%); }
.lv-feed::-webkit-scrollbar { display: none; }
.lv-line { display: flex; gap: 7px; align-items: flex-start; align-self: flex-start; max-width: 100%; padding: 5px 10px 5px 5px; border-radius: 16px; background: rgba(0,0,0,.38); font-size: .86rem; line-height: 1.3; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); text-shadow: 0 1px 2px rgba(0,0,0,.6); animation: lv-in .25s ease; word-break: break-word; }
.lv-line b { color: #c4b5fd; margin-right: 2px; }
.lv-av .avatar { width: 24px; height: 24px; }
.lv-join, .lv-sys { padding-left: 10px; font-size: .78rem; opacity: .85; background: rgba(0,0,0,.25); }
.lv-gift { background: linear-gradient(90deg, rgba(236,72,153,.55), rgba(139,92,246,.45)); }
.lv-gift em { font-style: normal; color: #fde68a; font-weight: 800; }
@keyframes lv-in { from { opacity: 0; transform: translateY(6px); } }

.lv-hearts { position: absolute; right: 18px; bottom: calc(80px + env(safe-area-inset-bottom)); width: 60px; height: 50vh; z-index: 4; pointer-events: none; }
.lv-heart { position: absolute; bottom: 0; left: 50%; font-size: 26px; animation: lv-float 2.3s ease-out forwards; }
.lv-heart.is-mine { font-size: 30px; }
@keyframes lv-float { 0% { transform: translate(-50%, 0) scale(.6); opacity: 0; } 12% { opacity: 1; transform: translate(calc(-50% + var(--x) * .3), -30px) scale(1.1); } 100% { transform: translate(calc(-50% + var(--x)), -45vh) rotate(var(--r)) scale(.9); opacity: 0; } }

.lv-fx { position: absolute; left: 0; right: 0; top: 22%; z-index: 6; display: grid; place-items: center; pointer-events: none; }
.lv-giftfx { display: flex; align-items: center; gap: 12px; padding: 10px 18px 10px 10px; border-radius: 999px; background: linear-gradient(90deg, rgba(236,72,153,.75), rgba(139,92,246,.7)); box-shadow: 0 20px 50px -20px rgba(236,72,153,.8); animation: lv-gift 1.7s ease forwards; }
.lv-giftfx.is-glassay { background: linear-gradient(120deg, rgba(139,92,246,.75), rgba(6,182,212,.7), rgba(236,72,153,.7)); border: 1px solid rgba(255,255,255,.5); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.lv-giftfx.is-big { flex-direction: column; border-radius: 28px; padding: 18px 26px; text-align: center; animation-duration: 2.6s; }
.lv-giftfx-emoji { font-size: 44px; line-height: 1; filter: drop-shadow(0 6px 14px rgba(0,0,0,.4)); }
.lv-giftfx.is-big .lv-giftfx-emoji { font-size: 96px; animation: lv-bounce 1s ease infinite; }
.lv-giftfx-text { font-size: .9rem; line-height: 1.25; }
.lv-giftfx-text small { opacity: .9; }
@keyframes lv-gift { 0% { opacity: 0; transform: translateX(-40px) scale(.8); } 12% { opacity: 1; transform: none; } 85% { opacity: 1; } 100% { opacity: 0; transform: translateY(-20px); } }
@keyframes lv-bounce { 50% { transform: translateY(-10px) scale(1.06); } }

.lv-bar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 5; display: flex; align-items: center; gap: 7px; padding: 10px 10px calc(10px + env(safe-area-inset-bottom)); background: linear-gradient(0deg, rgba(0,0,0,.6), transparent); }
.lv-say { flex: 1; min-width: 0; }
.lv-say input { width: 100%; border-radius: 999px; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.14); color: #fff; padding: 10px 14px; font-size: 16px; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.lv-say input::placeholder { color: rgba(255,255,255,.7); }
.lv-btn { position: relative; width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.14); color: #fff; display: grid; place-items: center; flex: none; cursor: pointer; font-size: 19px; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.lv-btn .icon { width: 20px; height: 20px; }
.lv-btn.is-off { background: rgba(239,68,68,.75); }
.lv-btn.is-on { background: color-mix(in srgb, var(--accent) 70%, transparent); }
.lv-gift-btn { background: linear-gradient(135deg, #ec4899, #8b5cf6); border: 0; }
.lv-heart-btn { color: #fb7185; }
.lv-heart-btn:active { transform: scale(.88); }
.lv-dot { position: absolute; top: 2px; right: 2px; width: 10px; height: 10px; border-radius: 50%; background: #ef4444; border: 2px solid #000; }
.lv-note { position: absolute; left: 50%; top: calc(70px + env(safe-area-inset-top)); transform: translateX(-50%); z-index: 7; padding: 8px 14px; border-radius: 999px; background: rgba(0,0,0,.65); font-size: .84rem; max-width: 90%; text-align: center; }
.lv-note.is-bad { background: rgba(185,28,28,.85); }
.lv-invite { position: absolute; left: 12px; right: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 8; display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 18px; color: var(--text); }
.lv-invite span { flex: 1; display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: .9rem; }
.lv-invite[hidden] { display: none; }

.lv-start { position: absolute; inset: 0; z-index: 20; display: grid; place-items: center; padding: 20px; background: radial-gradient(120% 80% at 50% 0%, color-mix(in srgb, var(--accent) 30%, #05050a), #05050a); }
.lv-start[hidden] { display: none; }
.lv-start-card { width: min(100%, 380px); border-radius: 28px; padding: 26px 22px; display: grid; gap: 12px; justify-items: center; text-align: center; color: var(--text); }
.lv-start-card h2 { margin: 0; }
.lv.is-ended .lv-bar, .lv.is-ended .lv-feed { opacity: .3; pointer-events: none; }

.lv-sheet-bd { z-index: 30; }
.lv-sheet { color: var(--text); max-height: 80dvh; overflow-y: auto; text-align: left; justify-items: stretch; }
.lv-sheet h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 1.05rem; }
.lv-sheet h2 small { font-weight: 600; font-size: .74rem; }
.lv-sheet h2 .icon { width: 20px; height: 20px; }
.lv-to { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 4px; }
.lv-to-chip { display: flex; align-items: center; gap: 6px; padding: 3px 12px 3px 3px; border-radius: 999px; border: 1px solid var(--glass-border); background: var(--glass); color: var(--text); cursor: pointer; white-space: nowrap; flex: none; }
.lv-to-chip .avatar { width: 28px; height: 28px; }
.lv-to-chip.is-on { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 40%, transparent); background: color-mix(in srgb, var(--accent) 18%, transparent); }
.lv-cats { display: flex; gap: 6px; }
.lv-cats button { flex: 1; padding: 7px 10px; border-radius: 999px; border: 1px solid var(--glass-border); background: transparent; color: var(--text); font-weight: 700; cursor: pointer; }
.lv-cats button.is-on { background: var(--grad); color: #fff; border-color: transparent; }
.lv-gifts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.lv-giftbtn { display: grid; justify-items: center; gap: 2px; padding: 10px 4px; border-radius: 16px; border: 1px solid var(--glass-border); background: var(--glass); color: var(--text); cursor: pointer; transition: transform .15s; }
.lv-giftbtn:active, .lv-giftbtn.is-sending { transform: scale(.9); }
.lv-giftbtn.is-glassay { background: linear-gradient(150deg, color-mix(in srgb, #8b5cf6 22%, transparent), color-mix(in srgb, #06b6d4 18%, transparent)); border-color: color-mix(in srgb, #a78bfa 50%, transparent); }
.lv-giftbtn-e { font-size: 30px; line-height: 1.1; }
.lv-giftbtn-n { font-size: .7rem; font-weight: 700; text-align: center; line-height: 1.15; }
.lv-giftbtn-c { font-size: .68rem; color: #ca8a04; font-weight: 800; }
:root[data-theme="dark"] .lv-giftbtn-c { color: #fde68a; }
.lv-people h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 10px 0 4px; }
.lv-plist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.lv-prow { display: flex; align-items: center; gap: 10px; }
.lv-pface .avatar { width: 36px; height: 36px; }
.lv-pname { display: grid; flex: 1; min-width: 0; line-height: 1.2; }
.lv-pname b { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.lv-pname small { color: var(--muted); font-size: .74rem; }
.lv-pacts { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.lv-pacts .btn { padding: 5px 9px; font-size: .74rem; }

/* 2.17 — my streams */
.strm-block .panel-title button.panel-more { border: 0; background: none; cursor: pointer; font: inherit; color: var(--accent); }
.strm-body { display: grid; gap: 10px; }
.strm-live .lc-media { background: radial-gradient(120% 120% at 50% 0%, color-mix(in srgb, #e5193c 40%, #14101f), #07070f); }
.strm-poster { position: absolute; inset: 0; display: grid; place-items: center; }
.strm-brand { font-weight: 900; font-size: 1.4rem; letter-spacing: .02em; color: rgba(255,255,255,.85); text-transform: lowercase; }
.strm-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.strm-chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--glass-border); background: color-mix(in srgb, var(--accent) 8%, transparent); color: var(--text); font-weight: 700; font-size: .84rem; text-decoration: none !important; }
.strm-chip small { color: var(--muted); font-weight: 600; }
.strm-chip .icon { width: 14px; height: 14px; }
.strm-chip.is-live { border-color: color-mix(in srgb, #e5193c 60%, transparent); background: color-mix(in srgb, #e5193c 14%, transparent); }
.strm-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); opacity: .6; }
.strm-dot.is-unknown { background: transparent; border: 1.5px solid var(--muted); }
.strm-form { display: grid; gap: 8px; margin-top: 10px; }
.strm-form[hidden] { display: none; }
.strm-form-acts { display: flex; justify-content: flex-end; gap: 8px; }

/* 2.17 — backup & transfer */
.tr-how ul { padding-left: 18px; display: grid; gap: 6px; margin: 8px 0; }
.tr-how summary { cursor: pointer; color: var(--accent); font-weight: 700; }
.tr-drop { display: grid; justify-items: center; gap: 4px; padding: 26px 16px; margin-top: 12px; border-radius: 20px; border: 2px dashed color-mix(in srgb, var(--accent) 50%, var(--glass-border)); background: color-mix(in srgb, var(--accent) 8%, transparent); cursor: pointer; text-align: center; }
.tr-drop .icon { width: 28px; height: 28px; transform: rotate(180deg); color: var(--accent); }
.tr-drop.is-over { background: color-mix(in srgb, var(--accent) 18%, transparent); }
.tr-drop[hidden] { display: none; }
.tr-progress { margin-top: 12px; }
.tr-bar { height: 10px; border-radius: 99px; background: color-mix(in srgb, var(--accent) 14%, transparent); overflow: hidden; }
.tr-bar i { display: block; height: 100%; width: 0; background: var(--grad); transition: width .3s; }
.tr-progress.is-bad .tr-bar i { background: #ef4444; }
.tr-found { margin-top: 12px; padding: 14px; border-radius: 18px; border: 1px solid var(--glass-border); display: grid; gap: 10px; }
.tr-found[hidden] { display: none; }
.tr-found h3 { margin: 0; }
.tr-stats { margin: 0; }
.tr-acts { display: flex; justify-content: flex-end; gap: 8px; }
.imp-tag { font-size: .72rem; padding: 1px 7px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 14%, transparent); }

/* ==========================================================================
   2.17.3 — live: layout fixes and gift effects
   ========================================================================== */
/* names on tiles sit at the top, so the chat never covers them */
.lv-tag { top: 8px; bottom: auto; }
.lv-stage[data-n="0"] .lv-tag, .lv-stage[data-n="1"] .lv-tag { top: calc(70px + env(safe-area-inset-top)); left: 12px; }
.lv-stage[data-n="0"] .lv-earned, .lv-stage[data-n="1"] .lv-earned { top: calc(70px + env(safe-area-inset-top)); right: 12px; }
.lv-earned { right: 8px; top: 8px; }

/* the gift shelf is short and see-through around it: the stage, the chat and the effects stay in view */
.lv .lv-sheet-bd[data-lv-sheet="gift"] { background: transparent !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; align-items: flex-end; }
.lv [data-lv-sheet="gift"] .lv-sheet { max-height: 44dvh; padding: 6px 14px calc(12px + env(safe-area-inset-bottom)); gap: 8px; border-radius: 24px 24px 0 0;
  background: color-mix(in srgb, #0b0a16 72%, transparent) !important; -webkit-backdrop-filter: blur(16px) saturate(160%); backdrop-filter: blur(16px) saturate(160%); }
.lv [data-lv-sheet="gift"] .lv-sheet h2 { font-size: .95rem; }
.lv [data-lv-sheet="gift"] .lv-gifts { grid-template-columns: repeat(4, 1fr); gap: 6px; }
.lv [data-lv-sheet="gift"] .lv-giftbtn { padding: 7px 2px; border-radius: 14px; }
.lv [data-lv-sheet="gift"] .lv-giftbtn-e { font-size: 26px; filter: drop-shadow(0 4px 8px rgba(0,0,0,.35)); }
.lv [data-lv-sheet="gift"] .lv-cats button { padding: 5px 8px; font-size: .8rem; }
.lv.sheet-gift .lv-feed { bottom: calc(44dvh + 8px); max-height: 20vh; }
.lv.sheet-gift .lv-hearts { bottom: calc(44dvh + 8px); }
.lv.sheet-gift .lv-bar { opacity: 0; pointer-events: none; }

/* people list: names on one line, the buttons underneath */
.lv-prow { flex-wrap: wrap; row-gap: 6px; }
.lv-pname { flex: 1 1 calc(100% - 50px); }
.lv-pacts { flex: 1 1 100%; justify-content: flex-start; padding-left: 46px; }
.lv-pacts:empty { display: none; }

/* effects layer above everything on the live page */
.lv-fx { position: absolute; inset: 0; top: 0; z-index: 60; display: block; pointer-events: none; overflow: hidden; }
.fx-p { position: absolute; display: block; pointer-events: none; will-change: transform, opacity; }
.fx-emoji { font-size: var(--s, 30px); line-height: 1; filter: drop-shadow(0 6px 12px rgba(0,0,0,.35)); }
.fx-glow { filter: drop-shadow(0 0 18px rgba(255,255,255,.55)) drop-shadow(0 10px 18px rgba(0,0,0,.4)); }
.fx-spark { width: 7px; height: 7px; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px 3px var(--c), 0 0 22px 6px color-mix(in srgb, var(--c) 60%, transparent); }

/* a soap bubble that looks real: clear middle, rainbow film on the rim, a window highlight, a soft glow */
.fx-bubble-wrap { width: var(--s); height: var(--s); }
.fx-bubble { position: relative; display: block; width: 100%; height: 100%; border-radius: 50%;
  background:
    radial-gradient(circle at 30% 26%, rgba(255,255,255,.95) 0 5%, rgba(255,255,255,.55) 7%, rgba(255,255,255,0) 15%),
    radial-gradient(ellipse 22% 12% at 68% 78%, rgba(255,255,255,.55), rgba(255,255,255,0) 70%),
    radial-gradient(circle at 50% 50%, rgba(255,255,255,0) 56%, rgba(255,255,255,.10) 64%, rgba(170,210,255,.32) 71%, rgba(255,150,230,.42) 79%, rgba(150,255,215,.38) 86%, rgba(255,240,170,.42) 92%, rgba(255,255,255,.7) 97%, rgba(255,255,255,0) 100%);
  box-shadow: inset 0 0 calc(var(--s) * .12) rgba(255,255,255,.35), inset calc(var(--s) * -.08) calc(var(--s) * -.1) calc(var(--s) * .2) rgba(120,170,255,.25), 0 0 calc(var(--s) * .3) rgba(170,210,255,.35);
  animation: fx-wobble 2.2s ease-in-out infinite; }
.fx-bubble::after { content: ""; position: absolute; inset: 0; border-radius: 50%; opacity: .45; mix-blend-mode: screen;
  background: conic-gradient(from 0deg, #ff7ad9, #ffd36e, #7dffcf, #7ab8ff, #c38bff, #ff7ad9);
  -webkit-mask: radial-gradient(circle, transparent 62%, #000 74%, #000 92%, transparent 100%); mask: radial-gradient(circle, transparent 62%, #000 74%, #000 92%, transparent 100%);
  animation: fx-film 5s linear infinite; }
.fx-bubble.is-green { box-shadow: inset 0 0 calc(var(--s) * .14) rgba(160,255,190,.5), 0 0 calc(var(--s) * .35) rgba(80,255,150,.45); }
.fx-bubble.is-green::after { background: conic-gradient(from 0deg, #7dff9a, #d6ff6e, #6effe0, #9b7dff, #7dff9a); }
@keyframes fx-wobble { 0%, 100% { border-radius: 50%; transform: scale(1); } 33% { border-radius: 52% 48% 50% 50% / 48% 52% 48% 52%; transform: scale(1.02, .98); } 66% { border-radius: 48% 52% 51% 49% / 52% 48% 52% 48%; transform: scale(.98, 1.02); } }
@keyframes fx-film { to { transform: rotate(360deg); } }

/* the gift, big and glowing in 3D */
.lv-gifthero { position: absolute; left: 50%; top: 38%; width: 150px; height: 150px; margin: -75px 0 0 -75px; display: grid; place-items: center; animation: lgh-in .7s cubic-bezier(.2,1.4,.4,1) both; }
.lv-gifthero.is-big { width: 210px; height: 210px; margin: -105px 0 0 -105px; }
.lv-gifthero.is-drop { animation: lgh-drop .9s cubic-bezier(.3,1.5,.5,1) both; }
.lv-gifthero.is-quick { opacity: 0; }
.lv-gifthero.is-out { animation: lgh-out .4s ease forwards; }
.lgh-emoji { position: relative; z-index: 2; font-size: 96px; line-height: 1; transform-style: preserve-3d;
  filter: drop-shadow(0 2px 0 rgba(255,255,255,.35)) drop-shadow(0 14px 18px rgba(0,0,0,.45)) drop-shadow(0 0 22px color-mix(in srgb, var(--accent, #a78bfa) 70%, transparent));
  animation: lgh-float 1.8s ease-in-out infinite; }
.lv-gifthero.is-big .lgh-emoji { font-size: 140px; }
.lgh-emoji .fx-bubble { --s: 120px; width: 120px; height: 120px; }
.lv-gifthero.is-spin .lgh-emoji { animation: lgh-spin 1.6s ease-in-out infinite; }
.lv-gifthero.is-shake .lgh-emoji { animation: lgh-shake .5s ease-in-out infinite; }
.lgh-halo { position: absolute; inset: -10%; border-radius: 50%; z-index: 1;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent, #a78bfa) 60%, rgba(255,255,255,.4)) 0%, color-mix(in srgb, var(--accent, #a78bfa) 25%, transparent) 40%, transparent 70%);
  filter: blur(6px); animation: lgh-pulse 1.4s ease-in-out infinite; }
.lv-gifthero.is-glassay .lgh-halo { background: radial-gradient(circle, rgba(255,255,255,.55), rgba(139,92,246,.4) 35%, rgba(6,182,212,.25) 55%, transparent 72%); }
.lgh-ring { position: absolute; inset: 4%; border-radius: 50%; z-index: 1; border: 2px solid rgba(255,255,255,.35);
  box-shadow: 0 0 24px rgba(255,255,255,.35), inset 0 0 24px rgba(255,255,255,.2); animation: lgh-ring 1.2s ease-out infinite; }
.lgh-gleam { position: absolute; inset: 0; z-index: 3; border-radius: 50%; pointer-events: none; overflow: hidden;
  background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.55) 48%, transparent 60%); background-size: 250% 100%; mix-blend-mode: overlay; animation: lgh-gleam 1.6s ease-in-out infinite; }
@keyframes lgh-in { from { transform: scale(.2) rotate(-20deg); opacity: 0; } }
@keyframes lgh-drop { from { transform: translateY(-60vh) scale(.6); opacity: 0; } 60% { opacity: 1; } }
@keyframes lgh-out { to { transform: scale(1.4); opacity: 0; filter: blur(4px); } }
@keyframes lgh-float { 0%, 100% { transform: translateY(0) rotateY(-12deg); } 50% { transform: translateY(-10px) rotateY(12deg); } }
@keyframes lgh-spin { 0% { transform: rotateY(0) scale(1); } 50% { transform: rotateY(180deg) scale(1.08); } 100% { transform: rotateY(360deg) scale(1); } }
@keyframes lgh-shake { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-8deg) scale(1.04); } 75% { transform: rotate(8deg) scale(1.04); } }
@keyframes lgh-pulse { 0%, 100% { transform: scale(.9); opacity: .8; } 50% { transform: scale(1.12); opacity: 1; } }
@keyframes lgh-ring { from { transform: scale(.6); opacity: .9; } to { transform: scale(1.5); opacity: 0; } }
@keyframes lgh-gleam { from { background-position: 150% 0; } to { background-position: -50% 0; } }

/* the banner: who sent what to whom */
.lv-fx .lv-giftfx { position: absolute; left: 50%; top: calc(38% + 100px); transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border-radius: 999px; white-space: nowrap;
  background: linear-gradient(135deg, rgba(255,255,255,.28), rgba(255,255,255,.06) 50%), linear-gradient(90deg, rgba(236,72,153,.82), rgba(139,92,246,.78));
  border: 1px solid rgba(255,255,255,.45); box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 18px 40px -16px rgba(236,72,153,.8);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); animation: lgb-in .5s cubic-bezier(.2,1.3,.4,1) both; flex-direction: row; text-align: left; }
.lv-fx .lv-giftfx.is-big { top: calc(38% + 130px); padding: 8px 18px 8px 8px; border-radius: 999px; }
.lv-fx .lv-giftfx.is-glassay { background: linear-gradient(135deg, rgba(255,255,255,.32), rgba(255,255,255,.06) 50%), linear-gradient(120deg, rgba(139,92,246,.82), rgba(6,182,212,.72), rgba(236,72,153,.75)); }
.lv-fx .lv-giftfx.is-out { animation: lgb-out .4s ease forwards; }
.lv-fx .lv-giftfx .lv-av .avatar { width: 34px; height: 34px; }
.lv-giftfx-text { display: grid; line-height: 1.15; font-size: .86rem; }
.lv-giftfx-text small { opacity: .85; font-size: .74rem; }
.lv-giftfx-cr { font-weight: 900; font-size: 1.05rem; color: #fde68a; text-shadow: 0 0 10px rgba(253,230,138,.8); }
@keyframes lgb-in { from { transform: translateX(-50%) translateY(16px) scale(.8); opacity: 0; } }
@keyframes lgb-out { to { transform: translateX(-50%) translateY(-12px); opacity: 0; } }

/* sweeping light for prism, aurora and the palace */
.fx-sweep { position: absolute; inset: 0; mix-blend-mode: screen; animation: fx-sweep 3s ease-in-out forwards; }
.fx-rainbow { background: linear-gradient(115deg, transparent 20%, rgba(255,0,128,.35), rgba(255,200,0,.35), rgba(0,255,170,.35), rgba(0,160,255,.35), rgba(170,0,255,.35), transparent 80%); background-size: 300% 100%; }
.fx-aurora { background: radial-gradient(60% 40% at 30% 30%, rgba(74,222,128,.45), transparent 70%), radial-gradient(50% 40% at 70% 25%, rgba(56,189,248,.45), transparent 70%), radial-gradient(60% 40% at 50% 45%, rgba(167,139,250,.45), transparent 70%); background-size: 200% 100%; }
.fx-gold { background: radial-gradient(70% 50% at 50% 40%, rgba(253,230,138,.55), rgba(250,204,21,.18) 45%, transparent 70%); }
@keyframes fx-sweep { 0% { opacity: 0; background-position: 100% 0; } 25% { opacity: 1; } 75% { opacity: 1; } 100% { opacity: 0; background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) { .lgh-emoji, .fx-bubble, .fx-bubble::after, .lgh-ring, .lgh-gleam { animation-duration: 6s; } }

/* go live from + and the post sheet; live posts in the feed */
.golive-form { flex-wrap: wrap; }
.golive-share { flex: 1 1 100%; font-size: .84rem; }
.ct-live { background: linear-gradient(135deg, #f43f5e, #f97316) !important; color: #fff; }
.create-live { text-decoration: none !important; color: inherit; }
.co-live { background: linear-gradient(135deg, #f43f5e, #f97316); color: #fff; }
a.ps-tool { text-decoration: none !important; color: inherit; }
.live-post { position: relative; display: grid; gap: 8px; margin: 4px 0 2px; padding: 16px; border-radius: 20px; overflow: hidden; color: var(--text); text-decoration: none !important; isolation: isolate;
  border: 1px solid color-mix(in srgb, #e5193c 45%, var(--glass-border));
  background: linear-gradient(135deg, color-mix(in srgb, #e5193c 22%, transparent), color-mix(in srgb, var(--accent) 18%, transparent)); }
.live-post.is-over { border-color: var(--glass-border); background: color-mix(in srgb, var(--accent) 8%, transparent); cursor: default; }
.lp-glow { position: absolute; inset: -40%; z-index: -1; background: radial-gradient(circle at 80% 20%, rgba(244,63,94,.45), transparent 45%); animation: lp-glow 3s ease-in-out infinite; }
.is-over .lp-glow { display: none; }
@keyframes lp-glow { 50% { transform: translate(-8%, 6%) scale(1.1); } }
.lp-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lp-n, .lp-was { display: inline-flex; align-items: center; gap: 5px; font-size: .8rem; font-weight: 700; color: var(--text-soft); }
.lp-n .icon, .lp-was .icon { width: 15px; height: 15px; }
.lp-title { font-size: 1.15rem; line-height: 1.25; }
.lp-faces { display: flex; align-items: center; }
.lp-faces .avatar { margin-right: -8px; border: 2px solid var(--bg); }
.lp-faces small { margin-left: 16px; color: var(--muted); }
.lp-join { justify-self: start; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; font-weight: 800; color: #fff; background: linear-gradient(135deg, #f43f5e, #f97316); box-shadow: 0 10px 24px -10px rgba(244,63,94,.8); }
.lp-join .icon { width: 15px; height: 15px; fill: currentColor; }
.lp-sum { font-size: .84rem; color: var(--muted); }
/* the gift plays in the top half, clear of the chat and the gift shelf */
.lv-gifthero { top: 27%; }
.lv-fx .lv-giftfx { top: calc(27% + 92px); }
.lv-fx .lv-giftfx.is-big { top: calc(27% + 118px); }
.lv.sheet-gift .lv-gifthero { top: 19%; transform: scale(.78); }
.lv.sheet-gift .lv-fx .lv-giftfx { top: calc(19% + 74px); }
.lv.sheet-gift .lv-fx .lv-giftfx.is-big { top: calc(19% + 92px); }
.lv.sheet-gift .lv-feed { max-height: 15vh; }
.lv-fx .lv-giftfx-text { display: block; }
.lv-fx .lv-giftfx-text small { display: block; }

/* ==========================================================================
   2.17.4 — live rings, the 7-button dock, and "spark" (the action pad)
   ========================================================================== */
/* someone live: a glowing red ring and a LIVE tag on their picture, everywhere */
.av-live { position: relative; display: inline-flex; flex: none; border-radius: 50%; vertical-align: middle; }
.av-live::before { content: ""; position: absolute; inset: -3px; border-radius: 50%; z-index: 0; pointer-events: none;
  box-shadow: 0 0 0 2px #ff2d55, 0 0 0 4px rgba(255,45,85,.28), 0 0 14px 3px rgba(255,45,85,.55); animation: av-live-glow 1.6s ease-in-out infinite; }
.av-live > .avatar { position: relative; z-index: 1; }
@keyframes av-live-glow { 50% { box-shadow: 0 0 0 2px #ff2d55, 0 0 0 7px rgba(255,45,85,.16), 0 0 24px 7px rgba(255,45,85,.72); } }
.av-live-tag { position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); padding: 1px 6px; border-radius: 999px; background: linear-gradient(135deg, #ff2d55, #ff6b3d); color: #fff;
  font-size: 9px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; line-height: 1.5; box-shadow: 0 0 0 2px var(--bg, #0b0b18), 0 4px 10px -2px rgba(255,45,85,.8); pointer-events: none; white-space: nowrap; }
.av-live-xs .av-live-tag, .av-live-sm .av-live-tag { font-size: 7px; padding: 0 4px; bottom: -5px; }
.av-live-lg .av-live-tag, .av-live-xl .av-live-tag { font-size: 11px; padding: 2px 9px; bottom: -8px; }
.av-live-xl::before, .av-live-lg::before { inset: -4px; box-shadow: 0 0 0 3px #ff2d55, 0 0 0 7px rgba(255,45,85,.25), 0 0 28px 8px rgba(255,45,85,.6); }
.av-live-tag { z-index: 2; }
@media (prefers-reduced-motion: reduce) { .av-live::before { animation: none; } }
.pf-watchlive { display: inline-flex; align-items: center; gap: 8px; margin: 12px 0 0; padding: 7px 14px 7px 8px; border-radius: 999px; color: #fff; font-weight: 800; text-decoration: none !important;
  background: linear-gradient(135deg, rgba(255,45,85,.85), rgba(255,107,61,.8)); box-shadow: 0 10px 28px -10px rgba(255,45,85,.9); animation: lp-glow 3s ease-in-out infinite; }
.pf-watchlive .lc-live-badge { background: #fff; color: #ff2d55; box-shadow: none; }
.pf-watchlive .lc-live-badge i { background: #ff2d55; }
.pf-watchlive .icon { width: 15px; height: 15px; }
.pf-livebell.is-on { background: linear-gradient(135deg, #ff2d55, #ff6b3d) !important; color: #fff !important; border-color: transparent !important; }

/* the go-live notify choice */
.golive-notify { flex: 1 1 100%; border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.golive-notify legend { color: var(--muted); margin-bottom: 4px; }
.gn-opt { cursor: pointer; }
.gn-opt input { position: absolute; opacity: 0; pointer-events: none; }
.gn-opt span { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--glass-border); font-size: .82rem; font-weight: 700; }
.gn-opt span small { color: var(--muted); font-weight: 600; }
.gn-opt span .icon { width: 14px; height: 14px; }
.gn-opt input:checked + span { background: var(--grad); color: #fff; border-color: transparent; }
.gn-opt input:checked + span small { color: rgba(255,255,255,.85); }

/* the dock: home · live · huddles · spark · alerts · messages · me */
@media (max-width: 820px), (max-height: 500px) and (pointer: coarse) {
  .tabbar.tabbar-7 { padding: 5px 4px; gap: 0; }
  .tabbar.tabbar-7 .nav-link { min-width: 0; flex: 1 1 0; padding: 6px 2px; font-size: .6rem; gap: 2px; }
  .tabbar.tabbar-7 .nav-link .nav-icon .icon { width: 21px; height: 21px; }
  .tabbar.tabbar-7 .nav-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .tabbar.tabbar-7 .tab-compose { flex: 0 0 auto; padding: 0 3px; margin-top: -14px; }
  .tabbar.tabbar-7 .tab-compose .nav-icon { width: 50px; height: 50px; border-radius: 18px; }
  .tabbar.tabbar-7 .tab-compose .nav-label { font-weight: 800; letter-spacing: .03em; }
  .tabbar.tabbar-7 .nav-me .avatar { width: 23px; height: 23px; font-size: 11px; }
  .tabbar.tabbar-7 .nav-me[aria-current="page"] .avatar { box-shadow: 0 0 0 2px var(--accent); }
  .tabbar.tabbar-7 .nav-me .av-live-tag { display: none; }
}
@media (max-width: 360px) { .tabbar.tabbar-7 .nav-label { font-size: .54rem; } }
.tab-compose .nav-icon { position: relative; overflow: hidden; }
.tab-compose .nav-icon::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.45) 48%, transparent 62%); background-size: 260% 100%; animation: sp-shine 4.5s ease-in-out infinite; }
@keyframes sp-shine { 0%, 70% { background-position: 160% 0; } 100% { background-position: -60% 0; } }

/* spark: a sheet of glass with everything you can do */
.spark-bd { z-index: 95; }
.spark-pad { text-align: left; justify-items: stretch; gap: 10px; max-height: 88dvh; overflow-y: auto; padding: 8px 16px calc(18px + env(safe-area-inset-bottom)); overscroll-behavior: contain; }
.sp-head { display: flex; align-items: center; gap: 12px; }
.sp-orb { width: 42px; height: 42px; border-radius: 15px; display: grid; place-items: center; color: #fff; background: var(--grad); box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 10px 24px -10px color-mix(in srgb, var(--accent) 90%, transparent); flex: none; }
.sp-orb .icon { width: 22px; height: 22px; }
.sp-title { flex: 1; display: grid; line-height: 1.15; }
.sp-title h2 { margin: 0; font-size: 1.3rem; letter-spacing: .01em; }
.sp-title small { color: var(--muted); font-size: .78rem; }
.sp-me .avatar { width: 36px; height: 36px; }
.sp-say { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 8px 8px 8px; border-radius: 999px; border: 1px solid var(--glass-border); color: var(--muted); cursor: pointer; font: inherit; text-align: left;
  background: color-mix(in srgb, var(--accent) 8%, var(--input, rgba(255,255,255,.06))); }
.sp-say > span:nth-child(2) { flex: 1; }
.sp-say-plus { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; }
.sp-say-plus .icon { width: 16px; height: 16px; }
.sp-live-strip { display: flex; gap: 12px; overflow-x: auto; padding: 6px 2px 10px; scrollbar-width: none; }
.sp-live-chip { display: grid; justify-items: center; gap: 8px; flex: none; width: 76px; color: var(--text); text-decoration: none !important; font-size: .7rem; font-weight: 700; text-align: center; line-height: 1.2; }
.sp-sec { margin: 6px 2px -2px; font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.sp-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.sp-tile { display: grid; justify-items: center; align-content: start; gap: 7px; padding: 10px 2px 9px; border-radius: 20px; border: 1px solid var(--glass-border); cursor: pointer; font: inherit; color: var(--text); text-decoration: none !important;
  background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.02)), color-mix(in srgb, var(--accent) 6%, transparent);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18); transition: transform .15s var(--ease), background .2s; }
.sp-tile:active { transform: scale(.94); }
.sp-tile:hover { background: linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,.04)), color-mix(in srgb, var(--accent) 12%, transparent); }
.sp-label { font-size: .72rem; font-weight: 700; text-align: center; line-height: 1.15; }
.sp-ic { width: 44px; height: 44px; border-radius: 15px; display: grid; place-items: center; color: #fff; position: relative; overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55), inset 0 -8px 14px -8px rgba(0,0,0,.25), 0 8px 18px -10px rgba(0,0,0,.6); }
.sp-ic::before { content: ""; position: absolute; left: 3px; right: 3px; top: 2px; height: 45%; border-radius: 12px 12px 40% 40%; background: linear-gradient(180deg, rgba(255,255,255,.45), rgba(255,255,255,0)); }
.sp-ic .icon { width: 21px; height: 21px; position: relative; }
.sp-ic .ct-gif-text { position: relative; font-weight: 900; font-size: .8rem; border: 2px solid #fff; border-radius: 6px; padding: 0 4px; }
.sp-post { background: linear-gradient(135deg, #8b5cf6, #6366f1); }
.sp-media { background: linear-gradient(135deg, #0ea5e9, #6366f1); }
.sp-glint { background: conic-gradient(from 200deg, #f472b6, #facc15, #34d399, #38bdf8, #a78bfa, #f472b6); }
.sp-gif { background: linear-gradient(135deg, #22c55e, #84cc16); }
.sp-meme { background: linear-gradient(135deg, #f97316, #f59e0b); }
.sp-bg { background: linear-gradient(135deg, #ec4899, #f97316); }
.sp-poll { background: linear-gradient(135deg, #14b8a6, #0ea5e9); }
.sp-journal { background: linear-gradient(135deg, #a16207, #f59e0b); }
.sp-golive { background: linear-gradient(135deg, #ff2d55, #ff6b3d); animation: sp-pulse 2s ease-in-out infinite; }
@keyframes sp-pulse { 50% { box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 0 0 5px rgba(255,45,85,.18), 0 8px 22px -6px rgba(255,45,85,.8); } }
.sp-watch, .sp-obs { background: linear-gradient(135deg, #e11d48, #9333ea); }
.sp-videos { background: linear-gradient(135deg, #1f2937, #4b5563); }
.sp-streams { background: linear-gradient(135deg, #9146ff, #ff0050); }
.sp-msg { background: linear-gradient(135deg, #3b82f6, #06b6d4); }
.sp-rooms { background: linear-gradient(135deg, #7c3aed, #db2777); }
.sp-huddle { background: linear-gradient(135deg, #10b981, #0ea5e9); }
.sp-albums { background: linear-gradient(135deg, #f43f5e, #fb7185); }
.sp-invite { background: linear-gradient(135deg, #22c55e, #14b8a6); }
.sp-find { background: linear-gradient(135deg, #64748b, #0ea5e9); }
.sp-memories { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.sp-top8 { background: linear-gradient(135deg, #eab308, #a855f7); }
@media (min-width: 600px) { .spark-pad { max-width: 560px; } .sp-grid { grid-template-columns: repeat(4, 1fr); } }

/* ===== 2.18 — streaming from OBS / Streamlabs ===== */
.pill-off { background: rgba(127,127,140,.35); }
.lv-tile .lv-ext { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; z-index: 1; }
.lv-tile.is-ext .lv-face { display: none; }
.lv-tile.is-ext .lv-tag, .lv-tile.is-ext .lv-earned { z-index: 2; pointer-events: none; }
.lv-tile.is-ext video { display: none; }
.lv.is-ext .lv-stage[data-n="1"] .lv-tile.is-ext { background: #000; }
.studio .panel-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.studio-state { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; background: rgba(127,127,140,.22); }
.studio-state i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.studio-state.is-waiting i { animation: studio-blink 1.4s ease-in-out infinite; }
.studio-state.is-live { color: #fff; background: linear-gradient(135deg, #ff2d55, #ff5e3a); box-shadow: 0 0 16px rgba(255,45,85,.55); }
.studio-state.is-live i { background: #fff; animation: studio-blink 1s ease-in-out infinite; }
@keyframes studio-blink { 50% { opacity: .25; } }
.studio-keys { display: grid; gap: 12px; margin-top: 10px; }
.studio-field { display: grid; gap: 4px; font-size: .8rem; font-weight: 700; }
.studio-field small { font-weight: 500; opacity: .7; margin-left: 4px; }
.studio-val { display: flex; gap: 6px; align-items: center; min-width: 0; }
.studio-val input { flex: 1; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .82rem; }
.studio-more summary, .studio-help summary { cursor: pointer; font-size: .82rem; font-weight: 700; opacity: .85; display: flex; align-items: center; gap: 6px; }
.studio-more .studio-val { margin-top: 8px; }
.studio-steps { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 8px; font-size: .84rem; line-height: 1.45; }
.studio-live { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border-radius: 14px; background: var(--surf-tint, rgba(127,127,140,.12)); font-size: .86rem; }
.studio-live .btn { margin-left: auto; }
.studio-prefs { display: grid; gap: 10px; padding-top: 4px; border-top: 1px solid var(--bar-border, rgba(127,127,140,.2)); }
.studio-acts { display: flex; gap: 8px; justify-content: space-between; }
.studio-reset { color: var(--danger, #f43f5e); }

/* ===== 2.18.1 — calmer page changes, no white flash in the profile song player ===== */
[data-pm-embed] { background: #000; }
.pm-frame { opacity: 0; transition: opacity .3s ease; background: #000; color-scheme: normal; }
.pm-frame.is-loaded { opacity: 1; }

/* ===== 2.18.3 — admin: stream from OBS through your own server or Cloudflare ===== */
.ingest-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.ingest-opt { display: none; gap: 10px; }
.ingest-admin form:has(input[name=provider][value=own]:checked) [data-ingest-for=own],
.ingest-admin form:has(input[name=provider][value=cloudflare]:checked) [data-ingest-for=cloudflare] { display: grid; }
.ingest-opt ol { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.ingest-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.linkish { background: none; border: 0; padding: 0; color: var(--accent-ink, var(--accent)); font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }

/* ===== 2.19 — top 8 post alerts ===== */
.t8a-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 8px; margin: 6px 0 12px; }
.t8a-item { display: grid; justify-items: center; gap: 6px; cursor: pointer; text-align: center; min-width: 0; }
.t8a-item input { position: absolute; opacity: 0; pointer-events: none; }
.t8a-face { position: relative; display: grid; place-items: center; border-radius: 50%; padding: 3px; box-shadow: 0 0 0 2px transparent; transition: box-shadow .2s, transform .2s; opacity: .55; }
.t8a-item input:checked + .t8a-face { box-shadow: 0 0 0 2.5px var(--accent); opacity: 1; }
.t8a-item input:focus-visible + .t8a-face { outline: 2px solid var(--accent); outline-offset: 3px; }
.t8a-rank { position: absolute; top: -4px; left: -4px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: .68rem; font-weight: 800; color: #fff; background: var(--grad); }
.t8a-bell { position: absolute; right: -4px; bottom: -4px; width: 22px; height: 22px; border-radius: 50%; display: none; place-items: center; color: #fff; background: var(--accent); box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.t8a-bell .icon { width: 12px; height: 12px; }
.t8a-item input:checked + .t8a-face .t8a-bell { display: grid; }
.t8a-name { font-size: .76rem; font-weight: 650; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t8a-acts { display: flex; gap: 8px; justify-content: flex-end; }

/* 2.19 — live: front / back camera switch (the back camera isn't mirrored) */
.lv.is-back-cam .lv-tile.is-me video { transform: none; }
.lv-btn.is-spin .icon { animation: lv-spin .45s ease; }
@keyframes lv-spin { to { transform: rotate(180deg); } }

/* ===== 2.19 — lives on the videos page ===== */
.lv-embed-body { margin: 0; background: #05050a; color: #fff; overflow: hidden; }
.lv.lv-embed { position: fixed; inset: 0; z-index: 1; }
.lv-embed .lv-top, .lv-embed .lv-bar, .lv-embed .lv-start, .lv-embed .lv-invite, .lv-embed .lv-note, .lv-embed .lv-feed, .lv-embed [data-lv-sheet] { display: none !important; }
.lv-embed .lv-stage { padding: 0; gap: 2px; }
.lv-embed .lv-tile, .lv-embed .lv-stage[data-n] .lv-tile { border-radius: 0; }
.lv-embed-self { position: fixed; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px; text-align: center; font-family: var(--font); }
.lv-embed-self .icon { width: 42px; height: 42px; color: #ff2d55; }
.lv-embed-self small { opacity: .7; }
.vs-live .vs-stage { background: radial-gradient(120% 80% at 50% 30%, #2a1030, #05050a 70%); }
.vs-live-glow { position: absolute; inset: 0; box-shadow: inset 0 0 0 2px rgba(255,45,85,.55), inset 0 0 60px rgba(255,45,85,.25); pointer-events: none; z-index: 4; border-radius: inherit; }
.vs-live .vs-frame { background: #05050a; }
.vs-live-top { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.vs-live-n { display: inline-flex; align-items: center; gap: 5px; font-size: .78rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: rgba(0,0,0,.4); }
.vs-live-n .icon { width: 13px; height: 13px; }
.vs-live-faces { display: inline-flex; align-items: center; gap: 2px; margin-top: 6px; }
.vs-live-faces small { margin-left: 6px; font-size: .74rem; opacity: .85; }
.vs-live-join { margin-top: 10px; align-self: flex-start; box-shadow: 0 8px 24px rgba(255,45,85,.35); }
.vs-live .vs-info { display: flex; flex-direction: column; align-items: flex-start; }

/* ===== 2.19 — group chats ===== */
.grp-faces { position: relative; display: inline-block; width: 46px; height: 46px; flex: none; }
.grp-faces > * { position: absolute; width: 32px; height: 32px; }
.grp-faces > * .avatar { width: 100%; height: 100%; }
.grp-faces > * { box-shadow: 0 0 0 2px var(--bg, #0b0b18); border-radius: 50%; }
.grp-faces > :first-child { top: 0; left: 0; }
.grp-faces > :nth-child(2) { right: 0; bottom: 0; }
.grp-faces > :only-child { inset: 0; width: 46px; height: 46px; }
.dm-thread-head .grp-faces { width: 38px; height: 38px; }
.dm-thread-head .grp-faces > * { width: 26px; height: 26px; }
.dm-thread-head .grp-faces > :only-child { width: 38px; height: 38px; }
.grp-n { display: inline-flex; align-items: center; gap: 2px; font-weight: 700; margin-right: 2px; }
.grp-n .icon { width: 12px; height: 12px; }
.grp-who { background: none; border: 0; padding: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.grp-who span { display: grid; min-width: 0; }
.grp-who small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grp-pane { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.grp-new { margin-left: auto; margin-right: 6px; }
.grp-new-row { display: flex; justify-content: flex-end; padding: 0 4px 6px; }
.grp-newpage { max-width: 640px; margin: 0 auto; }
.grp-newhead { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.grp-filter { width: 100%; }
.grp-pick { display: grid; gap: 4px; max-height: min(52vh, 520px); overflow-y: auto; overscroll-behavior: contain; padding: 2px; }
.grp-person { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 16px; cursor: pointer; color: inherit; text-decoration: none; text-align: left; }
.grp-person:hover { background: var(--glass-hover); }
.grp-person[hidden] { display: none; }
.grp-person input { position: absolute; opacity: 0; pointer-events: none; }
.grp-person-txt { display: grid; flex: 1; min-width: 0; line-height: 1.25; }
.grp-tick { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--glass-border); color: transparent; transition: .15s; flex: none; }
.grp-tick .icon { width: 14px; height: 14px; }
.grp-person:has(input:checked) { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.grp-person:has(input:checked) .grp-tick { background: var(--accent); border-color: var(--accent); color: #fff; }
.grp-bar { position: sticky; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 10px; }
.grp-sheet { text-align: left; justify-items: stretch; }
.grp-sheet h2 { display: flex; align-items: center; gap: 8px; margin: 0; }
.grp-rename { display: flex; gap: 8px; }
.grp-rename input { flex: 1; min-width: 0; }
.grp-members { display: grid; gap: 2px; max-height: 44vh; overflow-y: auto; }
.grp-sheet-acts { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.form .grp-person { display: flex; grid-template-columns: none; margin: 0; font-weight: 500; }
.form .grp-person-txt { gap: 0; }
.grp-bar { z-index: 3; padding: 10px 0 4px; background: linear-gradient(0deg, color-mix(in srgb, var(--bg, #0b0b18) 70%, transparent), transparent); }
@media (max-width: 900px), (max-height: 500px) and (pointer: coarse) { .grp-newpage .grp-bar { bottom: calc(86px + env(safe-area-inset-bottom)); } }

/* ===== 2.19.1 — speed: posts far off screen aren't drawn until you scroll near them
   (each glass card blurs what's behind it, which is expensive for phones; long feeds now scroll smoothly) ===== */
.feed[data-feed-list] > .post:not(.menu-open):not(:has(.menu:not([hidden]))):not(:has(.comments:not([hidden]))) {
  content-visibility: auto;
  contain-intrinsic-block-size: auto 480px; /* height only — a width here made posts wider than the screen (2.19.2) */
}
/* 2.19.1: a finger that lands on the dock never starts scrolling the page — so a slightly sliding tap still counts */
.tabbar, .tabbar * { touch-action: none; }

/* ===== 2.19.3 — live: beta tags, a tidier live page ===== */
.beta-tag { display: inline-flex; align-items: center; padding: 1px 6px; border-radius: 999px; font-size: .6rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; line-height: 1.4;
  color: #fff; background: linear-gradient(135deg, #f59e0b, #ec4899); box-shadow: 0 2px 8px rgba(236,72,153,.35); vertical-align: middle; white-space: nowrap; }
.page-title .beta-tag, .panel-title .beta-tag { font-size: .62rem; margin-left: 4px; }
.beta-tag.beta-dot { position: absolute; top: -7px; right: -14px; font-size: .5rem; padding: 0 4px; pointer-events: none; z-index: 2; }
.nav-icon, .sp-ic, .co-ic { position: relative; }
.sp-sec .beta-tag { margin-left: 6px; font-size: .55rem; }
.lv-beta { margin-right: auto; margin-left: 2px; font-size: .55rem; }
.drawer-link .beta-tag { margin-left: 6px; font-size: .55rem; }
.lives-now { margin-bottom: 18px; }
.lives-now .section-title { display: flex; align-items: center; gap: 8px; }
.ln-dot { width: 9px; height: 9px; border-radius: 50%; background: #ff2d55; box-shadow: 0 0 0 4px rgba(255,45,85,.18); animation: studio-blink 1.6s ease-in-out infinite; }
.live-empty { padding: 26px 16px; }
.golive { display: grid; gap: 12px; }
.golive .panel-title { margin: 0; }
.golive-tabs { display: grid; grid-template-columns: 1fr 1fr; }
.golive-tabs .seg-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.golive-tabs .seg-btn .icon { width: 16px; height: 16px; }
.golive-pane { display: grid; gap: 10px; }
.golive-pane[hidden] { display: none; }
.golive-pane > .muted { margin: 0; }
.golive-more { flex: 1 1 100%; }
.golive-more summary { cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 700; opacity: .8; list-style: none; padding: 4px 0; }
.golive-more summary::-webkit-details-marker { display: none; }
.golive-more summary .icon { width: 14px; height: 14px; }
.golive-more[open] { display: grid; gap: 8px; }
.studio-top { display: flex; justify-content: flex-end; min-height: 0; }
.studio-top:has([hidden]) { display: none; }
.golive-tabs { width: 100%; box-sizing: border-box; }
.golive-tabs .seg-btn { padding: 9px 10px; border: 0; border-radius: 999px; background: none; font: inherit; font-size: .86rem; font-weight: 700; color: var(--text-soft); cursor: pointer; transition: background-color .2s, color .2s; }
.golive-tabs .seg-btn.is-on { background: var(--accent); color: #fff; box-shadow: 0 4px 14px -6px var(--accent); }

/* 2.19.3 — videos page: a clip this phone can't play says so */
.vs-bad .vs-stage::after { content: "this video can’t play here — tap to open it"; position: absolute; left: 50%; right: auto; bottom: auto; height: auto; top: calc(50% + 56px); transform: translateX(-50%); z-index: 5;
  width: max-content; max-width: 62%; text-align: center; padding: 8px 14px; border-radius: 16px; background: rgba(255,255,255,.16); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.22); color: #fff; font-size: .82rem; font-weight: 700; line-height: 1.35; pointer-events: none; }

/* 2.19.3 — live room: the watcher count opens who's here (one less button in the bar), roomier chat */
.lv-stat-btn { position: relative; font: inherit; color: inherit; cursor: pointer; border: 0; }
.lv-stat-btn .lv-dot { top: -2px; right: -2px; }
.lv-bar { gap: 6px; }
.lv-say { min-width: 96px; }
@media (max-width: 400px) { .lv.is-stage .lv-btn { width: 38px; height: 38px; } }

/* ===== 2.19.4 — tagging in group chats ===== */
.msg.tags-me .msg-bubble { box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 70%, transparent), 0 6px 18px -8px var(--accent); }
.msg-text .mention, .msg-text .mention-all { font-weight: 800; color: inherit; text-decoration: none; background: color-mix(in srgb, var(--accent) 26%, transparent); padding: 0 4px; border-radius: 6px; }
.mb-all { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; flex: none; }
.mb-all .icon { width: 16px; height: 16px; }
.chat-tag { flex: none; }

/* ===== 2.19.4 — settings: a short menu, one topic at a time ===== */
.set-menu { display: grid; gap: 14px; }
.set-search { display: flex; align-items: center; gap: 8px; padding: 0 14px; border-radius: 999px; background: var(--input); border: 1px solid var(--input-border); }
.set-search .icon { width: 18px; height: 18px; opacity: .6; flex: none; }
.set-search input { flex: 1; min-width: 0; border: 0; background: none; padding: 12px 0; font: inherit; color: inherit; outline: none; box-shadow: none; }
.set-me { display: flex; align-items: center; gap: 14px; padding: 14px 16px; color: inherit; text-decoration: none; }
.set-me-txt, .set-row-txt { display: grid; flex: 1; min-width: 0; line-height: 1.3; }
.set-me-txt strong { font-size: 1.05rem; }
.set-me-txt small, .set-row-txt small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-go { width: 18px; height: 18px; opacity: .45; flex: none; }
.set-list { display: grid; padding: 6px; gap: 2px; }
.set-row { display: flex; align-items: center; gap: 12px; padding: 11px 10px; border-radius: 16px; color: inherit; text-decoration: none; transition: background-color .15s; }
.set-row:hover, .set-row:active { background: var(--glass-hover); }
.set-row[hidden], .set-me[hidden], .set-list:not(:has(.set-row:not([hidden]))) { display: none; }
.set-ic { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; color: #fff; flex: none; box-shadow: inset 0 1px 0 rgba(255,255,255,.35); }
.set-ic .icon { width: 18px; height: 18px; }
.set-ic-look { background: linear-gradient(135deg, #a855f7, #ec4899); }
.set-ic-alerts { background: linear-gradient(135deg, #f43f5e, #fb923c); }
.set-ic-music { background: linear-gradient(135deg, #ec4899, #f43f5e); }
.set-ic-privacy { background: linear-gradient(135deg, #3b82f6, #22d3ee); }
.set-ic-family { background: linear-gradient(135deg, #10b981, #84cc16); }
.set-ic-account { background: linear-gradient(135deg, #6366f1, #8b5cf6); }
.set-ic-data { background: linear-gradient(135deg, #0ea5e9, #14b8a6); }
.set-ic-delete { background: linear-gradient(135deg, #ef4444, #b91c1c); }
.set-row.danger strong { color: var(--danger, #ef4444); }
.set-group-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.set-group-head h1 { margin: 0; font-size: 1.5rem; }
/* with JavaScript: the menu, or one topic */
body.set-js .settings-section { display: none; }
body.set-js.set-open .settings-section.is-shown { display: block; }
body.set-js.set-open [data-set-menu], body.set-js.set-open .set-head { display: none; }
body.set-js:not(.set-open) [data-set-grouphead] { display: none; }
.set-search input[type=search], .set-search input { border: 0 !important; background: none !important; box-shadow: none !important; padding-left: 0; padding-right: 0; border-radius: 0; }

/* 2.19.5 — the tag list in a chat sits just above the message box */
.mention-box.mb-docked { position: absolute; left: 8px; right: 8px; top: auto; bottom: calc(100% + 6px); width: auto; max-width: 420px; max-height: min(264px, 38vh); }
/* 2.19.6 — group chat in the messages panel */
.ap-head .grp-faces { width: 38px; height: 38px; }
.ap-head .grp-faces > * { width: 26px; height: 26px; }
.ap-head .grp-faces > :only-child { width: 38px; height: 38px; }
.ap-head .grp-who { text-decoration: none; }

/* ===== 2.19.7 — settings inside the glass panel ===== */
.ap-frame { padding: 0 !important; overflow: hidden !important; }
.ap-frame iframe { display: block; width: 100%; height: 100%; border: 0; background: transparent; color-scheme: normal; }
html:has(body.is-embed) { background: transparent !important; }
body.is-embed { background: transparent !important; }
body.is-embed > .bg, body.is-embed .topbar, body.is-embed .sidebar, body.is-embed .rightbar, body.is-embed .tabbar, body.is-embed .skip-link, body.is-embed .ptr { display: none !important; }
body.is-embed .shell { padding: 10px 14px calc(24px + env(safe-area-inset-bottom)) !important; display: block; max-width: 640px; margin: 0 auto; }
body.is-embed .main { padding: 0 !important; margin: 0 !important; }
body.is-embed .set-head { display: none; }
body.is-embed .set-group-head { margin-top: 2px; }

/* ===== 2.19.9 — one customize page in settings ===== */
.cz-preview { display: block; position: relative; border-radius: 18px; overflow: hidden; text-decoration: none; color: #fff; margin: 4px 0 12px; box-shadow: 0 6px 20px rgba(0,0,0,.18); }
.cz-cover { display: block; height: 92px; background: var(--pf-grad); background-size: cover; background-position: center; }
.cz-who { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--pf-grad); }
.cz-who > span { display: flex; flex-direction: column; min-width: 0; }
.cz-who strong { font-size: 1.05rem; }
.cz-who small { opacity: .85; }
.cz-who .avatar { box-shadow: 0 0 0 3px rgba(255,255,255,.7); margin-top: -34px; }
.cz-quick { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
.cz-swatches .swatch { width: 38px; height: 38px; }
.cz-preview, .cz-preview:hover, .cz-preview * { text-decoration: none !important; color: #fff; }
.cz-quick { flex-wrap: nowrap; margin-bottom: 14px; }
.cz-quick .btn { flex: 1 1 0; justify-content: center; white-space: nowrap; padding-left: 10px; padding-right: 10px; }

/* ===== 2.19.11 — new message in the messages panel ===== */
.ap-new-btn { margin-left: auto; }
.ap-newmsg .ap-head h2 { flex: 1; }
.nm-body { display: flex; flex-direction: column; padding-bottom: 96px; }
.nm-to { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 12px; margin: 4px 0 6px; border-radius: 16px; background: var(--glass-2, rgba(127,127,127,.12)); }
.nm-to-label { font-weight: 600; opacity: .7; }
.nm-chips { display: contents; }
.nm-chip { border: 0; border-radius: 999px; padding: 5px 10px; background: var(--grad); color: #fff; font: inherit; font-size: .88rem; cursor: pointer; }
.nm-chip::after { content: ' ×'; opacity: .8; }
.nm-q { flex: 1; min-width: 120px; border: 0; background: transparent; color: inherit; font: inherit; font-size: 16px; padding: 6px 2px; outline: none; }
.nm-hint { margin: 0 4px 6px; }
.nm-list { display: flex; flex-direction: column; gap: 2px; }
.nm-person { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 10px; border: 0; border-radius: 14px; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.nm-person:hover { background: var(--glass-2, rgba(127,127,127,.1)); }
.nm-txt { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.nm-txt strong, .nm-txt small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nm-tick { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 2px rgba(127,127,127,.45); color: transparent; flex: none; transition: background .15s, box-shadow .15s; }
.nm-tick svg { width: 15px; height: 15px; }
.nm-person.is-picked .nm-tick { background: var(--grad); box-shadow: none; color: #fff; }
.nm-bar { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; gap: 8px; padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); background: var(--glass-strong, rgba(30,24,50,.85)); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-top: 1px solid rgba(255,255,255,.1); z-index: 3; }
.nm-bar[hidden] { display: none; }
.nm-name { width: 100%; font-size: 16px; }
.nm-go { width: 100%; justify-content: center; }
.ap-newmsg { position: relative; }
.grp-new-row { display: flex; gap: 8px; }
.nm-to input.nm-q, .nm-to input.nm-q:focus { border: 0 !important; background: transparent !important; box-shadow: none !important; padding: 6px 2px; margin: 0; }
.nm-bar { background: var(--bg); border-top-color: var(--line); }
.nm-bar .nm-name { background: var(--glass-hover, rgba(127,127,127,.12)); }
.nm-has-bar .nm-body { padding-bottom: 180px; }

/* ===== 2.19.12 — camera filters, full view / fill ===== */
.glint-canvas.is-fit .glint-cam { object-fit: contain; }
.glint-fx-out { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.glint-canvas.is-fit .glint-fx-out { object-fit: contain; }
.glint-fx-out.is-mirrored { transform: scaleX(-1); }
.glint-fit { position: absolute; z-index: 3; top: 62px; right: 12px; width: 44px; height: 44px; font-size: .68rem; font-weight: 800; letter-spacing: .02em; color: #fff; background: rgba(0,0,0,.38); border: 1px solid rgba(255,255,255,.18); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.glint-fit .gf-fill, .glint-canvas.is-fit .glint-fit .gf-full { display: none; }
.glint-canvas.is-fit .glint-fit .gf-fill { display: inline; }
.glint-fx { position: absolute; left: 0; right: 0; bottom: 118px; z-index: 3; }
.camfx-strip { display: flex; gap: 10px; overflow-x: auto; padding: 6px 14px; scroll-snap-type: x proximity; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.camfx-strip::-webkit-scrollbar { display: none; }
.camfx-chip { flex: none; display: grid; justify-items: center; gap: 4px; border: 0; background: none; padding: 0; color: #fff; font: inherit; cursor: pointer; scroll-snap-align: center; }
.camfx-sw { width: 46px; height: 46px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(255,255,255,.35), 0 4px 12px rgba(0,0,0,.35); transition: transform .15s, box-shadow .15s; }
.camfx-name { font-size: .66rem; font-weight: 700; white-space: nowrap; text-shadow: 0 1px 4px rgba(0,0,0,.7); opacity: .85; }
.camfx-chip.is-on .camfx-sw { transform: scale(1.12); box-shadow: 0 0 0 3px #fff, 0 4px 14px rgba(0,0,0,.4); }
.camfx-chip.is-on .camfx-name { opacity: 1; }
.is-recording .glint-fx, .is-recording .glint-fit { opacity: 0; pointer-events: none; }
@media (max-width: 820px), (hover: none) and (pointer: coarse) {
  .glint-create .glint-fit { top: calc(env(safe-area-inset-top) + 62px); }
  .glint-create .glint-fx { bottom: calc(env(safe-area-inset-bottom) + 140px); }
}
/* live: the profile photo only shows while there's no picture (camera off or still connecting) */
.lv-tile.has-video:not(.cam-off) .lv-face { opacity: 0; visibility: hidden; transition: opacity .3s, visibility 0s .3s; }
.lv.lv-fit .lv-tile video { object-fit: contain; }
.lv.lv-fit .lv-stage[data-n="1"] .lv-tile, .lv.lv-fit .lv-stage[data-n="0"] .lv-tile { background: #000; }
.lv-fitbtn { position: absolute; z-index: 5; right: 12px; top: calc(env(safe-area-inset-top) + 118px); height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid rgba(255,255,255,.22); background: rgba(0,0,0,.35); color: #fff; font: inherit; font-size: .72rem; font-weight: 800; letter-spacing: .03em; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); cursor: pointer; }
.lv-fitbtn .gf-fill, .lv.lv-fit .lv-fitbtn .gf-full { display: none; }
.lv.lv-fit .lv-fitbtn .gf-fill { display: inline; }
.lv-embed .lv-fitbtn, .lv-embed .lv-fxstrip { display: none !important; }
.lv-fxstrip { position: absolute; z-index: 6; left: 0; right: 0; bottom: calc(env(safe-area-inset-bottom) + 66px); }
.lv.fx-open .lv-feed { opacity: .25; pointer-events: none; }
.lv-fx-btn.is-on { background: var(--grad); border-color: transparent; }

/* ===== 2.19.13 — tagging in live chat ===== */
.lv-say { position: relative; }
.lv-say .mention-box.mb-docked { left: 0; right: auto; width: min(320px, calc(100vw - 20px)); z-index: 8; }
.mb-here { background: rgba(239,68,68,.16); color: #f87171; }
.lv-line .lv-at { color: #7dd3fc; font-weight: 700; }
.lv-line.lv-tagme { background: linear-gradient(135deg, rgba(124,58,237,.55), rgba(6,182,212,.45)); box-shadow: 0 0 0 1px rgba(255,255,255,.25); }

/* ===== 2.19.14 — slimmer replies: a small bubble (name + text), then one quiet line: time · react · delete ===== */
.comments { gap: 8px; padding-top: 10px; }
.comment-list { gap: 8px; }
.comment.c-slim { gap: 8px; }
.c-slim .c-av .avatar { width: 28px; height: 28px; font-size: .72rem; }
.c-slim .c-av { flex: none; margin-top: 2px; }
.c-slim .c-main { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.c-slim .comment-bubble { flex: none; display: inline-block; width: auto; max-width: 100%; padding: 6px 12px 7px; border-radius: 16px; border: 0; background: var(--glass-hover, rgba(127,127,127,.12)); line-height: 1.3; }
.c-slim .comment-bubble .post-name { display: block; font-size: .8rem; font-weight: 750; line-height: 1.25; }
.c-slim .comment-bubble p { margin: 1px 0 0; font-size: .9rem; line-height: 1.32; }
.c-slim > .c-main > .post-media { margin: 6px 0 0; border-radius: 14px; max-width: 240px; width: 100%; }
.c-slim .post-media.media-1 .pm-item img { max-height: 260px; }
.c-slim .c-meta { display: flex; align-items: center; gap: 2px; margin: 2px 0 0 4px; min-height: 26px; font-size: .74rem; color: var(--muted); }
.c-slim .c-time { padding: 0 6px 0 4px; font-weight: 600; }
.c-slim .c-time time, .c-slim .c-time * { font-size: inherit; color: inherit; }
.c-slim .c-meta .action { padding: 3px 6px; min-height: 0; font-size: .74rem; }
.c-slim .c-meta .react-face, .c-slim .c-meta .react-face .icon { width: 14px; height: 14px; }
.c-slim .c-meta .react-emoji { font-size: .85rem; }
.c-slim .c-meta .react-sum { padding: 1px 6px 1px 3px; gap: 3px; font-size: .74rem; }
.c-slim .c-meta .rs-e { width: 17px; height: 17px; font-size: .6rem; box-shadow: none; background: transparent; }
.c-del { border: 0; background: none; padding: 3px 6px; color: var(--muted); font: inherit; font-size: .74rem; font-weight: 650; cursor: pointer; opacity: .8; }
.c-del:hover { color: var(--danger); opacity: 1; }
.comment-form { gap: 6px; }
.comment-form input { padding: 8px 14px !important; font-size: 16px; }
@media (max-width: 820px), (max-height: 500px) and (pointer: coarse) { .comment-form input { min-height: 38px !important; } }
.comment-form .avatar { width: 28px; height: 28px; }
.reply-launch .reply-field { min-height: 38px !important; padding-top: 7px !important; padding-bottom: 7px !important; font-size: .9rem; }
.reply-launch .icon-btn { width: 36px; height: 36px; }

/* ===== 2.20 — Flickers ===== */
/* camera: two ways to share */
.glint-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.glint-actions .btn { width: 100%; justify-content: center; }
.glint-share-btn { background: rgba(255,255,255,.14) !important; color: inherit !important; box-shadow: inset 0 0 0 1px rgba(255,255,255,.22) !important; }
.flk-sendto-btn { background: linear-gradient(135deg, #ff4d6d, #ff8a3d) !important; border: 0 !important; color: #fff !important; }
.glint-create.flk-off .flk-sendto-btn, .glint-create-backdrop.flk-off .flk-sendto-btn { display: none; }
.flk-off .glint-actions { grid-template-columns: 1fr; }
.flk-off .glint-share-btn { background: var(--grad) !important; color: #fff !important; box-shadow: none !important; }
.flk-off .gn-flk { display: none; }
.flk-direct .gn-glint { display: none; }
.flk-direct .glint-actions { grid-template-columns: 1fr 1.6fr; }
/* send-to list */
.flk-sheet { position: fixed; inset: 0; z-index: 30; display: flex; flex-direction: column; background: var(--bg, #0b0b14); color: var(--text); padding: calc(env(safe-area-inset-top) + 8px) 0 0; animation: flk-up .22s var(--ease); }
@keyframes flk-up { from { transform: translateY(24px); opacity: 0; } }
.flk-sheet[hidden] { display: none; }
.flk-sheet-head { display: flex; align-items: center; gap: 8px; padding: 4px 12px 8px; }
.flk-sheet-head h3 { font-size: 1.1rem; font-weight: 800; }
.flk-search { display: flex; align-items: center; gap: 8px; margin: 0 14px 8px; padding: 0 12px; border-radius: 999px; background: var(--glass-hover, rgba(127,127,127,.12)); }
.flk-search .icon { width: 17px; height: 17px; opacity: .6; }
.flk-search input { flex: 1; border: 0 !important; background: transparent !important; box-shadow: none !important; padding: 10px 0 !important; font-size: 16px; color: inherit; outline: none; }
.flk-list { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 0 8px 120px; }
.flk-sec { margin: 12px 8px 4px; font-size: .74rem; font-weight: 750; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.flk-row { display: flex; align-items: center; gap: 12px; padding: 8px 8px; border-radius: 14px; cursor: pointer; }
.flk-row:hover { background: var(--glass-hover, rgba(127,127,127,.1)); }
.flk-row input { position: absolute; opacity: 0; pointer-events: none; }
.flk-row .avatar { width: 42px; height: 42px; }
.flk-row-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.flk-row-txt strong, .flk-row-txt small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flk-row-txt small { color: var(--muted); }
.flk-story-ic { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; flex: none; }
.flk-tick { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 2px rgba(127,127,127,.45); color: transparent; flex: none; transition: background .15s; }
.flk-tick .icon, .flk-tick svg { width: 15px; height: 15px; }
.flk-row:has(input:checked) .flk-tick { background: linear-gradient(135deg, #ff4d6d, #ff8a3d); box-shadow: none; color: #fff; }
.flk-row-story:has(input:checked) .flk-tick { background: var(--grad); }
.flk-bar { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 10px; padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); background: var(--bg, #0b0b14); border-top: 1px solid var(--line); }
.flk-bar[hidden] { display: none; }
.flk-summary { flex: 1; min-width: 0; font-weight: 700; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flk-go { background: linear-gradient(135deg, #ff4d6d, #ff8a3d) !important; border: 0 !important; }
.flk-note { position: absolute; left: 0; right: 0; bottom: calc(env(safe-area-inset-bottom) + 76px); text-align: center; font-size: .7rem; color: var(--muted); pointer-events: none; }
.flk-sheet:has(.flk-bar[hidden]) .flk-note { bottom: calc(env(safe-area-inset-bottom) + 14px); }
/* streaks */
.flk-streak { display: inline-flex; align-items: center; gap: 1px; font-size: .78rem; font-weight: 800; color: #ff8a3d; vertical-align: 1px; }
.flk-streak.is-risk { color: #fbbf24; }
/* inbox rows */
.flk-st { display: inline-flex; align-items: center; gap: 6px; margin-top: 1px; max-width: 100%; font-size: .8rem; font-weight: 650; color: var(--muted); background: none; border: 0; padding: 0; font-family: inherit; cursor: default; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.flk-st small { font-weight: 500; opacity: .8; }
.flk-st time { font-size: inherit; color: inherit; }
.flk-ico { width: 13px; height: 13px; flex: none; border-radius: 3px; border: 2px solid #ff4d6d; }
.flk-st.is-video .flk-ico { border-color: #a855f7; }
.flk-new .flk-ico, .flk-replay .flk-ico { background: #ff4d6d; }
.flk-new.is-video .flk-ico, .flk-replay.is-video .flk-ico { background: #a855f7; }
.flk-out .flk-ico { border: 0; border-radius: 0; width: 0; height: 0; border-left: 11px solid #ff4d6d; border-top: 6px solid transparent; border-bottom: 6px solid transparent; background: none; }
.flk-out.is-video .flk-ico { border-left-color: #a855f7; }
.flk-out.flk-seen .flk-ico, .flk-out.flk-replayed .flk-ico { border-left-color: transparent; width: 11px; height: 11px; border: 2px solid #ff4d6d; border-radius: 0; clip-path: polygon(0 0, 100% 50%, 0 100%); }
.flk-new { color: #ff4d6d; font-weight: 800; cursor: pointer; }
.flk-new.is-video { color: #a855f7; }
.flk-replay { cursor: pointer; }
.has-flk .dm-convo { background: linear-gradient(90deg, rgba(255,77,109,.10), transparent 70%); }
.flk-cam-btn { flex: none; width: 34px; height: 34px; margin-left: 6px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); background: var(--glass-hover, rgba(127,127,127,.1)); cursor: pointer; }
.flk-cam-btn .icon { width: 17px; height: 17px; }
.flk-cam-btn:hover { color: #ff4d6d; }
.dm-convo { align-items: center; }
/* the viewer */
.flk-viewer { position: fixed; inset: 0; z-index: 160; background: #000; color: #fff; display: grid; }
.flk-viewer[hidden] { display: none; }
.flk-stage { position: absolute; inset: 0; display: grid; place-items: center; cursor: pointer; }
.flk-media { max-width: 100%; max-height: 100%; width: 100%; height: 100%; object-fit: contain; }
.flk-caption { position: absolute; left: 0; right: 0; bottom: 18%; margin: 0 auto; width: fit-content; max-width: 90%; padding: 8px 14px; border-radius: 12px; background: rgba(0,0,0,.5); font-weight: 650; text-align: center; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.flk-top { position: absolute; left: 0; right: 0; top: 0; padding: calc(env(safe-area-inset-top) + 8px) 12px 18px; background: linear-gradient(180deg, rgba(0,0,0,.55), transparent); z-index: 2; pointer-events: none; }
.flk-top > * { pointer-events: auto; }
.flk-bars { display: flex; gap: 4px; margin-bottom: 10px; }
.flk-bars span { flex: 1; height: 3px; border-radius: 3px; background: rgba(255,255,255,.3); overflow: hidden; }
.flk-bars span.is-done i { width: 100% !important; }
.flk-bars i { display: block; height: 100%; width: 0; background: #fff; }
.flk-who { display: flex; align-items: center; gap: 8px; }
.flk-who .avatar { width: 34px; height: 34px; }
.flk-who small { opacity: .75; }
.flk-x { margin-left: auto; color: #fff; background: rgba(0,0,0,.3); }
.flk-sound { position: absolute; z-index: 3; right: 14px; bottom: calc(env(safe-area-inset-bottom) + 20px); width: 44px; height: 44px; border-radius: 50%; border: 0; color: #fff; background: rgba(0,0,0,.45); display: grid; place-items: center; }
.flk-end { position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; background: rgba(0,0,0,.72); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.flk-end[hidden] { display: none; }
.flk-end-card { display: grid; justify-items: center; gap: 10px; padding: 24px; text-align: center; }
.flk-end-card .avatar { width: 76px; height: 76px; }
.flk-end-card strong { font-size: 1.2rem; }
.flk-end-acts { display: grid; gap: 8px; width: min(280px, 80vw); margin-top: 6px; }
.flk-end-acts .btn { width: 100%; justify-content: center; }
.flk-end-acts [data-flk-reply] { background: linear-gradient(135deg, #ff4d6d, #ff8a3d) !important; border: 0 !important; }
.flk-end-acts .btn-ghost { color: #fff; border-color: rgba(255,255,255,.25); background: rgba(255,255,255,.1); }
.flk-end-close { color: rgba(255,255,255,.75); margin-top: 6px; background: none; border: 0; font: inherit; cursor: pointer; }
.flk-note, .flk-sheet:has(.flk-bar[hidden]) .flk-note { position: static; margin: -2px 16px 6px; text-align: left; font-size: .72rem; color: var(--muted); }
.ct-flicker, .sp-flicker { background: linear-gradient(135deg, #ff4d6d, #ff8a3d); }

/* ===== 2.21 — camera looks: smooth skin + portrait switches over the filter row ===== */
.camfx-ctl { display: grid; gap: 6px; }
.camfx-toggles { display: flex; justify-content: center; gap: 8px; }
.camfx-tg { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid rgba(255,255,255,.28); background: rgba(0,0,0,.38); color: #fff; font: inherit; font-size: .76rem; font-weight: 750; cursor: pointer; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); transition: background .15s, border-color .15s; }
.camfx-tg-ic { font-size: .9rem; line-height: 1; }
.camfx-tg.is-on { background: #fff; color: #111; border-color: #fff; }
.camfx-ctl .camfx-strip { padding-top: 7px; }
.camfx-ctl .camfx-sw { width: 42px; height: 42px; }
.lv-fxstrip .camfx-toggles { justify-content: flex-start; padding: 0 14px; }

/* ===== 2.21 — editing before you share: draw, text, filters ===== */
.glint-canvas.is-editing .glint-preview { object-fit: contain; }
.ged { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.ged > * { pointer-events: auto; }
.ged-box { position: absolute; overflow: hidden; pointer-events: none; }
.ged-box > * { position: absolute; inset: 0; width: 100%; height: 100%; }
.ged-draw { pointer-events: none; touch-action: none; }
.ged.is-drawing .ged-draw { pointer-events: auto; cursor: crosshair; }
.ged-texts { pointer-events: none; }
.ged-fx { object-fit: fill; }
.ged-text { position: absolute; transform: translate(-50%, -50%); pointer-events: auto; touch-action: none; cursor: grab; white-space: pre; text-align: center; font-weight: 800; line-height: 1.18; text-shadow: 0 0 .18em rgba(0,0,0,.55); padding: 0 .1em; user-select: none; -webkit-user-select: none; }
.ged-text.has-bg { text-shadow: none; padding: .2em .45em; border-radius: .6em; }
.ged-tools { position: absolute; right: 12px; top: calc(env(safe-area-inset-top) + 64px); display: flex; flex-direction: column; gap: 10px; }
.ged-tool { width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,.22); background: rgba(0,0,0,.4); color: #fff; display: grid; place-items: center; font: inherit; font-size: .95rem; font-weight: 800; cursor: pointer; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.ged-tool .icon { width: 19px; height: 19px; }
.ged-tool.is-on { background: #fff; color: #111; }
.ged-tool[hidden] { display: none; }
.ged-pal { position: absolute; left: 10px; right: 64px; top: calc(env(safe-area-inset-top) + 64px); display: flex; align-items: center; gap: 7px; flex-wrap: wrap; padding: 8px 10px; border-radius: 18px; background: rgba(0,0,0,.42); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.ged-col { width: 26px; height: 26px; border-radius: 50%; border: 2px solid rgba(255,255,255,.7); background: var(--c); cursor: pointer; padding: 0; }
.ged-col.is-on { transform: scale(1.18); border-color: #fff; box-shadow: 0 0 0 2px rgba(0,0,0,.35); }
.ged-sep { width: 1px; height: 22px; background: rgba(255,255,255,.3); margin: 0 2px; }
.ged-size { width: 30px; height: 30px; border-radius: 50%; border: 0; background: transparent; display: grid; place-items: center; cursor: pointer; }
.ged-size i { width: var(--s); height: var(--s); border-radius: 50%; background: rgba(255,255,255,.65); }
.ged-size.is-on i { background: #fff; box-shadow: 0 0 0 2px rgba(255,255,255,.35); }
.ged-looks { position: absolute; left: 0; right: 0; bottom: calc(env(safe-area-inset-bottom) + 150px); }
.ged-textin { position: absolute; inset: 0; z-index: 8; display: grid; align-content: center; gap: 12px; padding: 24px; background: rgba(0,0,0,.55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.ged-textin textarea { width: 100%; border: 0 !important; background: transparent !important; box-shadow: none !important; text-align: center; font-size: 2rem !important; font-weight: 800; line-height: 1.2; resize: none; outline: none; text-shadow: 0 0 .18em rgba(0,0,0,.5); }
.ged-textin-acts { display: flex; justify-content: center; gap: 10px; }
.ged-bgtoggle { width: 38px; height: 38px; border-radius: 10px; border: 2px solid #fff; background: transparent; color: #fff; font-weight: 900; cursor: pointer; }
.ged-bgtoggle.is-on { background: #fff; color: #111; }
.ged-busy .glint-bottom, .ged-busy .glint-clear { opacity: 0; pointer-events: none; }
.ged-busy:has(.ged-textin:not([hidden])) .ged-pal { z-index: 9; }
/* clips: the drawing rides along on top */
.gv-media .gv-ov { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; z-index: 1; }
.flk-ov { position: absolute; inset: 0; pointer-events: none; }
.flk-text { position: absolute; inset: 0; color: #fff; }
.flk-st.is-text .flk-ico { border-color: #38bdf8; }
.flk-new.is-text .flk-ico, .flk-replay.is-text .flk-ico { background: #38bdf8; }
.flk-new.is-text { color: #38bdf8; }
.flk-out.is-text .flk-ico { border-left-color: #38bdf8; }
.ged-pal.for-text { z-index: 9; }
.ged-pal.for-text .ged-size, .ged-pal.for-text .ged-sep { display: none; }
.ged-aa, .ged-bgtoggle { text-transform: none !important; }

/* ===== 2.21 — a slimmer spark pad ===== */
.spark-pad.sp-slim { gap: 8px; padding: 6px 14px calc(14px + env(safe-area-inset-bottom)); }
.sp-slim .sp-say { padding: 6px; }
.sp-slim .sp-say .avatar { width: 30px; height: 30px; }
.sp-cams { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sp-cam { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 18px; border: 1px solid var(--glass-border); background: var(--glass); color: var(--text); font: inherit; text-align: left; cursor: pointer; min-width: 0; transition: transform .12s; }
.sp-cam:active { transform: scale(.97); }
.sp-cam-ic { width: 38px; height: 38px; flex: none; border-radius: 13px; display: grid; place-items: center; color: #fff; }
.sp-cam-ic .icon { width: 20px; height: 20px; }
.sp-cam-glint .sp-cam-ic { background: conic-gradient(from 200deg, #f472b6, #facc15, #34d399, #38bdf8, #a78bfa, #f472b6); }
.sp-cam-flk .sp-cam-ic { background: linear-gradient(135deg, #ff4d6d, #ff8a3d); }
.sp-cam-txt { display: flex; flex-direction: column; min-width: 0; }
.sp-cam-txt strong { font-size: .92rem; line-height: 1.15; }
.sp-cam-txt small { font-size: .66rem; color: var(--muted); line-height: 1.2; }
.sp-slim .sp-sec { margin: 4px 2px -4px; font-size: .64rem; }
.sp-slim .sp-grid { grid-template-columns: repeat(5, 1fr); gap: 4px 2px; }
.sp-slim .sp-tile { gap: 4px; padding: 6px 0 4px; border: 0; background: none !important; box-shadow: none !important; border-radius: 14px; }
.sp-slim .sp-tile:hover { background: var(--glass-hover) !important; }
.sp-slim .sp-ic { width: 40px; height: 40px; border-radius: 13px; }
.sp-slim .sp-ic .icon { width: 19px; height: 19px; }
.sp-slim .sp-label { font-size: .66rem; font-weight: 650; color: var(--text-soft, var(--text)); }
@media (min-width: 600px) { .sp-slim .sp-grid { grid-template-columns: repeat(5, 1fr); } }
/* glint vs flicker: each button says where it goes */
.gdest { gap: 9px !important; padding-top: 8px !important; padding-bottom: 8px !important; min-height: 54px; }
.gdest-txt { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.1; text-align: left; }
.gdest-txt > span { font-weight: 800; }
.gdest-txt small { font-size: .68rem; font-weight: 600; opacity: .85; }
.co-flk { background: linear-gradient(135deg, #ff4d6d, #ff8a3d); }
.glint-share-btn.gdest { background: conic-gradient(from 200deg at 15% 50%, rgba(244,114,182,.45), rgba(250,204,21,.35), rgba(52,211,153,.35), rgba(56,189,248,.45), rgba(167,139,250,.5), rgba(244,114,182,.45)) !important; color: #fff !important; box-shadow: inset 0 0 0 1px rgba(255,255,255,.25) !important; }
.cam-help { margin-top: 12px; padding: 10px 12px; border-radius: 14px; background: var(--glass-hover, rgba(127,127,127,.1)); }
.cam-help summary { cursor: pointer; font-weight: 700; display: flex; align-items: center; gap: 8px; list-style: none; }
.cam-help summary .icon { width: 17px; height: 17px; }
.cam-help ol { margin: 6px 0 6px 18px; display: grid; gap: 4px; }
.cam-help p { margin: 6px 0 0; }

/* ===== 2.21.1 — flickers inside a chat; the camera opens over the chat ===== */
.glint-create-backdrop { z-index: 120; }
.dm-flk:empty { display: none; }
.flk-thread { display: flex; align-items: center; gap: 8px; margin: 6px 10px 2px; padding: 7px 8px 7px 12px; border-radius: 16px; background: var(--glass-hover, rgba(127,127,127,.1)); border: 1px solid var(--glass-border); }
.flk-thread.is-new { background: linear-gradient(90deg, rgba(255,77,109,.18), rgba(255,138,61,.08)); border-color: rgba(255,77,109,.4); }
.flk-thread .flk-st { flex: 1; min-width: 0; font-size: .82rem; }
.flk-thread .flk-st[data-flk-open] { cursor: pointer; }
.flk-none { color: var(--muted); font-weight: 600; }
.flk-none .flk-ico { border-color: var(--muted); }
.flk-thread-cam { flex: none; display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 12px; border-radius: 999px; border: 0; background: linear-gradient(135deg, #ff4d6d, #ff8a3d); color: #fff; font: inherit; font-size: .78rem; font-weight: 800; cursor: pointer; }
.flk-thread-cam .icon { width: 16px; height: 16px; }
.nb-kind.nb-flicker { background: linear-gradient(135deg, #ff4d6d, #ff8a3d); box-shadow: 0 0 0 4px rgba(255,77,109,.2); border-radius: 3px; }

/* ===== 2.22 — flickers in the chat; react & reply from a flicker ===== */
.flk-msg { display: inline-flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 18px; border: 1.5px solid rgba(255,77,109,.55); background: rgba(255,77,109,.08); color: inherit; font: inherit; text-align: left; min-width: 170px; }
button.flk-msg { cursor: pointer; }
.flk-msg .flk-ico { width: 16px; height: 16px; border-radius: 4px; border: 2.5px solid #ff4d6d; flex: none; }
.flk-msg.is-video { border-color: rgba(168,85,247,.6); background: rgba(168,85,247,.08); }
.flk-msg.is-video .flk-ico { border-color: #a855f7; }
.flk-msg.is-text { border-color: rgba(56,189,248,.6); background: rgba(56,189,248,.08); }
.flk-msg.is-text .flk-ico { border-color: #38bdf8; }
.flk-msg.flk-new .flk-ico, .flk-msg.flk-replay .flk-ico, .flk-msg.flk-delivered .flk-ico { background: #ff4d6d; }
.flk-msg.is-video.flk-new .flk-ico, .flk-msg.is-video.flk-delivered .flk-ico, .flk-msg.is-video.flk-replay .flk-ico { background: #a855f7; }
.flk-msg.is-text.flk-new .flk-ico, .flk-msg.is-text.flk-delivered .flk-ico, .flk-msg.is-text.flk-replay .flk-ico { background: #38bdf8; }
.flk-msg.flk-new { background: linear-gradient(135deg, rgba(255,77,109,.28), rgba(255,138,61,.18)); }
.flk-msg-txt { display: flex; flex-direction: column; line-height: 1.2; }
.flk-msg-txt strong { font-size: .9rem; }
.flk-msg-txt small { font-size: .76rem; opacity: .8; font-weight: 600; }
.flk-msg.flk-gone { opacity: .55; }
.msg-out .flk-msg { color: inherit; }
.flk-replybar { position: absolute; z-index: 5; left: 0; right: 0; bottom: 0; display: grid; gap: 8px; padding: 10px 12px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(0deg, rgba(0,0,0,.6), transparent); }
.flk-replybar[hidden] { display: none; }
.flk-reacts { display: flex; justify-content: center; gap: 8px; }
.flk-react { width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); font-size: 1.3rem; cursor: pointer; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); transition: transform .12s; }
.flk-react:active { transform: scale(.9); }
.flk-react.is-on { background: rgba(255,255,255,.9); transform: scale(1.12); }
.flk-replyrow { display: flex; gap: 8px; align-items: center; }
.flk-replyrow input { flex: 1; height: 44px; border-radius: 999px !important; border: 1px solid rgba(255,255,255,.3) !important; background: rgba(0,0,0,.35) !important; color: #fff !important; padding: 0 16px !important; font-size: 16px; }
.flk-replyrow input::placeholder { color: rgba(255,255,255,.7); }
.flk-replysend { color: #fff; background: linear-gradient(135deg, #ff4d6d, #ff8a3d) !important; }
.flk-viewer .flk-caption { bottom: calc(env(safe-area-inset-bottom) + 130px); }
.flk-viewer .flk-sound { bottom: calc(env(safe-area-inset-bottom) + 130px); }
/* voice note */
.gvoice { position: absolute; z-index: 5; left: 12px; top: 64px; display: flex; align-items: center; gap: 8px; }
@media (max-width: 820px), (hover: none) and (pointer: coarse) { .glint-create .gvoice { top: calc(env(safe-area-inset-top) + 64px); } }
.gvoice[hidden] { display: none; }
.gvoice-mic.is-rec { background: #ff3b5c; border-color: #ff3b5c; animation: gv-pulse 1s ease-in-out infinite; }
@keyframes gv-pulse { 50% { box-shadow: 0 0 0 10px rgba(255,59,92,.25); } }
.gvoice-chip { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 6px 0 4px; border-radius: 999px; background: rgba(0,0,0,.5); color: #fff; font-weight: 800; font-size: .85rem; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.gvoice-chip[hidden] { display: none; }
.gvoice-chip button { width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(255,255,255,.18); color: #fff; display: grid; place-items: center; cursor: pointer; }
.gvoice-chip .icon { width: 15px; height: 15px; }
.gvoice-chip::before { content: '🎙'; margin-left: 4px; }
.ged-busy .gvoice { opacity: 0; pointer-events: none; }
/* zoom + flash */
.glint-flash { position: absolute; z-index: 3; top: 114px; right: 12px; width: 44px; height: 44px; flex-direction: column; gap: 0; color: #fff; background: rgba(0,0,0,.38); border: 1px solid rgba(255,255,255,.18); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); line-height: 1; }
.glint-flash .gfl-ic { font-size: 1rem; filter: grayscale(1) brightness(2); }
.glint-flash small { font-size: .52rem; font-weight: 800; letter-spacing: .02em; }
.glint-flash.is-on { background: #ffd23f; color: #111; border-color: #ffd23f; }
.glint-flash.is-on .gfl-ic { filter: none; }
@media (max-width: 820px), (hover: none) and (pointer: coarse) { .glint-create .glint-flash { top: calc(env(safe-area-inset-top) + 114px); } }
.gzoom { position: absolute; z-index: 3; left: 50%; transform: translateX(-50%); bottom: 228px; display: flex; gap: 6px; padding: 4px; border-radius: 999px; background: rgba(0,0,0,.32); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.gzoom:empty { display: none; }
@media (max-width: 820px), (hover: none) and (pointer: coarse) { .glint-create .gzoom { bottom: calc(env(safe-area-inset-bottom) + 248px); } }
.gz-chip { min-width: 36px; height: 36px; padding: 0 8px; border-radius: 999px; border: 0; background: transparent; color: #fff; font: inherit; font-size: .8rem; font-weight: 800; cursor: pointer; }
.gz-chip.is-on { background: rgba(255,255,255,.92); color: #111; }
.gscreenflash { position: fixed; inset: 0; z-index: 9; background: #fffaf0; pointer-events: none; }
.is-recording .gzoom { opacity: .6; }
.is-recording .glint-flash { opacity: 0; pointer-events: none; }
.glint-canvas:has(.ged.is-drawing) .gvoice { display: none; }
.glint-fx, .glint-fx .camfx-ctl, .glint-fx .camfx-toggles { pointer-events: none; }
.glint-fx .camfx-tg, .glint-fx .camfx-strip { pointer-events: auto; }
@media (max-width: 820px), (hover: none) and (pointer: coarse) { .glint-create .gzoom { bottom: calc(env(safe-area-inset-bottom) + 262px); } }

/* 2.22.1 — flicker in the chat tray, reply-with-a-flicker, your own flicker */
.co-flk { background: linear-gradient(135deg, #f59e0b, #ec4899); color: #fff; }
.rb-flk { display: inline-flex; align-items: center; gap: 4px; flex: none; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--glass-border); background: var(--glass); color: inherit; font: inherit; font-size: .8rem; font-weight: 600; cursor: pointer; }
.rb-flk.is-hot { background: linear-gradient(135deg, #f59e0b, #ec4899); color: #fff; border-color: transparent; }
.rb-flk:active { transform: scale(.95); }
.flk-msg[data-flk-peek] { cursor: pointer; }
.chat-tray { max-width: calc(100% - 20px); overflow-x: auto; scrollbar-width: none; }
.chat-tray::-webkit-scrollbar { display: none; }
.chat-tray .chat-tool { flex: none; }
@media (max-width: 480px) { .chat-tray { gap: 0; padding: 6px 4px; } .chat-tray .chat-tool { padding: 6px 3px; min-width: 54px; font-size: .66rem; white-space: nowrap; } }

/* 2.22.2 — report sheet, blocking */
.rs-backdrop { position: fixed; inset: 0; z-index: 400; display: grid; align-items: end; justify-items: center; background: rgba(6, 8, 20, .5); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.rs-backdrop[hidden] { display: none; }
.report-sheet { width: min(520px, 100%); max-height: 88dvh; overflow-y: auto; padding: 18px 16px calc(16px + env(safe-area-inset-bottom)); border-radius: 26px 26px 0 0; display: grid; gap: 10px; animation: rise .22s var(--ease); }
@media (min-width: 700px) { .rs-backdrop { align-items: center; } .report-sheet { border-radius: 26px; } }
.rs-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rs-head h2 { margin: 0; font-size: 1.1rem; }
.report-sheet > p { margin: -4px 0 2px; }
.rs-opts { display: grid; gap: 6px; }
.rs-opt { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 14px; background: var(--glass); border: 1px solid var(--glass-border); cursor: pointer; font-weight: 600; font-size: .92rem; }
.rs-opt input { accent-color: var(--danger, #ef4444); width: 18px; height: 18px; margin: 0; }
.rs-opt:has(input:checked) { border-color: var(--danger, #ef4444); background: color-mix(in srgb, var(--danger, #ef4444) 12%, var(--glass)); }
.rs-note { display: grid; gap: 4px; }
.rs-note textarea { width: 100%; resize: vertical; }
.rs-also { font-size: .9rem; }
.rs-urgent { margin: 0; padding: 10px 12px; border-radius: 14px; background: color-mix(in srgb, #f59e0b 16%, transparent); border: 1px solid color-mix(in srgb, #f59e0b 45%, transparent); }
.rs-urgent .icon { width: 15px; height: 15px; vertical-align: -2px; }
.cp-safety { display: flex; gap: 8px; flex-wrap: wrap; padding: 4px 0 2px; }
.cp-safety[hidden] { display: none; }
.cp-safety .btn { flex: 1; }
.cp-safety .danger, .menu .danger { color: var(--danger, #ef4444); }
.rp-report small, .rp-report span { color: var(--danger, #ef4444); }
.c-report { opacity: .7; }
.flk-flag .icon { width: 17px; height: 17px; }
.blocked-card { display: grid; justify-items: center; gap: 8px; text-align: center; }
.blocked-list { display: grid; gap: 8px; }
.blocked-row { display: flex; align-items: center; gap: 10px; }
.blocked-row .bl-name { flex: 1; min-width: 0; }
.blocked-row .bl-name small { display: block; }
.report-snap { margin: 6px 0; padding: 8px 12px; border-left: 3px solid var(--danger, #ef4444); background: var(--glass); border-radius: 10px; white-space: pre-wrap; }
.report-kept { display: block; max-width: 220px; max-height: 320px; border-radius: 12px; margin: 6px 0; }
.legal { padding: 18px 18px 24px; line-height: 1.6; max-width: 760px; margin: 0 auto; }
.legal h1 { margin: 14px 0 2px; font-size: 1.5rem; }
.legal h2 { margin: 20px 0 4px; font-size: 1.05rem; }
.legal ul { padding-left: 20px; display: grid; gap: 6px; }
.legal-tabs { margin: 0 auto 6px 0; }
.auth-legal { text-align: center; margin-top: 10px; }
.terms-agree { align-items: flex-start; font-size: .88rem; line-height: 1.4; }
.terms-agree input { margin-top: 3px; flex: none; }
.terms-gate { z-index: 500; }
.terms-gate .gd-title .icon { width: 18px; height: 18px; vertical-align: -3px; }
.legal-links .set-row { padding-left: 4px; }
.auth-shell:has(.legal) { display: block; width: 100%; min-width: 0; max-width: min(820px, 100vw); box-sizing: border-box; max-width: 820px; margin: 0 auto; padding: 70px 14px 30px; }
.legal { min-width: 0; width: 100%; box-sizing: border-box; overflow-wrap: anywhere; }
.legal .legal-tabs { max-width: 100%; }
.legal-back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 8px; font-weight: 600; }
.legal .legal-tabs.tabs-compact { width: auto; }
.report-sheet .rs-opts, .report-sheet .rs-opt, .report-sheet .rs-note { width: 100%; max-width: none; justify-self: stretch; box-sizing: border-box; margin: 0; }
.report-sheet .rs-opt { display: flex; }

/* 2.22.4 — an opened flicker you sent: a clean outlined triangle (the old box border cut through it) */
.flk-out.flk-seen .flk-ico, .flk-out.flk-replayed .flk-ico, .flk-out.flk-opened .flk-ico {
  width: 12px; height: 13px; border: 0 !important; border-radius: 0; clip-path: none; background: none !important;
  -webkit-mask: none; mask: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 13'%3E%3Cpath d='M1.6 1.7 10.3 6.5 1.6 11.3Z' fill='none' stroke='%23ff4d6d' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important; background-position: center !important; background-size: contain !important;
}
.flk-out.is-video.flk-seen .flk-ico, .flk-out.is-video.flk-replayed .flk-ico, .flk-out.is-video.flk-opened .flk-ico {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 13'%3E%3Cpath d='M1.6 1.7 10.3 6.5 1.6 11.3Z' fill='none' stroke='%23a855f7' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
}
.flk-out.is-text.flk-seen .flk-ico, .flk-out.is-text.flk-replayed .flk-ico, .flk-out.is-text.flk-opened .flk-ico {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 13'%3E%3Cpath d='M1.6 1.7 10.3 6.5 1.6 11.3Z' fill='none' stroke='%2338bdf8' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
}

/* ==========================================================================
   2.23 — Develop (shared disposable camera)
   ========================================================================== */
.page-develop main { max-width: 760px; }
.dv-hero { position: relative; overflow: hidden; padding: 26px 20px 22px; border-radius: 28px; text-align: center; display: grid; gap: 10px; justify-items: center; }
.dv-hero h1 { margin: 6px 0 0; font-size: 2.2rem; letter-spacing: -.02em; background: linear-gradient(120deg, #f59e0b, #ef4444 50%, #a855f7); -webkit-background-clip: text; background-clip: text; color: transparent; }
.dv-hero p { margin: 0; max-width: 460px; line-height: 1.5; }
.dv-hero-film { display: flex; gap: 6px; padding: 8px 10px; border-radius: 10px; background: #1c1410; box-shadow: inset 0 0 0 2px #2b1f17; }
.dv-hero-film span { width: 34px; height: 24px; border-radius: 4px; background: linear-gradient(135deg, #fbbf24, #f97316 60%, #7c2d12); opacity: .9; position: relative; }
.dv-hero-film span:nth-child(2) { filter: hue-rotate(60deg); } .dv-hero-film span:nth-child(3) { filter: hue-rotate(160deg); } .dv-hero-film span:nth-child(4) { filter: hue-rotate(250deg); } .dv-hero-film span:nth-child(5) { filter: hue-rotate(300deg); }
.dv-how { list-style: none; margin: 4px 0 6px; padding: 0; display: grid; gap: 8px; text-align: left; }
.dv-how li { display: flex; gap: 10px; align-items: center; font-weight: 600; font-size: .95rem; }
.dv-how span { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: .8rem; color: #fff; background: linear-gradient(135deg, #f59e0b, #ef4444); }
.dv-rolls { display: grid; gap: 10px; }
.dv-roll { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 20px; color: inherit; text-decoration: none; }
.dv-roll-can, .dv-roll-cover { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 1.6rem; flex: none; overflow: hidden; background: linear-gradient(135deg, #f59e0b33, #ef444433); }
.dv-roll-cover img { width: 100%; height: 100%; object-fit: cover; filter: sepia(.15) saturate(1.15); }
.dv-roll-txt { flex: 1; min-width: 0; display: grid; }
.dv-roll-txt strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dv-left { display: grid; justify-items: center; line-height: 1; }
.dv-left b { font-size: 1.3rem; color: #f59e0b; } .dv-left small { font-size: .7rem; opacity: .7; }
.dv-roll.is-open { box-shadow: inset 0 0 0 1.5px #f59e0b66; }
.dv-go { opacity: .5; }
.dv-none { margin: 22px 0; }
.dv-head { display: flex; align-items: center; gap: 10px; margin: 4px 0 12px; }
.dv-head-txt { flex: 1; min-width: 0; }
.dv-head h1 { margin: 0; font-size: 1.45rem; overflow-wrap: anywhere; }
.dv-wait { padding: 20px 16px; border-radius: 26px; display: grid; gap: 14px; justify-items: center; text-align: center; }
.dv-count { display: grid; gap: 2px; }
.dv-count strong { font-size: 2.4rem; font-variant-numeric: tabular-nums; letter-spacing: -.02em; background: linear-gradient(120deg, #f59e0b, #ef4444); -webkit-background-clip: text; background-clip: text; color: transparent; }
.dv-film { display: grid; grid-template-columns: repeat(9, 1fr); gap: 5px; padding: 10px; border-radius: 12px; background: #1c1410; width: min(320px, 100%); box-sizing: border-box; }
.dv-film i { aspect-ratio: 1.3; border-radius: 3px; background: linear-gradient(135deg, #fbbf24, #f97316); box-shadow: inset 0 0 0 1px #0004; transition: opacity .3s, transform .3s; }
.dv-film i.used { opacity: .18; transform: scale(.85); }
.dv-left-line { margin: 0; }
.dv-left-line b { color: #f59e0b; font-size: 1.1rem; }
.dv-shoot { display: grid; justify-items: center; gap: 6px; background: none; border: 0; color: inherit; font: inherit; font-weight: 700; cursor: pointer; }
.dv-shoot-ring { width: 86px; height: 86px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: radial-gradient(circle at 35% 30%, #fbbf24, #ef4444 70%); box-shadow: 0 0 0 5px #f59e0b33, 0 14px 30px -10px #ef4444aa; transition: transform .15s; }
.dv-shoot-ring .icon { width: 34px; height: 34px; }
.dv-shoot:active .dv-shoot-ring { transform: scale(.94); }
.dv-shoot:disabled { opacity: .45; cursor: default; }
.dv-people { margin-top: 6px; }
.dv-faces { display: flex; flex-wrap: wrap; gap: 12px; }
.dv-face { display: grid; justify-items: center; gap: 4px; color: inherit; text-decoration: none; background: none; border: 0; font: inherit; cursor: pointer; width: 58px; }
.dv-face small { font-size: .72rem; max-width: 58px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dv-plus { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; border: 1.5px dashed var(--muted); }
.dv-done { padding: 14px 16px; border-radius: 22px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.dv-done-line { margin: 0; }
.dv-done-tag { display: inline-block; padding: 2px 9px; border-radius: 999px; background: linear-gradient(135deg, #f59e0b, #ef4444); color: #fff; font-weight: 700; font-size: .78rem; }
.dv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; border-radius: 18px; overflow: hidden; }
@media (min-width: 640px) { .dv-grid { grid-template-columns: repeat(4, 1fr); } }
.dv-tile { position: relative; aspect-ratio: 3 / 4; padding: 0; border: 0; background: #111; overflow: hidden; cursor: zoom-in; }
.dv-tile img, .dv-tile video { width: 100%; height: 100%; object-fit: cover; display: block; filter: sepia(.12) saturate(1.12) contrast(1.04); }
.dv-tile::after { content: ''; position: absolute; inset: 0; box-shadow: inset 0 0 40px #0006; pointer-events: none; }
.dv-vid { position: absolute; top: 6px; left: 6px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: #0008; color: #fff; }
.dv-vid .icon { width: 12px; height: 12px; }
.dv-stamp { position: absolute; right: 6px; bottom: 5px; font: 700 .62rem/1 ui-monospace, "Courier New", monospace; color: #ff8a1f; text-shadow: 0 0 4px #ff6a0099, 0 0 1px #000; letter-spacing: .06em; pointer-events: none; z-index: 1; }
.dv-stamp-big { font-size: .95rem; right: 18px; bottom: calc(env(safe-area-inset-bottom) + 92px); position: absolute; }
.dv-hearts { position: absolute; left: 6px; bottom: 5px; font-size: .7rem; font-weight: 700; color: #fff; text-shadow: 0 1px 3px #000a; z-index: 1; }
/* sheets */
.dv-sheet-bd { position: fixed; inset: 0; z-index: 300; display: grid; align-items: end; justify-items: center; background: rgba(6, 8, 20, .5); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.dv-sheet-bd[hidden] { display: none; }
.dv-sheet { width: min(520px, 100%); max-height: 90dvh; overflow-y: auto; box-sizing: border-box; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); border-radius: 26px 26px 0 0; display: grid; gap: 12px; animation: rise .22s var(--ease); }
@media (min-width: 700px) { .dv-sheet-bd { align-items: center; } .dv-sheet { border-radius: 26px; } }
.dv-sheet > label, .dv-sheet input[type=search], .dv-sheet input[name=title] { width: 100%; box-sizing: border-box; }
.dv-whenpick { display: grid; gap: 6px; }
.dv-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.dv-chips label { cursor: pointer; }
.dv-chips input { position: absolute; opacity: 0; pointer-events: none; }
.dv-chips span { display: inline-block; padding: 8px 12px; border-radius: 999px; background: var(--glass); border: 1px solid var(--glass-border); font-weight: 600; font-size: .86rem; }
.dv-chips input:checked + span { background: linear-gradient(135deg, #f59e0b, #ef4444); color: #fff; border-color: transparent; }
.dv-pick { display: grid; gap: 6px; }
.dv-pick-list { display: grid; gap: 4px; max-height: 36dvh; overflow-y: auto; }
.dv-person { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 14px; cursor: pointer; }
.dv-person[hidden] { display: none; }
.dv-person.is-on { background: color-mix(in srgb, #f59e0b 14%, transparent); }
.dv-pn { flex: 1; font-weight: 600; }
.dv-person input { position: absolute; opacity: 0; pointer-events: none; }
.dv-check { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--muted); flex: none; }
.dv-person.is-on .dv-check { border-color: #f59e0b; background: #f59e0b radial-gradient(circle, #fff 30%, transparent 32%); }
/* camera */
.dv-cam { position: fixed; inset: 0; z-index: 260; background: #000; color: #fff; display: grid; }
.dv-cam[hidden] { display: none; }
.dv-cam video { width: 100%; height: 100%; object-fit: cover; }
.dv-cam video.is-mirrored { transform: scaleX(-1); }
.dv-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.dv-flash.go { animation: dv-flash .45s ease-out; }
@keyframes dv-flash { 0% { opacity: .95; } 100% { opacity: 0; } }
.dv-cam-top { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: calc(env(safe-area-inset-top) + 10px) 14px 10px; background: linear-gradient(#0009, transparent); }
.dv-cam-top .icon-btn { color: #fff; background: #0005; }
.dv-cam-title { font-weight: 700; text-shadow: 0 1px 4px #000; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dv-cam-msg { position: absolute; left: 20px; right: 20px; top: 40%; text-align: center; background: #000a; padding: 14px; border-radius: 16px; }
.dv-cam-bottom { position: absolute; left: 0; right: 0; bottom: calc(env(safe-area-inset-bottom) + 34px); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 24px; }
.dv-cam-left { display: grid; justify-items: center; line-height: 1; justify-self: start; padding: 8px 12px; border-radius: 14px; background: #0006; }
.dv-cam-left b { font-size: 1.4rem; color: #fbbf24; } .dv-cam-left small { font-size: .7rem; }
.dv-cam-status { justify-self: end; font-size: .78rem; opacity: .8; }
.dv-shutter { width: 84px; height: 84px; border-radius: 50%; border: 0; padding: 0; background: radial-gradient(circle, #fff 58%, transparent 60%); cursor: pointer; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.dv-shutter svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.dv-ring-bg { fill: none; stroke: #fff9; stroke-width: 5; }
.dv-ring { fill: none; stroke: #ef4444; stroke-width: 5; stroke-dasharray: 226; stroke-dashoffset: 226; stroke-linecap: round; }
.dv-shutter.is-rec { background: radial-gradient(circle, #ef4444 40%, transparent 42%); }
.dv-shutter:active { transform: scale(.95); }
.dv-cam-hint { position: absolute; left: 0; right: 0; bottom: calc(env(safe-area-inset-bottom) + 8px); margin: 0; text-align: center; font-size: .76rem; opacity: .75; }
body.dv-cam-on, body.dv-view-on, body.dv-sheet-open { overflow: hidden; }
/* viewer + reveal */
.dv-view { position: fixed; inset: 0; z-index: 250; background: #050505; color: #fff; display: grid; }
.dv-view[hidden] { display: none; }
.dv-view-stage { position: absolute; inset: 0; display: grid; place-items: center; }
.dv-media { max-width: 100%; max-height: 100%; width: 100%; height: 100%; object-fit: contain; filter: sepia(.1) saturate(1.1); }
.dv-developing { animation: dv-develop 1.6s ease-out both; }
@keyframes dv-develop { 0% { filter: sepia(1) brightness(.15) blur(14px) contrast(.6); transform: scale(1.04); } 55% { filter: sepia(.7) brightness(.7) blur(4px); } 100% { filter: sepia(.1) saturate(1.1) brightness(1) blur(0); transform: scale(1); } }
.dv-view-top { position: absolute; top: 0; left: 0; right: 0; padding: calc(env(safe-area-inset-top) + 8px) 12px 18px; background: linear-gradient(#000b, transparent); display: grid; gap: 8px; z-index: 2; }
.dv-bars { display: flex; gap: 2px; }
.dv-bars i { flex: 1; height: 3px; border-radius: 3px; background: #fff3; }
.dv-bars i.done { background: #fff; } .dv-bars i.on { background: linear-gradient(90deg, #fff 50%, #fff3 50%); background-size: 200% 100%; animation: dv-bar 3.2s linear forwards; }
@keyframes dv-bar { from { background-position: 100% 0; } to { background-position: 0 0; } }
.dv-view-who { display: flex; align-items: center; gap: 8px; }
.dv-view-who strong { font-size: 1rem; } .dv-view-who small { opacity: .7; flex: 1; }
.dv-view-who .icon-btn { color: #fff; background: #0005; }
.dv-view-bar { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; gap: 4px; padding: 14px 10px calc(env(safe-area-inset-bottom) + 14px); background: linear-gradient(transparent, #000c); z-index: 2; }
.dv-tool { display: grid; justify-items: center; gap: 3px; min-width: 58px; padding: 6px 4px; border: 0; border-radius: 14px; background: none; color: #fff; font: inherit; font-size: .72rem; font-weight: 600; cursor: pointer; text-decoration: none; }
.dv-tool[hidden] { display: none; }
.dv-tool .icon { width: 20px; height: 20px; }
.dv-heart { font-size: 1.3rem; line-height: 20px; }
.dv-tool.is-on .dv-heart { color: #ff4d6d; }
.dv-tool.danger { color: #fca5a5; }
.dv-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 42px; height: 42px; border-radius: 50%; border: 0; background: #0006; color: #fff; display: grid; place-items: center; cursor: pointer; }
.dv-prev { left: 10px; } .dv-next { right: 10px; }
@media (hover: none) { .dv-nav { display: none; } }
.dv-view.is-reveal .dv-view-bar, .dv-view.is-reveal .dv-nav { display: none; }
.dv-view.is-reveal .dv-stamp-big { bottom: calc(env(safe-area-inset-bottom) + 24px); }
.dv-reveal-end { position: absolute; inset: 0; display: grid; place-content: center; gap: 14px; text-align: center; z-index: 3; font-size: 1.3rem; }
.dv-reveal-end[hidden] { display: none; }
/* create pad card */
.sp-develop { display: flex; align-items: center; gap: 10px; margin: 8px 0 2px; padding: 10px 12px; border-radius: 18px; text-decoration: none; color: inherit;
  background: linear-gradient(120deg, #f59e0b26, #ef444426 55%, #a855f726); border: 1px solid #f59e0b55; }
.sp-dv-ic { font-size: 1.5rem; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: #1c1410; flex: none; }
.sp-develop .sp-cam-txt { flex: 1; min-width: 0; display: grid; }
.sp-develop small { opacity: .75; font-size: .74rem; }
.sp-dv-new { font-size: .66rem; font-weight: 800; padding: 3px 7px; border-radius: 999px; color: #fff; background: linear-gradient(135deg, #f59e0b, #ef4444); text-transform: uppercase; }

/* ==========================================================================
   2.23 — Badges & leaderboards
   ========================================================================== */
.bdg { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px 3px 5px; border-radius: 999px; font-size: .74rem; font-weight: 700; background: var(--glass); border: 1px solid var(--glass-border); white-space: nowrap; }
.bdg-em { font-size: .95rem; line-height: 1; }
.bdg-t1 { border-color: #cd7f3288; background: linear-gradient(135deg, #cd7f3222, transparent); }
.bdg-t2 { border-color: #c0c7d288; background: linear-gradient(135deg, #c0c7d22e, transparent); }
.bdg-t3 { border-color: #fbbf24aa; background: linear-gradient(135deg, #fbbf2433, transparent); }
.bdg-t4 { border-color: #a5f3fcaa; background: linear-gradient(135deg, #a5f3fc33, #c4b5fd33); box-shadow: 0 0 12px #a5f3fc44; }
.bdg-title { border-color: #f59e0b; background: linear-gradient(135deg, #f59e0b40, #ef444430); }
.bdg-big { font-size: .86rem; padding: 6px 12px 6px 8px; }
.bdg-big .bdg-em { font-size: 1.15rem; }
.pf-badges { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin-top: 8px; text-decoration: none; color: inherit; }
.pf-badges-more { opacity: .5; display: inline-grid; } .pf-badges-more .icon { width: 14px; height: 14px; }
.pf-badges.is-empty .bdg { opacity: .75; border-style: dashed; }
.bd-head { display: grid; gap: 10px; }
.bd-intro { margin: 4px 2px 10px; }
.bd-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.bd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.bd-card { padding: 14px 12px; border-radius: 20px; display: grid; justify-items: center; text-align: center; gap: 4px; position: relative; }
.bd-card .bd-em { font-size: 2rem; line-height: 1.2; }
.bd-card.is-locked .bd-em { filter: grayscale(1); opacity: .45; }
.bd-card strong { font-size: .92rem; }
.bd-tier { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: 2px 8px; border-radius: 999px; background: var(--glass); }
.bd-card.bdg-t1 .bd-tier { color: #e8a26a; } .bd-card.bdg-t2 .bd-tier { color: #c9d2de; } .bd-card.bdg-t3 .bd-tier { color: #fbbf24; } .bd-card.bdg-t4 .bd-tier { color: #67e8f9; }
.bd-card.bdg-t4 { box-shadow: 0 0 0 1px #a5f3fc66, 0 0 22px -6px #a5f3fc88; }
.bd-card small { font-size: .74rem; line-height: 1.3; }
.bd-bar { width: 100%; height: 6px; border-radius: 6px; background: var(--glass); overflow: hidden; margin-top: 4px; }
.bd-bar i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #f59e0b, #ef4444); }
.bd-num { opacity: .7; font-variant-numeric: tabular-nums; }
.lb { display: grid; gap: 12px; }
.lb-boards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
@media (min-width: 600px) { .lb-boards { grid-template-columns: repeat(4, 1fr); } }
.lb-board { display: flex; align-items: center; gap: 6px; padding: 9px 10px; border-radius: 14px; background: var(--glass); border: 1px solid var(--glass-border); text-decoration: none; color: inherit; font-weight: 700; font-size: .84rem; }
.lb-board.is-on { background: linear-gradient(135deg, #f59e0b, #ef4444); color: #fff; border-color: transparent; }
.lb-scope { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--glass); width: fit-content; }
.lb-scope a { padding: 6px 14px; border-radius: 999px; text-decoration: none; color: inherit; font-weight: 600; font-size: .85rem; }
.lb-scope a.is-on { background: var(--glass-strong); box-shadow: 0 2px 8px #0002; }
.lb-what { margin: 0; }
.lb-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.lb-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 16px; }
.lb-row.is-top { background: var(--glass); }
.lb-row.is-me { box-shadow: inset 0 0 0 1.5px #f59e0b; }
.lb-rank { width: 28px; text-align: center; font-weight: 800; font-size: 1rem; flex: none; }
.lb-who { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; text-decoration: none; color: inherit; }
.lb-who span { display: grid; min-width: 0; } .lb-who strong, .lb-who small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-n { display: grid; justify-items: end; line-height: 1.1; } .lb-n b { font-size: 1.05rem; } .lb-n small { font-size: .7rem; opacity: .65; }
.lb-empty { text-align: center; padding: 18px 0; }
.notif-icon.notif-badge, .notif-icon.notif-title { background: linear-gradient(135deg, #f59e0b, #ef4444); color: #fff; }
.notif-icon.notif-rollinv, .notif-icon.notif-rolldev { background: linear-gradient(135deg, #f59e0b, #a855f7); color: #fff; }
.dv-sheet { text-align: left; }
.dv-sheet .rs-head h2 { margin: 0; }
.dv-pn { text-align: left; }
.dv-head { padding: 8px 10px; border-radius: 20px; }
.bd-intro { padding: 10px 14px; border-radius: 16px; margin: 4px 0 12px; }
.page-develop .section-title, .page-badges .section-title { display: inline-block; padding: 4px 12px; border-radius: 999px; background: var(--glass-strong); }
/* 2.23.13 — section titles that sit right on the wallpaper (develop's "shooting now" / "developed", live's "live now")
   get the same small glass pill as the page titles, hugging the words instead of stretching across the screen */
.page-develop main > .section-title, .page-develop .section-title,
:root[data-wall]:not([data-wall="glassay"]):not([data-wall="plain"]) .lives-now > .section-title {
  width: fit-content; max-width: 100%; padding: 3px 12px; border-radius: 999px; background: var(--glass-strong);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); margin: 14px 4px 8px;
}
/* 2.23.1 — zooming while you record: slide up on the shutter, or tap a zoom chip with another finger */
.is-recording .gzoom { opacity: 1; }
.gz-chip { touch-action: manipulation; }
.glint-shutter { touch-action: none; }
.glint-zoom-hint { position: absolute; left: 50%; transform: translateX(-50%); top: 48px; white-space: nowrap; font-size: .74rem; font-weight: 700; color: #fff; padding: 4px 10px; border-radius: 999px; background: rgba(0,0,0,.4); opacity: 0; pointer-events: none; transition: opacity .2s; }
.is-recording .glint-zoom-hint { opacity: 1; }
@media (max-width: 820px), (hover: none) and (pointer: coarse) { .glint-create .glint-zoom-hint { top: calc(env(safe-area-inset-top) + 100px); } }
/* 2.23.2 — flickers can't be saved: nothing in the viewer answers a long-press */
.flk-viewer .flk-stage { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.flk-viewer .flk-media { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; pointer-events: none; -webkit-user-drag: none; }
.flk-shield { position: absolute; inset: 0; z-index: 1; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
/* 2.23.3 — while a panel or sheet covers the page, the page underneath stops doing its own glass blur.
   The cover blurs it anyway, and iPhone has far less to draw (fewer half-drawn screens). */
body:has(.ap-backdrop.open) main :is(.glass, .glass-strong, .glass-soft),
body:has(.sheet-backdrop:not([hidden])) main :is(.glass, .glass-strong, .glass-soft),
body:has(.ps-backdrop:not([hidden])) main :is(.glass, .glass-strong, .glass-soft) { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
/* 2.23.3: the "2 picked · start group" bar reads clearly over the list as it scrolls past */
.grp-newpage .grp-bar { margin: 0 -10px; padding: 10px 12px; border-radius: 18px; background: var(--glass-strong); -webkit-backdrop-filter: blur(18px) saturate(180%); backdrop-filter: blur(18px) saturate(180%); box-shadow: 0 10px 26px -14px #0008; }
.grp-newpage .grp-bar [data-grp-count] { color: var(--text); font-weight: 600; }
.ce-list { display: grid; gap: 8px; }
.ce-row { display: grid; gap: 2px; padding: 8px 10px; border-radius: 12px; background: var(--glass); overflow-wrap: anywhere; }
.ce-row code { font-size: .8rem; color: var(--danger, #ef4444); }
.ce-ua { font-size: .68rem; opacity: .7; }

/* 2.23.4 — no underlines on links, ever (hover, tap or focus). Links in text stand out by color and weight instead. */
a, a:hover, a:active, a:focus, a:visited,
.msg-out .msg-bubble a, .pf-text .profile-bio a, .pf-text .profile-facts a, .post-bg-card a, .pp-to a:hover, .linkish { text-decoration: none !important; }
.msg-bubble a, .post-body a, .profile-bio a, .post-bg-card a, .comment-bubble a, .legal a { font-weight: 650; }
a, button { -webkit-tap-highlight-color: transparent; }
/* 2.23.5 — nothing in the feed can push it wider than the screen (after rotating, iPhone sometimes measured text at its landscape size) */
.home-feed, .feed, .pf-posts { grid-template-columns: minmax(0, 1fr); }
.home-feed > *, .feed > *, .pf-posts > * { min-width: 0; max-width: 100%; }
.post-bg-card { min-width: 0; max-width: 100%; }
.post-bg-card p { max-width: 100%; min-width: 0; }
.home-feed .tabs { max-width: 100%; }
@media (orientation: portrait) { html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; } }
@media (orientation: landscape) { html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; } }
/* 2.23.6 — quiet hours */
.quiet-box { display: grid; gap: 10px; margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--line, rgba(255,255,255,.1)); }
.quiet-times { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quiet-times[hidden], .quiet-top8[hidden] { display: none; }
.quiet-times label { display: grid; gap: 4px; font-size: .85rem; font-weight: 600; }
.quiet-times input { width: 100%; box-sizing: border-box; }
.quiet-tz { margin: 0; }
.quiet-box .btn { justify-self: start; }
.quiet-box { padding-bottom: 14px; margin-bottom: 4px; border-bottom: 1px solid var(--line, rgba(255,255,255,.1)); }
/* 2.23.7 — messages ("videos can be up to 60 seconds", "sent", errors) show above every sheet, panel and camera */
.toasts { z-index: 2000; }

/* 2.23.8 — video trimmer */
.ps-trim { font-size: 15px; line-height: 1; }
body.vt-on { overflow: hidden; }
.vt { position: fixed; inset: 0; z-index: 1500; background: #07060c; color: #fff; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto auto auto; gap: 10px;
  padding: calc(env(safe-area-inset-top) + 10px) 16px calc(env(safe-area-inset-bottom) + 18px); }
.vt-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.vt-top strong { font-size: 1.05rem; }
.vt-top .icon-btn { color: #fff; background: rgba(255,255,255,.1); width: 40px; height: 40px; border-radius: 50%; border: 0; font-size: 1rem; }
.vt-why { margin: 0; padding: 10px 12px; border-radius: 14px; background: rgba(245,158,11,.16); border: 1px solid rgba(245,158,11,.45); font-size: .88rem; font-weight: 600; }
.vt-stage { position: relative; min-height: 0; display: grid; place-items: center; border-radius: 18px; overflow: hidden; background: #000; }
.vt-stage video { width: 100%; height: 100%; object-fit: contain; }
.vt-play { position: absolute; width: 66px; height: 66px; border-radius: 50%; border: 0; background: rgba(0,0,0,.5); color: #fff; font-size: 1.5rem; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.vt-play[hidden] { display: none; }
.vt-times { display: flex; align-items: center; justify-content: space-between; font-size: .82rem; font-variant-numeric: tabular-nums; opacity: .9; }
.vt-len { font-size: .95rem; }
.vt-len.is-over { color: #f87171; }
.vt-track { position: relative; height: 58px; border-radius: 12px; background: #1b1a22; touch-action: none; user-select: none; -webkit-user-select: none; }
.vt-strip { position: absolute; inset: 0; display: flex; overflow: hidden; border-radius: 12px; }
.vt-strip img { flex: 1; min-width: 0; height: 100%; object-fit: cover; }
.vt-dim { position: absolute; top: 0; bottom: 0; background: rgba(0,0,0,.62); }
.vt-dim-l { left: 0; border-radius: 12px 0 0 12px; } .vt-dim-r { border-radius: 0 12px 12px 0; }
.vt-sel { position: absolute; top: -3px; bottom: -3px; border: 3px solid #fbbf24; border-radius: 10px; pointer-events: none; }
.vt-h { position: absolute; top: -6px; bottom: -6px; width: 26px; margin-left: -13px; border: 0; padding: 0; background: transparent; touch-action: none; cursor: ew-resize; z-index: 2; }
.vt-h::after { content: ''; position: absolute; left: 50%; top: 50%; width: 10px; height: 34px; transform: translate(-50%, -50%); border-radius: 6px; background: #fbbf24; box-shadow: 0 2px 8px rgba(0,0,0,.5); }
.vt-h.is-drag::after { background: #fff; }
.vt-head { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 6px rgba(0,0,0,.6); pointer-events: none; }
.vt-hint { margin: 0; text-align: center; font-size: .8rem; opacity: .7; }
.vt-busy { position: absolute; inset: 0; z-index: 3; display: grid; place-content: center; justify-items: center; gap: 10px; text-align: center; padding: 30px; background: rgba(7,6,12,.82); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.vt-busy[hidden] { display: none; }
.vt-busy strong { font-size: 1.2rem; } .vt-pct { font-size: 2rem; font-weight: 900; font-variant-numeric: tabular-nums; color: #fbbf24; } .vt-busy small { opacity: .75; max-width: 260px; }
.vt-spin { width: 42px; height: 42px; border-radius: 50%; border: 4px solid rgba(255,255,255,.15); border-top-color: #fbbf24; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
/* 2.23.9 — trimming shows the video as it's made, with a slim progress bar over it */
.vt-busy { inset: auto 0 0 0; place-content: initial; justify-items: stretch; gap: 6px; padding: 12px 14px 14px; text-align: left;
  background: linear-gradient(transparent, rgba(0,0,0,.78) 40%); -webkit-backdrop-filter: none; backdrop-filter: none; }
.vt-bar { height: 6px; border-radius: 6px; background: rgba(255,255,255,.18); overflow: hidden; }
.vt-bar i { display: block; height: 100%; width: 0; border-radius: 6px; background: linear-gradient(90deg, #fbbf24, #ef4444); transition: width .2s linear; }
.vt-busy-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.vt-busy-row strong { font-size: 1rem; }
.vt-busy .vt-pct { font-size: 1rem; color: #fbbf24; font-weight: 900; }
.vt-busy small { opacity: .75; max-width: none; font-size: .76rem; }
.vt.is-busy .vt-track, .vt.is-busy .vt-done { pointer-events: none; opacity: .55; }
/* 2.23.10 — chats and alerts sit on top of everything: the dock slides away underneath while they're open */
@media (max-width: 820px), (max-height: 500px) and (pointer: coarse) {
  body.ap-open:not(.ap-closing):has([data-app-panel].open) .tabbar { z-index: 40; transform: translateY(calc(100% + 40px)); opacity: 0; pointer-events: none; transition: transform .28s var(--ease), opacity .2s; }
  body.ap-open .ap-body { padding-bottom: calc(24px + env(safe-area-inset-bottom)) !important; }
  .tabbar { transition: transform .28s var(--ease), opacity .2s; }
}
/* 2.23.11 — reply actions: react on the left, report flag and ⋯ (delete) on the far right, with room to tap */
.c-slim .c-meta { gap: 6px; padding-right: 2px; }
.c-tools { margin-left: auto; display: inline-flex; align-items: center; gap: 10px; }
.c-tool { width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; padding: 0; }
.c-tool .icon { width: 16px; height: 16px; }
.c-tool:active, .c-tool:hover { background: var(--glass); color: var(--text); }
.c-more { position: relative; }
.c-more .menu { right: 0; left: auto; top: auto; bottom: calc(100% + 4px); min-width: 160px; z-index: 30; }
.c-more .menu button { white-space: nowrap; }
.c-slim .c-main { flex: 1 1 auto; min-width: 0; }
.c-slim .c-meta { width: 100%; box-sizing: border-box; }
/* 2.23.12 — hand raised: the host sees it right away */
.lv-reqcard { position: absolute; z-index: 30; left: 12px; right: 12px; top: calc(env(safe-area-inset-top) + 118px); display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-radius: 20px; background: rgba(28,24,44,.92); color: #fff; box-shadow: 0 14px 34px rgba(0,0,0,.5), inset 0 0 0 1.5px rgba(251,191,36,.6);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.lv-reqcard[hidden] { display: none; }
.lv-reqcard.pop { animation: rq-pop .45s var(--ease); }
@keyframes rq-pop { 0% { transform: translateY(-12px) scale(.96); opacity: 0; } 60% { transform: translateY(2px) scale(1.01); opacity: 1; } 100% { transform: none; } }
.lv-rq-face .avatar { width: 40px; height: 40px; }
.lv-rq-txt { flex: 1; min-width: 0; display: grid; line-height: 1.2; }
.lv-rq-txt b { font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lv-rq-txt small { font-size: .74rem; opacity: .75; }
.lv-reqcard .btn { flex: none; white-space: nowrap; }
.lv-face .av-live { width: 34%; max-width: 120px; aspect-ratio: 1; display: grid; place-items: center; }
.lv-face .av-live .avatar { width: 100%; }
.lv-face .av-live-tag { display: none; }
.lv-rq-txt b { white-space: normal; overflow: visible; }
.lv-reqcard .btn { padding: 7px 12px; }

/* 2.24.0 — inside the App Store / Google Play app: no "install the app" prompts (you're in it) */
:root.is-native [data-install], :root.is-native [data-install-banner], :root.is-native .install-banner, :root.is-native [data-install-guide] { display: none !important; }

/* 2.24.1 — editing a message (20 minutes after sending) */
.rp-edit span { font-size: 1.3rem; color: var(--accent, #a78bfa); font-weight: 800; }
.msg-ed { opacity: .8; }
.msg.is-edited .msg-bubble { animation: msg-edited .6s var(--ease); }
@keyframes msg-edited { 0% { transform: scale(.97); filter: brightness(1.25); } 100% { transform: none; filter: none; } }
.gd-input { display: block; width: 100%; text-align: left; box-sizing: border-box; margin: 4px 0 14px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--input-border, rgba(255,255,255,.18)); background: var(--input, rgba(255,255,255,.06)); color: var(--text); font: inherit; font-size: 16px; line-height: 1.4; resize: none; min-height: 64px; max-height: 220px; }
.gd-input:focus { outline: none; border-color: color-mix(in srgb, var(--accent) 60%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
/* with a text box the dialog sits near the top, so the phone keyboard never covers it */
.gd-backdrop.gd-has-input { place-items: start center; align-content: start; padding-top: calc(env(safe-area-inset-top) + 12vh); }
@media (max-width: 820px), (max-height: 500px) and (pointer: coarse) { .gd-backdrop.gd-has-input { padding-top: calc(env(safe-area-inset-top) + 70px); } }

/* 2.24.3 — "flicker" beside "new chat": the same glossy bead button, in flicker colors */
.grp-new-row { align-items: center; }
.grp-flk { --grad: linear-gradient(135deg, #ff4d6d, #ff8a3d 70%, #ffb057); box-shadow: 0 8px 22px -10px rgba(255, 77, 109, .75), inset 0 1px 0 rgba(255,255,255,.3); }
.grp-flk:hover { box-shadow: 0 10px 28px -8px rgba(255, 77, 109, .85), inset 0 1px 0 rgba(255,255,255,.35); }
.grp-new-row .grp-flk { margin-left: auto; }
.grp-new-row .grp-flk + .grp-new { margin-left: 0; }
.dm-empty .grp-flk { margin: 0 6px 0 0; }

/* 2.24.7 — more see-through glass: the boxes on a page get less tint and a lighter blur, so more of the
   wallpaper shows through (the header and dock keep their thicker glass so they stay easy to read). */
:root[data-theme="dark"] { --box-bg: linear-gradient(180deg, rgba(255,255,255,.10) 0%, rgba(255,255,255,0) 55%), color-mix(in srgb, var(--accent) 18%, rgba(13, 11, 28, .52)); }
:root[data-theme="light"] { --box-bg: linear-gradient(180deg, rgba(255,255,255,.42) 0%, rgba(255,255,255,0) 60%), color-mix(in srgb, var(--accent) 12%, rgba(255, 255, 255, .58)); }
:root[data-wall-clash][data-theme="dark"] { --box-bg: var(--bar-bg); }
:root[data-wall-clash][data-theme="light"] { --box-bg: var(--bar-bg); }
:root:not([data-skin="clear"]):not([data-skin="solid"]):not([data-skin="oled"]) body :is(.glass, .glass-strong):not(:is(.topbar, .tabbar, .sheet, .menu, .drawer, .app-panel, .post-sheet, .search-ov-panel, .react-picker, .reactors-sheet, .st-sheet, .lbx-bar, .pe, .toast, .alert, .icon-btn, .btn, .pill, .pill-glass, .pf-glass-btn, .search-pill, .chat-themed, .install-banner, .sidebar-inner)):not([style*="background"]) {
  background: var(--box-bg, var(--bar-bg));
}
:root:not([data-skin="clear"]):not([data-skin="solid"]):not([data-skin="oled"]) { --blur: 16px; }
@media (max-width: 820px), (max-height: 500px) and (pointer: coarse) {
  :root:not([data-skin="clear"]):not([data-skin="solid"]):not([data-skin="oled"]) { --blur: 12px; }
  :root:not([data-skin="clear"]):not([data-skin="solid"]):not([data-skin="oled"]) .post.glass { -webkit-backdrop-filter: blur(12px) saturate(160%); backdrop-filter: blur(12px) saturate(160%); }
}
/* text stays readable on the thinner glass */
:root[data-theme="dark"]:not([data-skin="clear"]):not([data-skin="solid"]):not([data-skin="oled"]) body :is(.glass, .glass-strong):not(:is(.btn, .icon-btn, .pill)) { text-shadow: 0 1px 2px rgba(0,0,0,.35); }

/* ==========================================================================
   2.25 — Liquid Glass for the dock, the header and the floating controls.
   Apple's real Liquid Glass is a native iOS material (SwiftUI / UIKit); web pages can't call it, so this
   rebuilds its look with what Safari can do: a very clear, color-boosted blur, a bright light-catching rim
   that's strongest on the top-left and bottom-right edges, a soft inner glow, a glass "lens" that slides
   to the tab you pick, and controls that swell slightly when pressed. Solid and OLED looks are untouched.
   ========================================================================== */
:root {
  --lg-fill: color-mix(in srgb, var(--accent) 7%, rgba(22, 20, 36, .26));
  --lg-sheen: linear-gradient(180deg, rgba(255,255,255,.16) 0%, rgba(255,255,255,.03) 46%, rgba(255,255,255,0) 60%, rgba(255,255,255,.05) 100%);
  --lg-blur: blur(14px) saturate(220%) brightness(1.07);
  --lg-rim: linear-gradient(135deg, rgba(255,255,255,.78) 0%, rgba(255,255,255,.22) 22%, rgba(255,255,255,.05) 45%, rgba(255,255,255,.05) 62%, rgba(255,255,255,.28) 82%, rgba(255,255,255,.6) 100%);
  --lg-shadow: inset 0 0 14px rgba(255,255,255,.07), inset 0 1px 0 rgba(255,255,255,.22), 0 14px 34px -12px rgba(0,0,0,.55), 0 2px 6px -2px rgba(0,0,0,.25);
  --lg-lens: color-mix(in srgb, var(--accent) 22%, rgba(255,255,255,.12));
  --lg-spring: cubic-bezier(.34, 1.45, .55, 1);
}
:root[data-theme="light"] {
  --lg-fill: color-mix(in srgb, var(--accent) 5%, rgba(255, 255, 255, .34));
  --lg-sheen: linear-gradient(180deg, rgba(255,255,255,.55) 0%, rgba(255,255,255,.12) 46%, rgba(255,255,255,0) 62%, rgba(255,255,255,.18) 100%);
  --lg-rim: linear-gradient(135deg, rgba(255,255,255,1) 0%, rgba(255,255,255,.55) 24%, rgba(255,255,255,.18) 48%, rgba(255,255,255,.18) 62%, rgba(255,255,255,.55) 82%, rgba(255,255,255,.95) 100%);
  --lg-shadow: inset 0 0 14px rgba(255,255,255,.35), inset 0 1px 0 rgba(255,255,255,.7), 0 14px 34px -14px rgba(30,20,80,.35), 0 2px 6px -2px rgba(30,20,80,.15);
  --lg-lens: color-mix(in srgb, var(--accent) 18%, rgba(255,255,255,.55));
}

/* the material */
:root:not([data-skin="solid"]):not([data-skin="oled"]) body :is(.tabbar, .lg-cluster, .topbar-menu, .menu, .react-picker, .toast, .gd) {
  background: var(--lg-sheen), var(--lg-fill) !important;
  -webkit-backdrop-filter: var(--lg-blur) !important; backdrop-filter: var(--lg-blur) !important;
  border-color: transparent !important;
  box-shadow: var(--lg-shadow) !important;
  isolation: isolate;
}
/* the light-catching rim (a thin ring, brightest where light would hit a real glass edge) */
:root:not([data-skin="solid"]):not([data-skin="oled"]) body :is(.tabbar, .lg-cluster, .topbar-menu, .menu, .react-picker, .gd)::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 3;
  padding: 1.2px; background: var(--lg-rim);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
:root:not([data-skin="solid"]):not([data-skin="oled"]) body .tabbar::before { opacity: .55; }
:root:not([data-skin="solid"]):not([data-skin="oled"]) body :is(.lg-cluster, .topbar-menu, .gd) { position: relative; }

/* header: the bar melts into the page (Apple's "scroll edge") and its buttons float as glass capsules.
   2.25.1: the fade lives on a layer behind the bar, so the buttons themselves are never faded or double-blurred. */
@media (max-width: 820px), (max-height: 500px) and (pointer: coarse) {
  :root:not([data-skin="solid"]):not([data-skin="oled"]) body .topbar {
    background: transparent !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
    border-color: transparent !important; box-shadow: none !important; isolation: isolate;
  }
  :root:not([data-skin="solid"]):not([data-skin="oled"]) body .topbar::before {
    content: ""; position: absolute; inset: 0 0 -18px; z-index: -1; pointer-events: none;
    background: linear-gradient(180deg, color-mix(in srgb, var(--bg) 70%, transparent) 0%, color-mix(in srgb, var(--bg) 35%, transparent) 60%, transparent 100%);
    -webkit-backdrop-filter: blur(8px) saturate(170%); backdrop-filter: blur(8px) saturate(170%);
    -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent); mask-image: linear-gradient(180deg, #000 55%, transparent);
  }
  :root:not([data-skin="solid"]):not([data-skin="oled"]) body .topbar .brand { text-shadow: 0 1px 8px rgba(0,0,0,.35); }
  /* the two capsules: same height, same glass */
  .topbar-actions { gap: 8px !important; }
  .lg-cluster { height: 46px; padding: 0 4px; box-sizing: border-box; }
  .lg-cluster .icon-btn { width: 42px; height: 42px; }
  .lg-cluster .icon-btn .icon { width: 22px; height: 22px; }
  .topbar-menu { height: 46px; box-sizing: border-box; padding: 4px 14px 4px 4px !important; gap: 8px !important; margin-left: 0 !important; }
  .topbar-menu .avatar { width: 38px !important; height: 38px !important; }
  .topbar-menu-ic .icon { width: 22px !important; height: 22px !important; }
}
.lg-cluster { display: inline-flex; align-items: center; gap: 0; padding: 2px; border-radius: 999px; }
.lg-cluster .icon-btn { background: transparent !important; box-shadow: none !important; border: 0 !important; }
:root[data-skin="solid"] .lg-cluster, :root[data-skin="oled"] .lg-cluster { padding: 0; }
/* brighter, crisper glass for the header capsules (they sit on the wallpaper, not on a bar) */
:root:not([data-skin="solid"]):not([data-skin="oled"]) body :is(.lg-cluster, .topbar-menu) {
  --lg-blur: blur(10px) saturate(240%) brightness(1.12);
}

/* the tab under your finger: a glass lens that slides between tabs */
.tb-lens {
  position: absolute; z-index: 0; top: 3px; bottom: 3px; left: 0; width: 56px; border-radius: 22px; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.34) 0%, rgba(255,255,255,.08) 50%, rgba(255,255,255,.16) 100%), var(--lg-lens);
  box-shadow: inset 0 1.5px 0 rgba(255,255,255,.75), inset 0 -1px 0 rgba(255,255,255,.25), inset 0 0 14px rgba(255,255,255,.22), 0 8px 18px -8px rgba(0,0,0,.55);
  -webkit-backdrop-filter: blur(2px) saturate(200%) brightness(1.2); backdrop-filter: blur(2px) saturate(200%) brightness(1.2);
  transform: translate3d(var(--lx, 0px), 0, 0) scale(var(--ls, 1)); transform-origin: center;
  transition: transform .5s var(--lg-spring), width .4s var(--lg-spring), opacity .2s;
  opacity: 0;
}
.tb-lens::after { /* its own bright rim */
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.2px; pointer-events: none;
  background: linear-gradient(135deg, rgba(255,255,255,.95), rgba(255,255,255,.2) 35%, rgba(255,255,255,.08) 60%, rgba(255,255,255,.7));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
.tabbar.has-lens .tb-lens { opacity: 1; }
/* while your finger is down the lens lifts off the dock: bigger, brighter, and the tab under it is magnified */
.tabbar.has-lens .tb-lens.is-pressed { --ls: 1.28; box-shadow: inset 0 1.5px 0 rgba(255,255,255,.85), inset 0 0 18px rgba(255,255,255,.3), 0 14px 30px -10px rgba(0,0,0,.6); transition: transform .28s var(--lg-spring), width .3s var(--lg-spring); }
.tabbar.has-lens .nav-link { position: relative; z-index: 1; transition: transform .3s var(--lg-spring), color .2s; }
.tabbar.has-lens .nav-link.is-lensed { transform: scale(1.16); }
.tabbar.has-lens .nav-link[aria-current="page"]:not(.tab-compose) { background: transparent !important; box-shadow: none !important; }
.tabbar.has-lens.is-dragging { overflow: visible; }
:root[data-skin="solid"] .tb-lens, :root[data-skin="oled"] .tb-lens { -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; }

/* pressing glass makes it swell a little, like a drop of water */
@media (hover: none) {
  :root:not([data-skin="solid"]):not([data-skin="oled"]) body :is(.lg-cluster .icon-btn, .topbar-menu, .tabbar .nav-link:not(.tab-compose)):active { transform: scale(1.08); transition: transform .18s var(--lg-spring); }
}
:root:not([data-skin="solid"]):not([data-skin="oled"]) body :is(.lg-cluster .icon-btn, .topbar-menu) { transition: transform .35s var(--lg-spring); }
/* menus, dialogs, toasts and the reaction picker carry words over busy content: Apple's thicker "regular" glass */
:root { --lg-fill-thick: color-mix(in srgb, var(--accent) 8%, rgba(20, 18, 34, .66)); }
:root[data-theme="light"] { --lg-fill-thick: color-mix(in srgb, var(--accent) 5%, rgba(255, 255, 255, .74)); }
:root:not([data-skin="solid"]):not([data-skin="oled"]) body :is(.menu, .react-picker, .toast, .gd) { background: var(--lg-sheen), var(--lg-fill-thick) !important; }

/* ---------- 2.25.2: icon-only dock, a bigger lowercase brand that tucks away with the dock ---------- */
.brand span { text-transform: lowercase; }
@media (max-width: 820px), (max-height: 500px) and (pointer: coarse) {
  /* the dock shows icons only (screen readers still hear each tab's name) */
  .tabbar .nav-label { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
  .tabbar { padding: 6px !important; }
  .tabbar .nav-link { padding: 10px 8px !important; min-height: 46px; justify-content: center; }
  .tabbar .nav-link .icon { width: 25px !important; height: 25px !important; }
  .tabbar .nav-me .avatar { width: 30px; height: 30px; }
  .tabbar .tab-compose .nav-icon { width: 44px !important; height: 44px !important; border-radius: 16px; }
  .tabbar .tab-compose { padding: 0 6px !important; }
  .tabbar .tb-lens { top: 4px; bottom: 4px; border-radius: 20px; }
  /* header brand: bigger, lowercase, lined up with the 46px glass capsules */
  .topbar .brand { gap: 9px; font-size: 1.55rem !important; font-weight: 800; letter-spacing: -.025em; line-height: 1; height: 46px; display: inline-flex; align-items: center; }
  .topbar .brand svg { width: 34px; height: 34px; }
  .topbar .brand, .topbar .brand span { transition: opacity .3s ease, transform .4s cubic-bezier(.34, 1.4, .64, 1); }
  /* scrolling down a feed: the brand tucks up and away with the dock, and comes back with it */
  body.dock-away .topbar .brand { opacity: 0; transform: translate3d(0, -14px, 0) scale(.96); pointer-events: none; transition: opacity .22s ease, transform .3s cubic-bezier(.5, 0, .75, 0); }
}

/* ---------- 2.26: on phones, Chats and Alerts are real pages; a conversation takes the whole screen ---------- */
@media (max-width: 820px), (max-height: 500px) and (pointer: coarse) {
  /* the chat list flows down the page like any other tab */
  .page-messages .dm:not(.has-thread) { display: block; height: auto !important; min-height: 0; }
  .page-messages .dm:not(.has-thread) .dm-list { overflow: visible; }
  .page-messages .dm:not(.has-thread) .dm-convos { overflow: visible; max-height: none; flex: none; }
  .page-messages .dm:not(.has-thread) .dm-list-head h1 { font-size: 1.6rem; }
  /* inside a conversation: no header, no dock — just the chat, edge to edge */
  body.page-messages:has(.dm.has-thread) .topbar { display: none !important; }
  body.page-messages:has(.dm.has-thread) .shell { padding-top: calc(env(safe-area-inset-top) + 8px) !important; padding-bottom: calc(8px + env(safe-area-inset-bottom)) !important; }
  .page-messages .dm.has-thread { height: calc(100dvh - 16px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important; }
  .page-messages .dm.has-thread .dm-thread { border-radius: 26px; }
}

/* ---------- 2.26.1: the dock is six tabs; Create floats beside it as its own round glass button ---------- */
.dock-create { display: none; }
@media (max-width: 820px), (max-height: 500px) and (pointer: coarse) {
  .tabbar { left: max(12px, calc(50% - 300px)) !important; right: calc(max(12px, calc(50% - 300px)) + 72px) !important; }
  .tabbar .nav-link { flex: 1 1 0; min-width: 0 !important; }
  .dock-create {
    display: grid; place-items: center; position: fixed; z-index: 31; right: max(12px, calc(50% - 300px));
    bottom: var(--dock-b, calc(12px + env(safe-area-inset-bottom)));
    width: 64px; height: 64px; border-radius: 50%; color: #fff; text-decoration: none;
    background: linear-gradient(180deg, rgba(255,255,255,.28) 0%, rgba(255,255,255,.05) 55%, rgba(255,255,255,.12) 100%), color-mix(in srgb, var(--accent) 70%, rgba(20, 18, 34, .35));
    -webkit-backdrop-filter: blur(14px) saturate(220%) brightness(1.08); backdrop-filter: blur(14px) saturate(220%) brightness(1.08);
    box-shadow: inset 0 1.5px 0 rgba(255,255,255,.6), inset 0 -1px 0 rgba(255,255,255,.18), inset 0 0 14px rgba(255,255,255,.14), 0 14px 30px -12px rgba(0,0,0,.6), 0 6px 18px -8px color-mix(in srgb, var(--accent) 70%, transparent);
    transform: translate3d(0, 0, 0);
    transition: transform .45s cubic-bezier(.34, 1.4, .64, 1), opacity .3s ease;
    -webkit-tap-highlight-color: transparent;
  }
  .dock-create::after { /* the light-catching rim */
    content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.2px; pointer-events: none;
    background: linear-gradient(135deg, rgba(255,255,255,.95), rgba(255,255,255,.2) 35%, rgba(255,255,255,.06) 60%, rgba(255,255,255,.65));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  }
  .dock-create .icon { width: 28px; height: 28px; stroke-width: 2.4; filter: drop-shadow(0 1px 2px rgba(0,0,0,.3)); }
  .dock-create:active { transform: scale(1.1); transition: transform .18s cubic-bezier(.34, 1.45, .55, 1); }
  body.dock-away .dock-create { transform: translate3d(0, calc(100% + 26px + env(safe-area-inset-bottom)), 0); opacity: 0; pointer-events: none; transition: transform .32s cubic-bezier(.5, 0, .75, 0), opacity .25s ease .05s; }
  :root[data-skin="solid"] .dock-create, :root[data-skin="oled"] .dock-create { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--grad); }
  :root[data-skin="solid"] .dock-create::after, :root[data-skin="oled"] .dock-create::after { display: none; }
  /* hidden wherever the dock is hidden */
  body.ap-open:not(.ap-closing) .dock-create, body.composing .dock-create, .page-messages:has(.dm.has-thread) .dock-create, body:has(.customize-bar) .dock-create, body.hud-in-chat .dock-create, body.page-live-room .dock-create, body.is-embed .dock-create { display: none !important; }
}

/* 2.26.1 — a full-screen chat is pinned to the part of the screen you can see, so the message box sits
   right on top of the keyboard (no gap), and the page underneath never scrolls. */
@media (max-width: 820px), (max-height: 500px) and (pointer: coarse) {
  body.page-messages:has(.dm.has-thread) { overflow: hidden; overscroll-behavior: none; }
  .page-messages .dm.has-thread {
    position: fixed; z-index: 20; left: 8px; right: 8px; margin: 0;
    top: calc(var(--vv-top, 0px) + env(safe-area-inset-top) + 8px);
    height: calc(var(--vv-h, 100dvh) - env(safe-area-inset-top) - 16px - env(safe-area-inset-bottom)) !important;
  }
  :root.kb-up .page-messages .dm.has-thread { top: calc(var(--vv-top, 0px) + env(safe-area-inset-top) + 6px); height: calc(var(--vv-h, 100dvh) - env(safe-area-inset-top) - 12px) !important; }
  :root.kb-up body.page-messages:has(.dm.has-thread) .dm-thread { border-radius: 22px; }
}


/* ---------- 2.26.3: a phone turned sideways keeps the phone layout (header, dock, one column) ----------
   Everything above that says "phones" also covers a sideways phone (short screen + touch). Here: a centered
   column, room for the notch on the sides, and a slimmer header and dock so more of the page fits. */
@media (max-width: 820px), (max-height: 500px) and (pointer: coarse) {
  .page-messages .dm.has-thread { min-height: 0 !important; }
}
@media (max-height: 500px) and (pointer: coarse) and (min-width: 560px) {
  body .shell, body .shell.no-right, body .shell.wide { max-width: 700px !important; width: 100%; box-sizing: border-box; margin-left: auto !important; margin-right: auto !important;
    padding-left: max(12px, env(safe-area-inset-left)) !important; padding-right: max(12px, env(safe-area-inset-right)) !important;
    padding-top: 62px !important; padding-bottom: 84px !important; }
  .topbar { height: 54px !important; padding-left: max(16px, env(safe-area-inset-left)) !important; padding-right: max(16px, env(safe-area-inset-right)) !important; }
  .topbar .brand { font-size: 1.3rem !important; height: 40px !important; }
  .topbar .brand svg { width: 28px; height: 28px; }
  .lg-cluster, .topbar-menu { height: 40px !important; }
  .lg-cluster .icon-btn { width: 36px !important; height: 36px !important; }
  .topbar-menu .avatar { width: 32px !important; height: 32px !important; }
  .tabbar { bottom: max(8px, env(safe-area-inset-bottom)) !important; padding: 4px !important; }
  .tabbar .nav-link { min-height: 40px !important; padding: 7px 8px !important; }
  .tabbar .nav-link .icon { width: 23px !important; height: 23px !important; }
  .dock-create { width: 52px !important; height: 52px !important; bottom: max(8px, env(safe-area-inset-bottom)) !important; }
  .tabbar { right: calc(max(12px, calc(50% - 300px)) + 60px) !important; }
  /* a conversation: centered, edge to edge in height */
  .page-messages .dm.has-thread { left: max(8px, calc(50% - 360px), env(safe-area-inset-left)) !important; right: max(8px, calc(50% - 360px), env(safe-area-inset-right)) !important; }
}

/* ---------- 2.27: in the iPhone app the dock, + button and header are native (Liquid Glass) ----------
   The page's own bars stay where they are (so spacing and taps keep working) but can't be seen or touched. */
html.native-bars .tabbar, html.native-bars .dock-create, html.native-bars .topbar,
html.native-bars .topbar *, html.native-bars .tabbar * { opacity: 0 !important; pointer-events: none !important; }
html.native-bars .topbar::before { display: none !important; }
