/* TARA Social Corner (/SocialCorner) — v2 "fun" skin.
   Token-driven: social-corner.js sets --accent / --radius / --font-* from the
   admin config (or the viewer's prefs); html[data-theme|data-layout|data-size]
   switch the rest. Modern-platform bits: @property (animated composer glow),
   <dialog> sheets, Popover API, View Transitions, field-sizing, container
   queries — each degrades gracefully where unsupported. */

@property --spin { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

:root {
  --accent: #8b5cf6;
  --accent-2: color-mix(in oklab, var(--accent), #ff5fa2 55%);
  --radius: 22px;
  --font-body: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Fredoka", "Plus Jakarta Sans", system-ui, sans-serif;
  --fs: 15px;

  --bg: #faf8ff;
  --surface: rgba(255, 255, 255, .78);
  --surface-solid: #ffffff;
  --sunken: #f2eefc;
  --line: rgba(80, 60, 140, .11);
  --text: #1c1830;
  --text-2: #5d5874;
  --text-3: #9590ab;
  --danger: #e5484d;
  --ok: #12a594;
  --shadow-sm: 0 1px 2px rgba(60, 40, 120, .06);
  --shadow: 0 1px 2px rgba(60, 40, 120, .05), 0 10px 30px -8px rgba(60, 40, 120, .14);
  --shadow-lg: 0 24px 60px -12px rgba(60, 40, 120, .3);
  --accent-soft: color-mix(in oklab, var(--accent) 12%, transparent);
  --accent-ink: color-mix(in oklab, var(--accent) 75%, #000);
  --blob-a: color-mix(in oklab, var(--accent) 40%, transparent);
  --blob-b: rgba(255, 128, 181, .32);
  --blob-c: rgba(80, 200, 255, .26);
  --sub-halo: 0 0 1px rgba(0, 0, 0, .55), 0 0 .5px rgba(0, 0, 0, .5); /* outlines pale sub name colors (gold, peach…) on light — hue untouched */
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f0d1a; --surface: rgba(30, 26, 48, .72); --surface-solid: #1c1830; --sunken: #262140;
    --line: rgba(200, 190, 255, .1); --text: #f1eefc; --text-2: #b4adcf; --text-3: #7d7699;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3); --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px -10px rgba(0, 0, 0, .55);
    --shadow-lg: 0 24px 60px -12px rgba(0, 0, 0, .7);
    --accent-ink: color-mix(in oklab, var(--accent) 60%, #fff); --sub-halo: none;
    --blob-a: color-mix(in oklab, var(--accent) 34%, transparent); --blob-b: rgba(255, 95, 162, .16); --blob-c: rgba(60, 160, 255, .14);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f0d1a; --surface: rgba(30, 26, 48, .72); --surface-solid: #1c1830; --sunken: #262140;
  --line: rgba(200, 190, 255, .1); --text: #f1eefc; --text-2: #b4adcf; --text-3: #7d7699;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3); --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px -10px rgba(0, 0, 0, .55);
  --shadow-lg: 0 24px 60px -12px rgba(0, 0, 0, .7);
  --accent-ink: color-mix(in oklab, var(--accent) 60%, #fff); --sub-halo: none;
  --blob-a: color-mix(in oklab, var(--accent) 34%, transparent); --blob-b: rgba(255, 95, 162, .16); --blob-c: rgba(60, 160, 255, .14);
  color-scheme: dark;
}
:root[data-size="s"] { --fs: 14px; }
:root[data-size="l"] { --fs: 17px; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0; min-height: 100dvh; background: var(--bg); color: var(--text); font-family: var(--font-body);
  font-size: var(--fs); line-height: 1.55; -webkit-font-smoothing: antialiased;
  padding-bottom: calc(80px + env(safe-area-inset-bottom));
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { color: var(--accent-ink); }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; }
::selection { background: color-mix(in oklab, var(--accent) 30%, transparent); }

/* ── Aurora background (pure CSS, pauses for reduced motion / hidden tab) ── */
.sc-aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.sc-aurora i { position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%; filter: blur(70px); opacity: .9; animation: sc-drift 28s ease-in-out infinite alternate; }
.sc-aurora i:nth-child(1) { background: var(--blob-a); top: -30vmax; left: -15vmax; }
.sc-aurora i:nth-child(2) { background: var(--blob-b); top: -25vmax; right: -25vmax; animation-delay: -9s; }
.sc-aurora i:nth-child(3) { background: var(--blob-c); bottom: -40vmax; left: 20vw; animation-delay: -18s; }
@keyframes sc-drift { to { transform: translate3d(6vmax, 5vmax, 0) scale(1.1); } }
.sc-paused .sc-aurora i { animation-play-state: paused; }

/* ── Full-width shell: sticky sidebar + main ── */
:root { --gutter: clamp(16px, 2.5vw, 32px); --side-w: 320px; }
.sc-shell { max-width: 1760px; margin: 0 auto; padding: 0 var(--gutter); display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); gap: clamp(20px, 2vw, 32px); align-items: start; }
.sc-main { min-width: 0; padding-bottom: 20px; }

/* ── Top bar ── */
.sc-top { position: sticky; top: 0; z-index: 30; backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px);
  background: color-mix(in oklab, var(--bg) 70%, transparent); border-bottom: 1px solid transparent; transition: border-color .2s; }
.sc-top.is-scrolled { border-bottom-color: var(--line); }
.sc-top__in { max-width: 1760px; margin: 0 auto; padding: 0 var(--gutter); display: flex; align-items: center; gap: 10px; height: 60px; }
.sc-back { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; color: var(--text-2); }
.sc-back:hover { background: var(--sunken); color: var(--text); }
.sc-brand { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; }
.sc-brand__mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; font-size: 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 4px 12px -2px color-mix(in oklab, var(--accent) 60%, transparent); }
.sc-brand__name { font-family: var(--font-display); font-weight: 600; font-size: 19px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-top__tools { display: flex; gap: 4px; align-items: center; }
.sc-me { margin-left: 6px; display: inline-flex; }

/* ── Sidebar (profile + TaraChat friends) ── */
.sc-side { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 16px; max-height: calc(100dvh - 92px); padding: 16px 0 0; }
.sc-profile { flex: none; overflow: hidden; padding: 0; }
.sc-profile__banner { height: 74px; background: linear-gradient(120deg, var(--accent), var(--accent-2) 60%, #ffb648);
  background-size: 200% 100%; animation: sc-sheen 12s ease-in-out infinite alternate; }
@keyframes sc-sheen { to { background-position: 100% 0; } }
.sc-paused .sc-profile__banner { animation-play-state: paused; }
.sc-profile__body { padding: 0 18px 18px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.sc-profile__ava { margin-top: -38px; }
.sc-profile__ava .sc-ava { --size: 76px; }
.sc-profile__ava .sc-ava__img { box-shadow: 0 0 0 4px var(--surface-solid), var(--shadow); }
.sc-profile__ava .sc-ava[data-shape="diamond"] .sc-ava__img, .sc-profile__ava .sc-ava[data-shape="hexagon"] .sc-ava__img { box-shadow: none; }
.sc-profile__name { margin-top: 10px; font-family: var(--font-display); font-weight: 600; font-size: 1.3em; line-height: 1.2; overflow-wrap: anywhere; }
.sc-profile__name small { display: block; font-family: var(--font-body); font-weight: 500; font-size: .62em; color: var(--text-3); }
.sc-profile__status { margin-top: 6px; font-size: .82em; color: var(--text-2); display: flex; align-items: center; justify-content: center; gap: 6px; max-width: 100%; }
.sc-profile__status span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; width: 100%; margin: 14px 0; }
.sc-stats div { background: var(--sunken); border-radius: 14px; padding: 8px 4px; }
.sc-stats dt { font-size: .68em; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; }
.sc-stats dd { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 1.3em; font-variant-numeric: tabular-nums; }
.sc-profile__acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; }
.sc-profile__acts .sc-btn { padding: 9px 10px; font-size: 13px; }

.sc-friends { flex: 1 1 auto; min-height: 220px; display: flex; flex-direction: column; padding: 14px 10px 10px; overflow: hidden; }
.sc-friends__head { display: flex; align-items: center; justify-content: space-between; padding: 0 8px 10px; }
.sc-friends__head h2 { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 1.15em; }
.sc-online-chip { font-size: .74em; font-weight: 700; color: var(--ok); background: color-mix(in oklab, var(--ok) 13%, transparent); border-radius: 999px; padding: 2px 9px; }
.sc-search { display: flex; align-items: center; gap: 8px; margin: 0 6px 8px; padding: 0 12px; height: 38px; border-radius: 12px; background: var(--sunken); color: var(--text-3); }
.sc-search svg { width: 16px; height: 16px; }
.sc-search input { flex: 1; min-width: 0; border: 0; background: transparent; outline: 0; font-size: .9em; color: var(--text); }
.sc-search:focus-within { box-shadow: 0 0 0 2px var(--accent); }
.sc-friends__list { list-style: none; margin: 0; padding: 0 2px; overflow-y: auto; flex: 1; overscroll-behavior: contain; scrollbar-width: thin; }
.sc-friends__group { font-size: .7em; font-weight: 800; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; padding: 10px 8px 4px; }
.sc-friend { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: transparent; text-align: left; padding: 7px 8px; border-radius: 14px; transition: background .15s; }
.sc-friend:hover { background: var(--sunken); }
.sc-friend[aria-pressed="true"] { background: var(--accent-soft); }
.sc-friend.is-offline .sc-ava__img { filter: grayscale(.55); opacity: .75; }
.sc-friend__txt { flex: 1; min-width: 0; line-height: 1.25; }
.sc-friend__name { display: block; font-weight: 700; font-size: .9em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-friend__sub { display: block; font-size: .76em; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-friend__new { flex: none; font-size: .7em; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-radius: 999px; padding: 2px 8px; }
.sc-friends__empty { padding: 18px 10px; text-align: center; font-size: .86em; color: var(--text-3); }
.sc-friends__more { display: block; text-align: center; font-size: .8em; font-weight: 700; padding: 10px 0 2px; text-decoration: none; color: var(--accent-ink); }
.sc-friends__more:hover { text-decoration: underline; }

/* Presence dot on avatars (sidebar) */
.sc-pdot { position: absolute; right: 0; bottom: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--text-3); box-shadow: 0 0 0 2.5px var(--surface-solid); }
.sc-pdot[data-s="online"] { background: #22c55e; }
.sc-pdot[data-s="away"] { background: #f59e0b; }
.sc-pdot[data-s="dnd"] { background: #ef4444; }
.sc-pdot--inline { position: static; display: inline-block; width: 9px; height: 9px; box-shadow: none; flex: none; }

/* ── User page hero (?u=<id>): cover, avatar, bio, stats ── */
.sc-page { overflow: hidden; margin: 16px 0 18px; padding: 0; animation: sc-rise .35s ease both; }
.sc-page__cover { height: clamp(130px, 22vw, 240px); background: linear-gradient(120deg, var(--accent), var(--accent-2) 60%, #ffb648) center / cover no-repeat; }
.sc-page__body { padding: 0 20px 18px; display: flex; flex-direction: column; gap: 10px; }
.sc-page__top { display: flex; align-items: flex-end; gap: 14px; margin-top: -44px; flex-wrap: wrap; }
.sc-ava--page { --size: 104px; }
.sc-ava--page .sc-ava__img { box-shadow: 0 0 0 5px var(--surface-solid), var(--shadow); }
.sc-ava--page[data-shape="diamond"] .sc-ava__img, .sc-ava--page[data-shape="hexagon"] .sc-ava__img { box-shadow: none; }
.sc-page__id { flex: 1; min-width: 160px; padding-bottom: 4px; }
.sc-page__id, .sc-page__acts { margin-top: 50px; } /* only the avatar overlaps the cover */
.sc-page__name { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: clamp(1.5em, 3.4vw, 2em); line-height: 1.1; overflow-wrap: anywhere; }
.sc-page__sub { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .84em; color: var(--text-3); font-weight: 600; margin-top: 4px; }
.sc-page__pres { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); }
.sc-page__acts { display: flex; gap: 6px; align-items: center; padding-bottom: 4px; }
.sc-page__bio { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 1.02em; }
.sc-page__bio.is-empty { color: var(--text-3); font-style: italic; }
.sc-page__stats { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .9em; color: var(--text-2); }
.sc-page__stats b { font-family: var(--font-display); font-weight: 600; color: var(--text); font-size: 1.15em; }
@media (max-width: 560px) {
  .sc-page__body { padding: 0 14px 14px; }
  .sc-ava--page { --size: 84px; }
  .sc-page__top { margin-top: -36px; }
  .sc-page__id, .sc-page__acts { margin-top: 42px; }
  .sc-page__top .sc-page__id { margin-top: 0; flex-basis: 100%; order: 3; }
}

/* Page background (owner's look on their page, or mine with "everywhere") */
.sc-pagebg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; display: none; --dim: 30%; --blur: 0px; }
.has-pagebg .sc-pagebg { display: block; }
.has-pagebg .sc-aurora { display: none; }
.sc-pagebg i { position: absolute; inset: calc(var(--blur) * -2); background: center / cover no-repeat; filter: blur(var(--blur)); }
.sc-pagebg[data-fit="tile"] i { background-size: auto; background-repeat: repeat; background-position: 0 0; }
.sc-pagebg[data-fit="contain"] i { background-size: contain; background-color: var(--bg); }
.sc-pagebg::after { content: ""; position: absolute; inset: 0; background: color-mix(in oklab, var(--bg) var(--dim), transparent); }
.has-pagebg .sc-hero__tag, .has-pagebg .sc-hero h1 { text-shadow: 0 1px 12px color-mix(in oklab, var(--bg) 70%, transparent); }

/* Sidebar banner = my cover */
.sc-profile__banner.has-img { background-size: cover; background-position: center; animation: none; }
.sc-profile .sc-profile__paint { position: absolute; top: 10px; left: 10px; z-index: 1; width: 34px; height: 34px; font-size: 16px; background: rgba(0, 0, 0, .22); color: #fff; backdrop-filter: blur(6px); }
.sc-profile .sc-profile__paint:hover { background: rgba(0, 0, 0, .38); color: #fff; }
.sc-me.is-link { cursor: pointer; border-radius: 50%; }
.sc-me.is-link:hover { filter: brightness(1.08); }

/* Sidebar toggle + scrim (below 1000px the sidebar is an off-canvas panel) */
.sc-top .sc-side-toggle { position: relative; display: none; }
.sc-profile .sc-side__close { display: none; position: absolute; top: 10px; right: 10px; z-index: 1; color: #fff; background: rgba(0, 0, 0, .18); }
.sc-side__close:hover { background: rgba(0, 0, 0, .3); color: #fff; }
.sc-profile { position: relative; }
.sc-side-toggle__n { position: absolute; top: 2px; right: 0; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: #22c55e; color: #fff; font-size: 10px; font-weight: 800; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--bg); }
.sc-scrim { position: fixed; inset: 0; z-index: 39; background: rgba(15, 10, 35, .4); backdrop-filter: blur(2px); animation: sc-fade .2s ease; }
@keyframes sc-fade { from { opacity: 0; } }

@media (max-width: 1280px) { :root { --side-w: 280px; } }
@media (max-width: 999px) {
  .sc-shell { grid-template-columns: minmax(0, 1fr); }
  .sc-top .sc-side-toggle { display: inline-grid; }
  .sc-profile .sc-side__close { display: inline-grid; }
  .sc-side { position: fixed; z-index: 40; top: 0; left: 0; bottom: 0; width: min(340px, 88vw); max-height: none; padding: 14px; background: var(--bg);
    box-shadow: var(--shadow-lg); transform: translateX(-105%); visibility: hidden; transition: transform .3s cubic-bezier(.2, .9, .3, 1), visibility 0s .3s; overflow-y: auto; }
  .sc-side.is-open { transform: none; visibility: visible; transition: transform .3s cubic-bezier(.2, .9, .3, 1); }
  .sc-friends { min-height: 320px; flex: none; }
  .sc-friends__list { overflow: visible; }
}

/* ── Buttons ── */
.sc-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 999px; padding: 10px 18px;
  font-weight: 700; font-size: 14px; white-space: nowrap; transition: transform .15s cubic-bezier(.3, 1.6, .5, 1), filter .15s, background .15s, opacity .15s; }
.sc-btn:active { transform: scale(.94); }
.sc-btn--brand { color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 6px 18px -6px color-mix(in oklab, var(--accent) 80%, transparent), inset 0 1px 0 rgba(255, 255, 255, .25); }
.sc-btn--brand:hover { filter: brightness(1.08) saturate(1.1); }
.sc-btn--brand:disabled { opacity: .45; cursor: default; filter: grayscale(.3); box-shadow: none; }
.sc-btn--soft { background: var(--sunken); color: var(--text); }
.sc-btn--soft:hover { background: color-mix(in oklab, var(--sunken), var(--text) 6%); }
.sc-wide { width: 100%; }
.sc-icon { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; border: 0; background: transparent; color: var(--text-2); font-size: 15px; }
.sc-icon:hover { background: var(--sunken); color: var(--text); }

/* ── Avatars (match TaraChat's avatar_shape) ── */
.sc-ava { --h: 260; --size: 44px; position: relative; display: inline-block; vertical-align: middle; flex: none; width: var(--size); height: var(--size); }
.sc-ava__img { width: 100%; height: 100%; display: grid; place-items: center; overflow: hidden; border-radius: 50%;
  font-family: var(--font-display); font-weight: 600; font-size: calc(var(--size) * .38); color: #fff;
  background: linear-gradient(135deg, hsl(var(--h) 80% 66%), hsl(calc(var(--h) + 50) 78% 58%)); }
.sc-ava__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sc-ava[data-shape="rounded"] .sc-ava__img, .sc-ava[data-shape="square"] .sc-ava__img { border-radius: 28%; }
.sc-ava[data-shape="diamond"] .sc-ava__img { border-radius: 0; clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.sc-ava[data-shape="hexagon"] .sc-ava__img { border-radius: 0; clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0 50%); }
.sc-ava--anon .sc-ava__img { background: linear-gradient(135deg, hsl(var(--h) 45% 48%), hsl(calc(var(--h) + 40) 45% 38%)); font-size: calc(var(--size) * .5); }
.sc-ava__mood { position: absolute; right: -5px; bottom: -4px; font-size: calc(var(--size) * .42); line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .25)); animation: sc-pop .4s cubic-bezier(.3, 1.8, .5, 1) both; }
.sc-ava--sm { --size: 30px; }
.sc-ava--xs { --size: 32px; }

/* ── Hero ── */
.sc-hero { position: relative; padding: 26px 0 20px; text-align: center; }
.sc-hero h1 { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: clamp(34px, 8vw, 50px); line-height: 1.05; letter-spacing: -.02em;
  background: linear-gradient(110deg, var(--accent) 10%, var(--accent-2) 60%, #ffb648); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sc-hero__tag { margin: 8px 0 0; color: var(--text-2); font-size: 1.08em; font-weight: 500; }
.sc-hero__note { margin: 16px auto 0; max-width: 520px; font-size: .86em; color: var(--text-2); background: var(--surface);
  border: 1px solid var(--line); border-radius: 16px; padding: 10px 14px; backdrop-filter: blur(8px); }
.sc-hero__stickers span { position: absolute; font-size: 26px; animation: sc-float 6s ease-in-out infinite; }
.sc-hero__stickers span:nth-child(1) { left: 6%; top: 34px; }
.sc-hero__stickers span:nth-child(2) { right: 8%; top: 22px; animation-delay: -2s; font-size: 22px; }
.sc-hero__stickers span:nth-child(3) { right: 16%; top: 96px; animation-delay: -4s; font-size: 18px; }
@keyframes sc-float { 50% { transform: translateY(-8px) rotate(8deg); } }
.sc-paused .sc-hero__stickers span { animation-play-state: paused; }

/* ── Glass cards ── */
.sc-card, .sc-compose { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3); }

/* Composer — animated gradient ring while focused (@property --spin) */
.sc-compose { position: relative; padding: 16px; margin-bottom: 22px; display: flex; flex-direction: column; gap: 12px; isolation: isolate; }
.sc-compose::before { content: ""; position: absolute; inset: -1.5px; z-index: -1; border-radius: inherit; padding: 1.5px; opacity: 0; transition: opacity .25s;
  background: conic-gradient(from var(--spin), var(--accent), var(--accent-2), #ffb648, var(--accent));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: sc-spin 4s linear infinite paused; }
.sc-compose:focus-within::before { opacity: 1; animation-play-state: running; }
@keyframes sc-spin { to { --spin: 360deg; } }
.sc-compose__row { display: flex; gap: 12px; align-items: flex-start; }
.sc-compose__ava { display: block; flex: none; }
.sc-compose__main { flex: 1; min-width: 0; }
.sc-compose__who { font-size: .82em; color: var(--text-3); font-weight: 600; margin: 2px 0 4px; }
.sc-compose__who b { color: var(--text); }
.sc-compose__who .sc-anon-badge { color: var(--accent-ink); }
.sc-compose textarea { display: block; width: 100%; border: 0; background: transparent; outline: 0; resize: none; padding: 2px 0;
  font-size: 1.12em; line-height: 1.5; min-height: 3lh; max-height: 14lh; field-sizing: content; }
.sc-compose textarea::placeholder { color: var(--text-3); }
.sc-compose__bar { display: flex; align-items: center; gap: 8px; padding-top: 10px; border-top: 1px dashed var(--line); }
.sc-compose__tools { display: flex; gap: 4px; flex: 1; min-width: 0; flex-wrap: wrap; }
.sc-tool { display: inline-flex; align-items: center; gap: 5px; height: 36px; min-width: 36px; justify-content: center; border: 0; border-radius: 12px;
  background: transparent; color: var(--text-2); font-size: 18px; transition: background .15s, transform .15s cubic-bezier(.3, 1.6, .5, 1); }
.sc-tool:hover { background: var(--sunken); }
.sc-tool:active { transform: scale(.9); }
.sc-tool--txt { font-size: .84em; font-weight: 650; padding: 0 10px; }
.sc-tool[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-ink); }
.sc-compose__send { display: flex; align-items: center; gap: 8px; }
.sc-ring { width: 26px; height: 26px; transform: rotate(-90deg); }
.sc-ring circle { fill: none; stroke: var(--sunken); stroke-width: 3.5; }
.sc-ring .sc-ring__val { stroke: var(--accent); stroke-dasharray: 94.25; stroke-dashoffset: 94.25; transition: stroke-dashoffset .15s, stroke .15s; }
.sc-ring.is-near .sc-ring__val { stroke: #f59e0b; }
.sc-ring.is-over .sc-ring__val { stroke: var(--danger); }
.sc-ring__left { font-size: .75em; font-weight: 700; color: var(--text-3); min-width: 2ch; font-variant-numeric: tabular-nums; }

/* Chips / segments */
.sc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sc-chips--scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 2px; margin: -2px; scroll-snap-type: x proximity; }
.sc-chips--scroll::-webkit-scrollbar { display: none; }
.sc-chip { --c: var(--accent); display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--line); background: var(--surface-solid);
  border-radius: 999px; padding: 6px 13px; font-size: .84em; font-weight: 650; color: var(--text-2); white-space: nowrap; scroll-snap-align: start;
  transition: background .15s, border-color .15s, color .15s, transform .15s cubic-bezier(.3, 1.6, .5, 1); }
.sc-chip:hover { border-color: color-mix(in oklab, var(--c) 40%, transparent); }
.sc-chip:active { transform: scale(.94); }
.sc-chip[aria-pressed="true"], .sc-chip[aria-checked="true"] { background: color-mix(in oklab, var(--c) 14%, var(--surface-solid)); border-color: var(--c); color: var(--text); }
.sc-seg { display: flex; background: var(--sunken); border-radius: 14px; padding: 4px; gap: 2px; }
.sc-seg button { flex: 1; border: 0; background: transparent; border-radius: 10px; padding: 8px 10px; font-size: .86em; font-weight: 650; color: var(--text-2); white-space: nowrap; }
.sc-seg button[aria-pressed="true"] { background: var(--surface-solid); color: var(--text); box-shadow: var(--shadow-sm); }

/* Filters */
.sc-filters { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.sc-tabs { display: flex; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 4px; backdrop-filter: blur(10px); }
.sc-tabs button { flex: 1; border: 0; background: transparent; padding: 8px 6px; border-radius: 12px; font-weight: 700; font-size: .86em; color: var(--text-3); white-space: nowrap; transition: color .15s, background .15s; }
.sc-tabs button:hover { color: var(--text); }
.sc-tabs button[aria-selected="true"] { color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 4px 12px -4px color-mix(in oklab, var(--accent) 70%, transparent); }

/* ── Feed ── */
.sc-feed { display: grid; gap: 16px; align-items: start; grid-template-columns: repeat(auto-fill, minmax(min(420px, 100%), 1fr)); }
:root[data-layout="grid"] .sc-feed { grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 14px; }
.sc-feed.is-masonry { grid-auto-rows: 1px; row-gap: 0; }
.sc-feed.is-masonry > * { align-self: start; }
.sc-feed > .sc-empty { grid-column: 1 / -1; }
:root[data-layout="compact"] .sc-feed { display: flex; flex-direction: column; gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.sc-post { container-type: inline-size; padding: 16px 16px 12px; animation: sc-rise .4s cubic-bezier(.2, .9, .3, 1.2) both; view-transition-class: post; }
@keyframes sc-rise { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.sc-post.is-fresh { animation: sc-fresh 1.6s ease-out; }
@keyframes sc-fresh { 0%, 30% { box-shadow: 0 0 0 3px var(--accent), 0 0 34px -4px color-mix(in oklab, var(--accent) 70%, transparent); } }
.sc-post.is-hidden { opacity: .6; border-style: dashed; }
:root[data-layout="compact"] .sc-post { border-radius: 0; box-shadow: none; border-width: 0 0 1px; background: transparent; backdrop-filter: none; padding: 12px 14px; }
:root[data-layout="compact"] .sc-post:last-child { border-bottom: 0; }
:root[data-layout="compact"] .sc-post .sc-ava { --size: 34px; }
.sc-post__head { display: flex; align-items: center; gap: 12px; }
.sc-post__who { flex: 1; min-width: 0; line-height: 1.3; }
.sc-post__name { display: flex; align-items: center; gap: 6px; font-weight: 700; min-width: 0; }
.sc-post__name > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-namebtn { border: 0; background: none; padding: 0; font: inherit; font-weight: 700; color: inherit; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.sc-namebtn:hover { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }
/* TaraChat name color (sub tier, else role) — exact color like chat; --sub set inline per name */
.sc-subname, .sc-namebtn.sc-subname:hover { color: var(--sub); }
.sc-subname--pale { text-shadow: var(--sub-halo); }
/* Color Studio gradient name (Rainbow / Classic / custom gradient) — --grad set inline per name.
   Static like chat's "Rainbow name" block (style.css tail); --sub stays the fallback color.
   --flow = the tier has "Animate gradient" on (Manage Services). */
.sc-gradname, .sc-namebtn.sc-gradname, .sc-namebtn.sc-gradname:hover {
  background-image: var(--grad);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.sc-gradname--flow, .sc-namebtn.sc-gradname--flow:hover { background-size: 200% 100%; animation: sc-gradname 6s linear infinite; }
@keyframes sc-gradname { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .sc-gradname--flow { animation: none; } }
.sc-badge { flex: none; font-size: .7em; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); }
.sc-badge--anon { background: var(--sunken); color: var(--text-2); }
.sc-post__meta { font-size: .78em; color: var(--text-3); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-weight: 500; }
.sc-post__meta .sc-dot::before { content: "·"; }
.sc-tag { --c: var(--accent); display: inline-flex; gap: 4px; align-items: center; font-size: .95em; font-weight: 700; padding: 1px 9px; border-radius: 999px;
  color: color-mix(in oklab, var(--c) 70%, var(--text)); background: color-mix(in oklab, var(--c) 14%, transparent); }
.sc-tag svg { width: 11px; height: 11px; stroke-width: 2.5; }
.sc-post__body { margin: 12px 0 10px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 1.04em; }
.sc-post__body--big { font-family: var(--font-display); font-weight: 500; font-size: 1.45em; line-height: 1.3; letter-spacing: -.005em; }
@container (max-width: 360px) { .sc-post__body--big { font-size: 1.25em; } }
:root[data-layout="compact"] .sc-post__body { margin: 6px 0 6px 46px; }
:root[data-layout="compact"] .sc-post__body--big { font-size: 1.15em; }
.sc-post__foot { display: flex; align-items: center; gap: 6px; }
:root[data-layout="compact"] .sc-post__foot { margin-left: 46px; }
.sc-reacts { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; min-width: 0; align-items: center; }
.sc-react { position: relative; display: inline-flex; align-items: center; gap: 5px; border: 1.5px solid var(--line); background: var(--surface-solid);
  border-radius: 999px; padding: 3px 10px 3px 8px; font-size: .86em; font-weight: 700; color: var(--text-2); font-variant-numeric: tabular-nums;
  transition: transform .2s cubic-bezier(.3, 1.8, .5, 1), background .15s, border-color .15s; }
.sc-react:hover { transform: translateY(-1px); }
.sc-react:active { transform: scale(.88); }
.sc-react[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
.sc-react .e { font-size: 1.15em; line-height: 1; }
.sc-react.is-bump { animation: sc-bump .45s cubic-bezier(.3, 1.8, .5, 1); }
@keyframes sc-bump { 40% { transform: scale(1.25) rotate(-6deg); } }
.sc-addreact { width: 32px; height: 30px; display: inline-grid; place-items: center; border: 1.5px dashed var(--line); background: transparent; border-radius: 999px; color: var(--text-3); }
.sc-addreact:hover { border-color: var(--accent); color: var(--accent-ink); }
.sc-addreact svg { width: 17px; height: 17px; }
.sc-whobtn { display: inline-flex; align-items: center; gap: 4px; border: 0; background: transparent; color: var(--text-3); font-size: .8em; font-weight: 700;
  padding: 4px 8px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.sc-whobtn:hover { background: var(--sunken); color: var(--accent-ink); }
.sc-whobtn svg { width: 16px; height: 16px; }

/* Who reacted sheet */
.sc-who__tabs { display: flex; gap: 6px; padding: 10px 18px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.sc-who__tab { flex: none; display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--line); background: var(--surface-solid); color: var(--text-2);
  border-radius: 999px; padding: 4px 12px; font-weight: 700; font-size: .88em; font-variant-numeric: tabular-nums; }
.sc-who__tab b { font-weight: 700; }
.sc-who__tab[aria-selected="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
.sc-who__body { gap: 0; padding: 8px 10px; }
.sc-who__list { list-style: none; margin: 0; padding: 0; }
.sc-who__row { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: transparent; color: inherit; text-align: left; padding: 7px 8px; border-radius: 14px; }
button.sc-who__row:hover { background: var(--sunken); }
.sc-who__txt { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; }
.sc-who__name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-who__emo { flex: none; font-size: 1.2em; }
.sc-acts { display: flex; align-items: center; gap: 2px; flex: none; margin-left: auto; }
.sc-link { border: 0; background: transparent; color: var(--text-2); font-size: .84em; font-weight: 700; padding: 6px 9px; border-radius: 10px; display: inline-flex; gap: 5px; align-items: center; }
.sc-link:hover { background: var(--sunken); color: var(--text); }
.sc-link svg { width: 17px; height: 17px; }
.sc-admin-flag { font-weight: 800; color: var(--danger); }

/* Floating emoji burst (reactions) + confetti (new post) */
.sc-fx { position: fixed; z-index: 70; pointer-events: none; font-size: 22px; line-height: 1; will-change: transform, opacity;
  animation: sc-fly .9s cubic-bezier(.2, .7, .3, 1) forwards; }
@keyframes sc-fly { to { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)) scale(.6); opacity: 0; } }
.sc-confetti { position: fixed; z-index: 70; pointer-events: none; width: 8px; height: 12px; border-radius: 2px; top: -12px;
  animation: sc-fall var(--t, 1.6s) cubic-bezier(.3, .6, .4, 1) forwards; }
@keyframes sc-fall { to { transform: translate(var(--dx), 105vh) rotate(var(--rot)); } }

/* Replies */
.sc-replies { margin-top: 10px; padding-top: 12px; border-top: 1px dashed var(--line); display: flex; flex-direction: column; gap: 10px; }
.sc-reply { display: flex; gap: 8px; animation: sc-rise .3s ease both; }
.sc-reply__bubble { background: var(--sunken); border-radius: 4px 16px 16px 16px; padding: 7px 12px 8px; min-width: 0; flex: 1; }
.sc-reply__name { font-weight: 700; font-size: .8em; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.sc-reply__name time { font-weight: 500; color: var(--text-3); }
.sc-reply__name .sc-x { margin-left: auto; border: 0; background: transparent; color: var(--text-3); font-size: 12px; padding: 0 2px; border-radius: 6px; }
.sc-reply__name .sc-x:hover { color: var(--danger); }
.sc-reply__body { font-size: .92em; white-space: pre-wrap; overflow-wrap: anywhere; }
.sc-reply-form { display: flex; gap: 6px; align-items: center; }
.sc-reply-form input[type="text"] { flex: 1; min-width: 0; border: 1.5px solid var(--line); background: var(--surface-solid); border-radius: 999px; padding: 9px 15px; outline: 0; font-size: .92em; transition: border-color .15s; }
.sc-reply-form input[type="text"]:focus { border-color: var(--accent); }
.sc-reply-form .sc-btn { padding: 9px 15px; }
.sc-reply-form .sc-tool { height: 38px; width: 38px; font-size: 17px; }

/* New posts pill / more / empty / skeleton */
.sc-newpill { position: sticky; top: 74px; z-index: 15; display: flex; margin: 0 auto 12px; border: 0; color: #fff; font-weight: 700; font-size: .85em;
  border-radius: 999px; padding: 8px 16px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: var(--shadow-lg); animation: sc-pop .4s cubic-bezier(.3, 1.8, .5, 1) both; }
@keyframes sc-pop { from { transform: scale(.5); opacity: 0; } }
.sc-more { display: flex; margin: 22px auto 0; }
.sc-empty { text-align: center; color: var(--text-2); padding: 56px 20px; background: var(--surface); border: 1.5px dashed var(--line); border-radius: var(--radius); }
.sc-empty i { display: block; font-style: normal; font-size: 46px; margin-bottom: 10px; animation: sc-float 4s ease-in-out infinite; }
.sc-empty b { display: block; font-family: var(--font-display); font-size: 1.25em; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.sc-empty a { font-weight: 700; }
.sc-skel { height: 128px; border-radius: var(--radius); background: linear-gradient(100deg, var(--surface) 30%, var(--sunken) 50%, var(--surface) 70%) 0 0 / 300% 100%; animation: sc-sk 1.3s linear infinite; }
@keyframes sc-sk { to { background-position: -150% 0; } }

/* ── Popovers (Popover API) ── */
.sc-pop { margin: 0; inset: auto; border: 1px solid var(--line); background: var(--surface-solid); color: var(--text); border-radius: 18px; box-shadow: var(--shadow-lg); padding: 6px;
  opacity: 0; transform: translateY(6px) scale(.96); transition: opacity .16s, transform .2s cubic-bezier(.3, 1.6, .5, 1), overlay .2s allow-discrete, display .2s allow-discrete; }
.sc-pop:popover-open { opacity: 1; transform: none; }
@starting-style { .sc-pop:popover-open { opacity: 0; transform: translateY(6px) scale(.96); } }
.sc-pop--emoji { display: none; gap: 2px; flex-wrap: wrap; max-width: 260px; }
.sc-pop--emoji:popover-open { display: flex; }
.sc-pop--emoji button { width: 42px; height: 42px; border: 0; background: transparent; border-radius: 12px; font-size: 24px; transition: transform .15s cubic-bezier(.3, 1.8, .5, 1), background .15s; }
.sc-pop--emoji button:hover { transform: scale(1.25); background: var(--sunken); }
.sc-pop--emoji button[aria-pressed="true"] { background: var(--accent-soft); }
.sc-pop--menu { min-width: 180px; }
.sc-pop--menu button { display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; border: 0; background: transparent; padding: 9px 12px; border-radius: 12px; font-size: .9em; font-weight: 600; }
.sc-pop--menu button:hover { background: var(--sunken); }
.sc-pop--menu .is-danger { color: var(--danger); }

/* ── Sheets (<dialog>) ── */
.sc-sheet { margin: 0 0 0 auto; height: 100dvh; max-height: none; width: min(520px, 100%); padding: 0; border: 0; background: var(--bg); color: var(--text);
  box-shadow: var(--shadow-lg); display: none; flex-direction: column; transform: translateX(40px); opacity: 0;
  transition: transform .28s cubic-bezier(.2, .9, .3, 1), opacity .2s, overlay .28s allow-discrete, display .28s allow-discrete; }
.sc-sheet[open] { display: flex; transform: none; opacity: 1; }
@starting-style { .sc-sheet[open] { transform: translateX(40px); opacity: 0; } }
.sc-sheet--small { width: min(380px, 100%); }
.sc-sheet::backdrop { background: rgba(15, 10, 35, .4); backdrop-filter: blur(3px); opacity: 0; transition: opacity .25s, overlay .28s allow-discrete, display .28s allow-discrete; }
.sc-sheet[open]::backdrop { opacity: 1; }
@starting-style { .sc-sheet[open]::backdrop { opacity: 0; } }
.sc-sheet__head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.sc-sheet__head h2 { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 21px; }
.sc-sheet__body { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 16px; overscroll-behavior: contain; }
.sc-sheet__foot { display: flex; justify-content: space-between; gap: 10px; padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.sc-hint { margin: 0; font-size: .82em; color: var(--text-3); }
.sc-field { display: flex; flex-direction: column; gap: 7px; }
.sc-field > span, .sc-field > label { font-size: .74em; font-weight: 800; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; }
.sc-field input[type="text"], .sc-field input[type="number"], .sc-field textarea, .sc-field select {
  width: 100%; border: 1.5px solid var(--line); background: var(--surface-solid); border-radius: 12px; padding: 9px 12px; outline: 0; transition: border-color .15s; }
.sc-field input:focus, .sc-field textarea:focus, .sc-field select:focus { border-color: var(--accent); }
.sc-field textarea { resize: vertical; min-height: 70px; }
.sc-field input[type="range"] { accent-color: var(--accent); }
.sc-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sc-sec { border: 1px solid var(--line); border-radius: 18px; background: var(--surface-solid); }
.sc-sec > summary { padding: 14px 16px; font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.sc-sec > summary::-webkit-details-marker { display: none; }
.sc-sec > summary::after { content: ""; width: 8px; height: 8px; border: solid var(--text-3); border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform .2s; }
.sc-sec[open] > summary::after { transform: rotate(-135deg); }
.sc-sec__body { padding: 0 16px 16px; display: flex; flex-direction: column; gap: 14px; }
.sc-toggle { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: .92em; font-weight: 600; }
.sc-switch { width: 44px; height: 26px; appearance: none; background: var(--sunken); border-radius: 999px; position: relative; cursor: pointer; transition: background .2s; flex: none; margin: 0; }
.sc-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .25s cubic-bezier(.3, 1.6, .5, 1); }
.sc-switch:checked { background: var(--accent); }
.sc-switch:checked::after { transform: translateX(18px); }
.sc-cat-row { display: grid; grid-template-columns: 52px 1fr 1fr 40px 34px; gap: 6px; align-items: center; }
.sc-cat-row input { border: 1.5px solid var(--line); background: var(--bg); border-radius: 10px; padding: 7px 9px; min-width: 0; outline: 0; }
.sc-cat-row input[type="color"] { padding: 2px; height: 36px; cursor: pointer; }
.sc-swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.sc-swatch { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--c); box-shadow: 0 0 0 2px var(--bg), 0 0 0 2px transparent; transition: box-shadow .15s, transform .15s cubic-bezier(.3, 1.8, .5, 1); }
.sc-swatch:hover { transform: scale(1.1); }
.sc-swatch[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--c, var(--text)); }
.sc-swatch--auto { --c: var(--text-3); background: conic-gradient(#8b5cf6, #ec4899, #f59e0b, #14b8a6, #8b5cf6); }

/* ── Composer media tray ── */
.sc-tray { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: thin; padding: 2px; margin: -2px 0 0 56px; }
.sc-tray__item { position: relative; flex: none; width: 96px; height: 96px; border-radius: 14px; overflow: hidden; background: var(--sunken); animation: sc-pop .3s cubic-bezier(.3, 1.8, .5, 1) both; }
.sc-tray__item img, .sc-tray__item video { width: 100%; height: 100%; object-fit: cover; display: block; }
.sc-tray__item.is-up img, .sc-tray__item.is-up video { filter: saturate(.6) brightness(.8); }
.sc-tray__x { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border: 0; border-radius: 50%; display: grid; place-items: center;
  background: rgba(0, 0, 0, .55); color: #fff; font-size: 11px; backdrop-filter: blur(4px); }
.sc-tray__x:hover { background: var(--danger); }
.sc-tray__dur { position: absolute; left: 4px; bottom: 4px; font-size: 11px; font-weight: 700; color: #fff; background: rgba(0, 0, 0, .55); border-radius: 999px; padding: 1px 7px; }
.sc-tray__prog { position: absolute; left: 6px; right: 6px; bottom: 6px; height: 5px; border-radius: 999px; background: rgba(255, 255, 255, .35); overflow: hidden; }
.sc-tray__prog i { display: block; height: 100%; width: var(--p, 0%); background: #fff; border-radius: inherit; transition: width .15s; }
.sc-tray__item:has(.sc-tray__prog) .sc-tray__dur { bottom: 16px; }
.sc-compose.is-drop { outline: 2.5px dashed var(--accent); outline-offset: 3px; }
@media (max-width: 560px) { .sc-tray { margin-left: 0; } .sc-tray__item { width: 80px; height: 80px; } }

/* ── Post photos ── */
.sc-gallery { display: grid; gap: 4px; margin: 10px 0 12px; border-radius: calc(var(--radius) * .7); overflow: hidden; }
.sc-gallery__item { position: relative; border: 0; padding: 0; background: var(--sunken); cursor: zoom-in; min-height: 0; overflow: hidden; }
.sc-gallery__item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s cubic-bezier(.2, .9, .3, 1); }
.sc-gallery__item:hover img { transform: scale(1.03); }
.sc-gallery[data-n="1"] .sc-gallery__item { aspect-ratio: var(--ar, 4 / 3); max-height: min(70vh, 620px); }
.sc-gallery[data-n="1"] .sc-gallery__item img { object-fit: contain; background: color-mix(in oklab, var(--text) 6%, transparent); }
.sc-gallery[data-n="2"] { grid-template-columns: 1fr 1fr; aspect-ratio: 2 / 1.2; }
.sc-gallery[data-n="3"] { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; aspect-ratio: 4 / 3; }
.sc-gallery[data-n="3"] .sc-gallery__item:first-child { grid-row: span 2; }
.sc-gallery[data-n="4"] { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; aspect-ratio: 1 / 1; }
.sc-gallery__more { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(10, 6, 25, .5); color: #fff; font-family: var(--font-display); font-size: 1.8em; font-weight: 600; }
:root[data-layout="compact"] .sc-gallery, :root[data-layout="compact"] .sc-reel { margin-left: 46px; max-width: 360px; }

/* ── Post reel (feed) ── */
.sc-reel { position: relative; margin: 10px 0 12px; border-radius: calc(var(--radius) * .7); overflow: hidden; background: #000;
  aspect-ratio: var(--ar, 9 / 16); max-height: min(72vh, 640px); width: 100%; }
.sc-reel video { width: 100%; height: 100%; object-fit: contain; display: block; cursor: pointer; }
.sc-reel::after { content: "▶"; position: absolute; inset: 0; margin: auto; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; padding-left: 5px;
  font-size: 24px; color: #fff; background: rgba(0, 0, 0, .45); backdrop-filter: blur(6px); pointer-events: none; transition: opacity .2s, transform .2s; }
.sc-reel.is-playing::after { opacity: 0; transform: scale(.7); }
.sc-reel__badges { position: absolute; left: 10px; top: 10px; display: flex; gap: 6px; flex-wrap: wrap; pointer-events: none; }
.sc-reel__badge, .sc-reel__ttl { font-size: 12px; font-weight: 700; color: #fff; background: rgba(0, 0, 0, .5); border-radius: 999px; padding: 3px 10px; backdrop-filter: blur(4px); }
.sc-reel__ttl.is-soon { background: rgba(255, 120, 60, .8); animation: sc-ttl-pulse 1.6s ease-in-out infinite; }
@keyframes sc-ttl-pulse { 50% { opacity: .65; } }
.sc-rslide__who .sc-reel__ttl { font-size: .78em; padding: 2px 8px; }
.sc-reel__mute, .sc-reel__open { position: absolute; bottom: 10px; width: 36px; height: 36px; border: 0; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(0, 0, 0, .5); backdrop-filter: blur(4px); font-size: 16px; }
.sc-reel__mute { right: 10px; }
.sc-reel__open { right: 52px; }
.sc-reel__mute:hover, .sc-reel__open:hover { background: rgba(0, 0, 0, .7); }
.sc-reel__mute svg { width: 18px; height: 18px; }
.sc-tabs .sc-tabs__reels { flex: 0 0 auto; padding: 8px 12px; color: var(--accent-ink); background: var(--accent-soft); }
.sc-tabs .sc-tabs__reels:hover { color: var(--accent-ink); filter: brightness(1.05); }

/* ── Photo lightbox ── */
.sc-lightbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(8, 5, 18, .94); display: none; place-items: center; touch-action: pan-y; }
.sc-lightbox[open] { display: grid; animation: sc-fade .2s ease; }
.sc-lightbox::backdrop { background: transparent; }
.sc-lightbox img { max-width: 94vw; max-height: 88dvh; object-fit: contain; border-radius: 10px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); user-select: none; -webkit-user-drag: none; }
.sc-lb-btn { position: absolute; z-index: 2; width: 46px; height: 46px; border: 0; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(255, 255, 255, .14); font-size: 26px; line-height: 1; backdrop-filter: blur(6px); }
.sc-lb-btn:hover { background: rgba(255, 255, 255, .26); }
.sc-lb-close { top: calc(14px + env(safe-area-inset-top)); right: 14px; font-size: 17px; }
.sc-lb-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.sc-lb-next { right: 14px; top: 50%; transform: translateY(-50%); }
.sc-lb-count { position: absolute; bottom: calc(18px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); color: #fff; font-weight: 700; font-size: 14px; background: rgba(0, 0, 0, .4); border-radius: 999px; padding: 4px 12px; }
.sc-lb-count:empty { display: none; }

/* ── Reels viewer ── */
.sc-reels { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #000; color: #fff; display: none; }
.sc-reels[open] { display: block; animation: sc-fade .2s ease; }
.sc-reels::backdrop { background: #000; }
.sc-reels__list { height: 100%; overflow-y: auto; scroll-snap-type: y mandatory; overscroll-behavior: contain; scrollbar-width: none; }
.sc-reels__list::-webkit-scrollbar { display: none; }
.sc-rslide { --col: min(100vw, calc(100dvh * .7)); --edge: calc((100% - var(--col)) / 2);
  position: relative; height: 100dvh; scroll-snap-align: start; scroll-snap-stop: always; display: grid; place-items: center; overflow: hidden; }
.sc-rslide video { width: 100%; height: 100%; max-width: var(--col); object-fit: contain; background: #000; cursor: pointer; }
.sc-rslide.is-paused::after { content: "▶"; position: absolute; inset: 0; margin: auto; width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; padding-left: 6px;
  font-size: 30px; background: rgba(0, 0, 0, .4); backdrop-filter: blur(6px); pointer-events: none; }
.sc-rslide__info { position: absolute; left: var(--edge); right: calc(var(--edge) + 70px); bottom: 0; padding: 60px 18px calc(22px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, rgba(0, 0, 0, .7)); pointer-events: none; }
.sc-rslide__info > * { pointer-events: auto; }
.sc-rslide__who { display: flex; align-items: center; gap: 8px; font-weight: 700; flex-wrap: wrap; }
.sc-rslide__who .sc-namebtn { color: #fff; }
.sc-rslide__who .sc-namebtn.sc-subname { color: var(--sub); }
.sc-rslide__who time { font-weight: 500; font-size: .82em; opacity: .75; }
.sc-rslide__cap { margin: 8px 0 0; max-width: 560px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .95em; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; text-shadow: 0 1px 3px rgba(0, 0, 0, .5); }
.sc-rslide__rail { position: absolute; right: max(12px, calc(var(--edge) - 66px)); bottom: calc(30px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; align-items: center; }
.sc-rbtn { width: 50px; min-height: 50px; border: 0; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 6px 0;
  background: rgba(255, 255, 255, .14); color: #fff; backdrop-filter: blur(8px); transition: transform .2s cubic-bezier(.3, 1.8, .5, 1), background .15s; }
.sc-rbtn:hover { background: rgba(255, 255, 255, .24); }
.sc-rbtn:active { transform: scale(.88); }
.sc-rbtn[aria-pressed="true"] { background: color-mix(in oklab, var(--accent) 70%, transparent); }
.sc-rbtn .e { font-size: 22px; line-height: 1; }
.sc-rbtn small { font-size: 11px; font-weight: 800; }
.sc-rbtn small:empty { display: none; }
.sc-rslide__replies { position: absolute; left: var(--edge); right: var(--edge); bottom: 0; max-height: 62%; overflow-y: auto; padding: 0 14px calc(14px + env(safe-area-inset-bottom));
  background: var(--bg); color: var(--text); border-radius: 22px 22px 0 0; transform: translateY(105%); transition: transform .3s cubic-bezier(.2, .9, .3, 1); z-index: 3; }
.sc-rslide__replies.is-open { transform: none; box-shadow: var(--shadow-lg); }
.sc-rslide__replies .sc-replies { border-top: 0; }
.sc-rslide--empty { flex-direction: column; gap: 6px; text-align: center; padding: 20px; color: #ddd; display: flex; justify-content: center; }
.sc-rslide--empty i { font-style: normal; font-size: 52px; }
.sc-rslide--empty b { font-family: var(--font-display); font-size: 1.4em; color: #fff; }
.sc-reels .sc-lb-close { z-index: 4; }

/* My page sheet bits — light backdrop so the live preview stays visible */
#sc-me-sheet::backdrop { background: rgba(15, 10, 35, .12); backdrop-filter: none; }
.sc-imgpick { display: flex; flex-direction: column; gap: 8px; }
.sc-imgpick__prev { height: 110px; border-radius: 14px; background: var(--sunken) center / cover no-repeat; display: grid; place-items: center; font-size: .84em; color: var(--text-3); border: 1.5px dashed var(--line); }
.sc-imgpick__prev[style*="background-image"] { border-style: solid; }
.sc-imgpick__prev--bg { height: 150px; }
.sc-imgpick__prev.is-busy { animation: sc-busy 1s ease-in-out infinite alternate; }
@keyframes sc-busy { to { opacity: .5; } }
.sc-imgpick__btns { display: flex; gap: 8px; }
.sc-imgpick__btns .sc-btn { padding: 8px 14px; font-size: 13px; }
.sc-range { display: flex; align-items: center; gap: 10px; }
.sc-range input { flex: 1; min-width: 0; }
.sc-range output { font-size: .82em; font-weight: 700; color: var(--text-2); min-width: 4ch; text-align: right; font-variant-numeric: tabular-nums; }
.sc-swatch--pick { padding: 0; overflow: hidden; cursor: pointer; background: conic-gradient(red, yellow, lime, cyan, blue, magenta, red); }
.sc-swatch--pick::-webkit-color-swatch-wrapper { padding: 0; opacity: 0; }
.sc-swatch--pick::-moz-color-swatch { opacity: 0; }

/* Toasts */
.sc-toasts { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column; gap: 8px; align-items: center; width: calc(100% - 32px); max-width: 420px; pointer-events: none; }
.sc-toast { background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-size: 14px; font-weight: 650; box-shadow: var(--shadow-lg); animation: sc-pop .35s cubic-bezier(.3, 1.8, .5, 1) both; }
.sc-toast.is-err { background: var(--danger); color: #fff; }

/* View Transitions (feed swaps / new posts) */
::view-transition-group(*) { animation-duration: .3s; animation-timing-function: cubic-bezier(.2, .9, .3, 1); }

@media (max-width: 560px) {
  .sc-hero { padding-top: 20px; }
  .sc-hero__stickers span:nth-child(3) { display: none; }
  .sc-tool--txt span { display: none; }
  .sc-tabs { overflow-x: auto; scrollbar-width: none; }
  .sc-tabs::-webkit-scrollbar { display: none; }
  .sc-tabs button { font-size: .8em; flex: 0 0 auto; padding: 8px 10px; }
  .sc-cat-row { grid-template-columns: 46px 1fr 40px 34px; }
  .sc-cat-row .sc-cat-key { display: none; }
  .sc-row2 { grid-template-columns: 1fr; }
  .sc-sheet { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .sc-aurora i { animation: none; }
}

/* ── Signed-out welcome (html.sc-guest, built by showWelcome()) ── */
.sc-guest .sc-shell { grid-template-columns: minmax(0, 1fr); }
.sc-guest .sc-side, .sc-guest .sc-scrim, .sc-guest .sc-hero, .sc-guest .sc-top .sc-side-toggle { display: none; }
.sc-welcome { max-width: 1120px; margin: clamp(16px, 5vh, 56px) auto 40px; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px); align-items: center; animation: sc-rise .6s cubic-bezier(.2, .9, .3, 1) both; }
@keyframes sc-rise { from { opacity: 0; transform: translateY(18px); } }
.sc-welcome__card { position: relative; padding: clamp(26px, 4vw, 44px); border-radius: calc(var(--radius) + 8px); background: var(--surface);
  border: 1px solid var(--line); box-shadow: var(--shadow-lg); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); overflow: hidden; }
.sc-welcome__card::before { content: ""; position: absolute; inset: 0 0 auto; height: 5px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), #ffb648, var(--accent)); background-size: 200% 100%; animation: sc-sheen 6s linear infinite alternate; }
.sc-welcome__kicker { display: inline-flex; align-items: center; gap: 8px; font-size: .74em; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent-ink); background: var(--accent-soft); padding: 6px 12px; border-radius: 999px; }
.sc-welcome__kicker i { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0 rgba(34, 197, 94, .6); animation: sc-ping 2s ease-out infinite; }
@keyframes sc-ping { 70%, 100% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); } }
.sc-welcome__title { margin: 16px 0 10px; font-family: var(--font-display); font-weight: 700; font-size: clamp(34px, 5.4vw, 56px); line-height: 1.02; letter-spacing: -.025em; color: var(--text); }
.sc-welcome__grad { background: linear-gradient(110deg, var(--text) 30%, var(--accent) 70%, var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sc-welcome__emo { display: inline-block; transform-origin: 70% 80%; animation: sc-wave 2.6s ease-in-out infinite; }
@keyframes sc-wave { 0%, 60%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(14deg); } 20%, 40% { transform: rotate(-8deg); } }
.sc-welcome__lead { margin: 0; color: var(--text-2); font-size: 1.06em; line-height: 1.6; max-width: 46ch; }
.sc-welcome__perks { list-style: none; margin: 22px 0 26px; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.sc-welcome__perks li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--sunken); font-weight: 650; font-size: .9em;
  transition: transform .2s cubic-bezier(.3, 1.6, .5, 1); }
.sc-welcome__perks li:hover { transform: translateY(-2px) rotate(-1deg); }
.sc-welcome__perks i { font-style: normal; display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 10px; background: var(--surface-solid); box-shadow: var(--shadow-sm); }
.sc-welcome__acts { display: flex; flex-wrap: wrap; gap: 10px; }
.sc-welcome__acts .sc-btn { padding: 14px 24px; font-size: 15px; text-decoration: none; }
.sc-welcome__go span { display: inline-block; transition: transform .2s; }
.sc-welcome__go:hover span { transform: translateX(4px); }
.sc-welcome__fine { margin: 16px 0 0; font-size: .8em; color: var(--text-3); }

.sc-welcome__art { position: relative; min-height: 440px; }
.sc-welcome__orb { position: absolute; left: 50%; top: 50%; width: 170px; height: 170px; margin: -85px 0 0 -85px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(from var(--spin), var(--accent), var(--accent-2), #ffb648, var(--accent)); animation: sc-spin 8s linear infinite;
  box-shadow: 0 30px 80px -20px color-mix(in oklab, var(--accent) 70%, transparent); }
.sc-welcome__orb span { display: grid; place-items: center; width: 138px; height: 138px; border-radius: 50%; background: var(--surface-solid); font-size: 64px;
  animation: sc-float 5s ease-in-out infinite; }
.sc-wbub { position: absolute; width: min(250px, 62%); padding: 12px 14px 10px 54px; border-radius: 20px; background: var(--surface-solid); border: 1px solid var(--line);
  box-shadow: var(--shadow); animation: sc-bob 7s ease-in-out infinite; }
.sc-wbub b { position: absolute; left: 12px; top: 12px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  font-family: var(--font-display); font-weight: 600; background: linear-gradient(135deg, hsl(var(--h) 80% 66%), hsl(calc(var(--h) + 50) 78% 58%)); }
.sc-wbub p { margin: 0; font-size: .88em; font-weight: 600; line-height: 1.4; }
.sc-wbub em { display: inline-block; margin-top: 6px; font-style: normal; font-size: .74em; font-weight: 700; color: var(--accent-ink); background: var(--accent-soft); padding: 2px 8px; border-radius: 999px; }
.sc-wbub--a { left: 0; top: 4%; transform: rotate(-4deg); }
.sc-wbub--b { right: 0; top: 50%; transform: rotate(3deg); animation-delay: -2.5s; }
.sc-wbub--c { left: 6%; bottom: 2%; transform: rotate(-2deg); animation-delay: -5s; }
@keyframes sc-bob { 50% { translate: 0 -10px; } }
.sc-wsticker { position: absolute; left: var(--x); top: var(--y); font-size: 28px; animation: sc-float 6s ease-in-out infinite; animation-delay: var(--d, 0s); }
.sc-paused .sc-welcome *, .sc-paused .sc-welcome *::before { animation-play-state: paused; }

@media (max-width: 899px) {
  .sc-welcome { grid-template-columns: minmax(0, 1fr); margin-top: 12px; }
  .sc-welcome__art { min-height: 300px; max-width: 520px; width: 100%; margin: 0 auto; }
  .sc-welcome__orb { width: 130px; height: 130px; margin: -65px 0 0 -65px; }
  .sc-welcome__orb span { width: 104px; height: 104px; font-size: 48px; }
  .sc-wbub { width: min(230px, 64%); }
}
@media (max-width: 480px) {
  .sc-welcome__art { min-height: 250px; }
  .sc-wbub--c { display: none; }
  .sc-welcome__perks { grid-template-columns: minmax(0, 1fr); }
  .sc-welcome__acts .sc-btn { flex: 1 1 100%; }
}

/* ── Cover framing (coverFrame in social-corner.js): photo layer filled around the
   focal point --cx/--cy, then zoomed by --cz around that same point ── */
.sc-page__cover, .sc-profile__banner, .sc-imgpick__prev, .sc-coved__frame { position: relative; overflow: hidden; }
.sc-coverimg { position: absolute; inset: 0; background: var(--cx, 50%) var(--cy, 50%) / cover no-repeat;
  transform: scale(var(--cz, 1)); transform-origin: var(--cx, 50%) var(--cy, 50%); pointer-events: none; }
.sc-profile__banner.has-img { animation: none; }
.sc-imgpick__prev.has-img { border-style: solid; }
.sc-imgpick__btns { flex-wrap: wrap; }

/* Cover editor dialog */
.sc-coved { width: min(960px, calc(100% - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 0; border-radius: 20px;
  background: var(--bg); color: var(--text); box-shadow: var(--shadow); flex-direction: column; overflow: hidden; }
.sc-coved[open] { display: flex; }
.sc-coved::backdrop { background: rgba(15, 10, 35, .55); backdrop-filter: blur(3px); }
.sc-coved__body { padding: 18px; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; }
.sc-coved__frame { --ar: 3.2; width: min(100%, calc(52dvh * var(--ar))); margin-inline: auto; aspect-ratio: var(--ar); border-radius: 14px; background: var(--sunken);
  cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; outline-offset: 3px;
  box-shadow: inset 0 0 0 1.5px var(--line); }
.sc-coved__frame.is-dragging { cursor: grabbing; }
.sc-coved__frame::after { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .2s;
  background: linear-gradient(to right, transparent calc(33.33% - .5px), rgba(255,255,255,.55) 0 calc(33.33% + .5px), transparent 0 calc(66.66% - .5px), rgba(255,255,255,.55) 0 calc(66.66% + .5px), transparent 0),
              linear-gradient(to bottom, transparent calc(33.33% - .5px), rgba(255,255,255,.55) 0 calc(33.33% + .5px), transparent 0 calc(66.66% - .5px), rgba(255,255,255,.55) 0 calc(66.66% + .5px), transparent 0); }
.sc-coved__frame.is-dragging::after { opacity: 1; }
.sc-coved__hint { position: absolute; left: 50%; bottom: 10px; translate: -50% 0; pointer-events: none; padding: 5px 12px; border-radius: 999px;
  background: rgba(0, 0, 0, .55); color: #fff; font-size: 12.5px; font-weight: 700; white-space: nowrap; transition: opacity .2s; }
.sc-coved__frame.is-dragging .sc-coved__hint { opacity: 0; }
.sc-coved__zoom { display: flex; align-items: center; gap: 10px; }
.sc-coved__zoom input { flex: 1; min-width: 0; }
.sc-coved__end { display: flex; gap: 10px; }

/* ── Home button (top bar): back to the default feed ── */
.sc-home { position: relative; display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px 0 9px; margin-right: 4px;
  border: 1.5px solid transparent; border-radius: 999px; cursor: pointer; color: var(--text); font: 600 14.5px/1 var(--font-display); letter-spacing: .01em;
  background: linear-gradient(var(--bg), var(--bg)) padding-box, linear-gradient(120deg, var(--accent), var(--accent-2) 55%, #ffb648) border-box;
  box-shadow: 0 4px 14px -6px color-mix(in oklab, var(--accent) 70%, transparent);
  transition: transform .18s cubic-bezier(.3, 1.6, .5, 1), box-shadow .2s; }
.sc-home::before { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .2s;
  background: linear-gradient(120deg, color-mix(in oklab, var(--accent) 16%, transparent), color-mix(in oklab, var(--accent-2) 16%, transparent)); }
.sc-home:hover { transform: translateY(-1px) scale(1.04); box-shadow: 0 8px 22px -8px color-mix(in oklab, var(--accent) 85%, transparent); }
.sc-home:hover::before, .sc-home:focus-visible::before { opacity: 1; }
.sc-home:active { transform: scale(.95); }
.sc-home:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sc-home__house { position: relative; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 9px; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.sc-home__house svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.sc-home__roof { transform-origin: 12px 8px; transition: transform .25s cubic-bezier(.3, 1.6, .5, 1); }
.sc-home__door { fill: currentColor; fill-opacity: 0; transition: fill-opacity .2s; }
.sc-home:hover .sc-home__roof { transform: translateY(-1.5px) rotate(-4deg); }
.sc-home:hover .sc-home__door { fill-opacity: .9; }
/* chimney smoke */
.sc-home__puff { position: absolute; left: 70%; top: -2px; width: 6px; height: 6px; border-radius: 50%; opacity: 0; pointer-events: none;
  background: color-mix(in oklab, var(--text-2) 55%, transparent); }
.sc-home:hover .sc-home__puff { animation: sc-home-puff 1.4s ease-out infinite; }
.sc-home:hover .sc-home__puff:nth-of-type(2) { animation-delay: .45s; }
.sc-home:hover .sc-home__puff:nth-of-type(3) { animation-delay: .9s; }
@keyframes sc-home-puff { 0% { opacity: 0; transform: translate(0, 0) scale(.4); } 20% { opacity: .9; }
  100% { opacity: 0; transform: translate(7px, -16px) scale(1.5); } }
/* "you wandered off" dot */
.sc-home__dot { position: absolute; top: -2px; right: -2px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--bg);
  background: #ffb648; transform: scale(0); transition: transform .25s cubic-bezier(.3, 1.6, .5, 1); }
.sc-home.is-away .sc-home__dot { transform: scale(1); animation: sc-home-ping 2.2s ease-out infinite; }
.sc-home.is-away .sc-home__house { animation: sc-home-wiggle 4s ease-in-out infinite; }
@keyframes sc-home-ping { 0% { box-shadow: 0 0 0 0 rgba(255, 182, 72, .7); } 70%, 100% { box-shadow: 0 0 0 7px rgba(255, 182, 72, 0); } }
@keyframes sc-home-wiggle { 0%, 88%, 100% { transform: rotate(0); } 91% { transform: rotate(-12deg); } 94% { transform: rotate(10deg); } 97% { transform: rotate(-5deg); } }
/* click: little hop */
.sc-home.is-hop .sc-home__house { animation: sc-home-hop .6s cubic-bezier(.3, 1.4, .5, 1); }
@keyframes sc-home-hop { 0% { transform: translateY(0) scale(1); } 25% { transform: translateY(2px) scale(1.15, .85); }
  55% { transform: translateY(-8px) scale(.92, 1.1) rotate(-8deg); } 80% { transform: translateY(1px) scale(1.08, .92); } 100% { transform: none; } }
.sc-paused .sc-home__dot, .sc-paused .sc-home__house { animation-play-state: paused; }
@media (max-width: 560px) {
  .sc-home { width: 38px; padding: 0; justify-content: center; margin-right: 0; }
  .sc-home__label { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .sc-home, .sc-home *, .sc-home__roof { animation: none !important; transition: none !important; }
}

/* ── Emoticons: inline TaraChat emoticons + the emoji picker ─────────────── */
.sc-emo { height: 1.5em; width: auto; max-width: 4em; vertical-align: -.35em; object-fit: contain; display: inline-block; }
.sc-emo[data-size="s"] { height: 1.25em; }
.sc-emo[data-size="l"] { height: 2em; vertical-align: -.6em; }
.sc-post__body--big .sc-emo { height: 2.2em; vertical-align: -.5em; }
.sc-react .e .sc-emo, .sc-who__tab .sc-emo, .sc-who__emo .sc-emo { height: 1.35em; vertical-align: middle; }
.sc-fx .sc-emo { height: 1.3em; }
.sc-react-pop .sc-react-more, .sc-pop--emoji .sc-react-more { font-size: 20px; color: var(--text-2); border: 1.5px dashed var(--line); }
.sc-emo-pop { display: none; flex-direction: column; gap: 6px; width: min(352px, calc(100vw - 16px)); height: min(400px, 70vh); padding: 8px; }
.sc-emo-pop:popover-open { display: flex; }
.sc-emo__search { width: 100%; border: 1.5px solid var(--line); background: var(--sunken); color: var(--text); border-radius: 12px; padding: 8px 12px; font: inherit; font-size: .9em; }
.sc-emo__search:focus { outline: none; border-color: var(--accent); }
.sc-emo__tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; flex: none; }
.sc-emo__tab { flex: none; width: 34px; height: 32px; display: grid; place-items: center; border: 0; background: transparent; border-radius: 10px; font-size: 18px; }
.sc-emo__tab:hover { background: var(--sunken); }
.sc-emo__tab .sc-emo { height: 22px; max-width: 28px; }
.sc-emo__grid { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; position: relative; }
.sc-emo__head { position: sticky; top: 0; z-index: 1; background: var(--surface-solid); font-size: .74em; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; padding: 6px 4px 4px; }
.sc-emo__row { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 2px; padding-bottom: 6px; }
.sc-emo__row.is-custom { grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); }
.sc-emo__cell { height: 38px; border: 0; background: transparent; border-radius: 10px; font-size: 24px; line-height: 1; display: grid; place-items: center; padding: 0;
  transition: transform .15s cubic-bezier(.3, 1.8, .5, 1), background .15s; }
.sc-emo__cell.is-custom { height: 48px; }
.sc-emo__cell:hover { background: var(--sunken); transform: scale(1.18); }
.sc-emo__cell .sc-emo { height: 36px; max-width: 44px; vertical-align: middle; }
.sc-emo__grid .sc-hint { text-align: center; padding: 24px 0; }
.sc-reply-form .sc-tool svg { width: 18px; height: 18px; }
/* Insert-emoji button inside the composer text box (bottom-right corner) */
.sc-body-wrap { position: relative; }
.sc-body-wrap textarea { padding-right: 40px; }
.sc-body-emo { position: absolute; right: 0; bottom: 0; width: 34px; height: 34px; display: grid; place-items: center; border: 0; background: transparent;
  border-radius: 50%; color: var(--text-3); transition: color .15s, background .15s, transform .2s cubic-bezier(.3, 1.8, .5, 1); }
.sc-body-emo:hover, .sc-body-emo:focus-visible { color: var(--accent-ink); background: var(--accent-soft); transform: scale(1.1); }
.sc-body-emo svg { width: 22px; height: 22px; }
.sc-body-emo[hidden] { display: none; }
.sc-body-emo[hidden] ~ textarea, .sc-body-wrap:has(.sc-body-emo[hidden]) textarea { padding-right: 0; }

/* Reply reactions (compact bar under the bubble) */
.sc-reply__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.sc-reply__main > .sc-reacts--sm { align-self: flex-start; }
.sc-reply__name .sc-x--edit + .sc-x { margin-left: 0; }
.sc-reply__main > .sc-reply__bubble { max-width: 100%; }
.sc-reacts--sm { gap: 4px; flex: none; padding-left: 4px; }
.sc-reacts--sm .sc-react { font-size: .76em; padding: 1px 8px 1px 6px; }
.sc-reacts--sm .sc-addreact { width: 26px; height: 22px; border-style: solid; border-color: transparent; opacity: .55; }
.sc-reply:hover .sc-reacts--sm .sc-addreact, .sc-reacts--sm .sc-addreact:focus-visible { opacity: 1; border-color: var(--line); border-style: dashed; }
.sc-reacts--sm .sc-addreact svg { width: 14px; height: 14px; }
.sc-reacts--sm .sc-whobtn { font-size: .72em; padding: 2px 6px; }
.sc-reacts--sm .sc-whobtn svg { width: 13px; height: 13px; }
@media (hover: none) { .sc-reacts--sm .sc-addreact { opacity: 1; } }

/* Edit own post / reply */
.sc-edited { font-size: .92em; color: var(--text-3); font-style: italic; }
.sc-edit { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 4px; width: 100%; }
.sc-edit__field { width: 100%; border: 1.5px solid var(--accent); background: var(--surface-solid); color: var(--text); border-radius: 14px; padding: 10px 12px;
  font: inherit; font-size: 1.02em; line-height: 1.5; resize: none; field-sizing: content; min-height: 3lh; max-height: 16lh; outline: none;
  box-shadow: 0 0 0 4px var(--accent-soft); }
.sc-edit--line { margin: 4px 0 2px; gap: 6px; }
.sc-edit--line .sc-edit__field { min-height: 0; padding: 7px 10px; border-radius: 12px; font-size: .95em; }
.sc-edit__bar { display: flex; align-items: center; gap: 8px; }
.sc-edit__hint { flex: 1; min-width: 0; font-size: .72em; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-btn--sm { padding: 6px 14px; font-size: .85em; }
.sc-x--edit { font-size: .85em; }
.sc-edit .sc-tool svg { width: 18px; height: 18px; }


/* ── Moderation (src/socialMods.js, Mod HQ at /SocialCornerAdmin) ── */
.sc-badge--mod { --c: var(--accent); color: color-mix(in oklab, var(--c) 70%, var(--text)); background: color-mix(in oklab, var(--c) 15%, transparent);
  border: 1px solid color-mix(in oklab, var(--c) 30%, transparent); white-space: nowrap; }
a.sc-icon { text-decoration: none; color: inherit; }
.sc-top .sc-icon#sc-hq-btn { color: var(--accent-ink); }
.sc-pop__title { padding: 6px 10px 8px; font-size: 12.5px; font-weight: 700; color: var(--text-2); }
.sc-muted { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; padding: 12px 16px; border-radius: var(--radius);
  background: color-mix(in oklab, #f59e0b 13%, var(--surface-solid)); border: 1px solid color-mix(in oklab, #f59e0b 35%, transparent); }
.sc-muted__ico { font-size: 24px; }
.sc-muted div { display: flex; flex-direction: column; font-size: .92em; }
.sc-muted span:not(.sc-muted__ico) { color: var(--text-2); }

/* ── Notifications (🔔 bell + panel) — social-corner.js "Notifications" ─────── */
.sc-bell { position: relative; }
.sc-bell svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sc-bell.has-unread { color: var(--accent-ink); }
.sc-bell.is-ring svg { animation: sc-bell-ring .9s cubic-bezier(.36, .07, .19, .97); transform-origin: 50% 12%; }
@keyframes sc-bell-ring { 0%, 100% { transform: rotate(0); } 15% { transform: rotate(16deg); } 30% { transform: rotate(-14deg); } 45% { transform: rotate(10deg); } 60% { transform: rotate(-6deg); } 75% { transform: rotate(3deg); } }
.sc-bell__n { position: absolute; top: 2px; right: 1px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; display: grid; place-items: center;
  background: var(--danger); color: #fff; font: 700 10.5px/1 var(--font-body); box-shadow: 0 0 0 2px var(--bg); pointer-events: none; animation: sc-pop .35s cubic-bezier(.3, 1.8, .5, 1) both; }
.sc-bell__n[hidden] { display: none; }

.sc-sheet--notif .sc-sheet__head { border-bottom: 0; padding-bottom: 6px; }
.sc-ntabs { display: flex; align-items: center; gap: 6px; padding: 4px 14px 10px 18px; border-bottom: 1px solid var(--line); }
.sc-ntabs [data-tab] { border: 0; background: transparent; color: var(--text-2); font-weight: 700; font-size: .88em; padding: 7px 14px; border-radius: 999px; }
.sc-ntabs [data-tab]:hover { background: var(--sunken); }
.sc-ntabs [data-tab][aria-selected="true"] { background: var(--accent-soft); color: var(--accent-ink); }
.sc-ntabs__sp { flex: 1; }
.sc-ntabs .sc-link:disabled { opacity: .45; pointer-events: none; }
.sc-ntabs .sc-icon { width: 34px; height: 34px; }
.sc-ntabs .sc-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.sc-ntabs .sc-icon[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-ink); }
.sc-notif__body { padding: 6px 8px 18px; gap: 8px; }

.sc-nlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.sc-ngroup { padding: 12px 12px 4px; font-size: .74em; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.sc-nrow { position: relative; border-radius: 16px; transition: background .15s; }
.sc-nrow:hover { background: var(--sunken); }
.sc-nrow.is-unread { background: color-mix(in oklab, var(--accent) 7%, transparent); }
.sc-nrow.is-unread:hover { background: color-mix(in oklab, var(--accent) 12%, transparent); }
.sc-nrow__main { display: flex; align-items: flex-start; gap: 12px; width: 100%; border: 0; background: transparent; color: inherit; text-align: left; padding: 10px 34px 10px 10px; border-radius: inherit; font: inherit; cursor: pointer; }
.sc-nrow__pic { position: relative; flex: none; width: 46px; height: 46px; }
.sc-ava--notif { --size: 46px; }
.sc-nava { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; background: var(--sunken); }
.sc-nstack { position: absolute; left: -4px; bottom: -4px; display: flex; }
.sc-nstack .sc-ava { margin-right: -8px; }
.sc-ava--mini { --size: 20px; }
.sc-ava--mini .sc-ava__img { box-shadow: 0 0 0 2px var(--surface-solid); font-size: 9px; }
.sc-nkind { position: absolute; right: -4px; bottom: -4px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px;
  background: var(--surface-solid); box-shadow: 0 0 0 2px var(--surface-solid), var(--shadow-sm); }
.sc-nrow__txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; font-size: .9em; line-height: 1.35; }
.sc-nrow__line { color: var(--text-2); }
.sc-nrow__line b { color: var(--text); font-weight: 750; }
.sc-nrow.is-unread .sc-nrow__line { color: var(--text); }
.sc-nemos { display: inline-flex; gap: 2px; margin-left: 6px; vertical-align: -2px; }
.sc-nemo { font-size: 1.05em; }
img.sc-nemo { width: 1.25em; height: 1.25em; object-fit: contain; }
.sc-nsnip { color: var(--text-2); font-size: .94em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sc-nreason { font-size: .86em; color: var(--text-2); padding: 4px 8px; border-radius: 8px; background: var(--sunken); align-self: flex-start; }
.sc-nrow__txt time { font-size: .8em; font-weight: 700; color: var(--text-3); }
.sc-nrow.is-unread .sc-nrow__txt time { color: var(--accent-ink); }
.sc-nrow__dot { flex: none; align-self: center; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.sc-nrow__x { position: absolute; top: 8px; right: 6px; width: 26px; height: 26px; border: 0; border-radius: 50%; background: transparent; color: var(--text-3); font-size: 12px; opacity: 0; transition: opacity .15s, background .15s; }
.sc-nrow:hover .sc-nrow__x, .sc-nrow__x:focus-visible { opacity: 1; }
.sc-nrow__x:hover { background: var(--surface-solid); color: var(--danger); }
@media (hover: none) { .sc-nrow__x { opacity: .6; } }
.sc-nempty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 48px 20px; color: var(--text-2); font-size: .92em; }
.sc-nempty i { font-style: normal; font-size: 40px; }
.sc-nempty b { font-family: var(--font-display); font-size: 1.25em; color: var(--text); font-weight: 600; }
.sc-skel--row { height: 64px; margin: 8px; border-radius: 16px; }

.sc-nprefs { display: flex; flex-direction: column; gap: 4px; padding: 6px 8px; }
.sc-nprefs h3 { margin: 6px 4px 4px; font-size: .76em; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.sc-nprefs__row { gap: 12px; padding: 10px 8px; border-radius: 14px; cursor: pointer; }
.sc-nprefs__row:hover { background: var(--sunken); }
.sc-nprefs__ico { flex: none; width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; font-size: 18px; background: var(--sunken); }
.sc-nprefs__txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sc-nprefs__txt small { font-weight: 500; color: var(--text-3); font-size: .86em; }
.sc-switch:disabled { opacity: .55; cursor: not-allowed; }

/* Post viewer: a notification's post when it isn't in the loaded feed */
.sc-sheet--post { width: min(620px, 100%); }
.sc-postview__body { padding: 14px; }
.sc-postview__body .sc-post { animation: none; }
.sc-reply.is-fresh { animation: sc-reply-glow 1.6s ease-out; border-radius: 16px; }
@keyframes sc-reply-glow { 0%, 35% { background: var(--accent-soft); box-shadow: 0 0 0 6px var(--accent-soft); } }

/* Toast with an action (Undo) */
.sc-toast.has-action { pointer-events: auto; display: flex; align-items: center; gap: 14px; padding: 8px 8px 8px 18px; }
.sc-toast__btn { border: 0; border-radius: 999px; padding: 6px 14px; font: inherit; font-weight: 800; background: color-mix(in oklab, var(--bg) 18%, transparent); color: inherit; cursor: pointer; }
.sc-toast__btn:hover { background: color-mix(in oklab, var(--bg) 30%, transparent); }

/* Moderator-deleted post (🗑️ Deleted tab) */
.sc-post.is-deleted { border-style: dashed; }
.sc-post.is-deleted > :not(.sc-deleted) { opacity: .62; }
.sc-deleted { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: -2px 0 12px; padding: 9px 10px 9px 14px; border-radius: 14px;
  background: color-mix(in oklab, var(--danger) 10%, var(--surface-solid)); border: 1px solid color-mix(in oklab, var(--danger) 28%, transparent); font-size: .85em; }
.sc-deleted__txt { flex: 1; min-width: 180px; color: var(--text-2); }
.sc-deleted__txt b { color: var(--text); }
.sc-deleted .sc-btn { padding: 7px 14px; font-size: .92em; }

/* Page link field (Customize ▸ Page link → /SocialCorner/<handle>) */
.sc-linkrow { display: flex; gap: 8px; flex-wrap: wrap; align-items: stretch; }
.sc-linkfield { flex: 1 1 240px; min-width: 0; display: flex; align-items: center; border: 1.5px solid var(--line); background: var(--surface-solid);
  border-radius: 12px; padding-left: 12px; transition: border-color .15s; }
.sc-linkfield:focus-within { border-color: var(--accent); }
.sc-linkfield__pre { color: var(--text-3); font-size: .88em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 55%; flex-shrink: 1; }
.sc-field .sc-linkfield input[type="text"] { flex: 1; min-width: 80px; border: 0; background: none; padding: 9px 12px 9px 1px; border-radius: 0 12px 12px 0; }
.sc-linkrow .sc-btn { padding: 8px 14px; }

/* Welcome card sign-in form (signed-out visitors log in without leaving the page) */
.sc-wlogin { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }
.sc-wlogin__step { display: flex; flex-direction: column; gap: 12px; }
.sc-wlogin__step[hidden] { display: none; }
.sc-wlogin__f { display: flex; flex-direction: column; gap: 6px; }
.sc-wlogin__f > span:first-child { font-size: .74em; font-weight: 800; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; }
.sc-wlogin__f input, .sc-wlogin__pw { width: 100%; border: 1.5px solid var(--line); background: var(--surface-solid); color: var(--text); border-radius: 14px;
  padding: 12px 14px; font: inherit; font-size: 15px; outline: 0; transition: border-color .15s, box-shadow .15s; }
.sc-wlogin__f input:focus, .sc-wlogin__pw:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 16%, transparent); }
.sc-wlogin__pw { display: flex; align-items: center; padding: 0 6px 0 0; }
.sc-wlogin__pw input { border: 0; background: none; box-shadow: none !important; flex: 1; min-width: 0; }
.sc-wlogin__eye { flex: none; width: 36px; height: 36px; border: 0; border-radius: 10px; background: none; cursor: pointer; opacity: .55; font-size: 16px; }
.sc-wlogin__eye:hover, .sc-wlogin__eye.is-on { opacity: 1; background: var(--sunken); }
.sc-wlogin .is-bad, .sc-wlogin__pw:has(.is-bad) { border-color: var(--danger); }
.sc-wlogin__pw input.is-bad { border: 0; }
.sc-wlogin__age { display: flex; align-items: center; gap: 9px; font-size: .9em; color: var(--text-2); cursor: pointer; user-select: none; }
.sc-wlogin__age input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }
.sc-wlogin__age input.is-bad { outline: 2px solid var(--danger); outline-offset: 2px; }
.sc-wlogin__note { margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--sunken); font-size: .9em; color: var(--text-2); line-height: 1.5; }
.sc-wlogin__link { align-self: flex-start; border: 0; background: none; padding: 0; color: var(--accent); font: inherit; font-size: .88em; font-weight: 650; cursor: pointer; }
.sc-wlogin__err { margin: 0; padding: 9px 12px; border-radius: 12px; font-size: .9em; font-weight: 600; color: var(--danger);
  background: color-mix(in oklab, var(--danger) 10%, transparent); border: 1px solid color-mix(in oklab, var(--danger) 25%, transparent); }
.sc-wlogin__err[hidden] { display: none; }
.sc-wlogin .sc-welcome__acts { margin-top: 4px; }
.sc-wlogin .sc-welcome__go b { font-weight: inherit; }
.sc-wlogin.is-busy .sc-welcome__go { opacity: .7; cursor: progress; }
.sc-wlogin .sc-welcome__fine a { color: var(--accent); font-weight: 650; text-decoration: none; }
.sc-wlogin .sc-welcome__fine a:hover { text-decoration: underline; }
.sc-welcome__card:has(.sc-wlogin) .sc-welcome__perks { margin: 18px 0 18px; }

/* ── Toasts above open dialogs: #sc-toasts is a manual popover (top layer) ── */
.sc-toasts[popover] { inset: auto; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); margin: 0; padding: 0; border: 0; background: transparent; color: inherit; overflow: visible; }
.sc-toasts[popover]:popover-open { display: flex; }

/* ── Messages (💬) — public/js/social-chat.js ─────────────────────────────── */
.sc-chatbtn.has-unread { color: var(--accent-ink); }
.sc-friends__list li.has-msg { display: flex; align-items: center; gap: 2px; }
.sc-friends__list li.has-msg .sc-friend { flex: 1; min-width: 0; }
.sc-friend__msg { flex: none; width: 34px; height: 34px; border: 0; border-radius: 12px; background: transparent; font-size: 16px; opacity: 0; transition: opacity .15s, background .15s; }
.sc-friends__list li:hover .sc-friend__msg, .sc-friend__msg:focus-visible { opacity: 1; }
.sc-friend__msg:hover { background: var(--accent-soft); }
@media (pointer: coarse) { .sc-friend__msg { opacity: .8; } }

/* Messages page (/SocialCorner/messages): the feed shell steps aside */
html.sc-msgmode:not(.sc-guest) .sc-shell { display: none; }
html.sc-msgmode:not(.sc-guest) body { padding-bottom: 0; height: 100dvh; overflow: hidden; display: flex; flex-direction: column; }
html.sc-msgmode .sc-home__dot { display: none; }
html.sc-msgmode .sc-top .sc-side-toggle { display: none; }
.sc-msgpage { --chat: var(--accent); flex: 1; min-height: 0; width: 100%; max-width: 1320px; margin: 0 auto; padding: 12px 16px 16px; }
.sc-msgpage > .sc-chat__in { height: 100%; border-radius: 24px; border: 1px solid var(--line); background: var(--bg); box-shadow: var(--shadow); }
.sc-msgpage > .sc-chat__hello { height: 100%; }
.sc-chat__mainslot { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.sc-chat__mainslot > .sc-chat__main { flex: 1; }
.sc-chat__in { position: relative; display: grid; grid-template-columns: minmax(280px, 340px) minmax(0, 1fr); height: 100%; overflow: hidden; }
.sc-chat__svg { display: inline-flex; }
.sc-msgpage .sc-icon svg, .sc-chatdrop .sc-icon svg, .sc-dockwin .sc-icon svg { width: 20px; height: 20px; }

/* Inbox column */
.sc-chat__side { display: flex; flex-direction: column; min-width: 0; min-height: 0; border-right: 1px solid var(--line); background: var(--surface); }
.sc-chat__shead { display: flex; align-items: center; gap: 4px; padding: 16px 12px 8px 20px; }
.sc-chat__shead h2 { flex: 1; margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 26px; }
.sc-chat__shead .sc-icon { background: var(--sunken); border-radius: 50%; }
.sc-chat__shead .sc-icon:hover { background: var(--accent-soft); color: var(--accent-ink); }
.sc-chat__search { margin: 4px 14px 8px; border-radius: 999px; }
.sc-chat__tabs { display: flex; gap: 6px; padding: 0 14px 8px; }
.sc-chat__tabs button { border: 0; background: transparent; color: var(--text-2); font-weight: 700; font-size: .86em; padding: 6px 13px; border-radius: 999px; }
.sc-chat__tabs button:hover { background: var(--sunken); }
.sc-chat__tabs button[aria-selected="true"] { background: var(--accent-soft); color: var(--accent-ink); }
.sc-chat__threads { list-style: none; margin: 0; padding: 0 8px 12px; flex: 1; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.sc-chat__none { padding: 28px 18px; text-align: center; color: var(--text-3); font-size: .9em; line-height: 1.5; }
.sc-chat__row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 10px; border: 0; border-radius: 14px; background: transparent; text-align: left; transition: background .15s; }
.sc-chat__row:hover { background: var(--sunken); }
.sc-chat__row.is-on { background: var(--accent-soft); }
.sc-chat__rowava { --size: 52px; }
.sc-chat__rowtxt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.sc-chat__rowname { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-chat__rowlast { display: flex; min-width: 0; font-size: .84em; color: var(--text-3); }
.sc-chat__rowmsg { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.sc-chat__rowat { flex: none; white-space: nowrap; }
.sc-chat__row.is-unread .sc-chat__rowname { font-weight: 800; }
.sc-chat__row.is-unread .sc-chat__rowlast { color: var(--text); font-weight: 650; }
.sc-chat__dot { flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.sc-chat__mutedico { flex: none; font-size: 13px; opacity: .6; }

/* Group avatars: emoji tile or two stacked faces */
.sc-chat__gava .sc-ava__img { background: color-mix(in oklab, var(--g, var(--accent)) 22%, var(--surface-solid)); font-size: calc(var(--size) * .5); line-height: 1; }
.sc-chat__stack { --stack: 44px; position: relative; display: inline-block; flex: none; width: var(--stack); height: var(--stack); }
.sc-chat__stack > .sc-ava { --size: calc(var(--stack) * .68); position: absolute; }
.sc-chat__stack > .sc-ava:first-child { top: 0; right: 0; }
.sc-chat__stack > .sc-ava:nth-child(2) { bottom: 0; left: 0; }
.sc-chat__stack > .sc-ava:nth-child(2) .sc-ava__img { box-shadow: 0 0 0 2.5px var(--surface-solid); }
.sc-chat__stack > .sc-ava:only-child { --size: var(--stack); inset: 0; }
.sc-chat__rowava.sc-chat__stack { --stack: 52px; }
.sc-chat__stack.sc-ava--xs { --stack: 40px; }
.sc-chat__stack.sc-chat__introava, .sc-chat__stack.sc-chat__iava { --stack: 84px; }

/* Conversation column */
.sc-chat__main { --chat-2: color-mix(in oklab, var(--chat), #ff5fa2 38%); display: flex; flex-direction: column; min-width: 0; min-height: 0; position: relative; }
.sc-chat__head { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--surface); min-height: 64px; }
.sc-chat__head .sc-icon { color: var(--chat); }
.sc-chat__head .sc-icon[aria-pressed="true"] { background: color-mix(in oklab, var(--chat) 14%, transparent); }
.sc-chat__back { display: none; }
.sc-chat__who { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; border: 0; background: transparent; padding: 4px 8px 4px 4px; border-radius: 14px; text-align: left; }
.sc-chat__who:hover { background: var(--sunken); }
.sc-chat__who .sc-ava--xs { --size: 40px; }
.sc-chat__htxt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.sc-chat__hname { font-weight: 750; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-chat__hsub { font-size: .8em; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-chat__hello { margin: auto; max-width: 360px; padding: 24px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.sc-chat__hello-ico { font-size: 54px; line-height: 1; filter: drop-shadow(0 8px 18px color-mix(in oklab, var(--accent) 35%, transparent)); }
.sc-chat__hello h3 { margin: 6px 0 0; font-family: var(--font-display); font-weight: 600; font-size: 22px; }
.sc-chat__hello p { margin: 0 0 8px; color: var(--text-2); font-size: .92em; }

.sc-chat__scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding: 10px 14px 6px; }
.sc-chat__msgs { display: flex; flex-direction: column; min-height: 100%; justify-content: flex-end; }
.sc-chat__older { height: 30px; display: grid; place-items: center; color: var(--text-3); font-size: .8em; }
.sc-chat__intro { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 26px 16px 18px; }
.sc-chat__intro h3 { margin: 4px 0 0; font-family: var(--font-display); font-weight: 600; font-size: 20px; }
.sc-chat__intro p { margin: 0 0 6px; max-width: 360px; color: var(--text-3); font-size: .86em; }
.sc-chat__introava { --size: 84px; }
.sc-chat__time { align-self: center; margin: 16px 0 6px; font-size: .74em; font-weight: 700; color: var(--text-3); letter-spacing: .02em; }
.sc-chat__sys { align-self: center; margin: 8px 12px; max-width: 80%; text-align: center; font-size: .8em; color: var(--text-3); }

.sc-chat__msg { display: flex; align-items: flex-end; gap: 8px; margin-top: 2px; position: relative; }
.sc-chat__msg.is-start { margin-top: 10px; }
.sc-chat__msg.is-mine { flex-direction: row-reverse; }
.sc-chat__msg.is-flash .sc-chat__bubble, .sc-chat__msg.is-flash .sc-chat__img { animation: sc-chat-flash 1.2s ease; }
@keyframes sc-chat-flash { 30% { box-shadow: 0 0 0 4px color-mix(in oklab, var(--chat) 45%, transparent); } }
.sc-chat__mava { flex: none; width: 32px; height: 32px; border: 0; padding: 0; background: none; border-radius: 50%; }
.sc-chat__mava .sc-ava--xs { --size: 32px; }
.sc-chat__msg.is-mine .sc-chat__mava { display: none; }
.sc-chat__col { display: flex; flex-direction: column; align-items: flex-start; max-width: min(72%, 540px); min-width: 0; }
.sc-chat__msg.is-mine .sc-chat__col { align-items: flex-end; }
.sc-chat__from { font-size: .74em; font-weight: 700; color: var(--text-3); margin: 0 0 2px 12px; }
.sc-chat__bwrap { position: relative; display: flex; flex-direction: column; align-items: inherit; max-width: 100%; }
.sc-chat__bwrap:has(.sc-chat__reacts) { padding-bottom: 14px; }
.sc-chat__bubble { padding: 8px 13px; border-radius: 20px; background: var(--sunken); color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.42; max-width: 100%; }
.sc-chat__bubble a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.sc-chat__msg.is-mine .sc-chat__bubble { background: linear-gradient(135deg, var(--chat), var(--chat-2)); color: #fff; }
/* Run shapes: consecutive bubbles hug each other on the sender's side */
.sc-chat__msg:not(.is-mine):not(.is-start) .sc-chat__bubble { border-top-left-radius: 6px; }
.sc-chat__msg:not(.is-mine):not(.is-end) .sc-chat__bubble { border-bottom-left-radius: 6px; }
.sc-chat__msg.is-mine:not(.is-start) .sc-chat__bubble { border-top-right-radius: 6px; }
.sc-chat__msg.is-mine:not(.is-end) .sc-chat__bubble { border-bottom-right-radius: 6px; }
.sc-chat__bubble.is-enc, .sc-chat__msg.is-mine .sc-chat__bubble.is-enc { font-style: italic; color: var(--text-3); background: transparent; border: 1.5px dashed var(--line); }
.sc-chat__bubble.is-file { text-decoration: none; font-weight: 650; }
.sc-chat__bubble.is-auto { font-style: italic; }
.sc-chat__big { font-size: 40px; line-height: 1.15; padding: 2px 0; }
.sc-chat__big .sc-emo { height: 1.3em; max-width: 2.4em; vertical-align: -.2em; }
.sc-chat__bubble .sc-emo { height: 1.45em; }
.sc-chat__img { display: block; padding: 0; border: 0; background: var(--sunken); border-radius: 18px; overflow: hidden; max-width: min(280px, 100%); cursor: zoom-in; }
.sc-chat__img img { display: block; max-width: 100%; max-height: 340px; object-fit: cover; }
.sc-chat__msg.is-pending .sc-chat__bwrap { opacity: .6; }
.sc-chat__msg.is-failed .sc-chat__bubble { outline: 1.5px solid var(--danger); }
.sc-chat__meta { font-size: .72em; color: var(--text-3); margin: 2px 8px 0; display: flex; gap: 6px; }
.sc-chat__retry { border: 0; background: none; padding: 0; color: var(--danger); font: inherit; font-weight: 700; }

.sc-chat__quote { display: flex; flex-direction: column; align-items: inherit; gap: 2px; border: 0; background: none; padding: 0 4px; margin: 2px 0 -10px; max-width: 100%; text-align: inherit; }
.sc-chat__quote-by { display: inline-flex; align-items: center; gap: 4px; font-size: .72em; color: var(--text-3); font-weight: 650; }
.sc-chat__quote-by svg { width: 13px; height: 13px; }
.sc-chat__quote-txt { padding: 7px 12px 16px; border-radius: 16px; background: color-mix(in oklab, var(--sunken), var(--text) 4%); color: var(--text-2); font-size: .86em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; opacity: .85; }

.sc-chat__reacts { position: absolute; bottom: 0; right: 6px; display: flex; gap: 2px; z-index: 1; }
.sc-chat__msg.is-mine .sc-chat__reacts { right: auto; left: 6px; }
.sc-chat__rchip { display: inline-flex; align-items: center; gap: 2px; height: 22px; padding: 0 6px; border: 0; border-radius: 999px; background: var(--surface-solid);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .16); font-size: 13px; line-height: 1; }
.sc-chat__rchip b { font-size: 11px; color: var(--text-2); }
.sc-chat__rchip.is-mine { background: color-mix(in oklab, var(--chat) 18%, var(--surface-solid)); }
.sc-chat__rchip .sc-emo { height: 16px; vertical-align: middle; }

.sc-chat__acts { display: flex; align-self: center; opacity: 0; transition: opacity .12s; }
.sc-chat__msg:hover .sc-chat__acts, .sc-chat__acts:focus-within { opacity: 1; }
.sc-chat__act { width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--text-3); }
.sc-chat__act:hover { background: var(--sunken); color: var(--text); }
.sc-chat__act svg { width: 17px; height: 17px; }
@media (pointer: coarse) { .sc-chat__acts { display: none; } }
.sc-pop--emoji .sc-chat__plus { font-size: 20px; color: var(--text-2); }
.sc-pop--emoji.sc-chat__rpop { max-width: none; flex-wrap: nowrap; border-radius: 999px; padding: 4px 6px; }

.sc-chat__seen { display: flex; justify-content: flex-end; gap: 2px; margin: 3px 2px 0; }
.sc-chat__seenava { --size: 15px; }
.sc-chat__seenava .sc-ava__img { font-size: 7px; }

.sc-chat__edit { width: min(420px, 70vw); border: 1.5px solid var(--chat); border-radius: 16px; padding: 8px 12px; background: var(--surface-solid); resize: vertical; outline: 0; }
.sc-chat__editbar { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: .75em; color: var(--text-3); }
.sc-chat__editbar .sc-btn { padding: 6px 12px; font-size: 12px; }

.sc-chat__typing { display: flex; align-items: center; gap: 8px; padding: 0 20px; font-size: .78em; color: var(--text-3); }
.sc-chat__typing:not(:empty) { min-height: 26px; }
.sc-chat__dots { display: inline-flex; gap: 3px; padding: 6px 9px; border-radius: 999px; background: var(--sunken); }
.sc-chat__dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); animation: sc-chat-dot 1.2s infinite ease-in-out; }
.sc-chat__dots i:nth-child(2) { animation-delay: .15s; }
.sc-chat__dots i:nth-child(3) { animation-delay: .3s; }
@keyframes sc-chat-dot { 0%, 60%, 100% { transform: none; opacity: .5; } 30% { transform: translateY(-3px); opacity: 1; } }

.sc-chat__replybar { display: flex; align-items: center; gap: 8px; margin: 0 12px; padding: 8px 8px 8px 14px; border-top: 1px solid var(--line); }
.sc-chat__replybar[hidden] { display: none; }
.sc-chat__replytxt { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: .82em; }
.sc-chat__replytxt span { color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sc-chat__compose { display: flex; align-items: flex-end; gap: 4px; padding: 8px 10px calc(10px + env(safe-area-inset-bottom)); }
.sc-chat__tool { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--chat); }
.sc-chat__tool:hover { background: color-mix(in oklab, var(--chat) 12%, transparent); }
.sc-chat__tool svg { width: 22px; height: 22px; }
.sc-chat__field { flex: 1; min-width: 0; display: flex; align-items: flex-end; background: var(--sunken); border-radius: 22px; padding-right: 2px; }
.sc-chat__field textarea { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; resize: none; padding: 9px 4px 9px 15px; max-height: 140px; line-height: 1.4; }
.sc-chat__field .sc-chat__tool { width: 36px; height: 36px; }
.sc-chat__send { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--chat); transition: transform .15s cubic-bezier(.3, 1.8, .5, 1); }
.sc-chat__send:hover { background: color-mix(in oklab, var(--chat) 12%, transparent); }
.sc-chat__send:active { transform: scale(.85); }
.sc-chat__send svg { width: 22px; height: 22px; fill: color-mix(in oklab, var(--chat) 20%, transparent); }
.sc-chat__like { font-size: 24px; line-height: 1; }
.sc-chat__lock { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 18px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line);
  color: var(--text-2); font-size: .88em; text-align: center; }

/* Picker (new message / add people) */
.sc-chat__pick { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.sc-chat__to { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.sc-chat__to > span { font-weight: 700; color: var(--text-3); font-size: .9em; }
.sc-chat__to input { flex: 1; min-width: 140px; border: 0; outline: 0; background: transparent; padding: 6px 2px; }
.sc-chat__chips { display: contents; }
.sc-chat__chip { display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 999px; padding: 3px 10px 3px 3px; background: var(--accent-soft); color: var(--accent-ink); font-weight: 650; font-size: .86em; }
.sc-chat__chip .sc-ava--sm { --size: 24px; }
.sc-chat__pick > input[type="text"] { margin: 10px 16px 0; border: 1.5px solid var(--line); background: var(--surface-solid); border-radius: 12px; padding: 9px 12px; outline: 0; }
.sc-chat__pick > input[type="text"]:focus { border-color: var(--accent); }
.sc-chat__plist { list-style: none; margin: 0; padding: 8px; flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.sc-chat__prow { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 10px; border: 0; border-radius: 14px; background: transparent; text-align: left; }
.sc-chat__prow:hover { background: var(--sunken); }
.sc-chat__prow.is-on { background: var(--accent-soft); }
.sc-chat__ptxt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sc-chat__pname { font-weight: 650; }
.sc-chat__ptxt small { color: var(--text-3); }
.sc-chat__check { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-size: 13px; font-weight: 900; color: #fff; }
.sc-chat__prow.is-on .sc-chat__check { background: var(--accent); border-color: var(--accent); }
.sc-chat__pickfoot { display: flex; justify-content: flex-end; padding: 10px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }

/* Details panel (ⓘ) — slides over the conversation */
.sc-chat__info { position: absolute; top: 0; right: 0; bottom: 0; z-index: 3; width: min(340px, 100%); overflow-y: auto; overscroll-behavior: contain;
  background: var(--surface-solid); border-left: 1px solid var(--line); box-shadow: var(--shadow-lg); padding: 0 14px 20px;
  transform: translateX(105%); visibility: hidden; transition: transform .26s cubic-bezier(.2, .9, .3, 1), visibility 0s .26s; }
.sc-chat__in.has-info .sc-chat__info { transform: none; visibility: visible; transition: transform .26s cubic-bezier(.2, .9, .3, 1); }
.sc-chat__ihead { display: flex; justify-content: flex-end; padding: 10px 0 0; }
.sc-chat__itop { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 0 0 14px; text-align: center; }
.sc-chat__itop h3 { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 20px; overflow-wrap: anywhere; }
.sc-chat__iava { --size: 84px; }
.sc-chat__isec { display: flex; flex-direction: column; gap: 14px; }
.sc-chat__irow { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px; border: 0; border-radius: 12px; background: transparent; text-align: left; font-weight: 650; color: inherit; text-decoration: none; }
.sc-chat__irow:hover { background: var(--sunken); }
.sc-chat__irow.is-danger { color: var(--danger); }
.sc-chat__iico { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--sunken); font-size: 15px; }
.sc-chat__inote { padding: 4px 10px; }
.sc-chat__ibtns { display: flex; flex-wrap: wrap; gap: 8px; }
.sc-chat__ibtns .sc-btn { padding: 8px 14px; font-size: 13px; }
.sc-chat__emopick { display: flex; flex-wrap: wrap; gap: 4px; }
.sc-chat__emopick button { width: 40px; height: 40px; border: 0; border-radius: 12px; background: var(--sunken); font-size: 20px; }
.sc-chat__emopick button[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--accent); background: var(--accent-soft); }
.sc-chat__swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.sc-chat__sw { width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--c); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .25); }
.sc-chat__sw[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--surface-solid), 0 0 0 4px var(--c); }
.sc-chat__members { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.sc-chat__member { display: flex; align-items: center; gap: 10px; padding: 5px 4px; }
.sc-chat__mtxt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sc-chat__mname { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-chat__mrole { font-size: .76em; color: var(--text-3); }
.sc-chat__member .sc-icon { width: 32px; height: 32px; }

/* Wide: the details panel is a third column instead of covering the thread */
@media (min-width: 1140px) {
  .sc-chat__in.has-info { grid-template-columns: minmax(280px, 320px) minmax(0, 1fr) 300px; }
  .sc-chat__in.has-info .sc-chat__info { position: static; width: auto; box-shadow: none; }
}

/* Phones: one pane at a time, full width */
@media (max-width: 760px) {
  .sc-msgpage { padding: 0; }
  .sc-msgpage > .sc-chat__in { border-radius: 0; border: 0; box-shadow: none; }
  .sc-chat__in { grid-template-columns: minmax(0, 1fr); }
  .sc-chat__in[data-view="list"] .sc-chat__mainslot { display: none; }
  .sc-chat__in[data-view="thread"] .sc-chat__side { display: none; }
  .sc-chat__side { border-right: 0; }
  .sc-chat__back { display: inline-grid; }
  .sc-chat__head { gap: 2px; padding: 8px 6px; }
  .sc-chat__col { max-width: 78%; }
  .sc-chat__info { width: 100%; }
}

/* ── Dropdown inbox under the 💬 button (feed pages) ── */
.sc-chatdrop { position: fixed; z-index: 75; width: min(368px, calc(100vw - 16px)); max-height: min(640px, calc(100dvh - 84px)); display: flex; flex-direction: column;
  background: var(--surface-solid); color: var(--text); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lg); overflow: hidden;
  animation: sc-drop-in .18s cubic-bezier(.2, .9, .3, 1); }
.sc-chatdrop[hidden] { display: none; }
@keyframes sc-drop-in { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
.sc-chatdrop .sc-chat__shead { padding: 14px 12px 6px 18px; }
.sc-chatdrop .sc-chat__shead h2 { font-size: 23px; }
.sc-chatdrop .sc-chat__threads { min-height: 120px; }
.sc-chatdrop__all { display: block; padding: 11px; border-top: 1px solid var(--line); text-align: center; font-weight: 700; font-size: .9em; text-decoration: none; color: var(--accent-ink); }
.sc-chatdrop__all:hover { background: var(--sunken); }

/* ── Dock: chat windows at the bottom right + round chat heads (feed pages) ── */
.sc-dock { position: fixed; right: 16px; bottom: 0; z-index: 60; display: flex; align-items: flex-end; gap: 12px; pointer-events: none; }
.sc-dock[hidden] { display: none; }
.sc-dock > * { pointer-events: auto; }
.sc-dock__wins { display: flex; flex-direction: row-reverse; align-items: flex-end; gap: 12px; }
.sc-dock__heads { display: flex; flex-direction: column-reverse; gap: 10px; padding-bottom: 18px; }
.sc-dock__heads:empty { display: none; }
.sc-dockwin { width: 338px; height: min(470px, calc(100dvh - 96px)); display: flex; flex-direction: column; background: var(--surface-solid); color: var(--text);
  border-radius: 14px 14px 0 0; box-shadow: 0 0 0 1px var(--line), 0 12px 40px -6px rgba(20, 10, 50, .35); overflow: hidden; animation: sc-dock-in .22s cubic-bezier(.2, .9, .3, 1); }
@keyframes sc-dock-in { from { transform: translateY(24px); opacity: 0; } }
.sc-dockwin > .sc-chat__main { flex: 1; }
.sc-chat__main--dock { font-size: .94em; }
.sc-chat__main--dock .sc-chat__head { min-height: 52px; padding: 6px 4px 6px 6px; gap: 0; background: var(--surface-solid); box-shadow: 0 1px 0 var(--line); border-bottom: 0; transition: background .2s; }
.sc-chat__main--dock .sc-chat__head .sc-icon { width: 32px; height: 32px; border-radius: 50%; }
.sc-chat__main--dock .sc-chat__head .sc-icon svg { width: 18px; height: 18px; }
.sc-chat__main--dock .sc-chat__head .sc-icon:hover { background: color-mix(in oklab, var(--chat) 12%, transparent); }
.sc-chat__main--dock .sc-chat__who { padding: 3px 6px 3px 3px; gap: 8px; }
.sc-chat__main--dock .sc-chat__who .sc-ava--xs { --size: 34px; }
.sc-chat__main--dock .sc-chat__who .sc-chat__stack { --stack: 34px; }
.sc-chat__main--dock .sc-chat__hname { font-size: .95em; }
.sc-chat__main--dock .sc-chat__hsub { font-size: .74em; }
.sc-chat__main--dock .sc-chat__head.is-new { background: var(--chat); }
.sc-chat__main--dock .sc-chat__head.is-new .sc-icon, .sc-chat__main--dock .sc-chat__head.is-new .sc-chat__hname,
.sc-chat__main--dock .sc-chat__head.is-new .sc-chat__hsub { color: #fff; background: none; -webkit-text-fill-color: currentColor; }
.sc-chat__main--dock .sc-chat__scroll { padding: 6px 8px 4px; }
.sc-chat__main--dock .sc-chat__col { max-width: 78%; }
.sc-chat__main--dock .sc-chat__bubble { padding: 7px 11px; border-radius: 18px; }
.sc-chat__main--dock .sc-chat__mava { width: 26px; height: 26px; }
.sc-chat__main--dock .sc-chat__mava .sc-ava--xs { --size: 26px; }
.sc-chat__main--dock .sc-chat__img { max-width: 200px; }
.sc-chat__main--dock .sc-chat__img img { max-height: 220px; }
.sc-chat__main--dock .sc-chat__big { font-size: 32px; }
.sc-chat__main--dock .sc-chat__intro { padding: 16px 10px 10px; }
.sc-chat__main--dock .sc-chat__introava { --size: 60px; }
.sc-chat__main--dock .sc-chat__stack.sc-chat__introava { --stack: 60px; }
.sc-chat__main--dock .sc-chat__intro h3 { font-size: 17px; }
.sc-chat__main--dock .sc-chat__act { width: 26px; height: 26px; }
.sc-chat__main--dock .sc-chat__compose { padding: 6px 6px 8px; gap: 2px; }
.sc-chat__main--dock .sc-chat__tool, .sc-chat__main--dock .sc-chat__send { width: 34px; height: 34px; }
.sc-chat__main--dock .sc-chat__field textarea { padding: 7px 2px 7px 12px; }
.sc-chat__main--dock .sc-chat__field .sc-chat__tool { width: 32px; height: 32px; }
.sc-chat__main--dock .sc-chat__to { padding: 8px 10px; }
.sc-chat__main--dock .sc-chat__pickfoot { padding: 8px 10px; }
.sc-chat__main--dock .sc-chat__edit { width: 100%; }

.sc-dockhead { position: relative; }
.sc-dockhead__btn { position: relative; display: block; width: 52px; height: 52px; padding: 0; border: 0; border-radius: 50%; background: none;
  box-shadow: 0 4px 14px rgba(20, 10, 50, .3); transition: transform .15s cubic-bezier(.3, 1.8, .5, 1); }
.sc-dockhead__btn:hover { transform: scale(1.06); }
.sc-dockhead__ava { --size: 52px; }
.sc-dockhead__ava.sc-chat__stack { --stack: 52px; background: var(--surface-solid); border-radius: 50%; }
.sc-dockhead__n { top: -2px; right: -2px; }
/* Minimized chat with unread messages: glowing pulse until opened, plus a bump per new message. */
.sc-dockhead.is-new .sc-dockhead__btn { --sc-new: #ff3b5c; animation: scHeadGlow 1.1s ease-in-out infinite; }
.sc-dockhead.is-new.is-bump .sc-dockhead__btn { animation: scHeadBump .9s cubic-bezier(.3, 1.6, .5, 1) 1, scHeadGlow 1.1s ease-in-out infinite; }
@keyframes scHeadGlow {
  0%, 100% { box-shadow: 0 0 0 3px var(--sc-new), 0 0 14px 4px color-mix(in srgb, var(--sc-new) 55%, transparent), 0 4px 14px rgba(20, 10, 50, .3); }
  50% { box-shadow: 0 0 0 5px var(--sc-new), 0 0 32px 12px color-mix(in srgb, var(--sc-new) 75%, transparent), 0 4px 14px rgba(20, 10, 50, .3); }
}
@keyframes scHeadBump {
  0% { transform: scale(1); } 20% { transform: scale(1.28) rotate(-8deg); } 40% { transform: scale(1.15) rotate(7deg); }
  60% { transform: scale(1.2) rotate(-4deg); } 80% { transform: scale(1.05) rotate(2deg); } 100% { transform: scale(1); }
}
.sc-dockhead__x { position: absolute; top: -6px; left: -6px; width: 22px; height: 22px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%;
  background: var(--surface-solid); color: var(--text-2); box-shadow: var(--shadow); opacity: 0; transition: opacity .12s; }
.sc-dockhead__x svg { width: 12px; height: 12px; stroke-width: 2.6; }
.sc-dockhead__tip { position: absolute; right: calc(100% + 10px); top: 50%; transform: translateY(-50%); white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis;
  padding: 6px 10px; border-radius: 10px; background: var(--text); color: var(--bg); font-size: 12.5px; font-weight: 650; opacity: 0; pointer-events: none; transition: opacity .12s; }
.sc-dockhead:hover .sc-dockhead__x, .sc-dockhead:focus-within .sc-dockhead__x, .sc-dockhead:hover .sc-dockhead__tip { opacity: 1; }
@media (max-width: 760px) { .sc-dock { display: none; } }
@media (pointer: coarse) { .sc-dockhead__x { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sc-chat__info, .sc-dockhead__btn { transition: none; } .sc-chat__dots i, .sc-dockwin, .sc-chatdrop { animation: none; }
  .sc-dockhead.is-new .sc-dockhead__btn { animation: none; box-shadow: 0 0 0 4px var(--sc-new), 0 0 24px 8px color-mix(in srgb, var(--sc-new) 65%, transparent); } }

/* ── Message requests (non-friends) — social-chat.js requestNote / requestBar ── */
.sc-chat__reqrow { display: flex; align-items: center; gap: 12px; width: 100%; margin: 0 0 4px; padding: 10px 12px; border: 0; border-radius: 14px;
  background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; text-align: left; }
.sc-chat__reqrow:hover { background: color-mix(in oklab, var(--accent) 18%, transparent); }
.sc-chat__reqrow span:nth-child(2) { flex: 1; }
.sc-chat__reqrow b { min-width: 22px; height: 22px; padding: 0 7px; display: grid; place-items: center; border-radius: 999px; background: var(--accent); color: #fff; font-size: 12px; }
.sc-chat__reqico { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-solid); font-size: 18px; }
.sc-chat__reqtag { flex: none; font-size: .7em; font-weight: 750; color: var(--text-3); background: var(--sunken); border-radius: 999px; padding: 2px 8px; }
.sc-chat__reqnote { display: flex; align-items: flex-start; gap: 8px; margin: 0 10px; padding: 8px 12px; border-radius: 12px;
  background: var(--accent-soft); color: var(--text-2); font-size: .8em; line-height: 1.4; }
.sc-chat__reqbar { padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); text-align: center; }
.sc-chat__reqtitle { margin: 0 0 4px; font-size: .95em; }
.sc-chat__reqsub { margin: 0 auto 12px; max-width: 420px; font-size: .78em; color: var(--text-3); line-height: 1.45; }
.sc-chat__reqbtns { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.sc-chat__reqbtns .sc-btn { padding: 9px 16px; font-size: 13.5px; }
.sc-btn.is-danger { color: var(--danger); }
.sc-chat__main--dock .sc-chat__reqbar { padding: 10px; }
.sc-chat__main--dock .sc-chat__reqbtns .sc-btn { padding: 8px 12px; font-size: 12.5px; }
.sc-chat__phead { padding: 10px 10px 4px; font-size: .72em; font-weight: 800; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; }
.sc-chat__lock--ask { flex-direction: column; gap: 10px; }
.sc-chat__lock--ask .sc-btn { padding: 9px 16px; font-size: 13.5px; }
