/* ==========================================================================
   FanHalo design system
   Dark-first, mobile-first, no external font or script requests.
   ========================================================================== */

:root {
  --bg: #080510;
  --bg-2: #0d0918;
  --surface: #130d22;
  --surface-2: #1a1130;
  --surface-3: #221640;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f6f1ff;
  --text-dim: #b8aad4;
  --text-mute: #8b7fae;
  --primary: #a855f7;
  --primary-2: #7c3aed;
  --primary-soft: rgba(168, 85, 247, 0.14);
  --accent: #ec4899;
  --accent-soft: rgba(236, 72, 153, 0.14);
  --gold: #fbbf24;
  --gold-soft: rgba(251, 191, 36, 0.14);
  --success: #34d399;
  --success-soft: rgba(52, 211, 153, 0.14);
  --danger: #fb7185;
  --danger-soft: rgba(251, 113, 133, 0.14);
  --grad: linear-gradient(120deg, #a855f7 0%, #ec4899 55%, #f59e0b 100%);
  --grad-soft: linear-gradient(120deg, rgba(168, 85, 247, 0.22), rgba(236, 72, 153, 0.16));
  --glow: rgba(168, 85, 247, 0.9);
  --r-sm: 8px;
  --r: 14px;
  --r-lg: 22px;
  --r-pill: 999px;
  --shell: 1200px;
  --header-h: 66px;
  --shadow: 0 18px 50px -24px rgba(0, 0, 0, 0.9);
  --shadow-lg: 0 40px 90px -40px rgba(124, 58, 237, 0.6);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

[data-theme="light"] {
  --bg: #f7f4fd;
  --bg-2: #ffffff;
  --surface: #ffffff;
  --surface-2: #f3eeff;
  --surface-3: #e9e1ff;
  --line: rgba(24, 10, 50, 0.10);
  --line-strong: rgba(24, 10, 50, 0.2);
  --text: #1b1033;
  --text-dim: #4c3f6b;
  --text-mute: #6d5f8c;
  --primary: #7c3aed;
  --primary-2: #6d28d9;
  --primary-soft: rgba(124, 58, 237, 0.10);
  --accent: #db2777;
  --accent-soft: rgba(219, 39, 119, 0.10);
  --gold: #b45309;
  --gold-soft: rgba(180, 83, 9, 0.10);
  --success: #047857;
  --success-soft: rgba(4, 120, 87, 0.10);
  --danger: #be123c;
  --danger-soft: rgba(190, 18, 60, 0.10);
  --shadow: 0 18px 40px -28px rgba(76, 29, 149, 0.55);
  --shadow-lg: 0 40px 80px -44px rgba(76, 29, 149, 0.55);
  --glow: rgba(124, 58, 237, 0.75);
}


/* ---------------------------------------------------------------- palettes
   Every theme overrides the same set of custom properties, so the rest of
   the stylesheet never has to know which one is active. */

[data-theme="midnight"] {
  --bg: #050914;
  --bg-2: #0a1020;
  --surface: #0f1729;
  --surface-2: #16203a;
  --surface-3: #1d2b4d;
  --line: rgba(148, 180, 255, 0.11);
  --line-strong: rgba(148, 180, 255, 0.20);
  --text: #e8f0ff;
  --text-dim: #9db2d8;
  --text-mute: #7488ad;
  --primary: #3b82f6;
  --primary-2: #2563eb;
  --primary-soft: rgba(59, 130, 246, 0.16);
  --accent: #06b6d4;
  --accent-soft: rgba(6, 182, 212, 0.16);
  --gold: #fbbf24;
  --gold-soft: rgba(251, 191, 36, 0.16);
  --success: #34d399;
  --success-soft: rgba(52, 211, 153, 0.16);
  --danger: #fb7185;
  --danger-soft: rgba(251, 113, 133, 0.16);
  --grad: linear-gradient(120deg, #3b82f6 0%, #06b6d4 55%, #a78bfa 100%);
  --grad-soft: linear-gradient(120deg, rgba(59, 130, 246, 0.24), rgba(6, 182, 212, 0.16));
  --glow: rgba(59, 130, 246, 0.85);
  --shadow: 0 18px 50px -24px rgba(0, 0, 0, 0.92);
  --shadow-lg: 0 40px 90px -40px rgba(59, 130, 246, 0.55);
}

[data-theme="sunset"] {
  --bg: #140806;
  --bg-2: #1c0d08;
  --surface: #24110b;
  --surface-2: #2e1810;
  --surface-3: #3a2015;
  --line: rgba(255, 196, 140, 0.11);
  --line-strong: rgba(255, 196, 140, 0.20);
  --text: #fff3e8;
  --text-dim: #e0b79a;
  --text-mute: #b08b74;
  --primary: #f97316;
  --primary-2: #ea580c;
  --primary-soft: rgba(249, 115, 22, 0.16);
  --accent: #f43f5e;
  --accent-soft: rgba(244, 63, 94, 0.16);
  --gold: #fbbf24;
  --gold-soft: rgba(251, 191, 36, 0.16);
  --success: #34d399;
  --success-soft: rgba(52, 211, 153, 0.16);
  --danger: #fb7185;
  --danger-soft: rgba(251, 113, 133, 0.16);
  --grad: linear-gradient(120deg, #f97316 0%, #f43f5e 55%, #fbbf24 100%);
  --grad-soft: linear-gradient(120deg, rgba(249, 115, 22, 0.24), rgba(244, 63, 94, 0.16));
  --glow: rgba(249, 115, 22, 0.85);
  --shadow: 0 18px 50px -24px rgba(0, 0, 0, 0.9);
  --shadow-lg: 0 40px 90px -40px rgba(249, 115, 22, 0.55);
}

[data-theme="ocean"] {
  --bg: #04121a;
  --bg-2: #071b26;
  --surface: #0a2432;
  --surface-2: #0e2f41;
  --surface-3: #143b52;
  --line: rgba(125, 211, 252, 0.13);
  --line-strong: rgba(125, 211, 252, 0.24);
  --text: #e6f8ff;
  --text-dim: #9cc9dc;
  --text-mute: #6f9db2;
  --primary: #14b8a6;
  --primary-2: #0d9488;
  --primary-soft: rgba(20, 184, 166, 0.16);
  --accent: #38bdf8;
  --accent-soft: rgba(56, 189, 248, 0.16);
  --gold: #fbbf24;
  --gold-soft: rgba(251, 191, 36, 0.16);
  --success: #34d399;
  --success-soft: rgba(52, 211, 153, 0.16);
  --danger: #fb7185;
  --danger-soft: rgba(251, 113, 133, 0.16);
  --grad: linear-gradient(120deg, #14b8a6 0%, #0ea5e9 55%, #818cf8 100%);
  --grad-soft: linear-gradient(120deg, rgba(20, 184, 166, 0.24), rgba(14, 165, 233, 0.16));
  --glow: rgba(20, 184, 166, 0.85);
  --shadow: 0 18px 50px -24px rgba(0, 0, 0, 0.92);
  --shadow-lg: 0 40px 90px -40px rgba(14, 165, 233, 0.5);
}

[data-theme="emerald"] {
  --bg: #04140c;
  --bg-2: #061c11;
  --surface: #082317;
  --surface-2: #0b2e1e;
  --surface-3: #0f3b26;
  --line: rgba(134, 239, 172, 0.13);
  --line-strong: rgba(134, 239, 172, 0.24);
  --text: #e9ffee;
  --text-dim: #a3d7b8;
  --text-mute: #79a78b;
  --primary: #22c55e;
  --primary-2: #16a34a;
  --primary-soft: rgba(34, 197, 94, 0.16);
  --accent: #a3e635;
  --accent-soft: rgba(163, 230, 53, 0.16);
  --gold: #fbbf24;
  --gold-soft: rgba(251, 191, 36, 0.16);
  --success: #34d399;
  --success-soft: rgba(52, 211, 153, 0.16);
  --danger: #fb7185;
  --danger-soft: rgba(251, 113, 133, 0.16);
  --grad: linear-gradient(120deg, #22c55e 0%, #a3e635 55%, #14b8a6 100%);
  --grad-soft: linear-gradient(120deg, rgba(34, 197, 94, 0.24), rgba(163, 230, 53, 0.16));
  --glow: rgba(34, 197, 94, 0.85);
  --shadow: 0 18px 50px -24px rgba(0, 0, 0, 0.92);
  --shadow-lg: 0 40px 90px -40px rgba(34, 197, 94, 0.5);
}

[data-theme="noir"] {
  --bg: #f3f3f4;
  --bg-2: #ffffff;
  --surface: #ffffff;
  --surface-2: #f4f4f5;
  --surface-3: #e7e7ea;
  --line: rgba(24, 24, 27, 0.12);
  --line-strong: rgba(24, 24, 27, 0.24);
  --text: #111113;
  --text-dim: #4a4a50;
  --text-mute: #71717a;
  --primary: #18181b;
  --primary-2: #3f3f46;
  --primary-soft: rgba(24, 24, 27, 0.08);
  --accent: #71717a;
  --accent-soft: rgba(113, 113, 122, 0.12);
  --gold: #a16207;
  --gold-soft: rgba(161, 98, 7, 0.12);
  --success: #15803d;
  --success-soft: rgba(21, 128, 61, 0.10);
  --danger: #b91c1c;
  --danger-soft: rgba(185, 28, 28, 0.10);
  --grad: linear-gradient(120deg, #18181b 0%, #3f3f46 55%, #71717a 100%);
  --grad-soft: linear-gradient(120deg, rgba(24, 24, 27, 0.10), rgba(113, 113, 122, 0.10));
  --glow: rgba(24, 24, 27, 0.35);
  --shadow: 0 18px 40px -28px rgba(24, 24, 27, 0.55);
  --shadow-lg: 0 40px 80px -44px rgba(24, 24, 27, 0.5);
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg, canvas, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0 0 0.5em; line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; }
h1 { font-size: clamp(2rem, 1.2rem + 3.2vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.3rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1rem; }
ul, ol { margin: 0 0 1rem; padding-left: 1.15rem; }
.muted { color: var(--text-dim); }
.small { font-size: 0.86rem; }
.block { display: block; }
.mono { font-family: var(--mono); font-size: 0.86em; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.pos { color: var(--success); }
.neg { color: var(--danger); }
.center { text-align: center; }
.lead { font-size: 1.08rem; max-width: 62ch; }
.nowrap { white-space: nowrap; }

.visually-hidden {
  position: absolute; 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: -999px; top: 0; z-index: 200;
  background: var(--primary); color: #fff; padding: 0.6rem 1rem; border-radius: 0 0 var(--r-sm) 0;
}
.skip-link:focus { left: 0; }

.ic { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.ic.tick { color: var(--success); }

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

.shell { width: min(100% - 2.5rem, var(--shell)); margin-inline: auto; }
.section { padding-block: clamp(2.5rem, 1.4rem + 4vw, 5rem); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto clamp(1.6rem, 1rem + 2vw, 2.8rem); }
.section-head-left { text-align: left; margin-inline: 0; }
.section-head p { margin-bottom: 0; }
.section-title { margin: 2rem 0 0.9rem; font-size: 1.25rem; }
.row { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; }
.row-center { justify-content: center; }
.row-end { justify-content: flex-end; }
.stack { display: flex; flex-direction: column; gap: 0.9rem; }
.inline-form { display: inline-flex; gap: 0.4rem; align-items: center; }
.split { display: grid; gap: clamp(1.5rem, 1rem + 3vw, 3.5rem); grid-template-columns: 1fr; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1.05fr 0.95fr; } }

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--primary); font-weight: 700; margin-bottom: 0.7rem;
}
.eyebrow-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }

/* --------------------------------------------------------------- buttons */

.btn {
  --btn-bg: var(--surface-2);
  --btn-fg: var(--text);
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  padding: 0.62rem 1.05rem; border-radius: var(--r-pill);
  background: var(--btn-bg); color: var(--btn-fg);
  border: 1px solid var(--line);
  font-weight: 600; font-size: 0.93rem; cursor: pointer;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), background 0.18s var(--ease), border-color 0.18s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); border-color: var(--line-strong); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.btn-primary { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 10px 30px -14px var(--glow); }
.btn-primary:hover { box-shadow: 0 16px 38px -14px var(--glow); }
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--surface-2); }
.btn-lg { padding: 0.85rem 1.5rem; font-size: 1rem; }
.btn-sm { padding: 0.34rem 0.7rem; font-size: 0.8rem; }
.btn-block { width: 100%; }
.btn-danger { color: var(--danger); border-color: var(--danger-soft); }
.btn-danger:hover { background: var(--danger-soft); }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: var(--r-pill);
  background: transparent; border: 1px solid var(--line); cursor: pointer; position: relative;
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease);
}
.icon-btn:hover { background: var(--surface-2); border-color: var(--line-strong); }
.notif-btn .badge-count {
  position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px;
  background: var(--accent); color: #fff; border-radius: var(--r-pill);
  font-size: 0.68rem; font-weight: 700; display: grid; place-items: center; padding: 0 4px;
}

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

.site-header {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 1rem; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 0.55rem; font-weight: 800; letter-spacing: -0.03em; font-size: 1.16rem; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: var(--grad); box-shadow: 0 8px 20px -10px var(--glow); }
.brand-word span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.site-nav { display: none; gap: 0.25rem; margin-left: 0.6rem; }
.site-nav a { padding: 0.45rem 0.7rem; border-radius: var(--r-pill); color: var(--text-dim); font-size: 0.92rem; font-weight: 500; position: relative; }
.site-nav a:hover { color: var(--text); background: var(--surface-2); }
.site-nav a.is-active { color: var(--text); }
.site-nav a.is-active::after { content: ""; position: absolute; left: 50%; bottom: 2px; width: 16px; height: 2px; border-radius: 2px; background: var(--grad); transform: translateX(-50%); }
.header-actions { display: flex; align-items: center; gap: 0.45rem; margin-left: auto; }
.nav-toggle { display: inline-flex; }
.menu { position: relative; }
.avatar-btn { display: inline-flex; align-items: center; gap: 0.45rem; background: transparent; border: 1px solid var(--line); border-radius: var(--r-pill); padding: 0.22rem 0.55rem 0.22rem 0.25rem; cursor: pointer; }
.avatar-btn .caret { width: 0.9em; height: 0.9em; }
.avatar-name { font-size: 0.88rem; font-weight: 600; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 0.76rem; font-weight: 700; color: #fff; flex: none; letter-spacing: 0.02em; }
.avatar-lg { width: 44px; height: 44px; font-size: 0.95rem; }
.avatar-xl { width: 64px; height: 64px; font-size: 1.25rem; }
.avatar-xxl { width: 96px; height: 96px; font-size: 1.9rem; }
.menu-panel {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 210px; z-index: 70;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--shadow); padding: 0.4rem; display: none; flex-direction: column;
}
.menu.is-open .menu-panel { display: flex; }
.menu-panel a, .menu-panel button {
  display: block; width: 100%; text-align: left; padding: 0.5rem 0.7rem;
  border-radius: var(--r-sm); color: var(--text-dim); font-size: 0.9rem; background: none; border: 0; cursor: pointer;
}
.menu-panel a:hover, .menu-panel button:hover { background: var(--surface-2); color: var(--text); }
.menu-form { margin: 0.2rem 0 0; padding-top: 0.3rem; border-top: 1px solid var(--line); }

.nav-mobile-only { display: none; }

@media (max-width: 899px) {
  .site-nav {
    display: none; position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; gap: 0.1rem; padding: 0.8rem 1.25rem 1.2rem;
    background: var(--bg-2); border-bottom: 1px solid var(--line); margin: 0;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 0.7rem 0.4rem; font-size: 1rem; }
  .site-nav a.is-active::after { display: none; }
  .nav-toggle { display: inline-flex; }
  .avatar-name { display: none; }
  /* The header only has room for the menu button on a phone, so the theme
     switch, the notifications bell and the sign in links move into the
     menu itself. */
  .header-actions > .theme-toggle,
  .header-actions > .notif-btn,
  .header-actions > .btn-ghost,
  .header-actions > .btn-primary { display: none; }
  .nav-mobile-only { display: flex; flex-direction: column; gap: 0.1rem; margin-top: 0.45rem; padding-top: 0.5rem; border-top: 1px solid var(--line); }
  .nav-mobile-only button { text-align: left; background: none; border: 0; color: var(--text-dim); font-size: 1rem; padding: 0.7rem 0.4rem; cursor: pointer; }
  .nav-mobile-only a { padding: 0.7rem 0.4rem; }
}
@media (min-width: 900px) { .nav-toggle { display: none; } }

/* --------------------------------------------------------------- flash */

.flash {
  display: flex; align-items: center; gap: 0.6rem;
  width: min(100% - 2.5rem, var(--shell)); margin: 1rem auto 0;
  padding: 0.75rem 1rem; border-radius: var(--r); border: 1px solid var(--line);
  background: var(--surface); box-shadow: var(--shadow); font-size: 0.92rem;
  animation: slide-in 0.32s var(--ease);
}
.flash-success { border-color: var(--success); background: var(--success-soft); }
.flash-error { border-color: var(--danger); background: var(--danger-soft); }
.flash-info { border-color: var(--primary); background: var(--primary-soft); }
.flash-x { margin-left: auto; background: none; border: 0; cursor: pointer; color: var(--text-mute); display: grid; place-items: center; }
@keyframes slide-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* --------------------------------------------------------------- hero */

.hero { position: relative; overflow: hidden; padding-block: clamp(3rem, 1.6rem + 6vw, 6.5rem) clamp(2.5rem, 1.5rem + 4vw, 5rem); }
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.55; z-index: 0; }
.hero-orb { position: absolute; border-radius: 50%; filter: blur(70px); z-index: 0; pointer-events: none; }
.hero-orb-a { width: 420px; height: 420px; background: rgba(124, 58, 237, 0.45); top: -120px; right: -80px; }
.hero-orb-b { width: 340px; height: 340px; background: rgba(236, 72, 153, 0.32); bottom: -140px; left: -100px; }
.hero-inner { position: relative; z-index: 2; }
.hero-title { max-width: 17ch; margin-bottom: 1rem; }
.hero-title em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { max-width: 58ch; color: var(--text-dim); font-size: clamp(1rem, 0.95rem + 0.3vw, 1.15rem); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.7rem; margin: 1.6rem 0 1.3rem; }
.hero-badges { list-style: none; padding: 0; margin: 0 0 2.2rem; display: flex; flex-wrap: wrap; gap: 0.5rem 1.2rem; color: var(--text-dim); font-size: 0.9rem; }
.hero-badges li { display: flex; align-items: center; gap: 0.4rem; }
.hero-badges .ic { color: var(--success); }
.hero-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem 1.4rem; margin: 0; padding-top: 1.6rem; border-top: 1px solid var(--line); }
.hero-stats div { margin: 0; }
.hero-stats dt { font-size: 0.78rem; color: var(--text-mute); text-transform: uppercase; letter-spacing: 0.08em; }
.hero-stats dd { margin: 0.2rem 0 0; font-size: 1.5rem; font-weight: 800; font-variant-numeric: tabular-nums; }
@media (min-width: 760px) { .hero-stats { grid-template-columns: repeat(4, 1fr); } }

.page-hero { padding-block: clamp(2.2rem, 1.4rem + 3vw, 4rem) 0; }
.page-hero-sm { padding-bottom: 1rem; }
.page-hero h1 { max-width: 20ch; }
.page-hero .lead { max-width: 68ch; }

/* --------------------------------------------------------------- cards */

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: clamp(1rem, 0.8rem + 0.8vw, 1.5rem); box-shadow: var(--shadow);
}
.card-title { font-size: 1.05rem; margin-bottom: 0.9rem; }
.card-subtitle { font-size: 0.95rem; margin: 1.4rem 0 0.6rem; }
.card + .card { margin-top: 1rem; }
.card > .table-wrap { margin: 0 -0.25rem; }

.feature-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .feature-grid { grid-template-columns: repeat(4, 1fr); } }
.feature-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 1.4rem 1.2rem; transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.feature-card:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: var(--shadow-lg); }
.feature-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: var(--grad-soft); color: var(--primary); margin-bottom: 0.9rem; }
.feature-icon .ic { width: 20px; height: 20px; }
.feature-card h2, .feature-card h3 { font-size: 1.05rem; }
.feature-card p { font-size: 0.92rem; }
.feature-points { list-style: none; padding: 0; margin: 0.9rem 0 0; font-size: 0.85rem; color: var(--text-dim); }
.feature-points li { display: flex; gap: 0.45rem; align-items: flex-start; margin-bottom: 0.35rem; }
.feature-points .ic { color: var(--success); width: 1em; height: 1em; margin-top: 0.28em; }

.steps { list-style: none; padding: 0; margin: 1.4rem 0 1.8rem; }
.steps li { display: flex; gap: 1rem; margin-bottom: 1.4rem; }
.step-num {
  flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--grad); color: #fff; font-weight: 800; font-size: 0.9rem;
}
.steps h3 { margin-bottom: 0.2rem; font-size: 1.02rem; }
.steps p { margin: 0; font-size: 0.93rem; }

.mock-window { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-lg); }
.mock-bar { display: flex; gap: 0.35rem; padding: 0.7rem 0.9rem; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.mock-bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.mock-body { padding: 1.2rem; display: grid; gap: 0.9rem; }
.mock-row { display: flex; align-items: center; gap: 0.7rem; }
.mock-dot { width: 30px; height: 30px; border-radius: 50%; background: var(--grad); flex: none; }
.mock-dot.pink { background: linear-gradient(135deg, #ec4899, #f59e0b); }
.mock-dot.gold { background: linear-gradient(135deg, #f59e0b, #fbbf24); }
.mock-line { height: 11px; border-radius: 6px; background: var(--surface-3); }
.mock-line.w70 { width: 70%; } .mock-line.w60 { width: 60%; } .mock-line.w45 { width: 45%; }
.mock-bar-graph { background: var(--surface-2); border-radius: var(--r); padding: 0.8rem; }
.spark { width: 100%; height: 120px; }
.mock-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; }
.mock-card { background: var(--surface-2); border-radius: var(--r); padding: 0.8rem; text-align: center; }
.mock-card strong { display: block; font-size: 1.15rem; }
.mock-card span { font-size: 0.74rem; color: var(--text-mute); }

.code-card { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); padding: 1.1rem; overflow: auto; }
.code-card pre { margin: 0; font-family: var(--mono); font-size: 0.8rem; color: var(--text-dim); line-height: 1.7; }

/* --------------------------------------------------------------- pricing */

.price-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 700px) { .price-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .price-grid { grid-template-columns: repeat(4, 1fr); } }
.price-grid-lg { align-items: stretch; }
.price-card {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 1.5rem 1.3rem; display: flex; flex-direction: column;
}
.price-card.is-popular { border-color: var(--primary); box-shadow: var(--shadow-lg); }
.price-flag {
  position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  background: var(--grad); color: #fff; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.05em;
  padding: 0.25rem 0.75rem; border-radius: var(--r-pill); white-space: nowrap;
}
.price-name { font-size: 1.1rem; margin-bottom: 0.4rem; }
.price-amount { display: flex; align-items: baseline; gap: 0.35rem; margin: 0 0 0.2rem; }
.price-main { font-size: 2.1rem; font-weight: 800; letter-spacing: -0.03em; }
.price-term { color: var(--text-mute); font-size: 0.86rem; }
.price-alt { color: var(--text-dim); font-size: 0.84rem; margin: 0 0 0.2rem; }
.price-fee { font-size: 0.82rem; color: var(--primary); font-weight: 600; margin: 0 0 1rem; }
.price-features { list-style: none; padding: 0; margin: 0 0 1.3rem; font-size: 0.88rem; color: var(--text-dim); flex: 1; }
.price-features li { display: flex; gap: 0.45rem; align-items: flex-start; margin-bottom: 0.45rem; }
.price-features .ic { color: var(--success); width: 1em; height: 1em; margin-top: 0.3em; }
.price-card .btn { width: 100%; }

.cta-band {
  display: grid; gap: 1.2rem; align-items: center;
  background: var(--grad-soft); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: clamp(1.4rem, 1rem + 2vw, 2.6rem);
}
@media (min-width: 860px) { .cta-band { grid-template-columns: 1fr auto; } }
.cta-band h2 { margin-bottom: 0.3rem; }
.cta-band p { margin: 0; }

/* --------------------------------------------------------------- tables */

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: 0.9rem; min-width: 620px; }
.table th, .table td { padding: 0.7rem 0.9rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table thead th { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-mute); background: var(--surface-2); white-space: nowrap; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface-2); }
.table .num { text-align: right; }
.compare td:first-child { font-weight: 600; }
.compare td:nth-child(2) { color: var(--success); font-weight: 600; }
.cell-post { display: flex; align-items: center; gap: 0.6rem; min-width: 260px; }
.cell-actions { display: flex; gap: 0.35rem; flex-wrap: wrap; align-items: center; }
.thumb { width: 40px; height: 40px; border-radius: 9px; object-fit: cover; flex: none; background: var(--surface-3); }

/* --------------------------------------------------------------- forms */

.field { display: flex; flex-direction: column; gap: 0.3rem; }
.field-label { font-size: 0.82rem; font-weight: 600; color: var(--text-dim); }
.field-hint { font-size: 0.78rem; color: var(--text-mute); }
.field-inline { flex-direction: row; align-items: center; gap: 0.5rem; }
.input {
  width: 100%; padding: 0.62rem 0.85rem; border-radius: var(--r-sm);
  background: var(--bg-2); border: 1px solid var(--line); color: var(--text);
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
[data-theme="light"] .input { background: #fff; }
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.input-sm { padding: 0.35rem 0.55rem; font-size: 0.85rem; width: auto; min-width: 80px; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-mute) 50%), linear-gradient(135deg, var(--text-mute) 50%, transparent 50%); background-position: calc(100% - 15px) 50%, calc(100% - 10px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 1.8rem; }
textarea.input { resize: vertical; min-height: 5rem; }
.check { display: flex; align-items: center; gap: 0.55rem; font-size: 0.9rem; color: var(--text-dim); cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--primary); }
.search-bar { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.2rem; }
.search-bar .input { flex: 1 1 180px; }
.tabs { display: flex; gap: 0.3rem; flex-wrap: wrap; margin-bottom: 1.2rem; border-bottom: 1px solid var(--line); }
.tab { padding: 0.5rem 0.85rem; border-radius: var(--r-pill); color: var(--text-mute); font-size: 0.9rem; font-weight: 600; }
.tab:hover { color: var(--text); background: var(--surface-2); }
.tab.is-active { color: var(--text); background: var(--surface-2); }

/* --------------------------------------------------------------- pills */

.pill {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.16rem 0.6rem; border-radius: var(--r-pill);
  font-size: 0.74rem; font-weight: 700; letter-spacing: 0.02em;
  background: var(--surface-3); color: var(--text-dim); white-space: nowrap;
}
.pill-primary { background: var(--primary-soft); color: var(--primary); }
.pill-accent { background: var(--accent-soft); color: var(--accent); }
.pill-gold { background: var(--gold-soft); color: var(--gold); }
.pill-danger { background: var(--danger-soft); color: var(--danger); }
.pill-muted { background: var(--surface-3); color: var(--text-mute); }

/* --------------------------------------------------------------- creators */

.creator-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.creator-grid-sm { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.creator-tile {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 1.3rem 1rem; display: flex; flex-direction: column; align-items: center; gap: 0.3rem;
  text-align: center; transition: transform 0.22s var(--ease), border-color 0.22s var(--ease);
}
.creator-tile:hover { transform: translateY(-3px); border-color: var(--line-strong); }
.creator-tile-name { font-weight: 700; }
.creator-tile-bio { margin: 0.3rem 0 0.6rem; }
.creator-tile-foot { display: flex; gap: 0.35rem; flex-wrap: wrap; justify-content: center; }
.creator-card { display: flex; align-items: center; gap: 0.8rem; padding: 0.7rem; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); }
.creator-card-body { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.creator-card-name { font-weight: 700; }

.creator-hero { padding-block: 2rem 0.6rem; }
.creator-hero-inner { display: grid; gap: 1.2rem; grid-template-columns: auto 1fr; align-items: start; }
@media (min-width: 900px) { .creator-hero-inner { grid-template-columns: auto 1fr auto; } }
.creator-hero-body h1 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.2rem); margin-bottom: 0.2rem; }
.creator-bio { max-width: 60ch; color: var(--text-dim); }
.creator-hero-stats { display: flex; flex-wrap: wrap; gap: 0.5rem 1.2rem; font-size: 0.88rem; color: var(--text-dim); margin-top: 0.5rem; }
.creator-hero-stats strong { color: var(--text); }
.creator-hero-actions { grid-column: 1 / -1; display: flex; gap: 0.5rem; flex-wrap: wrap; }
@media (min-width: 900px) { .creator-hero-actions { grid-column: auto; flex-direction: column; } }
.tip-form .input { width: 88px; }

.creator-layout { display: grid; gap: 1.6rem; grid-template-columns: 1fr; }
@media (min-width: 980px) { .creator-layout { grid-template-columns: 1fr 340px; align-items: start; } }
.creator-side { display: grid; gap: 1rem; }
.plan-list { display: grid; gap: 0.7rem; }
.plan-option { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); padding: 0.85rem; }
.plan-option-head { display: flex; justify-content: space-between; align-items: baseline; gap: 0.6rem; margin-bottom: 0.35rem; }
.plan-option-name { font-weight: 700; display: inline-flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; }
.plan-option-price { font-weight: 800; }
.plan-option-price small { color: var(--text-mute); font-weight: 500; font-size: 0.76rem; }
.plan-option p { margin: 0 0 0.6rem; }
.coupon-form { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); display: grid; gap: 0.6rem; }
.about-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; font-size: 0.9rem; color: var(--text-dim); }
.about-list li { display: flex; gap: 0.5rem; align-items: center; }
.about-list .ic { color: var(--primary); }

.post-grid { display: grid; gap: 0.8rem; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.tile {
  position: relative; aspect-ratio: 4 / 5; border-radius: var(--r); overflow: hidden;
  background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center;
}
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s var(--ease); }
.tile:hover img { transform: scale(1.05); }
.tile-text { padding: 0.9rem; font-size: 0.82rem; color: var(--text-dim); text-align: center; }
.tile-lock { position: absolute; top: 0.5rem; left: 0.5rem; display: inline-flex; gap: 0.25rem; align-items: center; background: rgba(8, 5, 16, 0.8); color: var(--gold); padding: 0.2rem 0.5rem; border-radius: var(--r-pill); font-size: 0.74rem; font-weight: 700; }
.tile-overlay {
  position: absolute; inset: auto 0 0 0; padding: 1.6rem 0.6rem 0.5rem; display: flex; gap: 0.8rem;
  font-size: 0.76rem; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  opacity: 0; transition: opacity 0.25s var(--ease);
}
.tile:hover .tile-overlay { opacity: 1; }

/* --------------------------------------------------------------- feed */

.feed-layout { display: grid; gap: 1.6rem; grid-template-columns: 1fr; }
@media (min-width: 980px) { .feed-layout { grid-template-columns: 1fr 300px; align-items: start; } }
.feed-side { display: grid; gap: 1rem; }
.feed-list { display: grid; gap: 1rem; }
.post-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.post-head { display: flex; align-items: center; gap: 0.7rem; padding: 0.9rem 1rem 0.5rem; }
.post-meta { flex: 1; min-width: 0; }
.post-author { font-weight: 700; }
.post-meta p { margin: 0; }
.post-body { padding: 0 1rem; }
.post-caption { white-space: pre-wrap; margin-bottom: 0.8rem; }
.post-media { position: relative; border-radius: var(--r); overflow: hidden; background: var(--surface-2); }
.post-media img { width: 100%; max-height: 560px; object-fit: cover; }
.post-media.is-locked img { filter: blur(22px) saturate(0.7); }
.media-count { position: absolute; right: 0.6rem; top: 0.6rem; background: rgba(8, 5, 16, 0.82); padding: 0.15rem 0.55rem; border-radius: var(--r-pill); font-size: 0.76rem; font-weight: 700; }
.locked-note { display: flex; gap: 0.6rem; align-items: center; padding: 0.8rem 0.9rem; margin: 0.6rem 0 0; background: var(--gold-soft); border-radius: var(--r); color: var(--text-dim); font-size: 0.88rem; }
.locked-note p { margin: 0; }
.locked-note .ic { color: var(--gold); }
.post-actions { display: flex; align-items: center; gap: 0.9rem; padding: 0.7rem 1rem 0.9rem; color: var(--text-mute); font-size: 0.84rem; }
.action { display: inline-flex; align-items: center; gap: 0.3rem; }
.suggest-list { display: grid; gap: 0.5rem; }
.suggest { display: flex; align-items: center; gap: 0.6rem; padding: 0.45rem; border-radius: var(--r-sm); }
.suggest:hover { background: var(--surface-2); }
.suggest-body { display: flex; flex-direction: column; min-width: 0; }
.suggest-name { font-weight: 600; font-size: 0.92rem; }
.balance { font-size: 2rem; font-weight: 800; margin: 0.2rem 0 0.6rem; letter-spacing: -0.02em; }

.post-page { max-width: 780px; }
.post-full { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(1rem, 0.8rem + 1vw, 1.6rem); }
.post-full-head { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; }
.post-full-head > div:nth-child(2) { flex: 1; min-width: 160px; }
.post-full-title { font-size: 1.15rem; margin: 0; }
.post-full-tags { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.post-full-caption { white-space: pre-wrap; margin: 1rem 0; }
.post-gallery { display: grid; gap: 0.6rem; border-radius: var(--r); overflow: hidden; }
.post-gallery img { width: 100%; object-fit: cover; }
.post-gallery.is-locked img { filter: blur(24px) saturate(0.6); }
.locked-panel { margin-top: 1rem; padding: 1.4rem; text-align: center; background: var(--gold-soft); border: 1px solid var(--gold); border-radius: var(--r); }
.locked-icon { display: grid; place-items: center; width: 46px; height: 46px; margin: 0 auto 0.6rem; border-radius: 50%; background: var(--gold-soft); color: var(--gold); }
.locked-panel h2 { font-size: 1.15rem; }
.post-full-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.comments { margin-top: 1.6rem; }
.comment-form { display: grid; gap: 0.6rem; margin-bottom: 1.2rem; }
.comment-list { display: grid; gap: 0.9rem; }
.comment { display: flex; gap: 0.7rem; }
.comment-body { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 0.7rem 0.9rem; flex: 1; }
.comment-body p { margin: 0 0 0.2rem; }
.comment-head { margin: 0 0 0.3rem !important; }
.poll { display: grid; gap: 0.5rem; }
.poll-large { margin-top: 1rem; padding: 1rem; border: 1px solid var(--line); border-radius: var(--r); }
.poll-opt { padding: 0.6rem 0.8rem; background: var(--surface-2); border-radius: var(--r-sm); font-size: 0.9rem; }
.poll-row { display: flex; align-items: center; gap: 0.6rem; }
.poll-label { flex: 1; font-size: 0.9rem; }

/* --------------------------------------------------------------- studio */

.studio-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 900px) { .studio-grid { grid-template-columns: repeat(2, 1fr); } }
.stat-grid { display: grid; gap: 0.8rem; grid-template-columns: repeat(2, 1fr); margin-bottom: 1.2rem; }
@media (min-width: 760px) { .stat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .stat-grid { grid-template-columns: repeat(6, 1fr); } }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 0.9rem; }
.stat-label { display: block; font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-mute); }
.stat-value { display: block; font-size: 1.4rem; font-weight: 800; margin-top: 0.15rem; letter-spacing: -0.02em; }
.stat-hint { display: block; font-size: 0.76rem; color: var(--text-mute); }
.chart { width: 100%; height: 180px; }
.rank-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.6rem; }
.rank-list li { display: flex; flex-direction: column; }
.rank-list a { font-weight: 600; font-size: 0.92rem; }
.plan-admin-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.7rem; }
.plan-admin-list li { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; padding-bottom: 0.7rem; border-bottom: 1px solid var(--line); }
.plan-admin-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.plan-admin-list p { margin: 0; }
.plan-buy { border: 1px solid var(--line); border-radius: var(--r); padding: 0.8rem; margin-bottom: 0.7rem; }
.plan-buy p { margin: 0 0 0.6rem; }
.media-strip { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.8rem; }
.media-strip img { width: 80px; height: 80px; object-fit: cover; border-radius: var(--r-sm); border: 1px solid var(--line); }
.vault-grid { display: grid; gap: 0.9rem; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.vault-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.vault-thumb { aspect-ratio: 1; background: var(--surface-2); display: grid; place-items: center; }
.vault-thumb img { width: 100%; height: 100%; object-fit: cover; }
.vault-file { color: var(--text-mute); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; }
.vault-meta { padding: 0.7rem; }
.vault-title { font-weight: 600; font-size: 0.88rem; margin: 0 0 0.2rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vault-meta p { margin: 0 0 0.5rem; }

.wallet-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; margin-bottom: 1.6rem; }
@media (min-width: 900px) { .wallet-grid { grid-template-columns: repeat(3, 1fr); } }
.balance-card { background: var(--grad-soft); }
.settings-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 900px) { .settings-grid { grid-template-columns: repeat(2, 1fr); } }
.list-layout { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 820px) { .list-layout { grid-template-columns: 320px 1fr; } }
.list-col { display: grid; gap: 1rem; }
.list-card-head { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; }
.list-card h3 { margin: 0; }
.list-card form { margin-bottom: 0.6rem; }

.sub-list { display: grid; gap: 0.7rem; }
.sub-row { display: flex; align-items: center; gap: 0.9rem; padding: 0.85rem 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); flex-wrap: wrap; }
.sub-body { flex: 1; min-width: 180px; }
.sub-name { margin: 0; font-weight: 600; }
.sub-price { font-weight: 700; }

.notif-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.notif { display: flex; align-items: center; gap: 0.8rem; padding: 0.8rem 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.notif.is-unread { border-color: var(--primary); background: var(--primary-soft); }
.notif-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--surface-3); color: var(--primary); flex: none; }
.notif-body { flex: 1; min-width: 0; }
.notif-title { margin: 0; font-weight: 600; }

.msg-layout { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 860px) { .msg-layout { grid-template-columns: 1.2fr 1fr; } }
.msg-list { padding: 0.5rem; }
.msg-row { display: flex; align-items: center; gap: 0.7rem; padding: 0.6rem; border-radius: var(--r-sm); }
.msg-row:hover { background: var(--surface-2); }
.msg-row-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.msg-row-name { font-weight: 600; font-size: 0.92rem; }
.convo-card { display: grid; gap: 0.9rem; }
.convo-list { display: grid; gap: 0.6rem; max-height: 56vh; overflow-y: auto; }
.bubble { max-width: 74%; padding: 0.6rem 0.85rem; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line); }
.bubble.is-mine { margin-left: auto; background: var(--primary-soft); border-color: var(--primary); }
.bubble.is-locked { border-color: var(--gold); }
.bubble-text { margin: 0; font-size: 0.92rem; }
.bubble-meta { font-size: 0.72rem; color: var(--text-mute); }
.convo-form { display: flex; gap: 0.5rem; align-items: flex-end; flex-wrap: wrap; }
.convo-form .input { flex: 1 1 200px; }
.referral-link { display: flex; gap: 0.5rem; }
.referral-link .input { flex: 1; }

.report-list, .withdraw-list { display: grid; gap: 0.9rem; }
.report-card p { margin: 0.6rem 0; }
.report-head { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; }
.withdraw-head { display: flex; gap: 0.8rem; align-items: center; flex-wrap: wrap; }
.withdraw-head > div:nth-child(2) { flex: 1; min-width: 180px; }
.withdraw-amounts { display: flex; gap: 1.2rem; margin: 0.8rem 0; font-size: 0.9rem; color: var(--text-dim); flex-wrap: wrap; }
.withdraw-amounts strong { color: var(--text); }
.admin-quick { display: grid; gap: 0.8rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-bottom: 1.2rem; }
.quick-card { display: flex; align-items: center; gap: 0.7rem; font-size: 0.9rem; }
.quick-card:hover { border-color: var(--line-strong); }
.apply-card { max-width: 560px; margin-inline: auto; }

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

.auth-body { display: grid; place-items: center; min-height: 100vh; padding: 2rem 1.25rem; background: radial-gradient(1000px 500px at 50% -10%, rgba(124, 58, 237, 0.25), transparent 70%), var(--bg); }
.auth-wrap { width: min(100%, 420px); }
.auth-brand { justify-content: center; margin-bottom: 1.2rem; font-size: 1.3rem; }
.auth-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(1.3rem, 1rem + 1.2vw, 2rem); box-shadow: var(--shadow-lg); }
.auth-title { font-size: 1.5rem; margin-bottom: 0.2rem; }
.auth-alt { display: flex; justify-content: space-between; align-items: center; gap: 0.8rem; margin-top: 1.2rem; flex-wrap: wrap; }
.auth-foot { text-align: center; margin-top: 1.2rem; }
.auth-success { text-align: center; }
.auth-success-icon { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 0.8rem; border-radius: 50%; background: var(--success-soft); color: var(--success); }

/* --------------------------------------------------------------- misc */

.empty { text-align: center; padding: 3rem 1rem; background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--r-lg); }
.empty-icon { display: grid; place-items: center; width: 52px; height: 52px; margin: 0 auto 0.8rem; border-radius: 50%; background: var(--surface-2); color: var(--primary); }
.empty-icon .ic { width: 24px; height: 24px; }
.empty h2, .empty h3 { font-size: 1.1rem; }
.empty p { max-width: 46ch; margin-inline: auto; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 0.8rem; margin: 1.6rem 0; }
.pg { padding: 0.45rem 0.85rem; border-radius: var(--r-pill); border: 1px solid var(--line); font-size: 0.88rem; color: var(--text-dim); }
.pg:hover { background: var(--surface-2); color: var(--text); }
.pg-info { color: var(--text-mute); font-size: 0.86rem; }

.faq-list { max-width: 780px; margin-inline: auto; display: grid; gap: 0.6rem; }
.faq-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 0.9rem 1.1rem; }
.faq-item summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-marker { width: 10px; height: 10px; border-right: 2px solid var(--primary); border-bottom: 2px solid var(--primary); transform: rotate(45deg); transition: transform 0.2s var(--ease); flex: none; }
.faq-item[open] .faq-marker { transform: rotate(-135deg); }
.faq-item p { margin: 0.7rem 0 0; font-size: 0.92rem; }

.prose { max-width: 72ch; }
.prose h2 { font-size: 1.2rem; margin-top: 1.6rem; }
.prose p { color: var(--text-dim); }
.prose-section { max-width: 820px; }
.prose-section p { color: var(--text-dim); }
.legal-page { max-width: 820px; }

.error-page { text-align: center; padding-block: 5rem; }
.error-code { display: block; font-size: clamp(3.5rem, 2rem + 8vw, 7rem); font-weight: 900; line-height: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.error-page .row { justify-content: center; margin-top: 1.4rem; }

.print-body { background: #fff; color: #111; padding: 2rem; }
.invoice { max-width: 760px; margin-inline: auto; }
.invoice-head { display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; border-bottom: 2px solid #111; padding-bottom: 1rem; margin-bottom: 1.4rem; }
.invoice-meta { text-align: right; }
.invoice-table { min-width: 0; }
.invoice-table th, .invoice-table td { border-color: #ddd; }
.invoice-table thead th { background: #f4f4f4; color: #444; }
.print-only { display: none; }
@media print { .print-only { display: block; } body.print-body { padding: 0; } }

/* --------------------------------------------------------------- footer */

.site-footer { border-top: 1px solid var(--line); background: var(--bg-2); margin-top: 3rem; padding-top: 2.6rem; }
.footer-grid { display: grid; gap: 1.8rem; grid-template-columns: 1fr; }
@media (min-width: 700px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer-grid h4 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-mute); }
.footer-grid a { display: block; padding: 0.2rem 0; font-size: 0.9rem; color: var(--text-dim); }
.footer-grid a:hover { color: var(--text); }
.footer-brand p { max-width: 46ch; }
.footer-bottom { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 2rem; padding-block: 1.2rem; border-top: 1px solid var(--line); }
.footer-bottom p { margin: 0; }

/* --------------------------------------------------------------- motion */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* --------------------------------------------------------------- focus */

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

/* --------------------------------------------------------------- cookie bar */
.cookie-bar {
  position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 90;
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r);
  box-shadow: var(--shadow-lg); padding: 0.9rem 1.1rem;
  animation: slide-up 0.35s var(--ease);
}
@media (min-width: 720px) { .cookie-bar { left: auto; right: 1.5rem; max-width: 480px; } }
.cookie-text { margin: 0; flex: 1 1 240px; font-size: 0.86rem; color: var(--text-dim); }
.cookie-text a { color: var(--primary); text-decoration: underline; }
.cookie-actions { display: flex; gap: 0.5rem; }
@keyframes slide-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* --------------------------------------------------------------- age gate */
.age-gate {
  position: fixed; inset: 0; z-index: 120; display: grid; place-items: center;
  background: rgba(5, 3, 10, 0.86); backdrop-filter: blur(8px); padding: 1.25rem;
}
.age-card {
  width: min(100%, 430px); text-align: center; padding: 2rem 1.6rem;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
}
.age-mark { display: grid; place-items: center; width: 52px; height: 52px; margin: 0 auto 0.9rem; border-radius: 15px; background: var(--grad); }
.age-card h2 { font-size: 1.3rem; }
.age-card p { color: var(--text-dim); font-size: 0.92rem; }
.age-actions { display: flex; gap: 0.6rem; justify-content: center; flex-wrap: wrap; margin-top: 1.2rem; }

/* ------------------------------------------------- stories and highlights */

.story-strip {
  display: flex; gap: 1.1rem; overflow-x: auto; padding: 0.2rem 0 0.6rem;
  scrollbar-width: thin;
}
.story-strip-item { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; flex: none; width: 84px; text-align: center; }
.story-strip-ring {
  width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(from 210deg, var(--primary), var(--accent), var(--warn), var(--primary));
  padding: 3px; transition: transform 0.2s var(--ease);
}
.story-strip-item:hover .story-strip-ring { transform: scale(1.06); }
.story-strip-ring img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 2px solid var(--bg); }
.story-strip-fallback { width: 100%; height: 100%; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 1.1rem; border: 2px solid var(--bg); }
.story-strip-name { font-size: 0.78rem; color: var(--text-dim); max-width: 84px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.story-viewer, .reel-viewer {
  min-height: calc(100vh - var(--header-h) - 4rem);
  display: grid; place-items: center; padding: 2rem 1rem 3rem;
}
.story-frame, .reel-frame {
  width: min(100%, 440px); background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow); position: relative;
}
.story-progress { display: flex; gap: 3px; padding: 0.6rem 0.7rem 0.2rem; }
.story-progress-seg { flex: 1; height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; position: relative; }
.story-progress-seg.is-active::after {
  content: ""; position: absolute; inset: 0; width: 0; background: var(--grad);
  animation: story-progress 5s linear forwards;
}
.story-progress-seg.is-done { background: var(--primary); }
@keyframes story-progress { to { width: 100%; } }

.story-head, .reel-head { display: flex; align-items: center; gap: 0.7rem; padding: 0.5rem 0.9rem 0.7rem; }
.story-author { display: flex; align-items: center; gap: 0.55rem; color: var(--text); }
.story-author strong { display: block; font-size: 0.92rem; }
.story-author small { display: block; font-size: 0.76rem; }
.story-close { margin-left: auto; color: var(--text-dim); font-size: 1.1rem; padding: 0.2rem 0.4rem; border-radius: var(--r-sm); }
.story-close:hover { background: var(--surface-2); color: var(--text); }

.story-stage { position: relative; background: #07060c; }
.story-slide { display: none; }
.story-slide.is-active { display: block; }
.story-media { position: relative; aspect-ratio: 9 / 16; max-height: 70vh; overflow: hidden; }
.story-media img, .story-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.story-caption {
  position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: 2.4rem 1rem 1rem;
  color: #fff; font-size: 0.92rem; line-height: 1.45;
  background: linear-gradient(to top, rgba(4, 3, 8, 0.92), rgba(4, 3, 8, 0));
}
.story-nav {
  position: absolute; top: 0; bottom: 0; width: 34%; background: none; border: 0;
  color: rgba(255, 255, 255, 0.75); font-size: 2rem; cursor: pointer; opacity: 0;
  transition: opacity 0.2s var(--ease);
}
.story-stage:hover .story-nav { opacity: 1; }
.story-nav-prev { left: 0; }
.story-nav-next { right: 0; }
.story-foot { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; padding: 0.8rem 0.9rem; }

.reel-stage { position: relative; background: #07060c; aspect-ratio: 9 / 16; max-height: 72vh; overflow: hidden; }
.reel-stage img, .reel-stage video { width: 100%; height: 100%; object-fit: cover; display: block; }
.reel-caption {
  position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: 3rem 1rem 1.2rem;
  color: #fff; font-size: 0.95rem; line-height: 1.45;
  background: linear-gradient(to top, rgba(4, 3, 8, 0.92), rgba(4, 3, 8, 0));
}
.reel-nav { display: flex; gap: 0.35rem; justify-content: center; padding: 0.8rem 0; }
.reel-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line); display: block; }
.reel-dot.is-active { background: var(--primary); }

@media (max-width: 520px) {
  .story-strip { gap: 0.8rem; }
  .story-frame, .reel-frame { width: 100%; }
}

/* ----------------------------------------------------------- theme picker */

.theme-picker { position: relative; }
.theme-panel {
  position: absolute; right: 0; top: calc(100% + 10px); width: min(92vw, 330px); z-index: 70;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--shadow-lg); padding: 0.85rem; display: none;
}
.theme-picker.is-open .theme-panel { display: block; animation: slide-in 0.2s var(--ease); }
.theme-panel-title { margin: 0 0 0.6rem; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.09em; color: var(--text-mute); }
.theme-panel-note { margin: 0.7rem 0 0; font-size: 0.74rem; color: var(--text-mute); }
.theme-grid { display: grid; gap: 0.4rem; }
.theme-swatch {
  display: flex; align-items: center; gap: 0.7rem; width: 100%; text-align: left;
  padding: 0.5rem 0.6rem; border-radius: var(--r-sm); border: 1px solid transparent;
  background: transparent; color: var(--text); cursor: pointer;
  transition: border-color 0.16s var(--ease), background 0.16s var(--ease);
}
.theme-swatch:hover { background: var(--surface-2); border-color: var(--line); }
.theme-swatch.is-active { border-color: var(--primary); background: var(--primary-soft); }
.theme-swatch-preview {
  width: 38px; height: 38px; border-radius: 11px; flex: none; position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--sw-bg) 45%, var(--sw-primary) 45%, var(--sw-accent) 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}
.theme-swatch-bar { position: absolute; left: 5px; right: 5px; bottom: 6px; height: 4px; border-radius: 4px; background: var(--sw-surface); opacity: 0.9; }
.theme-swatch-meta { min-width: 0; }
.theme-swatch-meta strong { display: block; font-size: 0.86rem; }
.theme-swatch-meta small { display: block; font-size: 0.73rem; color: var(--text-mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.auth-theme-picker { position: fixed; top: 0.9rem; right: 0.9rem; z-index: 80; }

.theme-choices { border: 0; padding: 0; margin: 0.4rem 0 0; }
.theme-choices legend { padding: 0; }
.theme-choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 0.5rem; margin-top: 0.5rem; }
.theme-choice {
  display: flex; align-items: center; gap: 0.65rem; padding: 0.55rem 0.7rem;
  border: 1px solid var(--line); border-radius: var(--r-sm); cursor: pointer;
  background: var(--surface-2); transition: border-color 0.16s var(--ease), background 0.16s var(--ease);
}
.theme-choice:hover { border-color: var(--line-strong); }
.theme-choice.is-active { border-color: var(--primary); background: var(--primary-soft); }
.theme-choice input { position: absolute; opacity: 0; pointer-events: none; }
.theme-choice:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }

.setup-box { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 0.9rem; background: var(--surface-2); }
.setup-box h3 { margin: 0.8rem 0 0.35rem; font-size: 0.92rem; }
.setup-box h3:first-child { margin-top: 0; }
.setup-key, .setup-uri {
  font-family: var(--mono); font-size: 0.82rem; word-break: break-all;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 0.55rem 0.65rem; margin: 0 0 0.6rem;
}
.setup-uri { font-size: 0.72rem; color: var(--text-dim); }

/* The swatches borrow the palette of the theme they stand for. */
.theme-swatch-preview[data-swatch="dark"],    [data-theme-set="dark"] .theme-swatch-preview    { background: linear-gradient(135deg, #080510 45%, #a855f7 45%, #ec4899 100%); }
.theme-swatch-preview[data-swatch="light"],   [data-theme-set="light"] .theme-swatch-preview   { background: linear-gradient(135deg, #f7f4fd 45%, #7c3aed 45%, #db2777 100%); }
.theme-swatch-preview[data-swatch="midnight"],[data-theme-set="midnight"] .theme-swatch-preview{ background: linear-gradient(135deg, #050914 45%, #3b82f6 45%, #06b6d4 100%); }
.theme-swatch-preview[data-swatch="sunset"],  [data-theme-set="sunset"] .theme-swatch-preview  { background: linear-gradient(135deg, #140806 45%, #f97316 45%, #f43f5e 100%); }
.theme-swatch-preview[data-swatch="ocean"],   [data-theme-set="ocean"] .theme-swatch-preview   { background: linear-gradient(135deg, #04121a 45%, #14b8a6 45%, #38bdf8 100%); }
.theme-swatch-preview[data-swatch="emerald"], [data-theme-set="emerald"] .theme-swatch-preview { background: linear-gradient(135deg, #04140c 45%, #22c55e 45%, #a3e635 100%); }
.theme-swatch-preview[data-swatch="noir"],    [data-theme-set="noir"] .theme-swatch-preview    { background: linear-gradient(135deg, #f3f3f4 45%, #18181b 45%, #71717a 100%); }

.admin-nav { border-bottom: 1px solid var(--line); background: var(--bg-2); position: sticky; top: var(--header-h); z-index: 55; }
.admin-nav-inner { display: flex; gap: 0.15rem; overflow-x: auto; padding: 0.45rem 0; scrollbar-width: thin; }
.admin-nav a {
  flex: none; padding: 0.4rem 0.75rem; border-radius: var(--r-pill); white-space: nowrap;
  color: var(--text-dim); font-size: 0.86rem; font-weight: 500;
}
.admin-nav a:hover { color: var(--text); background: var(--surface-2); }
.admin-nav a.is-active { color: var(--text); background: var(--primary-soft); box-shadow: inset 0 0 0 1px var(--primary); }

.mail-body { white-space: pre-wrap; word-break: break-word; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 0.6rem; margin: 0.4rem 0 0; max-height: 260px; overflow: auto; }

/* --------------------------------------------------------- hero mockup */

.hero-inner { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.hero-inner > * { grid-column: 1; }
.hero-visual { grid-column: 2; grid-row: 1 / span 6; position: relative; display: grid; place-items: center; min-height: 420px; }
.hero-phone {
  width: min(100%, 300px); aspect-ratio: 300 / 600; border-radius: 34px; padding: 12px;
  background: linear-gradient(160deg, rgba(255,255,255,.14), rgba(255,255,255,.04));
  border: 1px solid var(--line); box-shadow: 0 40px 80px -30px rgba(0,0,0,.85);
  position: relative; transform: rotate(-3deg);
}
.hero-phone-notch { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); width: 84px; height: 18px; border-radius: 999px; background: rgba(10,7,17,.85); z-index: 2; }
.hero-phone-screen { height: 100%; border-radius: 24px; background: var(--bg-soft); overflow: hidden; display: flex; flex-direction: column; }
.hero-phone-bar { display: flex; align-items: center; gap: 0.6rem; padding: 2.6rem 0.9rem 0.8rem; }
.hero-phone-avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 0.72rem; font-weight: 700; color: #fff; background: linear-gradient(135deg, hsl(283 85% 58%), hsl(3 80% 42%)); }
.hero-phone-name { font-size: 0.8rem; font-weight: 600; line-height: 1.15; display: flex; flex-direction: column; }
.hero-phone-name small { font-weight: 400; color: var(--text-mute); font-size: 0.68rem; }
.hero-phone-price { margin-left: auto; font-size: 0.74rem; }
.hero-phone-price small { font-weight: 400; opacity: 0.75; }
.hero-phone-media { position: relative; flex: 1; margin: 0 0.55rem; border-radius: 16px; overflow: hidden; background: linear-gradient(150deg, hsl(268 70% 32%), hsl(318 65% 26%) 55%, hsl(24 75% 34%)); display: grid; place-items: center; }
.hero-phone-media-glow { position: absolute; inset: -20%; background: radial-gradient(circle at 30% 25%, rgba(236,72,153,.55), transparent 60%), radial-gradient(circle at 70% 75%, rgba(245,158,11,.42), transparent 62%); }
.hero-phone-caption { position: relative; font-size: 0.8rem; font-weight: 600; text-align: center; padding: 0 1rem; }
.hero-phone-lock { position: absolute; bottom: 10px; right: 10px; display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.25rem 0.5rem; border-radius: 999px; background: rgba(10,7,17,.7); font-size: 0.7rem; }
.hero-phone-actions { display: flex; gap: 1.1rem; padding: 0.8rem 0.9rem 1rem; font-size: 0.72rem; color: var(--text-dim); }
.hero-phone-actions span { display: inline-flex; align-items: center; gap: 0.25rem; }
.hero-chip {
  position: absolute; display: flex; align-items: center; gap: 0.6rem; padding: 0.6rem 0.9rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg);
  font-size: 0.78rem;
}
.hero-chip strong { display: block; font-size: 0.88rem; }
.hero-chip small { color: var(--text-mute); font-size: 0.68rem; }
.hero-chip .ic { color: var(--primary); width: 20px; height: 20px; }
.hero-chip-a { top: 12%; left: -4%; transform: rotate(-2deg); }
.hero-chip-b { bottom: 14%; right: -3%; transform: rotate(2deg); }
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { grid-column: 1; grid-row: auto; min-height: 0; margin-top: 1.5rem; }
  .hero-chip-a { left: 0; }
  .hero-chip-b { right: 0; }
}
