/* ==========================================================================
   SPARK Questions — theme.css (v3 "ignition" retint)
   ==========================================================================
   What changed in this pass and why:

   1. Default brand color was actually still violet. The v2 comment here
      claimed the whole site had moved from violet/indigo to blue/turquoise,
      and the "turkuaz" preset in Profil > Görünüm already had the right
      values (#0B72D9 / #17B6C4 / #0A4A8A) — but the :root fallback that
      every signed-out visitor and every member who never opened that
      settings tab actually sees was still #765BE7 (violet). This pass
      makes those the same color: the default IS the turquoise brand now,
      not just an opt-in preset.

   2. --spark-ember was a hot pink (#FF62B8). An ember should look like one.
      It's now a real amber/orange, which also reads more like "SPARK" and
      sits further from the new blue/cyan primary instead of fighting it.

   3. A real two-stop gradient (cyan → blue → deep indigo) replaces the old
      flat-violet gradient for --grad-primary, so buttons/avatars/covers/the
      ask-box top bar all pick up a genuine "spark" arc instead of a solid
      tint. The ambient body glow already had one correct, hardcoded
      turquoise blob (rgba(23,182,196,...)) sitting right next to the
      violet one — that was the tell that the retint was only half-finished.

   4. One deliberate signature moment: a one-time "ignition" ring on
      .auth-mark (login, code verification, 403, 404 — the actual
      first-impression screens on an invite-only site) on load, plus a
      quiet, slow pulse on the unread-notification dot. .hero exists in
      this file but is dead CSS — no view in src/Views renders class="hero"
      anymore, so the animation was placed where it's actually seen rather
      than left on markup nobody loads. Nowhere else got new motion — the
      rest of this file is disciplined retint + polish, not decoration.

   5. Mobile nav was a horizontally-scrolling link strip. It's now a real
      collapsible menu (.spark-nav-toggle + #primary-nav), see
      layout/header.php for the two small markup additions this needed
      (one <button>, one id="primary-nav" on the existing <nav>). No link,
      no route, no existing element was removed — only added to.

   Variable NAMES are unchanged from v2 (--spark-ink, --spark-void,
   --spark-periwinkle*, --spark-ember*, --color-*, --grad-*, --shadow-*,
   --radius-*) — same zero-risk principle as the v1→v2 retint: every
   existing selector, every PHP-emitted class, and the per-user
   theme_json override in layout/header.php (which writes --color-primary,
   --color-primary-rgb, --color-primary-2 and --color-primary-dark inline)
   keep working unchanged. Only the values moved.
   ========================================================================== */

:root {
  /* SPARK LS brand family — midnight navy, periwinkle and rose. */
  --color-primary: #A3A6FF;
  --color-primary-rgb: 163, 166, 255;
  --color-primary-2: #AC8AFF;
  --color-primary-dark: #625CC4;
  --color-accent: #FFA5D9;

  --spark-ember: #FFA5D9;
  --spark-ember-soft: #FFE3F3;
  --spark-periwinkle: #A3A6FF;
  --spark-periwinkle-soft: #ECEBFF;
  --spark-ink: #16152B;
  --spark-void: #060E20;

  /* neutrals — light */
  --color-background: #F6F4FF;
  --color-surface: #FFFFFF;
  --color-surface-alt: #F0EEFC;
  --color-text: #17162C;
  --color-text-muted: #64627F;
  --color-border: #DFDCF3;
  --color-button-text: #FFFFFF;

  --color-danger: #E5484D;
  --color-danger-soft: #FCE7E7;
  --color-success: #12B76A;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  --font-display: 'Space Grotesk', 'Segoe UI', sans-serif;
  --font-sans: 'Inter', 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;

  --grad-primary: linear-gradient(135deg, #A3A6FF 0%, #AC8AFF 56%, #FF9ED5 100%);
  --grad-hero:
    radial-gradient(circle at 16% -10%, rgba(163, 166, 255, .18), transparent 55%),
    radial-gradient(circle at 100% 0%, rgba(255, 165, 217, .12), transparent 45%);

  --shadow-card: 0 1px 2px rgba(10, 20, 40, .05), 0 10px 26px rgba(var(--color-primary-rgb), .10);
  --shadow-card-hover: 0 1px 2px rgba(10, 20, 40, .06), 0 18px 40px rgba(var(--color-primary-rgb), .16);
  --shadow-pop: 0 20px 50px rgba(6, 14, 30, .22);
  --shadow-glow: 0 10px 26px rgba(var(--color-primary-rgb), .32);
}

body[data-theme="dark"] {
  --color-background: #060E20;
  --color-surface: #0F1930;
  --color-surface-alt: #192540;
  --color-text: #F8F7FF;
  --color-text-muted: #A5A8C5;
  --color-border: #293755;

  --spark-periwinkle-soft: #262850;
  --spark-ember-soft: #3F2948;
  --color-danger-soft: #3A1C2A;

  --grad-hero:
    radial-gradient(circle at 16% -10%, rgba(163, 166, 255, .22), transparent 55%),
    radial-gradient(circle at 100% 0%, rgba(255, 165, 217, .14), transparent 45%);

  --shadow-card: 0 1px 0 rgba(255, 255, 255, .04), 0 18px 44px rgba(0, 0, 0, .34);
  --shadow-card-hover: 0 1px 0 rgba(255, 255, 255, .07), 0 26px 58px rgba(0, 0, 0, .44);
}

@media (prefers-color-scheme: dark) {
  body:not([data-theme="light"]) {
    --color-background: #060E20;
    --color-surface: #0F1930;
    --color-surface-alt: #192540;
    --color-text: #F8F7FF;
    --color-text-muted: #A5A8C5;
    --color-border: #293755;

    --spark-periwinkle-soft: #262850;
    --spark-ember-soft: #3F2948;
    --color-danger-soft: #3A1C2A;

    --grad-hero:
      radial-gradient(circle at 16% -10%, rgba(163, 166, 255, .22), transparent 55%),
      radial-gradient(circle at 100% 0%, rgba(255, 165, 217, .14), transparent 45%);

    --shadow-card: 0 1px 0 rgba(255, 255, 255, .04), 0 18px 44px rgba(0, 0, 0, .34);
    --shadow-card-hover: 0 1px 0 rgba(255, 255, 255, .07), 0 26px 58px rgba(0, 0, 0, .44);
  }
}

/* ---------- base ---------- */

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  color: var(--color-text);
  background:
    radial-gradient(circle at 88% 18%, rgba(var(--color-primary-rgb), .11), transparent 24rem),
    radial-gradient(circle at 8% 72%, rgba(172, 138, 255, .11), transparent 26rem),
    var(--grad-hero), var(--color-background);
  background-attachment: fixed;
  transition: background-color .2s ease, color .2s ease;
}

a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 {
  font-family: var(--font-display);
  letter-spacing: -0.015em;
  margin: 0 0 8px;
}

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- layout shell ---------- */

.spark-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--color-surface) 86%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 1px 0 rgba(9, 20, 40, .03);
}

.spark-nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 13px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.spark-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--color-text);
}
.spark-brand:hover { text-decoration: none; }

.spark-brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: block;
  box-shadow: 0 4px 12px rgba(var(--color-primary-rgb), 0.28);
  transition: box-shadow .2s ease, transform .2s ease;
}
.spark-brand:hover .spark-brand-mark { transform: scale(1.05); box-shadow: 0 6px 16px rgba(var(--color-primary-rgb), .38); }

.spark-brand-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.01em;
  line-height: 1.1;
  display: flex;
  flex-direction: column;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.spark-brand-text em {
  font-style: normal;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  -webkit-text-fill-color: var(--color-text-muted);
}

.spark-nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 14.5px;
  font-weight: 600;
}

.spark-nav-links a { color: var(--color-text); position: relative; }
.spark-nav-links a:hover { text-decoration: none; color: var(--color-primary); }
.spark-nav-danger { color: var(--color-text-muted) !important; }
.spark-nav-danger:hover { color: var(--color-danger) !important; }

/* mobile menu toggle — see layout/header.php for the <button> markup */
.spark-nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: var(--radius-sm);
  background: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}
.spark-nav-toggle:hover { background: var(--spark-periwinkle-soft); }
.nav-toggle-bar {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--color-text);
  transition: transform .2s ease, opacity .2s ease;
}
.spark-nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.spark-nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.spark-nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
@media (prefers-reduced-motion: reduce) {
  .nav-toggle-bar { transition: none; }
}

.notif-bell-wrap { position: relative; display: flex; }

.notif-bell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: none;
  background: none;
  color: var(--color-text);
  cursor: pointer;
  padding: 0;
}
.notif-bell:hover { background: var(--spark-periwinkle-soft); color: var(--color-primary); }

.theme-mode-toggle-form { margin: 0; }
.theme-mode-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid color-mix(in srgb, var(--color-primary) 22%, var(--color-border));
  border-radius: 10px;
  background: color-mix(in srgb, var(--color-surface-alt) 78%, transparent);
  color: var(--color-text);
  font: 700 12px var(--font-sans);
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, color .16s ease, transform .16s ease;
}
.theme-mode-toggle:hover {
  border-color: color-mix(in srgb, var(--color-primary) 48%, var(--color-border));
  background: var(--spark-periwinkle-soft);
  color: var(--color-primary);
  transform: translateY(-1px);
}
.theme-mode-toggle svg { width: 15px; height: 15px; flex-shrink: 0; }

.notif-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--spark-ember);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--color-surface);
  animation: spark-badge-pulse 2.4s ease-in-out infinite;
}
@keyframes spark-badge-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.14); }
}
@media (prefers-reduced-motion: reduce) {
  .notif-badge { animation: none; }
}

.notif-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 320px;
  max-width: calc(100vw - 40px);
  max-height: 420px;
  overflow-y: auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-pop);
  z-index: 20;
  padding: 6px;
}
.notif-dropdown.is-loading { opacity: .6; }

.notif-dropdown-empty {
  padding: 28px 12px;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 13.5px;
}

.notif-dropdown-footer {
  display: block;
  text-align: center;
  padding: 10px;
  font-size: 13px;
  font-weight: 600;
  border-top: 1px solid var(--color-border);
  margin-top: 4px;
}

.notif-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: var(--radius-sm);
  color: var(--color-text);
}
.notif-row:hover { background: var(--color-surface-alt); text-decoration: none; }
.notif-row.is-unread { background: var(--spark-periwinkle-soft); }

.notif-body { flex: 1; min-width: 0; }
.notif-body p { margin: 0; }
.notif-body p:first-child { font-size: 14px; line-height: 1.4; }

.notif-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-primary);
  flex-shrink: 0;
}

.spark-main {
  flex: 1;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}
.spark-main > :not(.page-grid):not(.mod-shell) {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.page-grid {
  display: grid;
  grid-template-columns: minmax(0, 760px) minmax(280px, 320px);
  justify-content: center;
  gap: 28px;
  align-items: start;
}
.stream-column { min-width: 0; }

.stream-intro {
  min-height: 84px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin: 0 2px 20px;
}
.eyebrow {
  margin: 0 0 5px;
  color: var(--color-primary);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .13em;
}
.stream-intro h1 {
  margin: 0;
  font-size: clamp(25px, 3vw, 32px);
  letter-spacing: -.045em;
}
.stream-intro p:not(.eyebrow) {
  margin: 5px 0 0;
  color: var(--color-text-muted);
  font-size: 14px;
}
.stream-inbox-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
  padding: 9px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--color-surface) 86%, transparent);
  color: var(--color-text);
  font-size: 12.5px;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(9, 20, 40, .05);
}
.stream-inbox-link svg { width: 15px; height: 15px; color: var(--color-primary); }
.stream-inbox-link:hover {
  color: var(--color-primary-dark);
  text-decoration: none;
  border-color: color-mix(in srgb, var(--color-primary) 32%, var(--color-border));
}
.feed-switcher {
  display: inline-flex;
  gap: 4px;
  margin: 0 0 18px;
  padding: 4px;
  border: 1px solid var(--color-border);
  border-radius: 13px;
  background: color-mix(in srgb, var(--color-surface) 88%, transparent);
}
.feed-switcher a {
  padding: 8px 11px;
  border-radius: 9px;
  color: var(--color-text-muted);
  font-size: 12.5px;
  font-weight: 750;
}
.feed-switcher a:hover { color: var(--color-text); text-decoration: none; }
.feed-switcher a.is-active { background: var(--spark-periwinkle-soft); color: var(--color-primary-dark); }

.spark-footer {
  text-align: center;
  padding: 24px 20px 40px;
  color: var(--color-text-muted);
  font-size: 12.5px;
}

/* ---------- spa-style fragment navigation (spark-nav.js) ---------- */

#app-main { transition: opacity .12s ease; }
html.spark-loading #app-main { opacity: .55; }

@keyframes spark-fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}
#app-main.spark-enter { animation: spark-fade-in .22s ease; }

@media (prefers-reduced-motion: reduce) {
  #app-main.spark-enter { animation: none; }
  #app-main { transition: none; }
}

/* ---------- primitives ---------- */

.card {
  background: linear-gradient(145deg, color-mix(in srgb, var(--color-surface) 98%, white), var(--color-surface));
  border: 1px solid color-mix(in srgb, var(--color-border) 88%, var(--color-primary));
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 20px;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.card-hover:hover {
  border-color: color-mix(in srgb, var(--color-primary) 30%, var(--color-border));
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}
body[data-theme="dark"] .card {
  background:
    radial-gradient(circle at 100% 0, rgba(255, 165, 217, .09), transparent 42%),
    linear-gradient(145deg, rgba(25, 37, 64, .96), rgba(10, 18, 38, .98));
  border-color: rgba(163, 166, 255, .22);
}
body[data-theme="dark"] .spark-nav {
  background: rgba(6, 14, 32, .80);
  border-bottom-color: rgba(163, 166, 255, .18);
}
body[data-theme="dark"] .qa-answer,
body[data-theme="dark"] .profile-tabs,
body[data-theme="dark"] .feed-switcher {
  background: rgba(17, 25, 46, .72);
  border-color: rgba(52, 120, 214, .18);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: var(--grad-primary);
  color: var(--color-button-text);
  border: none;
  border-radius: var(--radius-sm);
  padding: 11px 20px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 14.5px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(var(--color-primary-rgb), 0.24);
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}
.btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.btn:hover { filter: brightness(1.06); text-decoration: none; box-shadow: var(--shadow-glow); transform: translateY(-1px); }
.btn:active { transform: scale(0.97) translateY(0); }

.btn-accent { background: linear-gradient(135deg, #FFB020, var(--color-accent)); box-shadow: 0 6px 16px rgba(255, 122, 41, 0.30); }
.btn-sm { padding: 8px 15px; font-size: 13.5px; }

.btn-ghost {
  background: var(--color-surface);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  box-shadow: none;
}
.btn-ghost:hover { background: var(--spark-periwinkle-soft); color: var(--color-primary-dark); box-shadow: none; transform: none; }

.btn-danger { background: linear-gradient(135deg, #F17579, var(--color-danger)); box-shadow: 0 6px 16px rgba(229, 72, 77, 0.24); }

.btn-icon {
  padding: 8px 13px;
  background: var(--color-surface-alt);
  color: var(--color-text);
  font-weight: 600;
  font-size: 13.5px;
  box-shadow: none;
}
.btn-icon:hover { background: var(--spark-periwinkle-soft); box-shadow: none; transform: none; }
.btn-icon.is-liked { background: var(--spark-ember-soft); color: var(--spark-ember); }
.btn-icon.is-pinned { background: var(--spark-periwinkle-soft); color: var(--color-primary); }
.btn-icon svg { stroke: currentColor; }

.btn-follow { min-width: 118px; }
.btn-follow.is-following {
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  box-shadow: none;
}
.btn-follow.is-following .btn-follow-label-hover { display: none; }
.btn-follow.is-following:hover {
  background: var(--color-danger-soft);
  border-color: var(--color-danger);
  color: var(--color-danger);
  box-shadow: none;
  transform: none;
}
.btn-follow.is-following:hover .btn-follow-label { display: none; }
.btn-follow.is-following:hover .btn-follow-label-hover { display: inline; }

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}

input[type="text"],
input[type="email"],
input[type="password"],
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface-alt);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 15px;
  resize: vertical;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  background: var(--color-surface);
  box-shadow: 0 0 0 4px rgba(var(--color-primary-rgb), 0.14);
}

.field { margin: 0 0 14px; }

.report-panel {
  margin-top: 12px;
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-alt);
  max-width: 360px;
}
.report-panel .field:last-of-type { margin-bottom: 12px; }

.blocked-list { display: flex; flex-direction: column; gap: 4px; }
.blocked-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 4px;
}
.blocked-row:not(:last-child) { border-bottom: 1px solid var(--color-border); }
.blocked-row span { flex: 1; font-weight: 500; font-size: 14px; }
.blocked-row form { margin: 0; }

.theme-picker { display: flex; gap: 10px; flex-wrap: wrap; }
.theme-swatch {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid transparent;
  padding: 3px;
  background: var(--swatch-color);
  background-clip: content-box;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(9, 20, 40, 0.16);
  transition: transform .12s ease, border-color .12s ease;
}
.theme-swatch:hover { transform: scale(1.08); }
.theme-swatch.is-active { border-color: var(--swatch-color); }

/* ---------- ajax action feedback ---------- */

@keyframes spark-like-pop {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.22); }
  100% { transform: scale(1); }
}
.like-pop svg { animation: spark-like-pop .32s ease; }
@media (prefers-reduced-motion: reduce) {
  .like-pop svg { animation: none; }
}

.thread-item.is-removing,
.inbox-item.is-removing {
  opacity: 0;
  transform: scale(.98);
  transition: opacity .2s ease, transform .2s ease;
}

.spark-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 12px);
  background: var(--color-text);
  color: var(--color-surface);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: var(--shadow-pop);
  opacity: 0;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 50;
  pointer-events: none;
}
.spark-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- moderation panel ---------- */

.mod-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  overflow: hidden;
  min-height: 148px;
  padding: 26px 28px;
  border: 1px solid color-mix(in srgb, var(--color-primary) 26%, var(--color-border));
  border-radius: 22px;
  background:
    radial-gradient(circle at 100% 0, color-mix(in srgb, var(--color-accent) 24%, transparent), transparent 42%),
    linear-gradient(135deg, color-mix(in srgb, var(--color-primary) 15%, var(--color-surface)), var(--color-surface));
  box-shadow: var(--shadow-card);
}
.mod-hero::after {
  position: absolute;
  right: -44px;
  bottom: -74px;
  width: 220px;
  height: 220px;
  border: 1px solid color-mix(in srgb, var(--color-primary) 25%, transparent);
  border-radius: 50%;
  box-shadow: 0 0 0 28px color-mix(in srgb, var(--color-primary) 5%, transparent);
  content: '';
  pointer-events: none;
}
.mod-hero-copy,
.mod-hero-actions { position: relative; z-index: 1; }
.mod-hero .eyebrow { margin: 0 0 7px; }
.mod-hero h1 {
  margin: 0;
  font-size: clamp(26px, 4vw, 34px);
  letter-spacing: -.045em;
}
.mod-hero-copy > p:last-child {
  max-width: 560px;
  margin: 7px 0 0;
  color: var(--color-text-muted);
  font-size: 13.5px;
}
.mod-hero-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  flex-wrap: wrap;
}
.mod-system-status,
.mod-quick-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 8px 11px;
  border: 1px solid color-mix(in srgb, var(--color-border) 82%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--color-surface) 68%, transparent);
  color: var(--color-text-muted);
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}
.mod-system-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-success);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-success) 14%, transparent);
}
.mod-quick-action { color: var(--color-primary-dark); }
.mod-quick-action:hover {
  border-color: color-mix(in srgb, var(--color-primary) 52%, var(--color-border));
  background: var(--spark-periwinkle-soft);
  color: var(--color-primary);
  text-decoration: none;
}
.mod-quick-action svg { width: 15px; height: 15px; }

.mod-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}
.mod-main-tabs {
  width: fit-content;
  max-width: 100%;
  margin: 20px 0 18px;
  padding: 5px;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background: color-mix(in srgb, var(--color-surface) 78%, transparent);
  box-shadow: 0 8px 22px rgba(10, 15, 35, .06);
}
.mod-tab {
  padding: 8px 11px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--color-text-muted);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.3;
}
.mod-tab:hover {
  color: var(--color-text);
  background: color-mix(in srgb, var(--color-surface-alt) 72%, transparent);
  text-decoration: none;
}
.mod-tab.is-active {
  border-color: color-mix(in srgb, var(--color-primary) 24%, transparent);
  background: var(--spark-periwinkle-soft);
  color: var(--color-primary-dark);
}

.mod-report { padding: 16px 20px; margin-bottom: 12px; }
.mod-report-head { display: flex; align-items: center; justify-content: space-between; }
.mod-report-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.mod-report-actions form { margin: 0; }

.mod-log { padding: 6px 20px; }
.mod-log-row {
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding: 10px 0;
  font-size: 13.5px;
}
.mod-log-row:not(:last-child) { border-bottom: 1px solid var(--color-border); }
.mod-log-row .qa-time { flex-shrink: 0; width: 60px; }

.mod-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 16px 0 0;
}
.mod-stat {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 15px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--color-surface) 92%, var(--color-primary)), var(--color-surface));
  box-shadow: 0 8px 20px rgba(10, 15, 35, .06);
}
.mod-stat-icon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  color: var(--color-primary);
  background: var(--spark-periwinkle-soft);
}
.mod-stat-icon svg { width: 18px; height: 18px; }
.mod-stat > div { min-width: 0; }
.mod-stat strong {
  display: block;
  margin-top: 2px;
  font-family: var(--font-display);
  font-size: 23px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.04em;
  line-height: 1;
}
.mod-stat > div > span {
  display: block;
  overflow: hidden;
  color: var(--color-text-muted);
  font-size: 10.5px;
  font-weight: 720;
  letter-spacing: .025em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mod-stat--success .mod-stat-icon {
  color: #17885b;
  background: color-mix(in srgb, #39c884 18%, var(--color-surface-alt));
}
.mod-stat--accent .mod-stat-icon {
  color: #be5f9a;
  background: color-mix(in srgb, var(--color-accent) 22%, var(--color-surface-alt));
}
.mod-stat--warning .mod-stat-icon {
  color: #b26728;
  background: color-mix(in srgb, #f5b66d 24%, var(--color-surface-alt));
}
body[data-theme="dark"] .mod-hero {
  border-color: rgba(163, 166, 255, .23);
  background:
    radial-gradient(circle at 100% 0, rgba(255, 165, 217, .15), transparent 44%),
    linear-gradient(135deg, rgba(31, 35, 76, .94), rgba(13, 24, 49, .98));
  box-shadow: 0 22px 48px rgba(0, 0, 0, .28);
}
body[data-theme="dark"] .mod-main-tabs {
  border-color: rgba(163, 166, 255, .18);
  background: rgba(15, 25, 48, .72);
}
body[data-theme="dark"] .mod-stat {
  border-color: rgba(163, 166, 255, .16);
  background: linear-gradient(145deg, rgba(25, 37, 64, .94), rgba(13, 24, 49, .98));
  box-shadow: 0 12px 28px rgba(0, 0, 0, .22);
}

/* ---------- moderation panel: sidebar shell (ported from sparkls-web's
   admin dashboard — a fixed dark "console" rail, deliberately independent
   of the light/dark toggle, same as sparkls-web's admin panel has no
   toggle at all). The content area next to it keeps using the normal
   theme-aware .card/.mod-stat components, unchanged. ---------- */
.mod-shell { display: flex; align-items: flex-start; gap: 26px; width: 100%; }
.mod-sidebar {
  position: sticky;
  top: 84px;
  flex: 0 0 226px;
  width: 226px;
  padding: 16px 12px;
  border: 1px solid rgba(163, 166, 255, .16);
  border-radius: 18px;
  background: linear-gradient(180deg, #0b1530, var(--spark-void));
  box-shadow: 0 18px 40px rgba(0, 0, 0, .28);
}
.mod-sidebar-brand {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 2px 8px 14px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(163, 166, 255, .14);
}
.mod-sidebar-brand .eyebrow { margin: 0; color: #A3A6FF; }
.mod-sidebar-brand .mod-system-status {
  align-self: flex-start;
  padding: 5px 9px;
  border-color: rgba(163, 166, 255, .2);
  background: rgba(163, 166, 255, .08);
  color: rgba(230, 232, 255, .68);
  font-size: 10px;
}
.mod-nav { display: flex; flex-direction: column; gap: 1px; }
.mod-nav-group-label {
  margin: 14px 8px 6px;
  color: rgba(230, 232, 255, .36);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.mod-nav-group-label:first-child { margin-top: 2px; }
.mod-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  color: rgba(230, 232, 255, .74);
  font-size: 13px;
  font-weight: 650;
}
.mod-nav-link:hover { background: rgba(163, 166, 255, .1); color: #fff; text-decoration: none; }
.mod-nav-link.is-active {
  background: linear-gradient(135deg, rgba(163, 166, 255, .24), rgba(172, 138, 255, .16));
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(163, 166, 255, .32);
}
.mod-nav-link svg { width: 16px; height: 16px; flex-shrink: 0; }
.mod-nav-link > span:first-of-type { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mod-nav-badge {
  flex-shrink: 0;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: #ff6e84;
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
}
.mod-content { flex: 1; min-width: 0; }
.mod-mobile-nav { display: none; }
.mod-user-search {
  display: flex;
  gap: 10px;
  margin: 0 0 18px;
}
.mod-user-search input { flex: 1; }
.mod-user {
  position: relative;
  overflow: hidden;
  padding: 18px 20px;
  margin-bottom: 12px;
}
.mod-user::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--grad-primary);
}
.mod-user-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.mod-user-summary strong { display: block; font-size: 15px; }
.mod-user-summary span {
  display: block;
  margin-top: 3px;
  color: var(--color-text-muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}
.mod-user-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.mod-user-controls {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}
.mod-user-controls form {
  display: grid;
  grid-template-columns: minmax(112px, .45fr) minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0;
}
.mod-user-controls label {
  display: grid;
  gap: 4px;
  color: var(--color-text-muted);
  font-size: 12px;
  font-weight: 600;
}
.mod-user-controls select,
.mod-user-controls input { min-height: 40px; }
.mod-user-controls select { min-width: 124px; }
.mod-user-controls input { min-width: 0; }
.mod-user-controls form:first-child { grid-template-columns: minmax(112px, .45fr) auto; justify-content: start; }
.mod-settings { max-width: 560px; }
.deployment-card {
  max-width: 700px;
  padding: 24px;
}
.deployment-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}
.deployment-card h2 { margin: 3px 0 6px; font-size: 21px; }
.deployment-card .section-hint { max-width: 470px; margin: 0; }
.deployment-status {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border: 1px solid color-mix(in srgb, var(--spark-ember) 35%, var(--color-border));
  border-radius: var(--radius-pill);
  color: #A6480F;
  background: var(--spark-ember-soft);
  font-size: 11px;
  font-weight: 750;
}
.deployment-status::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  content: '';
}
.deployment-status.is-ready {
  color: #108854;
  border-color: color-mix(in srgb, #12b76a 36%, var(--color-border));
  background: color-mix(in srgb, #dff8e9 74%, var(--color-surface));
}
.deployment-command {
  display: grid;
  gap: 6px;
  margin: 22px 0 16px;
  padding: 13px 14px;
  border: 1px solid color-mix(in srgb, var(--color-primary) 18%, var(--color-border));
  border-radius: 13px;
  background: color-mix(in srgb, var(--color-surface-alt) 70%, transparent);
}
.deployment-command > span {
  color: var(--color-text-muted);
  font-size: 10.5px;
  font-weight: 780;
  letter-spacing: .075em;
  text-transform: uppercase;
}
.deployment-command code {
  overflow-x: auto;
  color: var(--color-text);
  font: 600 12.5px var(--font-mono);
  white-space: nowrap;
}
.deployment-pull-button svg { width: 16px; height: 16px; }
.deployment-disabled {
  padding: 12px 13px;
  border: 1px dashed color-mix(in srgb, var(--spark-ember) 40%, var(--color-border));
  border-radius: 12px;
  color: var(--color-text-muted);
  background: color-mix(in srgb, var(--spark-ember-soft) 35%, transparent);
  font-size: 12.5px;
  line-height: 1.55;
}
.deployment-disabled code {
  color: var(--color-text);
  font: 600 11.5px var(--font-mono);
}
body[data-theme="dark"] .deployment-command {
  border-color: rgba(79, 132, 217, .24);
  background: rgba(15, 27, 52, .74);
}
body[data-theme="dark"] .deployment-disabled {
  border-color: rgba(255, 150, 73, .28);
  background: rgba(61, 37, 21, .42);
}
.mod-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 14px 2px 4px;
}

.error-banner {
  background: var(--color-danger-soft);
  border: 1px solid var(--color-danger);
  color: var(--color-danger);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.success-banner {
  background: rgba(18, 183, 106, 0.1);
  border: 1px solid var(--color-success);
  color: var(--color-success);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--spark-periwinkle-soft);
  color: var(--color-primary-dark);
  border-radius: var(--radius-pill);
  padding: 4px 11px;
  font-size: 12px;
  font-weight: 600;
}
.badge-faction { background: var(--spark-ember-soft); color: #A6480F; }
.badge-job { background: var(--color-surface-alt); color: var(--color-text-muted); border: 1px solid var(--color-border); }

/* ---------- auth ---------- */

.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-shell .card { width: 100%; max-width: 400px; }

.auth-mark {
  width: 54px;
  height: 54px;
  border-radius: 15px;
  display: block;
  margin-bottom: 18px;
  box-shadow: 0 10px 24px rgba(var(--color-primary-rgb), 0.28);
  animation: spark-ignite 2.6s ease-out 1;
}
@keyframes spark-ignite {
  0%   { box-shadow: 0 0 0 0 rgba(var(--color-primary-rgb), .38), 0 10px 24px rgba(var(--color-primary-rgb), 0.28); }
  55%  { box-shadow: 0 0 0 16px rgba(var(--color-primary-rgb), 0), 0 10px 24px rgba(var(--color-primary-rgb), 0.28); }
  100% { box-shadow: 0 0 0 0 rgba(var(--color-primary-rgb), 0), 0 10px 24px rgba(var(--color-primary-rgb), 0.28); }
}
@media (prefers-reduced-motion: reduce) {
  .auth-mark { animation: none; }
}

/* ---------- auth screens (login / verify / UCP character picker) ---------- */
/* auth-brand, auth-copy, auth-form, auth-assurance and auth-back existed as
   markup hooks with no rules yet — styled here for the first time, alongside
   the new UCP entry point (auth-divider/auth-fallback) and character picker
   (character-list/character-option) this pass adds. */

.auth-card { text-align: left; }
.auth-shell .card.auth-card--wide { max-width: 460px; }

.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.auth-brand .auth-mark { margin-bottom: 0; }
.auth-brand strong { display: block; font-family: var(--font-display); font-size: 15px; letter-spacing: .02em; }
.auth-brand span { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .18em; color: var(--color-text-muted); }

.auth-copy { margin: 18px 0 20px; }
.auth-copy h1 { margin: 0 0 8px; font-size: clamp(21px, 3vw, 25px); letter-spacing: -.03em; }
.auth-copy p { margin: 0; color: var(--color-text-muted); font-size: 14px; line-height: 1.5; }

.auth-form { margin: 0; }
.auth-submit { width: 100%; margin-top: 4px; text-decoration: none; }

.auth-assurance { display: flex; align-items: center; gap: 7px; margin: 12px 0 0; color: var(--color-text-muted); font-size: 12.5px; }
.auth-assurance span { width: 6px; height: 6px; border-radius: 50%; background: var(--color-success); flex-shrink: 0; }

.auth-back { display: inline-block; margin-top: 18px; color: var(--color-text-muted); font-size: 13px; font-weight: 600; text-decoration: none; }
.auth-back:hover { color: var(--color-primary); text-decoration: none; }

.auth-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--color-text-muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--color-border); }

.auth-fallback summary { cursor: pointer; color: var(--color-text-muted); font-size: 13.5px; font-weight: 600; list-style: none; }
.auth-fallback summary::-webkit-details-marker { display: none; }
.auth-fallback summary:hover { color: var(--color-primary); }
.auth-fallback[open] summary { margin-bottom: 14px; color: var(--color-text); }

.character-list { display: flex; flex-direction: column; gap: 10px; margin: 4px 0 0; }
.character-option-form { margin: 0; }
.character-option {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 12px 16px;
  background: var(--color-surface-alt);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  text-align: left;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.character-option:hover { border-color: var(--color-primary); background: var(--spark-periwinkle-soft); transform: translateY(-1px); }
.character-option.is-suspended { opacity: .65; }
.character-option .avatar { width: 44px; height: 44px; font-size: 17px; }
.character-option-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.character-option-body strong { font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.character-option-status { font-size: 12px; color: var(--color-text-muted); font-weight: 600; }
.character-option.is-suspended .character-option-status { color: var(--color-danger); }
.character-option svg { width: 17px; height: 17px; color: var(--color-text-muted); flex-shrink: 0; }

.otp-input {
  font-family: var(--font-mono);
  font-size: 26px;
  letter-spacing: 0.5em;
  text-align: center;
  padding-left: 0.5em; /* re-center against the trailing letter-spacing gap */
}

.link-btn {
  background: transparent;
  color: var(--color-primary);
  border: none;
  padding: 8px 0 0;
  font-weight: 600;
  cursor: pointer;
  font-size: 14px;
}
.link-btn:hover { text-decoration: underline; filter: none; }

/* ---------- avatar ---------- */

.avatar {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--grad-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 0 0 3px var(--color-surface), 0 6px 16px rgba(var(--color-primary-rgb), 0.24);
}
.avatar.sm { width: 34px; height: 34px; font-size: 14px; border-radius: 10px; box-shadow: 0 0 0 2px var(--color-surface); }
.avatar.lg { width: 88px; height: 88px; font-size: 32px; border-radius: 22px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- cover banner ---------- */

.cover-banner {
  height: clamp(148px, 18vw, 196px);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  background: var(--grad-primary);
  background-size: cover;
  background-position: center;
  position: relative;
}
.cover-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(4, 10, 22, 0) 40%, rgba(4, 10, 22, 0.2));
}

.profile-head-wrap { margin-bottom: 20px; }
.profile-head-wrap .profile-head {
  margin: 0;
  padding: 20px 26px 25px;
  border-top: none;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}
.profile-head-wrap .profile-head .avatar {
  margin-top: 0;
  box-shadow: 0 0 0 3px var(--color-surface), var(--shadow-card);
}

/* ---------- profile header ---------- */

.profile-head {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 20px;
}
.profile-head > div:last-child { min-width: 0; flex: 1; }

.profile-head h1 {
  overflow: hidden;
  font-size: 27px;
  margin-bottom: 2px;
  letter-spacing: -.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 20px;
  padding: 5px;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background: color-mix(in srgb, var(--color-surface) 78%, transparent);
  box-shadow: 0 8px 20px rgba(9, 20, 40, .04);
}
.profile-tabs a {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 9px;
  border-bottom: 0;
  color: var(--color-text-muted);
  font-size: 13px;
  font-weight: 700;
}
.profile-tabs a:hover { color: var(--color-text); text-decoration: none; }
.profile-tabs a.is-active {
  background: var(--spark-periwinkle-soft);
  color: var(--color-primary-dark);
}
.profile-share {
  margin: 0 0 0 auto;
  padding: 4px 8px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
}
.profile-share:hover { background: var(--color-surface-alt); color: var(--color-text); }
.profile-about { padding: 22px; }
.profile-about h2 { font-size: 17px; }
.profile-about > p { line-height: 1.6; }
.profile-about-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 20px 0 0;
}
.profile-about-grid div {
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--color-surface-alt);
}
.profile-about-grid dt { color: var(--color-text-muted); font-size: 12px; font-weight: 600; }
.profile-about-grid dd { margin: 4px 0 0; font-size: 14px; font-weight: 600; }

.profile-meta {
  color: var(--color-text-muted);
  font-size: 14px;
  margin: 0 0 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.profile-stats { gap: 14px; font-size: 13.5px; }
.profile-stats a {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  padding: 6px 9px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  background: var(--color-surface-alt);
  color: var(--color-text-muted);
}
.profile-stats a:hover { border-color: color-mix(in srgb, var(--color-primary) 36%, var(--color-border)); text-decoration: none; }
.profile-stats strong { color: var(--color-text); font-weight: 700; }

.profile-bio { margin: 10px 0 0; line-height: 1.55; overflow-wrap: anywhere; }
.profile-meta { min-width: 0; }
.profile-meta:not(.profile-stats) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- ask box ---------- */

.ask-box { position: relative; overflow: hidden; }
.ask-box::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--grad-primary);
}
.ask-box textarea {
  min-height: 98px;
  border: 0;
  background: transparent;
  padding: 3px 0;
  font-size: 16px;
  box-shadow: none;
}
.ask-box textarea:focus { box-shadow: none; }

.ask-box-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.ask-box-footer .check-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  color: var(--color-text-muted);
  font-weight: 500;
}
.ask-box-footer .check-row input { width: auto; }
.ask-actions { display: flex; align-items: center; gap: 10px; }

/* ---------- spark glyph divider ---------- */

.spark-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 4px 0;
}
.spark-divider::before,
.spark-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-border));
}
.spark-divider::after { background: linear-gradient(90deg, var(--color-border), transparent); }
.spark-glyph {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(var(--color-primary-rgb), 0.28);
}

/* ---------- q&a thread ---------- */

.thread-item {
  position: relative;
  isolation: isolate;
  width: min(100%, 720px);
  margin: 0 auto 16px;
  padding: 0;
  overflow: hidden;
  border-radius: 20px;
  box-shadow: 0 14px 36px rgba(5, 10, 26, .15);
}
.thread-item::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 1;
  width: 3px;
  height: auto;
  background: linear-gradient(180deg, var(--color-primary-2), var(--color-primary) 48%, transparent 86%);
  opacity: .9;
  pointer-events: none;
}

.feed-owner {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 14px 20px;
  border-bottom: 1px solid color-mix(in srgb, var(--color-border) 78%, transparent);
  color: var(--color-text);
}
.feed-owner:hover {
  color: var(--color-text);
  text-decoration: none;
  background: color-mix(in srgb, var(--color-primary) 4%, transparent);
}
.feed-owner .avatar {
  width: 36px;
  height: 36px;
  border-radius: 12px;
}
.feed-owner-copy {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  min-width: 0;
  gap: 3px 7px;
}
.feed-owner-name {
  overflow: hidden;
  font-size: 13px;
  font-weight: 780;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.feed-owner-time {
  display: inline-flex;
  align-items: center;
  color: var(--color-text-muted);
  font-size: 11.5px;
  font-weight: 560;
  line-height: 1.35;
  white-space: nowrap;
}
.feed-owner-time::before {
  width: 3px;
  height: 3px;
  margin-right: 7px;
  border-radius: 50%;
  background: currentColor;
  content: '';
}
.feed-owner + .qa-question { padding-top: 18px; }

.qa-question {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 13px;
  padding: 22px 20px 14px;
  align-items: start;
}
.qa-question > .avatar {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  color: var(--color-primary-dark);
  background: var(--spark-periwinkle-soft);
  box-shadow: none;
}
.qa-question-copy {
  min-width: 0;
  padding-top: 1px;
}

.qa-question p:not(.qa-asker) {
  margin: 0;
  color: var(--color-text);
  font-size: 15px;
  font-weight: 660;
  letter-spacing: -.012em;
  line-height: 1.55;
}

.qa-asker {
  display: flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 5px;
  padding: 3px 7px;
  overflow: hidden;
  border-radius: 6px;
  color: var(--color-text-muted);
  background: color-mix(in srgb, var(--color-surface-alt) 72%, transparent);
  font-size: 10.5px;
  font-weight: 760;
  letter-spacing: .055em;
  line-height: 1.25;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.thread-transition {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 20px;
  margin: 0 20px;
}
.thread-transition > span {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--color-primary) 28%, var(--color-border)));
}
.thread-transition > span:last-child {
  background: linear-gradient(90deg, color-mix(in srgb, var(--color-primary) 28%, var(--color-border)), transparent);
}
.thread-transition .spark-glyph {
  width: 20px;
  height: 20px;
  padding: 3px;
  border-radius: 7px;
  background: color-mix(in srgb, var(--color-surface) 85%, transparent);
  box-shadow: 0 6px 14px rgba(var(--color-primary-rgb), .23);
}

.qa-answer {
  margin: 7px 20px 20px;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--color-primary) 15%, var(--color-border));
  border-radius: 16px;
  background:
    radial-gradient(circle at 100% 0, rgba(var(--color-primary-rgb), .08), transparent 45%),
    linear-gradient(145deg, color-mix(in srgb, var(--color-surface-alt) 90%, var(--color-surface)), var(--color-surface));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
}
.qa-answer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 17px;
  margin: 0 0 9px;
}
.qa-answer-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--color-primary);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .09em;
  line-height: 1;
  text-transform: uppercase;
}
.qa-answer-label::before {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 14%, transparent);
  content: '';
}

.qa-answer p {
  margin: 0;
  font-size: 14.5px;
  font-weight: 520;
  line-height: 1.65;
  color: var(--color-text);
}

.pinned-answer-label {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  margin: 0;
  padding: 4px 7px;
  border-radius: var(--radius-pill);
  background: var(--spark-periwinkle-soft);
  color: var(--color-primary-dark);
  font-size: 10.5px;
  font-weight: 750;
}
.answer-media {
  display: block;
  width: 100%;
  max-height: 480px;
  margin: 12px 0 2px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  object-fit: cover;
}
.answer-composer-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
}
.media-picker {
  display: inline-flex;
  align-items: center;
  color: var(--color-primary);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}
.media-picker input {
  width: 1px;
  height: 1px;
  margin: -1px;
  clip: rect(0 0 0 0);
  overflow: hidden;
  position: absolute;
}
.media-picker span::before { content: "+"; margin-right: 5px; }
.character-count { color: var(--color-text-muted); font-size: 12px; }

.qa-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  margin-top: 14px;
  padding-top: 11px;
  border-top: 1px solid color-mix(in srgb, var(--color-border) 72%, transparent);
}

.qa-actions form { display: inline-block; margin: 0; }

.qa-time { color: var(--color-text-muted); font-weight: 400; }

.likers-toggle {
  background: none;
  border: none;
  padding: 4px 2px;
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--color-text-muted);
  cursor: pointer;
}
.likers-toggle:hover { color: var(--color-primary); text-decoration: underline; }
.qa-like {
  min-width: 48px;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 10px;
}
.qa-like.is-liked {
  color: #ff6b9a;
  background: color-mix(in srgb, #ff6b9a 13%, var(--color-surface-alt));
}

body[data-theme="dark"] .thread-item {
  border-color: rgba(163, 166, 255, .30);
  background:
    radial-gradient(circle at 100% 0, rgba(255, 165, 217, .09), transparent 42%),
    linear-gradient(145deg, rgba(24, 35, 62, .97), rgba(8, 15, 33, .99));
  box-shadow: 0 20px 44px rgba(0, 0, 0, .30);
}
body[data-theme="dark"] .feed-owner {
  border-bottom-color: rgba(81, 137, 225, .17);
}
body[data-theme="dark"] .feed-owner:hover {
  background: rgba(45, 117, 218, .08);
}
body[data-theme="dark"] .qa-asker {
  color: #aebcda;
  background: rgba(29, 45, 79, .75);
}
body[data-theme="dark"] .qa-answer {
  border-color: rgba(163, 166, 255, .23);
  background:
    radial-gradient(circle at 100% 0, rgba(255, 165, 217, .08), transparent 44%),
    linear-gradient(145deg, rgba(29, 41, 72, .94), rgba(13, 22, 45, .96));
}

.likers-panel {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.likers-panel.is-loading { opacity: .5; }
.likers-panel:empty { display: none; }

.liker-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px 3px 3px;
  border-radius: 999px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--color-text);
}
.liker-avatar {
  width: 20px; height: 20px; border-radius: 50%; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: var(--grad-primary); color: #fff;
  font-family: var(--font-display); font-weight: 700; font-size: 10px; flex-shrink: 0;
}
.liker-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- inbox ---------- */

.inbox-item { margin-bottom: 16px; }
.inbox-item .qa-question { padding: 20px 20px 0; }
.inbox-item form:not(:last-child) { margin-bottom: 8px; }

/* ---------- empty state ---------- */

.empty-state {
  text-align: center;
  padding: 56px 20px;
  color: var(--color-text-muted);
}
.empty-state--feed { border-style: dashed; }
.empty-state--feed h2 { color: var(--color-text); font-size: 18px; margin: 0 0 7px; }
.empty-state--feed p { max-width: 390px; margin: 0 auto; line-height: 1.55; }

/* ---------- community rail ---------- */

.community-rail {
  position: sticky;
  top: 82px;
  display: grid;
  gap: 14px;
}
.rail-card {
  position: relative;
  overflow: hidden;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--color-border) 92%, var(--color-primary));
  border-radius: 20px;
  background:
    radial-gradient(circle at 100% 0, rgba(var(--color-primary-rgb), .09), transparent 44%),
    color-mix(in srgb, var(--color-surface) 92%, transparent);
  box-shadow: 0 12px 28px rgba(9, 20, 40, .05);
}
.rail-card--hottest {
  background:
    radial-gradient(circle at 100% 0, rgba(255, 122, 41, .15), transparent 46%),
    linear-gradient(145deg, color-mix(in srgb, var(--color-surface) 97%, var(--spark-ember-soft)), var(--color-surface));
}
.rail-card--trending {
  background:
    radial-gradient(circle at 100% 0, rgba(18, 183, 106, .13), transparent 48%),
    linear-gradient(145deg, color-mix(in srgb, var(--color-surface) 97%, #dff8e9), var(--color-surface));
}
.rail-card--daily {
  background:
    radial-gradient(circle at 100% 0, rgba(255, 165, 217, .15), transparent 48%),
    linear-gradient(145deg, color-mix(in srgb, var(--color-surface) 96%, var(--spark-periwinkle-soft)), var(--color-surface));
}
.rail-heading {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 13px;
}
.rail-heading-icon {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: #A6480F;
  background: var(--spark-ember-soft);
}
.rail-heading-icon svg { width: 16px; height: 16px; }
.rail-heading-icon--violet { color: var(--color-primary); background: var(--spark-periwinkle-soft); }
.rail-heading-icon--green { color: #108854; background: color-mix(in srgb, #dff8e9 84%, var(--color-surface)); }
.rail-heading h2 {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 13.5px;
  letter-spacing: -.01em;
}
.rail-heading p {
  margin: 2px 0 0;
  color: var(--color-text-muted);
  font-size: 11.5px;
}
.rail-list { display: grid; gap: 7px; }
.rail-post,
.rail-member {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  border-radius: 12px;
  color: var(--color-text);
  transition: background .16s ease, transform .16s ease;
}
.rail-post {
  padding: 8px;
  background: color-mix(in srgb, var(--color-surface-alt) 68%, transparent);
}
.rail-post:hover,
.rail-member:hover {
  background: var(--spark-periwinkle-soft);
  text-decoration: none;
  transform: translateX(2px);
}
.rail-post .avatar,
.rail-member .avatar { width: 31px; height: 31px; font-size: 12px; }
.rail-post-copy { min-width: 0; display: grid; gap: 1px; }
.rail-post-copy strong,
.rail-member strong {
  overflow: hidden;
  color: var(--color-text);
  font-size: 12px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rail-post-copy span {
  overflow: hidden;
  color: var(--color-text-muted);
  font-size: 11.5px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rail-post-copy small,
.rail-member small {
  color: var(--color-text-muted);
  font-size: 10.5px;
  font-weight: 600;
}
.rail-list--profiles { gap: 3px; }
.rail-member { padding: 6px 5px; }
.rail-member > span { min-width: 0; display: grid; gap: 1px; flex: 1; }
.rail-arrow { width: 15px; height: 15px; flex-shrink: 0; color: var(--color-text-muted); }
.trend-list { display: flex; flex-wrap: wrap; gap: 7px; }
.trend-chip {
  min-width: calc(50% - 4px);
  display: grid;
  gap: 1px;
  padding: 9px 10px;
  border: 1px solid color-mix(in srgb, #12b76a 18%, var(--color-border));
  border-radius: 11px;
  background: color-mix(in srgb, #dff8e9 45%, var(--color-surface));
}
.trend-chip strong { color: #108854; font-size: 12px; }
.trend-chip span { color: var(--color-text-muted); font-size: 10.5px; font-weight: 600; }
.rail-empty {
  margin: 0;
  padding: 7px 2px 2px;
  color: var(--color-text-muted);
  font-size: 12px;
  line-height: 1.5;
}
.daily-suggestion-form { display: grid; gap: 9px; }
.daily-suggestion-form textarea {
  min-height: 70px;
  resize: vertical;
  padding: 10px;
  border-radius: 11px;
  background: color-mix(in srgb, var(--color-surface-alt) 76%, transparent);
  font-size: 12px;
  line-height: 1.45;
}
.daily-suggestion-form .btn { justify-self: end; }
.daily-pool-intro { margin-bottom: 14px; }
.daily-pool-intro h2 { font-size: 17px; }
.daily-pool-item { margin-bottom: 12px; }
.daily-pool-body { margin: 12px 0; line-height: 1.6; }
.mod-security-note {
  margin: 10px 0 0;
  padding: 8px 10px;
  border-radius: 9px;
  background: var(--spark-ember-soft);
  color: var(--color-text-muted);
  font-size: 12px;
}
.member-search-page .stream-intro { margin-bottom: 12px; }
.empty-state .glow-ring {
  width: 68px;
  height: 68px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--spark-periwinkle-soft);
  display: flex;
  align-items: center;
  justify-content: center;
}
.empty-state .glow-ring .spark-glyph { width: 32px; height: 32px; opacity: .85; }
.empty-state p { margin: 0; font-size: 14.5px; }

/* ---------- hero (home) ---------- */

.hero {
  text-align: center;
  padding: 56px 4px 16px;
  position: relative;
}
.hero::before {
  content: '';
  position: absolute;
  top: -44px;
  left: 50%;
  width: 380px;
  height: 380px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(var(--color-primary-rgb), .22), transparent 68%);
  pointer-events: none;
  z-index: -1;
}

.hero .spark-brand-mark {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  margin: 0 auto 20px;
  box-shadow: var(--shadow-pop);
}

.hero h1 {
  font-size: clamp(32px, 5.2vw, 46px);
  margin-bottom: 14px;
  letter-spacing: -0.03em;
}

.hero p.lede {
  color: var(--color-text-muted);
  font-size: 17.5px;
  line-height: 1.6;
  max-width: 440px;
  margin: 0 auto 28px;
}

.hero-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 44px;
}

/* ---------- settings page ---------- */

.profile-settings-page {
  display: grid;
  gap: 5px;
  margin: 0 0 20px;
}
.profile-settings-page h1 {
  margin: 0 !important;
  text-align: left;
}
.profile-settings-page p {
  margin: 0 !important;
  overflow-wrap: anywhere;
}
.settings-section { margin-bottom: 20px; }
.settings-section h2 { font-size: 16px; margin-bottom: 4px; }
.settings-section .section-hint {
  color: var(--color-text-muted);
  font-size: 13.5px;
  margin: 0 0 16px;
}

.upload-row {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.upload-row .avatar { cursor: default; }

.file-field {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.private-link-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.private-link-row input {
  flex: 1;
  min-width: min(100%, 260px);
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 12px;
}
.private-link-row form { margin: 0; }

.file-field input[type="file"] {
  min-height: 42px;
  padding: 4px;
  border: 1px dashed color-mix(in srgb, var(--color-primary) 45%, var(--color-border));
  border-radius: 11px;
  background: color-mix(in srgb, var(--color-surface-alt) 80%, transparent);
  color: var(--color-text-muted);
  max-width: min(100%, 320px);
  font-size: 12px;
}
.file-field input[type="file"]::file-selector-button {
  margin-right: 9px;
  padding: 8px 11px;
  border: 0;
  border-radius: 8px;
  background: var(--grad-primary);
  color: #fff;
  font: 700 12px var(--font-sans);
  cursor: pointer;
}
.file-field input[type="file"]::-webkit-file-upload-button {
  margin-right: 9px;
  padding: 8px 11px;
  border: 0;
  border-radius: 8px;
  background: var(--grad-primary);
  color: #fff;
  font: 700 12px var(--font-sans);
  cursor: pointer;
}

.cover-preview {
  width: 100%;
  height: 128px;
  border-radius: var(--radius-sm);
  background: var(--grad-primary);
  background-size: cover;
  background-position: center;
  margin-bottom: 12px;
}

.check-row-standalone {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  margin: 4px 0 16px;
}
.check-row-standalone input { width: auto; }
.appearance-mode-picker { display: flex; gap: 8px; margin-top: 16px; }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 14px;
}

/* ---------- search & discover ---------- */

.search-page-form {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
}
.search-page-form input[type="text"],
.search-page-form input[type="search"] { flex: 1; min-width: 0; }

.spark-nav-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  color: var(--color-text);
}
.spark-nav-icon-link:hover {
  background: var(--spark-periwinkle-soft);
  color: var(--color-primary-dark);
  text-decoration: none;
}

.discover-section-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  margin: 28px 0 14px;
}
.discover-section-title:first-of-type { margin-top: 4px; }

.faction-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}
.faction-chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 15px;
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: background .15s ease, color .15s ease;
}
.faction-chip:hover { color: var(--color-primary-dark); background: var(--spark-periwinkle-soft); text-decoration: none; }
.faction-chip.is-active { background: var(--grad-primary); color: var(--color-button-text); border-color: transparent; }

.user-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
}
.user-card-link {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
  color: var(--color-text);
}
.user-card-link:hover { text-decoration: none; }
.user-card-link:hover strong { color: var(--color-primary-dark); }
.user-card-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.user-card-meta strong {
  font-size: 14.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color .15s ease;
}
.user-card-meta span {
  font-size: 12.5px;
  color: var(--color-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-card-character { font-style: italic; }
.user-card .badge-faction { flex-shrink: 0; }
.user-card-follow { margin: 0; flex-shrink: 0; }
.relationship-heading { margin: 0 0 20px; }
.relationship-heading h1 { margin: 3px 0 0; font-size: 23px; }

.load-more-wrap { text-align: center; margin-top: 18px; }

/* ---------- responsive ---------- */

@media (max-width: 1040px) {
  .page-grid { grid-template-columns: minmax(0, 1fr); }
  .community-rail { position: static; grid-template-columns: repeat(2, 1fr); }

  .mod-shell { flex-direction: column; gap: 16px; }
  .mod-sidebar { display: none; }
  .mod-mobile-nav {
    display: block;
    padding: 4px 14px;
    border: 1px solid rgba(163, 166, 255, .18);
    border-radius: 14px;
    background: linear-gradient(180deg, #0b1530, var(--spark-void));
  }
  .mod-mobile-nav summary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 2px;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
  }
  .mod-mobile-nav summary::-webkit-details-marker { display: none; }
  .mod-mobile-nav summary svg { width: 17px; height: 17px; }
  .mod-mobile-nav[open] summary { border-bottom: 1px solid rgba(163, 166, 255, .14); }
  .mod-mobile-nav .mod-nav { padding: 6px 0 10px; }
}

@media (max-width: 720px) {
  .spark-nav-inner { padding: 10px 16px; }

  .spark-nav-toggle { display: flex; }

  .spark-nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    margin: 0;
    padding: 8px 16px 16px;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-pop);
    max-height: calc(100vh - 60px);
    overflow-y: auto;
  }
  .spark-nav-links.is-open { display: flex; }
  .spark-nav-links a {
    padding: 12px 6px;
    border-bottom: 1px solid var(--color-border);
  }
  .spark-nav-links a:last-child { border-bottom: none; }
  .notif-bell-wrap { order: -1; align-self: flex-end; margin: 0 0 6px; }
  .theme-mode-toggle-form { width: 100%; }
  .theme-mode-toggle {
    width: 100%;
    justify-content: flex-start;
    padding: 11px 6px;
    border: 0;
    border-bottom: 1px solid var(--color-border);
    border-radius: 0;
    background: transparent;
  }

  .notif-dropdown { position: fixed; top: 58px; right: 16px; }
  .spark-main { padding: 24px 16px 48px; }
  .stream-intro { margin-bottom: 16px; }
  .feed-owner { padding: 13px 16px; }
  .qa-question { grid-template-columns: 34px minmax(0, 1fr); gap: 11px; padding: 18px 16px 12px; }
  .qa-question > .avatar { width: 34px; height: 34px; border-radius: 11px; }
  .thread-transition { margin-left: 16px; margin-right: 16px; }
  .qa-answer { margin: 7px 16px 16px; padding: 14px; }
  .mod-hero {
    align-items: flex-start;
    flex-direction: column;
    min-height: 0;
    padding: 22px 20px;
  }
  .mod-hero-actions { justify-content: flex-start; }
  .mod-main-tabs { width: 100%; }
  .mod-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mod-stat { align-items: flex-start; gap: 10px; padding: 13px; }
  .mod-stat-icon { width: 32px; height: 32px; border-radius: 10px; }
  .mod-stat strong { font-size: 20px; }
  .mod-stat > div > span { white-space: normal; }
  .mod-user-controls form,
  .mod-user-controls form:first-child {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .mod-user-controls .btn { width: 100%; }
  .deployment-card { padding: 20px 18px; }
  .deployment-card-head { align-items: stretch; flex-direction: column; gap: 12px; }
  .deployment-status { align-self: flex-start; }
  .community-rail { grid-template-columns: 1fr; }
  .profile-head-wrap .profile-head { padding-left: 20px; padding-right: 20px; }
}
