/* Lumen. Light and dark follow the device unless picked in Settings (data-theme). The in-game
   phone (html.embed) always gets the phone layout. */

:root {
  --bg: #ffffff;
  --bg-2: #f6f6f8;
  --bg-3: #ececf1;
  --card: #ffffff;
  --fg: #0f1115;
  --fg-2: #4d5260;
  --fg-3: #858a99;
  --line: #e7e8ee;
  --accent: #ff2f6d;
  --accent-2: #7b5cff;
  --accent-fg: #ffffff;
  --link: #3b6cff;
  --red: #f4245e;
  --green: #00b37e;
  --blue: #2f8cff;
  --purple: #8b5cf6;
  --verified: #2f8cff;
  --grad: linear-gradient(45deg, #ffb347 0%, #ff3d77 50%, #7b5cff 100%);
  --shadow: 0 12px 40px rgba(15, 17, 21, .14), 0 2px 6px rgba(15, 17, 21, .06);
  --radius: 16px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000; --bg-2: #101114; --bg-3: #1c1d22; --card: #0c0d10;
    --fg: #f3f4f7; --fg-2: #b4b8c4; --fg-3: #7d8291; --line: #23252c;
    --link: #6f95ff; --shadow: 0 12px 40px rgba(0, 0, 0, .6), 0 2px 6px rgba(0, 0, 0, .4);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #000000; --bg-2: #101114; --bg-3: #1c1d22; --card: #0c0d10;
  --fg: #f3f4f7; --fg-2: #b4b8c4; --fg-3: #7d8291; --line: #23252c;
  --link: #6f95ff; --shadow: 0 12px 40px rgba(0, 0, 0, .6), 0 2px 6px rgba(0, 0, 0, .4);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.42 var(--font); -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
img, video { display: block; max-width: 100%; }
input, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.grow { flex: 1; }
.muted { color: var(--fg-3); }
.small { font-size: 13px; }
.tc { text-align: center; }
.pad { padding: 24px 16px; }
.pad-s { padding: 8px 16px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.stack { display: flex; flex-direction: column; gap: 12px; }

/* icons */
.ic { width: 24px; height: 24px; flex: none; }
.ic.tiny { width: 15px; height: 15px; color: var(--fg-3); }
.badge { width: 17px; height: 17px; color: var(--verified); flex: none; vertical-align: -3px; margin-left: 3px; }

/* ------------------------------------------------------------------ buttons, inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 18px; border-radius: 999px;
  background: var(--fg); color: var(--bg); font-weight: 700; white-space: nowrap; transition: transform .08s, opacity .15s, background .15s; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.sm { height: 32px; padding: 0 14px; font-size: 14px; }
.btn.ghost { background: transparent; color: var(--fg); box-shadow: inset 0 0 0 1px var(--line); }
.btn.ghost:hover { background: var(--bg-2); }
.btn.danger { background: var(--red); color: #fff; }
.btn.ghost.danger, .btn.danger.wide { background: transparent; color: var(--red); box-shadow: inset 0 0 0 1px var(--line); }
.btn.wide { width: 100%; height: 44px; }
.btn .ic { width: 18px; height: 18px; }
.icon-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; color: var(--fg); flex: none; }
.icon-btn:hover { background: var(--bg-2); }
.icon-btn.sm { width: 32px; height: 32px; color: var(--fg-3); }
.icon-btn.sm .ic { width: 18px; height: 18px; }
.icon-btn.accent { color: var(--accent); }
.icon-btn.accent b { font-size: 19px; }
.icon-btn.ring { box-shadow: inset 0 0 0 1px var(--line); width: 32px; height: 32px; }
.icon-btn.ring .ic { width: 18px; height: 18px; }
.input { width: 100%; height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-2); outline: none; transition: border .15s, background .15s; }
.input:focus { border-color: var(--fg-3); background: var(--bg); }
.input.area { height: auto; padding: 10px 14px; resize: vertical; min-height: 64px; }
.search-wrap { position: relative; display: flex; align-items: center; flex: 1; }
.search-wrap > .ic { position: absolute; left: 14px; width: 18px; height: 18px; color: var(--fg-3); pointer-events: none; }
.input.search { padding-left: 40px; border-radius: 999px; height: 42px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field .label { font-weight: 600; font-size: 13px; color: var(--fg-2); }
.hint { font-size: 12.5px; color: var(--fg-3); }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--fg-2); }
.switch-row { display: flex; align-items: center; gap: 12px; justify-content: space-between; padding: 6px 0; }
.switch-row > div { display: flex; flex-direction: column; }
.switch-row input, .check input { width: 20px; height: 20px; accent-color: var(--accent); }
.form-error { color: var(--red); font-size: 14px; margin: 0; }
.seg { display: flex; gap: 6px; background: var(--bg-2); padding: 4px; border-radius: 12px; }
.seg-btn { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; height: 36px; border-radius: 9px; color: var(--fg-2); font-weight: 600; }
.seg-btn .ic { width: 17px; height: 17px; }
.seg-btn.on { background: var(--bg); color: var(--fg); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 10px 16px; scrollbar-width: none; }
.chip { flex: none; height: 32px; padding: 0 14px; border-radius: 999px; background: var(--bg-2); font-weight: 600; font-size: 14px; }
.pill { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 6px; background: var(--bg-3); color: var(--fg-2); font-size: 12px; font-weight: 600; }
.pill.staff { background: color-mix(in srgb, var(--accent) 15%, transparent); color: var(--accent); }

/* avatars */
.avatar { position: relative; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; overflow: hidden; flex: none; background: var(--bg-3); color: #fff; font-weight: 700; user-select: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.ring { overflow: visible; background: var(--grad) !important; padding: 3px; }
.avatar.ring::before { content: ""; position: absolute; inset: 2px; border-radius: 50%; background: var(--bg); }
.avatar.ring img, .avatar.ring .letter { position: relative; border-radius: 50%; width: calc(100% - 4px); height: calc(100% - 4px); margin: 2px; }
.avatar.ring .letter { display: flex; align-items: center; justify-content: center; background: var(--bg-3); color: var(--fg); }
.avatar.ring.seen { background: var(--line) !important; }

/* ------------------------------------------------------------------ layout */
.layout { display: grid; grid-template-columns: 250px minmax(0, 620px) 340px; justify-content: center; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 2px; padding: 14px 12px 18px; border-right: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; padding: 10px 12px 18px; }
.brand img { width: 34px; height: 34px; }
.wordmark { font-weight: 800; font-size: 26px; letter-spacing: -.04em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav-item { display: flex; align-items: center; gap: 16px; padding: 11px 12px; border-radius: 12px; font-size: 17px; color: var(--fg); }
.nav-item:hover { background: var(--bg-2); }
.nav-item.on { font-weight: 800; }
.nav-item.on .ic { stroke-width: 2.6; }
.nav-ic { position: relative; display: flex; }
.nav-badge { position: absolute; top: -6px; right: -9px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px var(--bg); }
.nav-badge.dot { min-width: 9px; width: 9px; height: 9px; padding: 0; top: 6px; right: 6px; }
.post-btn { margin: 14px 4px 0; height: 50px; font-size: 16px; background: var(--grad); color: #fff; }
.post-btn .ic { display: none; }
.me-chip { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 999px; }
.me-chip:hover { background: var(--bg-2); }
.me-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.me-text b, .me-text span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.main-col { border-right: 1px solid var(--line); min-width: 0; }
.view { min-height: 100vh; padding-bottom: 40px; }
.rail { position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 12px 20px; display: flex; flex-direction: column; gap: 14px; scrollbar-width: none; }
.card { background: var(--bg-2); border-radius: var(--radius); padding: 14px 0 6px; }
.card > h3 { margin: 0 16px 8px; font-size: 19px; font-weight: 800; }
.trend { display: flex; flex-direction: column; padding: 8px 16px; }
.trend:hover { background: var(--bg-3); }
.topbar, .tabbar { display: none; }

.page-head { display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 6px 16px; }
.page-head h1 { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.page-head > div { display: flex; flex-direction: column; }
.sticky, .sticky-tabs { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px); }
.sticky-tabs { top: 54px; border-bottom: 1px solid var(--line); }
.tabs { display: flex; }
.tab { flex: 1; position: relative; height: 52px; color: var(--fg-3); font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 6px; }
.tab:hover { background: var(--bg-2); }
.tab.on { color: var(--fg); font-weight: 700; }
.tab.on::after { content: ""; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 56px; height: 4px; border-radius: 4px; background: var(--grad); }
.tabs.icons .ic { width: 20px; height: 20px; }
.section-title { margin: 18px 16px 6px; font-size: 18px; }
.boot { display: flex; align-items: center; justify-content: center; height: 100vh; }
.boot img { width: 72px; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(.9); opacity: .7; } }
.spinner { width: 28px; height: 28px; margin: 28px auto; border-radius: 50%; border: 3px solid var(--bg-3); border-top-color: var(--accent); animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.sentinel { min-height: 40px; }
.empty { text-align: center; padding: 48px 24px; color: var(--fg-2); }
.empty-ic { display: inline-flex; width: 72px; height: 72px; align-items: center; justify-content: center; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--fg); color: var(--fg); margin-bottom: 8px; }
.empty-ic .ic { width: 34px; height: 34px; }
.empty h3 { margin: 6px 0; color: var(--fg); font-size: 20px; }
.empty p { margin: 0 auto; max-width: 320px; }

/* ------------------------------------------------------------------ stories tray, composer prompt */
.story-tray { display: flex; gap: 14px; overflow-x: auto; padding: 14px 16px 10px; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.story-tray::-webkit-scrollbar, .chips::-webkit-scrollbar { display: none; }
.story-item { display: flex; flex-direction: column; align-items: center; gap: 5px; width: 70px; flex: none; }
.story-btn { position: relative; }
.story-name { font-size: 12px; max-width: 70px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fg-2); }
.story-add { position: absolute; right: -2px; bottom: -2px; width: 22px; height: 22px; border-radius: 50%; background: var(--link); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 3px var(--bg); }
.story-add .ic { width: 14px; height: 14px; }
.composer-prompt { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); cursor: text; color: var(--fg-3); font-size: 17px; }
.composer-prompt > span:nth-child(2) { flex: 1; }
.composer-prompt.reply { font-size: 15px; }
.fresh-pill { position: sticky; top: 112px; z-index: 25; display: flex; align-items: center; gap: 6px; margin: 8px auto -44px; height: 36px; padding: 0 16px; border-radius: 999px; background: var(--grad); color: #fff; font-weight: 700; box-shadow: var(--shadow); }
.fresh-pill .ic { width: 16px; height: 16px; transform: rotate(90deg); }
.suggest-box .user-row { padding: 8px 16px; }

/* ------------------------------------------------------------------ posts */
.feed { display: flex; flex-direction: column; }
.post { display: flex; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background .15s; }
.post:hover { background: color-mix(in srgb, var(--bg-2) 60%, transparent); }
.post.detail { cursor: default; }
.post.detail:hover { background: none; }
.post.gone { cursor: default; padding: 16px; }
.post-side { display: flex; flex-direction: column; align-items: center; }
.thread-line { flex: 1; width: 2px; background: var(--line); margin-top: 4px; }
.post-body { flex: 1; min-width: 0; }
.post-head { display: flex; align-items: center; gap: 4px; min-width: 0; line-height: 1.2; }
.nameline { display: inline-flex; align-items: center; gap: 4px; min-width: 0; overflow: hidden; }
.nameline .name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nameline .name:hover { text-decoration: underline; }
.handle { color: var(--fg-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dot { color: var(--fg-3); }
.time { color: var(--fg-3); white-space: nowrap; }
.time:hover { text-decoration: underline; }
.reposted { display: flex; align-items: center; gap: 6px; margin: -2px 0 4px; color: var(--fg-3); font-size: 13px; font-weight: 600; }
.reposted .ic { width: 15px; height: 15px; }
.replying { color: var(--fg-3); font-size: 14px; margin-top: 2px; }
.text { margin-top: 4px; white-space: pre-wrap; overflow-wrap: anywhere; }
.text.big { font-size: 18px; line-height: 1.45; margin-top: 10px; }
.text.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mention, .tag, .ext { color: var(--link); }
.mention:hover, .tag:hover, .ext:hover { text-decoration: underline; }
.media { display: grid; gap: 2px; margin-top: 10px; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--bg-2); }
.media.n1 { grid-template-columns: 1fr; }
.media.n2 { grid-template-columns: 1fr 1fr; aspect-ratio: 16 / 9; }
.media.n3 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; aspect-ratio: 16 / 9; }
.media.n3 .cell:first-child { grid-row: span 2; }
.media.n4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; aspect-ratio: 16 / 9; }
.media .cell { position: relative; overflow: hidden; cursor: zoom-in; min-height: 0; }
.media.n1 .cell img { width: 100%; max-height: 560px; object-fit: cover; }
.media:not(.n1) .cell img, .media:not(.n1) .cell video { width: 100%; height: 100%; object-fit: cover; }
.media .cell.video { cursor: default; background: #000; }
.media.n1 .cell.video video { width: 100%; max-height: 560px; }
.media .more { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.5); color: #fff; font-size: 26px; font-weight: 700; }
.burst { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; pointer-events: none; animation: burst .9s ease-out forwards; filter: drop-shadow(0 4px 18px rgba(0,0,0,.4)); }
.burst .ic { width: 96px; height: 96px; }
@keyframes burst { 0% { transform: scale(.2); opacity: 0; } 15% { transform: scale(1.15); opacity: 1; } 30% { transform: scale(.95); } 70% { opacity: 1; } 100% { transform: scale(1.1); opacity: 0; } }
.quote { margin-top: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; }
.quote:hover { background: var(--bg-2); }
.quote.gone { color: var(--fg-3); cursor: default; }
.quote-head { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.quote .media { margin-top: 8px; }
.actions { display: flex; align-items: center; gap: 2px; margin: 6px -8px -4px; max-width: 520px; }
.act { display: inline-flex; align-items: center; gap: 4px; height: 34px; padding: 0 8px; border-radius: 999px; color: var(--fg-3); font-size: 13px; min-width: 56px; transition: color .15s, background .15s; }
.act .ic { width: 19px; height: 19px; }
.act:hover { color: var(--blue); background: color-mix(in srgb, var(--blue) 10%, transparent); }
.act.on-red, .act.on-red:hover { color: var(--red); }
.act.on-red .ic { animation: pop .35s ease; }
@keyframes pop { 50% { transform: scale(1.3); } }
.act.on-green, .act.on-green:hover { color: var(--green); }
.act.on { color: var(--accent); }
.act.views { cursor: default; }
.act.views:hover { color: var(--fg-3); background: none; }
.actions .act:nth-last-child(-n+2) { min-width: 0; }
.detail-meta { margin-top: 14px; padding-bottom: 12px; color: var(--fg-3); font-size: 14px; display: flex; gap: 6px; }
.detail-meta b { color: var(--fg); }
.detail-stats { display: flex; gap: 18px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--fg-3); font-size: 14px; }
.detail-stats b { color: var(--fg); }
.post.detail .actions { justify-content: space-around; max-width: none; margin: 4px 0 0; }
.mini { display: flex; gap: 10px; padding: 10px; border-radius: 12px; background: var(--bg-2); font-size: 14px; }

/* explore grid */
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; }
.tile { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--bg-2); }
.tile img, .tile video { width: 100%; height: 100%; object-fit: cover; }
.tile-ic { position: absolute; top: 8px; right: 8px; color: #fff; filter: drop-shadow(0 1px 3px rgba(0,0,0,.6)); }
.tile-ic .ic { width: 20px; height: 20px; }
.tile-hover { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; gap: 6px; background: rgba(0,0,0,.35); color: #fff; font-weight: 700; }
.tile-hover .ic { width: 20px; height: 20px; margin-left: 10px; }
.tile:hover .tile-hover { display: flex; }

/* ------------------------------------------------------------------ profile */
.profile { border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.banner { height: 200px; background: var(--grad) center / cover no-repeat; }
.profile-top { display: flex; justify-content: space-between; align-items: flex-end; padding: 0 16px; margin-top: -52px; }
.profile-pic .avatar { box-shadow: 0 0 0 4px var(--bg); }
.profile-pic .avatar.ring { box-shadow: none; }
.profile-actions { display: flex; gap: 8px; align-items: center; padding-bottom: 4px; }
.profile-names { padding: 10px 16px 0; }
.profile-names h2 { margin: 0; font-size: 22px; font-weight: 800; display: flex; align-items: center; gap: 4px; }
.profile-names h2 .badge { width: 21px; height: 21px; }
.bio { margin: 10px 16px 0; white-space: pre-wrap; }
.profile-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 10px 16px 0; color: var(--fg-3); font-size: 14px; }
.profile-meta > * { display: inline-flex; align-items: center; gap: 4px; }
.profile-meta .ic { width: 17px; height: 17px; }
.profile-meta a { color: var(--link); }
.profile-counts { display: flex; gap: 18px; margin: 12px 16px 0; font-size: 14px; color: var(--fg-3); }
.profile-counts b { color: var(--fg); }
.profile-counts a:hover { text-decoration: underline; }
.mutuals { display: flex; align-items: center; gap: 8px; margin: 10px 16px 0; font-size: 13px; color: var(--fg-3); }
.stack-av { display: flex; }
.stack-av .avatar { box-shadow: 0 0 0 2px var(--bg); margin-right: -6px; }
.pic-preview { width: 120px; height: 56px; border-radius: 10px; background: var(--bg-3) center / cover no-repeat; flex: none; }
.pic-preview.round { width: 64px; height: 64px; border-radius: 50%; }

/* user rows */
.user-list { display: flex; flex-direction: column; }
.user-row { display: flex; align-items: center; gap: 12px; padding: 10px 16px; cursor: pointer; }
.user-row:hover { background: var(--bg-2); }
.user-row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.user-row-text .bio { font-size: 14px; color: var(--fg-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ------------------------------------------------------------------ notifications */
.notifs { display: flex; flex-direction: column; }
.notif { display: flex; align-items: center; gap: 12px; padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); }
.notif:hover { background: var(--bg-2); }
.notif.new { background: color-mix(in srgb, var(--accent) 6%, transparent); }
.notif-ic { width: 28px; display: flex; justify-content: center; }
.notif-ic.red { color: var(--red); } .notif-ic.blue { color: var(--blue); } .notif-ic.green { color: var(--green); } .notif-ic.purple { color: var(--purple); }
.notif-text { flex: 1; min-width: 0; font-size: 14.5px; }
.notif-thumb { width: 44px; height: 44px; border-radius: 6px; object-fit: cover; }
.requests { margin: 12px 16px; }

/* ------------------------------------------------------------------ messages */
.wide-view { padding-bottom: 0 !important; }
.dm-split { display: grid; grid-template-columns: 1fr; height: 100vh; }
.inbox { overflow-y: auto; }
.thread-pane { display: none; }
.dm-split.has-thread .inbox { display: none; }
.dm-split.has-thread .thread-pane { display: flex; }
.thread-pane { flex-direction: column; height: 100vh; min-height: 0; }
.thread-empty { margin: auto; }
.convo { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 16px; text-align: left; }
.convo:hover, .convo.on { background: var(--bg-2); }
.av-wrap { position: relative; display: flex; }
.online { position: absolute; right: 1px; bottom: 1px; width: 13px; height: 13px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px var(--bg); }
.convo-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.convo-top { display: flex; align-items: center; }
.convo-preview { color: var(--fg-3); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.convo.unread .convo-preview { color: var(--fg); font-weight: 600; }
.unread-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--link); }
.thread-head { border-bottom: 1px solid var(--line); }
.thread-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.thread-who > span { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.msg { max-width: 75%; align-self: flex-start; display: flex; flex-direction: column; gap: 4px; }
.msg.mine { align-self: flex-end; align-items: flex-end; }
.msg-text { padding: 9px 14px; border-radius: 20px; background: var(--bg-3); white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.mine .msg-text { background: linear-gradient(135deg, #ff3d77, #7b5cff); color: #fff; }
.msg.mine .msg-text a { color: #fff; text-decoration: underline; }
.msg .media { margin-top: 0; max-width: 280px; }
.msg-post { width: 280px; }
.msg-post .quote { margin-top: 0; background: var(--bg); }
.msg-story { display: flex; flex-direction: column; gap: 4px; }
.msg-story img, .msg-story video { width: 110px; height: 180px; object-fit: cover; border-radius: 12px; }
.seen { align-self: flex-end; font-size: 12px; color: var(--fg-3); margin-top: 2px; }
.typing { display: flex; gap: 4px; padding: 0 22px 8px; }
.typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--fg-3); animation: blink 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: .2s; } .typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 60%, 100% { opacity: .25; } 30% { opacity: 1; } }
.msg-bar { display: flex; align-items: flex-end; gap: 4px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--bg); }
.msg-field { flex: 1; display: flex; flex-direction: column; border-radius: 22px; background: var(--bg-2); padding: 4px 14px; min-width: 0; }
.msg-input { border: 0; outline: 0; background: none; resize: none; padding: 7px 0; max-height: 140px; }
.previews { display: flex; gap: 8px; flex-wrap: wrap; }
.previews:not(:empty) { margin-top: 10px; }
.previews.small:not(:empty) { margin: 6px 0 2px; }
.preview { position: relative; width: 120px; height: 120px; border-radius: 12px; overflow: hidden; background: var(--bg-3); }
.previews.small .preview { width: 64px; height: 64px; }
.preview img, .preview video, .preview-img img, .preview-img video { width: 100%; height: 100%; object-fit: cover; }
.preview-img { width: 100%; height: 100%; }
.preview-x { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; background: rgba(0,0,0,.65); color: #fff; display: flex; align-items: center; justify-content: center; }
.preview-x .ic { width: 15px; height: 15px; }
.progress { position: absolute; left: 8px; right: 8px; bottom: 8px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.4); overflow: hidden; }
.progress .bar { display: block; height: 100%; width: 0; background: #fff; transition: width .15s; }

/* ------------------------------------------------------------------ sheets, menus, toasts */
#layer { position: relative; z-index: 100; }
.backdrop { position: fixed; inset: 0; background: rgba(10, 10, 14, .55); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; opacity: 0; transition: opacity .2s; overflow-y: auto; }
.backdrop.in { opacity: 1; }
.sheet { width: 100%; max-width: 480px; background: var(--bg); border-radius: 20px; box-shadow: var(--shadow); transform: translateY(16px) scale(.98); transition: transform .22s cubic-bezier(.2,.9,.3,1.2); overflow: hidden; display: flex; flex-direction: column; max-height: 88vh; }
.sheet.wide { max-width: 600px; }
.backdrop.in .sheet { transform: none; }
.sheet-head { display: flex; align-items: center; gap: 8px; padding: 6px 10px; min-height: 54px; border-bottom: 1px solid var(--line); }
.sheet-head h2 { margin: 0; font-size: 17px; font-weight: 800; flex: 1; }
.sheet-actions { display: flex; gap: 8px; }
.sheet-body { overflow-y: auto; padding: 14px 16px 18px; }
.sheet.full { max-width: none; width: 100vw; height: 100vh; max-height: none; border-radius: 0; }
.sheet.full .sheet-body { padding: 0; flex: 1; display: flex; }
.backdrop:has(.sheet.full) { padding: 0; }
.sheet.dark { background: #000; color: #fff; }
.sheet.dark .sheet-head { border: 0; position: absolute; z-index: 5; top: 0; left: 0; }
.sheet.dark .icon-btn { color: #fff; }
.sheet.dark .icon-btn:hover { background: rgba(255,255,255,.12); }
.sheet .user-list { margin: -14px -16px -18px; }
.confirm p { margin: 4px 0 18px; font-size: 16px; }
.popmenu { position: fixed; z-index: 200; min-width: 220px; padding: 6px; border-radius: 14px; background: var(--bg); box-shadow: var(--shadow); border: 1px solid var(--line); animation: menu-in .14s ease; }
@keyframes menu-in { from { opacity: 0; transform: translateY(-4px); } }
.popitem { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 10px; font-weight: 600; text-align: left; }
.popitem:hover { background: var(--bg-2); }
.popitem .ic { width: 19px; height: 19px; }
.popitem.danger { color: var(--red); }
#toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { padding: 11px 18px; border-radius: 999px; background: var(--fg); color: var(--bg); font-weight: 600; box-shadow: var(--shadow); opacity: 0; transform: translateY(10px); transition: all .25s; max-width: 90vw; }
.toast.in { opacity: 1; transform: none; }
.toast.bad { background: var(--red); color: #fff; }
.choice-list { display: flex; flex-direction: column; }
.choice { display: flex; gap: 10px; align-items: center; padding: 10px 2px; border-bottom: 1px solid var(--line); }
.choice input { accent-color: var(--accent); width: 18px; height: 18px; }

/* composer */
.compose-sheet .sheet-body { padding: 12px 16px 12px; }
.composer { display: flex; flex-direction: column; gap: 10px; }
.compose-main { display: flex; gap: 12px; }
.compose-field { flex: 1; min-width: 0; position: relative; }
.compose-text { width: 100%; border: 0; outline: 0; resize: none; background: none; font-size: 19px; padding: 8px 0; min-height: 96px; }
.tools { display: flex; align-items: center; gap: 2px; padding-top: 10px; border-top: 1px solid var(--line); }
.counter { color: var(--fg-3); font-size: 13px; margin-right: 8px; }
.counter.warn { color: var(--red); font-weight: 700; }
.suggest { position: absolute; z-index: 10; left: 0; right: 0; top: 100%; margin-top: -40px; max-height: 260px; overflow-y: auto; background: var(--bg); border-radius: 14px; box-shadow: var(--shadow); border: 1px solid var(--line); padding: 4px; }
.suggest-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border-radius: 10px; text-align: left; }
.suggest-item.on, .suggest-item:hover { background: var(--bg-2); }
.compose-context { margin-bottom: 4px; }
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; margin: -14px -16px -18px; }
.gallery-cell { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--bg-2); }
.gallery-cell img, .gallery-cell video { width: 100%; height: 100%; object-fit: cover; }
.tag-video { position: absolute; top: 6px; right: 6px; color: #fff; }
.tag-video .ic { width: 18px; height: 18px; }

/* the media viewer */
.viewer { position: relative; flex: 1; display: flex; align-items: center; justify-content: center; }
.viewer-stage { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.viewer-stage img, .viewer-stage video { max-width: 100%; max-height: 100vh; object-fit: contain; }
.viewer-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.15); color: #fff; display: flex; align-items: center; justify-content: center; }
.viewer-nav.prev { left: 16px; }
.viewer-nav.next { right: 16px; }
.viewer-nav.next .ic { transform: rotate(180deg); }

/* stories */
.story-sheet .sheet-body { justify-content: center; background: #000; }
.story { position: relative; width: 100%; max-width: 440px; height: 100vh; display: flex; flex-direction: column; background: #111; overflow: hidden; user-select: none; touch-action: manipulation; }
.story-bars { position: absolute; z-index: 4; top: 10px; left: 10px; right: 10px; display: flex; gap: 4px; }
.story-bars .bar { flex: 1; height: 3px; border-radius: 2px; background: rgba(255,255,255,.35); overflow: hidden; }
.story-bars .fill { display: block; height: 100%; background: #fff; }
.story.paused .fill { transition: none !important; }
.story-who { position: absolute; z-index: 6; top: 22px; left: 12px; right: 6px; display: flex; align-items: center; gap: 8px; color: #fff; font-size: 14px; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.story-who .muted { color: rgba(255,255,255,.75); }
.story-who .icon-btn { color: #fff; }
.story-media { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; }
.story-media img, .story-media video { width: 100%; height: 100%; object-fit: contain; }
.story-caption { position: absolute; left: 16px; right: 16px; bottom: 90px; text-align: center; color: #fff; font-size: 17px; font-weight: 600; text-shadow: 0 2px 8px rgba(0,0,0,.7); }
.story-foot { position: absolute; z-index: 6; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 8px; padding: 12px 12px calc(14px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, rgba(0,0,0,.6)); }
.story-foot .icon-btn { color: #fff; }
.story-foot .icon-btn.on-red { color: var(--red); }
.story-foot .btn.ghost { color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.5); }
.story-reply { flex: 1; height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid rgba(255,255,255,.6); background: transparent; color: #fff; outline: 0; }
.story-reply::placeholder { color: rgba(255,255,255,.75); }
.story-zone { position: absolute; z-index: 3; top: 70px; bottom: 80px; width: 35%; }
.story-zone.prev { left: 0; } .story-zone.next { right: 0; width: 65%; }

/* settings, admin */
.settings { margin: 12px 16px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.settings h3 { margin: 12px 0 0; font-size: 16px; }
.settings-me { display: flex; align-items: center; gap: 12px; }
.settings-me > div { display: flex; flex-direction: column; }
.settings .user-list { margin: 0 -16px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; padding: 0 16px 12px; }
.stat { background: var(--bg-2); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; }
.stat b { font-size: 22px; }
.stat span { color: var(--fg-3); font-size: 13px; }
.admin-user { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.admin-user .user-row-text { cursor: pointer; min-width: 160px; }
.report { margin: 10px 16px; padding: 12px 0; }
.report-head { padding: 0 16px 6px; }
.report .row.end { padding: 6px 16px 0; }

/* sign in */
.auth { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 24px 16px; background:
  radial-gradient(1200px 600px at 10% -10%, color-mix(in srgb, #ff3d77 18%, transparent), transparent),
  radial-gradient(900px 500px at 110% 110%, color-mix(in srgb, #7b5cff 20%, transparent), transparent), var(--bg); }
.auth-card { width: 100%; max-width: 380px; padding: 30px 28px; border-radius: 24px; background: var(--bg); border: 1px solid var(--line); box-shadow: var(--shadow); }
.auth-card.switch { padding: 18px; text-align: center; box-shadow: none; }
.auth-card.switch a { color: var(--link); font-weight: 700; }
.logo-big { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.logo-big img { width: 64px; height: 64px; filter: drop-shadow(0 8px 22px color-mix(in srgb, #ff3d77 45%, transparent)); }
.logo-big .wordmark { font-size: 40px; }
.tagline { text-align: center; color: var(--fg-2); margin: 8px 0 22px; }
.auth-form { display: flex; flex-direction: column; gap: 10px; }
.auth-form .btn { margin-top: 6px; background: var(--grad); color: #fff; }

/* ------------------------------------------------------------------ narrower screens */
@media (max-width: 1240px) {
  .layout { grid-template-columns: 88px minmax(0, 620px) 320px; }
  .side { align-items: center; padding: 14px 8px; }
  .side .wordmark, .nav-label, .me-text, .post-btn span { display: none; }
  .brand { padding: 10px 0 18px; }
  .nav-item { padding: 12px; }
  .post-btn { width: 52px; height: 52px; padding: 0; margin: 14px 0 0; }
  .post-btn .ic { display: block; }
  .me-chip { padding: 6px; }
}
@media (max-width: 1000px) {
  .layout { grid-template-columns: 88px minmax(0, 640px); }
  .rail { display: none; }
}
@media (min-width: 1001px) {
  .dm-split { grid-template-columns: 340px 1fr; }
  .dm-split.has-thread .inbox { display: block; border-right: 1px solid var(--line); }
  .dm-split .thread-pane { display: flex; }
  .main-col:has(.wide-view) { grid-column: span 2; max-width: 960px; }
  .layout:has(.wide-view) .rail { display: none; }
  .only-narrow { display: none; }
}

/* phones and the in-game phone */
@media (max-width: 700px) { :root { --phone: 1; } }
@media (max-width: 700px) {
  .layout { display: block; }
  .side, .rail { display: none; }
  .main-col { border: 0; }
}
html.embed .layout { display: block; }
html.embed .side, html.embed .rail { display: none; }
html.embed .main-col { border: 0; }
@media (max-width: 700px) {
  .topbar { display: flex; }
  .tabbar { display: flex; }
}
html.embed .topbar, html.embed .tabbar { display: flex; }
.topbar { position: sticky; top: 0; z-index: 30; align-items: center; gap: 2px; height: 54px; padding: 0 8px 0 16px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px); border-bottom: 1px solid var(--line); }
.topbar .wordmark { font-size: 27px; }
.tabbar { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; height: calc(54px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); justify-content: space-around; align-items: center; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px); border-top: 1px solid var(--line); }
.tabbar .nav-item { padding: 10px 14px; }
.tabbar .nav-label { display: none; }
.tabbar .nav-item.on .avatar { box-shadow: 0 0 0 2px var(--fg); }
@media (max-width: 700px) {
  .view { padding-bottom: 80px; }
  .page-head.sticky { top: 54px; }
  .sticky-tabs { top: 54px; }
  .page-head:has(+ *) + .sticky-tabs { top: 108px; }
  .banner { height: 130px; }
  .sheet { max-width: none; border-radius: 20px 20px 0 0; margin-top: auto; max-height: 92vh; }
  .backdrop { padding: 0; align-items: flex-end; }
  .backdrop .sheet { transform: translateY(40px); }
  .composer-prompt { font-size: 15px; }
  .home-head { display: none; }
  .post { padding: 12px; gap: 10px; }
  .dm-split, .thread-pane { height: calc(100vh - 54px - 54px); }
  .fresh-pill { top: 64px; }
  #toasts { bottom: 76px; }
}
html.embed .view { padding-bottom: 80px; }
html.embed .page-head.sticky { top: 54px; }
html.embed .sticky-tabs { top: 54px; }
html.embed .banner { height: 120px; }
html.embed .sheet { max-width: none; border-radius: 20px 20px 0 0; margin-top: auto; max-height: 92vh; }
html.embed .sheet.full { border-radius: 0; max-height: none; }
html.embed .backdrop { padding: 0; align-items: flex-end; }
html.embed .post { padding: 12px; gap: 10px; }
html.embed .dm-split, html.embed .thread-pane { height: calc(100vh - 54px - 54px); }
html.embed .fresh-pill { top: 64px; }
html.embed #toasts { bottom: 76px; }
html.embed .only-narrow { display: inline-flex; }
html.embed body { font-size: 14.5px; }
/* inside the phone the page itself does not show a scroll bar */
html.embed ::-webkit-scrollbar { width: 0; height: 0; }
/* the messages page in the phone: no top bar, the thread fills it */
html.embed .main-col:has(.wide-view) .topbar { display: none; }
html.embed .wide-view .dm-split, html.embed .wide-view .thread-pane { height: calc(100vh - 54px); }
@media (max-width: 700px) {
  .main-col:has(.wide-view) .topbar { display: none; }
  .wide-view .dm-split, .wide-view .thread-pane { height: calc(100vh - 54px); }
}

/* ================================================================== the 1.1 look
   Animated story rings, glass panels, page transitions, skeletons, account switcher. */
@property --spin { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
::selection { background: color-mix(in srgb, var(--accent) 35%, transparent); }
* { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--fg-3) 40%, transparent) transparent; }
:focus-visible { outline: 2px solid color-mix(in srgb, var(--accent-2) 70%, transparent); outline-offset: 2px; border-radius: 10px; }

/* a soft glow behind everything in dark mode */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body { background:
  radial-gradient(900px 500px at 15% -10%, color-mix(in srgb, #ff3d77 10%, transparent), transparent 70%),
  radial-gradient(900px 600px at 105% 110%, color-mix(in srgb, #7b5cff 12%, transparent), transparent 70%), var(--bg); background-attachment: fixed; } }
:root[data-theme="dark"] body { background:
  radial-gradient(900px 500px at 15% -10%, color-mix(in srgb, #ff3d77 10%, transparent), transparent 70%),
  radial-gradient(900px 600px at 105% 110%, color-mix(in srgb, #7b5cff 12%, transparent), transparent 70%), var(--bg); background-attachment: fixed; }

/* the wordmark shimmers slowly */
.wordmark { background-size: 200% 100%; animation: shimmer 8s ease-in-out infinite alternate; }
@keyframes shimmer { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }

/* pages slide in */
.view.enter > * { animation: rise .38s cubic-bezier(.2, .8, .2, 1) both; }
.view.enter > *:nth-child(2) { animation-delay: .03s; } .view.enter > *:nth-child(3) { animation-delay: .06s; } .view.enter > *:nth-child(4) { animation-delay: .09s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.feed > .post { animation: rise .32s ease both; }

/* sidebar: the page you are on gets a pill with a gradient edge */
.side { background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(16px); }
.nav-item { position: relative; transition: background .15s, transform .12s; }
.nav-item:active { transform: scale(.97); }
.side .nav-item.on { background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 14%, transparent), transparent 85%); }
.side .nav-item.on::before { content: ""; position: absolute; left: 0; top: 22%; bottom: 22%; width: 3px; border-radius: 3px; background: var(--grad); }
.side .nav-item.on .nav-ic { color: var(--accent); }
.post-btn { box-shadow: 0 10px 30px -8px color-mix(in srgb, #ff3d77 60%, transparent); transition: transform .15s, box-shadow .2s, filter .2s; }
.post-btn:hover { transform: translateY(-1px); filter: brightness(1.08); box-shadow: 0 14px 34px -8px color-mix(in srgb, #7b5cff 70%, transparent); }
.me-chip { width: 100%; text-align: left; }
.me-more { margin-left: auto; color: var(--fg-3); }
.me-more .ic { width: 18px; height: 18px; }

/* story rings: unseen ones turn */
.avatar.ring:not(.seen) { background: conic-gradient(from var(--spin), #ffb347, #ff3d77, #c13584, #7b5cff, #ffb347) !important; animation: ring-spin 4s linear infinite; }
@keyframes ring-spin { to { --spin: 360deg; } }
.story-btn { transition: transform .15s; }
.story-btn:hover { transform: scale(1.05); }
.story-btn:active { transform: scale(.95); }

/* cards and posts */
.card { background: color-mix(in srgb, var(--bg-2) 85%, transparent); border: 1px solid color-mix(in srgb, var(--line) 70%, transparent); backdrop-filter: blur(12px); }
.post { transition: background .2s; }
.media { border-radius: 18px; box-shadow: 0 8px 30px -14px rgba(0,0,0,.45); }
.media .cell img { transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.media .cell:hover img { transform: scale(1.025); }
.act { transition: color .15s, background .15s, transform .1s; }
.act:active { transform: scale(.88); }
.act.on-red .ic { filter: drop-shadow(0 0 6px color-mix(in srgb, var(--red) 55%, transparent)); }
.quote { transition: background .15s, border-color .15s; }
.quote:hover { border-color: color-mix(in srgb, var(--accent-2) 45%, var(--line)); }
.tile img, .tile video { transition: transform .4s cubic-bezier(.2,.8,.2,1); }
.tile:hover img, .tile:hover video { transform: scale(1.06); }
.btn:not(.ghost):not(.danger):hover { filter: brightness(1.1); }
.btn.ghost { transition: background .15s, box-shadow .15s; }
.btn.ghost:hover { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent-2) 50%, var(--line)); }
.chip { transition: background .15s, transform .1s; }
.chip:hover { background: color-mix(in srgb, var(--accent) 14%, var(--bg-2)); }
.composer-prompt { transition: background .15s; }
.composer-prompt:hover { background: color-mix(in srgb, var(--bg-2) 60%, transparent); }

/* profile */
.banner { position: relative; height: 220px; }
.banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, color-mix(in srgb, var(--bg) 75%, transparent)); }
.profile-pic .avatar:not(.ring) { box-shadow: 0 0 0 4px var(--bg), 0 10px 30px -10px rgba(0,0,0,.5); }
.profile-counts > * { padding: 6px 12px; border-radius: 999px; background: var(--bg-2); }
.head-switch { display: inline-flex; align-items: center; gap: 4px; }
.head-switch .ic.down { width: 16px; height: 16px; transform: rotate(-90deg); color: var(--fg-3); }

/* notifications: new ones have a gradient edge */
.notif.new { position: relative; }
.notif.new::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--grad); }
.notif-ic { width: 32px; height: 32px; border-radius: 50%; align-items: center; background: color-mix(in srgb, currentColor 14%, transparent); }
.notif-ic .ic { width: 18px; height: 18px; }

/* empty states */
.empty-ic { box-shadow: none; background: var(--grad); color: #fff; box-shadow: 0 12px 34px -10px color-mix(in srgb, #ff3d77 60%, transparent); }

/* loading placeholders */
.skeletons { display: flex; flex-direction: column; }
.skel-post { display: flex; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.skel-body { flex: 1; display: flex; flex-direction: column; gap: 9px; padding-top: 4px; }
.skel { display: block; border-radius: 8px; background: linear-gradient(90deg, var(--bg-2) 0%, var(--bg-3) 40%, var(--bg-2) 80%); background-size: 300% 100%; animation: skel 1.3s ease-in-out infinite; }
.skel-av { width: 44px; height: 44px; border-radius: 50%; flex: none; }
.skel-line { height: 12px; }
.skel-line.w40 { width: 40%; } .skel-line.w70 { width: 70%; } .skel-line.w90 { width: 90%; }
.skel-media { height: 180px; border-radius: 16px; margin-top: 4px; }
@keyframes skel { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* sheets and toasts: glass */
.sheet { background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(24px) saturate(160%); border: 1px solid color-mix(in srgb, var(--line) 80%, transparent); }
.backdrop { backdrop-filter: blur(4px); }
.toast { background: color-mix(in srgb, var(--fg) 92%, transparent); backdrop-filter: blur(12px); }
.popmenu { background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(20px) saturate(160%); }

/* tab bar: the tab you are on gets a small glowing dot */
.tabbar .nav-item.on { color: var(--fg); }
.tabbar .nav-item.on::after { content: ""; position: absolute; bottom: 3px; left: 50%; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--grad); box-shadow: 0 0 8px #ff3d77; }
.topbar, .tabbar { border-image: linear-gradient(90deg, transparent, color-mix(in srgb, var(--accent-2) 30%, var(--line)), transparent) 1; }

/* the account switcher */
.acct { display: flex; flex-direction: column; gap: 14px; }
.acct-list { display: flex; flex-direction: column; gap: 4px; margin: -4px -6px 0; }
.acct-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 10px; border-radius: 16px; text-align: left; transition: background .15s, transform .1s; }
.acct-row:hover { background: var(--bg-2); }
.acct-row:active { transform: scale(.98); }
.acct-row.on { background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 12%, transparent), color-mix(in srgb, var(--accent-2) 8%, transparent)); }
.acct-row .avatar.ring { animation: none; }
.acct-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.acct-check { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--grad); color: #fff; }
.acct-check .ic { width: 15px; height: 15px; }
.acct-go { font-size: 13px; font-weight: 700; color: var(--link); }
.acct-foot { display: flex; flex-direction: column; gap: 8px; }
.acct-add { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 16px; font-weight: 700; }
.acct-add:hover { background: var(--bg-2); }
.acct-plus { width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.ghost.wide.danger { color: var(--red); }

/* sign in: drifting colour blobs */
.auth { position: relative; overflow: hidden; }
.auth-blobs { position: absolute; inset: 0; pointer-events: none; filter: blur(60px); opacity: .55; }
.auth-blobs i { position: absolute; width: 46vmax; height: 46vmax; border-radius: 50%; animation: drift 18s ease-in-out infinite alternate; }
.auth-blobs i:nth-child(1) { background: #ff3d77; left: -14vmax; top: -16vmax; }
.auth-blobs i:nth-child(2) { background: #7b5cff; right: -16vmax; bottom: -18vmax; animation-duration: 22s; }
.auth-blobs i:nth-child(3) { background: #ffb347; left: 30%; top: 60%; width: 26vmax; height: 26vmax; opacity: .6; animation-duration: 26s; }
@keyframes drift { to { transform: translate(6vmax, 4vmax) scale(1.12); } }
.auth-card { position: relative; background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(24px) saturate(150%); }
.auth-form .btn { box-shadow: 0 12px 30px -10px color-mix(in srgb, #ff3d77 70%, transparent); }
.auth-cancel { position: relative; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--fg-2); }
.auth-cancel .ic { width: 18px; height: 18px; }
.continue-box { display: flex; flex-direction: column; gap: 4px; padding: 14px; }
.acct-row.continue { padding: 6px 8px; }

/* staff: posting as the official account */
.official { margin: 12px 16px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.official-who { display: flex; gap: 12px; align-items: center; }
.official-who > div { display: flex; flex-direction: column; }

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