/* ===== Fonts (local) ===== */
@font-face { font-family: "Jakarta"; src: url("assets/fonts/jakarta.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Sora"; src: url("assets/fonts/sora.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }

/* ===== Tokens ===== */
/* Colour tokens. Dark is the default; html[data-theme="light"] (set before first paint from localStorage, then from
   profiles.theme) swaps them. Photos, videos, the story / clips viewers and calls stay dark in both themes ("islands"). */
:root {
  --brand-b: #3d8bff;          /* brand fills: always bright (text on them is dark) */
  --brand2-b: #7fd4ff;
  --grad: linear-gradient(135deg, var(--brand-b) 0%, #5fb0ff 50%, var(--brand2-b) 100%);
  --grad-h: linear-gradient(90deg, var(--brand-b), var(--brand2-b));
  --acc: #3d8bff;
  --acc-rgb: 61, 139, 255;
  --r-lg: 22px;
  --r-md: 16px;
  --r-sm: 12px;
  --sidebar-w: 256px;
  --pad: 16px;
  --font: "Jakarta", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Sora", var(--font);
  /* v22: safe areas (notch / Dynamic Island / home bar) in one place; every bar uses these. Tests set them to fake a phone. */
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
  color-scheme: dark;
}
:root, html[data-theme="light"] :is(.sv, .cv, .call, .lightbox, .post-media, .clip, .player, .prompt-tile, .story-thumb, .cp-vstage, .auth-screen, .onboard-screen),
html[data-theme="light"] body[data-route="clips"] .tabbar {
  --bg: #06060b;
  --bg-2: #0b0b13;
  --ink: 255, 255, 255;        /* tints, hairlines and panels: white on dark, near-black on light */
  --sink: 6, 6, 11;            /* translucent bars over the page */
  --panel: rgba(var(--ink), 0.035);
  --panel-2: rgba(var(--ink), 0.06);
  --line: rgba(var(--ink), 0.075);
  --line-2: rgba(var(--ink), 0.12);
  --text: #f3f4fa;
  --text-2: #c9cbd8;
  --muted: #868aa0;
  --strong: #fff;              /* hover / active text */
  --placeholder: #5f637a;
  --brand: #3d8bff;             /* brand blue / sky as text, icons and outlines */
  --brand2: #7fd4ff;
  --danger: #ff5577;
  --glow-brand: 0 0 24px rgba(61, 139, 255, 0.35);
  --glow-cyan: 0 0 24px rgba(127, 212, 255, 0.35);
  --sheet-bg: linear-gradient(180deg, #15151f, #0e0e17);
  --toast-bg: rgba(20, 20, 30, .92);
  --card-bg: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.018));
  --card-shadow: 0 18px 50px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255,255,255,0.05);
}
html[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f6fa;
  --bg-2: #ffffff;
  --ink: 17, 19, 33;
  --sink: 245, 246, 250;
  --panel: rgba(var(--ink), 0.035);
  --panel-2: rgba(var(--ink), 0.06);
  --line: rgba(var(--ink), 0.09);
  --line-2: rgba(var(--ink), 0.14);
  --text: #11131c;
  --text-2: #3b3f50;
  --muted: #5d6275;
  --strong: #05060c;
  --placeholder: #6b7083;
  --brand: #1a55c0;             /* darker brand shades: AA (4.5:1+) on white and the page */
  --brand2: #005f95;
  --danger: #c8102e;
  --glow-brand: 0 0 14px rgba(26, 85, 192, 0.22);
  --glow-cyan: 0 0 14px rgba(0, 95, 149, 0.2);
  --sheet-bg: #ffffff;
  --toast-bg: rgba(255, 255, 255, .97);
  --card-bg: #ffffff;
  --card-shadow: 0 1px 2px rgba(17, 19, 33, .06), 0 10px 30px rgba(17, 19, 33, .06);
}
html[data-theme="light"] :is(.sv, .cv, .call, .lightbox, .post-media, .clip, .player, .prompt-tile, .story-thumb, .cp-vstage, .auth-screen, .onboard-screen),
html[data-theme="light"] body[data-route="clips"] .tabbar { color: var(--text); color-scheme: dark; }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body {
  font-family: var(--font); background: var(--bg); color: var(--text);
  font-size: 14px; line-height: 1.4; -webkit-font-smoothing: antialiased;
  min-height: 100vh; min-height: 100dvh; overflow-x: clip;
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
button:disabled { cursor: default; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
.ic { width: 24px; height: 24px; flex: none; }
:focus-visible { outline: 2px solid var(--brand2); outline-offset: 2px; }

.bg-glow {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 520px at 88% -8%, rgba(70, 46, 170, 0.22), transparent 70%),
    radial-gradient(700px 500px at -10% 30%, rgba(127, 212, 255, 0.05), transparent 70%),
    radial-gradient(800px 600px at 50% 110%, rgba(61, 139, 255, 0.04), transparent 70%),
    var(--bg);
}

.mobile-only { display: inline-flex; }
.desktop-only { display: none !important; }

/* ===== Boot splash ===== */
.boot { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.boot-logo { width: 96px; animation: pulse 1.6s ease-in-out infinite; filter: drop-shadow(0 0 22px rgba(127, 212, 255, .35)); }
.boot-text { font-family: var(--display); font-weight: 700; font-size: 26px; letter-spacing: -0.03em; }
@keyframes pulse { 50% { transform: scale(1.06); opacity: .8; } }
@keyframes spin { to { transform: rotate(360deg); } }
.spin { display: inline-block; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(var(--ink), .15); border-top-color: var(--brand2); animation: spin .8s linear infinite; }

/* ===== Brand ===== */
.brand { display: inline-flex; align-items: center; gap: 8px; }
.brand-logo { height: 26px; width: auto; filter: drop-shadow(0 0 6px rgba(127, 212, 255, 0.25)); }
.wordmark { font-family: var(--display); font-weight: 700; font-size: 23px; letter-spacing: -0.03em; color: var(--strong); text-shadow: 0 0 18px rgba(var(--ink), 0.18); }

/* ===== Cards & buttons ===== */
.card {
  background: var(--card-bg);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--card-shadow);
}
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 52px; padding: 0 22px; border-radius: 16px; font-size: 16px; font-weight: 800; color: #020a18;
  background: var(--grad); box-shadow: 0 0 26px rgba(95, 176, 255, 0.3), inset 0 1px 0 rgba(255,255,255,.5);
  transition: transform .15s, opacity .2s, box-shadow .2s;
}
.btn-primary .ic { width: 19px; height: 19px; }
.btn-primary:active:not(:disabled) { transform: scale(.98); }
.btn-primary:disabled { opacity: .4; box-shadow: none; }
.btn-primary.loading { opacity: .75; }
.btn-primary.sm { height: 38px; padding: 0 16px; border-radius: 12px; font-size: 14px; }
.btn-primary.block, .btn-ghost.block { display: flex; width: 100%; }
.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: 14px; font-size: 14.5px; font-weight: 700; color: var(--text);
  background: var(--panel-2); border: 1px solid var(--line-2); transition: background .2s, border-color .2s;
}
.btn-ghost:hover { background: rgba(var(--ink), .09); }
.btn-ghost .ic { width: 18px; height: 18px; }
.btn-ghost.danger { color: var(--danger); border-color: rgba(255, 85, 119, .25); background: rgba(255, 85, 119, .06); }
.btn-follow {
  flex: none; height: 36px; padding: 0 18px; border-radius: 12px; font-size: 14px; font-weight: 800;
  color: #06060b; background: var(--acc); box-shadow: 0 0 20px rgba(var(--acc-rgb), .35);
  transition: all .2s;
}
.btn-follow.sm { height: 34px; padding: 0 14px; font-size: 13px; }
.btn-follow.lg { height: 44px; padding: 0 24px; font-size: 15px; border-radius: 14px; }
.btn-follow.on { color: var(--text); background: var(--panel-2); border: 1px solid var(--line-2); box-shadow: none; }
.btn-follow:disabled { opacity: .6; }
.linkish { color: var(--brand2); font-weight: 700; font-size: inherit; }
.muted { color: var(--muted); }
.center { text-align: center; }

.icon-btn {
  position: relative; width: 42px; height: 42px; border-radius: 14px; flex: none;
  display: inline-flex; align-items: center; justify-content: center; color: var(--text); transition: background .2s;
}
.icon-btn:hover { background: var(--panel-2); }
.icon-btn .ic { width: 23px; height: 23px; }
.icon-btn.ghost { color: var(--muted); }
.icon-btn.boxed { background: var(--panel-2); border: 1px solid var(--line-2); }
.icon-btn.boxed .ic { width: 20px; height: 20px; }

/* ===== Avatars ===== */
.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; background: var(--bg-2); }
.avatar-fallback {
  display: inline-grid; place-items: center; font-family: var(--display); font-weight: 700; color: #06060b;
  background: radial-gradient(circle at 30% 25%, rgba(255,255,255,.55), transparent 55%), var(--acc);
  font-size: 16px; line-height: 1; user-select: none;
}
.avatar.xs { width: 26px; height: 26px; font-size: 11px; }
.avatar.sm { width: 36px; height: 36px; font-size: 14px; }
.avatar.md { width: 48px; height: 48px; font-size: 19px; }
.avatar.lg { width: 72px; height: 72px; font-size: 28px; }
.avatar.xl { width: 100%; height: 100%; font-size: 40px; }
.ring-acc {
  display: inline-flex; border-radius: 50%; padding: 2.5px; flex: none;
  background: conic-gradient(from 210deg, var(--acc), rgba(var(--acc-rgb), .35), var(--acc));
  box-shadow: 0 0 18px rgba(var(--acc-rgb), .35);
}
.ring-acc > .avatar { border: 2.5px solid var(--bg); }
.banner-fallback {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(var(--acc-rgb), .55), transparent 55%),
    radial-gradient(90% 120% at 100% 100%, rgba(70, 46, 170, .55), transparent 60%),
    linear-gradient(135deg, #10101c, #0a0a12);
}
.banner-fallback::after {
  content: ""; position: absolute; inset: 0; opacity: .5;
  background-image: radial-gradient(rgba(var(--ink), .12) 1px, transparent 1px); background-size: 18px 18px;
  mask-image: linear-gradient(90deg, transparent, #000 40%, #000 60%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 40%, #000 60%, transparent);
}

/* ===== Forms ===== */
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field + .field { margin-top: 16px; }
.field > label { display: flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 700; color: var(--text-2); }
.field > label em { font-style: normal; font-weight: 600; color: var(--muted); font-size: 12px; }
.counter { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--muted); }
.counter.over { color: var(--danger); }
.input-wrap {
  position: relative; display: flex; align-items: center; min-width: 0;
  height: 52px; border-radius: 15px; background: rgba(var(--ink), .045); border: 1px solid var(--line-2);
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.input-wrap:focus-within { border-color: rgba(127,212,255,.55); box-shadow: 0 0 0 4px rgba(127,212,255,.1); background: rgba(var(--ink), .06); }
.input-wrap input, .input-wrap textarea {
  flex: 1; min-width: 0; width: 100%; height: 100%; padding: 0 16px; background: none; border: 0; outline: 0;
  color: var(--text); font: inherit; font-size: 16px; font-weight: 500;
}
.input-wrap input::placeholder, .input-wrap textarea::placeholder { color: var(--placeholder); }
.input-wrap.area { height: auto; }
.input-wrap textarea { padding: 14px 16px; resize: none; line-height: 1.45; min-height: 104px; }
.input-wrap.prefix input { padding-left: 4px; }
.input-prefix { padding-left: 16px; color: var(--muted); font-size: 16px; font-weight: 700; display: inline-flex; }
.input-prefix .ic { width: 18px; height: 18px; margin-right: 6px; }
.input-wrap.readonly { opacity: .65; }
.input-status { width: 40px; display: grid; place-items: center; flex: none; color: var(--muted); }
.input-status .ic { width: 18px; height: 18px; }
.input-status.ok { color: var(--brand); filter: drop-shadow(0 0 6px rgba(61,139,255,.6)); }
.input-status.bad { color: var(--danger); }
.input-btn { width: 48px; height: 100%; display: grid; place-items: center; color: var(--muted); flex: none; }
.input-btn .ic { width: 20px; height: 20px; }
.hint { font-size: 12.5px; color: var(--muted); min-height: 17px; }
.input-wrap.bad { border-color: rgba(255,85,119,.55); }
.input-wrap.bad:focus-within { border-color: rgba(255,85,119,.7); box-shadow: 0 0 0 4px rgba(255,85,119,.12); }
.hint.ok { color: var(--brand); }
.hint.bad { color: var(--danger); }
.form-error { color: var(--danger); font-size: 13.5px; font-weight: 600; min-height: 0; }
.form-error:not(:empty) { margin: 12px 0 2px; padding: 10px 12px; border-radius: 12px; background: rgba(255,85,119,.08); border: 1px solid rgba(255,85,119,.22); }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; margin-bottom: 16px; border-radius: 14px; font-size: 13.5px; color: var(--text-2); background: rgba(127,212,255,.06); border: 1px solid rgba(127,212,255,.2); }
.notice .ic { width: 18px; height: 18px; color: var(--brand2); margin-top: 1px; }
.mini-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.mini-chip { height: 32px; padding: 0 12px; border-radius: 10px; font-size: 13px; font-weight: 600; color: var(--text-2); background: var(--panel); border: 1px solid var(--line); }
.mini-chip.on { color: #06060b; background: var(--brand2-b); border-color: transparent; box-shadow: var(--glow-cyan); }

/* ===== Auth screen ===== */
.screen { min-height: 100vh; min-height: 100dvh; }
.auth-wrap {
  min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; gap: 22px;
  padding: calc(28px + var(--sat)) 16px calc(28px + var(--sab)); max-width: 460px; margin: 0 auto;
}
.auth-hero { display: flex; flex-direction: column; align-items: center; text-align: center; }
.auth-logo { width: 104px; filter: drop-shadow(0 0 26px rgba(127, 212, 255, .3)); }
.auth-logo.sm { width: 72px; margin: 0 auto 10px; }
.auth-title {
  font-family: var(--display); font-size: 44px; font-weight: 700; letter-spacing: -0.045em; line-height: 1; margin-top: 4px;
  background: linear-gradient(180deg, #fff 30%, #b9c2d8); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.auth-tag { margin-top: 10px; font-size: 15px; color: var(--text-2); max-width: 320px; }
.auth-points { display: none; }
.auth-card { padding: 18px 18px 20px; border-radius: 26px; background: linear-gradient(180deg, rgba(20,20,32,.82), rgba(12,12,20,.82)); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.auth-card.center { text-align: center; display: flex; flex-direction: column; gap: 12px; }
.auth-h { font-family: var(--display); font-size: 22px; font-weight: 700; letter-spacing: -0.02em; margin-top: 18px; }
.auth-card.center .auth-h { margin-top: 0; }
.auth-sub { color: var(--muted); font-size: 14px; margin: 4px 0 18px; }
.auth-card.center .auth-sub { margin: 0 0 6px; }
.seg { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 16px; background: rgba(var(--ink), .05); border: 1px solid var(--line); }
.seg button { position: relative; z-index: 1; height: 42px; border-radius: 12px; font-size: 14.5px; font-weight: 700; color: var(--muted); transition: color .25s; }
.seg button[aria-selected="true"] { color: #020a18; }
.seg-thumb { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 12px; background: var(--grad); box-shadow: 0 0 20px rgba(95,176,255,.3); transition: transform .3s cubic-bezier(.3,.7,.2,1); }
.seg[data-mode="login"] .seg-thumb { transform: translateX(100%); }
#auth-form .btn-primary { margin-top: 18px; }
.auth-foot { margin-top: 16px; font-size: 12.5px; line-height: 1.5; color: var(--muted); text-align: center; }
.auth-foot .ic { width: 14px; height: 14px; color: var(--brand); vertical-align: -2px; margin-right: 4px; }

/* ===== Onboarding ===== */
.ob { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; max-width: 560px; margin: 0 auto; }
.ob-top {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px;
  padding: calc(8px + var(--sat)) 10px 8px; background: rgba(var(--sink), .8); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.ob-progress { flex: 1; display: flex; gap: 6px; }
.ob-progress i { flex: 1; height: 5px; border-radius: 5px; background: rgba(var(--ink), .1); transition: background .3s, box-shadow .3s; }
.ob-progress i.done { background: rgba(61,139,255,.55); }
.ob-progress i.on { background: var(--grad-h); box-shadow: 0 0 12px rgba(127,212,255,.5); }
.skip { width: 54px; height: 42px; font-size: 14.5px; font-weight: 700; color: var(--muted); text-align: right; padding-right: 6px; }
.ob-body { flex: 1; padding: 14px 18px 24px; min-width: 0; }
.ob-step { font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--brand2); }
.ob-body h1 { font-family: var(--display); font-size: 28px; line-height: 1.12; font-weight: 700; letter-spacing: -0.035em; margin-top: 8px; }
.ob-sub { color: var(--text-2); font-size: 15px; margin: 8px 0 24px; }
.ob-content { min-width: 0; }
.ob-foot { position: sticky; bottom: 0; padding: 12px 18px calc(14px + var(--sab)); background: linear-gradient(rgba(var(--sink), 0), var(--bg) 30%); }
.ob-preview-name { display: flex; flex-direction: column; align-items: center; margin-top: 10px; text-align: center; min-width: 0; }
.ob-preview-name b { font-size: 19px; font-family: var(--display); letter-spacing: -0.02em; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ob-preview-name span { color: var(--muted); font-size: 14px; }
.ob-pick-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0 12px; }
.ob-pick-btns .btn-ghost { padding: 0 10px; }

/* Media editor (banner + avatar) */
.media-ed { position: relative; padding-bottom: 54px; }
.me-banner {
  position: relative; display: block; width: 100%; aspect-ratio: 3 / 1; border-radius: 20px; overflow: hidden;
  border: 1px solid var(--line-2); background: var(--bg-2);
  box-shadow: 0 0 40px rgba(var(--acc-rgb), .12);
}
.me-banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.me-cam {
  position: absolute; right: 10px; top: 10px; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px;
  border-radius: 999px; font-size: 12.5px; font-weight: 700; color: #fff;
  background: rgba(8,8,14,.6); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(var(--ink), .18);
}
.me-cam em { font-style: normal; }
.me-cam .ic { width: 16px; height: 16px; }
.me-avatar { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: 112px; height: 112px; }
.me-avatar .ring-acc { width: 100%; height: 100%; padding: 3px; }
.me-avatar .ring-acc > .avatar { border-width: 4px; }
.me-cam.round { top: auto; right: 0; bottom: 4px; width: 36px; height: 36px; padding: 0; justify-content: center; background: var(--acc); color: #06060b; border: 3px solid var(--bg); }
.me-remove { display: flex; justify-content: center; gap: 18px; margin-top: 12px; font-size: 13.5px; }
.me-remove .linkish { color: var(--danger); }

/* Accent picker + preview */
.swatches { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.swatch { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 12px 4px 10px; border-radius: 16px; border: 1px solid var(--line); background: var(--panel); min-width: 0; transition: border-color .2s, background .2s; }
.swatch i { width: 38px; height: 38px; border-radius: 50%; background: var(--sw); display: grid; place-items: center; color: #06060b; box-shadow: 0 0 16px rgba(var(--sw-rgb), .45); }
.swatch i .ic { width: 18px; height: 18px; }
.swatch span { font-size: 11.5px; font-weight: 700; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.swatch.on { border-color: var(--sw); background: rgba(var(--sw-rgb), .08); box-shadow: 0 0 0 1px var(--sw) inset; }
.accent-preview { overflow: hidden; margin-bottom: 18px; padding-bottom: 0; }
.ap-banner { position: relative; height: 92px; overflow: hidden; }
.ap-banner img { width: 100%; height: 100%; object-fit: cover; }
.ap-row { display: flex; align-items: flex-end; justify-content: space-between; padding: 0 14px; margin-top: -38px; position: relative; }
.ap-row .btn-follow { display: inline-flex; align-items: center; margin-bottom: 4px; }
.ap-meta { display: flex; flex-direction: column; padding: 8px 16px 0; min-width: 0; }
.ap-meta b { font-size: 17px; font-family: var(--display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-meta span { color: var(--muted); font-size: 13px; }
.ap-tabs { display: flex; margin-top: 12px; border-top: 1px solid var(--line); }
.ap-tabs span { flex: 1; text-align: center; padding: 11px 0; font-size: 13px; font-weight: 700; color: var(--muted); }
.ap-tabs span.on { color: var(--text); box-shadow: inset 0 -2px 0 var(--acc); }

/* Interest chips */
.int-chips { display: flex; flex-wrap: wrap; gap: 9px; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 15px;
  border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--text-2);
  background: var(--panel); border: 1px solid var(--line); transition: all .2s;
}
.chip .ic { width: 15px; height: 15px; color: var(--muted); }
.chip:hover { border-color: var(--line-2); color: var(--strong); }
.chip.active { background: var(--grad); color: #020a18; border-color: transparent; box-shadow: 0 0 22px rgba(95, 176, 255, 0.28); }
.chip.active .ic { color: #020a18; }
.int-chips + .hint { margin-top: 16px; }

/* ===== Sheets & toast ===== */
.sheet-wrap { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); opacity: 0; transition: opacity .25s; }
.sheet {
  position: relative; width: 100%; max-width: 480px; margin: 0 8px calc(8px + var(--sab));
  background: var(--sheet-bg); border-radius: 26px; padding: 8px 16px 18px;
  transform: translateY(30px); opacity: 0; transition: transform .3s cubic-bezier(.3,.7,.2,1), opacity .25s;
}
.sheet-wrap.open .sheet-backdrop { opacity: 1; }
.sheet-wrap.open .sheet { transform: none; opacity: 1; }
.sheet-grab { display: block; width: 40px; height: 5px; border-radius: 5px; background: rgba(var(--ink), .18); margin: 2px auto 12px; }
.sheet-body h3 { font-family: var(--display); font-size: 21px; letter-spacing: -0.02em; }
.sheet-body p { color: var(--text-2); font-size: 14.5px; margin: 6px 0 16px; }
.sheet-body.center { text-align: center; display: flex; flex-direction: column; align-items: center; }
.sheet-logo { width: 74px; margin-bottom: 8px; }
.create-kinds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; margin-bottom: 16px; }
.create-kinds span { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 0; border-radius: 16px; background: var(--panel); border: 1px dashed var(--line-2); color: var(--muted); font-size: 13px; font-weight: 700; }
.create-kinds .ic { color: var(--brand2); }
.sheet-me { display: flex; align-items: center; gap: 12px; padding: 4px 4px 14px; border-bottom: 1px solid var(--line); margin-bottom: 6px; min-width: 0; }
.sheet-me div { display: flex; flex-direction: column; min-width: 0; }
.sheet-me b { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-me span { color: var(--muted); font-size: 13.5px; }
.sheet-row { display: flex; align-items: center; gap: 14px; width: 100%; height: 54px; padding: 0 8px; border-radius: 14px; font-size: 15.5px; font-weight: 600; text-align: left; }
.sheet-row:hover { background: var(--panel-2); }
.sheet-row span { flex: 1; }
.sheet-row .ic { width: 22px; height: 22px; color: var(--text-2); }
.sheet-row .row-chev { width: 18px; height: 18px; color: var(--muted); }
.sheet-row.danger, .sheet-row.danger .ic { color: var(--danger); }
.toast {
  position: fixed; left: 50%; bottom: calc(92px + var(--sab)); z-index: 120; transform: translate(-50%, 12px); opacity: 0;
  max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 16px; font-size: 14px; font-weight: 700; text-align: center;
  background: var(--toast-bg); border: 1px solid rgba(61,139,255,.35); box-shadow: 0 12px 40px rgba(0,0,0,.5), 0 0 24px rgba(61,139,255,.15);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); transition: opacity .25s, transform .25s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { border-color: rgba(255,85,119,.45); }
body[data-view="onboard"] .toast, body[data-view="auth"] .toast { bottom: calc(24px + var(--sab)); }

/* ===== Empty states ===== */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 30px 22px; }
.empty-ic { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; margin-bottom: 6px; color: var(--brand2); background: rgba(127,212,255,.07); border: 1px solid rgba(127,212,255,.2); box-shadow: 0 0 26px rgba(127,212,255,.12); }
.empty-ic .ic { width: 26px; height: 26px; }
.empty b { font-size: 16.5px; font-weight: 800; letter-spacing: -0.01em; }
.empty p { color: var(--muted); font-size: 14px; max-width: 300px; }
.empty .btn-ghost { margin-top: 10px; }
.empty-card { margin: 0 12px; }
.empty-card.tall .empty { padding: 56px 22px; }
.feed-loading { display: grid; place-items: center; padding: 40px 0; }
.page-pad { padding: 80px 0; }

/* ===== App layout ===== */
.app { min-height: 100vh; }
.main { min-width: 0; }
.content { padding: 0 0 calc(110px + var(--sab)); min-width: 0; }
.sidebar { display: none; }

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px;
  height: calc(58px + var(--sat)); padding: var(--sat) 8px 0 var(--pad);
  background: rgba(var(--sink), 0.72); backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.tb-left { flex: 1; display: flex; align-items: center; min-width: 0; }
.tb-right { display: flex; align-items: center; gap: 2px; }
.search { display: none; }
body[data-route="profile"] .topbar, body[data-route="edit"] .topbar { border-bottom-color: transparent; }

/* Stories row (people you follow) */
.stories { padding: 14px 0 6px; }
.stories-track { display: flex; gap: 14px; overflow-x: auto; padding: 2px var(--pad) 6px; scrollbar-width: none; }
.stories-track::-webkit-scrollbar, .chips-track::-webkit-scrollbar, .clips-track::-webkit-scrollbar, .people-track::-webkit-scrollbar { display: none; }
.story { position: relative; flex: none; width: 70px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.story .ring { width: 70px; height: 70px; border-radius: 50%; padding: 2.5px; background: linear-gradient(135deg, var(--acc), rgba(var(--acc-rgb), .35)); box-shadow: 0 0 16px rgba(var(--acc-rgb), .2); }
.story .ring .avatar { width: 100%; height: 100%; border: 3px solid var(--bg); font-size: 24px; }
.story.you .ring { background: rgba(var(--ink), 0.14); box-shadow: none; }
.story.find .ring { background: rgba(var(--ink), .1); box-shadow: none; }
.find-ic { display: grid; place-items: center; color: var(--brand2); background: var(--bg-2) !important; }
.find-ic .ic { width: 24px; height: 24px; }
.story .add { position: absolute; top: 48px; right: 1px; width: 22px; height: 22px; border-radius: 50%; background: var(--grad); color: #020a18; display: grid; place-items: center; border: 2.5px solid var(--bg); }
.story .add .ic { width: 12px; height: 12px; }
.story-name { font-size: 11.5px; color: var(--text-2); max-width: 74px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Filter chips */
.chips { position: sticky; top: calc(58px + var(--sat)); z-index: 20; padding: 8px 0 10px; background: linear-gradient(var(--bg) 60%, rgba(var(--sink), 0)); }
.chips-track { display: flex; gap: 8px; overflow-x: auto; padding: 0 var(--pad); scrollbar-width: none; }
.chips .chip { height: 36px; font-size: 13.5px; padding: 0 14px; }

/* Feed */
.feed { display: flex; flex-direction: column; gap: 24px; padding-top: 6px; min-width: 0; }
.feed[data-filter="photos"] [data-kind="clips"], .feed[data-filter="photos"] [data-kind="videos"],
.feed[data-filter="clips"] [data-kind="photos"], .feed[data-filter="clips"] [data-kind="videos"],
.feed[data-filter="videos"] [data-kind="photos"], .feed[data-filter="videos"] [data-kind="clips"],
.feed:not([data-filter="all"]) [data-kind="all"] { display: none; }

.welcome { margin: 0 12px; padding: 26px 20px 22px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; position: relative; overflow: hidden; }
.welcome::before { content: ""; position: absolute; inset: -40% -20% auto; height: 220px; background: radial-gradient(closest-side, rgba(127,212,255,.16), transparent); pointer-events: none; }
.welcome img { width: 78px; position: relative; }
.welcome h2 { font-family: var(--display); font-size: 21px; letter-spacing: -0.025em; line-height: 1.2; position: relative; }
.welcome p { color: var(--text-2); font-size: 14px; max-width: 320px; position: relative; }
.welcome .btn-primary { margin-top: 10px; height: 48px; position: relative; }

.sec-head { display: flex; align-items: center; gap: 12px; padding: 4px var(--pad) 12px; min-width: 0; }
.sec-ic { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; flex: none; color: var(--brand); background: rgba(61, 139, 255, 0.08); border: 1px solid rgba(61, 139, 255, 0.22); box-shadow: 0 0 18px rgba(61, 139, 255, 0.15); }
.sec-head.cyan .sec-ic { color: var(--brand2); background: rgba(127, 212, 255, 0.08); border-color: rgba(127, 212, 255, 0.22); box-shadow: 0 0 18px rgba(127, 212, 255, 0.15); }
.sec-ic .ic { width: 19px; height: 19px; }
.sec-head > div { flex: 1; min-width: 0; }
.sec-head h2 { font-size: 19px; font-weight: 800; letter-spacing: -0.02em; }
.sec-head p { font-size: 12.5px; color: var(--muted); }
.see-all { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; font-weight: 700; color: var(--brand2); flex: none; }
.see-all .ic { width: 16px; height: 16px; }

.people-track { display: grid; grid-auto-flow: column; grid-auto-columns: 148px; gap: 10px; overflow-x: auto; padding: 0 var(--pad) 6px; scrollbar-width: none; scroll-snap-type: x mandatory; scroll-padding-inline: var(--pad); }
.person { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 16px 10px 14px; border-radius: 20px; scroll-snap-align: start; min-width: 0; }
.person-link { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; min-width: 0; width: 100%; }
.person-link .ring-acc { margin-bottom: 8px; }
.person-link b { font-size: 14.5px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-link > span:last-child { font-size: 12.5px; color: var(--muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person .btn-follow { width: 100%; }
.invite { margin: 0 12px; padding: 18px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.invite p { color: var(--text-2); font-size: 14px; }

/* Photo posts */
.post-grid { display: grid; gap: 16px; padding: 0 12px; }
.post { overflow: hidden; min-width: 0; }
.post-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
.post-av { width: 38px; height: 38px; }
.post-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.uname { font-weight: 700; font-size: 14px; }
.sub { font-size: 12px; color: var(--muted); }
.post-media { position: relative; aspect-ratio: 4 / 5; background: var(--bg-2); }
.post-media img { width: 100%; height: 100%; object-fit: cover; }
.post-body { padding: 10px 14px 16px; }
.caption { font-size: 13.5px; color: var(--text-2); line-height: 1.45; overflow-wrap: anywhere; }
.caption b { color: var(--text); }

/* Clips */
.clips-track { display: grid; grid-auto-flow: column; grid-auto-columns: 42%; gap: 10px; overflow-x: auto; padding: 0 var(--pad) 4px; scroll-snap-type: x mandatory; scroll-padding-inline: var(--pad); scrollbar-width: none; }
.clip { position: relative; aspect-ratio: 9 / 16; border-radius: 18px; overflow: hidden; scroll-snap-align: start; border: 1px solid var(--line); background: var(--bg-2); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5); }
.clip > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.clip-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.3) 0%, rgba(0,0,0,0) 30%, rgba(4,4,10,.9) 100%); }
.play-btn { position: absolute; top: 42%; left: 50%; transform: translate(-50%, -50%); width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: rgba(var(--ink), 0.16); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(var(--ink), 0.3); color: #fff; }
.play-btn .ic { width: 20px; height: 20px; margin-left: 2px; }
.clip-info { position: absolute; left: 10px; right: 10px; bottom: 10px; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.clip-user { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; min-width: 0; }
.clip-user .avatar { width: 22px; height: 22px; font-size: 10px; }
.clip-cap { font-size: 12px; line-height: 1.3; color: #e8e9f2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clips-track.ghost { overflow: hidden; }
.ghost-tile { box-shadow: none; border: 1px dashed rgba(var(--ink), .1); background: linear-gradient(180deg, rgba(var(--ink), .03), rgba(var(--ink), .01)); }
.ghost-tile:first-child { border: 1px dashed rgba(127,212,255,.35); background: radial-gradient(120% 80% at 50% 0%, rgba(127,212,255,.1), transparent 70%), rgba(var(--ink), .02); }
.ghost-msg { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 14px; text-align: center; }
.ghost-msg .ic { width: 30px; height: 30px; color: var(--brand2); filter: drop-shadow(0 0 8px rgba(127,212,255,.5)); margin-bottom: 4px; }
.ghost-msg b { font-size: 14.5px; }
.ghost-msg em { font-style: normal; font-size: 12px; color: var(--muted); }
.clip-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 0 12px; }

/* Videos */
.vgrid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; padding: 0 var(--pad); }
.vcard { display: flex; flex-direction: column; gap: 11px; min-width: 0; }
.thumb { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-md); overflow: hidden; background: var(--bg-2); border: 1px solid var(--line); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; color: #020a18; background: var(--grad); box-shadow: 0 0 30px rgba(95,176,255,.5); }
.thumb-play .ic { width: 22px; height: 22px; margin-left: 3px; }
.vmeta { display: flex; gap: 11px; align-items: flex-start; min-width: 0; }
.vav { width: 36px; height: 36px; }
.vtext { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.vtitle { font-size: 14.5px; font-weight: 700; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vchan, .vstats { font-size: 12.5px; color: var(--muted); }

.feed-end { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 6px 24px 10px; color: var(--muted); font-size: 13px; }
.feed-end img { width: 72px; margin-bottom: 4px; opacity: .9; }
.feed-end b { color: var(--text); font-size: 15px; }

/* Pages */
.page { padding: 16px 0 0; min-width: 0; }
.page-title { font-family: var(--display); font-size: 26px; font-weight: 700; letter-spacing: -0.03em; padding: 0 var(--pad); }
.page-head { padding-top: 4px; padding-bottom: 16px; }

/* Search */
.search-bar { display: flex; align-items: center; gap: 10px; height: 52px; margin: 14px var(--pad) 8px; padding: 0 14px; border-radius: 16px; background: rgba(var(--ink), .045); border: 1px solid var(--line-2); color: var(--muted); transition: border-color .2s, box-shadow .2s; }
.search-bar:focus-within { border-color: rgba(127,212,255,.55); box-shadow: 0 0 0 4px rgba(127,212,255,.1); }
.search-bar .ic { width: 20px; height: 20px; }
.search-bar input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--text); font: inherit; font-size: 16px; }
.search-bar input::placeholder { color: var(--placeholder); }
.results { padding: 4px 0 0; }
.results .empty-card { margin-top: 8px; }
.results-title { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 12px var(--pad) 6px; }
.person-row { display: flex; align-items: center; gap: 12px; padding: 8px var(--pad); min-width: 0; }
.person-row:hover { background: rgba(var(--ink), .025); }
.pr-link { flex: 1; display: flex; align-items: center; gap: 12px; min-width: 0; }
.pr-meta { display: flex; flex-direction: column; min-width: 0; }
.pr-meta b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-meta span { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.you-tag { font-size: 12px; font-weight: 800; color: var(--muted); padding: 6px 10px; border-radius: 10px; border: 1px solid var(--line-2); }

/* ===== Profile ===== */
.profile { min-width: 0; }
.pf-banner { position: relative; aspect-ratio: 3 / 1; min-height: 120px; overflow: hidden; background: var(--bg-2); }
.pf-banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pf-banner::after { content: ""; position: absolute; inset: auto 0 0; height: 50%; background: linear-gradient(rgba(var(--sink), 0), rgba(var(--sink), .55)); pointer-events: none; }
.pf-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; padding: 0 var(--pad); margin-top: -46px; position: relative; z-index: 1; min-width: 0; }
.pf-avatar { width: 104px; height: 104px; padding: 3px; box-shadow: 0 0 30px rgba(var(--acc-rgb), .45); }
.pf-avatar > .avatar { border-width: 4px; }
.pf-actions { display: flex; align-items: center; gap: 8px; padding-bottom: 4px; min-width: 0; }
.pf-actions .btn-ghost { height: 42px; padding: 0 14px; font-size: 14px; }
.pf-actions .btn-ghost .ic { width: 16px; height: 16px; }
.pf-info { padding: 12px var(--pad) 0; min-width: 0; }
.pf-info h1 { font-family: var(--display); font-size: 24px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.15; overflow-wrap: anywhere; }
.pf-handle { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 14.5px; margin-top: 2px; }
.dot-sep { width: 4px; height: 4px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 6px var(--acc); }
.pf-bio { margin-top: 12px; font-size: 15px; color: var(--text-2); line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
.pf-bio.muted { color: var(--muted); font-size: 14px; }
.pf-facts { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 12px; color: var(--muted); font-size: 13.5px; min-width: 0; }
.pf-facts > * { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.pf-facts .ic { width: 16px; height: 16px; }
.pf-link { color: var(--acc); font-weight: 700; max-width: 100%; }
.pf-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-interests { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.pf-interests span { padding: 5px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 700; color: var(--acc); background: rgba(var(--acc-rgb), .08); border: 1px solid rgba(var(--acc-rgb), .25); }
.pf-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 18px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); }
.pf-stats div { display: flex; flex-direction: column; align-items: center; padding: 12px 4px; }
.pf-stats div + div { border-left: 1px solid var(--line); }
.pf-stats b { font-size: 19px; font-weight: 800; font-family: var(--display); }
.pf-stats span { font-size: 12px; color: var(--muted); font-weight: 600; }
.pf-tabs { display: flex; margin-top: 18px; border-bottom: 1px solid var(--line); position: sticky; top: calc(58px + var(--sat)); z-index: 5; background: rgba(var(--sink), .88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.pf-tabs button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 50px; font-size: 14px; font-weight: 700; color: var(--muted); position: relative; }
.pf-tabs .ic { width: 18px; height: 18px; }
.pf-tabs button.on { color: var(--text); }
.pf-tabs button.on .ic { color: var(--acc); filter: drop-shadow(0 0 6px rgba(var(--acc-rgb), .6)); }
.pf-tabs button.on::after { content: ""; position: absolute; left: 22%; right: 22%; bottom: -1px; height: 3px; border-radius: 3px; background: var(--acc); box-shadow: 0 0 12px var(--acc); }
.pf-content { padding: 8px 0 0; min-height: 240px; }
.pf-content .empty-ic { color: var(--acc); background: rgba(var(--acc-rgb), .07); border-color: rgba(var(--acc-rgb), .22); box-shadow: 0 0 26px rgba(var(--acc-rgb), .12); }
.pf-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; }
.pf-tile { aspect-ratio: 1; background: var(--bg-2); overflow: hidden; }
.pf-tile img { width: 100%; height: 100%; object-fit: cover; }

/* ===== Edit profile ===== */
.edit-page { padding: 8px 0 0; max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.edit-top { display: flex; align-items: center; gap: 6px; padding: 0 var(--pad) 0 6px; }
.edit-top .page-title { flex: 1; padding: 0; font-size: 22px; }
.ed-media { padding: 0 var(--pad); }
.edit-fields { margin: 0 12px; padding: 18px 16px; }
.edit-page .form-error, .edit-page > .btn-primary, .edit-page > .btn-ghost { margin-left: 12px; margin-right: 12px; width: auto; }
.edit-page > .btn-ghost { margin-bottom: 8px; }

/* ===== Bottom tab bar (mobile) ===== */
.tabbar {
  position: fixed; left: 10px; right: 10px; bottom: calc(10px + var(--sab)); z-index: 40;
  height: 66px; display: flex; align-items: center; justify-content: space-around;
  background: rgba(14, 14, 22, 0.8); backdrop-filter: blur(22px) saturate(160%); -webkit-backdrop-filter: blur(22px) saturate(160%);
  border: 1px solid var(--line-2); border-radius: 24px; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255,255,255,.06);
}
.tab { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--muted); font-size: 10.5px; font-weight: 600; min-width: 0; }
.tab .ic { width: 24px; height: 24px; }
.tab.active { color: var(--brand); }
.tab.active .ic { filter: drop-shadow(0 0 8px rgba(61, 139, 255, 0.6)); }
.tab.active::after { content: ""; position: absolute; bottom: -9px; width: 4px; height: 4px; border-radius: 50%; background: var(--brand-b); box-shadow: var(--glow-brand); }
.create-btn { width: 52px; height: 40px; border-radius: 14px; display: grid; place-items: center; color: #020a18; background: var(--grad); box-shadow: 0 0 24px rgba(95, 176, 255, 0.45), inset 0 1px 0 rgba(255,255,255,.5); }
.create-btn .ic { width: 22px; height: 22px; }
.tab-av { width: 24px; height: 24px; font-size: 11px; border: 1.5px solid var(--line-2); }
.tab.active .tab-av { border-color: var(--acc); box-shadow: 0 0 10px rgba(var(--acc-rgb), .6); }

/* =========================================================
   Tablet >= 700px
   ========================================================= */
@media (min-width: 700px) {
  :root { --pad: 24px; }
  .feed { gap: 32px; }
  .welcome, .invite, .empty-card { margin-left: var(--pad); margin-right: var(--pad); }
  .welcome { padding: 34px 28px 28px; }
  .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0 var(--pad); gap: 18px; }
  .clips-track { grid-auto-columns: 190px; }
  .clip-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 0 var(--pad); }
  .vgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 18px; }
  .people-track { grid-auto-columns: 168px; }
  .pf-head { margin-top: -60px; }
  .pf-avatar { width: 136px; height: 136px; }
  .pf-info h1 { font-size: 30px; }
  .edit-fields { margin: 0; }
  .edit-page { padding-left: var(--pad); padding-right: var(--pad); }
  .ed-media { padding: 0; }
  .edit-page .form-error, .edit-page > .btn-primary, .edit-page > .btn-ghost { margin-left: 0; margin-right: 0; }
  .auth-wrap { max-width: 480px; }
  .ob-body h1 { font-size: 32px; }
}

/* =========================================================
   Desktop >= 1024px
   ========================================================= */
@media (min-width: 1024px) {
  :root { --pad: 32px; }
  .mobile-only { display: none !important; }
  .desktop-only { display: inline-flex !important; }
  .tabbar { display: none; }
  .content { padding-bottom: 60px; }
  .toast { bottom: 28px; }

  .app { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); }
  .sidebar {
    position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 6px;
    padding: 22px 16px 16px; border-right: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(var(--ink), 0.025), rgba(var(--ink), 0.008));
    overflow-y: auto; scrollbar-width: none;
  }
  .sidebar > * { flex-shrink: 0; }
  .sidebar .brand { padding: 4px 10px 16px; }
  .sidebar .brand-logo { height: 30px; }
  .sidebar .wordmark { font-size: 26px; }
  .side-nav { display: flex; flex-direction: column; gap: 2px; }
  .side-link { position: relative; display: flex; align-items: center; gap: 14px; height: 44px; padding: 0 12px; border-radius: 14px; font-size: 15px; font-weight: 600; color: var(--text-2); transition: background .2s, color .2s; }
  .side-link:hover { background: var(--panel-2); color: var(--strong); }
  .side-link .ic { width: 23px; height: 23px; }
  .side-link.active { color: var(--strong); background: linear-gradient(90deg, rgba(61,139,255,0.12), rgba(127,212,255,0.05)); box-shadow: inset 0 0 0 1px rgba(61,139,255,0.16); }
  .side-link.active .ic { color: var(--brand); filter: drop-shadow(0 0 8px rgba(61,139,255,.6)); }
  .side-link.active::before { content: ""; position: absolute; left: -16px; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand-b); box-shadow: var(--glow-brand); }
  .btn-create { margin: 12px 0 8px; height: 48px; border-radius: 15px; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 15px; font-weight: 800; color: #020a18; background: var(--grad); box-shadow: 0 0 28px rgba(95, 176, 255, 0.32), inset 0 1px 0 rgba(255,255,255,.5); }
  .btn-create .ic { width: 20px; height: 20px; }
  .side-section { margin-top: 10px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
  .side-title { font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 0 12px 8px; }
  .side-follow { display: flex; align-items: center; gap: 11px; height: 40px; padding: 0 12px; border-radius: 12px; font-size: 14px; color: var(--text-2); min-width: 0; }
  .side-follow:hover { background: var(--panel-2); }
  .sf-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .side-empty { font-size: 13px; color: var(--muted); padding: 0 12px 4px; }
  .side-more { display: flex; align-items: center; gap: 4px; padding: 6px 12px; font-size: 13px; font-weight: 700; color: var(--brand2); }
  .side-more .ic { width: 15px; height: 15px; }
  .side-foot { margin-top: auto; display: flex; align-items: center; gap: 6px; padding: 8px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); }
  .side-me { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; }
  .me-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 12.5px; color: var(--muted); }
  .me-meta b { color: var(--text); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .me-meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  .topbar { height: 72px; padding: 0 var(--pad); gap: 20px; }
  .tb-left { display: none; }
  .search { flex: 1; max-width: 580px; display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 16px; border-radius: 15px; background: var(--panel); border: 1px solid var(--line); color: var(--muted); transition: border-color .2s, box-shadow .2s; }
  .search:focus-within { border-color: rgba(127,212,255,.45); box-shadow: 0 0 0 4px rgba(127,212,255,.08); }
  .search .ic { width: 19px; height: 19px; }
  .search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--text); font: inherit; font-size: 16px; }
  .search input::placeholder { color: var(--muted); }
  .tb-right { margin-left: auto; gap: 10px; }
  .btn-upload { align-items: center; gap: 7px; height: 42px; padding: 0 16px; border-radius: 14px; font-weight: 700; font-size: 14px; color: var(--text); background: var(--panel); border: 1px solid rgba(61,139,255,.35); box-shadow: inset 0 0 18px rgba(61,139,255,.06); }
  .btn-upload .ic { width: 18px; height: 18px; color: var(--brand); }
  .chips { top: 72px; padding: 12px 0 14px; }
  .pf-tabs { top: 72px; }
  body[data-route="search"] .search-page .search-bar { display: none; }
  .search-page .results { padding-top: 8px; }

  .content { max-width: 1240px; margin: 0 auto; }
  .stories { padding-top: 22px; }
  .stories-track { gap: 18px; }
  .story, .story .ring { width: 76px; }
  .story .ring { height: 76px; }
  .story .add { top: 54px; }
  .feed { gap: 40px; }
  .post-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
  .clips-track { grid-auto-columns: calc((100% - 5 * 14px) / 6); gap: 14px; }
  .clip-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .vgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 34px 22px; }
  .sec-head h2 { font-size: 22px; }
  .page { padding-top: 24px; }
  .search-page { max-width: 760px; }

  .profile { max-width: 1000px; margin: 0 auto; padding: 24px var(--pad) 0; }
  .pf-banner { aspect-ratio: auto; height: min(30vw, 280px); border-radius: 26px; border: 1px solid var(--line); box-shadow: 0 0 60px rgba(var(--acc-rgb), .12); }
  .pf-head { padding: 0 28px; margin-top: -70px; }
  .pf-avatar { width: 156px; height: 156px; }
  .pf-avatar .avatar-fallback { font-size: 56px; }
  .pf-info { padding: 14px 28px 0; display: grid; grid-template-columns: minmax(0, 1fr) 340px; column-gap: 40px; }
  .pf-info > * { grid-column: 1; }
  .pf-info .pf-stats { grid-column: 2; grid-row: 1 / span 5; align-self: start; margin-top: 4px; }
  .pf-info h1 { font-size: 34px; }
  .pf-tabs { margin-top: 26px; border-radius: 0; }

  .auth-wrap { max-width: 1040px; flex-direction: row; align-items: center; gap: 72px; padding: 40px; }
  .auth-wrap.single { max-width: 460px; }
  .auth-hero { flex: 1; align-items: flex-start; text-align: left; }
  .auth-logo { width: 132px; }
  .auth-title { font-size: 72px; }
  .auth-tag { font-size: 19px; max-width: 420px; margin-top: 14px; }
  .auth-points { display: flex; flex-direction: column; gap: 14px; list-style: none; margin-top: 32px; color: var(--text-2); font-size: 15.5px; }
  .auth-points li { display: flex; align-items: center; gap: 14px; }
  .auth-points span { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; color: var(--brand); background: rgba(61,139,255,.07); border: 1px solid rgba(61,139,255,.2); }
  .auth-points li:nth-child(2) span { color: var(--brand2); background: rgba(127,212,255,.07); border-color: rgba(127,212,255,.2); }
  .auth-points .ic { width: 20px; height: 20px; }
  .auth-card { width: 440px; flex: none; padding: 24px 26px 26px; }
  .sheet-wrap { align-items: center; }
  .sheet { margin: 0; padding: 18px 22px 22px; }
  .sheet-grab { display: none; }
  .ob { padding-top: 24px; }
  .ob-top { border-radius: 18px; }
}

@media (min-width: 1360px) {
  .vgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* =========================================================
   v3: posting, engagement, ranked feed, clips viewer
   ========================================================= */
body.noscroll { overflow: hidden; }
.htag { color: var(--brand2); font-weight: 600; }
.btn-ghost.sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 11px; }
.pager { display: grid; place-items: center; min-height: 24px; padding: 8px 0; grid-column: 1 / -1; }
.notice.bad { background: rgba(255,85,119,.07); border-color: rgba(255,85,119,.3); flex-wrap: wrap; align-items: center; }
.notice.bad .ic { color: var(--danger); }
.notice > span { flex: 1; min-width: 160px; }
.notice .btn-ghost { margin-left: auto; }
.danger-btn { background: var(--danger); color: #fff; box-shadow: 0 0 24px rgba(255,85,119,.35); margin-top: 6px; }
.empty-ic.danger { color: var(--danger); background: rgba(255,85,119,.08); border-color: rgba(255,85,119,.25); box-shadow: none; }
.sheet-body.center .btn-ghost.block { margin-top: 8px; }

/* Reason labels */
.why { flex: none; display: inline-flex; align-items: center; height: 19px; padding: 0 7px; border-radius: 999px; font-size: 10.5px; font-weight: 800; letter-spacing: .01em; white-space: nowrap; }
.why.fol { color: var(--brand); background: rgba(61,139,255,.09); border: 1px solid rgba(61,139,255,.28); }
.why.rec { color: var(--brand2); background: rgba(127,212,255,.08); border: 1px solid rgba(127,212,255,.28); }
.why.on-media { background: rgba(4,4,10,.55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.why.sm { height: 17px; font-size: 10px; padding: 0 6px; }

/* Photo post card */
.post-head { padding: 10px 6px 10px 14px; }
.post-line { display: flex; align-items: center; gap: 7px; min-width: 0; }
.post-line .uname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.post-meta .sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-av-link { flex: none; border-radius: 50%; }
.post-more { width: 38px; height: 38px; }
.post-media { overflow: hidden; user-select: none; -webkit-user-select: none; }
.car { display: flex; width: 100%; height: 100%; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.car::-webkit-scrollbar { display: none; }
.car img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: start; scroll-snap-stop: always; -webkit-user-drag: none; }
.car-count { position: absolute; top: 12px; right: 12px; padding: 4px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: rgba(4,4,10,.6); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); pointer-events: none; }
/* v12: dots sit under the media (Instagram-style), the 1/N counter stays top-right on the media */
.car-dots { display: flex; justify-content: center; align-items: center; gap: 5px; height: 6px; margin: 10px 0 -2px; pointer-events: none; }
.car-dots i { flex: none; width: 6px; height: 6px; border-radius: 50%; background: rgba(var(--ink), .22); transition: width .2s, background .2s; }
.car-dots i.on { background: var(--brand); box-shadow: var(--glow-brand); width: 16px; border-radius: 4px; }
.car-dots i.clip:not(.on) { background: var(--brand2); opacity: .55; }
.car > * { flex: 0 0 100%; width: 100%; height: 100%; scroll-snap-align: start; scroll-snap-stop: always; }
.car-slide { position: relative; overflow: hidden; background: #000; }
.car-clip.fv-media { max-height: none; min-height: 0; }
.car-clip > img, .car-clip > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.car-clip > video { background: transparent; }
.car-clip .kind-badge { top: 12px; left: 12px; }
.post-media[data-n] .car-count { z-index: 3; }
.post-media .car-nav { z-index: 3; }
.car-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border-radius: 50%; display: none; place-items: center; background: rgba(4,4,10,.6); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 1px solid var(--line-2); }
.car-nav .ic { width: 18px; height: 18px; }
.car-nav.prev { left: 10px; } .car-nav.next { right: 10px; }
@media (hover: hover) and (pointer: fine) { .post-media:hover .car-nav:not([hidden]) { display: grid; } }
.heart-pop { position: absolute; left: 50%; top: 50%; width: 96px; height: 96px; margin: -48px 0 0 -48px; color: #ff3d6e; opacity: 0; transform: scale(.4); pointer-events: none; filter: drop-shadow(0 0 24px rgba(255,61,110,.7)); z-index: 3; }
.heart-pop .ic { width: 100%; height: 100%; fill: currentColor; stroke: none; }
.heart-pop.go { animation: heartpop .8s ease-out; }
@keyframes heartpop { 0% { opacity: 0; transform: scale(.4); } 18% { opacity: 1; transform: scale(1.15); } 32% { transform: scale(.95); } 70% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.1) translateY(-14px); } }
.post-actions { display: flex; align-items: center; gap: 2px; padding: 6px 8px 0; min-width: 0; }
.act { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 8px; border-radius: 12px; font-size: 13.5px; font-weight: 700; color: var(--text); transition: background .15s, transform .15s; }
.act:active { transform: scale(.92); }
.act .ic { width: 25px; height: 25px; transition: transform .2s; }
.act.like.on .ic { fill: #ff3d6e; stroke: #ff3d6e; animation: likepop .35s; }
.act.save.on .ic { fill: var(--brand); stroke: var(--brand); }
@keyframes likepop { 50% { transform: scale(1.25); } }
.act-gap { flex: 1; }
.act-views { font-size: 12.5px; color: var(--muted); margin-right: 2px; white-space: nowrap; }
.post-body { padding: 4px 14px 14px; display: flex; flex-direction: column; gap: 6px; }
.caption[data-clamp] { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; white-space: pre-line; }
.caption.open { -webkit-line-clamp: unset; display: block; }
.post-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.post-tags span { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--text-2); background: var(--panel-2); border: 1px solid var(--line); }
.post-tags .ic { width: 12px; height: 12px; color: var(--brand); }
.view-comments { align-self: flex-start; font-size: 13px; color: var(--muted); font-weight: 600; }
.view-comments:hover { color: var(--text-2); }
[data-post].leaving { opacity: 0; transform: scale(.96); transition: opacity .25s, transform .25s; }

/* Clips/videos inside mixed lists */
.post-media.mm { display: block; background: #000; }
.post-media.mm-clip { aspect-ratio: 4 / 5; }
.post-media.mm-video { aspect-ratio: 16 / 9; }
.post-media.mm img { width: 100%; height: 100%; object-fit: cover; }
.post-media.mm .thumb-play { width: 60px; height: 60px; }
.dur { position: absolute; right: 8px; bottom: 8px; padding: 2px 7px; border-radius: 7px; font-size: 12px; font-weight: 700; background: rgba(4,4,10,.78); font-variant-numeric: tabular-nums; }
.kind-badge { position: absolute; left: 10px; top: 10px; display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px 0 8px; border-radius: 999px; font-size: 12px; font-weight: 800; background: rgba(4,4,10,.6); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.kind-badge .ic { width: 15px; height: 15px; color: var(--brand2); }

/* Clip tiles + video cards */
.clip { display: block; }
.clip .why.on-media { position: absolute; left: 8px; top: 8px; }
.clip-views { position: absolute; right: 8px; top: 8px; display: inline-flex; align-items: center; gap: 3px; height: 20px; padding: 0 7px; border-radius: 999px; font-size: 11px; font-weight: 700; background: rgba(4,4,10,.55); }
.clip-views .ic { width: 10px; height: 10px; }
.vcard { color: inherit; }
.vav-wrap { flex: none; }
.vchan { display: flex; align-items: center; gap: 6px; min-width: 0; }
.thumb .dur { right: 8px; bottom: 8px; }

/* Stories: ring = posted in the last 24h */
.story.seen .ring { background: rgba(var(--ink), .14); box-shadow: none; }
.story.seen .story-name { color: var(--muted); }
.story.new .ring { animation: ringglow 2.6s ease-in-out infinite; }
@keyframes ringglow { 50% { box-shadow: 0 0 22px rgba(var(--acc-rgb), .45); } }

/* Comments */
.sheet.tall { max-height: calc(88vh - var(--sab)); display: flex; flex-direction: column; }
.sheet.tall .sheet-body { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.cm-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 2px 10px; border-bottom: 1px solid var(--line); }
.cm-head h3 { font-family: var(--display); font-size: 18px; letter-spacing: -0.02em; }
.cm-head span { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.cm-list { flex: 1; min-height: 140px; max-height: 56vh; overflow-y: auto; padding: 6px 0; overscroll-behavior: contain; }
.cm-row { display: flex; gap: 10px; padding: 9px 2px; align-items: flex-start; }
.cm-main { flex: 1; min-width: 0; font-size: 14px; }
.cm-time { color: var(--muted); font-size: 12px; font-weight: 500; }
.cm-body { color: var(--text-2); overflow-wrap: anywhere; margin-top: 1px; }
.cm-del { width: 34px; height: 34px; }
.cm-del .ic { width: 17px; height: 17px; }
.cm-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 30px 0; color: var(--muted); font-size: 13px; text-align: center; }
.cm-empty .ic { width: 28px; height: 28px; color: var(--brand2); margin-bottom: 4px; }
.cm-empty b { color: var(--text); font-size: 15px; }
.cm-form { display: flex; gap: 8px; align-items: center; padding-top: 10px; border-top: 1px solid var(--line); }
.cm-form .input-wrap { flex: 1; height: 44px; border-radius: 13px; }
.cm-form .input-wrap input { padding: 0 12px; }
.cm-form .avatar.sm { width: 34px; height: 34px; }
.menu-why { display: flex; gap: 10px; align-items: center; padding: 2px 8px 12px; margin-bottom: 6px; border-bottom: 1px solid var(--line); color: var(--text-2); font-size: 13.5px !important; }
.menu-why .ic { width: 18px; height: 18px; color: var(--brand2); }

/* Composer */
.composer-wrap { position: fixed; inset: 0; z-index: 110; display: flex; align-items: stretch; justify-content: center; }
.composer-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; transition: opacity .25s; }
.composer { position: relative; width: 100%; display: flex; flex-direction: column; border-radius: 0; border: 0; background: var(--sheet-bg); transform: translateY(24px); opacity: 0; transition: transform .3s cubic-bezier(.3,.7,.2,1), opacity .25s; }
.composer-wrap.open .composer-backdrop { opacity: 1; }
.composer-wrap.open .composer { transform: none; opacity: 1; }
.cp-top { display: flex; align-items: center; gap: 8px; padding: calc(8px + var(--sat)) 12px 8px 6px; border-bottom: 1px solid var(--line); }
.cp-top h2 { flex: 1; font-family: var(--display); font-size: 18px; letter-spacing: -0.02em; }
.cp-top .btn-primary { min-width: 84px; }
.cp-body { flex: 1; overflow-y: auto; padding: 16px 16px calc(28px + var(--sab)); display: flex; flex-direction: column; gap: 18px; overscroll-behavior: contain; }
.cp-body .field + .field { margin-top: 0; }
.cp-kinds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.cp-kind { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 12px 6px 10px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line-2); color: var(--text-2); transition: all .2s; }
.cp-kind .ic { width: 24px; height: 24px; margin-bottom: 3px; color: var(--muted); }
.cp-kind b { font-size: 14.5px; color: var(--text); }
.cp-kind small { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.cp-kind.on { border-color: rgba(61,139,255,.55); background: linear-gradient(180deg, rgba(61,139,255,.1), rgba(127,212,255,.04)); box-shadow: 0 0 22px rgba(61,139,255,.14), inset 0 0 0 1px rgba(61,139,255,.25); }
.cp-kind.on .ic { color: var(--brand); filter: drop-shadow(0 0 6px rgba(61,139,255,.6)); }
.cp-drop { width: 100%; min-height: 190px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 24px 18px; border-radius: 20px; border: 1.5px dashed rgba(127,212,255,.35); background: radial-gradient(closest-side, rgba(127,212,255,.07), transparent), var(--panel); text-align: center; color: var(--muted); font-size: 13px; }
.cp-drop .ic { width: 40px; height: 40px; color: var(--brand2); margin-bottom: 6px; filter: drop-shadow(0 0 10px rgba(127,212,255,.5)); }
.cp-drop b { color: var(--text); font-size: 16.5px; }
.cp-drop.busy { border-style: solid; border-color: var(--line-2); }
.cp-photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.cp-thumb { position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: var(--bg-2); border: 1px solid var(--line); }
.cp-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cp-n { position: absolute; left: 6px; top: 6px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #020a18; background: var(--grad); }
.cp-rm { position: absolute; right: 5px; top: 5px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: rgba(4,4,10,.7); border: 1px solid var(--line-2); }
.cp-rm .ic { width: 14px; height: 14px; }
.cp-add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 1.5px dashed var(--line-2); color: var(--muted); font-size: 12.5px; font-weight: 700; background: var(--panel); }
.cp-add .ic { width: 24px; height: 24px; color: var(--brand); }
.cp-media .hint { margin-top: 8px; }
.cp-video { display: flex; flex-direction: column; gap: 10px; }
.cp-vstage { position: relative; border-radius: 18px; overflow: hidden; background: #000; border: 1px solid var(--line); width: 100%; }
.cp-video.k-clip .cp-vstage { width: min(100%, calc(min(46vh, 440px) * 9 / 16)); margin: 0 auto; }
.cp-vstage video { width: 100%; height: 100%; object-fit: contain; display: block; }
.cp-vmeta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2); }
.cp-vmeta span { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.cp-vmeta .ic { width: 14px; height: 14px; color: var(--brand2); }
.cp-vmeta .linkish { margin-left: auto; }
.cp-video .notice { margin: 0; }
.cp-hash { display: flex; flex-wrap: wrap; gap: 6px; }
.cp-hash:empty { display: none; }
.cp-hash span { height: 24px; padding: 0 9px; display: inline-flex; align-items: center; border-radius: 999px; font-size: 12.5px; font-weight: 700; color: var(--brand2); background: rgba(127,212,255,.08); border: 1px solid rgba(127,212,255,.22); }
.cp-tags .chip { height: 34px; font-size: 13px; padding: 0 12px; }
.cp-tags .chip:disabled { opacity: .35; }
.cp-tags { gap: 8px; }
.cp-progress { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line-2); font-size: 13.5px; font-weight: 700; }
.cp-bar { height: 8px; border-radius: 8px; background: rgba(var(--ink), .08); overflow: hidden; }
.cp-bar i { display: block; height: 100%; width: 0; border-radius: 8px; background: var(--grad-h); box-shadow: 0 0 14px rgba(95,176,255,.6); transition: width .2s; }

/* Single post / watch page */
.post-page { max-width: 1120px; margin: 0 auto; padding-top: 8px; }
.post-top { display: flex; align-items: center; gap: 4px; padding: 0 var(--pad) 10px 6px; }
.post-top .page-title { padding: 0; font-size: 22px; }
.post-split, .watch-grid { display: grid; gap: 16px; padding: 0 12px; align-items: start; min-width: 0; }
.post-comments { padding: 14px 14px 12px; min-width: 0; }
.post-comments .cm-list { max-height: 52vh; }
.watch-main { min-width: 0; }
.player { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 18px 50px rgba(0,0,0,.5); }
.player video { width: 100%; height: 100%; object-fit: contain; display: block; background: #000; }
.player.vertical { aspect-ratio: 9 / 16; width: min(100%, calc(76vh * 9 / 16)); margin: 0 auto; }
.player-start { position: absolute; inset: 0; display: grid; place-items: center; background: radial-gradient(closest-side, rgba(0,0,0,.25), transparent); }
.player-start .ic { width: 74px; height: 74px; padding: 22px 20px 22px 26px; border-radius: 50%; color: #020a18; background: var(--grad); box-shadow: 0 0 40px rgba(95,176,255,.55); }
.w-title { font-size: 19px; font-weight: 800; letter-spacing: -0.01em; margin: 14px 4px 2px; overflow-wrap: anywhere; }
.w-stats { font-size: 13px; color: var(--muted); margin: 0 4px; }
.w-channel { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 14px 4px 6px; min-width: 0; }
.w-ch { display: flex; align-items: center; gap: 10px; min-width: 0; }
.w-ch > span:last-child { display: flex; flex-direction: column; min-width: 0; font-size: 12.5px; color: var(--muted); }
.w-ch b { color: var(--text); font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-actions.pills { flex-wrap: wrap; gap: 8px; padding: 6px 2px 0; }
.post-actions.pills .act { background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 999px; padding: 0 14px; height: 40px; }
.post-actions.pills .act-gap { display: none; }
.post-actions.pills .act-views { order: 9; width: 100%; display: none; }
.w-desc { margin-top: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; white-space: pre-wrap; color: var(--text-2); font-size: 14px; overflow-wrap: anywhere; }
.post-page .post-head .post-more { display: inline-flex; }

/* Profile tiles */
.pf-tile { position: relative; display: block; }
.pf-badge { position: absolute; right: 6px; top: 6px; color: #fff; filter: drop-shadow(0 1px 3px rgba(0,0,0,.8)); }
.pf-badge .ic { width: 18px; height: 18px; }
.pf-tabs button span { white-space: nowrap; }

/* Clips viewer: full-screen vertical swipe on phones */
.cv { position: fixed; inset: 0; z-index: 25; background: #000; }
body[data-route="clips"] .topbar { display: none; }
body[data-route="clips"] .content { padding-bottom: 0; }
body[data-route="clips"] .tabbar { background: rgba(0,0,0,.72); }
.cv-top { position: absolute; top: 0; left: 0; right: 0; z-index: 4; display: flex; align-items: center; justify-content: space-between; padding: calc(8px + var(--sat)) 10px 18px 16px; background: linear-gradient(rgba(0,0,0,.55), transparent); pointer-events: none; }
.cv-top > * { pointer-events: auto; }
.cv-top h1 { font-family: var(--display); font-size: 20px; letter-spacing: -0.02em; text-shadow: 0 1px 8px rgba(0,0,0,.6); }
.cv-mute { background: rgba(var(--ink), .12); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.cv-track { height: 100%; overflow-y: auto; scroll-snap-type: y mandatory; overscroll-behavior: contain; scrollbar-width: none; }
.cv-track::-webkit-scrollbar { display: none; }
.cv-slide { position: relative; height: 100%; scroll-snap-align: start; scroll-snap-stop: always; display: flex; justify-content: center; }
.cv-stage { position: relative; width: 100%; height: 100%; max-width: calc(100dvh * 9 / 16); background: #000; overflow: hidden; }
.cv-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.cv-tap { position: absolute; inset: 0; z-index: 1; }
.cv-paused { position: absolute; left: 50%; top: 50%; z-index: 2; width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 50%; display: grid; place-items: center; background: rgba(0,0,0,.4); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; transform: scale(.8); transition: opacity .2s, transform .2s; pointer-events: none; }
.cv-paused .ic { width: 34px; height: 34px; margin-left: 4px; }
.cv-slide.paused .cv-paused { opacity: 1; transform: none; }
.cv-stage::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 46%; background: linear-gradient(transparent, rgba(0,0,0,.72)); pointer-events: none; z-index: 1; }
.cv-info { position: absolute; z-index: 3; left: 14px; right: 82px; bottom: calc(100px + var(--sab)); display: flex; flex-direction: column; gap: 6px; text-shadow: 0 1px 6px rgba(0,0,0,.7); pointer-events: none; }
.cv-info a, .cv-info .htag { pointer-events: auto; }
.cv-user { display: flex; align-items: center; gap: 8px; font-size: 15.5px; font-weight: 800; }
.cv-cap { font-size: 14px; line-height: 1.4; color: #eef0f8; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.cv-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.cv-tags span { height: 22px; padding: 0 8px; display: inline-flex; align-items: center; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: rgba(var(--ink), .14); }
.cv-rail { position: absolute; z-index: 3; right: 8px; bottom: calc(96px + var(--sab)); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.cv-av { position: relative; margin-bottom: 8px; }
.cv-av .avatar { border: 2px solid #fff; }
.cv-follow { position: absolute; left: 50%; bottom: -9px; transform: translateX(-50%); width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: #020a18; background: var(--grad); box-shadow: 0 0 12px rgba(95,176,255,.6); }
.cv-follow .ic { width: 13px; height: 13px; }
.cv-act { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 52px; font-size: 12px; font-weight: 700; text-shadow: 0 1px 4px rgba(0,0,0,.7); }
.cv-act .ic { width: 32px; height: 32px; padding: 2px; filter: drop-shadow(0 1px 4px rgba(0,0,0,.6)); transition: transform .15s; }
.cv-act:active .ic { transform: scale(.88); }
.cv-act.like.on .ic { fill: #ff3d6e; stroke: #ff3d6e; animation: likepop .35s; }
.cv-act.save.on .ic { fill: var(--brand); stroke: var(--brand); }
.cv-bar { position: absolute; z-index: 3; left: 0; right: 0; bottom: calc(84px + var(--sab)); height: 2px; background: rgba(var(--ink), .18); }
.cv-bar i { display: block; height: 100%; width: 0; background: var(--grad-h); }
.cv-slide .heart-pop { z-index: 4; }
.cv-empty { height: 100%; display: grid; place-items: center; padding: 0 20px; }

@media (min-width: 700px) {
  .post-split { padding: 0 var(--pad); }
  .watch-grid { padding: 0 var(--pad); }
  .cp-photos { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 700px) and (max-width: 1023px) {
  .composer-wrap { align-items: center; }
  .composer { width: 560px; max-height: 92vh; border-radius: 26px; border: 1px solid var(--line-2); }
  .cp-top { padding-top: 10px; }
}
@media (min-width: 1024px) {
  .composer-wrap { align-items: center; }
  .composer { width: 600px; max-height: 90vh; border-radius: 26px; border: 1px solid var(--line-2); box-shadow: 0 30px 90px rgba(0,0,0,.7); }
  .cp-top { padding: 12px 14px 12px 8px; }
  .post-split { grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr); }
  .post-split .post-comments { position: sticky; top: 88px; }
  .watch-grid { grid-template-columns: minmax(0, 1fr) 360px; }
  .watch-grid .post-comments { position: sticky; top: 88px; }
  .watch.is-clip .watch-grid { grid-template-columns: minmax(0, 1fr) 380px; }
  .post-comments .cm-list { max-height: 60vh; }

  /* Clips viewer sits in the content column on desktop */
  body[data-route="clips"] .topbar { display: flex; }
  body[data-route="clips"] .content { padding-bottom: 0; max-width: none; }
  .cv { position: relative; inset: auto; z-index: auto; height: calc(100vh - 72px); background: none; }
  .cv-top { position: absolute; left: var(--pad); right: auto; top: 18px; padding: 0; background: none; gap: 14px; flex-direction: column; align-items: flex-start; }
  .cv-top h1 { font-size: 26px; }
  .cv-slide { padding: 18px 0; }
  .cv-stage { width: auto; height: 100%; aspect-ratio: 9 / 16; max-width: none; border-radius: 24px; overflow: visible; box-shadow: 0 24px 70px rgba(0,0,0,.6); }
  .cv-video { border-radius: 24px; }
  .cv-stage::after { border-radius: 0 0 24px 24px; }
  .cv-tap { border-radius: 24px; }
  .cv-info { bottom: 22px; right: 18px; }
  .cv-rail { right: -78px; bottom: 10px; }
  .cv-act { color: var(--text); text-shadow: none; }
  .cv-act .ic { width: 50px; height: 50px; padding: 12px; border-radius: 50%; background: var(--panel-2); border: 1px solid var(--line-2); filter: none; }
  .cv-act:hover .ic { background: rgba(var(--ink), .1); }
  .cv-bar { bottom: 0; left: 14px; right: 14px; }
  .cv-paused { z-index: 2; }
}

/* v3 polish: toasts move to the top while a sheet/composer covers the bottom; no redundant tag on the Following tab */
body:has(.sheet-wrap) .toast, body:has(.composer-wrap) .toast { bottom: auto; top: calc(16px + var(--sat)); transform: translate(-50%, -12px); }
body:has(.sheet-wrap) .toast.show, body:has(.composer-wrap) .toast.show { transform: translate(-50%, 0); }
#feed[data-filter="following"] .why.fol { display: none; }
.composer > .cp-progress { margin: 10px 14px 0; flex: none; }
.composer.busy .cp-rm, .composer.busy .cp-add, .composer.busy .linkish { display: none; }
#cp-error:empty { display: none; }
.cp-vstage video { position: absolute; inset: 0; }
.cp-video.k-clip .cp-vstage { height: min(46vh, 440px); width: auto; max-width: 100%; align-self: center; }
.post-page .view-comments { display: none; }
@media (min-width: 1024px) {
  /* keep the whole photo on screen on the post page */
  .post-split { grid-template-columns: max-content minmax(320px, 400px); justify-content: center; }
  .post-split > .post { width: max(380px, min(640px, calc((100vh - 300px) * var(--ar, 1)))); }
}
.cp-body > * { flex-shrink: 0; }
.gate-brand { display: inline-flex; align-items: center; gap: 8px; font-family: var(--display); font-size: 19px; font-weight: 700; letter-spacing: -0.03em; }
.gate-brand img { width: 30px; height: 30px; filter: drop-shadow(0 0 10px rgba(127,212,255,.35)); }
.gate-out { width: auto; padding: 0 6px; }
.gate-who { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 22px; border-radius: 18px; min-width: 0; }
.gate-who .ring-acc { flex: none; }
.gate-who-meta { display: flex; flex-direction: column; min-width: 0; }
.gate-who-meta b { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gate-who-meta span { color: var(--muted); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nowrap { white-space: nowrap; }

/* =========================================================
   v5: direct messages (inbox, chat, safety)
   ========================================================= */
.badge { position: absolute; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; display: grid; place-items: center; line-height: 1;
  background: var(--brand-b); color: #020a18; font-size: 10.5px; font-weight: 800; font-style: normal; border: 2px solid var(--bg); box-shadow: 0 0 12px rgba(61,139,255,.55); }
.tab .badge { top: -7px; left: calc(50% + 3px); }
.icon-btn .badge { top: 1px; right: -1px; }
.side-link .badge { position: static; margin-left: auto; border: 0; }
.icon-btn.glow { color: #020a18; background: var(--grad); border: 0; box-shadow: 0 0 20px rgba(95,176,255,.35); }
.icon-btn.glow:hover { background: var(--grad); }
.pf-msg { width: 42px; padding: 0 !important; }
.pf-msg span { display: none; }
.pf-msg .ic { width: 20px !important; height: 20px !important; }

/* Inbox */
.dm-list-head { display: flex; align-items: center; gap: 8px; padding: 16px var(--pad) 10px 0; }
.dm-list-head .page-title { flex: 1; min-width: 0; }
.dm-rows { display: flex; flex-direction: column; }
.dm-row { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px var(--pad); min-width: 0; transition: background .15s; }
.dm-row:hover { background: rgba(var(--ink), .03); }
.dm-row.active { background: linear-gradient(90deg, rgba(61,139,255,.09), rgba(127,212,255,.04)); box-shadow: inset 3px 0 0 var(--brand); }
.dm-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.dm-row-top { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.dm-row-top b { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto; min-width: 0; }
.dm-row-handle { flex: 1 1 0; min-width: 0; color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-row-prev { display: flex; align-items: center; gap: 4px; min-width: 0; color: var(--muted); font-size: 13.5px; }
.dm-row-prev span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.dm-row-prev .ic { width: 15px; height: 15px; }
.dm-row-prev.deleted span { font-style: italic; padding-right: .2em; }
.dm-row.unread b { font-weight: 800; }
.dm-row.unread .dm-row-prev { color: var(--text); font-weight: 700; }
.dm-row-side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.dm-row-side time { font-size: 12px; color: var(--muted); }
.dm-row.unread time { color: var(--brand); font-weight: 700; }
.dm-count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-b); color: #020a18; font-size: 11.5px; font-weight: 800; box-shadow: var(--glow-brand); }
.dm-count-ph { height: 20px; }
.dm-empty { padding: 24px 0; }
.dm-pick { flex: 1; display: grid; place-items: center; padding: 40px 16px; }
.dm-pane { display: none; }

/* Chat: mobile = full screen above everything (no top bar / tab bar) */
body[data-chat="1"] .topbar, body[data-chat="1"] .tabbar { display: none; }
body[data-chat="1"] .content { padding-bottom: 0; }
.dm.has-chat .dm-list { display: none; }
.dm.has-chat .dm-pane { display: flex; position: fixed; left: 0; right: 0; top: var(--chat-top, 0px); height: var(--chat-h, 100vh); height: var(--chat-h, 100dvh); z-index: 45; background: var(--bg); }
.dm.has-chat .dm-pane::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(600px 400px at 100% 0%, rgba(70,46,170,.16), transparent 70%), radial-gradient(500px 400px at 0% 100%, rgba(127,212,255,.05), transparent 70%); }
.chat { position: relative; flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.chat-head { flex: none; display: flex; align-items: center; gap: 4px; height: calc(60px + var(--sat)); padding: var(--sat) 6px 0 4px;
  border-bottom: 1px solid var(--line); background: rgba(var(--sink), .78); backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%); position: relative; z-index: 2; }
.chat-back .ic { width: 26px; height: 26px; }
.chat-who { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
.chat-who-meta { display: flex; flex-direction: column; min-width: 0; }
.chat-who-meta b { font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-who-meta span { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-who-meta span.typing { color: var(--brand2); font-weight: 700; }
.chat-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 8px 12px 10px; position: relative; z-index: 1; }
.chat-older { display: grid; place-items: center; min-height: 4px; padding: 4px 0; }
.chat-msgs { display: flex; flex-direction: column; min-width: 0; }
.chat-intro { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 18px 8px 8px; text-align: center; }
.chat-intro .ring-acc { margin-bottom: 8px; }
.chat-intro b { font-size: 18px; letter-spacing: -0.01em; }
.chat-intro > span { color: var(--muted); font-size: 13.5px; }
.chat-intro .btn-ghost { margin-top: 10px; }
.chat-safety, .sheet-tip, .report-adult, .nm-tip { display: flex; align-items: flex-start; gap: 8px; text-align: left; font-size: 12.5px; line-height: 1.45; color: var(--text-2); }
.chat-safety, .sheet-tip { margin-top: 14px; padding: 10px 12px; border-radius: 14px; background: rgba(127,212,255,.05); border: 1px solid rgba(127,212,255,.18); max-width: 420px; }
.chat-safety .ic, .sheet-tip .ic, .report-adult .ic, .nm-tip .ic { width: 17px; height: 17px; color: var(--brand2); margin-top: 1px; }
.chat-empty { text-align: center; color: var(--muted); padding: 10px 16px 18px; }
.chat-day { display: flex; justify-content: center; margin: 18px 0 6px; }
.chat-day span { font-size: 11.5px; font-weight: 700; color: var(--muted); padding: 4px 11px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); }
.msg { display: flex; flex-direction: column; max-width: 78%; margin-top: 10px; min-width: 0; }
.msg.cont { margin-top: 2px; }
.msg.me { align-self: flex-end; align-items: flex-end; }
.msg.them { align-self: flex-start; align-items: flex-start; }
.bubble { max-width: 100%; padding: 9px 14px; border-radius: 20px; font-size: 15px; line-height: 1.38; overflow-wrap: anywhere; cursor: pointer; -webkit-user-select: text; user-select: text; }
.bubble p { white-space: pre-wrap; }
.msg.me .bubble { background: var(--grad); color: #020a18; font-weight: 500; box-shadow: 0 0 18px rgba(95,176,255,.16), inset 0 1px 0 rgba(255,255,255,.45); }
.msg.them .bubble { background: rgba(var(--ink), .07); border: 1px solid var(--line-2); color: var(--text); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: inset 0 1px 0 rgba(255,255,255,.05); }
.msg.me.cont .bubble { border-top-right-radius: 7px; }
.msg.me:not(.tail) .bubble { border-bottom-right-radius: 7px; }
.msg.them.cont .bubble { border-top-left-radius: 7px; }
.msg.them:not(.tail) .bubble { border-bottom-left-radius: 7px; }
.bubble.deleted { cursor: default; background: transparent !important; border: 1px dashed var(--line-2) !important; color: var(--muted) !important; box-shadow: none !important; font-size: 14px; }
.msg-del { display: inline-flex; align-items: center; gap: 6px; font-style: italic; padding-right: .15em; }
.msg-del .ic { width: 15px; height: 15px; }
.msg-img { display: grid; place-items: center; width: 240px; max-width: 100%; min-height: 140px; margin: -4px -9px 7px; border-radius: 15px; overflow: hidden; background: rgba(0,0,0,.25); cursor: zoom-in; }
.msg-img img { width: 100%; height: auto; max-height: 320px; object-fit: cover; }
.bubble.img-only { padding: 0; background: none !important; border: 0 !important; box-shadow: none !important; }
.bubble.img-only .msg-img { margin: 0; border: 1px solid var(--line-2); border-radius: 18px; }
.msg time { font-size: 11px; color: var(--muted); margin: 4px 6px 0; }
.msg.pending .bubble { opacity: .65; }
.msg.failed .bubble { box-shadow: 0 0 0 1.5px var(--danger) !important; }
.msg-status { align-self: flex-end; display: inline-flex; align-items: center; gap: 3px; margin: 3px 6px 0; font-size: 11.5px; font-weight: 600; color: var(--muted); }
.msg-status .ic { width: 14px; height: 14px; }
.msg-status.seen { color: var(--brand2); }
.msg-status.bad { color: var(--danger); font-weight: 700; }
.chat-typing { padding: 10px 0 2px; }
.dots { display: inline-flex; gap: 4px; padding: 12px 14px; border-radius: 18px; background: rgba(var(--ink), .07); border: 1px solid var(--line-2); }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--text-2); animation: dmdot 1.2s ease-in-out infinite; }
.dots i:nth-child(2) { animation-delay: .15s; }
.dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dmdot { 0%, 60%, 100% { opacity: .3; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }
.chat-jump { position: absolute; left: 50%; bottom: calc(76px + var(--sab)); z-index: 3; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 4px; height: 34px; padding: 0 14px 0 10px;
  border-radius: 999px; font-size: 13px; font-weight: 800; color: #020a18; background: var(--grad); box-shadow: 0 8px 24px rgba(0,0,0,.5), 0 0 18px rgba(95,176,255,.3); }
.chat-jump .ic { width: 16px; height: 16px; transform: rotate(90deg); }
.chat-foot { flex: none; position: relative; z-index: 2; padding: 8px 10px calc(8px + var(--sab)); border-top: 1px solid var(--line);
  background: rgba(var(--sink), .82); backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%); }
.chat-row { display: flex; align-items: flex-end; gap: 6px; }
.chat-photo { width: 44px; height: 44px; color: var(--brand2); cursor: pointer; }
.chat-input { flex: 1; min-width: 0; display: flex; border-radius: 22px; padding: 0 14px; background: rgba(var(--ink), .05); border: 1px solid var(--line-2); transition: border-color .2s, box-shadow .2s; }
.chat-input:focus-within { border-color: rgba(127,212,255,.5); box-shadow: 0 0 0 3px rgba(127,212,255,.09); }
.chat-input textarea { flex: 1; min-width: 0; height: 42px; min-height: 42px; max-height: 140px; padding: 10px 0; background: none; border: 0; outline: 0; resize: none; color: var(--text); font: inherit; font-size: 16px; line-height: 1.35; }
.chat-input textarea::placeholder { color: var(--placeholder); }
.chat-send { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: #020a18; background: var(--grad); box-shadow: 0 0 20px rgba(95,176,255,.35); transition: opacity .2s, transform .15s; }
.chat-send .ic { width: 20px; height: 20px; margin: 1px 2px 0 0; }
.chat-send:disabled { opacity: .3; box-shadow: none; }
.chat-send:active:not(:disabled) { transform: scale(.94); }
.chat-attach { padding: 4px 0 8px 50px; }
.chat-thumb { position: relative; display: inline-block; }
.chat-thumb img { height: 84px; width: auto; max-width: 160px; object-fit: cover; border-radius: 14px; border: 1px solid var(--line-2); }
.chat-thumb button { position: absolute; top: -7px; right: -7px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-2); border: 1px solid var(--line-2); }
.chat-thumb .ic { width: 14px; height: 14px; }
.chat-count { text-align: right; font-size: 11.5px; color: var(--muted); padding: 4px 8px 0; }
.chat-count.bad { color: var(--danger); font-weight: 700; }
.chat-note { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 4px 6px; color: var(--text-2); font-size: 14px; }
.chat-note > .ic { width: 20px; height: 20px; color: var(--muted); }
.chat-note span { flex: 1; min-width: 0; }
.chat-hint { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 0 6px 8px; font-size: 12.5px; color: var(--muted); }
.chat-hint .ic { width: 14px; height: 14px; }

/* Sheets */
.menu-quote { margin: 0 0 6px !important; padding: 2px 8px 12px; border-bottom: 1px solid var(--line); color: var(--text-2); font-size: 14px !important; white-space: pre-wrap; overflow-wrap: anywhere; }
.reasons { display: flex; flex-direction: column; gap: 6px; margin: 2px 0 12px; }
.reason { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); font-size: 15px; font-weight: 600; cursor: pointer; transition: border-color .15s, background .15s; }
.reason input { flex: none; width: 18px; height: 18px; accent-color: var(--brand); }
.reason:has(input:checked) { border-color: rgba(61,139,255,.45); background: rgba(61,139,255,.06); }
.reason.policy span { display: flex; flex-direction: column; gap: 2px; }
.reason.policy em { font-style: normal; font-weight: 500; font-size: 13px; color: var(--muted); }
.report-form .input-wrap textarea { min-height: 64px; font-size: 16px; }
.check-row { display: flex; align-items: center; gap: 10px; margin: 14px 2px 10px; font-size: 14.5px; font-weight: 600; cursor: pointer; }
.check-row input { width: 18px; height: 18px; accent-color: var(--brand); }
.report-adult { margin: 0 2px 14px; }
.sheet-label { font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 14px 2px 6px; }
.blocked-list .person-row { padding: 6px 2px; }
.blocked-list .avatar.sm { width: 36px; height: 36px; }
.muted-note { font-size: 13.5px; color: var(--muted); padding: 4px 2px; }
.nm-search { margin: 12px 0 8px; }
.nm-tip { margin: 0 4px 6px; }
.nm-results { flex: 1; min-height: 240px; overflow-y: auto; margin: 0 -8px; }
.nm-row { padding: 8px; border-radius: 14px; }
.nm-row .pr-meta { flex: 1; }
.nm-off { flex: none; font-size: 12px; font-weight: 700; color: var(--muted); padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line-2); }
.nm-none { color: var(--muted); padding: 18px 8px; text-align: center; }
.lightbox { position: fixed; inset: 0; z-index: 130; display: grid; place-items: center; padding: calc(16px + var(--sat)) 12px calc(16px + var(--sab)); background: rgba(0,0,0,.92); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 14px; object-fit: contain; }
.lb-close { position: absolute; top: calc(10px + var(--sat)); right: 10px; background: rgba(var(--ink), .1); }

@media (min-width: 700px) {
  .pf-msg { width: auto; padding: 0 14px !important; }
  .pf-msg span { display: inline; }
  .pf-msg .ic { width: 16px !important; height: 16px !important; }
}

@media (min-width: 1024px) {
  body[data-chat="1"] .topbar { display: flex; }
  body[data-route="messages"] .content { max-width: none; padding: 0; }
  .tb-msg.active { color: var(--brand); }
  .dm { display: grid; grid-template-columns: 360px minmax(0, 1fr); height: calc(100vh - 72px); }
  .dm-list, .dm.has-chat .dm-list { display: flex; flex-direction: column; min-height: 0; overflow-y: auto; border-right: 1px solid var(--line); background: linear-gradient(180deg, rgba(var(--ink), .018), transparent); }
  .dm-list-head { position: sticky; top: 0; z-index: 2; padding: 22px 16px 12px 0; background: rgba(var(--sink), .85); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
  .dm .page-title { padding: 0 20px; }
  .dm-row { padding: 10px 20px; }
  .dm-pane, .dm.has-chat .dm-pane { display: flex; position: relative; top: auto; height: auto; min-height: 0; z-index: auto; background: transparent; }
  .chat-back { display: none; }
  .chat-head { height: 68px; padding: 0 16px 0 20px; }
  .chat-scroll { padding: 12px 28px 14px; }
  .msg { max-width: 62%; }
  .chat-foot { padding: 12px 20px 16px; }
  .chat-jump { bottom: 90px; }
}
.sheet-me .avatar-fallback { color: #06060b; font-size: 19px; }

/* =========================================================
   v6: voice + video calls
   ========================================================= */
/* Call buttons: chat header, profile, history */
.chat-calls { display: flex; align-items: center; }
.chat-call { color: var(--brand2); }
.chat-call .ic { width: 22px; height: 22px; }
[data-call].off { opacity: .35; }
[data-call].off:hover { background: none; }
.pf-calls { display: contents; }
.pf-calls[hidden] { display: none; }
.pf-call-two { display: none; }
.pf-actions:has(.pf-calls:not([hidden])) { gap: 6px; }
.pf-actions:has(.pf-calls:not([hidden])) .icon-btn.boxed { width: 40px; height: 40px; flex: none; }
.pf-actions:has(.pf-calls:not([hidden])) .pf-msg { width: 40px; height: 40px; flex: none; }
.pf-actions:has(.pf-calls:not([hidden])) .btn-follow.lg { padding: 0 15px; flex: none; }
@media (min-width: 700px) {
  .pf-call-two { display: inline-flex; }
  .pf-call-pick { display: none; }
  .pf-actions:has(.pf-calls:not([hidden])) { gap: 8px; }
  .pf-actions:has(.pf-calls:not([hidden])) .icon-btn.boxed { width: 42px; height: 42px; }
  .pf-actions:has(.pf-calls:not([hidden])) .pf-msg { width: auto; height: 42px; }
  .pf-actions:has(.pf-calls:not([hidden])) .btn-follow.lg { padding: 0 24px; }
}
.pf-call .ic { color: var(--brand2); }
.pf-call.off .ic { color: var(--muted); }

/* Messages: Chats | Calls tabs */
.dm-tabs { display: flex; gap: 6px; padding: 0 var(--pad) 10px; }
.dm-tabs a { position: relative; flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; border-radius: 12px; font-size: 14px; font-weight: 700; color: var(--muted);
  background: var(--panel); border: 1px solid var(--line); transition: color .2s, background .2s, border-color .2s; }
.dm-tabs a .ic { width: 17px; height: 17px; }
.dm-tabs a.on { color: #020a18; background: var(--grad); border-color: transparent; box-shadow: 0 0 18px rgba(95,176,255,.22); }
.dm-tab-badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; display: grid; place-items: center; background: var(--danger); color: #fff; font-size: 10.5px; font-weight: 800; font-style: normal; }
.dm-tabs a.on .dm-tab-badge { background: #020a18; color: var(--brand); }

/* Call history */
.call-rows { display: flex; flex-direction: column; }
.call-safety { display: flex; align-items: center; gap: 8px; margin: 2px var(--pad) 8px; font-size: 12.5px; color: var(--muted); }
.call-safety .ic { width: 15px; height: 15px; color: var(--brand2); flex: none; }
.call-row { display: flex; align-items: center; gap: 4px; padding: 0 calc(var(--pad) - 6px) 0 0; min-width: 0; transition: background .15s; }
.call-row:hover { background: rgba(var(--ink), .03); }
.call-row-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 10px 0 10px var(--pad); }
.call-row-main time { flex: none; font-size: 12px; color: var(--muted); }
.call-row-sub { display: flex; align-items: center; gap: 5px; min-width: 0; color: var(--muted); font-size: 13.5px; }
.call-row-sub span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.call-row-sub .ic { width: 15px; height: 15px; flex: none; color: var(--brand2); }
.call-row.missed .call-row-main b, .call-row.missed .call-row-sub { color: var(--danger); }
.call-row.missed .call-row-sub .ic { color: var(--danger); }
.call-back { flex: none; color: var(--brand2); }
.call-back .ic { width: 22px; height: 22px; }

/* System lines in the chat */
.call-line { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 14px 0 4px; }
.cl-pill { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 7px 14px 7px 11px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--text-2);
  background: rgba(var(--ink), .05); border: 1px solid var(--line-2); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.cl-pill .ic { width: 17px; height: 17px; color: var(--brand2); flex: none; }
.cl-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.cl-pill time { font-size: 11.5px; font-weight: 600; color: var(--muted); flex: none; }
.call-line.missed .cl-pill { color: #ff8da3; border-color: rgba(255,85,119,.35); background: rgba(255,85,119,.07); }
.call-line.missed .cl-pill .ic { color: var(--danger); }
.cl-back { height: 30px; padding: 0 14px; border-radius: 999px; font-size: 12.5px; font-weight: 800; color: #020a18; background: var(--grad); box-shadow: 0 0 16px rgba(95,176,255,.25); }

/* Call screen */
body.in-call { overflow: hidden; }
.call { position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; overflow: hidden; color: #fff; background: #030307;
  animation: callIn .28s ease both; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
.call.ring { z-index: 110; }
@keyframes callIn { from { opacity: 0; transform: scale(1.02); } }
.call-bg { position: absolute; inset: 0; overflow: hidden;
  background: radial-gradient(520px 420px at 10% 6%, rgba(var(--acc-rgb), .28), transparent 70%), radial-gradient(560px 480px at 100% 100%, rgba(127,212,255,.18), transparent 70%),
    radial-gradient(520px 520px at 95% 0%, rgba(70,46,170,.35), transparent 70%), #05050b; }
.call-bg img { position: absolute; inset: -60px; width: calc(100% + 120px); height: calc(100% + 120px); max-width: none; object-fit: cover; filter: blur(46px) saturate(150%); opacity: .42; transform: scale(1.1); }
.call-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(3,3,7,.25), rgba(3,3,7,.1) 40%, rgba(3,3,7,.8)); }
.call-remote { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; opacity: 0; pointer-events: none; transition: opacity .35s; }
.call.show-remote .call-remote { opacity: 1; }
.call-local { position: absolute; z-index: 3; left: calc(100% - 116px); top: 80px; width: 104px; height: 146px; border-radius: 18px; overflow: hidden; display: none; touch-action: none; cursor: grab;
  background: #111118; border: 1.5px solid rgba(var(--ink), .3); box-shadow: 0 14px 34px rgba(0,0,0,.55);
  transition: left .28s cubic-bezier(.3,.7,.2,1), top .28s cubic-bezier(.3,.7,.2,1); }
.call.show-local .call-local { display: block; }
.call-local.dragging { transition: none; cursor: grabbing; }
.call-local video { width: 100%; height: 100%; object-fit: cover; }
.call.mirror .call-local video { transform: scaleX(-1); }
.call-local-off { position: absolute; inset: 0; display: none; place-items: center; color: var(--muted); background: #15151f; }
.call-local-off .ic { width: 28px; height: 28px; }
.call.cam-off .call-local-off { display: grid; }
.call.full-local .call-local { left: 0 !important; top: 0 !important; width: 100%; height: 100%; border-radius: 0; border: 0; box-shadow: none; z-index: 0; cursor: default; }
.call.full-local .call-local::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(3,3,7,.6), rgba(3,3,7,.3) 45%, rgba(3,3,7,.85)); }
.call.full-local.cam-off .call-local { display: none; }
.call-ui { position: relative; z-index: 2; flex: 1; display: flex; flex-direction: column; min-height: 0; padding: var(--sat) 0 var(--sab); pointer-events: none; }
.call-ui > * { pointer-events: auto; }
.call-top { flex: none; display: flex; align-items: center; gap: 10px; min-height: 62px; padding: 8px 12px 8px 18px; }
.call.show-remote .call-top { background: linear-gradient(rgba(0,0,0,.6), rgba(0,0,0,0)); padding-bottom: 22px; }
.call-top-who { flex: 1; min-width: 0; display: flex; flex-direction: column; text-shadow: 0 1px 8px rgba(0,0,0,.6); }
.call-top-who b { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.call-top-who > span { font-size: 13.5px; font-weight: 600; color: rgba(var(--ink), .85); font-variant-numeric: tabular-nums; }
.call-brand { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px !important; font-weight: 700 !important; color: rgba(var(--ink), .7) !important; }
.call-brand .ic { width: 14px; height: 14px; color: var(--brand); }
.call-ic { flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: rgba(var(--ink), .12); border: 1px solid rgba(var(--ink), .16);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.call-hero { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 0 24px 20px; text-align: center; }
.call-av { position: relative; width: 136px; height: 136px; padding: 4px; margin-bottom: 20px; flex: none;
  box-shadow: 0 0 calc(18px + var(--lvl, 0) * 60px) rgba(var(--acc-rgb), calc(.25 + var(--lvl, 0) * .6)); transition: box-shadow .15s; }
.call-av > .avatar { font-size: 52px; }
.call-av::before, .call-av::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid rgba(var(--acc-rgb), .6); opacity: 0; pointer-events: none; }
.call.st-incoming .call-av::before, .call.st-incoming .call-av::after, .call.st-calling .call-av::before, .call.st-calling .call-av::after,
.call.st-connecting .call-av::before, .call.st-connecting .call-av::after, .call.st-reconnecting .call-av::before { animation: callPulse 2.2s ease-out infinite; }
.call-av::after { border-color: rgba(127,212,255,.5); animation-delay: 1.1s !important; }
@keyframes callPulse { 0% { transform: scale(1); opacity: .95; } 100% { transform: scale(1.55); opacity: 0; } }
.call-name { font-family: var(--display); font-size: 30px; letter-spacing: -0.02em; line-height: 1.15; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 2px 16px rgba(0,0,0,.5); }
.call-handle { color: rgba(var(--ink), .62); font-size: 14.5px; }
.call-state { margin-top: 12px; font-size: 16px; font-weight: 800; color: var(--brand); font-variant-numeric: tabular-nums; text-shadow: 0 0 18px rgba(61,139,255,.35); }
.call.st-reconnecting .call-state { color: #ffd23d; }
.call.st-ended .call-state { color: #fff; font-family: var(--display); font-size: 23px; letter-spacing: -0.01em; text-shadow: none; }
.call-note { max-width: 320px; margin-top: 8px; color: rgba(var(--ink), .75); font-size: 14.5px; line-height: 1.5; }
.call-flags { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.call-flags.in-hero { margin-top: 14px; }
.call.show-remote .call-flags { flex: 1; align-items: flex-end; padding: 0 16px 14px; }
.call-spacer { flex: 1; }
.call-flag { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 999px; background: rgba(0,0,0,.5); border: 1px solid rgba(var(--ink), .14);
  font-size: 13px; font-weight: 700; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.call-flag .ic { width: 16px; height: 16px; color: #ff8da3; }
.call-tip { flex: none; display: flex; align-items: center; gap: 10px; margin: 0 16px 14px; padding: 12px 12px 12px 14px; border-radius: 18px; font-size: 13px; line-height: 1.45; color: rgba(var(--ink), .9);
  background: rgba(8,20,24,.55); border: 1px solid rgba(127,212,255,.3); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.call-tip > .ic { width: 20px; height: 20px; color: var(--brand2); }
.call-tip span { flex: 1; min-width: 0; }
.call-tip button { flex: none; height: 32px; padding: 0 12px; border-radius: 11px; background: rgba(var(--ink), .14); font-size: 12.5px; font-weight: 800; }
.call-banner { flex: none; display: flex; align-items: center; justify-content: center; gap: 8px; height: 46px; margin: 0 16px 14px; border-radius: 15px; font-size: 14.5px; font-weight: 800;
  color: var(--brand); background: rgba(61,139,255,.13); border: 1px solid rgba(61,139,255,.45); box-shadow: 0 0 22px rgba(61,139,255,.15); }
.call-banner .ic { width: 20px; height: 20px; }
.call-bar { flex: none; display: flex; justify-content: center; align-items: flex-start; gap: 12px; margin: 0 auto 10px; padding: 14px 14px 12px; border-radius: 30px;
  background: rgba(10,10,16,.42); border: 1px solid rgba(var(--ink), .1); backdrop-filter: blur(22px) saturate(150%); -webkit-backdrop-filter: blur(22px) saturate(150%); }
.cbtn-wrap { display: flex; flex-direction: column; align-items: center; gap: 7px; min-width: 56px; }
.cbtn-wrap em { font-style: normal; font-size: 11.5px; font-weight: 700; color: rgba(var(--ink), .82); white-space: nowrap; }
.cbtn { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(var(--ink), .14); border: 1px solid rgba(var(--ink), .16);
  backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%); transition: transform .15s, background .2s, color .2s; }
.cbtn .ic { width: 25px; height: 25px; }
.cbtn:active { transform: scale(.92); }
.cbtn.on { background: #fff; color: #06060b; }
.cbtn.end { background: #ff3b5c; border-color: transparent; box-shadow: 0 0 26px rgba(255,59,92,.45); }
.cbtn.end .ic { width: 30px; height: 30px; }
.cbtn.accept { background: var(--grad); color: #020a18; border: 0; box-shadow: 0 0 34px rgba(95,176,255,.55); animation: callAccept 1.6s ease-in-out infinite; }
@keyframes callAccept { 50% { transform: scale(1.07); box-shadow: 0 0 46px rgba(95,176,255,.75); } }
.call-actions { flex: none; display: flex; flex-direction: column; align-items: center; }
.call-actions.incoming .cbtn { width: 74px; height: 74px; }
.call-actions.incoming .cbtn .ic { width: 32px; height: 32px; }
.call-actions.incoming .cbtn.end .ic { width: 36px; height: 36px; }
.call-actions.incoming em { font-size: 13px; }
.call-pair { display: flex; justify-content: space-between; width: 100%; max-width: 330px; padding: 0 30px 30px; }
.call-alt { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 18px; margin-bottom: 26px; border-radius: 999px; font-size: 13.5px; font-weight: 700;
  background: rgba(var(--ink), .1); border: 1px solid rgba(var(--ink), .18); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.call-alt .ic { width: 18px; height: 18px; color: var(--brand); }
.call-actions.ended { flex-direction: row; justify-content: center; gap: 10px; padding: 0 16px 36px; }
.call-actions.ended .btn-ghost { height: 46px; padding: 0 20px; background: rgba(var(--ink), .1); }

@media (min-width: 700px) {
  .call-local { width: 220px; height: 150px; border-radius: 20px; }
  .call-top { padding: 14px 20px 10px 26px; }
  .call-bar { margin-bottom: 28px; padding: 16px 22px 14px; gap: 16px; }
  .cbtn { width: 60px; height: 60px; }
  .call-tip, .call-banner { align-self: center; width: 440px; max-width: calc(100% - 32px); }
  .call-av { width: 156px; height: 156px; }
}
@media (prefers-reduced-motion: reduce) {
  .call, .cbtn.accept, .call-av::before, .call-av::after { animation: none !important; }
}
@media (min-width: 700px) {
}

/* =========================================================
   v8: full scrolling feed + layout toggle
   ========================================================= */
.feed.is-full { gap: 14px; }
.feed-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 var(--pad); min-width: 0; }
.feed-bar > div { min-width: 0; }
.feed-bar h2 { font-size: 19px; font-weight: 800; letter-spacing: -0.02em; }
.feed-bar p { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.fv-list { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.fv-list > .empty-card, .fv-list > .feed-loading { margin: 0 12px; }
.fpost { border-radius: 0; border-left: 0; border-right: 0; content-visibility: auto; contain-intrinsic-size: auto 640px; }
/* cap: the author row, the media and the action bar fit on one phone screen between the top bars and the tab bar */
.fv-media { width: 100%; max-height: calc(100vh - 300px); max-height: calc(100svh - 300px); min-height: 200px; background: #000; }
.fv-acts .act-views { display: none; }
.fv-media img, .fv-media video { display: block; width: 100%; height: 100%; object-fit: cover; }
.fv-media .car img { flex: 0 0 100%; }
.fv-media video { background: #000; }
.fv-vid { cursor: pointer; }
.fv-vid .kind-badge { pointer-events: none; z-index: 2; }
.fv-vid .dur { right: auto; left: 10px; bottom: 10px; z-index: 2; pointer-events: none; transition: opacity .2s; }
.fv-vid.playing .dur { opacity: 0; }
.fv-open, .fv-mute { position: absolute; z-index: 2; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; border: 0; cursor: pointer;
  background: rgba(4,4,10,.62); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.fv-open { top: 10px; right: 10px; }
.fv-mute { right: 10px; bottom: 10px; }
.fv-open .ic, .fv-mute .ic { width: 17px; height: 17px; }
.fv-paused { position: absolute; left: 50%; top: 50%; width: 60px; height: 60px; margin: -30px 0 0 -30px; border-radius: 50%; display: grid; place-items: center; color: #020a18;
  background: var(--grad); box-shadow: 0 0 30px rgba(95,176,255,.45); pointer-events: none; transition: opacity .25s, transform .25s; z-index: 1; }
.fv-paused .ic { width: 26px; height: 26px; margin-left: 3px; }
.fv-vid.playing .fv-paused { opacity: 0; transform: scale(.7); }
.fv-acts { padding-top: 8px; }
.fv-counts { padding: 2px 14px 0; font-size: 14px; color: var(--text-2); }
.fv-counts b { color: var(--text); font-weight: 800; }
.fpost .post-body { padding-top: 6px; }
@media (min-width: 700px) {
  .feed.is-full { width: 100%; max-width: 560px; margin: 0 auto; }
  .feed.is-full .feed-bar { padding: 0; }
  .feed.is-full .welcome, .feed.is-full .empty-card, .feed.is-full .fv-list > .empty-card { margin-left: 0; margin-right: 0; }
  .feed.is-full .people-sec .sec-head, .feed.is-full .people-track { padding-left: 0; padding-right: 0; }
  .fpost { border-radius: var(--r-lg); border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
  .fv-list { gap: 20px; }
  .fv-media { max-height: min(calc(100vh - 200px), 720px); }
}

/* =========================================================
   v9: Stories (rings, viewer, add flow)
   ========================================================= */
/* Rings: unseen = blue/sky, seen = dim. Works on bar items, post-card avatars and the profile avatar. */
.st-ring { cursor: pointer; }
.story .ring.st-unseen, .ring-acc.st-unseen, .post-av-link.st-unseen { background: conic-gradient(from 200deg, var(--brand-b), #5fb0ff, var(--brand2-b), var(--brand-b)); box-shadow: 0 0 16px rgba(127,212,255,.25); }
.story .ring.st-seen, .ring-acc.st-seen, .post-av-link.st-seen { background: rgba(var(--ink), .2); box-shadow: none; }
.story.new .ring.st-unseen { animation: stglow 2.6s ease-in-out infinite; }
@keyframes stglow { 50% { box-shadow: 0 0 24px rgba(61,139,255,.45); } }
.post-av-link.st-ring { padding: 2px; display: inline-flex; }
.post-av-link.st-ring > .avatar { border: 2px solid var(--bg); width: 36px; height: 36px; }
.story.you { cursor: default; }
.story.you > .ring { display: block; cursor: pointer; }
.story.you.has .ring.st-unseen { animation: none; }
.story > button.add { cursor: pointer; padding: 0; }
button.story { cursor: pointer; }
.story .ring.st-seen + .story-name { color: var(--muted); }

/* Viewer */
body.sv-open { overflow: hidden; }
.sv { position: fixed; inset: 0; z-index: 90; background: #000; display: flex; align-items: center; justify-content: center; touch-action: none; user-select: none; -webkit-user-select: none; animation: svin .18s ease-out; }
@keyframes svin { from { opacity: 0; transform: scale(.97); } }
.sv-stage { position: relative; width: 100%; height: 100%; overflow: hidden; background: #0b0b13; transition: transform .12s ease-out; }
.sv-media { position: absolute; inset: 0; display: grid; place-items: center; }
.sv-img { max-width: 100%; max-height: 100%; width: 100%; height: 100%; object-fit: contain; pointer-events: none; -webkit-user-drag: none; }
.sv-spin { position: absolute; display: none; }
.sv.loading .sv-spin { display: inline-block; }
.sv-bars { position: absolute; z-index: 3; top: calc(8px + var(--sat)); left: 8px; right: 8px; display: flex; gap: 4px; }
.sv-bars i { flex: 1; height: 3px; border-radius: 3px; background: rgba(var(--ink), .3); overflow: hidden; }
.sv-bars b { display: block; height: 100%; width: 0; background: #fff; border-radius: 3px; }
.sv-head { position: absolute; z-index: 3; top: calc(16px + var(--sat)); left: 0; right: 0; display: flex; align-items: center; gap: 4px; padding: 4px 6px 24px 12px; background: linear-gradient(rgba(0,0,0,.45), rgba(0,0,0,0)); }
.sv-who { display: flex; align-items: center; gap: 10px; min-width: 0; color: #fff; }
.sv-who .avatar { flex: none; }
.sv-who .sv-meta { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.sv-who b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sv-who em { font-style: normal; font-size: 12px; color: rgba(var(--ink), .75); }
.sv-gap { flex: 1; }
.sv-btn { color: #fff; width: 42px; height: 42px; }
.sv-btn .ic { width: 24px; height: 24px; filter: drop-shadow(0 1px 2px rgba(0,0,0,.5)); }
.sv-cap { position: absolute; z-index: 3; left: 16px; right: 16px; bottom: calc(76px + var(--sab)); margin: 0; text-align: center; color: #fff; font-size: 15.5px; font-weight: 600; line-height: 1.35; padding: 9px 14px; border-radius: 14px; background: rgba(0,0,0,.5); backdrop-filter: blur(6px); overflow-wrap: anywhere; }
.sv-foot { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; gap: 10px; padding: 18px 12px calc(16px + var(--sab)); background: linear-gradient(rgba(0,0,0,0), rgba(0,0,0,.5)); }
.sv-foot:empty { display: none; }
.sv-pill { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 999px; color: #fff; font-weight: 700; font-size: 14px; background: rgba(var(--ink), .14); border: 1px solid rgba(var(--ink), .18); backdrop-filter: blur(6px); }
.sv-pill .ic { width: 18px; height: 18px; }
.sv-held { position: absolute; z-index: 4; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(0,0,0,.45); opacity: 0; transition: opacity .15s; pointer-events: none; }
.sv-held .ic { width: 28px; height: 28px; }
.sv.held .sv-held { opacity: 1; }
.sv.held .sv-head, .sv.held .sv-cap, .sv.held .sv-foot { opacity: 0; transition: opacity .2s; }
.sv-nav { display: none; }
@media (min-width: 700px) {
  .sv { background: rgba(4,4,8,.94); }
  .sv-stage { width: auto; height: min(92vh, 860px); aspect-ratio: 9 / 16; border-radius: 18px; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
  .sv-bars { top: 10px; }
  .sv-head { top: 18px; }
  .sv-cap { bottom: 76px; }
  .sv-foot { padding-bottom: 16px; }
  .sv-nav { display: grid; place-items: center; position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; color: #fff; background: rgba(var(--ink), .12); border: 1px solid rgba(var(--ink), .16); }
  .sv-nav:hover { background: rgba(var(--ink), .22); }
  .sv-nav .ic { width: 24px; height: 24px; }
  .sv-nav.prev { left: calc(50% - min(92vh, 860px) * 9 / 32 - 66px); }
  .sv-nav.next { right: calc(50% - min(92vh, 860px) * 9 / 32 - 66px); }
}

/* Add to story */
.story-add > p { color: var(--text-2); margin: 0 0 12px; }
.story-pick { display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; margin-bottom: 12px; }
.story-picks { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; max-height: 46vh; overflow-y: auto; }
.story-pickrow { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 14px; background: var(--bg-2); }
.story-thumb { flex: none; width: 54px; height: 86px; border-radius: 10px; overflow: hidden; background: #000; display: grid; place-items: center; }
.story-thumb img { width: 100%; height: 100%; object-fit: cover; }
.story-pickmeta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.story-cap { width: 100%; height: 40px; padding: 0 12px; border-radius: 10px; background: var(--bg); color: var(--text); border: 1px solid rgba(var(--ink), .12); font: inherit; font-size: 14px; outline: none; }
.story-cap:focus { border-color: var(--brand2); }
.story-size { font-size: 12px; color: var(--muted); }
.story-size .bad { color: #ff6b8a; font-weight: 600; }
.sv-viewers { display: flex; flex-direction: column; gap: 4px; max-height: 56vh; overflow-y: auto; }
.sv-viewers .person-row { display: flex; align-items: center; gap: 12px; padding: 8px 4px; color: inherit; }
.sv-none { color: var(--muted); text-align: center; padding: 18px 0; margin: 0; }

/* =========================================================
   v10: Healthy engagement (caught up, show more, play once, weekly goal, badges,
   break reminders)
   ========================================================= */
.more-btn { min-width: 160px; }
.caught-up { margin: 4px 12px 0; padding: 22px 18px 20px; border-radius: var(--r-lg); display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px;
  background: linear-gradient(160deg, rgba(61,139,255,.08), rgba(127,212,255,.06)); border: 1px solid rgba(95,176,255,.22); }
.caught-up .cu-ic { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #020a18; box-shadow: 0 0 26px rgba(95,176,255,.35); margin-bottom: 4px; }
.caught-up .cu-ic .ic { width: 26px; height: 26px; }
.caught-up b { font-size: 17px; }
.caught-up > span { color: var(--text-2); font-size: 14px; max-width: 340px; line-height: 1.45; }
.caught-up .btn-ghost { margin-top: 8px; }
.sugg-sec { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; }
.sugg-head { padding: 4px var(--pad) 0; }
.sugg-head h3 { margin: 0; font-size: 17px; }
.sugg-head p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
#fy-rest .feed-end { margin-top: 18px; }
@media (min-width: 700px) {
  .feed.is-full .caught-up { margin-left: 0; margin-right: 0; }
  .feed.is-full .sugg-head { padding-left: 0; padding-right: 0; }
}

/* videos play once, then wait for "Play again" */
.fv-replay { position: absolute; z-index: 3; left: 50%; top: 50%; transform: translate(-50%, -50%); display: none; align-items: center; gap: 8px; height: 46px; padding: 0 18px 0 14px;
  border-radius: 999px; border: 0; cursor: pointer; color: #020a18; font-weight: 800; font-size: 14.5px; background: var(--grad); box-shadow: 0 0 30px rgba(95,176,255,.4); }
.fv-replay .ic { width: 20px; height: 20px; }
.fv-vid.ended .fv-replay { display: inline-flex; }
.fv-vid.ended .fv-paused { opacity: 0; }
.cv-endcard { height: 100%; scroll-snap-align: start; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 24px; color: var(--text-2); }
.cv-endcard img { width: 84px; }
.cv-endcard b { color: var(--text); font-size: 18px; }
.cv-endcard .btn-ghost { margin-top: 10px; }

/* own profile: your week + badges */
.pf-engage { margin: 6px var(--pad) 4px; }
.eng { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.eng-loading { min-height: 120px; display: grid; place-items: center; }
.eng-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.eng-head h3 { margin: 0; font-size: 16px; }
.eng-private, .eng-count { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); }
.eng-private .ic { width: 13px; height: 13px; }
.eng-dots { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; max-width: 420px; }
.eng-dot { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.eng-dot i { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(var(--ink), .06); border: 1.5px solid rgba(var(--ink), .1); color: #020a18; }
.eng-dot i .ic { width: 17px; height: 17px; stroke-width: 3; }
.eng-dot.on i { background: var(--grad); border-color: transparent; box-shadow: 0 0 14px rgba(95,176,255,.3); }
.eng-dot.today i { border-color: var(--brand2); }
.eng-dot em { font-style: normal; font-size: 11.5px; color: var(--muted); }
.eng-dot.today em { color: var(--brand2); font-weight: 700; }
.eng-goal { margin: 2px 0 0; font-size: 14.5px; color: var(--text); }
.eng-sub { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.eng-bhead { margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--line); }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.eng-badge { display: grid; grid-template-columns: 38px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 10px; border-radius: 14px; background: rgba(var(--ink), .04); border: 1px solid var(--line); }
.badge-emo { grid-row: 1 / 3; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; background: rgba(61,139,255,.1); }
.eng-badge b { font-size: 13.5px; }
.eng-badge > span:last-child { font-size: 11.5px; color: var(--muted); line-height: 1.3; }
.eng-badge.locked .badge-emo { filter: grayscale(1); opacity: .45; background: rgba(var(--ink), .05); }
.eng-badge.locked b { color: var(--text-2); }
.eng-badge.earned { border-color: rgba(95,176,255,.28); background: linear-gradient(150deg, rgba(61,139,255,.07), rgba(127,212,255,.04)); }
@media (min-width: 700px) { .pf-engage { margin: 8px 0 4px; } }
.entry-tag { display: inline-flex; align-items: center; gap: 3px; height: 20px; padding: 0 7px; border-radius: 999px; font-size: 11px; font-weight: 800; color: #020a18; background: var(--brand-b); flex: none; }
.entry-tag .ic { width: 12px; height: 12px; }
.entry-tag.on-tile { position: absolute; top: 8px; left: 8px; z-index: 2; padding: 0 5px; }
.cp-prompt { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 12px; margin-bottom: 12px; border-radius: 14px; background: rgba(61,139,255,.08); border: 1px solid rgba(61,139,255,.3); }
.cp-prompt > span { font-size: 24px; }
.cp-prompt div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cp-prompt small { font-size: 11.5px; color: var(--brand); font-weight: 700; }
.cp-prompt b { font-size: 14.5px; }
@media (min-width: 700px) {
}

/* break + daily reminders */
.wb-wrap { position: fixed; inset: 0; z-index: 96; display: flex; align-items: center; justify-content: center; padding: 20px; }
.wb-backdrop { position: absolute; inset: 0; background: rgba(4,4,10,.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; transition: opacity .25s; }
.wb-card { position: relative; width: min(380px, 100%); padding: 26px 22px 18px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px;
  transform: translateY(16px) scale(.98); opacity: 0; transition: transform .25s, opacity .25s; }
.wb-wrap.open .wb-backdrop { opacity: 1; }
.wb-wrap.open .wb-card { transform: none; opacity: 1; }
.wb-wrap.paused .wb-backdrop { background: rgba(4,4,10,.94); }
.wb-emo { font-size: 44px; line-height: 1; margin-bottom: 4px; }
.wb-card h2 { margin: 0; font-size: 21px; }
.wb-card p { margin: 0 0 6px; color: var(--text-2); font-size: 14.5px; line-height: 1.5; }
.wb-acts { width: 100%; display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.wb-set { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; background: none; border: 0; cursor: pointer; font-size: 13px; }
.wb-set .ic { width: 15px; height: 15px; }
.wb-form fieldset { border: 0; padding: 0; margin: 14px 0 0; }
.wb-form legend { font-weight: 800; font-size: 15px; padding: 0; }
.wb-form fieldset > p { margin: 2px 0 8px; font-size: 13px; color: var(--muted); }
.wb-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.wb-opt input { position: absolute; opacity: 0; pointer-events: none; }
.wb-opt span { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: 999px; font-size: 13.5px; font-weight: 700; cursor: pointer;
  background: rgba(var(--ink), .05); border: 1px solid var(--line); color: var(--text-2); }
.wb-opt input:checked + span { background: rgba(61,139,255,.12); border-color: rgba(61,139,255,.55); color: var(--brand); }
.wb-opt input:focus-visible + span { outline: 2px solid var(--brand2); outline-offset: 2px; }
.wb-today { display: flex; align-items: center; gap: 8px; margin: 6px 0 0; font-size: 14px; color: var(--text-2); }
.wb-today .ic { width: 18px; height: 18px; color: var(--brand2); }
.wb-today em { font-style: normal; color: var(--muted); font-size: 12.5px; }

/* =========================================================
   v11: Light theme details (tokens are at the top of this file)
   ========================================================= */
/* switching: a short cross-fade of colours only (no sizes change, so no layout shift) */
html.theme-anim, html.theme-anim *, html.theme-anim *::before, html.theme-anim *::after {
  transition: background-color .3s ease, color .3s ease, border-color .3s ease, fill .3s ease, stroke .3s ease, box-shadow .3s ease !important;
}
/* the switch (own profile + Settings) */
.theme-switch { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0; text-align: left; color: var(--text); font-weight: 700; font-size: 14.5px; }
.ts-ic { position: relative; width: 22px; height: 22px; flex: none; color: var(--brand2); }
.ts-ic .ic { position: absolute; inset: 0; width: 22px; height: 22px; transition: opacity .25s, transform .3s; }
.theme-switch[aria-checked="true"] .ts-moon, .theme-switch[aria-checked="false"] .ts-sun { opacity: 0; transform: rotate(-40deg) scale(.6); }
.theme-switch[aria-checked="true"] .ts-ic { color: #b26b00; }
.ts-label { flex: 1; }
.ts-track { position: relative; flex: none; width: 46px; height: 28px; border-radius: 999px; background: rgba(var(--ink), .14); border: 1px solid var(--line-2); transition: background .25s, border-color .25s; }
.ts-track i { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.35); transition: transform .25s cubic-bezier(.3,1.4,.6,1); }
.theme-switch[aria-checked="true"] .ts-track { background: var(--grad); border-color: transparent; }
.theme-switch[aria-checked="true"] .ts-track i { transform: translateX(18px); }
.theme-switch:focus-visible { outline: none; }
.theme-switch:focus-visible .ts-track { outline: 2px solid var(--brand2); outline-offset: 2px; }
.pf-theme { margin: 14px var(--pad) 0; padding: 4px 14px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); }
.sheet-row.theme-row span { flex: none; }
.sheet-row.theme-row .ts-label { flex: 1; }
.sheet-row.theme-row .theme-switch { height: 100%; gap: 14px; font-size: 15.5px; font-weight: 600; }
.sheet-row.theme-row .ts-ic .ic { color: inherit; }
@media (min-width: 700px) { .pf-theme { margin: 14px 0 0; max-width: 360px; } }

/* page background */
html[data-theme="light"] .bg-glow {
  background:
    radial-gradient(900px 520px at 88% -8%, rgba(120, 100, 255, 0.10), transparent 70%),
    radial-gradient(700px 500px at -10% 30%, rgba(0, 200, 220, 0.07), transparent 70%),
    radial-gradient(800px 600px at 50% 110%, rgba(160, 220, 0, 0.08), transparent 70%),
    var(--bg);
}
/* logo: darker rings so they read on white (the clips viewer keeps the bright ones) */
html[data-theme="light"] img[src$="assets/logo-rings.png"]:not(.cv img) { content: url("assets/logo-rings-light.png"); }
html[data-theme="light"] img[src$="assets/logo-rings-sparkles.png"]:not(.cv img) { content: url("assets/logo-rings-sparkles-light.png"); }
html[data-theme="light"] .wordmark { text-shadow: none; }
/* profile accent used as text: a darker shade of the accent so it passes AA on white */
html[data-theme="light"] :is(.pf-link, .pf-interests span, .pf-tabs button.on .ic, .pf-content .empty-ic) { color: color-mix(in srgb, var(--acc) 45%, #000); }
html[data-theme="light"] .pf-tabs button.on .ic { filter: none; }
/* softer shadows on light surfaces */
html[data-theme="light"] .tabbar { box-shadow: 0 10px 30px rgba(17, 19, 33, .12), inset 0 1px 0 rgba(255,255,255,.6); }
html[data-theme="light"] :is(.sheet, .composer, .toast) { box-shadow: 0 20px 60px rgba(17, 19, 33, .18); }
html[data-theme="light"] .toast { border-color: rgba(26, 85, 192, .35); }
html[data-theme="light"] .sheet-backdrop, html[data-theme="light"] .composer-backdrop { background: rgba(17, 19, 33, .35); }
html[data-theme="light"] .wb-backdrop { background: rgba(245, 246, 250, .8); }
html[data-theme="light"] .wb-wrap.paused .wb-backdrop { background: rgba(245, 246, 250, .96); }
html[data-theme="light"] .clip { box-shadow: 0 10px 26px rgba(17, 19, 33, .14); }
html[data-theme="light"] .tabbar { background: rgba(255, 255, 255, .86); }
html[data-theme="light"] .dm-tabs a.on .dm-tab-badge { color: var(--brand-b); }
html[data-theme="light"] .banner-fallback {
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(var(--acc-rgb), .45), transparent 55%),
    radial-gradient(90% 120% at 100% 100%, rgba(120, 100, 255, .22), transparent 60%),
    linear-gradient(135deg, #e7eaf3, #f8f9fc);
}

/* v12 composer: mixed photo + clip carousel items */
.cp-thumb > video { width: 100%; height: 100%; object-fit: cover; display: block; background: #000; }
.cp-thumb .cp-dur { position: absolute; left: 6px; bottom: 6px; display: inline-flex; align-items: center; gap: 3px; height: 20px; padding: 0 6px; border-radius: 999px; font-size: 11px; font-weight: 800; color: #fff; background: rgba(4,4,10,.66); pointer-events: none; }
.cp-thumb .cp-dur .ic { width: 12px; height: 12px; color: #7fd4ff; }

/* v13: Badges get their own tab on your own profile */
.toast-act { display: inline-block; padding: 4px 2px; margin: -4px 0 -4px 6px; color: var(--brand); text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.pf-tabs.has-badges button { gap: 6px; }
@media (max-width: 430px) {
  .pf-tabs.has-badges button { gap: 4px; font-size: 12.5px; padding: 0 2px; }
  .pf-tabs.has-badges .ic { width: 17px; height: 17px; flex: none; }
}
@media (max-width: 360px) { .pf-tabs.has-badges .ic { display: none; } }
.pf-badges { padding: 16px var(--pad) 28px; }
.pfb-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.pfb-head h3 { font-family: var(--display); font-size: 18px; font-weight: 800; color: var(--strong); }
.pfb-head .eng-count { margin-top: 2px; }
.pfb-head .eng-private { flex: none; padding: 5px 10px; border-radius: 999px; background: rgba(var(--ink), .05); border: 1px solid var(--line); }
.pfb-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.eng-badge.pfb { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 16px 12px 14px; border-radius: 18px; min-height: 172px; }
.eng-badge.pfb .badge-emo { width: 56px; height: 56px; border-radius: 18px; font-size: 30px; margin-bottom: 2px; }
.eng-badge.pfb b { font-size: 14.5px; color: var(--strong); }
.eng-badge.pfb .pfb-text { font-size: 12px; line-height: 1.35; color: var(--text-2); }
.eng-badge.pfb .pfb-text em { font-style: normal; font-weight: 700; color: var(--muted); }
.eng-badge.pfb .pfb-date { margin-top: auto; display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; color: var(--brand); background: rgba(61,139,255,.1); border: 1px solid rgba(61,139,255,.25); }
.pfb-date .ic { width: 12px; height: 12px; }
.eng-badge.pfb.earned .badge-emo { background: linear-gradient(140deg, rgba(61,139,255,.22), rgba(127,212,255,.16)); box-shadow: 0 0 18px rgba(95,176,255,.18); }
.eng-badge.pfb.locked { border-style: dashed; background: transparent; }
.eng-badge.pfb.locked .badge-emo { filter: grayscale(1); opacity: .4; }
.eng-badge.pfb.locked b { color: var(--muted); }
.pfb-note { margin-top: 16px; text-align: center; font-size: 12.5px; color: var(--muted); }
@media (min-width: 600px) { .pfb-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
html[data-theme="light"] .eng-badge.pfb .pfb-date { background: rgba(26,85,192,.08); border-color: rgba(26,85,192,.25); }
html[data-theme="light"] .eng-badge.pfb.earned .badge-emo { background: linear-gradient(140deg, rgba(61,139,255,.35), rgba(127,212,255,.22)); box-shadow: none; }
html[data-theme="light"] .eng-badge.pfb.earned { border-color: rgba(26,85,192,.25); background: linear-gradient(150deg, rgba(61,139,255,.12), rgba(127,212,255,.06)); }

/* =========================================================
   Family chat, paused accounts, admin panel
   ========================================================= */
:root { --warn: #ffb547; }
html[data-theme="light"] { --warn: #9a5800; }

/* Family chat icon: a blue tile with a house */
.fam-ic { --c1: #3d8bff; --c2: #5fb0ff; flex: none; position: relative; display: inline-grid; place-items: center; align-content: center; gap: 0; width: 40px; height: 40px; border-radius: 13px;
  color: #020a18; background: linear-gradient(140deg, var(--c1), var(--c2)); box-shadow: 0 0 18px color-mix(in srgb, var(--c1) 35%, transparent), inset 0 1px 0 rgba(255,255,255,.5); }
.fam-ic .ic { width: 55%; height: 55%; stroke-width: 2.2; }
.fam-ic b { display: none; font-size: 10px; font-weight: 800; letter-spacing: .04em; line-height: 1; margin-top: -1px; }
.fam-ic.md { width: 50px; height: 50px; border-radius: 16px; }
.fam-ic.md .ic { width: 24px; height: 24px; }
.fam-ic.md b, .fam-ic.lg b { display: block; }
.fam-ic.lg { width: 76px; height: 76px; border-radius: 24px; }
.fam-ic.lg .ic { width: 36px; height: 36px; }
.fam-ic.lg b { font-size: 13px; margin-top: 1px; }
.fam-ic.sm { width: 38px; height: 38px; border-radius: 12px; }
.fam-ic.xs { width: 22px; height: 22px; border-radius: 7px; box-shadow: none; }

/* Pinned Family chat row in the inbox */
.fam-row { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px var(--pad); min-width: 0; margin: 0 0 6px; transition: background .15s;
  background: linear-gradient(90deg, rgba(var(--ink), .045), rgba(var(--ink), .015)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.fam-row:hover { background: rgba(var(--ink), .06); }
.fam-row.active { background: linear-gradient(90deg, rgba(61,139,255,.1), rgba(127,212,255,.04)); box-shadow: inset 3px 0 0 var(--brand); }
.fam-row .dm-row-top b { font-size: 15.5px; font-weight: 800; white-space: nowrap; flex: none; }
.fam-pin { display: inline-flex; align-items: center; gap: 4px; min-width: 0; color: var(--muted); font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fam-pin .ic { width: 13px; height: 13px; flex: none; color: var(--brand2); transform: rotate(35deg); }
.dm-row-prev .fam-who { font-style: normal; font-weight: 700; color: var(--text-2); flex: none; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fam-row.unread b { font-weight: 800; }
.fam-row.unread .dm-row-prev { color: var(--text); font-weight: 700; }
.fam-row.unread time { color: var(--brand); font-weight: 700; }

/* Family chat thread */
button.chat-who { background: none; border: 0; padding: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
.fam-intro .fam-ic { margin-bottom: 10px; }
.msg.grp { display: grid; grid-template-columns: 30px minmax(0, 1fr); column-gap: 8px; max-width: 84%; align-items: start; }
.msg.grp .msg-col { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.msg-av { width: 30px; padding-top: 18px; }
.msg-av .avatar.xs { width: 30px; height: 30px; font-size: 12px; }
.msg-name { font-size: 12px; font-weight: 800; color: var(--acc); margin: 0 0 3px 10px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html[data-theme="light"] .msg-name { filter: brightness(.62) saturate(1.4); }
.chat-note.fam-muted b { color: var(--warn); }
.chat-note.fam-muted > .ic { color: var(--warn); }
.fam-info-head { display: flex; align-items: center; gap: 14px; padding: 4px 4px 12px; }
.fam-info-head div { display: flex; flex-direction: column; min-width: 0; }
.fam-info-head b { font-family: var(--display); font-size: 20px; letter-spacing: -0.02em; }
.fam-info-head span { color: var(--muted); font-size: 13.5px; }
.fam-members { overflow-y: auto; min-height: 0; margin: 0 calc(var(--pad) * -1); }
.fam-tag { margin-left: auto; font-size: 11.5px; font-weight: 800; padding: 3px 9px; border-radius: 999px; color: #020a18; background: var(--brand-b); }
.fam-tag.off { color: var(--danger); background: rgba(255,85,119,.1); border: 1px solid rgba(255,85,119,.3); }
.sheet-tip.warn { background: rgba(255,181,71,.07); border-color: rgba(255,181,71,.3); margin-top: 6px; }
.sheet-tip.warn .ic { color: var(--warn); }
.fam-info .sheet-tip { margin: 6px 0 4px; max-width: none; }
.cm-flag { width: 34px; height: 34px; opacity: .55; }
.cm-flag:hover { opacity: 1; color: var(--danger); }
.cm-flag .ic { width: 16px; height: 16px; }

/* Paused account + admin warning */
.paused-card { gap: 14px !important; }
.paused-ic { align-self: center; width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; color: var(--warn); background: rgba(255,181,71,.08); border: 1px solid rgba(255,181,71,.3); box-shadow: 0 0 30px rgba(255,181,71,.15); }
.paused-ic .ic { width: 28px; height: 28px; }
.paused-card .auth-sub b { color: var(--text); }
.paused-reason { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); text-align: left; font-size: 14px; }
.paused-reason b { font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.paused-note { display: flex; gap: 8px; text-align: left; font-size: 13px; color: var(--text-2); line-height: 1.45; }
.paused-note .ic { width: 17px; height: 17px; flex: none; color: var(--brand2); margin-top: 1px; }
.empty-ic.warn { color: var(--warn); background: rgba(255,181,71,.08); border-color: rgba(255,181,71,.3); box-shadow: none; }
.warn-msg { width: 100%; margin: 4px 0 10px; padding: 14px 16px; border-radius: 16px; text-align: left; background: rgba(255,181,71,.06); border: 1px solid rgba(255,181,71,.25); }
.warn-msg p { margin: 0 !important; color: var(--text) !important; font-weight: 600; white-space: pre-wrap; }
.warn-msg time { display: block; margin-top: 6px; font-size: 12px; color: var(--muted); }

/* ---------- Admin panel ---------- */
.side-admin .ic { color: var(--brand2); }
.adm { display: flex; flex-direction: column; min-width: 0; padding-bottom: 24px; }
.adm-nav { position: sticky; top: calc(58px + var(--sat)); z-index: 15; background: linear-gradient(var(--bg) 75%, rgba(var(--sink), 0)); padding: 10px 0 8px; }
.adm-brand { display: none; }
.adm-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 0 var(--pad); scrollbar-width: none; }
.adm-tabs::-webkit-scrollbar { display: none; }
.adm-tab { flex: none; position: relative; display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: 999px; font-size: 13.5px; font-weight: 700;
  color: var(--text-2); background: var(--panel); border: 1px solid var(--line-2); transition: background .15s, color .15s; }
.adm-tab .ic { width: 17px; height: 17px; }
.adm-tab:hover { color: var(--strong); }
.adm-tab.on { color: #020a18; background: var(--grad); border-color: transparent; box-shadow: 0 0 20px rgba(95,176,255,.25); }
.adm-count { min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; display: grid; place-items: center; font-size: 11px; font-weight: 800; font-style: normal; color: #fff; background: var(--danger); }
.adm-main { display: flex; flex-direction: column; gap: 14px; padding: 6px var(--pad) 0; min-width: 0; }
.adm-head { display: flex; align-items: flex-end; gap: 12px; padding: 6px 0 2px; }
.adm-head > div { flex: 1; min-width: 0; }
.adm-head h1 { font-family: var(--display); font-size: 26px; font-weight: 700; letter-spacing: -0.03em; }
.adm-head p { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.adm-head p .ic { width: 15px; height: 15px; }
.adm-card { position: relative; min-width: 0; padding: 16px; border-radius: var(--r-lg); background: var(--card-bg); border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0,0,0,.18); }
html[data-theme="light"] .adm-card { box-shadow: 0 6px 20px rgba(17,19,33,.06); background: var(--bg-2); }
.adm-card h2 { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 800; margin-bottom: 12px; }
.adm-card h2 .ic { width: 18px; height: 18px; color: var(--brand2); }
.adm-grid1, .adm-grid2 { display: grid; gap: 14px; min-width: 0; }
.adm-list { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.adm-chip { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 11.5px; font-weight: 800; white-space: nowrap;
  color: var(--text-2); background: var(--panel-2); border: 1px solid var(--line-2); }
.adm-chip .ic { width: 13px; height: 13px; }
.adm-chip.hot { color: #fff; background: var(--danger); border-color: transparent; }
.adm-chip.off { color: var(--danger); background: rgba(255,85,119,.08); border-color: rgba(255,85,119,.3); }
.adm-chip.warn { color: var(--warn); background: rgba(255,181,71,.08); border-color: rgba(255,181,71,.32); }
.adm-chip.admin { color: #020a18; background: var(--grad); border-color: transparent; }
.adm-chip.link { color: var(--brand2); }
.adm-chip.cls { padding-left: 3px; }
.adm-at { font-weight: 700; color: var(--brand2); white-space: nowrap; }
html[data-theme="light"] .adm-at, html[data-theme="light"] .adm-chip.link { color: #005f95; }
.muted { color: var(--muted); }
.muted-note.pad { padding: 18px 4px; }

/* Dashboard */
.adm-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.adm-stat { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 14px; border-radius: 18px; background: var(--card-bg); border: 1px solid var(--line); min-width: 0; transition: border-color .15s, transform .15s; }
html[data-theme="light"] .adm-stat { background: var(--bg-2); }
.adm-stat:hover { border-color: var(--line-2); transform: translateY(-1px); }
.adm-stat-ic { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; margin-bottom: 8px; color: var(--brand2); background: rgba(127,212,255,.07); border: 1px solid rgba(127,212,255,.18); }
.adm-stat-ic .ic { width: 18px; height: 18px; }
.adm-stat b { font-family: var(--display); font-size: 26px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.adm-stat-l { font-size: 13px; font-weight: 700; color: var(--text-2); }
.adm-stat em { font-style: normal; font-size: 12px; color: var(--muted); }
.adm-stat.hot { border-color: rgba(255,85,119,.4); background: linear-gradient(160deg, rgba(255,85,119,.12), rgba(255,85,119,.02)); }
.adm-stat.hot .adm-stat-ic { color: var(--danger); background: rgba(255,85,119,.1); border-color: rgba(255,85,119,.3); }
.adm-stat.hot em { color: var(--danger); font-weight: 700; }
.adm-stat.calm em { color: var(--brand); font-weight: 700; }
html[data-theme="light"] .adm-stat.calm em { color: #1a55c0; }
.adm-feed { display: flex; flex-direction: column; }
.adm-feed li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13.5px; min-width: 0; }
.adm-feed li:first-child { border-top: 0; padding-top: 0; }
.adm-feed-ic { flex: none; width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--panel-2); color: var(--text-2); }
.adm-feed-ic .ic { width: 15px; height: 15px; }
.adm-feed-ic.k-report { color: var(--danger); background: rgba(255,85,119,.1); }
.adm-feed-ic.k-signup { color: var(--brand); background: rgba(61,139,255,.08); }
html[data-theme="light"] .adm-feed-ic.k-signup { color: #1a55c0; }
.adm-feed-ic.k-admin { color: var(--brand2); background: rgba(127,212,255,.08); }
.adm-feed-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.adm-feed-t b { color: var(--text); }
.adm-feed time { flex: none; font-size: 12px; color: var(--muted); }

/* Segmented tabs */
.adm-seg { display: inline-flex; align-self: flex-start; gap: 4px; padding: 4px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
.adm-seg > * { height: 34px; padding: 0 14px; border-radius: 10px; display: inline-flex; align-items: center; font-size: 13.5px; font-weight: 700; color: var(--text-2); }
.adm-seg > .on { color: var(--text); background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line-2); }

/* Report cards */
.rep { display: flex; flex-direction: column; gap: 12px; }
.rep.closed { opacity: .85; }
.rep-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rep-top time { margin-left: auto; font-size: 12px; color: var(--muted); }
.rep-ctx { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 800; color: var(--brand2); background: rgba(127,212,255,.07); border: 1px solid rgba(127,212,255,.2); white-space: nowrap; }
html[data-theme="light"] .rep-ctx { color: #005f95; }
.rep-ctx .ic { width: 14px; height: 14px; }
.rep-ctx.k-call { color: var(--warn); background: rgba(255,181,71,.07); border-color: rgba(255,181,71,.25); }
.rep-ctx.k-post, .rep-ctx.k-comment { color: #b69cff; background: rgba(150,120,255,.08); border-color: rgba(150,120,255,.25); }
html[data-theme="light"] .rep-ctx.k-post, html[data-theme="light"] .rep-ctx.k-comment { color: #5a3fd0; }
.rep-reason { font-size: 12px; font-weight: 800; color: var(--danger); }
.rep-body { display: flex; gap: 12px; min-width: 0; }
.rep-img { flex: none; width: 88px; height: 88px; border-radius: 14px; overflow: hidden; background: var(--panel-2); border: 1px solid var(--line-2); padding: 0; cursor: zoom-in; display: grid; place-items: center; }
.rep-img img { width: 100%; height: 100%; object-fit: cover; }
.adm-noimg .ic { width: 22px; height: 22px; color: var(--muted); }
.rep-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.rep-preview { font-size: 15px; line-height: 1.45; color: var(--text); padding: 10px 12px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); overflow-wrap: anywhere; white-space: pre-wrap; }
.rep-preview.none { color: var(--muted); font-style: italic; }
.rep-flags { display: flex; flex-wrap: wrap; gap: 6px; }
.rep-flags:empty { display: none; }
.rep-details { display: flex; gap: 8px; font-size: 13.5px; color: var(--text-2); font-style: italic; }
.rep-details .ic { width: 15px; height: 15px; flex: none; margin-top: 2px; color: var(--muted); }
.rep-people { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13.5px; }
.rep-who { display: inline-flex; align-items: baseline; gap: 6px; min-width: 0; }
.rep-who > span { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.rep-who em { font-style: normal; font-size: 12px; font-weight: 800; color: var(--danger); }
.rep-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); align-items: center; }
.rep-actions .btn-ghost .ic { width: 16px; height: 16px; }
.rep-status { flex: 1; min-width: 0; font-size: 13px; font-weight: 700; color: var(--text-2); }
.rep-status.s-actioned { color: var(--brand); }
html[data-theme="light"] .rep-status.s-actioned { color: #1a55c0; }
.rep-status.s-dismissed { color: var(--muted); }

/* Users */
.adm-search { margin: 0; }
.adm-users { gap: 0; border-radius: var(--r-lg); background: var(--card-bg); border: 1px solid var(--line); overflow: hidden; }
html[data-theme="light"] .adm-users { background: var(--bg-2); }
.adm-user { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "av main chev" "av meta chev" "av flags chev"; column-gap: 12px; row-gap: 3px; align-items: center; padding: 12px 14px; border-top: 1px solid var(--line); min-width: 0; }
.adm-user:first-child { border-top: 0; }
.adm-user:hover { background: rgba(var(--ink), .03); }
.adm-user > .avatar { grid-area: av; align-self: start; }
.adm-user-main { grid-area: main; display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.adm-user-main b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-user-main span { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-user-meta { grid-area: meta; display: flex; gap: 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.adm-user-flags { grid-area: flags; display: flex; gap: 6px; flex-wrap: wrap; }
.adm-user-flags:empty { display: none; }
.adm-user .row-chev { grid-area: chev; width: 18px; height: 18px; color: var(--muted); }

/* User detail */
.adm-back { align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 700; color: var(--text-2); padding: 4px 0; }
.adm-back .ic { width: 18px; height: 18px; }
.adm-prof { display: flex; flex-direction: column; gap: 14px; overflow: hidden; }
.adm-prof::before { content: ""; position: absolute; inset: 0 0 auto; height: 90px; background: linear-gradient(120deg, rgba(var(--acc-rgb), .18), rgba(127,212,255,.05)); pointer-events: none; }
.adm-prof-top { position: relative; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.adm-prof-id { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.adm-prof-id h1 { font-family: var(--display); font-size: 22px; letter-spacing: -0.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-prof-id > span { color: var(--muted); font-size: 14px; }
.adm-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.adm-bio { position: relative; font-size: 14px; color: var(--text-2); white-space: pre-wrap; }
.adm-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.adm-facts div { padding: 10px 12px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); min-width: 0; }
.adm-facts dt { font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-facts dd { font-size: 16px; font-weight: 800; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-facts dd.hot { color: var(--danger); }
.adm-alert { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; font-size: 13.5px; }
.adm-alert .ic { width: 18px; height: 18px; flex: none; }
.adm-alert.off { color: var(--danger); background: rgba(255,85,119,.07); border: 1px solid rgba(255,85,119,.28); }
.adm-alert.warn { color: var(--warn); background: rgba(255,181,71,.07); border: 1px solid rgba(255,181,71,.28); }
.adm-alert span { color: var(--text-2); }
.adm-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.adm-act { display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 10px 12px; border-radius: 16px; text-align: left; color: var(--text); background: var(--panel); border: 1px solid var(--line-2); transition: background .15s, border-color .15s; }
.adm-act:hover:not(:disabled) { background: var(--panel-2); border-color: rgba(127,212,255,.35); }
.adm-act > .ic { width: 20px; height: 20px; flex: none; color: var(--brand2); }
.adm-act span { display: flex; flex-direction: column; min-width: 0; }
.adm-act b { font-size: 14px; }
.adm-act em { font-style: normal; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-act.danger > .ic, .adm-act.danger b { color: var(--danger); }
.adm-act:disabled { opacity: .45; cursor: not-allowed; }
.adm-note { display: flex; gap: 8px; margin-top: 12px; font-size: 13px; color: var(--text-2); }
.adm-note .ic { width: 16px; height: 16px; flex: none; color: var(--brand2); margin-top: 1px; }
.adm-mini { display: flex; flex-direction: column; }
.adm-mini li { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 13.5px; min-width: 0; }
.adm-mini li:first-child { border-top: 0; padding-top: 0; }
.adm-mini-t { flex: 1 1 160px; min-width: 0; color: var(--text-2); overflow-wrap: anywhere; }
.adm-mini-t b { color: var(--text); }
.adm-mini .muted { font-size: 12px; }
.adm-thumbs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.adm-thumb { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--panel-2); display: grid; place-items: center; color: var(--muted); }
.adm-thumb img { width: 100%; height: 100%; object-fit: cover; }
.adm-thumb.hidden-post img { opacity: .35; filter: grayscale(1); }
.adm-thumb span { position: absolute; left: 6px; bottom: 6px; font-size: 10.5px; font-weight: 800; padding: 2px 7px; border-radius: 999px; color: #fff; background: var(--danger); }

/* Content */
.adm-item { display: flex; gap: 12px; padding: 12px; }
.adm-item.dim { opacity: .7; }
.adm-item-img { flex: none; width: 76px; height: 76px; border-radius: 12px; overflow: hidden; background: var(--panel-2); display: grid; place-items: center; }
.adm-item-img img { width: 100%; height: 100%; object-fit: cover; }
.adm-item-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.adm-item-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13.5px; }
.adm-item-top time { font-size: 12px; color: var(--muted); }
.adm-item-body { font-size: 14px; color: var(--text); overflow-wrap: anywhere; }
.adm-item-body.none { color: var(--muted); font-style: italic; }
.adm-item-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.adm-item-acts .ic { width: 15px; height: 15px; }
.adm-more { display: flex; justify-content: center; padding: 4px 0; }
.adm-more:empty { display: none; }

/* Family chat (admin) */
.adm-chats { display: grid; gap: 12px; }
.adm-chatcard { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 4px 14px; }
.adm-chatcard > div { display: flex; flex-direction: column; }
.adm-chatcard > div b { font-family: var(--display); font-size: 20px; }
.adm-chatcard > div span { font-size: 13px; color: var(--muted); }
.adm-chatcard dl { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.adm-chatcard dl div { padding: 8px 10px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.adm-chatcard dt { font-size: 11px; font-weight: 700; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-chatcard dd { font-size: 15px; font-weight: 800; }
.adm-chatcard dd.warn { color: var(--warn); }
.adm-chatcard .row-chev { grid-row: 1; grid-column: 3; width: 18px; height: 18px; color: var(--muted); }
.adm-chathead { align-items: center; }
.adm-thread { padding: 6px 4px; }
.adm-older { display: flex; justify-content: center; padding: 6px; }
.adm-older:empty { display: none; }
.adm-msg { display: flex; gap: 10px; padding: 10px 10px; border-radius: 14px; align-items: flex-start; }
.adm-msg:hover { background: rgba(var(--ink), .03); }
.adm-msg-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.adm-msg-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13.5px; }
.adm-msg-top time { font-size: 12px; color: var(--muted); }
.adm-msg-body { font-size: 14.5px; color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; }
.adm-msg-img { width: 160px; max-width: 100%; border-radius: 12px; overflow: hidden; padding: 0; background: var(--panel-2); border: 1px solid var(--line-2); cursor: zoom-in; display: grid; place-items: center; min-height: 80px; }
.adm-msg-img img { width: 100%; height: auto; display: block; }
.adm-msg-del { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--muted); font-style: italic; }
.adm-msg-del .ic { width: 14px; height: 14px; flex: none; }
.adm-msg-del s { color: var(--text-2); }
.adm-msg .icon-btn { width: 34px; height: 34px; flex: none; }

/* Audit log */
.adm-auditcard { padding: 4px 16px; }
.adm-audit { display: flex; flex-direction: column; }
.adm-log { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "what when" "who who" "note note"; gap: 3px 10px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 13.5px; min-width: 0; }
.adm-audit .adm-log:first-child { border-top: 0; }
.adm-log time { grid-area: when; font-size: 12px; color: var(--muted); white-space: nowrap; }
.adm-log-who { grid-area: who; font-size: 12.5px; }
.adm-log-what { grid-area: what; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.adm-log-note { grid-area: note; color: var(--muted); font-size: 12.5px; overflow-wrap: anywhere; }
.adm-log-note:empty { display: none; }
.adm-log-head { display: none; }

/* Admin sheets */
.adm-sheet .reasons { margin-bottom: 10px; }
.adm-sheet .input-wrap { margin-bottom: 10px; }
.adm-sheet .input-wrap input { padding: 0 16px; }
.adm-sheet .input-wrap textarea { min-height: 72px; }
.adm-sheet .btn-ghost.block { margin-top: 8px; }
.adm-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.adm-presets .chip { height: auto; min-height: 34px; padding: 6px 12px; font-size: 12.5px; text-align: left; white-space: normal; }

@media (min-width: 700px) {
  .adm-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .adm-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .adm-facts { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .adm-thumbs { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .adm-chats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rep-img { width: 120px; height: 120px; }
}
@media (min-width: 1024px) {
  .adm { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 0 28px; padding: 24px var(--pad) 40px; align-items: start; }
  .adm-nav { top: 96px; background: none; padding: 0; }
  .adm-brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 16px; }
  .adm-brand > .ic { width: 30px; height: 30px; color: var(--brand2); filter: drop-shadow(0 0 10px rgba(127,212,255,.5)); }
  .adm-brand div { display: flex; flex-direction: column; }
  .adm-brand b { font-family: var(--display); font-size: 19px; }
  .adm-brand span { font-size: 12px; color: var(--muted); }
  .adm-tabs { flex-direction: column; gap: 2px; padding: 0; overflow: visible; }
  .adm-tab { height: 42px; border-radius: 13px; background: none; border-color: transparent; font-size: 14.5px; padding: 0 12px; gap: 12px; }
  .adm-tab .ic { width: 20px; height: 20px; }
  .adm-tab:hover { background: var(--panel-2); }
  .adm-tab.on { color: var(--strong); background: linear-gradient(90deg, rgba(61,139,255,.12), rgba(127,212,255,.05)); box-shadow: inset 0 0 0 1px rgba(61,139,255,.16); }
  .adm-tab.on .ic { color: var(--brand); }
  html[data-theme="light"] .adm-tab.on .ic { color: #1a55c0; }
  .adm-count { margin-left: auto; }
  .adm-main { padding: 0; gap: 16px; }
  .adm-head h1 { font-size: 30px; }
  .adm-stats { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .adm-grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .adm-list:not(.adm-users) { gap: 14px; }
  .adm-user { grid-template-columns: 36px minmax(0, 1.4fr) minmax(0, 1.2fr) minmax(0, 1fr) 18px; grid-template-areas: "av main meta flags chev"; padding: 12px 18px; }
  .adm-user > .avatar { align-self: center; }
  .adm-user-main { flex-direction: column; gap: 0; }
  .adm-user-flags { justify-content: flex-end; }
  .adm-user-flags:empty { display: flex; }
  .adm-chats { grid-template-columns: minmax(0, 560px); }
  .adm-chatcard { grid-template-columns: auto minmax(0, 1fr); }
  .adm-chatcard dl { grid-template-columns: 1fr; }
  .adm-chatcard .row-chev { display: none; }
  .adm-log { grid-template-columns: 150px 150px minmax(0, 1.3fr) minmax(0, 1fr); grid-template-areas: "when who what note"; align-items: center; }
  .adm-log-note:empty { display: block; }
  .adm-log-head { display: grid; font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); border-top: 0; padding: 12px 0 8px; }
  .adm-auditcard .adm-audit .adm-log:first-child { border-top: 1px solid var(--line); }
  .rep { padding: 18px 20px; }
}

/* =========================================================
   v15: grouped cards on Home - same-author runs as one card with a sideways row of tiles
   ========================================================= */
.pgroup { border-radius: 0; border-left: 0; border-right: 0; padding-bottom: 12px; overflow: hidden; min-width: 0; }
.pg-head { padding-right: 14px; }
.pg-n { font-weight: 800; color: var(--text); }
.pg-count { flex: none; margin-left: auto; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; color: var(--text-2);
  background: var(--panel-2); border: 1px solid var(--line-2); font-variant-numeric: tabular-nums; }
.pg-row { position: relative; }
.pg-track { display: flex; gap: 10px; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scroll-padding: 0 14px; padding: 0 14px 2px;
  overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; scrollbar-width: none; touch-action: pan-x pan-y; }
.pg-track::-webkit-scrollbar { display: none; }
.pg-tile { position: relative; flex: 0 0 calc((100% + 28px) * .82); min-width: 0; scroll-snap-align: start; scroll-snap-stop: always; display: flex; flex-direction: column;
  border-radius: 18px; background: rgba(var(--ink), .03); border: 1px solid var(--line); overflow: hidden; }
/* keep the whole card (author row, 4:5 media, actions) on one screen on short phones / windows */
.pg-tile { flex-basis: min(calc((100% + 28px) * .82), calc((100svh - 330px) * .8)); }
.pg-tile:last-child { scroll-snap-align: end; }
.pg-media { position: relative; aspect-ratio: 4 / 5; background: #000; overflow: hidden; user-select: none; -webkit-user-select: none; }
.pg-media.fv-media { max-height: none; min-height: 0; }
.pg-media img, .pg-media video { display: block; width: 100%; height: 100%; object-fit: cover; }
.pg-open { position: absolute; inset: 0; z-index: 1; -webkit-tap-highlight-color: transparent; }
.pg-open:focus-visible { outline: 3px solid var(--brand2); outline-offset: -3px; }
.pg-media .fv-mute { z-index: 2; }
.pg-media .kind-badge { z-index: 2; pointer-events: none; }
.pg-stack { position: absolute; z-index: 2; top: 10px; right: 10px; display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 9px 0 7px; border-radius: 999px;
  color: #fff; font-size: 12px; font-weight: 800; background: rgba(4,4,10,.6); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); pointer-events: none; }
.pg-stack .ic { width: 15px; height: 15px; }
.pg-stack .pg-stack-clip { color: var(--brand2); width: 14px; height: 14px; }
.pg-acts { padding: 6px 4px 0; }
.pg-acts .act { min-width: 40px; }
.pg-acts .act-views { display: none; }
.pg-likes { padding: 0 12px; font-size: 13.5px; }
.pg-cap { padding: 3px 12px 0; font-size: 13.5px; line-height: 1.4; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.pg-cap b { color: var(--text); }
.pg-meta { display: flex; align-items: center; gap: 8px; margin-top: auto; padding: 4px 4px 4px 12px; min-height: 40px; }
.pg-meta time { font-size: 12px; color: var(--muted); }
.pg-meta .entry-tag { margin-left: 2px; }
.pg-more { margin-left: auto; width: 34px; height: 34px; }
.pg-more .ic { width: 18px; height: 18px; }
.pg-nav { position: absolute; z-index: 4; top: calc((100% - 120px) / 2); transform: translateY(-50%); width: 38px; height: 38px; border-radius: 50%; display: none; place-items: center;
  color: #fff; background: rgba(4,4,10,.66); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.18); cursor: pointer; }
.pg-nav .ic { width: 19px; height: 19px; }
.pg-nav.prev { left: 8px; } .pg-nav.next { right: 8px; }
.pg-nav[hidden] { display: none !important; }
@media (hover: hover) and (pointer: fine) {
  .pgroup:hover .pg-nav, .pg-nav:focus-visible { display: grid; }
}
.pg-nav:focus-visible { display: grid; outline: 3px solid var(--brand2); }
.pg-dots { margin: 12px 0 0; }
.pg-dots:empty { display: none; }
.pgroup .pg-tile .heart-pop { z-index: 3; }
html[data-theme="light"] .pg-tile { background: var(--bg-2); box-shadow: 0 2px 10px rgba(17,19,33,.05); }
html[data-theme="light"] .pg-count { color: var(--text); }
@media (prefers-reduced-motion: reduce) { .pg-track { scroll-behavior: auto; } }
@media (min-width: 700px) {
  .pgroup { border-radius: var(--r-lg); border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
  .pg-tile { flex-basis: calc((100% + 28px) * .76); flex-basis: min(calc((100% + 28px) * .76), calc((100svh - 330px) * .8)); }
}

/* =========================================================
   v16: Facebook-style Home - big post cards on a thin gap band, caption above the media,
   counts line + labelled Like / Comment / Share / Save bar, Clips shelves between the rows
   ========================================================= */
:root { --band: #000; --fb-card: #101019; }
html[data-theme="light"] { --band: #e4e6ec; --fb-card: #fff; }
.feed.is-full .fv-list { gap: 8px; background: var(--band); }
.feed.is-full .fv-list:empty { display: none; }
.fpost.fb, .feed.is-full .pgroup, .cshelf { border-radius: 0; border: 0; box-shadow: none; background: var(--fb-card); }
html[data-theme="light"] :is(.fpost.fb, .feed.is-full .pgroup, .cshelf) { background: #fff; }
.fpost.fb { contain-intrinsic-size: auto 700px; }
.fpost.fb .post-head { padding: 12px 8px 8px 14px; }
.fb-body { padding: 0 14px 10px; display: flex; flex-direction: column; gap: 8px; }
.fb-body .caption { font-size: 15px; line-height: 1.45; color: var(--text); }
/* photos: natural aspect between 4:5 and 1.91:1 at full card width (no crop to the screen height) */
.fpost.is-photo .fv-media { max-height: none; }
.fb-counts { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px 9px; font-size: 13.5px; color: var(--muted); min-width: 0; }
.fb-likes { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.fb-likes b { color: var(--text-2); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fb-heart { flex: none; width: 19px; height: 19px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #ff5f8a, #ff2e63); box-shadow: 0 0 0 2px var(--fb-card); }
.fb-heart .ic { width: 11px; height: 11px; fill: #fff; stroke: #fff; }
.fb-right { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.fb-cm { align-self: auto; font-size: 13.5px; font-weight: 500; color: var(--muted); }
.fb-cm:hover { text-decoration: underline; color: var(--text-2); }
.fb-views { white-space: nowrap; }
.fb-acts { margin: 0 12px; padding: 4px 0; gap: 4px; border-top: 1px solid var(--line-2); }
.fb-acts .act { flex: 1 1 auto; justify-content: center; gap: 7px; height: 42px; padding: 0 4px; border-radius: 10px; color: var(--text-2); font-weight: 700; font-size: 14px; min-width: 0; }
.fb-acts .act .ic { width: 21px; height: 21px; flex: none; }
.fb-acts .act:hover { background: var(--panel-2); }
.fb-acts .act.like.on { color: #ff3d6e; }
.fb-acts .act.save.on { color: var(--brand); }
.fb-l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 340px) { .fb-acts .fb-l { display: none; } }
.fpost.fb .car-dots { margin: 10px 0 0; }

/* grouped big-photo rows: tiles ~92% of the card so the photos stay large */
.feed.is-full .pgroup { padding-bottom: 10px; }
.feed.is-full .pg-track { gap: 8px; padding: 0 12px 2px; scroll-padding: 0 12px; }
.feed.is-full .pg-tile { flex-basis: calc((100% + 24px) * .92); flex-basis: min(calc((100% + 24px) * .92), calc((100svh - 300px) * .8)); }

/* Clips shelf */
.cshelf { padding: 12px 0 14px; min-width: 0; }
.cs-head { display: flex; align-items: center; gap: 8px; padding: 0 14px 10px; }
.cs-head h3 { flex: 1; font-size: 16.5px; font-weight: 800; letter-spacing: -0.01em; }
.cs-ic { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; color: var(--brand2); background: rgba(127,212,255,.1); border: 1px solid rgba(127,212,255,.25); }
.cs-ic .ic { width: 16px; height: 16px; }
html[data-theme="light"] .cs-ic { color: #005f95; background: rgba(0,95,149,.08); border-color: rgba(0,95,149,.25); }
html[data-theme="light"] .cshelf .see-all { color: #005f95; }
.cs-row { position: relative; }
.cs-track { display: flex; gap: 8px; overflow-x: auto; overflow-y: hidden; padding: 0 14px; scroll-padding: 0 14px; scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.cs-track::-webkit-scrollbar { display: none; }
.cs-tile { position: relative; flex: 0 0 calc((100% + 28px) * .4); aspect-ratio: 9 / 16; border-radius: 14px; overflow: hidden; background: #111119; color: #fff;
  scroll-snap-align: start; -webkit-tap-highlight-color: transparent; isolation: isolate; }
.cs-tile:last-child { scroll-snap-align: end; }
.cs-tile > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.cs-tile:hover > img { transform: scale(1.03); }
.cs-tile:focus-visible { outline: 3px solid var(--brand2); outline-offset: 2px; }
.cs-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,0) 26%, rgba(0,0,0,0) 55%, rgba(0,0,0,.78) 100%); }
.cs-likes, .cs-dur { position: absolute; top: 8px; display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 800;
  background: rgba(4,4,10,.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.cs-likes { left: 8px; }
.cs-likes .ic { width: 13px; height: 13px; fill: #fff; stroke: #fff; }
.cs-dur { right: 8px; font-variant-numeric: tabular-nums; }
.cs-user { position: absolute; left: 8px; right: 8px; bottom: 9px; display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 12.5px; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.cs-user .avatar { flex: none; box-shadow: 0 0 0 2px var(--acc); }
.cs-user b { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cshelf .entry-tag.on-tile { z-index: 3; }
.cs-nav { position: absolute; z-index: 3; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border-radius: 50%; display: none; place-items: center;
  color: #fff; background: rgba(4,4,10,.66); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.18); cursor: pointer; }
.cs-nav .ic { width: 19px; height: 19px; }
.cs-nav.prev { left: 8px; } .cs-nav.next { right: 8px; }
.cs-nav[hidden] { display: none !important; }
@media (hover: hover) and (pointer: fine) { .cshelf:hover .cs-nav { display: grid; } }
.cs-nav:focus-visible { display: grid; outline: 3px solid var(--brand2); }
@media (prefers-reduced-motion: reduce) { .cs-tile > img { transition: none; } }

@media (min-width: 700px) {
  .feed.is-full { max-width: 600px; }
  .feed.is-full .fv-list { gap: 16px; background: none; }
  .fpost.fb, .feed.is-full .pgroup, .cshelf { border-radius: var(--r-lg); border: 1px solid var(--line); box-shadow: var(--card-shadow); }
  .feed.is-full .pg-tile { flex-basis: min(calc((100% + 24px) * .92), calc((100svh - 300px) * .8)); }
  .cs-tile { flex-basis: calc((100% + 28px) * .38); }
}

/* ---------- v17: no public social counts ----------
   Like / comment / view / follower numbers are gone from cards, profiles, the Clips viewer, shelves and stories.
   The profile info column no longer keeps a slot for the old stats box on desktop. */
.fpost.fb .fb-acts { margin-top: 6px; }
@media (min-width: 1024px) {
  .pf-info { grid-template-columns: minmax(0, 1fr); max-width: 720px; }
}

/* ==================================================
   v18: no likes, comments, saves or shares (030_no_reactions.sql). The post and video pages lose their comments
   column, so they are one centred column now. (Old .post-actions / .cm-* / .heart-pop rules above are unused.)
   ========================================================= */
.post-split { grid-template-columns: minmax(0, 1fr); justify-items: center; }
.post-split > .post { width: 100%; max-width: 640px; }
.watch-grid, .watch.is-clip .watch-grid { grid-template-columns: minmax(0, 1fr); max-width: 960px; margin: 0 auto; }
.w-ch-acts { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; }
@media (min-width: 1024px) {
  .post-split { grid-template-columns: max-content; justify-content: center; }
  .post-split > .post { max-width: none; }
}
=======
/* ---------- v19: admin powers (bans, scoped mutes, admin deletes in app menus) ---------- */
.banned-card .paused-ic { color: var(--danger); background: rgba(255,85,119,.08); border-color: rgba(255,85,119,.32); box-shadow: 0 0 30px rgba(255,85,119,.16); }
.ban-left { align-self: center; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--text); background: var(--panel); border: 1px solid var(--line); }
.ban-left .ic { width: 15px; height: 15px; color: var(--danger); }
.adm-status { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--panel); }
.adm-status > .ic { width: 24px; height: 24px; flex: none; margin-top: 1px; }
.adm-status div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.adm-status b { font-size: 15.5px; font-weight: 800; }
.adm-status span { font-size: 13.5px; color: var(--text-2); overflow-wrap: anywhere; }
.adm-status em { font-style: normal; font-size: 12.5px; color: var(--muted); }
.adm-status.s-banned { background: rgba(255,85,119,.08); border-color: rgba(255,85,119,.35); }
.adm-status.s-banned > .ic, .adm-status.s-banned b { color: var(--danger); }
.adm-status.s-muted { background: rgba(255,181,71,.08); border-color: rgba(255,181,71,.35); }
.adm-status.s-muted > .ic, .adm-status.s-muted b { color: var(--warn); }
.adm-status.s-active > .ic { color: var(--brand); }
html[data-theme="light"] .adm-status.s-active > .ic { color: #1a55c0; }
.adm-facts dd.warn { color: var(--warn); }
.adm-chip.warns { color: var(--warn); background: none; border-color: rgba(255,181,71,.32); }
.adm-chip .ic { width: 12px; height: 12px; }
.adm-count-pill { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 6px; margin-left: 4px; border-radius: 10px; font-size: 11.5px; font-weight: 800; color: var(--text); background: var(--panel-2); border: 1px solid var(--line); }
.adm-thumb > a { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); }
.adm-thumb-del { position: absolute; top: 5px; right: 5px; width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; color: #fff; background: rgba(10,10,18,.62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.adm-thumb-del .ic { width: 15px; height: 15px; }
.adm-thumb-del:hover { background: var(--danger); }
.adm-sub { display: flex; align-items: center; gap: 8px; margin: 16px 0 6px; font-size: 13px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.adm-sub .ic { width: 16px; height: 16px; }
.adm-cmts li .btn-ghost.sm { flex: none; }
.btn-ghost.sm.danger { color: var(--danger); }
.adm-sheet .sheet-label { padding-top: 4px; }
.adm-sheet .check-row { margin-top: 2px; }
.sheet-row.adm-row .adm-tag { margin-left: auto; font-style: normal; font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; color: #020a18; background: var(--grad); }
.adm-confirm .check-row { justify-content: center; text-align: left; font-weight: 600; font-size: 13.5px; }
.fam-row.fam-removed { color: var(--muted); cursor: default; }
.fam-row.fam-removed > .ic { width: 22px; height: 22px; flex: none; color: var(--warn); }
.fam-row.fam-removed span { display: flex; flex-direction: column; min-width: 0; }
.fam-row.fam-removed b { color: var(--text); }
.fam-row.fam-removed em { font-style: normal; font-size: 13px; }
.chat-note.dm-muted b { color: var(--warn); }
@media (min-width: 700px) {
  .adm-thumbs { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
.sheet.tall .adm-sheet { overflow-y: auto; overscroll-behavior: contain; margin: 0 -16px; padding: 0 16px; }
.adm-radios[data-name="dur"], .adm-radios[data-name="scope"], .adm-radios[data-name="mins"] { flex-direction: row; flex-wrap: wrap; }
.adm-radios[data-name="dur"] .reason, .adm-radios[data-name="scope"] .reason, .adm-radios[data-name="mins"] .reason { flex: 1 1 calc(33.3% - 6px); min-width: 0; }
.adm-radios[data-name="dur"] .reason, .adm-radios[data-name="scope"] .reason, .adm-radios[data-name="mins"] .reason { padding: 10px; gap: 8px; font-size: 14px; white-space: nowrap; }
.adm-radios[data-name="scope"] .reason, .adm-radios[data-name="dur"] .reason { padding: 10px 8px; gap: 6px; font-size: 13.5px; letter-spacing: -0.01em; }

/* ===== v22: installable app (PWA) ===== */
/* safe areas: the floating tab bar and top bar also keep clear of the sides (landscape notch) */
.tabbar { left: calc(10px + var(--sal)); right: calc(10px + var(--sar)); }
.topbar { padding-left: calc(var(--pad) + var(--sal)); padding-right: calc(8px + var(--sar)); }
/* iPhone home-screen app with the light theme: the status bar text is always white ("black-translucent"),
   so keep the strip behind it dark enough to read */
html.standalone.ios[data-theme="light"] body::after {
  content: ""; position: fixed; top: 0; left: 0; right: 0; height: var(--sat); z-index: 300; pointer-events: none;
  background: linear-gradient(rgba(6, 6, 11, .92), rgba(6, 6, 11, .78));
}
html.standalone body { overscroll-behavior-y: none; }
html.standalone .boot { padding-bottom: var(--sab); }

/* "New version, tap to refresh" */
.sw-update {
  position: fixed; left: 50%; bottom: calc(92px + var(--sab)); z-index: 126; transform: translate(-50%, 12px); opacity: 0;
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px 0 14px; border-radius: 999px;
  font-size: 14.5px; font-weight: 800; color: #020a18; background: var(--grad); white-space: nowrap;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .45), 0 0 22px rgba(95, 176, 255, .3); transition: opacity .25s, transform .25s;
}
.sw-update.show { opacity: 1; transform: translate(-50%, 0); }
.sw-update .ic { width: 18px; height: 18px; }
.sw-update:disabled { opacity: .8; }
body[data-view="auth"] .sw-update, body[data-view="onboard"] .sw-update { bottom: calc(24px + var(--sab)); }
@media (min-width: 900px) { .sw-update { bottom: 28px; } }

/* "Install Loop" card (Home) + sheet */
.install-card { position: relative; margin: 4px 12px 12px; padding: 16px 16px 14px; overflow: hidden;
  background: radial-gradient(120% 90% at 0% 0%, rgba(61, 139, 255, .09), transparent 55%), radial-gradient(120% 90% at 100% 100%, rgba(127, 212, 255, .09), transparent 55%), var(--card-bg); }
.ic-close { position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; }
.ic-head { display: flex; gap: 12px; align-items: center; padding-right: 30px; }
.ic-icon { width: 54px; height: 54px; border-radius: 13px; flex: none; box-shadow: 0 4px 16px rgba(0, 0, 0, .4), 0 0 0 1px rgba(var(--ink), .08); }
.ic-head h3 { font-family: var(--display); font-size: 18px; letter-spacing: -0.02em; color: var(--strong); }
.ic-head p { margin: 2px 0 0; font-size: 13.5px; line-height: 1.35; color: var(--text-2); }
.ic-steps { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ic-steps li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.4; color: var(--text); }
.ic-steps em { font-style: normal; color: var(--muted); font-size: 12.5px; }
.ic-num { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #020a18; background: var(--grad); }
.ic-key { display: inline-grid; place-items: center; width: 24px; height: 24px; vertical-align: -6px; border-radius: 7px; background: rgba(var(--ink), .08); color: #3a8dff; }
.ic-key .ic { width: 16px; height: 16px; }
.ic-acts { display: flex; gap: 8px; margin-top: 14px; }
.ic-diagram { display: flex; align-items: center; gap: 4px; margin-top: 14px; }
.icd-panel { flex: 1 1 0; min-width: 0; height: 74px; border-radius: 12px; background: rgba(var(--ink), .05); border: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 6px; overflow: hidden; }
.icd-arrow { flex: none; color: var(--muted); }
.icd-arrow .ic { width: 14px; height: 14px; }
.icd-url { font-size: 9px; text-align: center; color: var(--muted); background: rgba(var(--ink), .07); border-radius: 6px; padding: 3px 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icd-bar { display: flex; justify-content: space-between; align-items: center; padding: 0 2px; color: #3a8dff; }
.icd-bar i { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 6px; }
.icd-bar .ic { width: 12px; height: 12px; }
.icd-bar .icd-dim { opacity: .4; }
.icd-bar .icd-hot { width: 22px; height: 22px; background: rgba(58, 141, 255, .18); box-shadow: 0 0 0 2px #3a8dff, 0 0 14px rgba(58, 141, 255, .6); animation: icd-pulse 1.8s ease-in-out infinite; }
.icd-row { display: flex; align-items: center; gap: 4px; font-size: 9px; font-weight: 700; color: var(--text-2); padding: 2px 4px; border-radius: 6px; white-space: nowrap; overflow: hidden; }
.icd-row i { display: grid; place-items: center; flex: none; }
.icd-row .ic { width: 11px; height: 11px; }
.icd-hot-row { color: var(--strong); background: rgba(58, 141, 255, .18); box-shadow: inset 0 0 0 1.5px #3a8dff; }
.icd-home { align-items: center; }
.icd-home img { width: 34px; height: 34px; border-radius: 8px; box-shadow: 0 0 14px rgba(127, 212, 255, .35); }
.icd-home span { font-size: 9px; font-weight: 700; color: var(--text); }
@keyframes icd-pulse { 50% { box-shadow: 0 0 0 2px #3a8dff, 0 0 4px rgba(58, 141, 255, .2); } }
.install-sheet .ic-steps { margin-top: 4px; }
.install-sheet .ic-diagram { margin-bottom: 18px; }
html.standalone .install-card, html.standalone [data-act="install"] { display: none !important; }
@media (min-width: 900px) { .install-card { margin: 4px 0 14px; } }
@media (prefers-reduced-motion: reduce) { .icd-bar .icd-hot { animation: none; } }
.ic-steps .nw { white-space: nowrap; }
.icd-sheet { flex-grow: 1.45; }
.icd-safari, .icd-home { flex-grow: .9; }

/* ===== v23: notifications ===== */
.notif-sheet h3 { margin-bottom: 12px; }
.nt-status { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 18px; border: 1px solid var(--line); background: rgba(var(--ink), .04); }
.nt-status .nt-ic { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(var(--ink), .07); color: var(--strong); }
.nt-status .nt-ic .ic { width: 21px; height: 21px; }
.nt-status > div { flex: 1; min-width: 0; }
.nt-status b { display: block; font-size: 15.5px; color: var(--strong); }
.sheet-body .nt-status p { margin: 3px 0 10px; font-size: 13.5px; line-height: 1.4; }
.nt-status .btn-ghost.sm .ic, .nt-status .btn-primary .ic { width: 17px; height: 17px; }
.nt-status.on { border-color: rgba(127, 212, 255, .35); background: rgba(127, 212, 255, .06); }
.nt-status.on .nt-ic { color: #020a18; background: var(--grad); }
.nt-status.warn .nt-ic { color: var(--warn); background: rgba(255, 181, 71, .12); }
.nt-status.nt-cta { flex-direction: column; align-items: stretch; text-align: center; padding: 18px 16px 14px;
  background: radial-gradient(120% 90% at 0% 0%, rgba(61, 139, 255, .1), transparent 55%), radial-gradient(120% 90% at 100% 100%, rgba(127, 212, 255, .1), transparent 55%), rgba(var(--ink), .03); }
.nt-status.nt-cta .nt-ic { align-self: center; width: 52px; height: 52px; border-radius: 16px; color: #020a18; background: var(--grad); box-shadow: 0 0 24px rgba(95, 176, 255, .35); }
.nt-status.nt-cta .nt-ic .ic { width: 26px; height: 26px; }
.nt-status.nt-cta b { font-family: var(--display); font-size: 18px; margin-top: 4px; }
.sheet-body .nt-status .nt-small { margin: 8px 0 0; font-size: 12px; color: var(--muted); }
.nt-types { border: 0; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.nt-types legend { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; padding: 0; }
.nt-row { display: flex; align-items: center; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--line); cursor: pointer; }
.nt-row:last-child { border-bottom: 0; }
.nt-row-ic { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(var(--ink), .06); color: var(--text-2); }
.nt-row-ic .ic { width: 18px; height: 18px; }
.nt-row-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.nt-row-t b { font-size: 15px; color: var(--strong); }
.nt-row-t em { font-style: normal; font-size: 12.5px; color: var(--muted); }
.nt-switch { appearance: none; -webkit-appearance: none; flex: none; position: relative; width: 50px; height: 30px; border-radius: 999px; margin: 0;
  background: rgba(var(--ink), .16); transition: background .2s; cursor: pointer; }
.nt-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); transition: transform .2s; }
.nt-switch:checked { background: var(--grad); }
.nt-switch:checked::after { transform: translateX(20px); }
.nt-switch:focus-visible { outline: 2px solid var(--brand2-b); outline-offset: 2px; }
.nt-switch:disabled { opacity: .6; }
.nt-row.locked { cursor: default; }
.nt-always { flex: none; display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 800; color: var(--muted); padding: 5px 9px; border-radius: 999px; background: rgba(var(--ink), .06); }
.nt-always .ic { width: 13px; height: 13px; }
.nt-quiet { margin-top: 14px; }
.sheet-body .nt-note { font-size: 12.5px; color: var(--muted); margin: 10px 0 4px; }
.notif-sheet .sheet-tip b { color: var(--strong); }

.push-card { position: relative; display: flex; gap: 12px; align-items: flex-start; margin: 4px 12px 12px; padding: 14px;
  background: radial-gradient(120% 90% at 0% 0%, rgba(61, 139, 255, .08), transparent 55%), radial-gradient(120% 90% at 100% 100%, rgba(127, 212, 255, .08), transparent 55%), var(--card-bg); }
.pc-ic { flex: none; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; color: #020a18; background: var(--grad); box-shadow: 0 0 20px rgba(95, 176, 255, .3); }
.pc-ic .ic { width: 22px; height: 22px; }
.pc-main { flex: 1; min-width: 0; }
.pc-main h3 { font-family: var(--display); font-size: 16.5px; letter-spacing: -0.01em; color: var(--strong); }
.pc-main p { margin: 2px 0 10px; font-size: 13.5px; line-height: 1.4; color: var(--text-2); }
.pc-acts { display: flex; gap: 8px; }
@media (min-width: 900px) { .push-card { margin: 4px 0 14px; } }
