:root {
  --bg: #0b0f14;
  --bg-2: #111827;
  --ink: #070a0e;
  --glass: rgba(255, 255, 255, 0.06);
  --glass-strong: rgba(255, 255, 255, 0.1);
  --glass-soft: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.14);
  --glass-border-strong: rgba(255, 255, 255, 0.22);
  --glass-shine: rgba(255, 255, 255, 0.28);
  --panel: var(--glass);
  --line: var(--glass-border);
  --text: #e5e7eb;
  --muted: #97a0b3;
  --accent: #7c3aed;
  --accent-2: #0686d4;
  --accent-ink: #ffffff;
  --lime: #a855f7;
  --lime-ink: #ffffff;
  --bad: #ff8a8a;
  --ok: #5ee0a0;
  --warn: #f0b429;
  --blur: 22px;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.28), inset 0 1px 0 var(--glass-shine);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Sora", "Segoe UI", system-ui, sans-serif;
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  position: relative;
  isolation: isolate;
}

/* Aurora mesh behind everything */
.aurora {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(900px 520px at 8% -8%, rgba(124, 58, 237, 0.24), transparent 58%),
    radial-gradient(700px 480px at 92% 12%, rgba(168, 85, 247, 0.12), transparent 55%),
    radial-gradient(640px 420px at 70% 88%, rgba(6, 134, 212, 0.16), transparent 60%),
    radial-gradient(500px 360px at 20% 70%, rgba(124, 58, 237, 0.1), transparent 55%),
    linear-gradient(165deg, #111827 0%, #0b0f14 45%, #07090d 100%);
  animation: aurora-drift 22s ease-in-out infinite alternate;
}
@keyframes aurora-drift {
  from { filter: hue-rotate(0deg) saturate(1); transform: scale(1); }
  to { filter: hue-rotate(12deg) saturate(1.08); transform: scale(1.03); }
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "Sora", "Segoe UI", system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  font-size: 1.2rem;
}
.brand img { display: block; width: 24px; height: 24px; border-radius: 6px; }

.nav-soon { display: inline-flex; align-items: center; gap: 6px; opacity: 0.75; }
.nav-soon:hover { opacity: 1; }
.pill.soon {
  background: rgba(124, 58, 237, 0.16);
  border-color: rgba(124, 58, 237, 0.4);
  color: var(--accent-2);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.65rem;
  padding: 1px 6px;
}

/* —— Glass primitives —— */
.glass,
.glass-panel,
.panel,
.card,
.camp-card,
.trend-col,
.acct-card,
.stat-tile,
.choice,
.tip-box,
.suggest-item,
.trend-item,
.niche-bar {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(var(--blur)) saturate(1.6);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(1.6);
  box-shadow: var(--shadow-glass);
}

.glass-panel {
  border-radius: calc(var(--radius) + 4px);
  padding: 22px 20px;
}

.top.glass {
  border-radius: 0;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2), inset 0 1px 0 var(--glass-shine);
}

.btn,
.logout button,
.glass-btn {
  appearance: none;
  border: 1px solid var(--glass-border-strong);
  border-radius: var(--radius-sm);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.04) 100%),
    rgba(124, 58, 237, 0.18);
  color: var(--text);
  font-weight: 700;
  padding: 10px 16px;
  cursor: pointer;
  font-size: 0.9rem;
  font-family: inherit;
  min-height: 44px;
  backdrop-filter: blur(14px) saturate(1.5);
  -webkit-backdrop-filter: blur(14px) saturate(1.5);
  box-shadow:
    0 4px 18px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 -1px 0 rgba(0, 0, 0, 0.12);
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease, filter 0.15s ease;
}
.btn:hover,
.logout button:hover,
.glass-btn:hover {
  border-color: rgba(255, 255, 255, 0.35);
  filter: brightness(1.06);
}
.btn:active,
.logout button:active,
.glass-btn:active {
  transform: scale(0.98);
}

.btn.primary,
.btn.glass-btn.primary,
.glass-btn.primary,
.land-body .btn.primary,
.land-top-cta {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0.08) 40%, transparent 100%),
    linear-gradient(135deg, var(--lime) 0%, var(--accent) 100%);
  color: var(--lime-ink);
  border-color: rgba(255, 255, 255, 0.4);
}

.btn.secondary,
.btn.glass-btn.secondary,
.glass-btn.secondary {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.03) 100%),
    var(--glass-soft);
  color: var(--text);
}

.btn.ghost,
.glass-btn.ghost {
  background: transparent;
  color: var(--muted);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.btn.danger {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, transparent 100%),
    rgba(120, 40, 40, 0.55);
  color: #ffc9c9;
  border-color: rgba(255, 140, 140, 0.35);
}

/* Fallback: plain .btn without modifier = primary glass accent */
.btn:not(.secondary):not(.danger):not(.ghost):not(.primary) {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0.06) 45%, transparent),
    linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: var(--accent-ink);
  border-color: rgba(255, 255, 255, 0.38);
}

.top {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  padding-top: max(12px, env(safe-area-inset-top));
  border-bottom: 1px solid var(--glass-border);
  background: rgba(7, 16, 24, 0.55);
  backdrop-filter: blur(18px) saturate(1.5);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  position: sticky;
  top: 0;
  z-index: 40;
}

nav { display: flex; gap: 10px; flex: 1; flex-wrap: wrap; align-items: center; }
nav a { color: var(--muted); font-size: 0.9rem; font-weight: 500; }
nav a:hover { color: var(--text); }

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 16px calc(64px + var(--safe-bottom));
}
.login { max-width: 360px; margin: 12vh auto; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.center { justify-content: center; margin-top: 12px; }

label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  flex: 1;
  min-width: 120px;
}

input, select, textarea {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  font-size: 1rem;
  font-family: inherit;
  min-height: 44px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: border-color 0.15s ease, background 0.15s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: rgba(124, 58, 237, 0.55);
  background: rgba(255, 255, 255, 0.08);
}

.panel {
  border-radius: var(--radius);
  padding: 14px;
  margin: 12px 0;
}
.grid.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.card { border-radius: var(--radius); padding: 14px; }
.stat { font-size: 1.4rem; font-weight: 700; margin: 6px 0; }
.muted { color: var(--muted); }
.small { font-size: 0.8rem; }
.err { color: var(--bad); }

.pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  font-size: 0.78rem;
  backdrop-filter: blur(8px);
}
.pill.ok { color: var(--ok); }
.pill.bad { color: var(--bad); }

.bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  overflow: hidden;
  margin: 8px 0;
}
.bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--lime)); }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--glass-border); vertical-align: top; }
th { color: var(--muted); font-size: 0.75rem; }

.log {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 10px;
  max-height: 260px;
  overflow: auto;
  font-family: ui-monospace, monospace;
  font-size: 0.78rem;
  white-space: pre-wrap;
  backdrop-filter: blur(12px);
}
.events { list-style: none; padding: 0; }
.events li { padding: 6px 0; border-bottom: 1px solid var(--glass-border); font-size: 0.88rem; }

.swiper { position: relative; min-height: 50vh; }
.slide {
  display: none;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--glass-border);
}
.slide.active { display: block; }
.slide video { width: 100%; max-height: 70vh; background: #000; display: block; }
.slide-bar {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  background: var(--glass);
  backdrop-filter: blur(14px);
  flex-wrap: wrap;
}
.inline { display: inline; }

h1, h2, h3 {
  font-family: "Sora", "Segoe UI", system-ui, sans-serif;
  letter-spacing: -0.02em;
}
h1 { font-size: 1.35rem; margin: 0 0 8px; }
h2 { font-size: 1.05rem; margin: 20px 0 10px; }
h3 { font-size: 0.95rem; margin: 8px 0; }

.page-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.sticky-filters {
  position: sticky;
  top: 56px;
  z-index: 15;
  background: rgba(7, 16, 24, 0.72);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  padding: 8px 0;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

.camp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  margin-top: 8px;
}
.camp-card {
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.camp-card:hover {
  border-color: var(--glass-border-strong);
  transform: translateY(-2px);
}
.camp-thumb { position: relative; display: block; aspect-ratio: 16 / 9; background: rgba(0, 0, 0, 0.4); }
.camp-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.camp-thumb-fallback {
  width: 100%; height: 100%; display: grid; place-items: center;
  font-size: 2rem; font-weight: 700; color: var(--muted);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.12), rgba(0, 0, 0, 0.35));
}
.camp-type {
  position: absolute; left: 8px; bottom: 8px;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  color: #fff; font-size: 0.7rem;
  padding: 3px 8px; border-radius: 8px;
  text-transform: uppercase; letter-spacing: 0.04em;
  border: 1px solid var(--glass-border);
}
.camp-body { padding: 12px 12px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.camp-title { margin: 0; font-size: 0.98rem; line-height: 1.35; }
.camp-title a { color: var(--text); }
.camp-title a:hover { color: var(--accent); }
.camp-stats {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px;
  margin-top: 4px;
}
@media (min-width: 420px) {
  .camp-stats { grid-template-columns: repeat(4, 1fr); }
}
.camp-stats strong.warn { color: var(--warn); }
.camp-stats strong.bad { color: var(--bad); }
.camp-stats strong.ok { color: var(--ok); }
.camp-stats div { display: flex; flex-direction: column; gap: 2px; }
.camp-stats strong { font-size: 0.9rem; }
.camp-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.camp-niche label { margin-top: 4px; }

.trend-boards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 12px;
}
@media (max-width: 900px) {
  .trend-boards { grid-template-columns: 1fr; }
}
.trend-col {
  border-radius: var(--radius);
  padding: 12px;
  min-height: 200px;
}
.trend-col h2 { margin: 0 0 10px; font-size: 0.95rem; }
.trend-list { display: flex; flex-direction: column; gap: 8px; }
.trend-item {
  display: flex; flex-direction: column; gap: 6px;
  padding: 10px; border-radius: var(--radius-sm);
  color: var(--text);
  transition: border-color 0.15s ease;
}
.trend-item:hover { border-color: rgba(124, 58, 237, 0.45); }
.trend-item strong { font-size: 0.88rem; line-height: 1.35; font-weight: 600; }
.hidden { display: none !important; }
#clips { scroll-margin-top: 72px; }

/* Editor + libraries */
.editor-layout {
  display: grid;
  gap: 14px;
  margin-top: 8px;
}
@media (min-width: 960px) {
  .editor-layout {
    grid-template-columns: 1.2fr 0.9fr;
    grid-template-areas:
      "main side"
      "actions side";
    align-items: start;
  }
  .editor-main { grid-area: main; }
  .editor-side { grid-area: side; display: flex; flex-direction: column; gap: 12px; }
  .editor-actions { grid-area: actions; }
}
.editor-preview {
  margin-top: 12px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--glass-border);
  background: #000;
}
.editor-preview video {
  display: block;
  width: 100%;
  max-height: 360px;
  background: #000;
}
.editor-preview .muted { padding: 8px 10px; margin: 0; background: rgba(0,0,0,0.45); }
.editor-trim { margin-top: 10px; }
.lib-tabs { display: flex; gap: 8px; margin: 12px 0; flex-wrap: wrap; }
.lib-pick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 8px;
  margin-top: 10px;
  max-height: 280px;
  overflow: auto;
}
.lib-pick {
  appearance: none;
  cursor: pointer;
  text-align: left;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  padding: 10px;
  min-height: 44px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font: inherit;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.lib-pick:hover { border-color: var(--glass-border-strong); }
.lib-pick.active {
  border-color: rgba(168, 85, 247, 0.55);
  background: rgba(168, 85, 247, 0.1);
}
.lib-pick-gif img {
  width: 100%;
  height: 64px;
  object-fit: cover;
  border-radius: 6px;
  background: #000;
}
.lib-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.lib-card {
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  background: var(--glass);
  padding: 12px;
  backdrop-filter: blur(var(--blur));
}
.lib-card img {
  width: 100%;
  height: 140px;
  object-fit: contain;
  background: #000;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}
.lib-card audio { width: 100%; margin-top: 6px; }
input[type="range"] {
  width: 100%;
  min-height: 44px;
  accent-color: var(--lime);
}


.home-hero {
  display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  padding: 8px 0 18px; align-items: flex-start;
}
.eyebrow {
  text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.72rem;
  color: var(--accent); margin: 0 0 6px;
  font-family: "Sora", "Segoe UI", system-ui, sans-serif;
}
.lede { color: var(--muted); max-width: 52ch; margin: 8px 0 0; line-height: 1.45; }

.home-hero-v2 {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 16px;
  padding: 8px 0 4px;
  align-items: stretch;
}
.home-hero-main h1 {
  font-size: clamp(1.6rem, 3.4vw, 2.3rem);
  letter-spacing: -0.02em;
  margin: 0 0 6px;
}
.home-paste {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  padding: 6px 6px 6px 16px;
  border-radius: 999px;
  background: var(--glass-soft);
  border: 1px solid var(--glass-border);
  max-width: 620px;
}
.home-paste input {
  flex: 1;
  border: none;
  background: transparent;
  min-height: 40px;
  padding: 0;
  box-shadow: none;
}
.home-paste input:focus { outline: none; background: transparent; }
.home-paste .btn {
  display: inline-flex; align-items: center; gap: 6px;
  border-radius: 999px;
  min-height: 40px;
  white-space: nowrap;
}
.home-ai-panel { padding: 18px; }
.home-ai-panel h3 { font-size: 0.95rem; }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.project-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: var(--glass-soft);
  color: var(--text);
}
.project-card:hover { border-color: rgba(124, 58, 237, 0.45); }
.project-card strong {
  font-size: 0.85rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.project-thumb {
  display: flex; align-items: center; justify-content: center;
  height: 72px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.18), rgba(6, 134, 212, 0.14));
  color: var(--accent-2);
  margin-bottom: 4px;
}

@media (max-width: 860px) {
  .home-hero-v2 { grid-template-columns: 1fr; }
  .home-paste { max-width: none; flex-wrap: wrap; border-radius: var(--radius); padding: 10px; }
  .home-paste input { min-width: 200px; }
}
.hero-sync { text-align: right; }
.stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin: 8px 0 18px;
}
.stat-strip.compact { margin-bottom: 10px; }
.stat-tile {
  border-radius: var(--radius);
  padding: 12px;
  color: var(--text);
  display: flex; flex-direction: column; gap: 4px;
  text-align: left;
  cursor: pointer;
  appearance: none;
  font: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
a.stat-tile { text-decoration: none; }
.stat-tile:hover, .stat-tile[data-active="1"] {
  border-color: rgba(124, 58, 237, 0.5);
  transform: translateY(-1px);
}
.stat-tile strong { font-size: 1.25rem; }

.niche-bars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}
.niche-bar {
  display: block; color: var(--text); padding: 8px 10px;
  border-radius: var(--radius-sm);
}
.niche-bar:hover { border-color: rgba(124, 58, 237, 0.45); }
.niche-bar-top { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 0.88rem; }

.home-split {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}
@media (max-width: 900px) {
  .home-split { grid-template-columns: 1fr; }
}

.niche-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.pill.chip {
  cursor: pointer; appearance: none; font: inherit; color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
}
.pill.chip.active, .pill.chip:hover { color: var(--accent); border-color: rgba(124, 58, 237, 0.45); }

/* iOS-style toggle switch */
.switch {
  position: relative; display: inline-block;
  width: 44px; min-width: 44px; height: 26px; flex: 0 0 44px;
  text-transform: none; letter-spacing: normal;
}
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; min-height: 0; }
.switch .track {
  position: absolute; inset: 0; border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid var(--glass-border);
  transition: background 0.15s ease, border-color 0.15s ease;
}
.switch .track::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  transition: transform 0.15s ease;
}
.switch input:checked + .track { background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-color: transparent; }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:disabled { cursor: not-allowed; }
.switch input:disabled + .track { opacity: 0.5; }

.feature-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--glass-border);
}
.feature-row:last-child { border-bottom: none; }
.feature-row .feature-name { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.feature-row .feature-name img, .feature-row .feature-name svg { width: 20px; height: 20px; flex-shrink: 0; }

/* Mobile app nav */
.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  border-radius: var(--radius-sm);
  padding: 10px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  margin-left: auto;
  cursor: pointer;
  backdrop-filter: blur(12px);
  min-height: 44px;
}
.nav-toggle span {
  display: block; height: 2px; background: var(--text); border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 760px) {
  .app-top { flex-wrap: nowrap; position: relative; }
  .nav-toggle { display: flex; }
  .app-nav {
    display: none;
    position: absolute;
    left: 12px; right: 12px; top: calc(100% + 6px);
    flex-direction: column;
    gap: 0;
    background: rgba(10, 22, 32, 0.82);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 8px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4), inset 0 1px 0 var(--glass-shine);
    backdrop-filter: blur(22px) saturate(1.6);
    -webkit-backdrop-filter: blur(22px) saturate(1.6);
  }
  .app-nav.open { display: flex; }
  .app-nav a {
    padding: 14px 12px;
    border-radius: var(--radius-sm);
    font-size: 1rem;
  }
  .app-nav a:active { background: rgba(255, 255, 255, 0.08); }
  .camp-grid { grid-template-columns: 1fr; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .home-hero { flex-direction: column; }
  .hero-sync { text-align: left; width: 100%; }
}

/* Landing / sell page */
.land-body {
  overflow-x: hidden;
}
.land-body .aurora {
  background:
    radial-gradient(1100px 640px at 18% -10%, rgba(124, 58, 237, 0.26), transparent 58%),
    radial-gradient(800px 520px at 92% 8%, rgba(168, 85, 247, 0.18), transparent 55%),
    radial-gradient(700px 480px at 60% 100%, rgba(6, 134, 212, 0.16), transparent 60%),
    linear-gradient(180deg, #111827 0%, #0b0f14 48%, #07090d 100%);
}

.land-top {
  background: rgba(8, 16, 18, 0.55);
  border-bottom: 1px solid var(--glass-border);
  position: sticky;
  top: 0;
  left: 0; right: 0;
  width: 100%;
  max-width: none;
  z-index: 30;
}
.land-nav { justify-content: flex-end; gap: 14px; }
.land-nav a { font-size: 0.88rem; }
.land-top-cta { flex-shrink: 0; padding: 8px 14px; min-height: 40px; }

.wrap-land {
  max-width: none;
  padding: 0;
  margin: 0;
}
.wrap-auth {
  max-width: 400px;
  padding-top: 10vh;
  padding-bottom: calc(48px + var(--safe-bottom));
}

.sell {
  width: min(920px, 100%);
  margin: 0 auto;
  padding: 0 16px calc(56px + var(--safe-bottom));
}

.sell-hero {
  position: relative;
  min-height: calc(100dvh - 58px);
  display: flex;
  align-items: flex-end;
  padding: 48px 0 56px;
  isolation: isolate;
  animation: land-in 0.55s ease both;
}
.sell-hero-glow {
  position: absolute;
  inset: 8% -4% 12%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
  mask-image: linear-gradient(180deg, transparent 0%, #000 28%, #000 72%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 28%, #000 72%, transparent 100%);
}
.sell-wave-hero {
  height: 100%;
  min-height: 220px;
  padding: 0;
  border: none;
  background: transparent;
  gap: 4px;
}
.sell-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 520px;
}

.sell-brand,
.land-brand {
  font-family: "Sora", "Segoe UI", system-ui, sans-serif;
  font-size: clamp(3.6rem, 16vw, 5.2rem);
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 0.88;
  margin: 0 0 18px;
  color: var(--text);
  text-shadow: 0 0 48px rgba(168, 85, 247, 0.18);
  animation: land-brand 0.75s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.sell-hero h1 {
  font-family: "Sora", "Segoe UI", system-ui, sans-serif;
  font-size: clamp(1.35rem, 3.8vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0;
  line-height: 1.15;
  max-width: 14ch;
}

.sell-lede,
.land-lede {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.5;
  margin: 14px 0 0;
  max-width: 34ch;
}

.sell-cta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 24px;
  max-width: 320px;
}
.sell-cta .btn {
  width: 100%;
  text-align: center;
  min-height: 48px;
}
.sell-cta .btn.primary {
  animation: sell-cta-pulse 2.8s ease-in-out infinite;
}

.land-install-hint {
  margin: 4px 0 0;
  text-align: center;
  line-height: 1.4;
}
.land-install-hint strong { color: var(--text); font-weight: 600; }

.sell-wave {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 120px;
  padding: 8px 4px;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, rgba(124, 58, 237, 0.08), rgba(0, 0, 0, 0.25));
  border: 1px solid var(--glass-border);
}
.sell-wave-hero {
  height: 100%;
  min-height: 240px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  gap: 4px;
}
.sell-wave i {
  flex: 1;
  height: var(--h, 40%);
  border-radius: 2px 2px 0 0;
  background: linear-gradient(180deg, var(--lime), var(--accent-2));
  opacity: 0.75;
  transform-origin: bottom;
  animation: sell-wave 1.8s ease-in-out infinite;
  animation-delay: calc(var(--h) * -0.02s);
}

.sell-section {
  padding: 48px 0 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.sell-section h2 {
  font-family: "Sora", "Segoe UI", system-ui, sans-serif;
  font-size: clamp(1.35rem, 3vw, 1.7rem);
  margin: 0 0 8px;
  letter-spacing: -0.03em;
}
.sell-section-lede {
  margin: 0 0 22px;
  color: var(--muted);
  max-width: 42ch;
  line-height: 1.45;
}

.sell-features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
}
@media (min-width: 700px) {
  .sell-features { grid-template-columns: 1fr 1fr; gap: 18px 24px; }
}
.sell-features li {
  padding: 0;
  border: none;
  background: none;
  box-shadow: none;
}
.sell-features strong {
  display: block;
  font-family: "Sora", "Segoe UI", system-ui, sans-serif;
  font-size: 1.05rem;
  margin-bottom: 4px;
  color: var(--text);
}
.sell-features span {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.sell-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.sell-steps li {
  counter-increment: step;
  position: relative;
  padding-left: 42px;
  color: var(--muted);
  line-height: 1.45;
}
.sell-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--lime-ink);
  background: var(--lime);
}
.sell-steps strong { color: var(--text); }

.sell-price {
  margin-top: 24px;
  padding: 24px 22px;
  animation: land-in 0.55s ease both;
}
.price-toggle {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: var(--glass-soft);
  border: 1px solid var(--glass-border);
  margin-bottom: 14px;
}
.price-toggle-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 7px 16px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
}
.price-toggle-btn.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
}
.sell-price h2 {
  font-family: "Sora", "Segoe UI", system-ui, sans-serif;
  margin: 0 0 4px;
  font-size: clamp(1.6rem, 4vw, 2rem);
  letter-spacing: -0.03em;
}
.sell-price > .muted { margin: 0 0 16px; }
.sell-price > .btn {
  width: 100%;
  max-width: 320px;
  text-align: center;
  min-height: 48px;
}

.land-list {
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.land-list li {
  position: relative;
  padding-left: 14px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.4;
}
.land-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  background: var(--lime);
  border-radius: 1px;
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.4);
}

.sell-faq {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sell-faq details {
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  padding: 0;
}
.sell-faq summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 16px;
  font-weight: 600;
  color: var(--text);
  min-height: 44px;
}
.sell-faq summary::-webkit-details-marker { display: none; }
.sell-faq summary::after {
  content: "+";
  float: right;
  color: var(--muted);
  font-weight: 400;
}
.sell-faq details[open] summary::after { content: "–"; }
.sell-faq details p {
  margin: 0;
  padding: 0 16px 14px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.sell-foot {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
}
.sell-paywall .land-list { margin-top: 16px; }

.auth-panel { animation: land-in 0.5s ease both; }
.auth-brand {
  font-size: clamp(2.4rem, 12vw, 3rem) !important;
  margin-bottom: 12px !important;
}
.auth-actions { margin-top: 18px; }
.auth-actions .btn { width: 100%; text-align: center; }

@keyframes land-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
@keyframes land-brand {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
@keyframes sell-cta-pulse {
  0%, 100% { box-shadow: 0 4px 18px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 0 0 0 rgba(168, 85, 247, 0); }
  50% { box-shadow: 0 6px 24px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 0 0 6px rgba(168, 85, 247, 0.12); }
}
@keyframes sell-wave {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(0.72); }
}

@media (max-width: 560px) {
  .land-top { padding-inline: 14px; }
  .land-nav { display: none; }
  .land-top-cta { padding: 8px 12px; font-size: 0.82rem; }
  .sell-hero { padding-top: 32px; min-height: calc(100dvh - 58px); align-items: center; }
}

@media (prefers-reduced-motion: reduce) {
  .sell-hero, .sell-brand, .land-brand, .sell-price, .auth-panel, .aurora { animation: none; }
  .sell-cta .btn.primary, .sell-wave i { animation: none; }
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 8px;
}
.choice {
  appearance: none;
  text-align: left;
  border-radius: var(--radius);
  padding: 14px;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.choice:hover { border-color: var(--glass-border-strong); }
.choice.selected {
  border-color: rgba(124, 58, 237, 0.55);
  background: rgba(124, 58, 237, 0.12);
  box-shadow: inset 0 0 0 1px rgba(124, 58, 237, 0.25), var(--shadow-glass);
}
.choice-inline {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.9rem;
  color: var(--text);
  min-width: auto;
}
.choice-inline input { min-height: auto; width: auto; }
.wizard-step { margin-bottom: 8px; }
.tip-heading { display: flex; align-items: center; gap: 8px; }
.tip-q {
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  color: var(--muted);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  backdrop-filter: blur(8px);
}
.tip-q:hover, .tip-q[aria-expanded="true"] {
  color: var(--accent);
  border-color: rgba(124, 58, 237, 0.5);
}
.tip-box {
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

/* Accounts intelligence */
.acct-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
  margin-top: 8px;
}
.acct-card {
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: land-in 0.4s ease both;
}
.acct-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.acct-head h2 { margin: 0; font-size: 1.15rem; }
.acct-head h2 a { color: var(--text); }
.acct-head h2 a:hover { color: var(--accent); }
.acct-health { text-align: right; min-width: 52px; }
.acct-health strong {
  display: block;
  font-size: 1.4rem;
  color: var(--accent);
  line-height: 1;
}
.acct-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.acct-stats { margin: 0; }
.acct-niche { align-items: flex-end; margin: 0; }
.acct-niche .btn { flex: 0; min-width: auto; }
.acct-suggest h3 { margin: 0; font-size: 0.95rem; }
.suggest-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.suggest-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px;
  border-radius: var(--radius-sm);
  color: var(--text);
  transition: border-color 0.15s ease;
}
.suggest-item:hover { border-color: rgba(124, 58, 237, 0.45); }
.suggest-item strong { font-size: 0.88rem; line-height: 1.35; }
.suggest-top { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.suggest-item p { margin: 0; }
@media (max-width: 760px) {
  .acct-grid { grid-template-columns: 1fr; }
}

.ua-spark {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 56px;
  margin-top: 8px;
  padding: 8px 0;
}
.ua-spark span {
  flex: 1;
  min-width: 4px;
  background: linear-gradient(180deg, var(--accent), rgba(124, 58, 237, 0.3));
  opacity: 0.7;
  border-radius: 2px 2px 0 0;
}
#user-analytics .events { max-height: 320px; overflow: auto; }

/* Standalone PWA: tighten chrome */
@media (display-mode: standalone) {
  .top { padding-top: max(14px, env(safe-area-inset-top)); }
  .land-top-cta { display: none; }
}
