/* Palette: deep graphite (#0e0d12) + electric rose accent (#ff4d7e) — warm, creator-y, not corporate. */
:root {
  --bg-0: #0a0910;
  --bg-1: #0e0d12;
  --bg-2: #16141c;
  --bg-3: #1e1b27;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #f3eef7;
  --text-dim: #a7a0b4;
  --text-faint: #6f6879;
  --accent: #ff4d7e;
  --accent-2: #ff8ab0;
  --accent-glow: rgba(255, 77, 126, 0.35);
  --ok: #6fe3a1;
  --radius: 16px;
  --radius-sm: 12px;
  --radius-lg: 22px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.45);
  --topbar-h: 56px;
  --sidebar-w: 200px;
  --sidebar-w-collapsed: 56px;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  min-height: 100%;
  background: var(--bg-0);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

body {
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(255, 77, 126, 0.18), transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(138, 107, 255, 0.12), transparent 60%),
    var(--bg-0);
  min-height: 100dvh;
  overflow-x: hidden;
}

.page {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 16px 48px;
}

/* Top bar */
.topbar {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: var(--topbar-h);
  background: rgba(10, 9, 16, 0.72);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 760px;
  height: 100%;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.brand-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent) 0%, #8a6bff 100%);
  color: #fff;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 8px rgba(255, 77, 126, 0.25);
}
.brand-word {
  font-size: 14px;
  color: var(--text-dim);
}
.brand:hover .brand-word { color: var(--text); }

/* Avatar + dropdown */
.user-menu { position: relative; }
.avatar-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.avatar-btn:hover { transform: translateY(-1px); }
.avatar-btn:hover .avatar-btn-inner,
.avatar-btn:focus-visible .avatar-btn-inner {
  box-shadow: 0 0 0 2px var(--bg-0), 0 0 0 4px var(--accent-glow);
}
.avatar-btn:focus { outline: none; }
.avatar-btn-inner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--bg-2);
  color: var(--text);
  box-shadow: 0 0 0 2px var(--bg-0), 0 0 0 3px var(--accent);
  transition: box-shadow 0.2s ease;
  overflow: hidden;
}
.avatar-btn-inner.signed-in {
  background: linear-gradient(135deg, #ff4d7e 0%, #8a6bff 100%);
  color: #fff;
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.02em;
}
.avatar-btn-inner svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--text-dim);
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  max-width: min(260px, calc(100vw - 24px));
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  padding: 6px;
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 0.12s ease, transform 0.12s ease;
  z-index: 60;
}
.user-dropdown.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
.user-dropdown-item:hover,
.user-dropdown-item:focus-visible { background: var(--bg-3); outline: none; }
.user-dropdown-item.destructive { color: var(--accent); }
.user-dropdown-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--text-dim);
}
.user-dropdown-item.destructive svg { color: var(--accent); }
.user-dropdown-divider {
  height: 1px;
  margin: 4px 6px;
  background: var(--line);
}

@media (max-width: 380px) {
  .brand-word { display: none; }
  .user-dropdown { min-width: 180px; }
}

/* Banner */
.banner {
  position: relative;
  margin: 16px -16px 80px;
  height: 220px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.banner-art {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(255, 77, 126, 0.55), transparent 55%),
    radial-gradient(ellipse at 85% 70%, rgba(138, 107, 255, 0.55), transparent 55%),
    radial-gradient(ellipse at 50% 100%, rgba(255, 138, 176, 0.35), transparent 60%),
    linear-gradient(135deg, #2a1838 0%, #3a1f4a 50%, #1a1226 100%);
}
.banner-art::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 15% 25%, rgba(255, 255, 255, 0.12) 0 1px, transparent 2px),
    radial-gradient(circle at 65% 75%, rgba(255, 255, 255, 0.08) 0 1px, transparent 2px),
    radial-gradient(circle at 85% 20%, rgba(255, 255, 255, 0.1) 0 1px, transparent 2px);
  background-size: 140px 140px, 180px 180px, 220px 220px;
  opacity: 0.7;
}

.avatar {
  position: absolute;
  left: 24px;
  bottom: -60px;
  width: 128px;
  height: 128px;
  border-radius: 50%;
  border: 4px solid var(--bg-0);
  background: linear-gradient(135deg, #ff4d7e 0%, #8a6bff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
}
.avatar-initials {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 44px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Identity */
.identity {
  padding: 8px 4px 0;
}
.identity-name {
  display: flex;
  align-items: center;
  gap: 8px;
}
.identity-name h1 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.verified {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
.handle {
  color: var(--text-dim);
  font-size: 15px;
  margin-top: 2px;
}

.stats {
  list-style: none;
  display: flex;
  gap: 20px;
  margin: 16px 0 14px;
  flex-wrap: wrap;
}
.stats li {
  display: flex;
  flex-direction: column;
  font-size: 13px;
  color: var(--text-dim);
}
.stats strong {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.bio {
  color: var(--text-dim);
  font-size: 15px;
  max-width: 620px;
}

/* CTA */
.cta {
  margin: 28px 0 32px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}
.subscribe-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 18px 24px;
  border: none;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--accent) 0%, #ff7aa1 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  box-shadow: 0 8px 24px var(--accent-glow);
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.subscribe-btn:hover { transform: translateY(-1px); box-shadow: 0 12px 32px var(--accent-glow); filter: brightness(1.05); }
.subscribe-btn:active { transform: translateY(0); }
.subscribe-btn.subscribed {
  background: var(--bg-2);
  color: var(--ok);
  border: 1px solid var(--line-strong);
  box-shadow: none;
}
.subscribe-price {
  font-size: 13px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  letter-spacing: 0.05em;
}
.subscribe-btn.subscribed .subscribe-price { display: none; }
.cta-note {
  text-align: center;
  color: var(--text-faint);
  font-size: 13px;
}

/* Tier */
.tiers { margin-bottom: 28px; }
.tier {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.tier-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.tier-head h2 { font-size: 17px; font-weight: 700; }
.tier-price .amt { font-size: 20px; font-weight: 700; color: var(--accent); }
.tier-price .per { color: var(--text-dim); font-size: 13px; margin-left: 4px; }
.perks { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.perks li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--text);
}
.perks li::before {
  content: '';
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
  border-radius: 50%;
  background:
    linear-gradient(135deg, var(--accent), var(--accent-2));
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M5 12l4 4 10-10' stroke='black' stroke-width='3' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>") center / 12px no-repeat;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M5 12l4 4 10-10' stroke='black' stroke-width='3' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>") center / 12px no-repeat;
}

/* ============================================================
   Creator page layout: main + right sidebar
   ============================================================ */
.creator-layout {
  display: flex;
  gap: 0;
  align-items: flex-start;
  position: relative;
}
.creator-main {
  flex: 1;
  min-width: 0;
}

/* Right sidebar */
.creator-sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  position: sticky;
  top: var(--topbar-h);
  align-self: flex-start;
  background: rgba(14, 13, 18, 0.72);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  border-left: 1px solid var(--line);
  border-radius: 0 0 var(--radius-sm) 0;
  padding: 8px 0;
  transition: width 200ms ease;
  display: flex;
  flex-direction: column;
  min-height: 300px;
  margin-left: 12px;
}
.creator-sidebar.collapsed {
  width: var(--sidebar-w-collapsed);
}

.creator-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 6px;
  flex: 1;
}

.sidebar-tab-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  background: none;
  border: none;
  border-left: 3px solid transparent;
  border-radius: 0 8px 8px 0;
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  position: relative;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}
.sidebar-tab-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}
.sidebar-tab-btn.active {
  background: rgba(255, 255, 255, 0.08);
  border-left-color: var(--accent);
  color: #fff;
  font-weight: 600;
}
.sidebar-tab-btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sidebar-tab-label {
  opacity: 1;
  transition: opacity 200ms ease;
  overflow: hidden;
}
.creator-sidebar.collapsed .sidebar-tab-label {
  opacity: 0;
  width: 0;
}
.creator-sidebar.collapsed .sidebar-tab-btn {
  justify-content: center;
  padding: 10px 0;
  gap: 0;
}

/* Tooltip on hover when collapsed */
.creator-sidebar.collapsed .sidebar-tab-btn::after {
  content: attr(data-tooltip);
  position: absolute;
  right: 100%;
  top: 50%;
  transform: translateY(-50%);
  background: var(--bg-3);
  color: #fff;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  margin-right: 8px;
  box-shadow: var(--shadow-sm);
  z-index: 10;
}
.creator-sidebar.collapsed .sidebar-tab-btn:hover::after {
  opacity: 1;
}

.sidebar-divider {
  height: 1px;
  background: var(--line);
  margin: 6px 12px;
}

.sidebar-collapse-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 10px 12px;
  margin-top: auto;
  background: none;
  border: none;
  color: var(--text-faint);
  cursor: pointer;
  transition: color 0.15s ease;
}
.sidebar-collapse-btn:hover { color: var(--text); }
.sidebar-collapse-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 200ms ease;
}
.creator-sidebar.collapsed .sidebar-collapse-btn svg {
  transform: rotate(180deg);
}

/* Tab panels */
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Old tabs — removed (replaced by sidebar) */
.tabs { display: none; }
.panel { display: none; }
.panel.active { display: block; }

.empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-faint);
  font-size: 14px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

/* Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
@media (max-width: 640px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .banner { height: 170px; margin-bottom: 72px; }
  .avatar { width: 108px; height: 108px; bottom: -54px; left: 16px; }
  .avatar-initials { font-size: 38px; }
  .identity-name h1 { font-size: 22px; }
  .stats { gap: 14px; }
}
@media (max-width: 380px) {
  .grid { grid-template-columns: 1fr; }
}

.post-card {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--line);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.post-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.post-thumb {
  position: absolute;
  inset: 0;
  filter: blur(14px);
  transform: scale(1.15);
}
.post-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(14, 13, 18, 0.2) 0%, rgba(14, 13, 18, 0.75) 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px;
}
.post-lock {
  align-self: flex-end;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(14, 13, 18, 0.65);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.post-lock svg { width: 14px; height: 14px; }
.post-caption {
  font-size: 12px;
  color: var(--text);
  line-height: 1.35;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-dim);
}
.post-hint {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(14, 13, 18, 0.75);
  backdrop-filter: blur(8px);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.post-card:hover .post-hint { opacity: 1; }

/* Footer */
.foot {
  margin-top: 48px;
  padding: 20px 4px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-faint);
}
.foot-link {
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.15s ease;
}
.foot-link:hover { color: var(--accent); }

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 20px);
  background: var(--bg-3);
  border: 1px solid var(--line-strong);
  color: var(--text);
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 14px;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  max-width: calc(100% - 32px);
  text-align: center;
  z-index: 100;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ============================================================
   SPA additions — forms, explore grid, profile editor, landing
   ============================================================ */

.admin-chip {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 3px 7px;
  margin-right: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), #8a6bff);
  color: #fff;
  vertical-align: middle;
}

/* Auth / form views */
.auth-wrap {
  max-width: 420px;
  margin: 48px auto 0;
  padding: 0 4px;
}
.auth-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-md);
}
.auth-card h1 {
  font-size: 24px;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}
.auth-card .auth-sub {
  color: var(--text-dim);
  font-size: 14px;
  margin-bottom: 20px;
}
.auth-card .first-note {
  background: rgba(255, 77, 126, 0.1);
  border: 1px solid rgba(255, 77, 126, 0.3);
  color: var(--accent-2);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 16px;
}

.field {
  margin-bottom: 14px;
}
.field label {
  display: block;
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 6px;
  font-weight: 500;
}
.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="url"],
.field input[type="color"],
.field textarea {
  width: 100%;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 10px 12px;
  font: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field textarea {
  min-height: 96px;
  resize: vertical;
  line-height: 1.4;
}
.field input:focus,
.field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 77, 126, 0.18);
}
.field input[type="color"] {
  padding: 4px;
  height: 40px;
  cursor: pointer;
}
.field input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.field-hint {
  font-size: 12px;
  color: var(--text-faint);
  margin-top: 4px;
}
.field-err {
  font-size: 12px;
  color: var(--accent);
  margin-top: 4px;
  min-height: 14px;
}
.field-ok {
  font-size: 12px;
  color: var(--ok);
  margin-top: 4px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid var(--line-strong);
  background: var(--bg-3);
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease, border-color 0.15s ease;
  text-decoration: none;
}
.btn:hover { background: var(--bg-3); border-color: var(--accent); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #ff7fa8);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 16px rgba(255, 77, 126, 0.25);
}
.btn-primary:hover { border-color: transparent; filter: brightness(1.05); }
.btn-block { width: 100%; }
.btn-ghost { background: transparent; }
.btn-danger { color: #ffb0c2; border-color: rgba(255, 77, 126, 0.35); }

.auth-actions {
  margin-top: 18px;
}
.auth-foot {
  margin-top: 16px;
  text-align: center;
  font-size: 13px;
  color: var(--text-dim);
}
.auth-foot a { color: var(--accent-2); text-decoration: none; }
.auth-foot a:hover { text-decoration: underline; }
.form-error {
  background: rgba(255, 77, 126, 0.12);
  border: 1px solid rgba(255, 77, 126, 0.35);
  color: #ffb0c2;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 14px;
}

/* Landing */
.landing-hero {
  margin-top: 32px;
  text-align: center;
  padding: 24px 12px;
}
.landing-hero h1 {
  font-size: 36px;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 12px;
}
.landing-hero h1 .accent {
  background: linear-gradient(90deg, var(--accent), #8a6bff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.landing-hero p {
  color: var(--text-dim);
  max-width: 520px;
  margin: 0 auto 24px;
  font-size: 16px;
}
.landing-cta {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Explore list */
.section-head {
  margin: 32px 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.section-head h2 {
  font-size: 18px;
  letter-spacing: -0.01em;
}
.section-head .muted { color: var(--text-faint); font-size: 13px; }

.creator-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (min-width: 560px) {
  .creator-list { grid-template-columns: 1fr 1fr; }
}
.creator-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, transform 0.05s ease;
}
.creator-card:hover { border-color: var(--accent); }
.creator-card:active { transform: translateY(1px); }
.creator-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  font-size: 16px;
}
.creator-main {
  min-width: 0;
  flex: 1;
}
.creator-name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.creator-handle {
  color: var(--text-faint);
  font-size: 12px;
}
.creator-subs {
  color: var(--text-dim);
  font-size: 12px;
  white-space: nowrap;
}

/* Profile editor / settings cards */
.profile-wrap {
  max-width: 560px;
  margin: 32px auto 0;
}
.settings-card,
.profile-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 16px;
}
.settings-card h3,
.profile-card h2 {
  font-size: 16px;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}
.settings-card h3 {
  font-weight: 700;
}
.profile-card .role-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 14px;
}
.role-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(138, 107, 255, 0.18);
  color: #c9b9ff;
}
.role-badge.creator { background: rgba(255, 77, 126, 0.18); color: var(--accent-2); }
.role-badge.master { background: linear-gradient(90deg, var(--accent), #8a6bff); color: #fff; }

.color-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.color-swatch-preview {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
}

.divider-h {
  height: 1px;
  background: var(--line);
  margin: 16px 0;
}

/* Not-found / message state */
.state-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  margin-top: 48px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}
.state-card h1 { font-size: 20px; margin-bottom: 8px; }
.state-card p { color: var(--text-dim); margin-bottom: 18px; font-size: 14px; }

/* Subscribe state (on creator page) */
.subscribe-btn.subscribed .subscribe-price { display: none; }

/* Avatar / banner color customization via --avatar-color */
.creator-avatar-lg {
  background: var(--avatar-color, var(--accent));
}

/* ============================================================
   Posts feed, FAB, upload modal, settings
   ============================================================ */

/* Feed cards */
.feed-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.feed-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.15s ease;
}
.feed-card:hover { border-color: var(--line-strong); }
.feed-media img,
.feed-media video {
  display: block;
  width: 100%;
  max-height: 560px;
  object-fit: contain;
  background: var(--bg-1);
}
.feed-media iframe {
  display: block;
  width: 100%;
}
.feed-body {
  padding: 12px 14px;
}
.feed-caption {
  font-size: 14px;
  color: var(--text);
  line-height: 1.45;
  margin-bottom: 8px;
  white-space: pre-wrap;
  word-break: break-word;
}
.feed-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.feed-time {
  font-size: 12px;
  color: var(--text-faint);
}
.feed-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.feed-lock-badge {
  display: inline-flex;
  align-items: center;
  color: var(--accent);
  opacity: 0.7;
}
.feed-delete-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: var(--text-faint);
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
.feed-delete-btn:hover { background: rgba(255,77,126,0.15); color: var(--accent); }

/* Locked feed card */
.feed-card-locked {
  min-height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--bg-2), var(--bg-3));
}
.feed-locked-body {
  text-align: center;
  padding: 24px 16px 8px;
}
.feed-locked-icon {
  margin-bottom: 8px;
  color: var(--accent);
  opacity: 0.7;
}
.feed-locked-text {
  font-size: 14px;
  color: var(--text-dim);
  margin-bottom: 4px;
}
.feed-locked-cta {
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
}
.feed-card-locked .feed-time {
  padding: 0 14px 12px;
  width: 100%;
  text-align: right;
}

/* ============================================================
   Inline compose box (replaces FAB + modal)
   ============================================================ */
.compose-box {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}
.compose-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.compose-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
  font-size: 14px;
  flex-shrink: 0;
  font-family: Georgia, 'Times New Roman', serif;
}
.compose-prompt {
  color: var(--text-faint);
  font-size: 14px;
}
.compose-caption {
  width: 100%;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 10px 12px;
  font: inherit;
  font-size: 14px;
  line-height: 1.45;
  resize: none;
  outline: none;
  overflow-y: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.compose-caption:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 77, 126, 0.18);
}
.compose-char-count {
  text-align: right;
  font-size: 11px;
  color: var(--text-faint);
  margin-top: 4px;
}
.compose-preview {
  margin-top: 10px;
}
.compose-preview-img {
  position: relative;
  display: inline-block;
}
.compose-preview-img img {
  display: block;
  max-height: 200px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}
.compose-preview-file {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text);
}
.compose-preview-file svg {
  flex-shrink: 0;
  color: var(--text-dim);
}
.compose-preview-file span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.compose-remove-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-dim);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.12s ease, color 0.12s ease;
}
.compose-remove-btn:hover {
  background: rgba(255, 77, 126, 0.2);
  color: var(--accent);
}
.compose-remove-preview {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
}
.compose-remove-preview:hover {
  background: rgba(255, 77, 126, 0.7);
  color: #fff;
}
.compose-drive-field {
  margin-top: 10px;
}
.compose-drive-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.compose-drive-row .field-input {
  flex: 1;
  min-width: 0;
}
.compose-drive-valid {
  color: var(--ok);
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
}
.compose-error {
  margin-top: 10px;
  background: rgba(255, 77, 126, 0.12);
  border: 1px solid rgba(255, 77, 126, 0.35);
  color: #ffb0c2;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
}
.compose-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  gap: 8px;
}
.compose-actions-left {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.compose-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.12s ease, color 0.12s ease, background 0.12s ease;
  white-space: nowrap;
}
.compose-action-btn:hover {
  border-color: var(--line-strong);
  color: var(--text);
  background: var(--bg-3);
}
.compose-action-btn svg {
  flex-shrink: 0;
}
.compose-lock-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
  white-space: nowrap;
}
.compose-lock-toggle.locked {
  background: rgba(255, 77, 126, 0.12);
  border-color: rgba(255, 77, 126, 0.35);
  color: var(--accent-2);
}
.compose-lock-toggle:not(.locked) {
  background: transparent;
  border-color: var(--line);
  color: var(--text-faint);
}
.compose-publish-btn {
  flex-shrink: 0;
}
.compose-progress {
  height: 3px;
  background: var(--bg-1);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 10px;
}
.compose-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), #ff7fa8);
  transition: width 0.15s ease;
}

@media (max-width: 380px) {
  .compose-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .compose-actions-left {
    flex-wrap: wrap;
  }
  .compose-publish-btn {
    width: 100%;
  }
}

/* Drive link input */
.field-input {
  width: 100%;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 10px 12px;
  font: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s ease;
}
.field-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,77,126,0.18); }

/* Radio group for settings */
.radio-group {
  display: flex;
  gap: 16px;
}
.radio-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
}
.radio-label input { accent-color: var(--accent); }

/* ============================================================
   Media grid tab
   ============================================================ */
.media-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.media-grid-item {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--bg-1);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.media-grid-item:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.media-grid-item img,
.media-grid-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-grid-item .media-type-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.media-type-badge svg {
  width: 12px;
  height: 12px;
  stroke: #fff;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.media-grid-locked {
  position: absolute;
  inset: 0;
  background: rgba(14, 13, 18, 0.75);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  gap: 4px;
}
.media-grid-locked svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}
.media-grid-locked span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* Lightbox */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 90;
  padding: 24px;
  cursor: pointer;
}
.lightbox-content {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: default;
}
.lightbox-content img,
.lightbox-content video {
  display: block;
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
}
.lightbox-close {
  position: fixed;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 91;
  transition: background 0.12s ease;
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.2); }

/* ============================================================
   Mobile responsive: sidebar -> horizontal tab bar
   ============================================================ */
@media (max-width: 768px) {
  .creator-layout {
    flex-direction: column;
  }
  .creator-sidebar {
    width: 100% !important;
    position: static;
    flex-direction: row;
    min-height: auto;
    border-left: none;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    padding: 0;
    margin-left: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: var(--bg-1);
    order: -1;
  }
  .creator-sidebar-nav {
    flex-direction: row;
    gap: 0;
    padding: 0;
    flex: none;
    width: 100%;
  }
  .sidebar-tab-btn {
    flex: 1;
    flex-direction: column;
    gap: 4px;
    padding: 10px 8px;
    border-left: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    text-align: center;
    justify-content: center;
    font-size: 12px;
  }
  .sidebar-tab-btn.active {
    border-left-color: transparent;
    border-bottom-color: var(--accent);
    background: transparent;
  }
  .sidebar-tab-btn:hover {
    background: transparent;
  }
  .sidebar-tab-label {
    opacity: 1 !important;
    width: auto !important;
  }
  .sidebar-divider {
    width: 1px;
    height: 24px;
    margin: auto 0;
    flex-shrink: 0;
  }
  .sidebar-collapse-btn {
    display: none;
  }
  /* No tooltips on mobile */
  .creator-sidebar .sidebar-tab-btn::after {
    display: none !important;
  }
}

@media (max-width: 640px) {
  .feed-list { gap: 10px; }
  .feed-card { border-radius: var(--radius-sm); }
  .media-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 380px) {
  .media-grid { grid-template-columns: 1fr; }
}
