:root {
  --bg: #0d0a12;
  --card: #17121f;
  --card-2: #201929;
  --hover: #1c1626;
  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .12);
  --text: #f4eff8;
  --muted: #9a90a8;
  --accent: #ff5fa2;
  --accent-2: #8b5cf6;
  --grad: linear-gradient(135deg, #ff5fa2 0%, #b25cf0 55%, #8b5cf6 100%);
  --like: #ff4d8d;
  --danger: #ff5a6a;
  --ok: #3ddc97;
  --col: 640px;
  --side: 250px;
  --rail: 330px;
  --gap: 14px;
  --r: 22px;
  --head-h: 64px;
  --bottom-h: 62px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; max-width: 100%; overflow-x: clip; }
body {
  background:
    radial-gradient(900px 420px at 15% -120px, rgba(255, 95, 162, .14), transparent 70%),
    radial-gradient(900px 420px at 90% -160px, rgba(139, 92, 246, .16), transparent 70%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font: 500 16px/1.5 Nunito, ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; text-decoration: none; }
p a, .muted a, .notice a, .flash a, .feed-end a { color: var(--accent); font-weight: 700; }
img, video, audio { max-width: 100%; display: block; }
h1, h2, h3, p, strong { overflow-wrap: anywhere; }
h2 { font-size: 1.15rem; font-weight: 800; margin: 0 0 8px; }
button, input, textarea { font-family: inherit; }
button { color: inherit; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.block { display: block; }
.center { text-align: center; }
.hidden { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- cards ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 18px;
}
.card + .card, .feed > .card + .card { margin-top: var(--gap); }

/* ---------- brand ---------- */
.logo-mark {
  display: grid; place-items: center; flex-shrink: 0;
  width: 38px; height: 38px; border-radius: 12px;
  background: var(--grad); color: #fff;
  font-weight: 900; font-size: 26px; line-height: 1; padding-bottom: 5px;
  box-shadow: 0 6px 18px rgba(255, 95, 162, .3);
  transform: rotate(-6deg);
}
.logo-mark.sm { width: 32px; height: 32px; font-size: 22px; border-radius: 10px; padding-bottom: 4px; }
.logo-mark.lg { width: 64px; height: 64px; font-size: 44px; border-radius: 20px; padding-bottom: 8px; margin: 0 auto 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.wordmark { font-size: 1.45rem; font-weight: 900; letter-spacing: -.02em; }
.wordmark b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-sm .wordmark { font-size: 1.2rem; }

/* ---------- 3-column shell ---------- */
.shell {
  display: grid;
  grid-template-columns: var(--side) minmax(0, var(--col)) var(--rail);
  gap: 28px;
  justify-content: center;
  padding: 0 20px;
  min-height: 100vh;
}

/* left nav */
.side-nav-inner {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 6px;
  padding: 20px 0 20px;
}
.side-nav .brand { padding: 0 8px 18px; }
.nav-item {
  display: flex; align-items: center; gap: 14px;
  padding: 11px 14px; border-radius: 16px;
  font-size: 1.05rem; font-weight: 700; color: var(--muted);
  transition: background .15s, color .15s;
}
.nav-item:hover { background: var(--card); color: var(--text); }
.nav-item svg { width: 22px; height: 22px; flex-shrink: 0; }
.nav-item.active { background: var(--card-2); color: var(--text); box-shadow: inset 3px 0 0 var(--accent); }
.nav-item.active svg { color: var(--accent); }
.btn-post { margin-top: 14px; height: 50px; }
.btn-post svg { width: 20px; height: 20px; }

.account-chip { margin-top: auto; position: relative; }
.account-chip summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; gap: 10px;
  padding: 10px; border-radius: 18px; background: var(--card); border: 1px solid var(--line);
}
.account-chip summary::-webkit-details-marker { display: none; }
.account-chip summary:hover { background: var(--hover); }
.account-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.account-text strong, .account-text span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-text .muted { font-size: .8rem; }
.menu-panel {
  position: absolute; left: 0; z-index: 30;
  width: 250px; padding: 6px;
  background: var(--card-2); border: 1px solid var(--line-2); border-radius: 18px;
  box-shadow: 0 18px 40px rgba(0,0,0,.55);
}
.menu-panel.up { bottom: calc(100% + 8px); }
.menu-panel a, .menu-panel button {
  display: block; width: 100%; padding: 10px 12px; border-radius: 12px; text-align: left;
  background: none; border: 0; font-weight: 700; font-size: .95rem; cursor: pointer;
}
.menu-panel a:hover, .menu-panel button:hover { background: rgba(255,255,255,.06); }

/* center column */
.col { min-width: 0; padding-bottom: 40px; }
.col-head {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  height: var(--head-h); margin-bottom: 6px;
  background: linear-gradient(var(--bg) 60%, rgba(13, 10, 18, 0));
}
.col-title { font-size: 1.5rem; font-weight: 900; margin: 0; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: -.01em; }

/* right rail */
.rail-inner { position: sticky; top: 0; padding-top: 20px; display: flex; flex-direction: column; gap: var(--gap); }
.rail-inner .card + .card { margin-top: 0; }
.welcome-card { background: linear-gradient(160deg, rgba(255,95,162,.16), rgba(139,92,246,.16)), var(--card); }
.welcome-card p, .card > p:last-child { margin-bottom: 0; }
.card .btn-block + .btn-block { margin-top: 8px; }
.rail-foot { font-size: .8rem; padding: 0 6px; }

/* about card */
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.card-head h2 { margin: 0; min-width: 0; }
.edit-link {
  display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0;
  padding: 4px 10px; border-radius: 999px; font-size: .8rem; font-weight: 800;
  color: var(--accent); background: rgba(255, 95, 162, .1);
}
.edit-link:hover { background: rgba(255, 95, 162, .2); }
.about-bio { white-space: pre-wrap; margin: 6px 0 0; }
.about-links { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.about-links a {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 14px;
  background: var(--card-2); border: 1px solid var(--line);
  transition: border-color .15s, transform .15s;
}
.about-links a:hover { border-color: rgba(255, 95, 162, .5); transform: translateY(-1px); }
.link-icon { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--grad); color: #fff; flex-shrink: 0; }
.link-text { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.link-text strong, .link-text span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-arrow { color: var(--muted); flex-shrink: 0; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 20px; border-radius: 14px;
  border: 1px solid transparent; cursor: pointer;
  font-weight: 800; font-size: .95rem; white-space: nowrap;
  transition: filter .15s, background .15s, transform .1s;
}
.btn:active { transform: scale(.98); }
.btn:hover { filter: brightness(1.1); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 6px 18px rgba(255, 95, 162, .25); }
.btn-light { background: var(--text); color: #1a1322; }
.btn-outline { background: transparent; border-color: var(--line-2); color: var(--text); }
.btn-outline:hover { background: rgba(255,255,255,.06); filter: none; }
.btn-danger { background: transparent; border-color: rgba(255, 90, 106, .55); color: var(--danger); }
.btn-danger:hover { background: rgba(255, 90, 106, .12); filter: none; }
.btn-sm { height: 36px; padding: 0 16px; font-size: .9rem; border-radius: 12px; }
.btn-block { width: 100%; height: 46px; }
.btn[disabled] { opacity: .45; cursor: default; filter: none; box-shadow: none; transform: none; }

.icon-btn {
  display: inline-grid; place-items: center; flex-shrink: 0;
  width: 38px; height: 38px; border-radius: 12px;
  background: none; border: 0; cursor: pointer; color: var(--text);
}
.icon-btn:hover { background: rgba(255,255,255,.08); }
.icon-btn.sm { width: 32px; height: 32px; color: var(--muted); border-radius: 10px; }
.icon-btn.sm:hover { color: var(--danger); background: rgba(255, 90, 106, .12); }

.badge {
  display: inline-grid; place-items: center;
  min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 999px; background: var(--accent); color: #fff;
  font-size: .72rem; font-weight: 800; font-style: normal;
}

/* ---------- avatars ---------- */
.avatar {
  display: inline-grid; place-items: center; flex-shrink: 0;
  width: 44px; height: 44px; border-radius: 15px;
  background: var(--grad); color: #fff;
  font-weight: 900; font-size: 1.1rem;
}
.avatar.sm { width: 34px; height: 34px; font-size: .9rem; border-radius: 11px; }
.avatar.xl { width: 110px; height: 110px; font-size: 2.8rem; border-radius: 32px; border: 5px solid var(--card); }

/* ---------- notices / flash ---------- */
.flash { margin: 0 0 var(--gap); padding: 12px 16px; border-radius: 16px; border: 1px solid; font-weight: 700; }
.flash-success { background: rgba(61, 220, 151, .1); border-color: rgba(61, 220, 151, .35); color: #9df0c8; }
.flash-error { background: rgba(255, 90, 106, .1); border-color: rgba(255, 90, 106, .4); color: #ffb8bf; }
.notice { color: var(--muted); margin-bottom: var(--gap); }

/* ---------- compose ---------- */
.compose { margin-bottom: var(--gap); }
.compose-top { display: flex; gap: 12px; align-items: flex-start; }
.compose textarea {
  flex: 1; min-width: 0;
  border: 0; background: transparent; color: var(--text);
  font-size: 1.15rem; font-weight: 600; line-height: 1.45;
  padding: 9px 0; resize: none; outline: none; min-height: 48px; overflow: hidden;
}
.compose textarea::placeholder { color: var(--muted); }
.compose-bar { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line-2); }
.chip-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 12px; cursor: pointer;
  background: var(--card-2); border: 1px solid var(--line); color: var(--text);
  font-weight: 700; font-size: .9rem;
}
.chip-btn:hover { border-color: rgba(255, 95, 162, .5); }
.chip-btn svg { color: var(--accent); }
.chip-btn .opt { color: var(--muted); font-weight: 600; }
.char-count { margin-left: auto; white-space: nowrap; }
.char-count.warn { color: #ffd166; }
.char-count.over { color: var(--danger); }
.compose-bar .btn { margin-left: auto; }
.char-count:not(:empty) + .btn { margin-left: 0; }

.compose-preview:empty { display: none; }
.compose-preview { position: relative; margin: 12px 0 0; border-radius: 16px; overflow: hidden; background: #000; border: 1px solid var(--line); }
.compose-preview img, .compose-preview video { width: 100%; max-height: 420px; object-fit: contain; }
.compose-preview audio { width: calc(100% - 24px); margin: 14px 12px 4px; }
.compose-preview .file-name { display: block; padding: 8px 12px; color: var(--muted); font-size: .85rem; overflow-wrap: anywhere; background: var(--card-2); }
.remove-media {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  width: 32px; height: 32px; border-radius: 10px; border: 0; cursor: pointer;
  background: rgba(13,10,18,.8); color: #fff; display: grid; place-items: center;
}
.progress { position: relative; height: 26px; border-radius: 10px; background: var(--card-2); overflow: hidden; margin: 12px 0 0; }
.progress-bar { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--grad); transition: width .2s; }
.progress span { position: relative; display: grid; place-items: center; height: 100%; font-size: .8rem; font-weight: 800; }
.compose .flash { margin: 12px 0 0; }

/* ---------- posts ---------- */
.post { transition: border-color .15s, background .15s; }
.post[data-href] { cursor: pointer; }
.post[data-href]:hover { border-color: var(--line-2); background: var(--hover); }
.post-head { display: flex; align-items: center; gap: 12px; }
.post-who { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.post-name { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-name:hover { color: var(--accent); }
.post-time { color: var(--muted); font-size: .85rem; white-space: nowrap; }
a.post-time:hover { color: var(--text); }
.post-del { margin-left: auto; }
.post-text { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 12px; font-size: 1.02rem; }
.text-only .post-text { font-size: 1.15rem; font-weight: 600; line-height: 1.45; }

.media { margin: 14px -18px 0; background: #000; overflow: hidden; }
.media-image img { width: 100%; max-height: 560px; object-fit: cover; }
.post-big .media-image img { max-height: none; object-fit: contain; }
.media-video video { width: 100%; max-height: 560px; background: #000; }
.media-audio {
  display: flex; align-items: center; gap: 12px; padding: 14px 18px;
  background: linear-gradient(135deg, rgba(255,95,162,.2), rgba(139,92,246,.22)), var(--card-2);
}
.audio-icon { flex-shrink: 0; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--grad); color: #fff; }
.media-audio audio { flex: 1; min-width: 0; height: 40px; }

.post-actions { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.post-actions form { display: contents; }
.act {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 14px; border-radius: 12px;
  background: var(--card-2); border: 1px solid var(--line);
  color: var(--muted); font-weight: 800; font-size: .9rem; cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}
.act svg { width: 18px; height: 18px; }
.act-reply:hover { color: var(--text); border-color: var(--line-2); }
.act-like:hover { color: var(--like); border-color: rgba(255, 77, 141, .45); }
.act-like.liked { color: #fff; background: linear-gradient(135deg, #ff4d8d, #ff5fa2); border-color: transparent; }
.act-like .heart-fill { display: none; }
.act-like.liked .heart-fill { display: inline; }
.act-like.liked .heart-line { display: none; }
.act-like.pop svg { animation: pop .3s ease; }
@keyframes pop { 50% { transform: scale(1.35); } }
.act-views { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-weight: 700; }

.post-big .post-text { font-size: 1.2rem; }
.post-big.text-only .post-text { font-size: 1.35rem; }

/* replies */
.replies-card { margin-top: var(--gap); }
.replies-title { font-size: 1rem; color: var(--muted); }
.reply-box { display: flex; align-items: flex-start; gap: 10px; margin: 10px 0 4px; }
.reply-box textarea {
  flex: 1; min-width: 0; min-height: 42px; resize: none; overflow: hidden;
  padding: 9px 14px; border-radius: 14px;
  background: var(--card-2); border: 1px solid var(--line); color: var(--text);
  font-size: 16px; font-weight: 600; outline: none;
}
.reply-box textarea:focus { border-color: rgba(255, 95, 162, .55); }
.reply-box .btn { height: 42px; }
.reply-list { list-style: none; margin: 8px 0 0; padding: 0; }
.reply { display: flex; gap: 10px; padding-top: 12px; }
.reply-bubble { flex: 1; min-width: 0; padding: 10px 14px; border-radius: 4px 16px 16px 16px; background: var(--card-2); }
.reply-head { display: flex; align-items: center; gap: 8px; }
.reply-head .post-del { margin-left: auto; margin-right: -8px; }
.reply .post-text { margin-top: 2px; font-size: .98rem; }

.show-more {
  display: block; margin-top: var(--gap); padding: 14px; text-align: center;
  border-radius: 16px; border: 1px dashed var(--line-2); color: var(--accent); font-weight: 800;
}
.show-more:hover { background: var(--card); }
.feed-end { text-align: center; padding: 24px 16px; }
.empty { text-align: center; padding: 48px 24px; }
.empty p { max-width: 360px; margin: 8px auto 20px; }

/* ---------- profile ---------- */
.profile { padding: 0; overflow: hidden; margin-bottom: var(--gap); }
.profile-banner { height: 170px; background: radial-gradient(circle at 20% 30%, #ff5fa2, transparent 55%), radial-gradient(circle at 85% 80%, #8b5cf6, transparent 60%), #2a1838; }
.profile-body { padding: 0 18px 18px; }
.profile-top { display: flex; justify-content: space-between; align-items: flex-end; margin-top: -55px; }
.profile-name { margin: 10px 0 0; font-size: 1.5rem; font-weight: 900; }
.profile-joined { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.profile-stats { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.profile-stats > span { padding: 6px 12px; border-radius: 12px; background: var(--card-2); }

/* ---------- forms / panels ---------- */
.pad { padding: 0; }
.auth { max-width: 440px; margin: 0 auto; padding-top: 8px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; margin-bottom: var(--gap); }
.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, legend { font-weight: 800; font-size: .9rem; }
.hint { color: var(--muted); font-size: .8rem; margin: 0; }
.field input, .field textarea, .inline-search input, .link-row input {
  width: 100%; padding: 12px 14px;
  background: var(--bg); color: var(--text);
  border: 1px solid var(--line-2); border-radius: 12px;
  font: inherit; font-size: 16px; outline: none;
}
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus, .inline-search input:focus, .link-row input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 95, 162, .15); }
.links-fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.link-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 8px; }
.status-row { display: flex; align-items: center; gap: 14px; }
.settings-link { display: block; margin-bottom: var(--gap); }
.settings-link:hover { border-color: rgba(255, 95, 162, .5); }
.danger-zone { border-color: rgba(255, 90, 106, .3); }
.pad > .muted:first-child { margin-top: 0; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: var(--gap); }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 12px; text-align: center; }
.stat strong { display: block; font-size: 1.4rem; font-weight: 900; }
.stat span { color: var(--muted); font-size: .8rem; }
.user-list { list-style: none; margin: 8px 0 0; padding: 0; }
.user-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.user-row:first-child { border-top: 0; }
.user-info { flex: 1 1 200px; min-width: 0; }
.user-info .block { overflow-wrap: anywhere; }
.user-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.inline-search { display: flex; gap: 8px; }
.inline-search input { flex: 1; min-width: 0; padding: 8px 14px; }
.tag { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 8px; font-size: .72rem; font-weight: 800; vertical-align: middle; }
.tag-admin { background: rgba(139,92,246,.22); color: #cdbcff; }
.tag-ok { background: rgba(61,220,151,.15); color: #9df0c8; }

/* ---------- responsive helpers ---------- */
.mobile-only, .bottom-nav, .narrow-only { display: none; }

/* right rail goes away; bio card moves above the feed */
@media (max-width: 1180px) {
  .shell { grid-template-columns: var(--side) minmax(0, var(--col)); }
  .right-rail { display: none; }
  .narrow-only { display: block; margin-bottom: var(--gap); }
}
/* icon-only left nav */
@media (max-width: 960px) {
  :root { --side: 64px; }
  .shell { gap: 20px; }
  .side-nav-inner { align-items: center; }
  .side-nav .brand { padding: 0 0 18px; }
  .side-nav .wordmark { display: none; }
  .nav-item { padding: 12px; position: relative; }
  .nav-item span { display: none; }
  .nav-item .badge { position: absolute; top: 2px; right: 0; }
  .btn-post { width: 50px; padding: 0; }
  .btn-post span { display: none; }
  .account-chip summary { padding: 6px; }
  .account-text { display: none; }
}
/* phones */
@media (max-width: 640px) {
  :root { --r: 18px; --gap: 10px; --head-h: 58px; }
  .shell { display: block; padding: 0; }
  .side-nav { display: none; }
  .col { padding: 0 10px calc(var(--bottom-h) + 24px + env(safe-area-inset-bottom)); }
  .col-head {
    margin: 0 -10px 8px; padding: env(safe-area-inset-top) 14px 0;
    height: calc(var(--head-h) + env(safe-area-inset-top));
    background: rgba(13, 10, 18, .88);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
  }
  .mobile-only { display: inline-flex; }
  .head-right { margin-left: auto; align-items: center; }
  .desktop-title { display: none; }
  .col-title { font-size: 1.2rem; }

  .card { padding: 14px; }
  .media { margin: 12px -14px 0; }
  .media-audio { padding: 12px 14px; }
  .media-image img, .media-video video { max-height: 70vh; }
  .avatar { width: 40px; height: 40px; border-radius: 13px; }
  .act { padding: 0 12px; }
  .profile-banner { height: 120px; }
  .avatar.xl { width: 84px; height: 84px; font-size: 2.2rem; border-radius: 26px; }
  .profile-top { margin-top: -42px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .link-row { grid-template-columns: minmax(0, 1fr); padding-bottom: 6px; border-bottom: 1px dashed var(--line); }

  .fab {
    position: fixed; z-index: 25;
    right: 16px; bottom: calc(var(--bottom-h) + 14px + env(safe-area-inset-bottom));
    width: 56px; height: 56px; border-radius: 18px;
    display: grid; place-items: center;
    background: var(--grad); color: #fff;
    box-shadow: 0 8px 22px rgba(255, 95, 162, .4);
  }

  .bottom-nav {
    display: flex; position: fixed; left: 10px; right: 10px; z-index: 25;
    bottom: calc(8px + env(safe-area-inset-bottom));
    height: var(--bottom-h); padding: 0 6px;
    background: rgba(32, 25, 41, .92);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--line-2); border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,.5);
  }
  .bottom-nav a { flex: 1; display: grid; place-items: center; color: var(--muted); position: relative; }
  .bottom-nav a svg { width: 24px; height: 24px; }
  .bottom-nav a.active { color: var(--accent); }
  .bottom-nav a.active::after { content: ""; position: absolute; bottom: 9px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
  .bottom-nav .badge { position: absolute; top: 8px; left: calc(50% + 6px); }
}
@media (max-width: 360px) {
  .chip-btn .opt { display: none; }
  .act-views { display: none; }
}

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

/* ---------- search ---------- */
.search-card { padding: 12px; }
.narrow-only .search-card { margin-bottom: var(--gap); }
.search-row { display: flex; align-items: center; gap: 8px; position: relative; }
.search-icon { position: absolute; left: 12px; color: var(--muted); pointer-events: none; }
.search-row input {
  flex: 1; min-width: 0; height: 40px; padding: 0 12px 0 38px;
  background: var(--bg); color: var(--text);
  border: 1px solid var(--line-2); border-radius: 12px;
  font: inherit; font-size: 16px; outline: none;
}
.search-row input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 95, 162, .15); }
.search-row .btn { height: 40px; }
.date-filter { margin-top: 10px; }
.date-filter summary {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer; list-style: none;
  color: var(--muted); font-weight: 700; font-size: .88rem;
}
.date-filter summary::-webkit-details-marker { display: none; }
.date-filter summary:hover, .date-filter[open] summary { color: var(--accent); }
.date-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; margin: 10px 0 8px; }
.date-row label { display: flex; flex-direction: column; gap: 4px; min-width: 0; font-size: .8rem; font-weight: 800; color: var(--muted); }
.date-row input {
  width: 100%; min-width: 0; height: 40px; padding: 0 10px;
  background: var(--bg); color: var(--text); color-scheme: dark;
  border: 1px solid var(--line-2); border-radius: 12px;
  font: inherit; font-size: 16px; outline: none;
}
.date-row input:focus { border-color: var(--accent); }
.results-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: var(--gap); padding: 14px 18px; }
.results-card > div { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 420px) {
  .date-row { grid-template-columns: minmax(0, 1fr); }
  .search-row .btn { padding: 0 14px; }
}

/* ---------- profile pictures ---------- */
.avatar { overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.avatar-info { flex: 1 1 200px; min-width: 0; }
.avatar-panel .avatar.xl { border-color: var(--card); }
.avatar-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.avatar-actions .btn.uploading { opacity: .6; pointer-events: none; }
@media (max-width: 640px) {
  .avatar-panel .avatar.xl { width: 84px; height: 84px; }
}
.tag-gurt { background: linear-gradient(135deg, rgba(255,95,162,.25), rgba(139,92,246,.25)); color: #ffc2de; }
.forgot-link { align-self: flex-end; font-size: .85rem; font-weight: 700; color: var(--accent); margin-top: 2px; }
.forgot-link:hover { text-decoration: underline; }
.reset-card { margin-bottom: var(--gap); border-color: rgba(61, 220, 151, .4); }
.reset-card p { margin: 4px 0 10px; }
.copy-row { display: flex; gap: 8px; }
.copy-row input {
  flex: 1; min-width: 0; height: 36px; padding: 0 12px;
  background: var(--bg); color: var(--text); border: 1px solid var(--line-2); border-radius: 12px;
  font: inherit; font-size: 14px;
}
.center-block { display: grid; }

/* Role colors: Gurt = purple, Admin = pink */
.tag-gurt { background: rgba(139, 92, 246, .22); color: #c9b5ff; border: 1px solid rgba(139, 92, 246, .45); }
.tag-admin { background: rgba(255, 95, 162, .18); color: #ffb3d4; border: 1px solid rgba(255, 95, 162, .45); }

/* ---------- posts copied from socials ---------- */
.media-embed { aspect-ratio: 16 / 9; }
.media-embed iframe { width: 100%; height: 100%; border: 0; display: block; }
.source-badge {
  display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0;
  padding: 3px 9px; border-radius: 999px; font-size: .75rem; font-weight: 800;
  background: var(--card-2); border: 1px solid var(--line-2); color: var(--muted);
}
.source-badge:hover { color: var(--text); border-color: rgba(255, 95, 162, .5); }
.post-head .source-badge + .post-del, .post-head .source-badge { margin-left: auto; }
.post-head .source-badge + .post-del { margin-left: 4px; }
.source-x { color: #e7e9ea; }
.source-instagram { color: #ff8fb8; }
.source-facebook { color: #8fb4ff; }
.source-twitch { color: #c4a6ff; }
.source-youtube { color: #ff8a8a; }

/* ---------- linked socials page ---------- */
.socials-intro h2 { margin-bottom: 4px; }
.intro-points { margin: 10px 0 0; padding-left: 18px; }
.intro-points li + li { margin-top: 2px; }
.social-head { display: flex; align-items: center; gap: 12px; }
.social-icon { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; flex-shrink: 0; color: #fff; }
.social-x .social-icon { background: #111; border: 1px solid #333; }
.social-instagram .social-icon { background: linear-gradient(45deg, #f9ce34, #ee2a7b 50%, #6228d7); }
.social-facebook .social-icon { background: #1877f2; }
.social-twitch .social-icon { background: #9146ff; }
.social-youtube .social-icon { background: #ff0033; }
.social-title { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.social-title h2 { margin: 0; font-size: 1.1rem; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .72rem; font-weight: 800; }
.pill-off { background: var(--card-2); color: var(--muted); }
.pill-ok { background: rgba(61, 220, 151, .15); color: #9df0c8; }
.pill-err { background: rgba(255, 90, 106, .15); color: #ffb8bf; }
.how-btn[aria-expanded="true"] { background: rgba(255, 95, 162, .12); border-color: rgba(255, 95, 162, .5); color: #ffc2de; }
.social-blurb { margin: 10px 0 0; }
.how-panel {
  margin-top: 14px; padding: 16px; border-radius: 16px;
  background: var(--card-2); border: 1px solid var(--line-2);
  font-size: .95rem; line-height: 1.55;
}
.how-panel h3 { margin: 0 0 6px; font-size: 1.05rem; font-weight: 900; }
.how-panel h4 { margin: 16px 0 6px; font-size: .9rem; font-weight: 900; color: var(--accent); text-transform: uppercase; letter-spacing: .04em; }
.how-panel p { margin: 0 0 8px; }
.how-panel ul, .how-panel ol { margin: 0; padding-left: 20px; }
.how-panel li { margin: 4px 0; overflow-wrap: anywhere; }
.how-panel a { color: var(--accent); font-weight: 700; }
.how-panel code { font-size: .85em; padding: 1px 5px; border-radius: 6px; background: var(--bg); overflow-wrap: anywhere; }
.how-steps > li { padding-left: 4px; margin: 10px 0; }
.how-steps > li::marker { color: var(--accent); font-weight: 900; }
.social-status { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line-2); }
.social-status .flash { margin: 10px 0 0; }
.social-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.social-form-wrap { margin-top: 14px; }
.social-form-wrap > summary {
  cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 6px;
  font-weight: 800; color: var(--accent);
}
.social-form-wrap > summary::-webkit-details-marker { display: none; }
.social-form-wrap > summary::before { content: "▸"; transition: transform .15s; }
.social-form-wrap[open] > summary::before { transform: rotate(90deg); }
.social-form { margin-top: 12px; }
.social-form-wrap .flash { margin: 12px 0 0; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: .92rem; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); flex-shrink: 0; }
