/* =====================================================================
   DW Social, modern layout
   Mobile first. A calm light page, a dark frame for the white DW logo,
   and one accent colour per page so each family member's page has its own feel.
   Font: Libre Franklin, self-hosted on this site.
   ===================================================================== */

:root {
  /* Room for the phone's status bar. Only a home screen app draws under it. In a browser or an
     in-app browser (Facebook, Instagram, LinkedIn on Android 15) the status bar is outside the page,
     but some of them still report its height, which left an empty band above the header. */
  --safe-top: 0px;
  --wave-rest: #cfcadf;
  --bg: #f4f2ee;
  --surface: #ffffff;
  --surface-2: #f2f0eb;
  --line: #e6e2da;
  --line-strong: #cfc9bd;
  --ink: #15171c;
  --ink-2: #474c57;
  --ink-3: #676c78;
  --frame: #11141b;
  --frame-2: #1b1f29;
  --frame-ink: #f3f1ec;
  --frame-dim: #a9adb8;

  --accent: #3b4fd8;
  --accent-deep: #2b3bb0;
  --accent-soft: #eceefd;
  --accent-ink: #ffffff;
  --cover: linear-gradient(135deg, #1c2464 0%, #3b4fd8 42%, #8a5cf5 74%, #f4a38c 100%);

  --ok: #157a46; --ok-soft: #e7f5ed;
  --warn: #8a5a00; --warn-soft: #fdf3dc;
  --danger: #b4321c; --danger-soft: #fdecea;

  --f-body: 'Libre Franklin', 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', Arial, sans-serif;
  --f-mono: Consolas, 'SFMono-Regular', Menlo, 'Courier New', monospace;

  --gutter: max(16px, env(safe-area-inset-left));
  --gutter-r: max(16px, env(safe-area-inset-right));
  --radius: 20px;
  --radius-s: 12px;
  --header-h: 60px;
  --shadow: 0 1px 2px rgba(21, 23, 28, .05), 0 6px 24px -12px rgba(21, 23, 28, .18);
  --shadow-lift: 0 2px 4px rgba(21, 23, 28, .06), 0 18px 40px -18px rgba(21, 23, 28, .32);
}
@media (display-mode: standalone), (display-mode: fullscreen), (display-mode: minimal-ui) {
  :root { --safe-top: env(safe-area-inset-top, 0px); }
}
/* Each page has its own colour. The person who runs the page picks it on the profile screen (PageTheme). */
.theme-indigo { --accent: #3b4fd8; --accent-deep: #2b3bb0; --accent-soft: #eceefd; --wave-rest: #cfcadf; --cover: linear-gradient(135deg, #1c2464 0%, #3b4fd8 42%, #8a5cf5 74%, #f4a38c 100%); }
.theme-teal   { --accent: #0f7b6c; --accent-deep: #0b5e53; --accent-soft: #e3f4f1; --wave-rest: #c3dcd7; --cover: linear-gradient(135deg, #073b35 0%, #0f7b6c 45%, #58b89a 75%, #f2d38a 100%); }
.theme-rose   { --accent: #c2417a; --accent-deep: #9c2f60; --accent-soft: #fbe9f1; --wave-rest: #ecc9d8; --cover: linear-gradient(135deg, #4a1638 0%, #c2417a 45%, #f08a7e 75%, #ffd59e 100%); }
.theme-ocean  { --accent: #1f6aa8; --accent-deep: #17548a; --accent-soft: #e6f0fa; --wave-rest: #c5d8ea; --cover: linear-gradient(135deg, #0b2a4a 0%, #1f6aa8 45%, #4fb3d9 75%, #c9f0e8 100%); }
.theme-forest { --accent: #3a7029; --accent-deep: #2b5520; --accent-soft: #eaf3e5; --wave-rest: #cfdfc6; --cover: linear-gradient(135deg, #142c0e 0%, #3a7029 45%, #8fbf4d 75%, #f0e29a 100%); }
.theme-amber  { --accent: #a8501a; --accent-deep: #833d13; --accent-soft: #fbede3; --wave-rest: #ecd2bf; --cover: linear-gradient(135deg, #451b06 0%, #a8501a 45%, #ef9147 75%, #ffdc8f 100%); }
.theme-plum   { --accent: #7a3fb0; --accent-deep: #5e2f8a; --accent-soft: #f2eafa; --wave-rest: #ddcdea; --cover: linear-gradient(135deg, #2a1240 0%, #7a3fb0 45%, #c27ad8 75%, #f7c6d9 100%); }
.theme-slate  { --accent: #3d4a5c; --accent-deep: #2c3644; --accent-soft: #eceef2; --wave-rest: #d0d5dd; --cover: linear-gradient(135deg, #11161f 0%, #3d4a5c 45%, #7d8ea6 75%, #d6dde8 100%); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scrollbar-gutter: stable; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;
  background: var(--bg); color: var(--ink);
  font-family: var(--f-body); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-wrap: break-word;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
h1, h2, h3 { margin: 0 0 .45em; font-family: var(--f-body); font-weight: 800; line-height: 1.18; letter-spacing: -.02em; color: var(--ink); }
h1 { font-size: clamp(1.6rem, 1.3rem + 1.4vw, 2.2rem); }
h2 { font-size: clamp(1.2rem, 1.1rem + .5vw, 1.4rem); }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
[id] { scroll-margin-top: calc(var(--header-h) + 16px); }
[hidden] { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -80px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 12px 16px; border-radius: 10px; font-weight: 600; text-decoration: none; }
.skip-link:focus { top: max(12px, var(--safe-top)); }
.sx-ico { width: 20px; height: 20px; flex: none; }

/* ---------- Header: the dark frame keeps the white logo crisp ---------- */
.sx-header { position: sticky; top: 0; z-index: 20; background: var(--frame); padding-top: var(--safe-top); font-size: 16px; }
.sx-header-in { max-width: 1120px; margin: 0 auto; min-height: var(--header-h); padding: 8px var(--gutter-r) 8px var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sx-brand { display: inline-flex; align-items: center; min-height: 44px; flex-shrink: 0; }
.sx-brand img { width: 124px; height: auto; }
.sx-header-tools { display: flex; align-items: center; gap: 8px; }
.sx-inline { margin: 0; }
.sx-header .sx-btn-quiet { background: transparent; color: var(--frame-ink); border-color: #3a404e; }
@media (hover: hover) { .sx-header .sx-btn-quiet:hover { background: var(--frame-2); border-color: var(--frame-dim); } }
.sx-lang { display: inline-flex; margin: 0; border: 1px solid #3a404e; border-radius: 999px; padding: 2px; }
.sx-lang button { min-width: 44px; min-height: 40px; padding: 0 10px; border: 0; border-radius: 999px; background: transparent; color: var(--frame-dim); font: 600 .85rem/1 var(--f-body); letter-spacing: .06em; cursor: pointer; }
.sx-lang button[aria-pressed="true"] { background: var(--frame-ink); color: var(--frame); }
@media (hover: hover) { .sx-lang button:not([aria-pressed="true"]):hover { color: var(--frame-ink); } }

/* ---------- Main ---------- */
.sx-main { flex: 1 0 auto; width: 100%; max-width: 720px; margin: 0 auto; padding: clamp(20px, 4vw, 40px) var(--gutter-r) 56px var(--gutter); }
.is-admin .sx-main { max-width: 820px; }
.sx-panel { background: var(--surface); border-radius: var(--radius); padding: clamp(20px, 4vw, 32px); margin-bottom: 20px; box-shadow: var(--shadow); }
.sx-panel-warn { background: var(--warn-soft); box-shadow: none; border: 1px solid #f0dca8; }
.sx-center { text-align: center; }
.sx-center .sx-btn { margin-top: 8px; }
.sx-kicker { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); font-weight: 800; margin-bottom: .5em; }
.sx-dim { color: var(--ink-2); }
.sx-small { font-size: .9rem; margin-top: 12px; }
.sx-mono { font-family: var(--f-mono); font-weight: 600; font-size: .92rem; }
.sx-note { margin-top: 16px; padding: 12px 14px; border-radius: var(--radius-s); background: var(--surface-2); color: var(--ink-2); font-size: .95rem; }
.sx-icon-lg { width: 44px; height: 44px; margin: 0 auto 12px; color: var(--accent); }

/* ---------- Buttons ---------- */
.sx-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border: 1px solid var(--accent); border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
  font: 700 1rem/1.2 var(--f-body); text-decoration: none; text-align: center;
  cursor: pointer; touch-action: manipulation; transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.sx-btn-block { width: 100%; }
.sx-btn-quiet { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.sx-btn-small { min-height: 44px; padding: 0 16px; font-size: .92rem; }
.sx-btn-small .sx-ico { width: 18px; height: 18px; }
.sx-btn-danger { background: var(--surface); color: var(--danger); border-color: #ecb8af; }
.sx-btn.is-busy { opacity: .7; cursor: progress; }
@media (hover: hover) {
  .sx-btn:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
  .sx-btn-quiet:hover { background: var(--surface-2); border-color: var(--ink-3); }
  .sx-btn-danger:hover { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }
}

/* ---------- Forms ---------- */
.sx-auth { max-width: 440px; margin-left: auto; margin-right: auto; }
.sx-auth-wide { max-width: 560px; }
.sx-auth-logo { width: 140px; margin-bottom: 20px; padding: 12px 16px; background: var(--frame); border-radius: 12px; box-sizing: content-box; }
.sx-form { margin-top: 20px; }
.sx-field { margin-bottom: 18px; }
.sx-field label, .sx-fieldset legend { display: block; font-weight: 700; margin-bottom: 6px; }
.sx-fieldset { border: 1px solid var(--line); border-radius: var(--radius-s); padding: 16px; margin: 8px 0 20px; min-width: 0; background: var(--surface); }
.sx-fieldset legend { padding: 0 6px; }
.sx-field input, .sx-field select, .sx-field textarea {
  width: 100%; min-height: 48px; padding: 10px 14px;
  font: 16px/1.4 var(--f-body); color: var(--ink); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: var(--radius-s);
  -webkit-appearance: none; appearance: none;
}
.sx-field select { background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%); background-position: calc(100% - 20px) 21px, calc(100% - 15px) 21px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px; }
.sx-field input:focus-visible, .sx-field select:focus-visible, .sx-field textarea:focus-visible { outline: 3px solid var(--accent-soft); outline-offset: 0; border-color: var(--accent); }
.sx-field input[aria-invalid="true"], .sx-field textarea[aria-invalid="true"] { border-color: var(--danger); }
.sx-field textarea { min-height: 220px; line-height: 1.6; resize: vertical; padding: 12px 14px; display: block; }
.sx-field input[type="date"], .sx-field input[type="time"] { min-width: 0; }
.sx-help { font-size: .9rem; color: var(--ink-3); margin: 6px 0 0; }
.sx-error { font-size: .92rem; color: var(--danger); margin: 6px 0 0; font-weight: 600; }
.sx-alert { background: var(--danger-soft); color: #7a1f10; border: 1px solid #f2c4bc; border-radius: var(--radius-s); padding: 12px 14px; margin: 16px 0 0; }
.sx-optional { font-weight: 400; color: var(--ink-3); font-size: .92rem; }

/* ---------- Setup guide, kept from Stage 3 ---------- */
.sx-step { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 16px; }
.sx-key { font-family: var(--f-mono); font-size: 1.05rem; letter-spacing: .08em; word-spacing: .2em; background: var(--surface-2); border: 1px dashed var(--line-strong); border-radius: 10px; padding: 12px 14px; user-select: all; -webkit-user-select: all; overflow-wrap: anywhere; }
.sx-codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 0 0 20px; padding: 14px 14px 14px 36px; background: var(--surface-2); border-radius: 10px; font-family: var(--f-mono); font-size: 1.02rem; letter-spacing: .06em; user-select: all; -webkit-user-select: all; }
.sx-steps { list-style: none; counter-reset: sx-step; margin: 24px 0 0; padding: 0; }
.sx-steps-item { counter-increment: sx-step; position: relative; padding: 0 0 24px 48px; margin: 0 0 24px; border-bottom: 1px solid var(--line); }
.sx-steps-item:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.sx-steps-item::before { content: counter(sx-step); position: absolute; left: 0; top: -2px; width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--accent); color: var(--accent-ink); font: 800 1rem/1 var(--f-body); }
.sx-steps-title { font-size: 1.08rem; font-weight: 700; margin: 4px 0 6px; line-height: 1.35; letter-spacing: 0; }
.sx-tip { margin-top: 10px; padding: 10px 12px; border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 0 10px 10px 0; font-size: .93rem; color: var(--ink); }
.sx-qr-wrap { margin: 16px 0; }
.sx-qr { display: block; width: 100%; max-width: 232px; height: auto; border-radius: 12px; border: 1px solid var(--line); }
.sx-phone-alt { margin: 0 0 12px; }
.sx-phone-alt .sx-help { margin: 0 0 8px; }
.sx-details { margin-top: 4px; }
.sx-details summary { cursor: pointer; color: var(--accent); font-weight: 600; min-height: 44px; display: flex; align-items: center; list-style-position: inside; }
.sx-code-input { font-family: var(--f-mono) !important; font-size: 1.4rem !important; letter-spacing: .3em; text-align: center; max-width: 240px; }
@media (max-width: 380px) { .sx-steps-item { padding-left: 0; padding-top: 44px; } .sx-steps-item::before { top: 0; } }

/* ---------- Lists ---------- */
.sx-list { margin: 0; padding-left: 1.2em; }
.sx-list li + li { margin-top: 6px; }
.sx-rows { list-style: none; margin: 0; padding: 0; }
.sx-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.sx-row:first-child { border-top: 0; padding-top: 0; }
.sx-row-main { display: flex; flex-direction: column; min-width: 0; }
.sx-rows-tight .sx-row { padding: 8px 0; }
.sx-row-wrap { flex-wrap: wrap; }
.sx-row-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.sx-backlink { margin: 0 0 12px; }
.sx-backlink a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: .95rem; }
@media (hover: hover) { .sx-backlink a:hover { color: var(--ink); } }

/* ---------- Footer ---------- */
.sx-footer { background: var(--frame); color: var(--frame-dim); padding-bottom: env(safe-area-inset-bottom); }
.sx-footer-in { max-width: 1120px; margin: 0 auto; padding: 32px var(--gutter-r) 32px var(--gutter); font-size: .92rem; }
.sx-footer-logo { width: 92px; margin-bottom: 12px; }
.sx-footer-tag { color: var(--frame-ink); opacity: .85; }
.sx-footer-base { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 12px; }
.sx-footer-base a { color: var(--frame-dim); display: inline-flex; align-items: center; min-height: 44px; margin: -12px 0; }

/* =====================================================================
   Pages and posts
   ===================================================================== */
.is-page .sx-main { max-width: 1120px; padding-top: 0; }
.sx-page-grid { display: block; }
.sx-feed-col { min-width: 0; }

/* Profile: a colour cover in the page's accent, the photo overlapping it */
.sx-profile { position: relative; margin: 0 calc(var(--gutter-r) * -1) 24px calc(var(--gutter) * -1); background: var(--surface); box-shadow: var(--shadow); }
.sx-cover { position: relative; overflow: hidden; height: clamp(120px, 32vw, 200px); background: var(--cover); }
.sx-cover::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 18% 120%, rgba(255, 255, 255, .28), transparent 45%), radial-gradient(circle at 92% -20%, rgba(255, 255, 255, .22), transparent 40%);
}
.sx-cover-lamp { display: none; }
.sx-profile-in { padding: 0 var(--gutter-r) 22px var(--gutter); }
.sx-profile-photo { margin-top: -56px; margin-bottom: 12px; position: relative; }
.sx-profile .sx-chapter { margin: 0 0 4px; }
.sx-chapter { display: flex; align-items: center; gap: 8px; line-height: 1.2; }
.sx-chapter-diamond { display: none; }
.sx-chapter-name { font-size: .88rem; font-weight: 500; color: var(--ink-3); overflow-wrap: anywhere; }
.sx-profile-name { font-size: clamp(1.75rem, 1.45rem + 1.6vw, 2.3rem); margin-bottom: 8px; }
.sx-profile-bio { color: var(--ink-2); font-size: 1.02rem; max-width: 36em; }
.sx-profile-bio p { margin-bottom: .6em; }
/* A long introduction shows four lines and a See more button (social.js). */
.sx-profile-bio.is-clamped { max-height: 6.4em; overflow: hidden; -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent); mask-image: linear-gradient(180deg, #000 55%, transparent); }
.sx-bio-more { display: inline-flex; align-items: center; min-height: 44px; margin: -6px 0 0; padding: 0; border: 0; background: none; color: var(--accent-deep); font: 700 .95rem/1.2 var(--f-body); cursor: pointer; touch-action: manipulation; }
@media (hover: hover) { .sx-bio-more:hover { text-decoration: underline; } }
.sx-facts { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; font-size: .88rem; color: var(--ink-2); }
.sx-facts li { display: inline-flex; align-items: center; gap: 5px; padding: 5px 12px; border-radius: 999px; background: var(--surface-2); }
.sx-facts strong { color: var(--ink); font-weight: 800; }
.sx-profile-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }

/* Avatars */
.sx-avatar { display: block; flex: none; border-radius: 50%; object-fit: cover; object-position: 50% 22%; background: var(--surface-2); }
.sx-avatar-sm { width: 44px; height: 44px; }
.sx-avatar-md { width: 56px; height: 56px; }
.sx-avatar-lg { width: 112px; height: 112px; border: 4px solid var(--surface); box-shadow: var(--shadow-lift); }
.sx-avatar-mono { display: flex; align-items: center; justify-content: center; background: var(--cover); color: #fff; font-weight: 800; letter-spacing: -.01em; }
.sx-avatar-sm.sx-avatar-mono { font-size: .95rem; }
.sx-avatar-md.sx-avatar-mono { font-size: 1.15rem; }
.sx-avatar-lg.sx-avatar-mono { font-size: 2.3rem; }

/* Feed */
.sx-feed-head { margin: 0 0 14px; font-size: 1.05rem; font-weight: 800; letter-spacing: -.01em; }
.sx-feed-head .sx-chapter-name { font-size: 1.05rem; font-weight: 800; color: var(--ink); }
.sx-post { position: relative; margin: 0 0 16px; padding: 20px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.sx-post:focus { outline: 3px solid var(--accent); outline-offset: 2px; }
.sx-post.is-pinned { box-shadow: var(--shadow), inset 0 0 0 2px var(--accent-soft); }
.sx-post-flag { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 14px; padding: 4px 12px 4px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-deep); font-size: .8rem; font-weight: 700; }
.sx-post-flag .sx-ico { width: 15px; height: 15px; }
.sx-post-head { display: flex; align-items: center; gap: 12px; }
.sx-post-meta { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.sx-post-author { display: inline-block; align-self: flex-start; max-width: 100%; padding-top: 8px; margin-top: -8px; font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.sx-post-date { display: inline-block; align-self: flex-start; padding: 0 0 10px; margin: 0 0 -10px; color: var(--ink-3); font-size: .88rem; text-decoration: none; font-variant-numeric: tabular-nums; }
@media (hover: hover) { .sx-post-date:hover { color: var(--ink); text-decoration: underline; } }
.sx-icon-btn { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 44px; height: 44px; margin: -6px -8px -6px auto; border-radius: 50%; color: var(--ink-3); text-decoration: none; }
@media (hover: hover) { .sx-icon-btn:hover { background: var(--surface-2); color: var(--ink); } }
.sx-post-title { font-size: clamp(1.2rem, 1.08rem + .6vw, 1.45rem); margin: 16px 0 0; }
.sx-post-title a { color: var(--ink); text-decoration: none; }
@media (hover: hover) { .sx-post-title a:hover { color: var(--accent); } }
.sx-post-body { margin-top: 12px; font-size: 1.0625rem; line-height: 1.68; color: #23262d; }
.sx-post-body p { margin: 0 0 .85em; }
.sx-post-body p:last-child { margin-bottom: 0; }
.sx-post-body a { overflow-wrap: anywhere; font-weight: 500; }
.sx-post-body.is-full { font-size: 1.125rem; }
.sx-post-more { margin: 12px 0 0; }
.sx-post-more a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; text-decoration: none; }

.sx-feed-foot { display: flex; flex-direction: column; align-items: center; gap: 14px; margin: 8px 0 12px; }
.sx-more { min-width: min(100%, 260px); }
.sx-feed-end { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 8px 0; color: var(--ink-3); font-size: .9rem; text-align: center; }
.sx-feed-end .sx-chapter-diamond { display: block; width: 28px; height: 1px; background: var(--line-strong); }

/* Loading */
.sx-skeleton { min-height: 180px; }
.sx-skeleton .sx-post-head { margin-bottom: 18px; }
.sx-sk-lines { display: flex; flex-direction: column; flex: 1; gap: 8px; }
.sx-sk { display: block; border-radius: 8px; background: linear-gradient(90deg, #efece6 0%, #f7f5f1 50%, #efece6 100%); background-size: 200% 100%; animation: sx-shimmer 1.4s ease-in-out infinite; }
.sx-sk-avatar { width: 44px; height: 44px; border-radius: 50%; flex: none; }
.sx-sk-line { height: 12px; margin-bottom: 12px; }
.sx-sk-lines .sx-sk-line { margin-bottom: 0; }
.sx-w25 { width: 25%; } .sx-w40 { width: 40%; } .sx-w70 { width: 70%; }
@keyframes sx-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* Error, offline, state, toast */
.sx-inline-error, .sx-offline, .sx-state { display: flex; align-items: flex-start; gap: 12px; text-align: left; padding: 14px 16px; border-radius: var(--radius-s); margin: 0 0 16px; width: 100%; }
.sx-inline-error { background: var(--danger-soft); color: #7a1f10; }
.sx-inline-error .sx-ico { color: var(--danger); margin-top: 2px; }
.sx-inline-error p { margin-bottom: 10px; }
.sx-offline { background: var(--warn-soft); color: #4d3600; }
.sx-offline .sx-ico { color: var(--warn); margin-top: 2px; }
.sx-state { background: var(--accent-soft); color: var(--ink); }
.sx-state .sx-ico { color: var(--accent); margin-top: 2px; }
.sx-state p { margin: 0; }
.sx-toast { display: flex; align-items: center; gap: 10px; padding: 12px 16px; margin: 0 0 16px; border-radius: var(--radius-s); background: var(--ok-soft); color: #0d4a2b; font-weight: 600; transition: opacity .4s ease, max-height .4s ease, padding .4s ease, margin .4s ease; }
.sx-toast .sx-ico { color: var(--ok); }
.sx-toast.is-leaving { opacity: 0; }

/* Empty */
.sx-empty { text-align: center; padding: 40px 22px; margin-bottom: 16px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.sx-empty-art { width: 96px; height: 96px; margin: 0 auto 10px; display: block; }
.sx-empty-title { font-size: 1.35rem; margin-bottom: 8px; }
.sx-empty .sx-dim { max-width: 30em; margin: 0 auto 20px; }
.sx-empty-small { padding: 24px; }
.sx-empty-small .sx-dim { margin-bottom: 0; }

/* Write button on phones, in reach of a thumb */
.sx-fab { position: fixed; z-index: 15; right: max(16px, calc(env(safe-area-inset-right) + 12px)); bottom: max(16px, calc(env(safe-area-inset-bottom) + 12px)); display: inline-flex; align-items: center; gap: 8px; min-height: 56px; padding: 0 22px 0 18px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); text-decoration: none; font-weight: 800; box-shadow: 0 14px 30px -10px rgba(21, 23, 28, .55); }
.sx-fab .sx-ico { width: 22px; height: 22px; }
.has-fab .sx-footer { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }

/* One post */
.sx-single { max-width: 720px; margin: 0 auto; padding-top: clamp(12px, 3vw, 28px); }
.sx-single .sx-post { padding: clamp(22px, 4vw, 36px) clamp(20px, 4vw, 40px); }
.sx-single .sx-post-title { font-size: clamp(1.6rem, 1.3rem + 1.4vw, 2.2rem); }
.sx-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; }

/* ---------- Composer ---------- */
.sx-compose { max-width: 680px; margin: 0 auto; }
.sx-compose-head { margin-bottom: 20px; }
.sx-compose-head h1 { margin-bottom: 6px; }
.sx-field-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; }
.sx-field-foot .sx-help { flex: 1 1 260px; }
.sx-count { margin: 6px 0 0; font-size: .88rem; color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sx-count.is-near { color: var(--warn); }
.sx-count.is-over { color: var(--danger); font-weight: 700; }
.sx-error-summary a { color: #7a1f10; }
.sx-error-summary:focus { outline: 3px solid var(--danger); outline-offset: 2px; }
.sx-choice-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 600px) { .sx-choice-grid-2 { grid-template-columns: 1fr 1fr; } }
.sx-choice { position: relative; display: block; cursor: pointer; }
.sx-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sx-choice-box { position: relative; display: block; height: 100%; padding: 14px 14px 14px 48px; min-height: 64px; border: 1px solid var(--line-strong); border-radius: var(--radius-s); background: var(--surface); transition: border-color .15s ease, background-color .15s ease; }
.sx-choice-box::before { content: ''; position: absolute; left: 16px; top: 16px; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--surface); }
.sx-choice input:checked + .sx-choice-box { border-color: var(--accent); background: var(--accent-soft); }
.sx-choice input:checked + .sx-choice-box::before { border-color: var(--accent); background: radial-gradient(circle, var(--accent) 0 5px, var(--surface) 5.5px); }
.sx-choice input:focus-visible + .sx-choice-box { outline: 3px solid var(--accent); outline-offset: 2px; }
.sx-choice-title { display: block; font-weight: 700; color: var(--ink); line-height: 1.35; }
.sx-choice-text { display: block; font-size: .88rem; color: var(--ink-2); line-height: 1.45; margin-top: 2px; }
.sx-choice-media { display: flex; align-items: center; gap: 14px; }
@media (hover: hover) { .sx-choice:hover .sx-choice-box { border-color: var(--ink-3); } }
.sx-schedule { margin-top: 16px; }
.sx-schedule-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sx-schedule .sx-field { margin-bottom: 0; }
.sx-switch-field { margin: 4px 0 20px; }
.sx-switch { position: relative; display: inline-flex; align-items: center; gap: 12px; min-height: 48px; cursor: pointer; font-weight: 700; }
.sx-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sx-switch-track { position: relative; flex: none; width: 48px; height: 28px; border-radius: 999px; background: var(--line-strong); transition: background-color .2s ease; }
.sx-switch-thumb { position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s ease; }
.sx-switch input:checked + .sx-switch-track { background: var(--accent); }
.sx-switch input:checked + .sx-switch-track .sx-switch-thumb { transform: translateX(20px); }
.sx-switch input:focus-visible + .sx-switch-track { outline: 3px solid var(--accent); outline-offset: 3px; }
.sx-switch-field .sx-help { margin-top: 0; }
.sx-compose-bar { position: sticky; bottom: 0; z-index: 10; display: flex; gap: 10px; margin: 24px calc(var(--gutter-r) * -1) 0 calc(var(--gutter) * -1); padding: 12px var(--gutter-r) max(12px, env(safe-area-inset-bottom)) var(--gutter); background: rgba(255, 255, 255, .96); border-top: 1px solid var(--line); }
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) { .sx-compose-bar { background: rgba(255, 255, 255, .82); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); } }
.sx-compose-bar .sx-btn { flex: 1 1 0; min-width: 0; padding: 0 14px; }
.sx-compose-bar [type="submit"] { flex-grow: 2; }
.sx-restore { background: var(--warn-soft); border-radius: var(--radius-s); padding: 14px 16px; margin-bottom: 20px; }
.sx-restore p { margin-bottom: 10px; }
.sx-restore-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.sx-danger-zone { margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--line); }
.sx-danger-zone h2 { font-size: 1.05rem; }

/* Badges */
.sx-badge { display: inline-flex; align-items: center; gap: 4px; vertical-align: middle; padding: 3px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700; line-height: 1.5; }
.sx-badge .sx-ico { width: 13px; height: 13px; }
.sx-badge-published { background: var(--ok-soft); color: var(--ok); }
.sx-badge-scheduled { background: var(--warn-soft); color: var(--warn); }
.sx-badge-draft { background: var(--surface-2); color: var(--ink-2); }
.sx-badge-hidden { background: var(--danger-soft); color: var(--danger); }
.sx-badge-pending_guardian { background: var(--accent-soft); color: var(--accent-deep); }
.sx-badge-pin { background: var(--accent-soft); color: var(--accent-deep); }

/* Admin post list */
.sx-list-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; margin-bottom: 18px; }
.sx-list-head h1 { margin-bottom: 0; }
.sx-tabs { display: flex; gap: 6px; margin: 0 calc(var(--gutter-r) * -1) 18px calc(var(--gutter) * -1); padding: 2px var(--gutter-r) 6px var(--gutter); overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.sx-tabs::-webkit-scrollbar { display: none; }
.sx-tabs a { display: inline-flex; align-items: center; gap: 6px; flex: none; min-height: 44px; padding: 0 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: .92rem; }
.sx-tabs a[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.sx-tab-n { font-variant-numeric: tabular-nums; opacity: .7; font-weight: 500; }
@media (hover: hover) { .sx-tabs a:not([aria-current]):hover { color: var(--ink); border-color: var(--ink-3); } }
.sx-postlist { list-style: none; margin: 0 0 20px; padding: 0; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.sx-postrow { display: flex; flex-direction: column; gap: 12px; padding: 16px 18px; border-top: 1px solid var(--line); }
.sx-postrow:first-child { border-top: 0; }
.sx-postrow-main { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.sx-postrow-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 2px; }
.sx-postrow-title { color: var(--ink); font-weight: 700; text-decoration: none; line-height: 1.4; }
@media (hover: hover) { .sx-postrow-title:hover { color: var(--accent); } }
.sx-postrow-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.sx-postrow .sx-small { margin-top: 0; }

/* Delete confirmation */
.sx-confirm { max-width: 560px; margin: clamp(8px, 4vw, 40px) auto 0; }
.sx-confirm-icon { width: 52px; height: 52px; border-radius: 50%; margin-bottom: 14px; display: flex; align-items: center; justify-content: center; background: var(--danger-soft); color: var(--danger); }
.sx-confirm-icon .sx-ico { width: 26px; height: 26px; }
.sx-quote { margin: 16px 0; padding: 12px 16px; background: var(--surface-2); border-left: 3px solid var(--line-strong); border-radius: 0 10px 10px 0; overflow-wrap: anywhere; }
.sx-quote footer { margin-top: 8px; }
.sx-confirm-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }

/* ---------- Wider screens ---------- */
@media (min-width: 600px) {
  .sx-brand img { width: 124px; }
  .sx-profile { margin: clamp(20px, 3vw, 32px) 0 24px; border-radius: var(--radius); overflow: hidden; }
  .sx-profile-in { padding: 0 28px 26px; }
  .sx-post { padding: 24px 28px; }
  .sx-tabs { margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; flex-wrap: wrap; overflow: visible; }
  .sx-compose-bar { position: static; margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; justify-content: flex-end; border-top: 0; background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .sx-compose-bar .sx-btn { flex: 0 0 auto; padding: 0 26px; }
}
@media (min-width: 720px) {
  .sx-postrow { flex-direction: row; align-items: center; justify-content: space-between; }
  .sx-postrow-actions { flex: none; }
}
@media (min-width: 760px) { .sx-page-grid > * { max-width: 680px; margin-left: auto; margin-right: auto; } }
@media (min-width: 1080px) {
  .sx-page-grid { display: grid; grid-template-columns: 320px minmax(0, 680px); gap: 32px; justify-content: center; align-items: start; padding-top: 32px; }
  .sx-page-grid > * { max-width: none; margin: 0; }
  .sx-side { position: sticky; top: var(--side-top, calc(var(--header-h) + 24px)); }
  .sx-profile { margin: 0; }
  .sx-cover { height: 120px; }
  .sx-profile-in { padding: 0 24px 24px; }
  .sx-avatar-lg { width: 104px; height: 104px; }
  .sx-profile-photo { margin-top: -52px; }
  .sx-profile-name { font-size: 1.9rem; }
  .sx-profile-tools .sx-btn { width: 100%; justify-content: flex-start; }
  .sx-fab { display: none; }
  .has-fab .sx-footer { padding-bottom: env(safe-area-inset-bottom); }
}
@media (min-width: 1800px) {
  .is-page { font-size: 17px; }
  .is-page .sx-main { max-width: 1180px; }
  .sx-page-grid { grid-template-columns: 340px minmax(0, 720px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .sx-sk { animation: none; }
}
.sx-empty-art .e-bg { fill: var(--accent-soft); }
.sx-empty-art .e-bubble { fill: var(--surface); stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; }
.sx-empty-art .e-lines { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; }

/* =====================================================================
   Stage 5: sign-in, likes and comments
   ===================================================================== */
.sx-btn[aria-disabled="true"] { opacity: .72; cursor: progress; }
.sx-btn-wide { width: 100%; }
.sx-btn-icon { padding: 0 12px; }
.sx-offscreen { position: fixed; left: -9999px; top: 0; opacity: 0; }
.sx-chapter-count { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 26px; padding: 0 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-deep); font-size: .82rem; font-weight: 800; }

/* Header: sign in, and the signed-in member */
.sx-btn-signin { background: var(--frame-ink); color: var(--frame); border-color: var(--frame-ink); }
@media (hover: hover) { .sx-header .sx-btn-signin:hover { background: #ffffff; border-color: #ffffff; color: var(--frame); } }
.sx-me { display: inline-flex; align-items: center; gap: 8px; min-width: 0; color: var(--frame-ink); font-weight: 600; font-size: .92rem; }
.sx-me-name { max-width: 9em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sx-hide-sm { display: none; }
@media (max-width: 479px) { .sx-me-name { display: none; } }
@media (min-width: 600px) { .sx-hide-sm { display: inline; } }

/* Member initials: six calm tones, never a provider photo */
.sx-mav { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 36px; height: 36px; border-radius: 50%; font-size: .8rem; font-weight: 800; letter-spacing: .02em; color: #fff; background: #4a5368; }
.sx-mav-0 { background: #3b4fd8; } .sx-mav-1 { background: #0f7b6c; } .sx-mav-2 { background: #c2417a; }
.sx-mav-3 { background: #9a5b13; } .sx-mav-4 { background: #6b48c9; } .sx-mav-5 { background: #2f6f9f; }
.sx-mav-preview { background: var(--accent); }
.sx-single .sx-post-actions { margin-bottom: calc(-1 * clamp(10px, 2vw, 20px)); }
.sx-mav-gone { background: var(--surface-2); border: 1px dashed var(--line-strong); }
.sx-header .sx-mav { width: 32px; height: 32px; box-shadow: 0 0 0 2px var(--frame), 0 0 0 3px #3a404e; }

/* ---------- Sign-in pages ---------- */
.is-auth .sx-main { max-width: 520px; }
.sx-auth-card { position: relative; background: var(--surface); border-radius: 24px; padding: clamp(24px, 6vw, 40px) clamp(20px, 6vw, 40px); box-shadow: var(--shadow-lift); overflow: hidden; }
.sx-auth-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 6px; background: var(--cover); }
.sx-auth-art { display: block; width: 168px; height: auto; margin: 4px auto 18px; overflow: visible; }
.sx-auth-art .a-b > path:first-child { stroke: var(--surface); stroke-width: 3; stroke-linejoin: round; }
.sx-auth-art .a-b1 > path:first-child { fill: #3b4fd8; } .sx-auth-art .a-b2 > path:first-child { fill: #0f7b6c; } .sx-auth-art .a-b3 > path:first-child { fill: #c2417a; }
.sx-auth-art .a-ic { fill: #fff; } .sx-auth-art .a-st { fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sx-auth-art .a-play { stroke: #fff; stroke-width: 2; stroke-linejoin: round; }
.sx-auth-art text { fill: #fff; font: 800 17px/1 var(--f-body); text-anchor: middle; }
.sx-auth-art .a-heart { fill: #f08a7e; transform-origin: 80px 84px; animation: sx-beat 2.4s ease-in-out 0.6s 2; }
.sx-auth-art .a-b { animation: sx-rise .6s cubic-bezier(.2, .8, .2, 1) both; }
.sx-auth-art .a-b2 { animation-delay: .08s; } .sx-auth-art .a-b3 { animation-delay: .16s; }
@keyframes sx-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes sx-beat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.22); } 30% { transform: scale(1); } 45% { transform: scale(1.12); } }
.sx-auth-title { text-align: center; font-size: clamp(1.5rem, 1.3rem + 1vw, 1.9rem); margin-bottom: .3em; }
.sx-auth-lead { text-align: center; color: var(--ink-2); margin: 0 auto 22px; max-width: 30em; }
.sx-auth-email { color: var(--ink); overflow-wrap: anywhere; }
.sx-auth-badge { display: flex; align-items: center; justify-content: center; width: 64px; height: 64px; margin: 8px auto 16px; border-radius: 20px; background: var(--accent-soft); color: var(--accent); }
.sx-auth-badge .sx-ico { width: 30px; height: 30px; }
.sx-auth-form { margin: 0; }
.sx-label { display: block; font-weight: 700; margin: 0 0 6px; }
.sx-input {
  display: block; width: 100%; min-height: 52px; padding: 12px 14px;
  border: 1px solid var(--line-strong); border-radius: 14px; background: var(--surface); color: var(--ink);
  font: 400 16px/1.4 var(--f-body); -webkit-appearance: none; appearance: none;
}
.sx-input:focus-visible { outline: 3px solid var(--accent-soft); outline-offset: 0; border-color: var(--accent); }
.sx-input[aria-invalid="true"] { border-color: var(--danger); }
.sx-input-icon { position: relative; margin-bottom: 14px; }
.sx-input-icon .sx-ico { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.sx-input-icon .sx-input { padding-left: 46px; }
.sx-code { font-family: var(--f-mono); font-size: 1.75rem; font-weight: 700; letter-spacing: .3em; text-align: center; margin-bottom: 8px; }
/* "Or tap the button in the email": the easy way for people who find typing hard. */
.sx-code-or { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 18px; padding: 12px 14px; border-radius: 14px; background: var(--accent-soft); color: var(--ink); text-align: left; font-size: .95rem; line-height: 1.45; }
.sx-code-or .sx-ico { flex: none; margin-top: 1px; color: var(--accent); }
.sx-code::placeholder { color: var(--line-strong); letter-spacing: .18em; }
.sx-auth-hint { color: var(--ink-3); font-size: .9rem; margin: 10px 0 0; text-align: center; }
.sx-field-hint { margin: 6px 0 14px; text-align: left; }
.sx-auth-form .sx-btn-wide { margin-top: 4px; }
.sx-or { display: flex; align-items: center; gap: 12px; margin: 22px 0; color: var(--ink-3); font-size: .88rem; }
.sx-or::before, .sx-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.sx-btn-google {
  display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 52px; padding: 0 20px;
  border: 1px solid var(--line-strong); border-radius: 999px; background: #fff; color: #1f1f1f;
  font: 600 1rem/1.2 var(--f-body); text-decoration: none; transition: background-color .15s ease, box-shadow .15s ease;
}
@media (hover: hover) { .sx-btn-google:hover { background: #f8f9fb; box-shadow: var(--shadow); } }
.sx-auth-foot { display: flex; gap: 10px; align-items: flex-start; margin: 24px 0 0; padding-top: 18px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: .86rem; line-height: 1.5; }
.sx-auth-foot .sx-ico { width: 18px; height: 18px; color: var(--ok); margin-top: 1px; }
.sx-auth-back { text-align: center; margin: 18px 0 0; }
.sx-auth-back a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--ink-2); font-weight: 600; text-decoration: none; }
.sx-auth-alt { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); text-align: center; }
.sx-auth-alt p { flex-basis: 100%; margin: 0 0 4px; }
.sx-inapp { margin: 0 0 20px; padding: 14px 16px; border-radius: var(--radius-s); background: var(--warn-soft); color: #5c3c00; font-size: .95rem; }
.sx-inapp p { margin-bottom: 10px; }
.sx-inapp-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.sx-inapp .sx-small { margin: 10px 0 0; color: #6b4a00; }
.sx-toast-inline { margin-bottom: 18px; }
.sx-field-error { display: flex; align-items: flex-start; gap: 6px; margin: 0 0 8px; color: var(--danger); font-weight: 600; font-size: .92rem; }
.sx-field-error .sx-ico { width: 18px; height: 18px; margin-top: 2px; }

/* Welcome: preview of the public name, checkboxes */
.sx-preview { margin: 16px 0 20px; padding: 14px 16px; border-radius: var(--radius-s); background: var(--surface-2); }
.sx-preview-label { display: block; font-size: .74rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px; }
.sx-preview-row { display: flex; gap: 12px; align-items: flex-start; }
.sx-preview-row > div { display: flex; flex-direction: column; min-width: 0; line-height: 1.4; }
.sx-preview-text { color: var(--ink-2); }
.sx-check { position: relative; display: flex; align-items: flex-start; gap: 12px; margin: 0 0 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); }
.sx-check.is-invalid { border-color: var(--danger); background: var(--danger-soft); }
.sx-check input { position: relative; z-index: 1; flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--accent); }
.sx-check label { flex: 1; cursor: pointer; line-height: 1.45; }
.sx-check label::after { content: ""; position: absolute; inset: 0; }
.sx-check a { position: relative; z-index: 1; display: inline-block; padding: 4px 0; font-weight: 600; }
.sx-auth-form > .sx-btn-wide:last-of-type { margin-top: 12px; }

/* House rules */
.sx-prose h2 { font-size: 1.1rem; margin: 1.6em 0 .4em; }
.sx-prose ul { margin: 0 0 1em; padding-left: 1.2em; }
.sx-prose li { margin-bottom: .35em; }
.sx-rules .sx-auth-title, .sx-rules .sx-auth-lead { text-align: left; margin-left: 0; }

/* ---------- Like and comment bar on each post ---------- */
.sx-post-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 16px -8px -8px; padding-top: 10px; border-top: 1px solid var(--line); }
.sx-act {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border: 0; border-radius: 999px;
  background: transparent; color: var(--ink-2); font: 600 .94rem/1 var(--f-body); text-decoration: none; cursor: pointer; touch-action: manipulation;
  transition: background-color .15s ease, color .15s ease;
}
@media (hover: hover) { .sx-act:hover { background: var(--surface-2); color: var(--ink); } }
/* Phones (under 560 wide): Like, Comment and Share always share one even row, like a phone app.
   The icon and the number sit on top, the word underneath, so long Danish words and big numbers still fit at 320. */
@media (max-width: 559.98px) {
  .sx-post-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; gap: 4px; margin-left: -6px; margin-right: -6px; }
  .sx-post-actions > * { min-width: 0; }
  .sx-post-actions .sx-inline { display: block; }
  .sx-post-actions .sx-act { flex-wrap: wrap; justify-content: center; align-content: center; gap: 2px 5px; width: 100%; height: 100%; min-height: 56px; padding: 7px 2px; border-radius: 14px; font-size: .8125rem; line-height: 1.2; text-align: center; }
  .sx-post-actions .sx-act > .sx-ico { width: 22px; height: 22px; }
  .sx-post-actions .sx-act-count { order: 1; font-size: .875rem; }
  .sx-post-actions .sx-act-label { order: 2; flex: 0 0 100%; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sx-post-actions .sx-share { height: 100%; }
  .sx-post-actions .sx-share > summary { display: flex; }
}
/* The smallest phones (under 360 wide): Like gets the widest part and Share the smallest, so "Synes godt om" never gets cut. */
@media (max-width: 359.98px) {
  .sx-post-actions { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.15fr) minmax(0, .8fr); gap: 2px; }
  .sx-post-actions .sx-act { padding-left: 2px; padding-right: 2px; font-size: .78rem; }
}
.sx-act-count { font-variant-numeric: tabular-nums; }
.sx-act-count:empty { display: none; }
.sx-like .sx-ico { transition: transform .2s ease; }
.sx-like.is-on { color: #d4335d; }
.sx-like.is-on .sx-ico { fill: #d4335d; stroke: #d4335d; }
.sx-like.is-pop .sx-ico { animation: sx-pop .4s cubic-bezier(.2, .8, .3, 1.4); }
.sx-like.is-shake { animation: sx-shake .45s ease; }
@keyframes sx-pop { 0% { transform: scale(.7); } 60% { transform: scale(1.3); } 100% { transform: scale(1); } }
@keyframes sx-shake { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }

/* ---------- Comments ---------- */
.sx-comments { margin-top: 28px; }
.sx-comments > .sx-chapter { margin: 0 0 14px; }
.sx-comments > .sx-chapter .sx-chapter-name { font-size: 1.05rem; font-weight: 800; color: var(--ink); }
.sx-comments-empty, .sx-comments-note { padding: 18px 20px; border-radius: var(--radius); background: var(--surface); color: var(--ink-2); box-shadow: var(--shadow); margin-bottom: 16px; }
/* The global p:last-child rule would drop this gap, so the empty note and the Write a comment card touched. */
.sx-comment-list > .sx-comments-empty { margin-bottom: 16px; }
.sx-threads, .sx-replies { list-style: none; margin: 0; padding: 0; }
.sx-thread { margin: 0 0 12px; padding: 16px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.sx-replies { margin: 10px 0 0 18px; padding-left: 14px; border-left: 2px solid var(--line); }
.sx-replies > li { margin-top: 12px; }
.sx-comment { display: flex; gap: 12px; align-items: flex-start; }
.sx-comment:target { border-radius: 12px; box-shadow: 0 0 0 6px var(--accent-soft); background: var(--accent-soft); }
.sx-replies .sx-mav { width: 30px; height: 30px; font-size: .72rem; }
.sx-comment-main { flex: 1; min-width: 0; }
.sx-comment-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; line-height: 1.3; }
.sx-comment-name { font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.sx-comment-date { color: var(--ink-3); font-size: .84rem; text-decoration: none; padding: 6px 0; margin: -6px 0; font-variant-numeric: tabular-nums; }
@media (hover: hover) { .sx-comment-date:hover { text-decoration: underline; color: var(--ink); } }
.sx-comment-edited { color: var(--ink-3); font-size: .8rem; font-style: italic; }
.sx-comment-body { margin-top: 4px; }
.sx-comment-body p { margin-bottom: .6em; }
.sx-comment-body a { overflow-wrap: anywhere; }
.sx-comment-held { display: flex; align-items: center; gap: 6px; margin: 6px 0; padding: 6px 10px; border-radius: 8px; background: var(--warn-soft); color: #5c3c00; font-size: .86rem; }
.sx-comment-held .sx-ico { width: 16px; height: 16px; }
.sx-comment.is-held .sx-comment-body { color: var(--ink-2); }
.sx-comment-gone { margin: 6px 0; color: var(--ink-3); font-style: italic; }
.sx-comment-tools { display: flex; flex-wrap: wrap; gap: 0 2px; margin: 2px 0 -8px -10px; }
.sx-ctool { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 10px; border-radius: 999px; color: var(--ink-3); font-size: .86rem; font-weight: 600; text-decoration: none; }
.sx-ctool .sx-ico { width: 16px; height: 16px; }
@media (hover: hover) { .sx-ctool:hover { background: var(--surface-2); color: var(--ink); } .sx-ctool-danger:hover { color: var(--danger); background: var(--danger-soft); } }
@media (pointer: coarse) { .sx-ctool { min-height: 44px; } }

.sx-cform { margin: 0 0 16px; padding: 16px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.sx-cform.is-reply { margin: 0; padding: 12px 0 0; background: none; box-shadow: none; border-radius: 0; }
.sx-cform-label { display: block; font-weight: 700; margin-bottom: 8px; }
.sx-cform-text {
  display: block; width: 100%; min-height: 96px; max-height: 480px; padding: 12px 14px; resize: vertical;
  border: 1px solid var(--line-strong); border-radius: 14px; background: var(--surface); color: var(--ink);
  font: 400 16px/1.55 var(--f-body); -webkit-appearance: none; appearance: none;
}
.sx-cform-text:focus-visible { outline: 3px solid var(--accent-soft); outline-offset: 0; border-color: var(--accent); }
.sx-cform-text[aria-invalid="true"] { border-color: var(--danger); }
.sx-cform-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.sx-cform-count { margin-right: auto; color: var(--ink-3); font-size: .86rem; font-variant-numeric: tabular-nums; }
.sx-cform-count.is-over { color: var(--danger); font-weight: 700; }
.sx-cform-note { display: flex; gap: 8px; align-items: flex-start; margin: 12px 0 0; color: var(--ink-3); font-size: .86rem; line-height: 1.45; }
.sx-cform-note .sx-ico { width: 17px; height: 17px; color: var(--ok); margin-top: 1px; }
.sx-reply-slot { margin-top: 4px; }

/* Edit and delete pages */
.sx-narrow { max-width: 620px; }
.sx-panel-title { font-size: clamp(1.3rem, 1.15rem + .7vw, 1.6rem); }
.sx-narrow .sx-cform { box-shadow: var(--shadow); }

/* Admin: on and off markers */
.sx-pill { display: inline-flex; align-items: center; min-height: 28px; padding: 0 12px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); font-size: .82rem; font-weight: 800; }
.sx-pill-on { background: var(--ok-soft); color: var(--ok); }

@media (min-width: 600px) {
  .sx-thread { padding: 18px 22px; }
  .sx-replies { margin-left: 24px; padding-left: 18px; }
  .sx-cform { padding: 18px 22px; }
}

/* =====================================================================
   Stage 6: spam protection and the moderation console
   Phone first. Every action button is at least 48px tall.
   ===================================================================== */

/* The hidden honeypot field. Off screen, not display none, so simple robots still see it. */
.sx-hp { position: absolute !important; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* Report link on comments, and the quote on the report page */
.sx-ctool-quiet { color: var(--ink-3); }
@media (hover: hover) { .sx-ctool-quiet:hover { color: var(--warn); background: var(--warn-soft); } }
.sx-quote-name { display: block; margin-bottom: 4px; color: var(--ink); }
.sx-report-grid { margin-top: 4px; }
@media (min-width: 600px) { .sx-report-grid { grid-template-columns: 1fr 1fr; } }

/* Header: the queue with its count */
.sx-queue-btn { position: relative; }
.sx-qbadge {
  position: absolute; top: -6px; right: -6px; min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: 999px; background: #f2a33a; color: #1d1405; border: 2px solid var(--frame);
  font-size: .72rem; font-weight: 800; line-height: 18px; text-align: center; font-variant-numeric: tabular-nums;
}

/* Phones: Home, Friends and a menu button. Everything else lives in the menu. */
.sx-wide-tools { display: none; align-items: center; gap: 8px; }
.sx-menu { position: relative; }
.sx-menu > summary { list-style: none; cursor: pointer; }
.sx-menu > summary::-webkit-details-marker { display: none; }
.sx-menu-close { display: none; }
.sx-menu[open] .sx-menu-open { display: none; }
.sx-menu[open] .sx-menu-close { display: inline-flex; }
.sx-menu-open, .sx-menu-close { align-items: center; }
.sx-menu-open { display: inline-flex; }
.sx-menu[open] > summary { background: rgba(255, 255, 255, .12); border-color: #59607a; }
.sx-menu-panel { position: absolute; right: 0; top: calc(100% + 10px); z-index: 60; width: min(290px, calc(100vw - 32px)); padding: 8px; border-radius: var(--radius-s); background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow-lift); display: flex; flex-direction: column; gap: 2px; }
.sx-menu-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 6px 12px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); font: inherit; font-weight: 700; font-size: 1rem; text-align: left; text-decoration: none; cursor: pointer; }
.sx-menu-item .sx-ico { width: 22px; height: 22px; color: var(--ink-3); flex: none; }
@media (hover: hover) { .sx-menu-item:hover { background: var(--surface-2); } }
.sx-menu-item:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.sx-menu-text { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.sx-menu-text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sx-menu-text span { color: var(--ink-3); font-weight: 600; font-size: .86rem; }
.sx-menu-me { padding-top: 10px; padding-bottom: 10px; }
.sx-menu-me .sx-mav { width: 44px; height: 44px; font-size: .9rem; }
.sx-menu-count { flex: none; min-width: 26px; height: 24px; padding: 0 8px; border-radius: 999px; background: #f2a33a; color: #1d1405; font-size: .8rem; font-weight: 800; line-height: 24px; text-align: center; }
.sx-menu-lang { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 4px 4px 4px 12px; margin: 4px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-weight: 700; }
.sx-lang-menu { border-color: var(--line-strong); }
.sx-lang-menu button { color: var(--ink-3); }
.sx-lang-menu button[aria-pressed="true"] { background: var(--ink); color: #fff; }
@media (hover: hover) { .sx-lang-menu button:not([aria-pressed="true"]):hover { color: var(--ink); } }

@media (min-width: 760px) {
  .sx-wide-tools { display: flex; }
  .sx-menu { display: none; }
}

/* Small phones: the logo stays readable, the buttons keep 44px touch targets. */
@media (max-width: 379px) {
  .sx-header-in { gap: 8px; }
  .sx-header-tools { gap: 6px; }
  .sx-brand img { width: 112px; }
  .sx-btn-signin { padding: 0 14px; }
  .sx-header-tools > .sx-lang button { min-width: 40px; padding: 0 8px; }
}
.sx-btn-signin { white-space: nowrap; }

/* Pills */
.sx-pill-warn { background: var(--warn-soft); color: var(--warn); }
.sx-pill-bad { background: var(--danger-soft); color: var(--danger); }
.sx-pill-spam { background: #efe9fb; color: #5b3aa8; }

/* Solid action buttons */
.sx-btn-ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.sx-btn-warn { background: #c27a0e; border-color: #c27a0e; color: #fff; }
.sx-btn-dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.sx-mod-actions .sx-btn-danger, .sx-dialog-foot .sx-btn-danger, .sx-mod-page .sx-btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.sx-btn-spam { color: #5b3aa8; }
@media (hover: hover) {
  .sx-btn-ok:hover { background: #0f5f36; border-color: #0f5f36; }
  .sx-btn-warn:hover { background: #a3650a; border-color: #a3650a; }
  .sx-btn-dark:hover { background: #000; border-color: #000; }
  .sx-mod-actions .sx-btn-danger:hover, .sx-dialog-foot .sx-btn-danger:hover, .sx-mod-page .sx-btn-danger:hover { background: #962812; border-color: #962812; color: #fff; }
  .sx-btn-spam:hover { background: #efe9fb; border-color: #5b3aa8; color: #5b3aa8; }
}

/* Console home card */
.sx-modcard { position: relative; overflow: hidden; }
.sx-modcard.has-work { background: linear-gradient(135deg, #fff8ea 0%, #ffffff 55%); box-shadow: var(--shadow), inset 4px 0 0 #f2a33a; }
.sx-modcard-in { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; }
.sx-modcard-in h2 { margin-bottom: 2px; }
.sx-modcard-in p { margin: 0; }
.sx-modcard-n {
  flex: none; display: flex; align-items: center; justify-content: center; width: 60px; height: 60px; border-radius: 18px;
  background: var(--ok-soft); color: var(--ok); font-size: 1.6rem; font-weight: 800; font-variant-numeric: tabular-nums;
}
.sx-modcard.has-work .sx-modcard-n { background: #f2a33a; color: #1d1405; }
.sx-modcard-facts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 14px; }

/* Console tabs and page head */
.sx-modnav a .sx-ico { width: 18px; height: 18px; }
.sx-tab-hot { opacity: 1; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: #f2a33a; color: #1d1405; font-weight: 800; font-size: .76rem; line-height: 22px; text-align: center; }
.sx-mod-top { margin: 4px 0 18px; }
.sx-mod-top h1 { margin-bottom: 4px; }
.sx-mod-top p { margin: 0; }
.sx-mod-flood { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px !important; padding: 10px 14px; border-radius: var(--radius-s); background: var(--warn-soft); color: var(--warn); font-weight: 600; }
.sx-mod-flood .sx-ico { flex: none; }

/* Toast with Undo */
.sx-mod-toast { flex-wrap: wrap; position: sticky; top: 8px; z-index: 5; box-shadow: var(--shadow); }
.sx-mod-toast > span { flex: 1 1 160px; }
.sx-toast-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: 999px;
  border: 1px solid #0d4a2b; background: #0d4a2b; color: #fff; font: 700 .92rem/1 var(--f-body); cursor: pointer;
}
.sx-toast-btn .sx-ico { width: 18px; height: 18px; color: #fff; }

/* Empty queue */
.sx-mod-clear { text-align: center; padding: 36px 16px 44px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.sx-mod-clear-art { width: 160px; height: 120px; margin: 0 auto 8px; }
.sx-mod-clear-art .a1 { fill: var(--ok-soft); }
.sx-mod-clear-art .a2 { fill: #cfeedd; }
.sx-mod-clear-art .a3 { fill: none; stroke: var(--ok); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.sx-mod-clear-art .a4 { fill: #f4a38c; }
.sx-mod-clear-art .a5 { fill: var(--accent); opacity: .5; }
.sx-mod-clear h2 { margin-bottom: 6px; }
.sx-mod-clear p { max-width: 34ch; margin: 0 auto; }

/* Queue cards */
.sx-mod-list { display: grid; gap: 18px; }
.sx-mod {
  position: relative; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px 16px 16px 20px; scroll-margin-top: 16px; overflow: hidden;
}
.sx-mod::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--line-strong); }
.sx-mod.is-mid::before { background: #f2a33a; }
.sx-mod.is-high::before { background: var(--danger); }
.sx-mod.is-review::before { background: var(--accent); }
@media (min-width: 600px) { .sx-mod { padding: 22px 24px 20px 28px; } }

.sx-mod-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.sx-mod-who { flex: 1 1 auto; min-width: 0; }
.sx-mod-name { margin: 0; font-size: 1.08rem; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sx-mod-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 2px 0 0; color: var(--ink-3); font-size: .84rem; }
.sx-mod-meta .sx-pill { min-height: 22px; padding: 0 9px; font-size: .74rem; }

/* Risk gauge */
.sx-risk { flex: none; display: grid; grid-template-columns: auto; justify-items: end; gap: 3px; width: 74px; }
.sx-risk-n { font-size: 1.35rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.sx-risk.is-mid .sx-risk-n { color: #a3650a; }
.sx-risk.is-high .sx-risk-n { color: var(--danger); }
.sx-risk-bar { position: relative; display: block; width: 100%; height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.sx-risk-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; background: var(--ok); }
.sx-risk.is-mid .sx-risk-fill { background: #f2a33a; }
.sx-risk.is-high .sx-risk-fill { background: var(--danger); }
.sx-risk-fill.r-0 { width: 3%; } .sx-risk-fill.r-1 { width: 10%; } .sx-risk-fill.r-2 { width: 20%; } .sx-risk-fill.r-3 { width: 30%; }
.sx-risk-fill.r-4 { width: 40%; } .sx-risk-fill.r-5 { width: 50%; } .sx-risk-fill.r-6 { width: 60%; } .sx-risk-fill.r-7 { width: 70%; }
.sx-risk-fill.r-8 { width: 80%; } .sx-risk-fill.r-9 { width: 90%; } .sx-risk-fill.r-10 { width: 100%; }
.sx-risk-mark { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--surface); }
.sx-risk-mark.m30 { left: 30%; } .sx-risk-mark.m60 { left: 60%; }
.sx-risk-cap { font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }

/* Reasons */
.sx-mod-reasons { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; padding: 0; list-style: none; }
.sx-reason { display: inline-flex; align-items: center; min-height: 28px; padding: 0 11px; border-radius: 999px; font-size: .8rem; font-weight: 700; line-height: 1.2; }
.sx-reason-calm { background: var(--surface-2); color: var(--ink-2); }
.sx-reason-hot { background: var(--danger-soft); color: var(--danger); }

/* The comment */
.sx-mod-comment { margin: 0 0 12px; }
.sx-mod-context { margin-bottom: 6px; font-size: .86rem; color: var(--ink-2); line-height: 1.45; }
.sx-mod-context a { font-weight: 700; }
.sx-mod-context .sx-dim { display: block; font-size: .8rem; }
.sx-mod-quote {
  margin: 0; padding: 12px 14px; border-radius: 4px 14px 14px 14px; background: var(--surface-2);
  font-size: 1rem; line-height: 1.55; color: var(--ink); overflow-wrap: anywhere; max-height: 16em; overflow-y: auto;
}
.sx-mod-found { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 10px 0 0; font-size: .86rem; color: var(--ink-2); }
.sx-mod-found strong { color: var(--ink); }
.sx-domain-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 3px 3px 10px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); }
.sx-domain-chip .sx-mono { font-size: .82rem; }
.sx-domain-chip button { min-height: 32px; padding: 0 10px; border: 0; border-radius: 999px; background: var(--danger-soft); color: var(--danger); font: 700 .76rem/1 var(--f-body); cursor: pointer; }
@media (pointer: coarse) { .sx-domain-chip button { min-height: 40px; } }

.sx-mod-review { margin: 0 0 12px; }
.sx-mod-kicker { margin: 0 0 6px; font-size: .74rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.sx-mod-reports { margin: 0 0 12px; padding: 10px 14px; border-radius: var(--radius-s); background: var(--warn-soft); }
.sx-mod-reports ul { margin: 0; padding: 0; list-style: none; font-size: .9rem; }
.sx-mod-reports li + li { margin-top: 4px; }
.sx-mod-reports strong { margin-right: 4px; }

/* History */
.sx-mod-history { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; margin: 0 0 14px; }
.sx-mod-history div { padding: 6px 2px; border-radius: 10px; background: var(--surface-2); text-align: center; }
.sx-mod-history dt { font-size: .66rem; font-weight: 700; letter-spacing: .02em; color: var(--ink-3); line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sx-mod-history dd { margin: 0; font-size: 1.02rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.sx-mod-history .is-bad { background: var(--danger-soft); }
.sx-mod-history .is-bad dd { color: var(--danger); }

/* Actions: two per row on a phone, one row on wider screens */
.sx-mod-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sx-mod-actions .sx-btn { min-height: 50px; padding: 0 12px; font-size: .95rem; }
.sx-mod-actions .sx-btn .sx-ico { width: 18px; height: 18px; flex: none; }
.sx-mod-direct { grid-column: 1 / -1; justify-self: center; display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; color: var(--danger); font-size: .86rem; font-weight: 600; }
@media (min-width: 700px) { .sx-mod-actions { display: flex; flex-wrap: wrap; } .sx-mod-actions .sx-btn { flex: 1 1 auto; } .sx-mod-direct { flex-basis: 100%; justify-content: center; } }

/* Dialog */
.sx-dialog {
  width: min(100% - 24px, 480px); max-height: calc(100% - 24px); margin: auto; padding: 0; border: 0; border-radius: var(--radius);
  background: var(--surface); color: var(--ink); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .5);
}
.sx-dialog::backdrop { background: rgba(17, 20, 27, .55); }
.sx-dialog[open] { animation: sx-pop .18s ease-out; }
@keyframes sx-pop { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.sx-dialog-in { padding: 20px 18px 18px; }
@media (min-width: 600px) { .sx-dialog-in { padding: 26px 26px 22px; } }
.sx-dialog-head h2 { margin-bottom: 2px; }
.sx-dialog-head p { margin: 0 0 14px; }
.sx-dialog-help { margin: 4px 0 16px; font-size: .88rem; color: var(--ink-2); line-height: 1.5; }
.sx-dialog-foot { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.sx-dialog-foot .sx-btn { flex: 1 1 140px; }
@media (max-width: 599px) {
  /* A bottom sheet on phones, so the buttons sit under the thumb. */
  .sx-dialog { width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 22px 22px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  .sx-dialog[open] { animation: sx-sheet .2s ease-out; }
}
@keyframes sx-sheet { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sx-dialog[open] { animation: none; } }

/* Reason chips */
.sx-mod-cats { margin: 0 0 12px; }
.sx-chipset { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.sx-chip { position: relative; display: inline-flex; cursor: pointer; }
.sx-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sx-chip span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); font-size: .9rem; font-weight: 600; color: var(--ink-2); transition: background-color .15s ease, border-color .15s ease; }
.sx-chip input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.sx-chip input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
@media (hover: hover) { .sx-chip:hover input:not(:checked) + span { border-color: var(--ink-3); color: var(--ink); } }
.sx-mod-note { min-height: 72px; height: 72px; resize: vertical; }
.sx-mod-cats.sx-fieldset { padding-top: 4px; }
.sx-mod-sure { background: var(--danger-soft); border-color: #ecb8af; }
.sx-mod-sure[hidden] { display: none; }
.sx-mod-page .sx-mod-quote { margin: 12px 0 16px; }

/* Bans */
.sx-bans .sx-row { align-items: flex-start; gap: 12px; }
.sx-bans .sx-row-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1 1 200px; }
.sx-bans .is-lifted { opacity: .7; }
.sx-ban-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.sx-ban-tags .sx-pill { min-height: 24px; font-size: .74rem; }
.sx-help-panel { margin-top: 20px; background: var(--accent-soft); box-shadow: none; }
.sx-help-panel p:last-child { margin-bottom: 0; }

/* Safety */
.sx-flood { border: 1px solid var(--line); box-shadow: none; }
.sx-flood.is-on { background: linear-gradient(135deg, #fff4dc 0%, #ffffff 70%); border-color: #f0dca8; }
.sx-flood-head { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.sx-flood-head h2 { margin: 0 0 4px; }
.sx-flood-icon { flex: none; display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 16px; background: var(--surface-2); color: var(--ink-3); }
.sx-flood.is-on .sx-flood-icon { background: #f2a33a; color: #1d1405; }
.sx-flood-icon .sx-ico { width: 26px; height: 26px; }
.sx-flood-state { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.sx-numgrid { display: grid; gap: 4px 18px; margin: 12px 0 8px; }
@media (min-width: 640px) { .sx-numgrid { grid-template-columns: 1fr 1fr; } }
.sx-numfield .sx-input { max-width: 140px; font-variant-numeric: tabular-nums; }
.sx-numfield .sx-label { min-height: 2.6em; display: flex; align-items: flex-end; }

/* Word list */
.sx-addform-row { display: grid; gap: 4px 18px; }
@media (min-width: 640px) { .sx-addform-row { grid-template-columns: 1fr 1fr; } }
.sx-wordlist { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.sx-word { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 10px; padding: 10px 10px 10px 14px; border-radius: var(--radius-s); background: var(--surface-2); scroll-margin-top: 16px; }
.sx-word.is-severe { background: var(--danger-soft); }
.sx-word.is-off { opacity: .55; }
.sx-word-term { font-weight: 700; overflow-wrap: anywhere; }
.sx-word-sev { grid-column: 1; font-size: .78rem; color: var(--ink-3); }
.sx-word-tools { grid-column: 2; grid-row: 1 / span 2; display: flex; gap: 4px; }
.sx-word-tools button { min-height: 44px; min-width: 44px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--ink-2); font: 600 .8rem/1 var(--f-body); cursor: pointer; }
.sx-word-tools button.is-danger { color: var(--danger); padding: 0; }
.sx-word-tools .sx-ico { width: 18px; height: 18px; }
@media (max-width: 479px) {
  .sx-word { grid-template-columns: 1fr; }
  .sx-word-tools { grid-column: 1; grid-row: auto; margin-top: 6px; }
}
@media (hover: hover) { .sx-word-tools button:hover { border-color: var(--ink-3); color: var(--ink); } .sx-word-tools button.is-danger:hover { background: var(--danger-soft); color: var(--danger); } }

/* Domain lists */
.sx-domain-add { display: flex; gap: 8px; margin: 10px 0 12px; }
.sx-domain-add .sx-input { flex: 1 1 auto; min-width: 0; }
.sx-domain-add .sx-btn { flex: none; }
.sx-domainlist { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.sx-domainlist li { display: inline-flex; align-items: center; gap: 2px; padding: 2px 2px 2px 12px; border-radius: 999px; background: var(--surface-2); }
.sx-domainlist .sx-mono { font-size: .86rem; overflow-wrap: anywhere; }
.sx-domainlist button { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: var(--ink-3); cursor: pointer; }
.sx-domainlist .sx-ico { width: 17px; height: 17px; }
@media (hover: hover) { .sx-domainlist button:hover { background: var(--danger-soft); color: var(--danger); } }

/* Warning notice */
.sx-badge-warn { background: var(--warn-soft); color: var(--warn); }
.sx-badge-ok { background: var(--ok-soft); color: var(--ok); }
.sx-notice-facts { margin: 18px 0; display: grid; gap: 12px; }
.sx-notice-facts div { padding: 12px 14px; border-radius: var(--radius-s); background: var(--surface-2); }
.sx-notice-facts dt { font-size: .74rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 2px; }
.sx-notice-facts dd { margin: 0; line-height: 1.5; }
.sx-notice-facts .sx-quote { margin: 6px 0 0; background: var(--surface); }

/* =====================================================================
   Stage 7: photos, video and music
   ===================================================================== */

/* ---------- In a post ---------- */
.sx-gallery, .sx-photos, .sx-video, .sx-post > .sx-player { margin: 16px -20px 0; }
.sx-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; background: var(--surface); }
.sx-gtile { position: relative; display: block; overflow: hidden; background: var(--surface-2); aspect-ratio: 1 / 1; }
.sx-gtile img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
@media (hover: hover) { .sx-gtile:hover img { transform: scale(1.025); } }
.sx-gallery-1 { grid-template-columns: 1fr; }
.sx-gallery-1 .sx-gtile { aspect-ratio: auto; }
.sx-gallery-1 .sx-gtile img { height: auto; max-height: 80vh; max-height: 80dvh; }
.sx-gallery-3 .sx-gtile:first-child { grid-column: 1 / -1; aspect-ratio: 2 / 1; }
.sx-gtile.has-more img { filter: brightness(.55); }
.sx-gmore { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: clamp(1.6rem, 1.2rem + 2vw, 2.4rem); font-weight: 800; letter-spacing: -.02em; }
.sx-photos { display: flex; flex-direction: column; gap: 3px; }
.sx-photo { margin: 0; background: var(--surface-2); }
.sx-photo-link { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; -webkit-tap-highlight-color: transparent; }
.sx-photo-link img { display: block; -webkit-user-drag: none; }
.sx-photo-link:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.sx-photo img { width: 100%; height: auto; }
.sx-video { background: #000; }
.sx-video video { display: block; width: 100%; height: auto; max-height: 80vh; max-height: 80dvh; background: #000; }
.sx-video.is-tall video { max-height: 78vh; max-height: 78dvh; }
@media (min-width: 560px) {
  .sx-gallery, .sx-photos, .sx-video { margin-left: 0; margin-right: 0; border-radius: var(--radius-s); overflow: hidden; }
  .sx-post > .sx-player { margin-left: 0; margin-right: 0; }
}

/* ---------- Music player ---------- */
.sx-player { display: flex; gap: 14px; align-items: flex-start; padding: 16px; background: linear-gradient(180deg, var(--accent-soft), var(--surface) 140%); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
@media (min-width: 560px) { .sx-player { border: 1px solid var(--line); border-radius: var(--radius-s); padding: 18px; } }
.sx-player-cover { flex: none; width: clamp(64px, 18vw, 96px); aspect-ratio: 1 / 1; border-radius: 12px; overflow: hidden; background: var(--cover); box-shadow: 0 8px 22px -12px rgba(21, 23, 28, .55); }
.sx-player-cover img { width: 100%; height: 100%; object-fit: cover; }
.sx-player-art { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; color: #fff; }
.sx-player-art .sx-ico { width: 40%; height: 40%; }
.sx-player-main { flex: 1; min-width: 0; }
.sx-player-kicker { margin: 0; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 800; color: var(--accent-deep); }
.sx-player-title { margin: 2px 0 0; font-size: 1.08rem; font-weight: 800; line-height: 1.3; color: var(--ink); letter-spacing: -.01em; }
.sx-player-credits { margin: 2px 0 0; font-size: .88rem; color: var(--ink-3); line-height: 1.4; }
.sx-player-native { display: block; width: 100%; margin-top: 12px; }
.sx-player-native.is-hidden { display: none; }
.sx-player-ui { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 12px; align-items: center; margin-top: 10px; }
.sx-play { grid-row: 1 / span 2; position: relative; width: 52px; height: 52px; border-radius: 50%; border: 0; padding: 0; display: inline-flex; align-items: center; justify-content: center; background: var(--accent); color: var(--accent-ink); cursor: pointer; box-shadow: 0 8px 18px -10px var(--accent-deep); transition: transform .15s ease, background .15s ease; }
@media (hover: hover) { .sx-play:hover { background: var(--accent-deep); } }
.sx-play:active { transform: scale(.95); }
.sx-play .sx-ico { width: 24px; height: 24px; }
.sx-play-i { display: inline-flex; }
.sx-play-on .sx-ico { margin-left: 3px; }
.sx-play-off, .is-playing .sx-play-on { display: none; }
.is-playing .sx-play-off { display: inline-flex; }
.sx-play-spin { position: absolute; inset: -4px; border-radius: 50%; border: 3px solid transparent; border-top-color: var(--accent); opacity: 0; }
.is-loading .sx-play-spin { opacity: 1; animation: sx-spin .9s linear infinite; }
@keyframes sx-spin { to { transform: rotate(360deg); } }
.sx-seek { position: relative; height: 48px; color: var(--accent); cursor: pointer; touch-action: pan-y; -webkit-user-select: none; user-select: none; border-radius: 8px; }
.sx-seek:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
.sx-seek-canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.sx-player-time { margin: 6px 0 0; font-size: .82rem; color: var(--ink-3); font-variant-numeric: tabular-nums; line-height: 1.2; }
.is-error .sx-player-time { color: var(--danger); }
@media (prefers-reduced-motion: reduce) {
  .sx-gtile img, .sx-play { transition: none; }
  .is-loading .sx-play-spin { animation-duration: 2.4s; }
}

/* ---------- Composer media ---------- */
.sx-mediabox { margin: 0 0 22px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); }
.sx-mediabox:focus { outline: none; }
.sx-mediabox-title { font-size: 1rem; font-weight: 700; letter-spacing: 0; margin: 0; }
.sx-mediabox > .sx-help { margin-top: 2px; }
.sx-mnojs { margin-top: 12px; }
.js .sx-mnojs { display: none; }
.sx-alert-small { margin-top: 12px; font-size: .93rem; }
.sx-mlist { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.sx-mlist:empty { display: none; }
.sx-mitem { border: 1px solid var(--line); border-radius: var(--radius-s); padding: 10px; background: var(--surface-2); }
.sx-mitem.is-failed { border-color: #f2c4bc; background: var(--danger-soft); }
.sx-mitem-main { display: flex; gap: 12px; align-items: flex-start; }
.sx-mthumb { flex: none; width: 84px; height: 84px; border-radius: 10px; overflow: hidden; background: var(--line); display: flex; align-items: center; justify-content: center; }
.sx-mthumb img, .sx-mthumb canvas { width: 100%; height: 100%; object-fit: cover; }
.sx-mthumb-video { width: 100%; height: auto; aspect-ratio: 16 / 9; background: #000; }
.sx-mthumb-video video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.sx-mthumb-audio { width: 100%; height: 72px; background: var(--accent-soft); padding: 8px 10px; }
.sx-mthumb-audio canvas { color: var(--accent); object-fit: fill; }
.sx-mitem-video .sx-mitem-main, .sx-mitem-audio .sx-mitem-main { flex-wrap: wrap; }
.sx-mitem-video .sx-mitem-info, .sx-mitem-audio .sx-mitem-info { flex: 1 1 60%; }
.sx-mitem-info { flex: 1; min-width: 0; }
.sx-mitem-name { margin: 0; font-weight: 700; font-size: .95rem; overflow-wrap: anywhere; }
.sx-mprogress { margin-top: 8px; }
.sx-mbar { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.sx-mbar span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--accent); transition: width .25s ease; }
[data-state="busy"] .sx-mbar span { background: repeating-linear-gradient(-45deg, var(--accent) 0 8px, var(--accent-deep) 8px 16px); background-size: 200% 100%; animation: sx-stripes 1s linear infinite; width: 100% !important; }
@keyframes sx-stripes { to { background-position: -45px 0; } }
.sx-mstatus { margin: 6px 0 0; font-size: .88rem; color: var(--ink-3); }
[data-state="done"] .sx-mstatus { color: var(--ok); font-weight: 600; }
[data-state="failed"] .sx-mstatus, [data-state="paused"] .sx-mstatus { color: var(--danger); font-weight: 600; }
.sx-mitem-retry { margin-top: 8px; }
.sx-mitem-tools { display: flex; flex-direction: column; gap: 2px; margin-left: auto; }
.sx-mitem-tools .sx-icon-btn { margin: 0; }
.sx-mitem-video .sx-mitem-tools, .sx-mitem-audio .sx-mitem-tools { flex-direction: row; }
.sx-icon-btn:disabled { opacity: .35; cursor: default; }
.sx-icon-danger { color: var(--danger); }
@media (hover: hover) { .sx-icon-danger:hover { background: var(--danger-soft); color: var(--danger); } }
.sx-malt { margin: 10px 0 0; }
.sx-malt label { font-size: .92rem; }
.sx-malt [data-alt-label][data-n]::after { content: " (" attr(data-n) ")"; font-weight: 400; color: var(--ink-3); }
.sx-mextra { margin-top: 12px; display: grid; gap: 14px; }
.sx-mextra-title { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font-weight: 700; font-size: .92rem; }
.sx-mextra-title .sx-ico { width: 18px; height: 18px; color: var(--accent); }
.sx-mposter-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.sx-mposter-img { flex: none; width: 128px; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: var(--line); }
.sx-mposter-img.sx-mcover { width: 72px; aspect-ratio: 1 / 1; background: var(--cover); }
.sx-mposter-img img { width: 100%; height: 100%; object-fit: cover; }
.sx-mposter-pick { flex: 1 1 180px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.sx-mposter-pick label { margin: 0; font-weight: 600; }
.sx-mposter-pick .sx-btn { align-self: flex-start; }
.sx-range { width: 100%; min-height: 44px; accent-color: var(--accent); }
.sx-mcap-list { list-style: none; margin: 0 0 8px; padding: 0; }
.sx-mcap-list li { display: flex; align-items: center; gap: 8px; min-height: 36px; }
.sx-mcap-add { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.sx-select { min-height: 44px; padding: 0 36px 0 12px; font: 16px/1.2 var(--f-body); color: var(--ink); background: var(--surface) linear-gradient(45deg, transparent 50%, var(--ink-3) 50%) no-repeat calc(100% - 18px) 19px / 5px 5px; border: 1px solid var(--line-strong); border-radius: 999px; -webkit-appearance: none; appearance: none; }
.sx-select { background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%); background-position: calc(100% - 20px) 19px, calc(100% - 15px) 19px; background-size: 5px 5px; background-repeat: no-repeat; }
.sx-linkbtn { border: 0; background: none; padding: 8px 4px; min-height: 36px; font: inherit; font-size: .9rem; color: var(--danger); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.sx-filebtn { position: relative; overflow: hidden; cursor: pointer; }
.sx-file-hidden { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; clip: rect(0 0 0 0); }
.sx-filebtn:focus-within { outline: 3px solid var(--accent); outline-offset: 2px; }
.sx-mpick { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 14px; }
@media (min-width: 560px) { .sx-mpick { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); } }
.sx-mpick-btn { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 14px; text-align: left; font: inherit; color: var(--ink); background: var(--surface); border: 1.5px dashed var(--line-strong); border-radius: var(--radius-s); cursor: pointer; transition: border-color .15s ease, background .15s ease; }
@media (hover: hover) { .sx-mpick-btn:hover { border-color: var(--accent); background: var(--accent-soft); } }
.sx-mpick-btn:disabled { opacity: .5; cursor: default; }
.sx-mpick-ico { flex: none; width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent); }
.sx-mpick-ico .sx-ico { width: 22px; height: 22px; }
.sx-mpick-text { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.sx-mpick-text span { font-size: .84rem; color: var(--ink-3); }
.sx-mtrack { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
@media (prefers-reduced-motion: reduce) {
  .sx-mbar span, .sx-mpick-btn { transition: none; }
  [data-state="busy"] .sx-mbar span { animation: none; }
}

/* ---------- Media health check ---------- */
.sx-checks { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.sx-checks li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; background: var(--ok-soft); }
.sx-checks li.is-bad { background: var(--danger-soft); }
.sx-checks .sx-ico { margin-top: 2px; color: var(--ok); }
.sx-checks li.is-bad .sx-ico { color: var(--danger); }
.sx-checks small { display: block; color: var(--ink-3); overflow-wrap: anywhere; }

/* Trusted device on the admin sign-in */
.sx-trust { margin: 4px 0 0; }
.sx-trust label { font-weight: 600; }
.sx-trust-help { margin: 8px 0 20px; }
.sx-devices-all { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }

/* ---------- Stage 8: invitations, people, page console ---------- */
.sx-auth-badge.is-quiet { background: var(--surface-2); color: var(--ink-3); }
.sx-invite-card .sx-kicker { text-align: center; margin-bottom: 4px; }
.sx-invite-steps { list-style: none; counter-reset: sx-inv; margin: 20px 0 22px; padding: 0; text-align: left; }
.sx-invite-steps li { counter-increment: sx-inv; position: relative; padding: 4px 0 4px 42px; margin: 0 0 12px; line-height: 1.45; }
.sx-invite-steps li::before { content: counter(sx-inv); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent); font-weight: 800; font-size: .92rem; }
.sx-private form { margin-top: 4px; }
.sx-private .sx-toast { justify-content: center; text-align: left; margin: 16px auto 0; max-width: 460px; }
.sx-linkbox { margin: 16px 0 22px; padding: 16px; border-radius: var(--radius-s); background: var(--ok-soft); border: 1px solid rgba(15, 110, 60, .18); }
.sx-linkbox-title { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; color: #0d4a2b; }
.sx-linkbox-title .sx-ico { color: var(--ok); flex: none; }
.sx-linkbox-input { width: 100%; min-width: 0; font: 500 .95rem/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); margin-bottom: 12px; }
.sx-linkbox .sx-help { margin-top: 10px; }
.sx-btn.is-done { background: var(--ok); border-color: var(--ok); }
.sx-subhead { font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); font-weight: 800; margin: 20px 0 6px; }
.sx-subhead:first-of-type { margin-top: 8px; }
.sx-request { background: var(--accent-soft); border-radius: var(--radius-s); padding-left: 12px; padding-right: 12px; }
.sx-studio-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 12px; margin-bottom: 14px; }
.sx-studio-head .sx-pill { white-space: nowrap; }
.sx-studio-head h2 { margin: 0 0 2px; }
.sx-studio-head .sx-dim { margin: 0; overflow-wrap: break-word; }
.sx-studio-alert { display: flex; align-items: center; gap: 10px; padding: 12px 14px; margin: 0 0 14px; border-radius: var(--radius-s); background: var(--warn-soft); color: #4d3600; font-weight: 700; text-decoration: none; }
.sx-studio-alert .sx-ico { color: var(--warn); flex: none; }
.sx-studio-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sx-studio-actions .sx-btn { width: 100%; justify-content: center; padding-inline: 12px; white-space: nowrap; }
.sx-studio-actions .sx-btn:first-child { grid-column: 1 / -1; }
@media (min-width: 640px) {
  .sx-studio-actions { display: flex; flex-wrap: wrap; }
  .sx-studio-actions .sx-btn { width: auto; }
}

/* =====================================================================
   Friends, home feed and locked pages
   ===================================================================== */
.sx-header .sx-btn.is-on { background: rgba(255, 255, 255, .12); border-color: #59607a; }
.sx-person { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; min-width: 0; color: var(--ink); font-weight: 700; text-decoration: none; }
.sx-person .sx-mav { width: 44px; height: 44px; font-size: .9rem; }
.sx-person-name { min-width: 0; overflow-wrap: anywhere; }
a.sx-person:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
@media (hover: hover) { a.sx-person:hover .sx-person-name { text-decoration: underline; } }
.sx-friends > .sx-panel { margin-bottom: 16px; }
.sx-friends-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.sx-friends-head h1 { margin: 0; }
.sx-friends-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.sx-friends-requests { border: 2px solid var(--accent); }
.sx-friend-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 8px; }
@media (min-width: 560px) { .sx-friend-grid { grid-template-columns: 1fr 1fr; } }
.sx-friend-card { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 8px 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); min-width: 0; }
.sx-friend-more { position: relative; flex: none; }
.sx-friend-more > summary { list-style: none; cursor: pointer; margin: 0; }
.sx-friend-more > summary::-webkit-details-marker { display: none; }
.sx-friend-more[open] > summary { background: var(--surface-2); color: var(--ink); }
.sx-friend-menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 5; display: flex; flex-direction: column; gap: 6px; padding: 8px; min-width: 170px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); box-shadow: var(--shadow-lift); }
.sx-friend-menu .sx-btn { width: 100%; justify-content: flex-start; }
.sx-home { max-width: 680px; margin: 0 auto; padding-top: clamp(20px, 4vw, 32px); }
.sx-home > .sx-feed-col > .sx-studio-alert, .sx-home > .sx-feed-col > .sx-panel { margin-bottom: 16px; }
.sx-compose-prompt { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 12px; margin-bottom: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink-3); text-decoration: none; box-shadow: var(--shadow, none); }
.sx-compose-prompt .sx-mav { width: 44px; height: 44px; font-size: .9rem; }
.sx-compose-prompt-text { flex: 1 1 auto; min-width: 0; padding: 10px 16px; border-radius: 999px; background: var(--surface-2); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sx-compose-prompt-icon { flex: none; display: inline-flex; color: var(--ok); }
@media (hover: hover) { .sx-compose-prompt:hover .sx-compose-prompt-text { background: var(--line); color: var(--ink); } }
.sx-compose-prompt:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.sx-home-start h2 { margin-top: 0; }
.sx-private-face { display: flex; justify-content: center; margin-bottom: 12px; }
.sx-private-tools { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; }
.sx-private-tools .sx-btn { min-width: 180px; }
@media (max-width: 419px) { .sx-private-tools .sx-inline, .sx-private-tools .sx-btn { width: 100%; } }
/* =====================================================================
   Legal pages, contact, report form and the account page
   ===================================================================== */
.sx-footer-links { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 12px 0 4px; }
.sx-footer-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--frame-ink); font-weight: 600; text-decoration: none; }
@media (hover: hover) { .sx-footer-links a:hover { text-decoration: underline; } }
.sx-footer-links a:focus-visible, .sx-footer-base a:focus-visible { outline: 3px solid #8ea0ff; outline-offset: 2px; border-radius: 4px; }
.is-legal .sx-main { max-width: 820px; }
.sx-legal-card { padding-top: clamp(28px, 6vw, 48px); }
.sx-legal-card .sx-auth-title, .sx-legal-card .sx-auth-lead { text-align: left; margin-left: 0; margin-right: 0; max-width: none; }
.sx-legal-kicker { margin: 0 0 6px; font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.sx-legal-updated { margin: 8px 0 8px; padding-bottom: 16px; border-bottom: 1px solid var(--line); color: var(--ink-3); font-size: .9rem; }
.sx-legal-card h2 { font-size: 1.12rem; margin-top: 1.8em; }
.sx-legal-card p, .sx-legal-card li { line-height: 1.65; }
.sx-legal-card a { color: var(--accent-deep, var(--accent)); text-underline-offset: 3px; }
.sx-legal-card a.sx-btn:not(.sx-btn-quiet):not(.sx-btn-danger) { color: var(--accent-ink); text-decoration: none; }
.sx-legal-more { margin-top: 2em; padding-top: 16px; border-top: 1px solid var(--line); }
.sx-legal-form .sx-auth-form textarea { min-height: 140px; resize: vertical; }
.sx-legal-form .sx-auth-form select { width: 100%; }
.sx-center-row { display: flex; justify-content: center; margin-top: 20px; }
.sx-badge-danger { background: var(--danger-soft); color: var(--danger); }
.sx-notice-item { padding: 16px 0; border-top: 1px solid var(--line); }
.sx-notice-item:first-of-type { border-top: 0; padding-top: 4px; }
.sx-notice-meta { margin: 0 0 4px; }
.sx-notice-url { margin: 0 0 10px; overflow-wrap: anywhere; }
.sx-notice-form { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.is-account .sx-main { max-width: 820px; }
.sx-account > .sx-panel { margin-bottom: 16px; }
.sx-account-head { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.sx-account-head .sx-mav { width: 64px; height: 64px; font-size: 1.25rem; }
.sx-account-head h1 { margin: 0; }
.sx-account-head p { margin: 2px 0 0; }
.sx-account .sx-panel h2 { margin-top: 0; font-size: 1.1rem; }
.sx-account-lang { display: flex; flex-wrap: wrap; gap: 8px; }
.sx-account-lang .sx-btn { min-width: 120px; }
.sx-account-methods { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.sx-account-danger { border: 1px solid #ecb8af; }
.sx-account-danger h2 > .sx-ico:first-child { color: var(--danger); }
.sx-account-gone { margin: 0 0 16px; padding-left: 1.2em; }
.sx-account-gone li { margin-bottom: 6px; line-height: 1.5; }
.sx-auth .sx-btn-danger.sx-btn-wide { background: var(--danger); border-color: var(--danger); color: #fff; }
@media (hover: hover) { .sx-auth .sx-btn-danger.sx-btn-wide:hover { background: #962812; border-color: #962812; color: #fff; } }
.sx-auth-form .sx-btn-wide + .sx-btn-wide { margin-top: 8px; }
/* Every Stage 11 page uses the same wide card as the terms page, never the narrow sign-in card. */
.sx-legal-card .sx-auth-badge { margin-left: 0; }
.sx-legal-card .sx-center-row { justify-content: flex-start; }
.sx-legal-card .sx-auth-hint { text-align: left; }
.sx-legal-form .sx-auth-form .sx-label { margin-top: 20px; }
.sx-legal-form .sx-auth-form > .sx-label:first-of-type { margin-top: 0; }
.sx-legal-form .sx-field-hint { margin-bottom: 0; }
.sx-legal-form .sx-auth-form .sx-check { margin-top: 20px; }
.sx-legal-form .sx-auth-form > .sx-btn-wide { margin-top: 24px; }
.sx-legal-card .sx-btn-danger.sx-btn-wide { background: var(--danger); border-color: var(--danger); color: #fff; }
@media (hover: hover) { .sx-legal-card .sx-btn-danger.sx-btn-wide:hover { background: #962812; border-color: #962812; color: #fff; } }
@media (min-width: 760px) {
  .sx-field-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 20px; align-items: start; }
  .sx-legal-card .sx-auth-form .sx-btn-wide { width: auto; min-width: 240px; padding-left: 28px; padding-right: 28px; }
  .sx-legal-card .sx-auth-form .sx-btn-wide + .sx-btn-wide { margin-left: 8px; }
  .sx-account { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
  .sx-account > :not(.sx-panel), .sx-account > .sx-account-danger { grid-column: 1 / -1; }
  .sx-account > .sx-panel { margin-bottom: 0; }
  .sx-account-head { margin-bottom: 4px; }
}
/* Page profile editor: a live preview card beside the fields, and the colour picker */
.sx-compose.sx-pe { max-width: 820px; }
.sx-pe-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.sx-pe-card { position: relative; overflow: hidden; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); text-align: center; }
.sx-pe-cover { height: 96px; background: var(--cover); }
.sx-pe-tag { position: absolute; top: 10px; left: 12px; z-index: 1; margin: 0; padding: 3px 10px; border-radius: 999px; background: rgba(17, 20, 27, .42); color: #fff; font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; line-height: 1.6; }
.sx-pe-in { padding: 0 20px 20px; }
.sx-pe-face { display: flex; justify-content: center; margin: -56px 0 10px; position: relative; }
.sx-pe-name { margin: 0 0 18px; font-size: 1.2rem; font-weight: 800; line-height: 1.25; letter-spacing: -.01em; overflow-wrap: anywhere; }
.sx-pe-h { margin: 0 0 12px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 1rem; }
.sx-pe-pick { width: 100%; }
.sx-pe-status { margin: 10px 0 0; padding: 8px 12px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-deep); font-size: .88rem; font-weight: 700; overflow-wrap: anywhere; }
.sx-pe-card .sx-help, .sx-pe-card .sx-error { text-align: left; margin-top: 10px; }
.sx-pe-check { margin: 14px 0 0; text-align: left; }
.sx-pe-colours { margin-bottom: 0; }
.sx-pe-colours .sx-help { margin: 0; }
.sx-pe-google { margin: 20px 0 0; }
.sx-pe-google .sx-switch-field { margin: 0; }
.sx-pe-google .sx-switch-label { display: inline-flex; align-items: center; gap: 6px; }
.sx-pe-google .sx-switch-label .sx-ico { width: 18px; height: 18px; flex: none; color: var(--accent); }
.sx-swatches { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.sx-swatch { position: relative; display: block; cursor: pointer; }
.sx-swatch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sx-swatch-box { display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; padding: 14px 8px 10px; border: 1px solid var(--line-strong); border-radius: var(--radius-s); background: var(--surface); transition: border-color .15s ease, background-color .15s ease; }
.sx-swatch-dot { display: block; width: 44px; height: 44px; border-radius: 50%; background: var(--cover); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); transition: box-shadow .15s ease; }
.sx-swatch-name { font-size: .86rem; font-weight: 700; color: var(--ink-2); line-height: 1.3; }
.sx-swatch input:checked + .sx-swatch-box { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.sx-swatch input:checked + .sx-swatch-box .sx-swatch-dot { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--accent); }
.sx-swatch input:checked + .sx-swatch-box .sx-swatch-name { color: var(--ink); }
.sx-swatch input:focus-visible + .sx-swatch-box { outline: 3px solid var(--accent); outline-offset: 2px; }
@media (hover: hover) { .sx-swatch:hover .sx-swatch-box { border-color: var(--ink-3); } }
@media (min-width: 480px) { .sx-swatches { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 760px) {
  .sx-pe-grid { grid-template-columns: 300px minmax(0, 1fr); gap: 28px; align-items: start; }
  .sx-pe-card { position: sticky; top: calc(var(--header-h) + 20px); }
}
.sx-mav-img { object-fit: cover; background: var(--surface-2); max-width: none; flex-shrink: 0; }
.sx-account-photo { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-weight: 700; }
.sx-account-photo .sx-ico { width: 18px; height: 18px; }
/* Admin backup page */
.sx-bk-hero { border: 1px solid var(--accent-soft); }
.sx-bk-hero-in { display: flex; align-items: flex-start; gap: 16px; }
.sx-bk-hero-in h2 { margin-bottom: 4px; }
.sx-bk-hero-in p { margin: 0; }
.sx-bk-icon { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); }
.sx-bk-icon .sx-ico { width: 26px; height: 26px; }
.sx-bk-stats { list-style: none; margin: 20px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.sx-bk-stats li { display: flex; flex-direction: column; padding: 12px; border-radius: var(--radius-s); background: var(--surface-2); min-width: 0; }
.sx-bk-stats strong { font-size: 1.45rem; font-weight: 800; line-height: 1.1; color: var(--ink); font-variant-numeric: tabular-nums; }
.sx-bk-stats span { font-size: .84rem; color: var(--ink-2); line-height: 1.35; margin-top: 4px; overflow-wrap: anywhere; }
.sx-bk-form { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 0; }
.sx-bk-btn { width: 100%; }
.sx-bk-last { margin: 12px 0 0; }
.sx-bk-warn { margin: 14px 0 0; }
.sx-bk-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 12px; }
.sx-bk-item { padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); }
.sx-bk-item h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 1rem; overflow-wrap: anywhere; }
.sx-bk-item h3 .sx-ico { flex: none; color: var(--ok); }
.sx-bk-item.is-out h3 .sx-ico { color: var(--ink-3); }
.sx-bk-item p { margin: 0; font-size: .92rem; color: var(--ink-2); }
.sx-bk-steps { margin: 12px 0 0; padding-left: 1.4em; }
.sx-bk-steps li { padding-left: 4px; }
.sx-bk-steps li + li { margin-top: 8px; }
.sx-bk-steps code, .sx-bk-tlist code { font-family: var(--f-mono); font-size: .88em; padding: 1px 6px; border-radius: 6px; background: var(--surface-2); overflow-wrap: anywhere; }
.sx-bk-tables summary { cursor: pointer; font-weight: 800; }
.sx-bk-tlist { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px 24px; }
.sx-bk-tlist li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.sx-bk-tlist span { color: var(--ink-3); white-space: nowrap; }
@media (min-width: 760px) {
  .sx-bk-btn { width: auto; padding: 0 28px; }
  .sx-bk-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sx-bk-tlist { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sx-bk-stats li { padding: 16px; }
  .sx-bk-stats strong { font-size: 1.8rem; }
}
/* Link cards: YouTube videos and other pages, in posts and in the composer preview */
.sx-yt, .sx-lc { margin: 14px 0 0; }
.sx-yt { border-radius: var(--radius-s); overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); }
.sx-yt-frame { position: relative; display: block; aspect-ratio: 16 / 9; background: #0e0f12; overflow: hidden; }
@supports not (aspect-ratio: 1) { .sx-yt-frame { height: 0; padding-top: 56.25%; } .sx-yt-img, .sx-yt-player { position: absolute; inset: 0; } }
.sx-yt-img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease, filter .3s ease; }
.sx-yt-blank { background: radial-gradient(circle at 30% 30%, #2a2d36, #0e0f12 70%); }
.sx-yt-btn { position: absolute; left: 50%; top: 50%; width: 68px; height: 48px; margin: -24px 0 0 -34px; filter: drop-shadow(0 4px 14px rgba(0, 0, 0, .45)); transition: transform .15s ease; }
.sx-yt-btn svg { display: block; width: 100%; height: 100%; }
.sx-yt-btn-bg { fill: #212121; fill-opacity: .82; transition: fill .15s ease, fill-opacity .15s ease; }
.sx-yt-frame:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
@media (hover: hover) {
  .sx-yt-frame:hover .sx-yt-btn-bg { fill: #f00; fill-opacity: 1; }
  .sx-yt-frame:hover .sx-yt-img { transform: scale(1.02); filter: brightness(.92); }
}
.sx-yt-frame:focus-visible .sx-yt-btn-bg { fill: #f00; fill-opacity: 1; }
.sx-yt-frame:active .sx-yt-btn { transform: scale(.95); }
.sx-yt-player { display: block; width: 100%; height: 100%; border: 0; }
.sx-yt-meta { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px 14px; min-width: 0; }
.sx-yt-src, .sx-lc-domain { font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sx-yt-title, .sx-lc-title { font-weight: 800; color: var(--ink); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.sx-yt-author { font-size: .88rem; color: var(--ink-2); }
.sx-lc { display: flex; flex-direction: column; text-decoration: none; color: inherit; border-radius: var(--radius-s); overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); transition: border-color .15s ease, background-color .15s ease; }
.sx-lc:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
@media (hover: hover) { .sx-lc:hover { border-color: var(--line-strong); background: var(--surface); } .sx-lc:hover .sx-lc-title { color: var(--accent-deep); } }
.sx-lc-img { display: block; width: 100%; height: auto; aspect-ratio: 1.91 / 1; object-fit: cover; background: var(--line); }
.sx-lc-meta { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px 14px; min-width: 0; }
.sx-lc-desc { font-size: .9rem; color: var(--ink-2); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.sx-lc.is-small, .sx-lc.is-plain { flex-direction: row; align-items: stretch; }
.sx-lc.is-small .sx-lc-img { width: 96px; height: auto; min-height: 96px; aspect-ratio: 1 / 1; flex: none; }
.sx-lc-icon { flex: none; display: flex; align-items: center; justify-content: center; width: 64px; background: var(--accent-soft); color: var(--accent); }
.sx-lc.is-small .sx-lc-meta, .sx-lc.is-plain .sx-lc-meta { justify-content: center; }
@media (min-width: 600px) { .sx-lc.is-small .sx-lc-img { width: 128px; min-height: 128px; } }
.sx-lc-preview { margin-top: 14px; padding: 14px; border: 1px dashed var(--line-strong); border-radius: var(--radius-s); background: var(--surface); }
.sx-lc-preview-label { display: flex; align-items: center; gap: 8px; margin: 0; font-size: .86rem; font-weight: 700; color: var(--ink-2); }
.sx-lc-preview-label .sx-ico { width: 18px; height: 18px; color: var(--accent); }
.sx-lc-preview .sx-help { margin: 10px 0 0; }
.sx-lc-preview .sx-yt, .sx-lc-preview .sx-lc { margin-top: 12px; }
.sx-lc-preview.is-loading .sx-lc-slot { opacity: .45; transition: opacity .2s ease; }
.sx-lc-preview .sx-lc { cursor: default; }

/* Emoji: the button next to a text box, and the picker */
.sx-field-labelrow { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.sx-field-labelrow label { margin-bottom: 0; }
.sx-emoji-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--ink-2); font: inherit; font-size: .88rem; font-weight: 700; cursor: pointer; transition: border-color .15s ease, color .15s ease, background-color .15s ease; }
.sx-emoji-btn .sx-ico { width: 20px; height: 20px; color: var(--accent); }
.sx-emoji-btn[aria-expanded="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-deep); }
.sx-emoji-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
@media (hover: hover) { .sx-emoji-btn:hover { border-color: var(--ink-3); color: var(--ink); } }

.sx-cform-foot .sx-emoji-btn-text { display: none; }
.sx-cform-foot .sx-emoji-btn { width: 40px; padding: 0; justify-content: center; }
.sx-emoji { position: absolute; z-index: 60; width: 352px; height: 384px; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 24px 60px -20px rgba(17, 20, 27, .45), 0 2px 6px rgba(17, 20, 27, .08); overflow: hidden; }
.sx-emoji[hidden] { display: none !important; }
.sx-emoji.is-sheet { position: fixed; left: 0; right: 0; bottom: 0; top: auto; width: auto; height: min(56vh, 420px); border-radius: 18px 18px 0 0; border-bottom: 0; padding-bottom: env(safe-area-inset-bottom); }
.sx-emoji-head { display: flex; align-items: center; gap: 6px; padding: 6px 6px 6px 8px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.sx-emoji-tabs { display: flex; flex: 1; min-width: 0; gap: 2px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.sx-emoji-tabs::-webkit-scrollbar { display: none; }
.sx-emoji-tab { flex: none; width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 10px; background: transparent; font-size: 1.15rem; line-height: 1; cursor: pointer; filter: grayscale(.7); opacity: .75; transition: background-color .15s ease, filter .15s ease, opacity .15s ease; }
.sx-emoji-tab[aria-pressed="true"] { background: var(--surface); filter: none; opacity: 1; box-shadow: inset 0 -2px 0 var(--accent); }
.sx-emoji-tab:focus-visible, .sx-emoji-e:focus-visible, .sx-emoji-close:focus-visible { outline: 3px solid var(--accent); outline-offset: -2px; }
@media (hover: hover) { .sx-emoji-tab:hover { filter: none; opacity: 1; } }
.sx-emoji-close { display: none; flex: none; min-height: 36px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: 800; font-size: .88rem; cursor: pointer; }
.sx-emoji.is-sheet .sx-emoji-close { display: inline-flex; align-items: center; }
.sx-emoji-body { position: relative; flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 0 8px 10px; -webkit-overflow-scrolling: touch; }
.sx-emoji-h { position: sticky; top: 0; z-index: 1; margin: 0; padding: 10px 4px 6px; background: var(--surface); font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.sx-emoji-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); }
.sx-emoji-e { display: inline-flex; align-items: center; justify-content: center; height: 40px; padding: 0; border: 0; border-radius: 10px; background: transparent; font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', 'Segoe UI Symbol', sans-serif; font-size: 1.55rem; line-height: 1; cursor: pointer; transition: background-color .1s ease, transform .1s ease; }
@media (hover: hover) { .sx-emoji-e:hover { background: var(--accent-soft); transform: scale(1.12); } }
.sx-emoji-e:active { transform: scale(.92); }
@media (prefers-reduced-motion: reduce) { .sx-emoji-e, .sx-yt-img, .sx-yt-btn { transition: none; } }
/* ---------- Share button under a post ---------- */
.sx-share { position: relative; }
.sx-share > summary { list-style: none; -webkit-user-select: none; user-select: none; }
.sx-share > summary::-webkit-details-marker { display: none; }
.sx-share > summary::marker { content: ''; }
.sx-share[open] > summary { background: var(--accent-soft); color: var(--accent-deep); }
.sx-share-panel { position: absolute; z-index: 55; top: calc(100% + 6px); left: 0; width: 340px; max-width: calc(100vw - 32px); padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 24px 60px -20px rgba(17, 20, 27, .45), 0 2px 6px rgba(17, 20, 27, .08); }
.sx-share.is-up .sx-share-panel { top: auto; bottom: calc(100% + 6px); }
.sx-share.is-right .sx-share-panel { left: auto; right: 0; }
.sx-share-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: -2px 0 10px; }
.sx-share-title { margin: 0; font-weight: 700; font-size: 1rem; color: var(--ink); }
.sx-share-close { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin: -8px -8px -8px 0; padding: 0; border: 0; border-radius: 999px; background: transparent; color: var(--ink-2); cursor: pointer; }
.sx-share-close[hidden] { display: none; }
@media (hover: hover) { .sx-share-close:hover { background: var(--surface-2); color: var(--ink); } }
.sx-share-list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 0 0 12px; padding: 0; list-style: none; }
.sx-share-list li { margin: 0; }
.sx-share-list li[hidden] { display: none; }
.sx-share-wide { grid-column: 1 / -1; }
.sx-share-opt { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font: 600 .94rem/1.2 var(--f-body); text-align: left; text-decoration: none; cursor: pointer; touch-action: manipulation; transition: background-color .15s ease, border-color .15s ease; }
@media (hover: hover) { .sx-share-opt:hover { background: var(--surface-2); border-color: var(--line-strong); } }
.sx-share-badge { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); }
.sx-share-badge .sx-ico { width: 18px; height: 18px; }
.sx-share-opt.is-mine { border-color: transparent; background: var(--accent); color: var(--accent-ink); }
.sx-share-opt.is-mine .sx-share-badge { background: rgba(255, 255, 255, .18); color: #fff; }
@media (hover: hover) { .sx-share-opt.is-mine:hover { background: var(--accent-deep); border-color: transparent; } }
.sx-share-opt.is-facebook .sx-share-badge { background: #1877f2; color: #fff; }
.sx-share-opt.is-whatsapp .sx-share-badge { background: #1fa855; color: #fff; }
.sx-share-opt.is-linkedin .sx-share-badge { background: #0a66c2; color: #fff; }
.sx-share-opt.is-email .sx-share-badge { background: #5b6170; color: #fff; }
.sx-share-opt.is-apps .sx-share-badge { background: var(--ink); color: #fff; }
.sx-share-copy-label { display: block; margin: 0 0 6px; font-size: .86rem; font-weight: 600; color: var(--ink-2); }
.sx-share-copy-row { display: flex; gap: 8px; }
.sx-share-url { flex: 1 1 auto; min-width: 0; min-height: 44px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface-2); color: var(--ink); font: .9rem/1 var(--f-body); }
.sx-share-copy-row .sx-btn { flex: none; }
.sx-share-copy-row .sx-btn[hidden] { display: none; }
.sx-share-status { min-height: 0; margin: 6px 0 0; font-size: .88rem; color: var(--ok); }
.sx-share-status:empty { display: none; }
.sx-share-status.is-bad { color: var(--danger); }
.sx-share-note { display: flex; gap: 8px; align-items: flex-start; margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); color: var(--ink-2); font-size: .88rem; line-height: 1.45; }
.sx-share-note .sx-ico { flex: none; width: 18px; height: 18px; margin-top: 1px; }
@media (max-width: 599.98px) {
  .sx-share[open]::before { content: ''; position: fixed; inset: 0; z-index: 54; background: rgba(17, 20, 27, .38); }
  .sx-share-panel, .sx-share.is-up .sx-share-panel, .sx-share.is-right .sx-share-panel { position: fixed; top: auto; left: 0; right: 0; bottom: 0; width: auto; max-width: none; max-height: 85vh; overflow-y: auto; padding: 16px var(--gutter-r) calc(16px + env(safe-area-inset-bottom)) var(--gutter); border-radius: 18px 18px 0 0; border-bottom: 0; }
  .sx-share-head { margin-top: 0; }
}
@media (prefers-reduced-motion: reduce) { .sx-share-opt { transition: none; } }

/* Share page, on the profile */
.sx-share-hint { margin: -4px 0 12px; color: var(--ink-2); font-size: .9rem; line-height: 1.45; }
.sx-profile-tools .sx-share > summary.sx-btn { cursor: pointer; }
.sx-profile-tools .sx-share[open] > summary.sx-btn { background: var(--accent-soft); color: var(--accent-deep); border-color: transparent; }
@media (min-width: 1080px) {
  .sx-profile-tools .sx-share { width: 100%; }
  /* The menu stays inside the profile card: one option per row, normal-size buttons. */
  .sx-profile-tools .sx-share .sx-share-panel, .sx-profile-tools .sx-share.is-right .sx-share-panel { left: 0; right: 0; width: auto; max-width: none; }
  .sx-profile-tools .sx-share-list { grid-template-columns: 1fr; }
  .sx-profile-tools .sx-share-panel .sx-btn { width: auto; justify-content: center; }
}

/* The note at the top of the composer when sharing someone's post */
.sx-sharing { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 20px; padding: 14px 16px; border-radius: var(--radius-s); background: var(--accent-soft); color: var(--ink); }
.sx-sharing .sx-ico { flex: none; color: var(--accent-deep); margin-top: 1px; }
.sx-sharing p { margin: 0; line-height: 1.5; }
/* ---------- Launch switch (admin) ---------- */
.sx-ln-hero, .sx-ln-card { border: 1px solid #f0dca8; }
.sx-ln-hero.is-open, .sx-ln-card.is-open { border-color: #bfe3cc; }
.sx-ln-hero-in { display: flex; align-items: flex-start; gap: 16px; }
.sx-ln-hero-in h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-bottom: 4px; }
.sx-ln-hero-in p { margin: 0; }
.sx-ln-pill { margin: 0 0 6px; }
.sx-ln-icon { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 50%; background: var(--warn-soft); color: var(--warn); }
.is-open .sx-ln-icon { background: var(--ok-soft); color: var(--ok); }
.sx-ln-icon .sx-ico { width: 26px; height: 26px; }
.sx-ln-card .sx-btn { margin-top: 16px; }
.sx-ln-form { margin: 20px 0 0; padding-top: 16px; border-top: 1px solid var(--line); }
.sx-ln-form .sx-help { margin: 0 0 12px; }
.sx-ln-btn { width: 100%; }
.sx-ln-checks { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.sx-ln-check { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); }
.sx-ln-check div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sx-ln-check .sx-dim { font-size: .92rem; overflow-wrap: anywhere; }
.sx-ln-mark { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; }
.sx-ln-mark .sx-ico { width: 16px; height: 16px; }
.sx-ln-check.is-ok .sx-ln-mark { background: var(--ok-soft); color: var(--ok); }
.sx-ln-check.is-todo { border-color: #f2c4bc; background: var(--danger-soft); }
.sx-ln-check.is-todo .sx-ln-mark { background: #fff; color: var(--danger); }
.sx-ln-sub { margin: 20px 0 8px; font-size: 1rem; }
.sx-ln-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 16px; }
.sx-ln-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 12px; }
.sx-ln-list li { display: flex; align-items: flex-start; gap: 12px; line-height: 1.5; }
.sx-ln-list .sx-ico { flex: none; margin-top: 2px; color: var(--accent); }
.sx-ln-go .sx-check { margin-top: 12px; }
.sx-ln-go .sx-btn { margin-top: 8px; }
@media (min-width: 760px) {
  .sx-ln-checks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sx-ln-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sx-ln-btn { width: auto; }
}

/* The app: add to home screen */
/* Straight after joining: a friendly "you are in" line above the steps. */
.sx-app-first { display: flex; align-items: flex-start; gap: 12px; margin: 0 0 20px; padding: 14px 16px; border-radius: 14px; background: #e3f4f1; color: #0b5e53; }
.sx-app-first p { margin: 0; line-height: 1.5; }
.sx-app-first-icon { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: #0f7b6c; color: #fff; }
.sx-app-first-icon .sx-ico { width: 18px; height: 18px; }
.sx-app-still { display: flex; align-items: flex-start; gap: 8px; margin: 14px 0 6px; font-weight: 600; color: #0b5e53; }
.sx-app-still .sx-ico { flex: none; color: #0f7b6c; }
.sx-app-copy { border: 0; background: none; padding: 6px 2px; min-height: 36px; font: inherit; font-weight: 700; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.sx-app-later { margin: 22px 0 0; }
.sx-app-inapp .sx-app-steps { margin-top: 12px; }
.sx-app-inapp .sx-inapp-tools { margin-top: 14px; }
.is-standalone .sx-app-link { display: none; }
.sx-app-hero { display: grid; grid-template-columns: 1fr; gap: 18px; align-items: center; }
.sx-app-icon { width: 80px; height: 80px; border-radius: 22%; box-shadow: 0 14px 28px -14px rgba(17, 20, 27, .7); }
.sx-app .sx-auth-title, .sx-app .sx-auth-lead { text-align: left; margin-left: 0; margin-right: 0; max-width: none; }
.sx-app-installed, .sx-app-done { display: flex; align-items: flex-start; gap: 12px; margin: 24px 0 0; padding: 14px 16px; border-radius: var(--radius-s); background: var(--ok-soft); color: #0d4a2b; }
.sx-app-installed[hidden], .sx-app-done[hidden], .sx-app-go[hidden], .sx-app-guide[hidden], .sx-app-guides[hidden], .sx-app-other[hidden], .sx-app-inapp[hidden] { display: none; }
.sx-app-installed .sx-ico, .sx-app-done .sx-ico { flex: none; margin-top: 2px; }
.sx-app-installed p, .sx-app-done p { margin: 0; }
.sx-app-inapp { margin-top: 24px; }
.sx-app-inapp h2 { font-size: 1.05rem; margin: 0 0 6px; }
.sx-app-go { margin-top: 24px; }
.sx-app-btn { width: 100%; justify-content: center; }
.sx-app-guides { display: grid; gap: 16px; margin-top: 24px; }
.sx-app-guide { padding: 18px 18px 16px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); }
.sx-app-guide h2 { font-size: 1.08rem; margin: 0 0 12px; }
.sx-app-steps { list-style: none; counter-reset: app; margin: 0; padding: 0; display: grid; gap: 12px; }
.sx-app-steps li { counter-increment: app; position: relative; padding-left: 42px; line-height: 1.6; min-height: 30px; }
.sx-app-steps li::before { content: counter(app); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-deep); font-weight: 800; font-size: .92rem; }
.sx-app-key { display: inline-flex; align-items: center; gap: 6px; vertical-align: middle; margin: 2px 0; padding: 3px 10px 3px 7px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--bg); font-weight: 700; font-size: .88rem; white-space: nowrap; }
.sx-app-key .sx-ico { width: 18px; height: 18px; }
.sx-app-key-text { padding: 3px 10px; letter-spacing: 1px; }
.sx-app-guide .sx-small { margin-top: 14px; }
.sx-app-other { margin: 20px 0 0; }
.sx-offpage { max-width: 420px; min-height: 100vh; min-height: 100dvh; margin: 0 auto; padding: 32px 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.sx-offpage-icon { width: 96px; height: 96px; border-radius: 22%; margin-bottom: 20px; }
.sx-offpage h1 { font-size: 1.6rem; margin: 0 0 8px; }
.sx-offpage p { margin: 0 0 20px; color: var(--ink-2); }
@media (min-width: 760px) {
  .sx-app-hero { grid-template-columns: 96px 1fr; gap: 24px; }
  .sx-app-icon { width: 96px; height: 96px; }
  .sx-app-btn { width: auto; }
}

/* Video limit note in the composer */
.sx-video-lock { display: flex; align-items: flex-start; gap: 10px; margin: 8px 0 12px; padding: 12px 14px; border-radius: var(--radius-s); background: var(--surface-2, var(--bg)); color: var(--ink-2); font-size: .95rem; line-height: 1.5; }
.sx-video-lock .sx-ico { flex: none; width: 20px; height: 20px; margin-top: 1px; color: var(--accent); }
/* Account: connect Google */
.sx-account-email { margin: 14px 0 0; color: var(--ink-2); font-size: .95rem; overflow-wrap: anywhere; }
.sx-account-add { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.sx-account-add h3 { margin: 0 0 6px; font-size: 1.02rem; }
.sx-account-add form { margin-top: 12px; }
.sx-account-add .sx-btn-google { cursor: pointer; }
@media (min-width: 640px) { .sx-account-add .sx-btn-google { display: inline-flex; width: auto; min-width: 260px; } }
/* Photo viewer: the larger photo inside the page */
html.sx-noscroll, html.sx-noscroll body { overflow: hidden; }
.sx-viewer { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; background: #0b0d12; padding: max(56px, var(--safe-top)) max(12px, env(safe-area-inset-right)) max(56px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); overscroll-behavior: contain; touch-action: pan-y pinch-zoom; }
.sx-viewer[hidden] { display: none; }
.sx-viewer-fig { margin: 0; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.sx-viewer-img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 4px; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.sx-viewer-btn { position: absolute; display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; padding: 0; border: 1px solid rgba(255, 255, 255, .22); border-radius: 999px; background: rgba(20, 23, 31, .72); color: #fff; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.sx-viewer-btn[hidden] { display: none; }
.sx-viewer-btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
@media (hover: hover) { .sx-viewer-btn:hover { background: rgba(255, 255, 255, .16); } }
.sx-viewer-close { top: max(10px, var(--safe-top)); right: max(10px, env(safe-area-inset-right)); }
.sx-viewer-prev, .sx-viewer-next { top: 50%; margin-top: -24px; }
.sx-viewer-prev { left: max(10px, env(safe-area-inset-left)); }
.sx-viewer-next { right: max(10px, env(safe-area-inset-right)); }
.sx-viewer-count { position: absolute; left: 0; right: 0; pointer-events: none; bottom: max(14px, env(safe-area-inset-bottom)); margin: 0; text-align: center; color: rgba(255, 255, 255, .86); font-size: .95rem; font-weight: 600; }
@media (max-width: 559px) { .sx-viewer { padding-left: 0; padding-right: 0; } .sx-viewer-img { border-radius: 0; } .sx-viewer-prev, .sx-viewer-next { top: auto; bottom: max(6px, env(safe-area-inset-bottom)); margin-top: 0; } }
@media (min-width: 900px) { .sx-viewer { padding-left: 88px; padding-right: 88px; } .sx-viewer-prev { left: 24px; } .sx-viewer-next { right: 24px; } .sx-viewer-close { top: 20px; right: 24px; } }
/* Likes on comments */
button.sx-ctool { border: 0; background: none; font: inherit; font-size: .86rem; font-weight: 600; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.sx-clike .sx-ico { transition: transform .2s ease; }
.sx-clike.is-on { color: #d4335d; }
.sx-clike.is-on .sx-ico { fill: #d4335d; stroke: #d4335d; }
.sx-clike.is-pop .sx-ico { animation: sx-pop .4s cubic-bezier(.2, .8, .3, 1.4); }
.sx-clike.is-shake { animation: sx-shake .45s ease; }
.sx-clike-count:empty { display: none; }
.sx-clike.is-static { cursor: default; }
button.sx-ctool:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
@media (prefers-reduced-motion: reduce) { .sx-clike.is-pop .sx-ico, .sx-clike.is-shake { animation: none; } }
/* =====================================================================
   Notifications: the bell, the list and phone notifications
   ===================================================================== */
.is-notifications .sx-main { max-width: 820px; }
.sx-nbadge { background: #e5383b; color: #fff; }
.sx-nbadge[hidden] { display: none; }
.sx-bell .sx-ico { transform-origin: 50% 10%; }
.sx-bell:has(.sx-nbadge:not([hidden])) .sx-ico { animation: sx-ring 1.2s ease 1s 1; }
@keyframes sx-ring { 0%, 100% { transform: rotate(0); } 15% { transform: rotate(14deg); } 30% { transform: rotate(-12deg); } 45% { transform: rotate(8deg); } 60% { transform: rotate(-5deg); } 75% { transform: rotate(2deg); } }

/* The card that turns on notifications for this device */
.sx-push { position: relative; overflow: hidden; border: 1px solid var(--line); }
.sx-push::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--cover); }
.sx-push-state { display: flex; align-items: flex-start; gap: 16px; }
.sx-push-state[hidden] { display: none; }
.sx-push-icon { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 52px; height: 52px; border-radius: 16px; background: var(--accent-soft); color: var(--accent); }
.sx-push-icon .sx-ico { width: 26px; height: 26px; }
.sx-push-icon.is-on { background: var(--ok-soft); color: var(--ok); }
.sx-push-icon.is-warn { background: var(--warn-soft); color: var(--warn); }
.sx-push-icon.is-muted { background: var(--surface-2); color: var(--ink-3); }
.sx-push-text { min-width: 0; flex: 1 1 auto; }
.sx-push-text h2 { margin: 2px 0 6px; font-size: 1.12rem; line-height: 1.3; }
.sx-push-text p { margin: 0; color: var(--ink-2); }
.sx-push-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.sx-push-status { margin: 0; color: var(--ink-3); font-size: .9rem; font-weight: 600; }
.sx-push-status:not(:empty) { margin-top: 12px; }
/* Test notification result and the "make it pop up" steps */
.sx-push-result { margin: 0; font-size: .94rem; font-weight: 600; color: var(--ink-2); }
.sx-push-result:not(:empty) { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); }
.sx-push-result.is-ok { background: var(--ok-soft); color: var(--ok); }
.sx-push-result.is-warn { background: var(--warn-soft); color: var(--ink); }
.sx-push-help { margin-top: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.sx-push-help > summary { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px 14px; cursor: pointer; font-weight: 650; list-style: none; -webkit-tap-highlight-color: transparent; }
.sx-push-help > summary::-webkit-details-marker { display: none; }
.sx-push-help > summary > span { flex: 1 1 auto; min-width: 0; }
.sx-push-help > summary > .sx-ico { flex: none; width: 20px; height: 20px; color: var(--accent); }
.sx-push-help > summary > .sx-ico:last-child { color: var(--ink-3); transition: transform .2s ease; }
.sx-push-help[open] > summary > .sx-ico:last-child { transform: rotate(180deg); }
.sx-push-help > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 12px; }
.sx-push-help-in { padding: 0 14px 14px; }
.sx-push-text .sx-push-help-lead { margin: 0 0 12px; color: var(--ink-2); }
.sx-push-os[hidden] { display: none; }
.sx-push-os h3 { margin: 0 0 8px; font-size: 1rem; }
.sx-push-steps { margin: 0; padding: 0; list-style: none; counter-reset: pstep; }
.sx-push-steps > li { position: relative; counter-increment: pstep; padding: 2px 0 0 40px; min-height: 28px; margin-bottom: 10px; color: var(--ink); line-height: 1.45; }
.sx-push-steps > li::before { content: counter(pstep); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: .9rem; display: flex; align-items: center; justify-content: center; }
.sx-push-text .sx-push-help-note { margin: 4px 0 0; font-size: .88rem; color: var(--ink-3); }
@media (prefers-reduced-motion: reduce) { .sx-push-help > summary > .sx-ico:last-child { transition: none; } }
.sx-push.is-compact { padding: 18px; margin-bottom: 16px; }
.sx-push.is-compact .sx-push-icon { width: 44px; height: 44px; border-radius: 14px; }
.sx-push.is-compact .sx-push-text h2 { font-size: 1rem; }
.sx-push.is-compact .sx-push-text p { font-size: .94rem; }
@media (max-width: 419px) {
  .sx-push-state { gap: 12px; }
  .sx-push-icon { width: 44px; height: 44px; border-radius: 14px; }
  .sx-push-icon .sx-ico { width: 22px; height: 22px; }
}
/* On phones the result and the steps use the whole card width, under the icon too. */
@media (max-width: 599.98px) {
  .sx-push-text .sx-push-result, .sx-push-text .sx-push-help, [data-state="on"] .sx-push-tools { margin-left: -68px; }
  .sx-push.is-compact .sx-push-text .sx-push-result, .sx-push.is-compact .sx-push-text .sx-push-help, .sx-push.is-compact [data-state="on"] .sx-push-tools { margin-left: -60px; }
  [data-state="on"] .sx-push-tools > .sx-btn { flex: 1 1 auto; justify-content: center; white-space: nowrap; }
}
@media (max-width: 419px) {
  .sx-push .sx-push-text .sx-push-result, .sx-push .sx-push-text .sx-push-help, .sx-push [data-state="on"] .sx-push-tools { margin-left: -56px; }
}
.sx-push.is-inline .sx-push-text .sx-push-result, .sx-push.is-inline .sx-push-text .sx-push-help, .sx-push.is-inline [data-state="on"] .sx-push-tools { margin-left: 0; }

/* The list */
.sx-notes-panel { padding: 8px; }
.sx-notes-h { margin: 14px 12px 6px; font-size: .8rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.sx-notes-panel .sx-notes-h:first-child { margin-top: 10px; }
.sx-notes-list { list-style: none; margin: 0; padding: 0; }
.sx-notif + .sx-notif { margin-top: 2px; }
.sx-notif-link { position: relative; display: flex; align-items: center; gap: 14px; min-height: 72px; padding: 10px 12px; border-radius: var(--radius-s); color: var(--ink); text-decoration: none; transition: background-color .15s ease; }
.sx-notif.is-unread .sx-notif-link { background: var(--accent-soft); padding-right: 34px; }
@media (hover: hover) { .sx-notif-link:hover { background: var(--surface-2); } .sx-notif.is-unread .sx-notif-link:hover { background: color-mix(in srgb, var(--accent-soft) 70%, var(--accent) 8%); } }
.sx-notif-link:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.sx-notif-face { position: relative; flex: none; width: 52px; height: 52px; }
.sx-notif-face .sx-mav { width: 52px; height: 52px; font-size: 1rem; }
.sx-notif-kind { position: absolute; right: -4px; bottom: -4px; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; color: #fff; border: 2px solid var(--surface); background: var(--accent); }
.sx-notif.is-unread .sx-notif-kind { border-color: var(--accent-soft); }
.sx-notif-kind .sx-ico { width: 12px; height: 12px; }
.sx-notif-kind.is-like { background: #e5383b; }
.sx-notif-kind.is-like .sx-ico { fill: currentColor; }
.sx-notif-kind.is-comment { background: #1f8ae0; }
.sx-notif-kind.is-post { background: #157a46; }
.sx-notif-kind.is-friend { background: #7a4fe0; }
.sx-notif-kind.is-mention { background: #3b4fd8; }
.sx-notif-kind.is-bday { background: linear-gradient(135deg, #f4a38c, #c2417a); }
.sx-notif-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; }
.sx-notif-title { line-height: 1.35; overflow-wrap: anywhere; }
.sx-notif-title strong { font-weight: 800; }
.sx-notif-snippet { color: var(--ink-2); font-size: .94rem; line-height: 1.4; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.sx-notif-time { color: var(--ink-3); font-size: .82rem; font-weight: 600; }
.sx-notif.is-unread .sx-notif-time { color: var(--accent-deep); font-weight: 700; }
.sx-notif-thumb { flex: none; width: 56px; height: 56px; border-radius: 10px; object-fit: cover; background: var(--surface-2); }
.sx-notif-dot { position: absolute; right: 14px; top: 50%; width: 10px; height: 10px; margin-top: -5px; border-radius: 50%; background: var(--accent); }
@media (max-width: 419px) {
  .sx-notes-panel { padding: 4px; }
  .sx-notif-link { gap: 12px; padding: 10px; }
  .sx-notif.is-unread .sx-notif-link { padding-right: 28px; }
  .sx-notif-face, .sx-notif-face .sx-mav { width: 46px; height: 46px; }
  .sx-notif-thumb { width: 48px; height: 48px; }
  .sx-notif-dot { right: 11px; }
}

/* Nothing yet */
.sx-notes-empty { padding-top: 40px; padding-bottom: 40px; }
.sx-notes-empty-icon { display: inline-flex; align-items: center; justify-content: center; width: 72px; height: 72px; margin-bottom: 14px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); }
.sx-notes-empty-icon .sx-ico { width: 32px; height: 32px; }
.sx-notes-empty h2 { margin: 0 0 6px; }
.sx-notes-empty p { max-width: 30em; margin: 0 auto; color: var(--ink-2); }

/* What reaches the phone */
.sx-notes-settings { padding: 0; }
.sx-notes-settings > summary { display: flex; align-items: center; gap: 14px; min-height: 72px; padding: 14px clamp(16px, 4vw, 28px); list-style: none; cursor: pointer; border-radius: var(--radius); }
.sx-notes-settings > summary::-webkit-details-marker { display: none; }
.sx-notes-settings > summary:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.sx-notes-settings-icon { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 44px; height: 44px; border-radius: 14px; background: var(--surface-2); color: var(--ink-2); }
.sx-notes-settings-text { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.sx-notes-settings-text span { color: var(--ink-3); font-size: .9rem; font-weight: 600; }
.sx-notes-settings-chev { display: inline-flex; color: var(--ink-3); transition: transform .2s ease; }
.sx-notes-settings[open] .sx-notes-settings-chev { transform: rotate(180deg); }
.sx-notes-settings > .sx-toast, .sx-notes-prefs { margin-left: clamp(16px, 4vw, 28px); margin-right: clamp(16px, 4vw, 28px); }
.sx-notes-prefs { padding-bottom: clamp(18px, 4vw, 28px); }
.sx-pref { display: flex; justify-content: space-between; width: 100%; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); font-weight: 400; }
.sx-pref-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sx-pref-text strong { font-weight: 700; }
.sx-pref-text span { color: var(--ink-3); font-size: .9rem; }
.sx-notes-prefs-note { margin: 4px 0 16px; padding-top: 14px; border-top: 1px solid var(--line); font-size: .92rem; }

/* Very small phones: Home, Friends, the bell and the menu all fit, the logo shows the shield. */
@media (max-width: 359px) {
  .sx-brand img { width: 30px; height: 34px; object-fit: cover; object-position: left center; }
  .sx-header-tools { gap: 4px; }
}
@media (prefers-reduced-motion: reduce) { .sx-bell .sx-ico { animation: none !important; } .sx-notes-settings-chev { transition: none; } }
/* Welcome after Google: "I already have an account" */
.sx-auth-existing { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin: 0 0 22px; padding: 14px 16px; border-radius: var(--radius-s); background: var(--accent-soft); color: var(--ink); text-align: left; }
.sx-auth-existing p { margin: 0; font-size: .95rem; color: var(--ink-2); }
.sx-auth-existing strong { color: var(--ink); }
.sx-auth-existing.is-after { margin: 22px 0 0; padding: 14px 0 0; border-radius: 0; background: none; border-top: 1px solid var(--line); }
.sx-auth-join { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 20px; padding: 14px 16px; border-radius: var(--radius-s); background: var(--ok-soft); color: #0d4a2b; text-align: left; font-size: .95rem; }
.sx-auth-join .sx-ico { color: var(--ok); margin-top: 2px; }
.sx-auth-join p { margin: 0; }
/* ------------------------------------------------------------------
   Live page: notices, new posts bar, comments edited in place
   ------------------------------------------------------------------ */
.sx-float-toast { position: fixed; z-index: 70; left: 50%; bottom: max(16px, calc(env(safe-area-inset-bottom) + 12px)); display: flex; align-items: center; gap: 10px; width: max-content; max-width: calc(100vw - 32px); padding: 12px 18px 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); font-weight: 600; font-size: .95rem; line-height: 1.4; box-shadow: 0 2px 6px rgba(17, 20, 27, .1), 0 22px 44px -14px rgba(17, 20, 27, .55); opacity: 0; pointer-events: none; transform: translate(-50%, 14px); transition: opacity .25s ease, transform .25s ease; }
.sx-float-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.sx-float-toast svg { flex: none; width: 22px; height: 22px; color: var(--ok); }
.sx-float-toast.is-bad { background: var(--danger-soft); border-color: #ecb8af; color: var(--danger); }
.sx-float-toast.is-bad svg { color: var(--danger); }
.has-fab .sx-float-toast { bottom: max(88px, calc(env(safe-area-inset-bottom) + 84px)); }
.sx-fresh { position: fixed; z-index: 25; left: 50%; top: calc(var(--header-h) + var(--safe-top) + 12px); display: inline-flex; align-items: center; gap: 8px; max-width: calc(100vw - 32px); min-height: 44px; padding: 0 20px 0 16px; border: 0; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: 800; font-size: .95rem; box-shadow: 0 14px 30px -10px rgba(21, 23, 28, .55); cursor: pointer; opacity: 0; pointer-events: none; transform: translate(-50%, -10px); transition: opacity .25s ease, transform .25s ease; }
.sx-fresh.is-on { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
.sx-fresh svg { flex: none; width: 18px; height: 18px; }
.sx-fresh span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sx-fresh:focus-visible { outline: 3px solid var(--frame); outline-offset: 3px; }
@media (hover: hover) { .sx-fresh:hover { background: var(--accent-deep); } }
.sx-comment.is-new, .sx-comment.is-flash { animation: sx-glow 2.4s ease-out; border-radius: var(--radius-s); }
@keyframes sx-glow { 0% { background: var(--accent-soft); box-shadow: 0 0 0 6px var(--accent-soft); } 100% { background: transparent; box-shadow: 0 0 0 6px transparent; } }
.sx-cedit { margin: 6px 0 4px; }
.sx-cedit .sx-cform-text { width: 100%; }
.sx-cconfirm { margin: 8px 0 4px; padding: 12px 14px; border-radius: var(--radius-s); background: var(--danger-soft); }
.sx-cconfirm-q { margin: 0; font-weight: 800; color: var(--ink); }
.sx-cconfirm-note { margin: 2px 0 0; color: var(--ink-2); font-size: .92rem; }
.sx-cconfirm .sx-cform-foot { margin-top: 8px; }
.sx-cconfirm .sx-field-error { margin: 8px 0 0; }
.sx-btn-danger.is-solid { background: var(--danger); border-color: var(--danger); color: #fff; }
@media (hover: hover) { .sx-btn-danger.is-solid:hover { background: #962812; border-color: #962812; color: #fff; } }
.sx-like.is-bump [data-like-count] { display: inline-block; animation: sx-bump .5s ease-out; }
@keyframes sx-bump { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .sx-float-toast, .sx-fresh { transition: none; } .sx-comment.is-new, .sx-comment.is-flash, .sx-like.is-bump [data-like-count] { animation: none; } }

/* ---------- Friend requests from sign-in, and new-member helpers (04-11-2026) ---------- */
.sx-friend-wait { order: 10; flex-basis: 100%; margin: 2px 0 0; color: var(--ink-2); font-size: .94rem; line-height: 1.45; }

/* Accept and Decline right in the notifications list */
.sx-notif.has-act { border-radius: var(--radius-s); }
.sx-notif.is-unread.has-act { background: var(--accent-soft); }
.sx-notif.has-act .sx-notif-link { min-height: 0; padding-bottom: 6px; }
.sx-notif.is-unread.has-act .sx-notif-link { background: transparent; }
.sx-notif-act { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 12px 12px 78px; }
.sx-notif-act .sx-inline { margin: 0; }
.sx-notif-done { display: flex; align-items: center; gap: 6px; margin: 0; padding: 0 12px 12px 78px; color: var(--ok); font-size: .94rem; font-weight: 800; }
.sx-notif-done::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
@media (max-width: 419px) { .sx-notif-act, .sx-notif-done { padding-left: 68px; padding-right: 10px; } }

/* Get started on Home */
.sx-gs { position: relative; overflow: hidden; margin-bottom: 16px; border: 1px solid var(--line); transition: opacity .2s ease, transform .2s ease; }
.sx-gs::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--cover); }
.sx-gs.is-leaving { opacity: 0; transform: translateY(-6px); }
.sx-gs-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.sx-gs-head h2 { margin: 2px 0 4px; font-size: 1.2rem; }
.sx-gs-head p { margin: 0; }
.sx-gs-hide { margin: -4px -6px 0 0; border: 0; box-shadow: none; background: var(--surface-2); color: var(--ink-2); }
.sx-gs-meter { height: 8px; margin-top: 16px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.sx-gs-meter span { display: block; height: 100%; min-width: 8px; border-radius: inherit; background: var(--ok); transition: width .35s ease; }
.sx-gs-count { margin: 8px 0 0; color: var(--ink-3); font-size: .86rem; font-weight: 700; }
.sx-gs-steps { list-style: none; margin: 14px 0 0; padding: 0; }
.sx-gs-step { display: flex; align-items: flex-start; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.sx-gs-tick { position: relative; display: inline-flex; align-items: center; justify-content: center; flex: none; width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--line-strong); color: var(--ink-2); font-weight: 800; background: var(--surface); }
.sx-gs-tick .sx-ico { display: none; width: 18px; height: 18px; }
.sx-gs-step.is-done .sx-gs-tick { border-color: var(--ok); background: var(--ok); color: #fff; }
.sx-gs-step.is-done .sx-gs-tick .sx-ico { display: block; }
.sx-gs-step.is-done .sx-gs-num { display: none; }
.sx-gs-body { min-width: 0; flex: 1 1 auto; }
.sx-gs-body h3 { margin: 5px 0 4px; font-size: 1.02rem; line-height: 1.3; }
.sx-gs-body > p { margin: 0 0 12px; color: var(--ink-2); font-size: .95rem; }
.sx-gs-step.is-done .sx-gs-body h3 { color: var(--ink-2); text-decoration: line-through; text-decoration-color: var(--ink-3); }
.sx-gs-step.is-done .sx-gs-body > p, .sx-gs-step.is-done .sx-gs-body .sx-btn, .sx-gs-step.is-done .sx-gs-tools { display: none; }
.sx-gs-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.sx-push.is-inline { border: 0; padding: 0; background: none; box-shadow: none; margin: 0; }
.sx-push.is-inline::before { display: none; }
.sx-push.is-inline .sx-push-icon, .sx-push.is-inline .sx-push-text h2 { display: none; }
.sx-push.is-inline .sx-push-text p { font-size: .95rem; }
.sx-push.is-inline .sx-push-tools { margin-top: 12px; }
.sx-gs-step.is-done .sx-push.is-inline [data-state="off"] { display: none; }

/* Empty screens that say what to do next */
.sx-empty-next { text-align: center; padding: 10px 0 4px; }
.sx-empty-next-icon { display: inline-flex; align-items: center; justify-content: center; width: 60px; height: 60px; margin-bottom: 10px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); }
.sx-empty-next-icon .sx-ico { width: 28px; height: 28px; }
.sx-empty-next .sx-dim { max-width: 30em; margin: 0 auto 14px; }
.sx-empty-next-tools { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 4px; }
.sx-private-push { margin-top: 18px; text-align: left; }
.sx-private-push .sx-push { margin-bottom: 0; }

/* Place on a post: "Add my location" in the composer, and the small label on the post */
.sx-place { margin: 4px 0 22px; padding: 14px 16px 16px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); transition: border-color .2s ease, background-color .2s ease; }
.sx-place.is-on { border-color: var(--accent); background: linear-gradient(180deg, var(--accent-soft), var(--surface) 70%); }
.sx-place .sx-switch-field { margin: 0; }
.sx-place .sx-switch-label { display: inline-flex; align-items: center; gap: 6px; }
.sx-place .sx-switch-label .sx-ico { width: 18px; height: 18px; color: var(--accent); }
.sx-place-box { margin-top: 12px; }
.sx-place-status { margin: 0; font-size: .92rem; color: var(--ink-2); }
.sx-place-status:empty { display: none; }
.sx-place-status.is-busy { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.sx-place-status.is-busy::before { content: ""; flex: none; width: 18px; height: 18px; border: 2px solid var(--accent-soft); border-top-color: var(--accent); border-radius: 50%; animation: sx-spin .8s linear infinite; }
.sx-place-status.is-error { padding: 10px 12px; border-radius: 10px; background: var(--warn-soft); color: var(--warn); font-weight: 600; margin-bottom: 12px; }
.sx-place-chip { display: flex; align-items: center; gap: 6px; max-width: 100%; min-height: 48px; padding: 4px 4px 4px 12px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line-strong); box-shadow: var(--shadow); }
.sx-place-chip-ico { display: inline-flex; flex: none; color: var(--accent); }
.sx-place-chip-ico .sx-ico { width: 20px; height: 20px; }
.sx-place-chip-text { flex: 1 1 auto; min-width: 0; padding: 6px 0; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.sx-place-change { flex: none; min-height: 44px; padding: 0 10px; border: 0; border-radius: 999px; background: transparent; color: var(--accent-deep); font: inherit; font-size: .92rem; font-weight: 700; cursor: pointer; }
.sx-place-clear { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--surface-2); color: var(--ink-2); cursor: pointer; }
.sx-place-clear .sx-ico { width: 18px; height: 18px; }
@media (hover: hover) {
  .sx-place-change:hover { background: var(--accent-soft); }
  .sx-place-clear:hover { background: var(--danger-soft); color: var(--danger); }
}
.sx-place-change:focus-visible, .sx-place-clear:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.sx-place-edit { margin: 0; }
.sx-place-row { display: flex; flex-wrap: wrap; gap: 8px; }
.sx-place-row input { flex: 1 1 100%; min-width: 0; }

@media (min-width: 600px) { .sx-place-row input { flex: 1 1 14em; } }
.sx-place-find { flex: 0 0 auto; min-height: 48px; }
.sx-place-find:disabled { opacity: .6; cursor: progress; }
html:not(.js) .sx-place-box[hidden], html:not(.js) .sx-place-edit[hidden] { display: block; }
html:not(.js) .sx-place-chip { display: none; }
.sx-post-place { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; max-width: 100%; margin-top: 2px; color: var(--ink-3); font-size: .84rem; line-height: 1.35; }
.sx-post-place .sx-ico { flex: none; width: 14px; height: 14px; }
@media (prefers-reduced-motion: reduce) { .sx-place, .sx-place.is-on { transition: none; } .sx-place-status.is-busy::before { animation-duration: 2.4s; } }

/* =====================================================================
   Messages between friends, 04-11-2026
   Phone: the list and the chat each fill the screen, like a messenger app.
   Computer: the list on the left and the chat on the right, as wide as the
   person pages.
   ===================================================================== */
/* Header: on phones Messages takes the place of Home, and the logo opens the feed. */
.sx-nav-home { display: none; }
@media (min-width: 900px) { .sx-nav-home { display: inline-flex; } }
.sx-hide-md { display: none; }
@media (min-width: 1100px) { .sx-hide-md { display: inline; } }

.is-messages .sx-main { max-width: 1120px; padding: 0; }
.is-messages .sx-footer { display: none; }
.sx-chat-app { position: relative; display: block; }
.sx-chat-side { background: var(--surface); min-height: calc(100vh - var(--header-h)); min-height: calc(100dvh - var(--header-h)); padding-bottom: max(24px, env(safe-area-inset-bottom)); }
.sx-chat-side-head { display: flex; align-items: center; gap: 12px; padding: 18px var(--gutter-r) 10px var(--gutter); }
.sx-chat-side-head h1 { flex: 1 1 auto; margin: 0; font-size: 1.6rem; }
.sx-chat-side-head .sx-btn { flex: none; }
@media (max-width: 379px) { .sx-chat-side-head .sx-btn > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } .sx-chat-side-head .sx-btn { min-width: 44px; padding: 0 12px; } }
.sx-chat-done { margin: 0 var(--gutter-r) 12px var(--gutter); }
.sx-chat-none { display: none; }
.has-chat .sx-chat-side { display: none; }

/* The list of chats */
.sx-chat-list { list-style: none; margin: 0; padding: 4px 8px; }
.sx-chat-list-empty { margin: 8px var(--gutter-r) 0 var(--gutter); color: var(--ink-3); }
.sx-chat-item { display: flex; align-items: center; gap: 12px; min-height: 72px; padding: 10px 10px; border-radius: 14px; color: var(--ink); text-decoration: none; }
.sx-chat-item:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
@media (hover: hover) { .sx-chat-item:hover { background: var(--surface-2); } }
.sx-chat-item.is-open { background: var(--accent-soft); }
.sx-chat-item-face { flex: none; display: inline-flex; }
.sx-chat-item-face .sx-mav { width: 52px; height: 52px; font-size: 1rem; }
.sx-chat-item-text { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.sx-chat-item-top { display: flex; align-items: baseline; gap: 8px; }
.sx-chat-item-top strong { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1rem; }
.sx-chat-item-top time { flex: none; color: var(--ink-3); font-size: .82rem; }
.sx-chat-item-last { display: flex; align-items: center; gap: 4px; min-width: 0; color: var(--ink-3); font-size: .93rem; }
.sx-chat-item-last > span[dir] { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sx-chat-item-you { display: inline-flex; flex: none; color: var(--ink-3); }
.sx-chat-item-you .sx-ico { width: 16px; height: 16px; }
.sx-chat-item.is-unread strong, .sx-chat-item.is-unread .sx-chat-item-last { color: var(--ink); font-weight: 800; }
.sx-chat-item.is-unread time { color: var(--accent); font-weight: 700; }
.sx-chat-dot { flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); }
.sx-chat-item-go { flex: none; display: inline-flex; color: var(--accent); }
/* No chats yet: a welcome card, the same style as the empty Notifications and Friends cards. */
.sx-chat-begin { margin: 6px var(--gutter-r) 16px var(--gutter); padding: 28px clamp(16px, 5vw, 28px) 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); text-align: center; }
.sx-chat-begin-icon { display: inline-flex; align-items: center; justify-content: center; width: 72px; height: 72px; margin-bottom: 14px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); }
.sx-chat-begin-icon .sx-ico { width: 32px; height: 32px; }
.sx-chat-begin h2 { margin: 0 0 6px; font-size: 1.25rem; }
.sx-chat-begin p { max-width: 30em; margin: 0 auto; color: var(--ink-2); }
.sx-chat-begin .sx-chat-begin-label { margin-top: 18px; color: var(--ink-3); font-size: .9rem; font-weight: 700; }
.sx-chat-begin .sx-chat-starts { margin: 6px 0 4px; }
.sx-chat-begin .sx-empty-next-tools { margin-top: 18px; }
.sx-chat-starts { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.sx-chat-start { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px; border-radius: 14px; color: var(--ink); font-weight: 700; font-size: .9rem; text-decoration: none; text-align: center; }
.sx-chat-start .sx-mav { width: 56px; height: 56px; font-size: 1.05rem; }
.sx-chat-start span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (hover: hover) { .sx-chat-start:hover { background: var(--surface-2); } }
.sx-chat-search { padding: 4px var(--gutter-r) 8px var(--gutter); }
.sx-chat-search .sx-input { width: 100%; min-height: 48px; border-radius: 999px; padding: 0 18px; font-size: 1rem; }

/* The open chat: on a phone it covers the whole screen, above the keyboard. */
.sx-chat { position: fixed; z-index: 40; left: 0; right: 0; top: var(--chat-top, 0px); height: var(--chat-vh, 100vh); height: var(--chat-vh, 100dvh); display: flex; flex-direction: column; background: var(--surface); }
html.js.sx-chat-lock, .has-chat { overflow: hidden; }
.sx-chat-head { flex: none; display: flex; align-items: center; gap: 6px; min-height: 64px; padding: calc(8px + var(--safe-top)) var(--gutter-r) 8px max(6px, env(safe-area-inset-left)); border-bottom: 1px solid var(--line); background: var(--surface); }
.sx-chat-back { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 44px; height: 44px; border-radius: 50%; color: var(--ink); }
.sx-chat-back .sx-ico { width: 26px; height: 26px; }
@media (hover: hover) { .sx-chat-back:hover { background: var(--surface-2); } }
.sx-chat-who { display: flex; align-items: center; gap: 10px; flex: 1 1 auto; min-width: 0; min-height: 48px; padding: 2px 6px; border-radius: 12px; color: var(--ink); text-decoration: none; }
.sx-chat-who .sx-mav { width: 40px; height: 40px; }
.sx-chat-who-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.sx-chat-who-text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1.05rem; }
.sx-chat-status { min-height: 1.1em; color: var(--accent); font-size: .82rem; font-weight: 700; }
.sx-chat-menu { position: relative; flex: none; }
.sx-chat-menu > summary { list-style: none; cursor: pointer; }
.sx-chat-menu > summary::-webkit-details-marker { display: none; }
.sx-chat-menu-panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; width: min(280px, calc(100vw - 32px)); padding: 8px; border-radius: var(--radius-s); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lift); }
.sx-menu-item.is-danger, .sx-menu-item.is-danger .sx-ico { color: var(--danger); }

.sx-chat-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; background: var(--bg); }
.sx-chat-thread { display: flex; flex-direction: column; min-height: 100%; justify-content: flex-end; padding: 12px max(10px, env(safe-area-inset-right)) 14px max(10px, env(safe-area-inset-left)); }
.sx-chat-older { align-self: center; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; margin: 4px 0 10px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--ink-2); font: 700 .88rem/1 var(--f-body); cursor: pointer; }
.sx-chat-older[aria-busy] { opacity: .6; cursor: progress; }
.sx-chat-hello { margin: auto 0 20px; text-align: center; }
.sx-chat-hello-face { display: inline-flex; margin-bottom: 10px; }
.sx-chat-hello-face .sx-mav { width: 84px; height: 84px; font-size: 1.6rem; }
.sx-chat-hello p { margin: 0 0 4px; }

/* Messages */
.sx-msgs { list-style: none; margin: 0; padding: 0; }
.sx-msg { position: relative; margin: 2px 0 0; }
.sx-msg.is-first { margin-top: 10px; }
.sx-msg-day { margin: 16px 0 8px; text-align: center; }
.sx-msg-day span { display: inline-block; padding: 3px 12px; border-radius: 999px; background: var(--surface); color: var(--ink-3); font-size: .78rem; font-weight: 700; box-shadow: 0 1px 2px rgba(21, 23, 28, .06); }
.sx-msg-row { position: relative; display: flex; align-items: flex-end; gap: 6px; }
.sx-msg.is-mine .sx-msg-row { flex-direction: row-reverse; }
.sx-msg-face { flex: none; display: inline-flex; width: 28px; }
.sx-msg-face .sx-mav { width: 28px; height: 28px; font-size: .62rem; }
.js .sx-msg.is-theirs:not(.is-last) .sx-msg-face { visibility: hidden; }
.sx-msg-bubble { position: relative; max-width: min(78%, 560px); padding: 8px 14px; border-radius: 20px; background: var(--surface); color: var(--ink); line-height: 1.42; font-size: 1rem; overflow-wrap: anywhere; box-shadow: 0 1px 1px rgba(21, 23, 28, .05); cursor: default; -webkit-user-select: text; user-select: text; }
.sx-msg.is-mine .sx-msg-bubble { background: var(--accent); color: var(--accent-ink); }
.sx-msg-text a { color: inherit; text-decoration: underline; }
/* Bubbles in a row from the same person hug each other. */
.sx-msg.is-mine.is-first:not(.is-last) .sx-msg-bubble { border-bottom-right-radius: 6px; }
.sx-msg.is-mine:not(.is-first):not(.is-last) .sx-msg-bubble { border-top-right-radius: 6px; border-bottom-right-radius: 6px; }
.sx-msg.is-mine.is-last:not(.is-first) .sx-msg-bubble { border-top-right-radius: 6px; }
.sx-msg.is-theirs.is-first:not(.is-last) .sx-msg-bubble { border-bottom-left-radius: 6px; }
.sx-msg.is-theirs:not(.is-first):not(.is-last) .sx-msg-bubble { border-top-left-radius: 6px; border-bottom-left-radius: 6px; }
.sx-msg.is-theirs.is-last:not(.is-first) .sx-msg-bubble { border-top-left-radius: 6px; }
.sx-msg.is-jumbo .sx-msg-bubble { padding: 0 2px; background: transparent !important; box-shadow: none; font-size: 2.6rem; line-height: 1.15; }
.sx-msg.has-photo .sx-msg-bubble { padding: 4px; }
.sx-msg.has-photo .sx-msg-text { padding: 4px 10px 4px; }
.sx-msg-photo { display: block; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 16px; overflow: hidden; }
.sx-msg-photo img { display: block; width: auto; max-width: min(100%, 280px); max-height: 340px; height: auto; border-radius: 16px; object-fit: cover; background: var(--surface-2); }
.sx-msg-photo:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.sx-msg.is-deleted .sx-msg-bubble { background: transparent !important; color: var(--ink-3); box-shadow: none; border: 1px dashed var(--line-strong); font-style: italic; font-size: .92rem; }
.sx-msg-gone { display: inline-flex; align-items: center; gap: 6px; }
.sx-msg-gone .sx-ico { width: 16px; height: 16px; }
.sx-msg.is-pending .sx-msg-bubble { opacity: .72; }
.sx-msg.is-failed .sx-msg-bubble { background: var(--danger-soft) !important; color: var(--danger) !important; opacity: 1; }
.sx-msg-status { display: block; margin: 3px 4px 0 0; text-align: right; color: var(--ink-3); font-size: .76rem; font-weight: 600; }
.sx-msg.is-failed .sx-msg-status { color: var(--danger); font-weight: 800; cursor: pointer; text-decoration: underline; }
.sx-msg-seen { display: flex; justify-content: flex-end; margin: 3px 2px 0 0; }
.sx-msg-seen .sx-mav { width: 16px; height: 16px; font-size: .45rem; box-shadow: 0 0 0 2px var(--bg); }

/* Reactions under a bubble */
.sx-msg-reacts { position: relative; z-index: 1; display: flex; align-items: center; gap: 1px; width: max-content; margin: -6px 0 0 40px; padding: 1px 6px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: .9rem; line-height: 1.5; box-shadow: 0 1px 3px rgba(21, 23, 28, .1); }
.sx-msg.is-mine .sx-msg-reacts { margin-left: auto; margin-right: 8px; }
.sx-msg-reacts b { margin-left: 3px; color: var(--ink-2); font-size: .78rem; }
.sx-msg-reacts.is-mine { border-color: var(--accent); }

/* The small menu on a message */
.sx-msg-menu { flex: none; position: static; }
.sx-msg-menu > summary { list-style: none; }
.sx-msg-menu > summary::-webkit-details-marker { display: none; }
.sx-msg-more { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; margin-bottom: 2px; border-radius: 50%; color: var(--ink-3); cursor: pointer; opacity: 0; transition: opacity .15s ease; }
.sx-msg-more .sx-ico { width: 20px; height: 20px; }
.sx-msg-row:hover .sx-msg-more, .sx-msg-more:focus-visible, .sx-msg-menu[open] .sx-msg-more { opacity: 1; }
@media (hover: none) { .sx-msg-more { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); opacity: 0; } }
@media (hover: hover) { .sx-msg-more:hover { background: var(--surface); color: var(--ink); } }
.sx-msg-pop { position: absolute; z-index: 30; bottom: calc(100% + 6px); left: 34px; width: max-content; max-width: calc(100vw - 32px); padding: 8px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lift); animation: sx-pop .14s ease-out; }
.sx-msg.is-mine .sx-msg-pop { left: auto; right: 0; }
.sx-msg-menu[open] { z-index: 31; }
@keyframes sx-pop { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }
.sx-msg-reactbar { display: flex; gap: 2px; margin: 0; }
.sx-msg-reactbar button { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: transparent; font-size: 1.55rem; line-height: 1; cursor: pointer; transition: transform .12s ease, background-color .12s ease; }
.sx-msg-reactbar button[aria-pressed="true"] { background: var(--accent-soft); }
@media (hover: hover) { .sx-msg-reactbar button:hover { transform: scale(1.18); background: var(--surface-2); } }
.sx-msg-reactbar button:focus-visible { outline: 3px solid var(--accent); outline-offset: -2px; }
.sx-msg-pop-tools { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line); }
.sx-msg-pop-tools:empty { display: none; }
.sx-msg-tool { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); font: 700 .92rem/1 var(--f-body); cursor: pointer; }
.sx-msg-tool .sx-ico { width: 18px; height: 18px; color: var(--ink-3); }
.sx-msg-tool.is-danger, .sx-msg-tool.is-danger .sx-ico { color: var(--danger); }
@media (hover: hover) { .sx-msg-tool:hover { background: var(--surface-2); } }
.sx-msg-when { margin: 6px 4px 0; color: var(--ink-3); font-size: .78rem; }

/* Typing dots */
.sx-typing { display: flex; align-items: flex-end; gap: 6px; margin-top: 10px; }
.sx-typing[hidden] { display: none; }
.sx-typing-dots { display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 14px; border-radius: 20px; background: var(--surface); box-shadow: 0 1px 1px rgba(21, 23, 28, .05); }
.sx-typing-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); animation: sx-dot 1.2s infinite ease-in-out; }
.sx-typing-dots i:nth-child(2) { animation-delay: .15s; }
.sx-typing-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes sx-dot { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-4px); opacity: 1; } }

/* Writing */
.sx-chat-foot { flex: none; padding: 8px max(10px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left)); border-top: 1px solid var(--line); background: var(--surface); }
.sx-chat-form { margin: 0; }
.sx-chat-form .sx-field-error { margin: 0 4px 8px; }
.sx-chat-compose { display: flex; align-items: flex-end; gap: 6px; }
.sx-chat-tool { position: relative; display: inline-flex; align-items: center; justify-content: center; flex: none; width: 44px; height: 44px; border-radius: 50%; color: var(--accent); cursor: pointer; }
.sx-chat-tool .sx-ico { width: 24px; height: 24px; }
button.sx-chat-tool { padding: 0; border: 0; background: transparent; font: inherit; }
button.sx-chat-tool:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
button.sx-chat-tool[aria-expanded="true"] { background: var(--accent-soft); }
.sx-chat-tool:focus-within { outline: 3px solid var(--accent); outline-offset: 1px; }
@media (hover: hover) { .sx-chat-tool:hover { background: var(--accent-soft); } }
.sx-chat-file { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 0; }
.sx-chat-field { position: relative; flex: 1 1 auto; min-width: 0; display: flex; align-items: flex-end; border: 1px solid var(--line-strong); border-radius: 22px; background: var(--surface-2); }
.sx-chat-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); background: var(--surface); }
.sx-chat-field textarea { display: block; flex: 1 1 auto; min-width: 0; min-height: 44px; max-height: 150px; margin: 0; padding: 11px 4px 11px 16px; border: 0; background: transparent; color: var(--ink); font: 400 16px/1.38 var(--f-body); resize: none; outline: none; overflow-y: auto; }
.sx-chat-field .sx-emoji-btn { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin: 0; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--ink-3); }
.sx-chat-field .sx-emoji-btn .sx-ico { width: 24px; height: 24px; }
.sx-chat-field .sx-emoji-btn-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (hover: hover) { .sx-chat-field .sx-emoji-btn:hover { color: var(--accent); } }
.sx-chat-send { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: var(--accent); color: var(--accent-ink); cursor: pointer; }
.sx-chat-send .sx-ico { width: 22px; height: 22px; margin-left: -2px; }
@media (hover: hover) { .sx-chat-send:hover { background: var(--accent-deep); } }
.sx-chat-send:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.sx-chat-preview { position: relative; display: inline-block; margin: 2px 0 8px 50px; }
.sx-chat-preview[hidden] { display: none; }
.sx-chat-preview img { display: block; width: auto; height: 84px; max-width: 160px; border-radius: 12px; object-fit: cover; border: 1px solid var(--line); }
.sx-chat-unphoto { position: absolute; top: -8px; right: -8px; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0; border: 2px solid var(--surface); border-radius: 50%; background: var(--ink); color: #fff; cursor: pointer; }
.sx-chat-unphoto .sx-ico { width: 16px; height: 16px; }
.sx-chat-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 14px; padding: 8px 4px; text-align: center; color: var(--ink-2); }
.sx-chat-bar p { margin: 0; font-weight: 600; }

/* "New message" when reading further up */
.sx-chat-pill { position: absolute; z-index: 5; left: 50%; bottom: 96px; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 16px 0 12px; border: 0; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font: 700 .9rem/1 var(--f-body); box-shadow: var(--shadow-lift); cursor: pointer; opacity: 0; pointer-events: none; transform: translate(-50%, 10px); transition: opacity .2s ease, transform .2s ease; }
.sx-chat-pill svg { width: 18px; height: 18px; }
.sx-chat-pill.is-on { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }

/* "Are you sure?" */
.sx-sheet-back { position: fixed; inset: 0; z-index: 90; display: flex; align-items: flex-end; justify-content: center; padding: 16px; background: rgba(17, 20, 27, .45); opacity: 0; transition: opacity .18s ease; }
.sx-sheet-back.is-on { opacity: 1; }
.sx-sheet { width: 100%; max-width: 440px; margin-bottom: env(safe-area-inset-bottom); padding: 22px 20px 18px; border-radius: 20px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lift); }
.sx-sheet-text { margin: 0 0 18px; font-size: 1.02rem; font-weight: 600; line-height: 1.5; }
.sx-sheet-tools { display: flex; gap: 10px; }
.sx-sheet-tools .sx-btn { flex: 1 1 0; }
.sx-sheet-tools .sx-btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
@media (min-width: 600px) { .sx-sheet-back { align-items: center; } }

/* Computers: the list beside the chat, inside the page like the other wide pages. */
@media (min-width: 900px) {
  .is-messages .sx-main { padding: 24px var(--gutter-r) 24px var(--gutter); }
  .sx-chat-app { display: grid; grid-template-columns: minmax(300px, 360px) 1fr; height: calc(100vh - var(--header-h) - 48px); height: calc(100dvh - var(--header-h) - 48px); min-height: 520px; border-radius: var(--radius); overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
  .sx-chat-side, .has-chat .sx-chat-side { display: flex; flex-direction: column; min-height: 0; padding-bottom: 0; border-right: 1px solid var(--line); }
  .sx-chat-side-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
  .sx-chat-begin { flex: none; margin: 6px 16px 16px; padding: 24px 18px 20px; }
  .sx-chat-side-head { padding: 20px 20px 10px; }
  .sx-chat-side-head h1 { font-size: 1.45rem; }
  .sx-chat-search { padding: 4px 16px 8px; }
  .is-picking .sx-chat-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
  .sx-chat-none { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px; text-align: center; background: var(--bg); }
  .sx-chat-none-icon { display: inline-flex; align-items: center; justify-content: center; width: 88px; height: 88px; margin-bottom: 16px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); }
  .sx-chat-none-icon .sx-ico { width: 40px; height: 40px; }
  .sx-chat-none p { max-width: 26em; color: var(--ink-2); }
  .sx-chat { position: relative; z-index: auto; top: auto; left: auto; right: auto; height: auto; min-height: 0; }
  html.js.sx-chat-lock, .has-chat { overflow: visible; }
  .sx-chat-head { padding: 10px 16px; }
  .sx-chat-back { display: none; }
  .sx-chat-back.is-always { display: inline-flex; }
  .sx-chat-thread { padding: 16px 24px 18px; }
  .sx-chat-foot { padding: 10px 16px 12px; }
  .sx-chat-pill { bottom: 92px; }
}
@media (min-width: 1200px) { .sx-chat-app { grid-template-columns: 380px 1fr; } }
@media (prefers-reduced-motion: reduce) { .sx-typing-dots i, .sx-msg-pop { animation: none; } .sx-chat-pill, .sx-sheet-back, .sx-msg-more { transition: none; } }
.sx-chat-status:empty { display: none; }
.sx-msg.has-photo .sx-msg-bubble { max-width: min(78%, 288px); }
.sx-msg-photo img { width: 100%; max-width: 100%; }
/* Group chats, 04-11-2026 */
.sx-gface { position: relative; display: inline-block; flex: none; width: 52px; height: 52px; }
.sx-gface > .sx-mav { position: absolute; width: 36px; height: 36px; font-size: .74rem; box-shadow: 0 0 0 2px var(--surface); }
.sx-gface > .sx-mav:first-child { top: 0; left: 0; }
.sx-gface > .sx-mav:nth-child(2) { right: 0; bottom: 0; }
.sx-gface.is-single > .sx-mav { position: static; width: 100%; height: 100%; font-size: 1rem; box-shadow: none; }
.sx-gface-icon, .sx-mav.sx-gface-icon { display: inline-flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent); }
.sx-gface-icon .sx-ico { width: 55%; height: 55%; }
.sx-chat-item-face > .sx-mav.sx-gface-icon { width: 52px; height: 52px; }
.sx-chat-who .sx-gface { width: 40px; height: 40px; }
.sx-chat-who .sx-gface > .sx-mav { width: 28px; height: 28px; font-size: .6rem; }
.sx-chat-who .sx-gface.is-single > .sx-mav { width: 100%; height: 100%; }
.sx-chat-hello-face .sx-gface, .sx-people-face .sx-gface { width: 84px; height: 84px; }
.sx-chat-hello-face .sx-gface > .sx-mav, .sx-people-face .sx-gface > .sx-mav { width: 58px; height: 58px; font-size: 1.1rem; box-shadow: 0 0 0 3px var(--surface); }
.sx-chat-hello-face .sx-gface.is-single > .sx-mav, .sx-people-face .sx-gface.is-single > .sx-mav { width: 100%; height: 100%; font-size: 1.6rem; }
.sx-chat-sub { color: var(--ink-3); font-size: .82rem; font-weight: 600; }
.sx-chat.is-typing .sx-chat-sub { display: none; }
.sx-chat-newgroup { flex: none; }
.sx-chat-item-muted { display: inline-flex; flex: none; color: var(--ink-3); }
.sx-chat-item-muted .sx-ico { width: 15px; height: 15px; }
.sx-chat-item-from { margin-right: 5px; font-weight: 700; color: var(--ink-2); }
.sx-chat-item-from::after { content: "\00B7"; margin-left: 5px; color: var(--ink-3); font-weight: 400; }
.sx-chat-item.is-unread .sx-chat-item-from { color: var(--ink); }
.sx-chat-list-top { padding-bottom: 0; }
.sx-chat-item-group .sx-chat-item-top strong { color: var(--accent); }

/* A name over a friend's first message in a group, and group events in the middle. */
.sx-msg-name { display: none; margin: 0 0 2px 48px; color: var(--ink-3); font-size: .78rem; font-weight: 700; }
.sx-msg.is-first > .sx-msg-name { display: block; }
.sx-msg-event { margin: 12px 0 6px; text-align: center; }
.sx-msg-event p { display: inline-block; max-width: 86%; margin: 0; padding: 3px 12px; color: var(--ink-3); font-size: .8rem; font-weight: 600; line-height: 1.4; }
.sx-msg-seenrow { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 2px; margin: 3px 2px 0 0; }
.sx-msg-seenrow .sx-msg-seen { display: inline-flex; margin: 0; }
.sx-msg-seen-more { margin-left: 2px; color: var(--ink-3); font-size: .7rem; font-weight: 700; }

/* Picking friends for a group */
.sx-group-form { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.sx-group-name { padding: 4px var(--gutter-r) 12px var(--gutter); }
.sx-group-name .sx-input { width: 100%; min-height: 48px; }
.sx-group-error { margin: 0 var(--gutter-r) 10px var(--gutter); }
.sx-group-pick { min-width: 0; margin: 0; padding: 0; border: 0; }
.sx-group-legend { padding: 4px var(--gutter-r) 2px var(--gutter); font-weight: 800; }
.sx-chat-check { position: relative; cursor: pointer; }
.sx-check-input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.sx-check-box { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: 2px solid var(--line-strong); border-radius: 50%; background: var(--surface); color: transparent; transition: background-color .12s ease, border-color .12s ease; }
.sx-check-box .sx-ico { width: 18px; height: 18px; }
.sx-check-input:checked + .sx-check-box { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.sx-check-input:focus-visible + .sx-check-box { outline: 3px solid var(--accent); outline-offset: 2px; }
.sx-chat-check:has(.sx-check-input:checked) { background: var(--accent-soft); }
.sx-group-go { position: sticky; bottom: 0; z-index: 2; display: flex; align-items: center; gap: 12px; padding: 12px var(--gutter-r) max(12px, env(safe-area-inset-bottom)) var(--gutter); border-top: 1px solid var(--line); background: var(--surface); }
.sx-group-go .sx-btn { flex: none; }
.sx-group-go .sx-btn[disabled] { opacity: .5; cursor: not-allowed; }
.sx-group-count { flex: 1 1 auto; min-width: 0; margin: 0; color: var(--ink-2); font-weight: 700; }
.sx-group-go.is-inline { position: static; padding: 12px 0 0; border-top: 0; background: transparent; }

/* A group's people and settings */
.sx-chat-people { background: var(--bg); min-height: calc(100vh - var(--header-h)); min-height: calc(100dvh - var(--header-h)); }
.sx-chat-people .sx-chat-head { position: sticky; top: 0; z-index: 3; }
.sx-people-body { width: 100%; max-width: 640px; margin: 0 auto; padding: 16px var(--gutter-r) max(32px, env(safe-area-inset-bottom)) var(--gutter); }
.sx-people-body > .sx-toast, .sx-people-body > .sx-field-error { margin: 0 0 14px; }
.sx-people-hero { margin: 8px 0 20px; text-align: center; }
.sx-people-face { display: inline-flex; margin-bottom: 10px; }
.sx-people-hero h2 { margin: 0 0 4px; font-size: 1.4rem; overflow-wrap: anywhere; }
.sx-people-hero p { margin: 0 0 12px; }
.sx-people-card { margin: 0 0 14px; padding: 16px 16px 18px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.sx-people-card h3 { margin: 0 0 10px; font-size: 1.05rem; }
.sx-people-card .sx-help { margin: 8px 0 0; }
.sx-people-rename { display: flex; gap: 8px; }
.sx-people-rename .sx-input { flex: 1 1 auto; min-width: 0; min-height: 44px; }
.sx-people-rename .sx-btn { flex: none; }
.sx-people-value { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.sx-people-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin: 0; }
.sx-people-row .sx-help { flex: 1 1 240px; margin: 0; }
.sx-people-list { list-style: none; margin: 0; padding: 0; }
.sx-people-item { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 6px 0; border-top: 1px solid var(--line); }
.sx-people-item:first-child { border-top: 0; }
.sx-people-item .sx-chat-item-face .sx-mav { width: 44px; height: 44px; }
.sx-people-who { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; flex: 1 1 auto; min-width: 0; }
.sx-people-who strong { overflow-wrap: anywhere; }
.sx-people-tag { padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: .74rem; font-weight: 800; }
.sx-people-remove { flex: none; }
.sx-people-add { padding: 0; margin: 6px -8px 0; }
.sx-people-leave .sx-btn { margin-top: 12px; }
@media (min-width: 900px) {
  .sx-chat-people { min-height: 0; overflow-y: auto; }
  .sx-chat-people .sx-chat-head { padding: 10px 16px; }
  .sx-people-body { padding: 20px 24px 32px; }
  .is-grouping .sx-chat-side { overflow: hidden; }
  .is-grouping .sx-group-form { overflow: hidden; }
  .is-grouping .sx-group-pick { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
  .is-grouping .sx-group-pick .sx-chat-list { overflow: visible; }
  .sx-group-name { padding: 4px 20px 12px; }
  .sx-group-legend { padding: 4px 20px 2px; }
  .sx-group-error { margin: 0 20px 10px; }
  .sx-group-go { padding: 12px 16px; }
  .sx-group-go.is-inline { padding: 12px 0 0; }
}
/* Link cards in messages, 04-11-2026. The same cards as in posts, fitted inside the bubble. */
.sx-msg.has-card .sx-msg-bubble { width: min(78%, 360px); max-width: min(78%, 360px); padding: 4px; }
.sx-msg.has-card .sx-msg-text { padding: 4px 10px 6px; }
.sx-msg-bubble .sx-lc, .sx-msg-bubble .sx-yt { margin: 0; border-radius: 16px; border-color: transparent; background: var(--surface-2); color: var(--ink); -webkit-user-select: none; user-select: none; }
.sx-msg.is-mine .sx-msg-bubble .sx-lc, .sx-msg.is-mine .sx-msg-bubble .sx-yt { background: var(--surface); }
.sx-msg-bubble .sx-lc-meta, .sx-msg-bubble .sx-yt-meta { padding: 9px 12px 11px; }
.sx-msg-bubble .sx-lc-title, .sx-msg-bubble .sx-yt-title { font-size: .95rem; }
.sx-msg-bubble .sx-lc-desc { font-size: .84rem; }
.sx-msg-bubble .sx-yt-author { font-size: .82rem; }
.sx-msg-bubble .sx-lc.is-small .sx-lc-img { width: 84px; min-height: 84px; }
.sx-msg-bubble .sx-lc-icon { width: 52px; }
.sx-msg-bubble .sx-yt-btn { width: 58px; height: 41px; margin: -20px 0 0 -29px; }
@media (hover: hover) { .sx-msg-bubble .sx-lc:hover { border-color: var(--line-strong); background: var(--surface); } .sx-msg.is-mine .sx-msg-bubble .sx-lc:hover { background: var(--surface-2); } }
/* A card on its own needs no coloured frame. Its corners follow the bubbles around it. */
.sx-msg.is-card-only .sx-msg-bubble { padding: 0; background: transparent !important; box-shadow: none; }
.sx-msg.is-card-only .sx-msg-bubble .sx-lc, .sx-msg.is-card-only .sx-msg-bubble .sx-yt { border-radius: 20px; border-color: var(--line); background: var(--surface); box-shadow: 0 1px 1px rgba(21, 23, 28, .05); }
.sx-msg.is-mine.has-card:not(.is-card-only):not(.is-last) .sx-msg-bubble > :last-child { border-bottom-right-radius: 4px; }
.sx-msg.is-theirs.has-card:not(.is-card-only):not(.is-last) .sx-msg-bubble > :last-child { border-bottom-left-radius: 4px; }
.sx-msg.is-mine.is-card-only:not(.is-last) .sx-msg-bubble > :last-child { border-bottom-right-radius: 6px; }
.sx-msg.is-mine.is-card-only:not(.is-first) .sx-msg-bubble > :last-child { border-top-right-radius: 6px; }
.sx-msg.is-theirs.is-card-only:not(.is-last) .sx-msg-bubble > :last-child { border-bottom-left-radius: 6px; }
.sx-msg.is-theirs.is-card-only:not(.is-first) .sx-msg-bubble > :last-child { border-top-left-radius: 6px; }
/* Answering a message, 05-11-2026 */
.sx-msg-quote { display: flex; flex-direction: column; gap: 1px; margin: 2px 0 6px; padding: 6px 10px; border-left: 3px solid var(--accent); border-radius: 10px; background: rgba(21, 23, 28, .06); color: inherit; text-decoration: none; font-size: .86rem; line-height: 1.35; max-width: 100%; min-width: 0; }
.sx-msg.is-mine .sx-msg-quote { border-left-color: rgba(255, 255, 255, .85); background: rgba(255, 255, 255, .16); }
.sx-msg-quote-name { font-weight: 800; }
.sx-msg-quote-text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; opacity: .85; overflow-wrap: anywhere; }
.sx-msg-quote-text .sx-ico { width: 15px; height: 15px; margin-right: 4px; vertical-align: -2px; }
.sx-msg-quote.is-off .sx-msg-quote-text { font-style: italic; }
a.sx-msg-quote:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
@media (hover: hover) { a.sx-msg-quote:hover { background: rgba(21, 23, 28, .1); } .sx-msg.is-mine a.sx-msg-quote:hover { background: rgba(255, 255, 255, .24); } }
.sx-msg.has-photo .sx-msg-quote, .sx-msg.has-card .sx-msg-quote { margin: 4px 4px 6px; }
.sx-msg.is-card-only .sx-msg-quote { margin: 0 0 6px; background: var(--surface); }
.sx-msg.is-flash .sx-msg-bubble { animation: sx-flash 1.5s ease; }
@keyframes sx-flash { 0%, 40% { box-shadow: 0 0 0 4px var(--accent-soft), 0 0 0 6px var(--accent); } 100% { box-shadow: 0 1px 1px rgba(21, 23, 28, .05); } }
.sx-msg-row { touch-action: pan-y pinch-zoom; }
.sx-msg-row.is-pulling { transition: none; }
.sx-msg-row:not(.is-pulling) { transition: transform .2s ease; }
.sx-msg-row.is-pulling::before { content: ""; position: absolute; left: -34px; top: 50%; width: 26px; height: 26px; margin-top: -13px; border-radius: 50%; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23596070' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 14l-5-5 5-5'/%3E%3Cpath d='M4 9h10a6 6 0 0 1 6 6v4'/%3E%3C/svg%3E") center / 16px no-repeat; opacity: .5; transform: scale(.8); transition: opacity .15s ease, transform .15s ease; }
.sx-msg-row.is-ready::before { opacity: 1; transform: scale(1); }
.sx-chat-reply { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; padding: 8px 8px 8px 12px; border-left: 3px solid var(--accent); border-radius: 12px; background: var(--surface-2); min-width: 0; }
.sx-chat-reply[hidden] { display: none; }
.sx-chat-reply-ico { flex: none; display: inline-flex; color: var(--accent); }
.sx-chat-reply-ico .sx-ico { width: 18px; height: 18px; }
.sx-chat-reply-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; font-size: .88rem; line-height: 1.35; }
.sx-chat-reply-label { color: var(--ink-3); }
.sx-chat-reply-label b { color: var(--ink); font-weight: 800; }
.sx-chat-reply-text { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sx-chat-unreply { position: static; flex: none; width: 32px; height: 32px; border: 0; background: var(--surface); color: var(--ink-2); }
@media (hover: hover) { .sx-chat-unreply:hover { background: var(--line); color: var(--ink); } }
@media (prefers-reduced-motion: reduce) { .sx-msg.is-flash .sx-msg-bubble { animation: none; outline: 3px solid var(--accent); } .sx-msg-row:not(.is-pulling) { transition: none; } }

/* @mentions, 05-11-2026 */
.sx-mention {
  color: var(--accent-deep);
  font-weight: 600;
  text-decoration: none;
  border-radius: 4px;
  background: var(--accent-soft);
  padding: 0 .2em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
a.sx-mention:hover, a.sx-mention:focus-visible { text-decoration: underline; }
.sx-mention-list {
  position: fixed;
  z-index: 90;
  margin: 0;
  padding: 6px;
  list-style: none;
  max-height: min(280px, 45vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  box-shadow: var(--shadow-lift);
}
.sx-mention-list[hidden] { display: none; }
.sx-mention-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--ink);
  -webkit-tap-highlight-color: transparent;
}
.sx-mention-list li[aria-selected="true"], .sx-mention-list li:hover { background: var(--accent-soft); }
.sx-mention-list li.sx-mention-none { cursor: default; color: var(--ink-3); font-size: .9rem; background: none; }
.sx-mention-face { flex: none; width: 32px; height: 32px; display: inline-flex; }
.sx-mention-face > * { width: 32px !important; height: 32px !important; font-size: .8rem; }
.sx-mention-name { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Birthdays and On this day on Home, 05-11-2026 */
.sx-bday, .sx-memories {
  position: relative;
  margin: 0 0 16px;
  padding: 18px clamp(16px, 4vw, 24px);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.sx-bday::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: linear-gradient(90deg, #f4a38c, #c2417a 35%, #8a5cf5 65%, #3b4fd8);
}
.sx-bday:not(.is-soon) { background: linear-gradient(180deg, #fff4f0 0, var(--surface) 72px); }
.sx-bday-head, .sx-memories-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.sx-bday-head h2, .sx-memories-head h2 { margin: 0; font-size: 1.05rem; line-height: 1.3; }
.sx-bday-icon, .sx-memories-icon {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 36px; height: 36px; border-radius: 50%;
  color: #fff; background: linear-gradient(135deg, #f4a38c, #c2417a);
}
.sx-memories-icon { background: linear-gradient(135deg, #3b4fd8, #8a5cf5); }
.sx-bday-icon .sx-ico, .sx-memories-icon .sx-ico { width: 20px; height: 20px; }
.sx-bday-list, .sx-bday-soonlist, .sx-memories-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.sx-bday-list li { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 12px; }
.sx-bday-list .sx-mav, .sx-bday-list .sx-mav-img { width: 44px; height: 44px; font-size: .9rem; }
.sx-bday-who { flex: 1 1 140px; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.sx-bday-who b { overflow-wrap: anywhere; }
.sx-bday-who span { color: var(--ink-3); font-size: .9rem; }
.sx-bday-list .sx-btn { flex: none; }
@media (max-width: 420px) {
  .sx-bday-list .sx-btn { flex: 1 1 100%; justify-content: center; }
}
.sx-bday-soon { margin: 12px 0 0; color: var(--ink-3); font-size: .9rem; }
.sx-bday-soonlist li { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sx-bday-soonlist .sx-mav, .sx-bday-soonlist .sx-mav-img { width: 32px; height: 32px; font-size: .75rem; }
.sx-bday-soonlist b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sx-bday-soonlist li > span:last-child { flex: none; color: var(--ink-3); font-size: .9rem; font-variant-numeric: tabular-nums; }
.sx-memory {
  display: flex; align-items: stretch; gap: 12px; min-height: 64px;
  padding: 10px; border-radius: var(--radius-s);
  background: var(--surface-2); color: var(--ink); text-decoration: none;
  transition: background-color .15s ease;
}
.sx-memory:hover, .sx-memory:focus-visible { background: var(--accent-soft); }
.sx-memory-thumb { flex: none; width: 72px; height: 72px; border-radius: 10px; object-fit: cover; background: var(--line); }
.sx-memory-body { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.sx-memory-when { color: var(--accent-deep); font-size: .8rem; font-weight: 700; letter-spacing: .02em; }
.sx-memory-title { overflow-wrap: anywhere; }
.sx-memory-text {
  color: var(--ink-2); font-size: .95rem; line-height: 1.4; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.sx-panel h2 > .sx-ico:first-child { vertical-align: -3px; margin-right: 8px; color: #c2417a; }
.sx-bday-fields { display: grid; grid-template-columns: minmax(106px, 1fr) minmax(132px, 1.7fr); gap: 10px; max-width: 420px; }
@media (max-width: 359.98px) { .sx-bday-fields { grid-template-columns: minmax(0, 1fr); } }
.sx-bday-field { display: flex; flex-direction: column; min-width: 0; }
.sx-bday-field .sx-select { width: 100%; padding-right: 32px; background-position: calc(100% - 18px) 19px, calc(100% - 13px) 19px; }
@media (prefers-reduced-motion: reduce) { .sx-memory { transition: none; } }
/* Polls: in a post (the post text is the question) and in a group chat */
.sx-poll { margin-top: 14px; }
.sx-poll-q { display: flex; align-items: flex-start; gap: 8px; margin: 2px 2px 10px; font-weight: 800; font-size: 1.02rem; line-height: 1.35; overflow-wrap: anywhere; }
.sx-poll-q .sx-ico { flex: none; width: 20px; height: 20px; margin-top: 1px; color: var(--accent); }
.sx-poll-form { margin: 0; }
.sx-poll-list { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.sx-poll-opt {
  position: relative; display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px;
  padding: 8px 14px 8px 10px; overflow: hidden; isolation: isolate;
  border: 1.5px solid var(--line-strong); border-radius: var(--radius-s); background: var(--surface);
  color: var(--ink); font: inherit; font-size: 1rem; line-height: 1.3; text-align: left; cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}
.sx-poll-opt:disabled { cursor: default; color: var(--ink); opacity: 1; }
.sx-poll-bar { position: absolute; z-index: -1; left: 0; top: 0; bottom: 0; width: 0; background: var(--accent-soft); transition: width .45s cubic-bezier(.2, .8, .2, 1); }
.sx-poll-opt.is-mine { border-color: var(--accent); }
.sx-poll-opt.is-mine .sx-poll-bar { background: color-mix(in srgb, var(--accent) 22%, var(--surface)); }
.sx-poll-mark { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 22px; height: 22px; border: 2px solid var(--line-strong); border-radius: 50%; color: var(--accent-ink); background: var(--surface); }
.sx-poll-opt.is-mine .sx-poll-mark { border-color: var(--accent); background: var(--accent); }
.sx-poll-mark .sx-ico { width: 14px; height: 14px; }
.sx-poll-label { flex: 1 1 auto; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.sx-poll-faces { display: none; flex: none; }
.sx-poll-faces .sx-mav, .sx-poll-faces .sx-mav-img { width: 22px; height: 22px; font-size: .55rem; box-shadow: 0 0 0 2px var(--surface); }
.sx-poll-faces > * + * { margin-left: -6px; }
.sx-poll-pct { flex: none; min-width: 3ch; font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; color: var(--ink-2); }
.sx-poll-opt.is-mine .sx-poll-pct { color: var(--accent-deep); }
.sx-poll-foot { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 10px 2px 0; color: var(--ink-3); font-size: .88rem; }
.sx-poll-foot > span:first-child { font-weight: 700; color: var(--ink-2); }
.sx-poll.is-busy .sx-poll-opt { cursor: progress; }
.sx-poll.is-busy .sx-poll-list { opacity: .7; }
@media (min-width: 420px) { .sx-poll-faces { display: inline-flex; } }
@media (hover: hover) {
  .sx-poll-opt:not(:disabled):hover { border-color: var(--accent); background: var(--accent-soft); }
  .sx-poll.has-results .sx-poll-opt:not(:disabled):hover { background: var(--surface); }
}
.sx-poll-opt:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.sx-msg.has-poll .sx-msg-bubble { width: min(88%, 400px); max-width: min(88%, 400px); padding: 12px 12px 10px; background: var(--surface) !important; color: var(--ink) !important; border: 1px solid var(--line); }
.sx-msg.is-mine.has-poll .sx-msg-bubble { border-color: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.sx-msg.has-poll .sx-poll { margin-top: 0; }
.sx-msg.has-poll .sx-poll-opt { min-height: 44px; font-size: .97rem; }

/* The poll part of the post composer */
.sx-pollc { margin: 4px 0 22px; padding: 14px 16px 16px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); transition: border-color .2s ease, background-color .2s ease; }
.sx-pollc.is-on { border-color: var(--accent); background: linear-gradient(180deg, var(--accent-soft), var(--surface) 70%); }
.sx-pollc .sx-switch-field { margin: 0; }
.sx-pollc .sx-switch-label { display: inline-flex; align-items: center; gap: 6px; }
.sx-pollc .sx-switch-label .sx-ico { width: 18px; height: 18px; color: var(--accent); }
.sx-pollc-box { margin-top: 12px; }
.sx-pollc-box > .sx-help { margin: 0 0 10px; }
/* Each answer looks like the choice it becomes: a round mark, the text, and an x to take an extra answer away. */
.sx-pollc-row { display: flex; align-items: center; gap: 10px; min-height: 52px; margin-bottom: 8px; padding: 0 6px 0 14px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--surface); transition: border-color .15s ease, box-shadow .15s ease; }
.sx-pollc-row[hidden] { display: none; }
.sx-pollc-row:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.sx-pollc-row:has(.sx-pollc-input[aria-invalid="true"]) { border-color: var(--danger); }
.sx-pollc-mark { flex: none; width: 20px; height: 20px; border: 2px solid var(--line-strong); border-radius: 50%; transition: border-color .15s ease; }
.sx-pollc-row:focus-within .sx-pollc-mark { border-color: var(--accent); }
.sx-pollc-input { flex: 1 1 auto; min-width: 0; min-height: 50px; margin: 0; padding: 0 8px 0 0; border: 0; border-radius: 0; background: transparent; color: var(--ink); font: 400 16px/1.4 var(--f-body); -webkit-appearance: none; appearance: none; }
.sx-pollc-input:focus { outline: none; }
.sx-pollc-input::placeholder { color: var(--ink-3); opacity: 1; }
.sx-pollc-remove { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 40px; height: 40px; margin: 0; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--ink-3); cursor: pointer; }
.sx-pollc-remove .sx-ico { width: 18px; height: 18px; }
.sx-pollc-remove:focus-visible { outline: 3px solid var(--accent); outline-offset: 0; }
@media (hover: hover) { .sx-pollc-remove:hover { background: var(--surface-2); color: var(--ink); } }
html:not(.js) .sx-pollc-remove { display: none; }
.sx-pollc-add { margin-top: 2px; }
.sx-pollc-locked { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 10px; padding: 10px 12px; border-radius: 10px; background: var(--ok-soft); color: var(--ok); font-weight: 600; }
.sx-pollc-locked .sx-ico { flex: none; width: 18px; height: 18px; margin-top: 2px; }
.sx-pollc-fixed { margin: 0; padding-left: 1.4em; }
.sx-pollc-fixed li { padding: 4px 0; font-weight: 600; overflow-wrap: anywhere; }
html:not(.js) .sx-pollc-box[hidden] { display: block; }
@media (prefers-reduced-motion: reduce) { .sx-poll-bar, .sx-poll-opt, .sx-pollc { transition: none; } }
/* Making a poll in a group chat: a sheet in place of the message box */
.sx-chat-pollc { display: flex; flex-direction: column; gap: 8px; max-height: min(70vh, 560px); max-height: min(70dvh, 560px); overflow-y: auto; overscroll-behavior: contain; padding: 2px 2px 4px; }
.sx-chat-pollc[hidden] { display: none; }
.sx-chat-pollc-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sx-chat-pollc-title { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 1.1rem; }
.sx-chat-pollc-title .sx-ico { color: var(--accent); }
.sx-chat-pollc-close { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: var(--surface-2); color: var(--ink-2); cursor: pointer; }
.sx-chat-pollc-close:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
@media (hover: hover) { .sx-chat-pollc-close:hover { background: var(--line); color: var(--ink); } }
.sx-chat-pollc .sx-label { margin: 4px 0 0; }
.sx-chat-pollc .sx-field-error { margin: 0; }
.sx-chat-pollc .sx-pollc-row { margin: 0; }
.sx-chat-pollc .sx-input { width: 100%; }
.sx-chat-pollc-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.sx-chat-pollc-foot .sx-btn:last-child { margin-left: auto; }
.sx-chat-pollc[aria-busy="true"] [data-chat-poll-send] { opacity: .7; cursor: progress; }
@media (max-width: 380px) { .sx-chat-pollc-foot .sx-btn { flex: 1 1 100%; justify-content: center; } }
/* Photos page and albums */
.sx-facts-link { padding: 0 !important; background: transparent !important; }
.sx-facts-link a { display: inline-flex; align-items: center; gap: 5px; min-height: 32px; padding: 5px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-deep); text-decoration: none; }
.sx-facts-link a strong { color: inherit; }
.sx-facts-link .sx-ico { width: 16px; height: 16px; }
@media (hover: hover) { .sx-facts-link a:hover { background: color-mix(in srgb, var(--accent) 18%, var(--surface)); } }
.sx-facts-link a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
/* Phones and tablets: the profile card is one tap back, so the photos come first. */
@media (max-width: 1079.98px) { .sx-photos-grid > .sx-side { display: none; } }
.sx-photos-head { margin: 4px 0 18px; }
.sx-photos-title { display: flex; align-items: center; gap: 10px; margin: 0 0 2px; font-size: 1.6rem; overflow-wrap: anywhere; }
.sx-photos-title .sx-ico { flex: none; width: 26px; height: 26px; color: var(--accent); }
.sx-photos-head .sx-dim { margin: 0; }
.sx-photos-sub { margin: 0 0 12px; font-size: 1.05rem; }
.sx-albums { margin-bottom: 28px; }
.sx-album-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.sx-album { display: flex; flex-direction: column; gap: 2px; min-width: 0; color: var(--ink); text-decoration: none; }
.sx-album-cover { display: flex; align-items: center; justify-content: center; aspect-ratio: 1 / 1; margin-bottom: 6px; overflow: hidden; border-radius: var(--radius-s); background: var(--accent-soft); color: var(--accent); box-shadow: var(--shadow); }
.sx-album-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.sx-album-cover .sx-ico { width: 36px; height: 36px; }
.sx-album-name { font-weight: 800; line-height: 1.3; overflow-wrap: anywhere; }
.sx-album-count { color: var(--ink-3); font-size: .88rem; }
@media (hover: hover) { .sx-album:hover .sx-album-cover img { transform: scale(1.04); } .sx-album:hover .sx-album-name { color: var(--accent-deep); } }
.sx-album:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: var(--radius-s); }
.sx-photo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; margin: 0 calc(-1 * var(--gutter-r)) 0 calc(-1 * var(--gutter)); padding: 0; list-style: none; }
.sx-photo-tile { display: block; width: 100%; aspect-ratio: 1 / 1; padding: 0; border: 0; overflow: hidden; background: var(--surface-2); cursor: zoom-in; }
.sx-photo-tile img { width: 100%; height: 100%; object-fit: cover; transition: opacity .15s ease; }
@media (hover: hover) { .sx-photo-tile:hover img { opacity: .88; } }
.sx-photo-tile:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.sx-photos-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 16px; margin: 20px 0 0; }
.sx-album-tools { margin-top: 28px; }
.sx-album-row { display: flex; flex-wrap: wrap; gap: 8px; }
.sx-album-row .sx-input { flex: 1 1 14em; min-width: 0; }
.sx-album-delete { margin-top: 16px; }
.sx-album-delete > summary { list-style: none; display: inline-flex; cursor: pointer; }
.sx-album-delete > summary::-webkit-details-marker { display: none; }
.sx-album-delete-box { margin-top: 10px; padding: 12px 14px; border-radius: var(--radius-s); background: var(--danger-soft); color: var(--ink); }
.sx-album-delete-box p { margin: 0 0 10px; }
.sx-album-delete-box .sx-btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.sx-viewer-post { position: absolute; left: 50%; bottom: max(56px, calc(env(safe-area-inset-bottom) + 48px)); transform: translateX(-50%); display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; background: rgba(255, 255, 255, .94); color: #15171c; font-weight: 700; text-decoration: none; white-space: nowrap; }
.sx-viewer-post:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
/* Album picker: a row of album cards, like picking an album on a phone. */
.sx-albumpick { margin: 16px 0 0; padding: 14px 0 0; border: 0; border-top: 1px solid var(--line); min-width: 0; }
.sx-albumpick[hidden] { display: none; }
.sx-albumpick-title { display: flex; align-items: center; gap: 6px; padding: 0; margin: 0; float: left; width: 100%; }
.sx-albumpick-title .sx-ico { width: 18px; height: 18px; color: var(--accent); }
.sx-albumpick-help { clear: both; margin: 0; padding-top: 4px; }
.sx-albumpick-list { display: flex; gap: 10px; margin: 12px -4px 0; padding: 4px 4px 10px; overflow-x: auto; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.sx-albumcard { position: relative; flex: 0 0 116px; scroll-snap-align: start; display: flex; flex-direction: column; min-width: 0; padding: 6px 6px 10px; border: 1.5px solid var(--line-strong); border-radius: 14px; background: var(--surface); cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; -webkit-tap-highlight-color: transparent; }
.sx-albumcard:hover { border-color: var(--accent); }
.sx-albumcard:active { transform: scale(.98); }
.sx-albumcard-radio { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.sx-albumcard-cover { display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: 1 / 1; border-radius: 9px; overflow: hidden; background: var(--surface-2); color: var(--ink-3); }
@supports not (aspect-ratio: 1 / 1) { .sx-albumcard-cover { height: 100px; } }
.sx-albumcard-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sx-albumcard-cover .sx-ico { width: 30px; height: 30px; }
.sx-albumcard.is-none .sx-albumcard-cover { background: transparent; border: 1.5px dashed var(--line-strong); }
.sx-albumcard.is-new .sx-albumcard-cover { background: var(--accent-soft); color: var(--accent); }
.sx-albumcard-name { margin: 8px 2px 0; font-weight: 650; font-size: .92rem; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sx-albumcard-count { margin: 2px 2px 0; font-size: .8rem; color: var(--ink-3); line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sx-albumcard-tick { position: absolute; top: 12px; right: 12px; display: flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff; box-shadow: 0 0 0 2px var(--surface), 0 2px 6px rgba(0,0,0,.25); opacity: 0; transform: scale(.6); transition: opacity .15s ease, transform .15s ease; }
.sx-albumcard-tick .sx-ico { width: 16px; height: 16px; }
.sx-albumcard.is-checked, .sx-albumcard:has(.sx-albumcard-radio:checked) { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.sx-albumcard.is-checked .sx-albumcard-tick, .sx-albumcard:has(.sx-albumcard-radio:checked) .sx-albumcard-tick { opacity: 1; transform: none; }
.sx-albumcard.is-checked .sx-albumcard-name { color: var(--accent-deep); }
.sx-albumcard:has(.sx-albumcard-radio:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.sx-albumcard.is-focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.sx-albumpick-new { margin-top: 6px; max-width: 420px; }
.sx-albumpick-new[hidden] { display: none; }
html:not(.js) .sx-albumpick-new[hidden] { display: block; }
.sx-albumpick-new .sx-input { width: 100%; }
.sx-albumpick .sx-error { margin: 8px 0 0; }
@media (min-width: 760px) {
  .sx-albumpick-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); overflow: visible; }
  .sx-albumcard-cover .sx-ico { width: 26px; height: 26px; }
}
@media (prefers-reduced-motion: reduce) { .sx-albumcard, .sx-albumcard-tick { transition: none; } }
@media (min-width: 600px) {
  .sx-album-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .sx-photo-grid { margin: 0; gap: 6px; }
  .sx-photo-tile { border-radius: 8px; }
}
@media (prefers-reduced-motion: reduce) { .sx-album-cover img, .sx-photo-tile img { transition: none; } }
/* Weekly email on My account */
.sx-digest-state { display: inline-flex; align-items: center; gap: 8px; margin: 4px 0 14px; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); color: var(--ink-2); font-weight: 600; }
.sx-digest-state.is-on { background: var(--ok-soft); color: var(--ok); }
.sx-digest-state .sx-ico { width: 18px; height: 18px; flex: none; }

/* =====================================================================
   3D models (GLB) in posts. The viewer background matches the cover
   picture (#eef0f5), so the switch from picture to live model is seamless.
   ===================================================================== */
.sx-m3d { margin: 16px -20px 0; background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
/* 3D is always green, whatever the page colour, like downloads. */
.sx-m3d-stage { --accent: #0f7b6c; --accent-deep: #0b5e53; --accent-soft: #e3f4f1; position: relative; overflow: hidden; background: #eef0f5; background-image: radial-gradient(120% 90% at 50% 18%, #ffffff 0%, #eef0f5 55%, #e2e5ee 100%); -webkit-tap-highlight-color: transparent; }
.sx-m3d-stage::before { content: ""; display: block; padding-top: 75%; }
.sx-m3d-cover, .sx-m3d-blank, .sx-m3d-open, .sx-m3d-viewer { position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%; }
.sx-m3d-cover { display: block; object-fit: cover; }
.sx-m3d-blank { display: flex; align-items: center; justify-content: center; color: #9aa1b4; }
.sx-m3d-blank .sx-ico { width: 64px; height: 64px; stroke-width: 1.2; }
.sx-m3d-viewer { display: block; background-color: #eef0f5; --poster-color: transparent; --progress-bar-height: 0px; outline: none; }
.sx-m3d-viewer:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.sx-m3d-open { display: flex; align-items: flex-end; justify-content: center; margin: 0; padding: 0 12px 16px; border: 0; background: linear-gradient(180deg, rgba(17, 20, 27, 0) 55%, rgba(17, 20, 27, .28) 100%); color: #fff; font: inherit; cursor: pointer; touch-action: manipulation; }
.sx-m3d-pill { display: inline-flex; align-items: center; gap: 12px; max-width: 100%; min-height: 52px; padding: 6px 20px 6px 6px; border-radius: 999px; background: rgba(17, 20, 27, .82); box-shadow: 0 8px 24px -10px rgba(17, 20, 27, .6); transition: transform .15s ease, background-color .15s ease; }
.sx-m3d-pill > .sx-ico { flex: none; width: 40px; height: 40px; padding: 9px; border-radius: 50%; background: var(--accent); color: #fff; }
.sx-m3d-pill-text { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; line-height: 1.2; text-align: left; }
.sx-m3d-pill-text strong { font-weight: 750; font-size: 1rem; }
.sx-m3d-size { font-size: .8rem; color: #c9cdd8; font-variant-numeric: tabular-nums; }
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .sx-m3d-pill { background: rgba(17, 20, 27, .66); -webkit-backdrop-filter: blur(12px) saturate(1.4); backdrop-filter: blur(12px) saturate(1.4); }
}
@media (hover: hover) { .sx-m3d-open:hover .sx-m3d-pill { transform: translateY(-2px); background: rgba(17, 20, 27, .86); } }
.sx-m3d-open:active .sx-m3d-pill { transform: scale(.97); }
.sx-m3d-open:focus { outline: none; }
.sx-m3d-open:focus-visible .sx-m3d-pill { outline: 3px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 6px var(--accent); }
.sx-m3d.is-busy .sx-m3d-open { cursor: progress; }
.sx-m3d-progress { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; height: 4px; background: rgba(15, 123, 108, .16); }
.sx-m3d-progress i { display: block; width: 0; height: 100%; background: var(--accent); transition: width .2s ease; }
.sx-m3d-tools { position: absolute; top: 10px; right: 10px; z-index: 2; display: flex; gap: 8px; }
.sx-m3d-tool { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin: 0; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .92); color: var(--ink); box-shadow: 0 2px 10px -2px rgba(17, 20, 27, .3); cursor: pointer; touch-action: manipulation; }
.sx-m3d-tool .sx-ico { width: 20px; height: 20px; }
.sx-m3d-tool:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
@media (hover: hover) { .sx-m3d-tool:hover { background: #fff; color: var(--accent); } }
.sx-m3d-stage:fullscreen { width: 100%; height: 100%; background: #eef0f5; }
.sx-m3d-stage:fullscreen::before { display: none; }
.sx-m3d-stage:-webkit-full-screen { width: 100%; height: 100%; background: #eef0f5; }
.sx-m3d-stage:-webkit-full-screen::before { display: none; }
.sx-m3d-cap { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 12px 20px; }
.sx-m3d-badge { display: inline-flex; align-items: center; justify-content: center; flex: none; min-width: 34px; height: 24px; padding: 0 8px; border-radius: 7px; background: #e3f4f1; color: #0b5e53; box-shadow: inset 0 0 0 1px rgba(15, 123, 108, .22); font-size: .74rem; font-weight: 800; letter-spacing: .04em; }
.sx-m3d-name { flex: 1 1 auto; min-width: 0; font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.sx-m3d-note { flex: 1 1 100%; font-size: .88rem; color: var(--ink-3); line-height: 1.45; }
.sx-m3d-note[role="alert"] { color: var(--danger); font-weight: 600; }
.sx-m3d.is-gone .sx-m3d-stage { filter: grayscale(1); opacity: .7; }
/* Downloads are always green, whatever the page colour. */
.sx-m3d-dl { --accent: #0f7b6c; --accent-deep: #0b5e53; --accent-soft: #e3f4f1; display: flex; align-items: center; gap: 12px; margin: 0 20px 16px; padding: 10px 14px 10px 10px; min-height: 64px; border: 1.5px solid var(--accent); border-radius: 14px; background: linear-gradient(180deg, var(--accent-soft), var(--surface) 140%); color: var(--ink); text-decoration: none; transition: box-shadow .15s ease, transform .15s ease; -webkit-tap-highlight-color: transparent; }
.sx-m3d-dl-ico { display: flex; align-items: center; justify-content: center; flex: none; width: 42px; height: 42px; border-radius: 12px; background: var(--accent); color: #fff; }
.sx-m3d-dl-ico .sx-ico { width: 22px; height: 22px; }
.sx-m3d-dl-text { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; line-height: 1.3; }
.sx-m3d-dl-text strong { color: var(--accent-deep); font-weight: 750; }
.sx-m3d-dl-text span { font-size: .84rem; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sx-m3d-dl-go { flex: none; display: flex; color: var(--accent); }
.sx-m3d-dl-go .sx-ico { width: 18px; height: 18px; }
@media (hover: hover) { .sx-m3d-dl:hover { box-shadow: 0 0 0 3px var(--accent-soft); text-decoration: none; } }
.sx-m3d-dl:active { transform: scale(.99); }
.sx-m3d-dl:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
@media (min-width: 560px) {
  .sx-m3d { margin-left: 0; margin-right: 0; border: 1px solid var(--line); border-radius: var(--radius-s); overflow: hidden; }
  .sx-m3d-cap { padding: 12px 16px; }
  .sx-m3d-dl { margin: 0 16px 16px; }
}
.sx-single .sx-m3d-stage::before { padding-top: 70%; }

/* ---------- In the composer ---------- */
.sx-modelc { transition: border-color .2s ease, background-color .2s ease; }
.sx-modelc.has-model { border-color: var(--accent); background: linear-gradient(180deg, var(--accent-soft), var(--surface) 220px); }
.sx-modelc-title { display: flex; align-items: center; gap: 6px; }
.sx-modelc-title .sx-ico { width: 18px; height: 18px; color: var(--accent); flex: none; }
.sx-modelc-add { width: 100%; margin-top: 14px; }
.sx-modelc-locked { margin-top: 12px; }
.sx-modelc-pick { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.sx-modelc-pick-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sx-modelc-pick-title { margin: 0; }
.sx-modelc-status { margin: 8px 0 0; color: var(--ink-3); font-size: .93rem; }
.sx-modelc-status:empty { display: none; }
.sx-modelc-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.sx-modelc-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; margin: 0; padding: 10px 14px 10px 10px; border: 1.5px solid var(--line-strong); border-radius: 14px; background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; touch-action: manipulation; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; -webkit-tap-highlight-color: transparent; }
@media (hover: hover) { .sx-modelc-item:hover { border-color: var(--accent); } }
.sx-modelc-item:active { transform: scale(.99); }
.sx-modelc-item:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sx-modelc-item.is-current { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.sx-modelc-item-ico { display: flex; align-items: center; justify-content: center; flex: none; width: 44px; height: 44px; border-radius: 12px; background: #e3f4f1; color: #0b5e53; box-shadow: inset 0 0 0 1px rgba(15, 123, 108, .22); font-size: .82rem; font-weight: 800; letter-spacing: .04em; }
.sx-modelc-item-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.sx-modelc-item-text strong { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sx-modelc-item-text span { font-size: .84rem; color: var(--ink-3); }
.sx-modelc-chosen { margin-top: 14px; }
.sx-modelc-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sx-modelc-name { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.sx-modelc-name strong { font-weight: 700; overflow-wrap: anywhere; }
.sx-modelc-name span { font-size: .84rem; color: var(--ink-3); }
.sx-modelc-stage { margin-top: 12px; border-radius: var(--radius-s); border: 1px solid var(--line); }
.sx-modelc.is-previewing .sx-m3d-open { display: none; }
.sx-modelc-cover { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 10px; }
.sx-modelc-coverstate { flex: 1 1 240px; margin: 0; }
.sx-modelc-shot { flex: none; }
.sx-modelc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.sx-modelc-remove { color: var(--danger); }
.sx-modelc-link { margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--line); }
.sx-modelc-medialock { display: flex; margin: 12px 0 0; padding: 12px 14px; border-radius: var(--radius-s); background: var(--surface-2); color: var(--ink-2); font-size: .95rem; line-height: 1.5; }
.sx-mediabox.has-model3d .sx-mpick, .sx-mediabox.has-model3d .sx-albumpick, .sx-mediabox.has-model3d > #media-help { display: none; }
@media (max-width: 380px) {
  .sx-modelc-shot, .sx-modelc-actions .sx-btn { flex: 1 1 100%; }
}
@media (min-width: 760px) {
  .sx-modelc-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) { .sx-m3d-pill, .sx-m3d-dl, .sx-modelc, .sx-modelc-item, .sx-m3d-progress i { transition: none; } }
/* Admin invitations overview (06-11-2026) */
.sx-iv-stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.sx-iv-stats li { position: relative; display: flex; flex-direction: column; padding: 14px 14px 14px; border-radius: var(--radius-s); background: var(--surface-2); min-width: 0; }
.sx-iv-stats strong { font-size: 1.6rem; font-weight: 800; line-height: 1.1; color: var(--ink); font-variant-numeric: tabular-nums; margin-top: 10px; }
.sx-iv-stats li > span:last-child { font-size: .84rem; color: var(--ink-2); line-height: 1.35; margin-top: 4px; }
.sx-iv-ic { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: var(--surface); color: var(--ink-2); }
.sx-iv-ic .sx-ico { width: 17px; height: 17px; }
.sx-iv-stats .is-sent .sx-iv-ic { background: var(--accent-soft); color: var(--accent); }
.sx-iv-stats .is-accepted .sx-iv-ic { background: var(--ok-soft); color: var(--ok); }
.sx-iv-stats .is-waiting .sx-iv-ic { background: #e8f1fb; color: #1f5fa8; }
.sx-iv-stats .is-expired .sx-iv-ic { background: var(--warn-soft); color: var(--warn); }
.sx-iv-bar { display: flex; gap: 2px; height: 10px; margin: 16px 0 0; border-radius: 999px; overflow: hidden; background: var(--surface-2); }
.sx-iv-bar span { flex-basis: 0; min-width: 6px; }
.sx-iv-bar .is-accepted { background: var(--ok); }
.sx-iv-bar .is-waiting { background: #3d7fd0; }
.sx-iv-bar .is-expired { background: #d9a23a; }
.sx-iv-bar .is-removed { background: var(--line-strong); }
.sx-iv-note { display: flex; align-items: flex-start; gap: 8px; margin-top: 14px; }
.sx-iv-note .sx-ico { flex: none; width: 17px; height: 17px; margin-top: 2px; }
.sx-iv-tabs { margin-top: 4px; }
.sx-iv-list { list-style: none; margin: 0; padding: 0; }
.sx-iv-row { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 4px 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.sx-iv-row:first-child { border-top: 0; padding-top: 4px; }
.sx-iv-dot { grid-row: span 2; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; }
.sx-iv-dot .sx-ico { width: 18px; height: 18px; }
.sx-iv-row.is-accepted .sx-iv-dot { background: var(--ok-soft); color: var(--ok); }
.sx-iv-row.is-waiting .sx-iv-dot { background: #e8f1fb; color: #1f5fa8; }
.sx-iv-row.is-expired .sx-iv-dot { background: var(--warn-soft); color: var(--warn); }
.sx-iv-main { min-width: 0; }
.sx-iv-main p { margin: 0; }
.sx-iv-who { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.sx-iv-who strong { font-size: 1.02rem; overflow-wrap: anywhere; }
.sx-iv-who strong.is-blank { font-weight: 600; font-style: italic; color: var(--ink-3); }
.sx-iv-role { min-height: 24px; padding: 0 10px; font-size: .76rem; background: var(--accent-soft); color: var(--accent-deep); }
.sx-iv-meta { display: flex; flex-wrap: wrap; gap: 2px 0; margin-top: 4px !important; font-size: .9rem; color: var(--ink-2); }
.sx-iv-meta > span:not(:last-child)::after { content: "\00B7"; margin: 0 8px; color: var(--ink-3); }
.sx-iv-meta a, .sx-iv-state a { font-weight: 700; }
.sx-iv-via { display: inline-flex; align-items: center; gap: 5px; }
.sx-iv-via .sx-ico { width: 15px; height: 15px; color: var(--ink-3); }
.sx-iv-state { margin-top: 6px !important; font-size: .92rem; color: var(--ink); }
.sx-iv-row.is-expired .sx-iv-state { color: var(--warn); }
.sx-iv-act { grid-column: 2; margin-top: 8px; }
.sx-iv-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 26px 12px 10px; color: var(--ink-2); }
.sx-iv-empty p { margin: 0; max-width: 420px; }
.sx-iv-empty-ic { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); }
.sx-iv-empty-ic .sx-ico { width: 26px; height: 26px; }
.sx-modcard-n.is-iv { background: var(--accent-soft); color: var(--accent); }
@media (min-width: 640px) {
  .sx-iv-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .sx-iv-stats strong { font-size: 1.85rem; }
  .sx-iv-row { grid-template-columns: 40px minmax(0, 1fr) auto; align-items: start; }
  .sx-iv-dot { width: 40px; height: 40px; grid-row: auto; }
  .sx-iv-act { grid-column: 3; grid-row: 1; margin-top: 0; }
}
/* Admin disk space monitor (06-11-2026) */
.sx-toast-bad { background: var(--danger-soft); color: #7a1f10; }
.sx-dk-label { font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 6px; }
.sx-dk-big { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.sx-dk-big strong { font-size: clamp(2.2rem, 9vw, 3rem); font-weight: 800; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.sx-dk-big span { font-size: 1.1rem; color: var(--ink-2); font-weight: 600; }
.sx-dk-meter { position: relative; height: 14px; margin: 18px 0 0; border-radius: 999px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.sx-dk-meter > span { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; background: var(--ok); transition: width .6s cubic-bezier(.2, .8, .2, 1); }
.sx-dk-meter > i { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: var(--ink-3); opacity: .45; border-radius: 2px; }
.is-warn .sx-dk-meter > span { background: #d9a23a; }
.is-bad .sx-dk-meter > span { background: var(--danger); }
.sx-dk-meter-s { height: 10px; margin: 12px 0 16px; }
.sx-dk-state { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 14px 0 0; }
.sx-dk-state .sx-pill { gap: 6px; }
.sx-dk-state .sx-pill .sx-ico { width: 15px; height: 15px; }
.sx-dk-stats li strong { font-size: 1.3rem; }
.sx-dk-measure { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--line); }
.sx-dk-measure .sx-help { margin: 0; flex: 1 1 220px; }
.sx-bk-hero-in + .sx-dk-measure { border-top: 0; padding-top: 0; }
.sx-dk-measure button[aria-busy="true"] { opacity: .7; cursor: progress; }
.sx-dk-chart { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: 200px auto; gap: 6px 10px; margin: 14px 0 0; }
.sx-dk-y { position: relative; min-width: 46px; }
.sx-dk-y span { position: absolute; right: 0; transform: translateY(-50%); font-size: .76rem; color: var(--ink-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.sx-dk-plot { position: relative; touch-action: pan-y; }
.sx-dk-plot svg { display: block; width: 100%; height: 100%; overflow: visible; }
.sx-dk-plot .g { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.sx-dk-plot .base { stroke: var(--line-strong); stroke-width: 1; vector-effect: non-scaling-stroke; }
.sx-dk-plot .a { fill: var(--accent); opacity: .12; }
.sx-dk-plot .l { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.sx-dk-last, .sx-dk-dot { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--surface); pointer-events: none; }
.sx-dk-cross { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--ink-3); opacity: .5; pointer-events: none; }
.sx-dk-tip { position: absolute; top: -6px; transform: translate(-50%, -100%); padding: 6px 10px; border-radius: 10px; background: var(--ink); color: #fff; font-size: .82rem; line-height: 1.3; white-space: nowrap; pointer-events: none; box-shadow: var(--shadow); }
.sx-dk-tip strong { display: block; font-size: .95rem; }
.sx-dk-x { grid-column: 2; display: flex; justify-content: space-between; font-size: .76rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.sx-dk-table { width: 100%; border-collapse: collapse; margin: 22px 0 0; font-size: .93rem; font-variant-numeric: tabular-nums; }
.sx-dk-table th, .sx-dk-table td { padding: 10px 0; border-top: 1px solid var(--line); text-align: right; }
.sx-dk-table thead th { border-top: 0; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-weight: 700; padding-top: 0; }
.sx-dk-table th:first-child { text-align: left; }
.sx-dk-table tbody th { font-weight: 600; }
.sx-dk-table .is-up, .sx-dk-part .is-up { color: var(--warn); font-weight: 700; }
.sx-dk-table .is-down, .sx-dk-part .is-down { color: var(--ok); font-weight: 700; }
.sx-dk-parts { list-style: none; margin: 16px 0 0; padding: 0; }
.sx-dk-part { padding: 12px 0; border-top: 1px solid var(--line); }
.sx-dk-part:first-child { border-top: 0; padding-top: 0; }
.sx-dk-part-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.sx-dk-part-name, .sx-dk-part-size { display: flex; flex-direction: column; min-width: 0; }
.sx-dk-part-name strong { overflow-wrap: anywhere; }
.sx-dk-part-name small, .sx-dk-part-size small { font-size: .84rem; color: var(--ink-3); line-height: 1.35; margin-top: 2px; overflow-wrap: anywhere; }
.sx-dk-part-size { align-items: flex-end; text-align: right; flex: none; font-variant-numeric: tabular-nums; }
.sx-dk-part-size strong { font-size: 1.02rem; white-space: nowrap; }
.sx-dk-part-size small { white-space: nowrap; }
.sx-dk-part-bar { display: block; height: 6px; margin-top: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.sx-dk-part-bar > span { display: block; height: 100%; border-radius: 999px; background: var(--accent); }
.sx-dk-part.is-cpanel_extra .sx-dk-part-bar > span, .sx-dk-part.is-other .sx-dk-part-bar > span { background: var(--ink-3); opacity: .55; }
.sx-dk-plan { margin-top: 14px; }
.sx-dk-plan summary { cursor: pointer; font-weight: 700; color: var(--accent); min-height: 44px; display: flex; align-items: center; }
.sx-dk-planform { margin-top: 6px; }
.sx-dk-planrow { display: flex; align-items: center; gap: 10px; }
.sx-dk-planrow .sx-input { max-width: 140px; }
.sx-dk-unit { font-weight: 700; color: var(--ink-2); }
.sx-dkcard h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
@media (min-width: 760px) {
  .sx-dk-chart { grid-template-rows: 240px auto; }
}
@media (prefers-reduced-motion: reduce) { .sx-dk-meter > span { transition: none; } }
.sx-dk-stats strong.is-soon { color: var(--ink-3); }
@media (max-width: 559px) {
  .sx-dk-stats { grid-template-columns: minmax(0, 1fr); }
  .sx-dk-stats li { flex-direction: row; align-items: baseline; gap: 12px; padding: 12px 14px; }
  .sx-dk-stats li strong { flex: none; min-width: 84px; }
  .sx-dk-stats li span { margin-top: 0; overflow-wrap: normal; }
}
.sx-dk-chart { padding-right: 6px; }
.sx-dk-table .is-up, .sx-dk-part .is-up, .sx-dk-table .is-down, .sx-dk-part .is-down { color: var(--ink-2); font-weight: 700; }
