/* second-world.css — Design system for Second World gateway */

:root {
  /* — Color tokens (dark default) — */
  --bg-0: #07050d;
  --bg-1: #0c0917;
  --bg-2: #130e22;
  --surface: rgba(255,255,255,0.04);
  --surface-hi: rgba(255,255,255,0.08);
  --border: rgba(255,255,255,0.10);
  --border-hi: rgba(255,255,255,0.18);
  --text: #ece9f5;
  --text-dim: rgba(236,233,245,0.62);
  --text-mute: rgba(236,233,245,0.38);

  --accent-h: 268;          /* violet */
  --accent-2-h: 195;        /* cyan */
  --accent: oklch(0.72 0.18 var(--accent-h));
  --accent-2: oklch(0.78 0.14 var(--accent-2-h));
  --accent-soft: oklch(0.72 0.18 var(--accent-h) / 0.18);

  --good: oklch(0.78 0.14 155);
  --warn: oklch(0.78 0.16 75);

  /* — Type — */
  --font-display: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
  --font-body: 'Inter', ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* — Radii / shadow — */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 32px;

  --shadow-sm: 0 1px 0 rgba(255,255,255,0.04) inset, 0 4px 12px rgba(0,0,0,0.35);
  --shadow-md: 0 1px 0 rgba(255,255,255,0.06) inset, 0 16px 48px rgba(0,0,0,0.45);
  --shadow-glow: 0 0 60px -10px oklch(0.72 0.18 var(--accent-h) / 0.55);
}

[data-theme="light"] {
  --bg-0: #f4f1ec;
  --bg-1: #ebe7e0;
  --bg-2: #e3ddd2;
  --surface: rgba(255,255,255,0.55);
  --surface-hi: rgba(255,255,255,0.78);
  --border: rgba(15,10,30,0.10);
  --border-hi: rgba(15,10,30,0.18);
  --text: #14101e;
  --text-dim: rgba(20,16,30,0.62);
  --text-mute: rgba(20,16,30,0.38);
}

/* — Reset — */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg-0);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
button { font-family: inherit; }
a { color: inherit; text-decoration: none; }

/* — Cosmic background — */
.cosmos {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 30% 20%, oklch(0.45 0.18 var(--accent-h) / 0.45), transparent 60%),
    radial-gradient(ellipse 70% 50% at 80% 80%, oklch(0.5 0.16 var(--accent-2-h) / 0.35), transparent 60%),
    radial-gradient(ellipse 50% 40% at 50% 50%, oklch(0.4 0.12 320 / 0.25), transparent 70%),
    var(--bg-0);
}
[data-theme="light"] .cosmos {
  background:
    radial-gradient(ellipse 80% 60% at 30% 20%, oklch(0.85 0.10 var(--accent-h) / 0.5), transparent 60%),
    radial-gradient(ellipse 70% 50% at 80% 80%, oklch(0.88 0.08 var(--accent-2-h) / 0.5), transparent 60%),
    var(--bg-0);
}
.stars {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 13% 17%, rgba(255,255,255,0.7), transparent 60%),
    radial-gradient(1px 1px at 47% 31%, rgba(255,255,255,0.5), transparent 60%),
    radial-gradient(1.5px 1.5px at 71% 12%, rgba(255,255,255,0.8), transparent 60%),
    radial-gradient(1px 1px at 83% 53%, rgba(255,255,255,0.5), transparent 60%),
    radial-gradient(1px 1px at 21% 67%, rgba(255,255,255,0.5), transparent 60%),
    radial-gradient(1.5px 1.5px at 38% 84%, rgba(255,255,255,0.7), transparent 60%),
    radial-gradient(1px 1px at 67% 71%, rgba(255,255,255,0.5), transparent 60%),
    radial-gradient(1px 1px at 92% 31%, rgba(255,255,255,0.4), transparent 60%),
    radial-gradient(1px 1px at 8% 46%, rgba(255,255,255,0.6), transparent 60%),
    radial-gradient(1px 1px at 56% 8%, rgba(255,255,255,0.5), transparent 60%);
  opacity: 0.7;
  animation: starTwinkle 8s ease-in-out infinite;
}
[data-theme="light"] .stars { display: none; }
@keyframes starTwinkle {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 0.9; }
}

/* — Glass primitive — */
.glass {
  background: var(--surface);
  border: 0.5px solid var(--border);
  backdrop-filter: blur(28px) saturate(140%);
  -webkit-backdrop-filter: blur(28px) saturate(140%);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
}
.glass-hi {
  background: var(--surface-hi);
  border-color: var(--border-hi);
  box-shadow: var(--shadow-md);
}

/* — Typography helpers — */
.display {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 0.95;
}
.mono { font-family: var(--font-mono); }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-mute);
}

/* — Buttons — */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 18px;
  border-radius: 999px;
  border: 0.5px solid var(--border-hi);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.btn:hover {
  background: var(--surface-hi);
  transform: translateY(-1px);
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0a0612;
  border-color: transparent;
  font-weight: 600;
}
.btn-primary:hover {
  filter: brightness(1.1);
  box-shadow: var(--shadow-glow);
}
.btn-ghost { background: transparent; }

/* — Nav — */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 28px;
  background: linear-gradient(to bottom, rgba(7,5,13,0.6), transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background 0.3s ease;
}
[data-theme="light"] .nav {
  background: linear-gradient(to bottom, rgba(244,241,236,0.7), transparent);
}
.nav.scrolled {
  background: var(--surface);
  border-bottom: 0.5px solid var(--border);
}
.nav-brand { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.nav-status {
  display: inline-flex; align-items: center; gap: 8px;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: oklch(0.55 0.16 155 / 0.10);
  border: 0.5px solid oklch(0.55 0.16 155 / 0.30);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  white-space: nowrap;
}
.nav-status-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 8px var(--good);
  animation: orbPulse 2s ease-in-out infinite;
}
@media (max-width: 880px) { .nav-status { display: none; } }
.nav-brand-text {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.nav-links {
  display: flex; align-items: center; gap: 4px;
}
.nav-link {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.18s ease;
}
.nav-link:hover { color: var(--text); background: var(--surface); }
.nav-link.active { color: var(--text); }

/* — Hero — */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 28px 80px;
  z-index: 2;
  overflow: hidden;
  /* Real starfield from NASA-style equirectangular plate (`assets/stars_equi.jpg`).
     `cover` so it fills any aspect; deep black base shows through the gaps. */
  background-color: #000;
  background-image: url('assets/stars_equi.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  max-width: 980px;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 0.5px solid var(--border);
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 32px;
}
.hero-eyebrow::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 8px var(--good);
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(40px, 7.5vw, 112px);
  letter-spacing: -0.025em;
  line-height: 0.92;
  margin: 0;
  background: linear-gradient(180deg, var(--text) 0%, var(--text) 50%, var(--text-dim) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-title em {
  font-style: normal;
  font-weight: 300;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  margin: 28px auto 0;
  max-width: 580px;
  font-size: 17px;
  line-height: 1.55;
  color: var(--text-dim);
}
.hero-cta {
  margin-top: 40px;
  display: inline-flex;
  gap: 10px;
}

/* — Sun variant: warm in-palette colors. Title is a pale champagne→amber
   gradient — light enough to read against the hot disc, warm enough to
   feel like part of the same scene. Sub copy is a soft warm cream that
   tones down to pair with the title without competing. — */
.hero-content-sun .hero-title em {
  background: linear-gradient(135deg, #fff4d6 0%, #ffd58a 50%, #ffa14a 100%);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter:
    drop-shadow(0 2px 22px rgba(60,10,0,0.55))
    drop-shadow(0 0 28px rgba(255,160,80,0.35));
}
.hero-content-sun .hero-sub {
  color: #fff1da;
  text-shadow:
    0 2px 16px rgba(60,10,0,0.55),
    0 0 22px rgba(255,140,70,0.35);
}
.hero-content-sun .btn-primary {
  background: linear-gradient(135deg, #ffcc33 0%, #ff7a18 50%, #ff3b00 100%);
  color: #1a0500;
  box-shadow:
    0 0 0 1px rgba(255,180,80,0.5),
    0 8px 28px rgba(255,90,30,0.55),
    0 0 60px rgba(255,60,20,0.45);
}
.hero-content-sun .btn-primary:hover {
  filter: brightness(1.08) saturate(1.15);
  box-shadow:
    0 0 0 1px rgba(255,210,120,0.7),
    0 10px 36px rgba(255,90,30,0.7),
    0 0 80px rgba(255,60,20,0.6);
}

/* — Planet — */
.planet-stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  pointer-events: none;
}
.planet-wrap {
  position: relative;
  width: min(720px, 90vw);
  aspect-ratio: 1;
  filter: drop-shadow(0 0 80px oklch(0.6 0.18 var(--accent-h) / 0.6));
}

/* — Section — */
.section {
  position: relative;
  z-index: 2;
  padding: 120px 28px;
  max-width: 1320px;
  margin: 0 auto;
}
.section-head { margin-bottom: 56px; }
.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.6vw, 44px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin: 0 0 16px;
  max-width: 780px;
}
.section-desc {
  max-width: 560px;
  font-size: 16px;
  line-height: 1.55;
  color: var(--text-dim);
}

/* — App grid — */
.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}
.app-grid.featured { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }

.app-card {
  position: relative;
  display: flex; flex-direction: column;
  padding: 0;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 0.5px solid var(--border);
  backdrop-filter: blur(28px) saturate(140%);
  -webkit-backdrop-filter: blur(28px) saturate(140%);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1),
              border-color 0.3s ease, box-shadow 0.3s ease;
  min-height: 220px;
}
.app-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hi);
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.5),
              0 0 0 1px var(--border-hi),
              0 0 80px -20px oklch(0.72 0.18 var(--accent-h) / 0.4);
}
.app-card.locked {
  cursor: default;
}
.app-card-visual {
  position: relative;
  height: 70px;
  overflow: hidden;
  background: linear-gradient(135deg,
    oklch(0.35 0.12 var(--vh, 268)),
    oklch(0.25 0.08 var(--vh, 268)));
  display: flex; align-items: center; justify-content: center;
}
.app-card-visual::after {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.18), transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(0,0,0,0.25), transparent 50%);
}
.app-card-glyph {
  position: relative; z-index: 1;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 400;
  color: rgba(255,255,255,0.92);
  letter-spacing: -0.04em;
}
.app-card-body {
  flex: 1;
  padding: 22px 22px 24px;
  display: flex; flex-direction: column;
  gap: 8px;
}
.app-card-meta {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 4px;
}
.app-card-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin: 0;
}
.app-card-desc {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-dim);
  margin: 0;
  flex: 1;
}
.app-card-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-mute);
}
.app-card-arrow {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--surface-hi);
  border: 0.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.3s ease;
}
.app-card:hover .app-card-arrow {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
  color: #0a0612;
  transform: rotate(-45deg);
}

/* — Lock badge — */
.lock-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.lock-pill.public {
  background: oklch(0.78 0.14 155 / 0.16);
  color: oklch(0.85 0.14 155);
  border: 0.5px solid oklch(0.78 0.14 155 / 0.3);
}
.lock-pill.operator {
  background: oklch(0.72 0.18 var(--accent-h) / 0.16);
  color: oklch(0.85 0.16 var(--accent-h));
  border: 0.5px solid oklch(0.72 0.18 var(--accent-h) / 0.3);
}
.lock-pill.admin {
  background: oklch(0.78 0.16 75 / 0.16);
  color: oklch(0.85 0.14 75);
  border: 0.5px solid oklch(0.78 0.16 75 / 0.3);
}
[data-theme="light"] .lock-pill.public { color: oklch(0.4 0.14 155); }
[data-theme="light"] .lock-pill.operator { color: oklch(0.4 0.18 var(--accent-h)); }
[data-theme="light"] .lock-pill.admin { color: oklch(0.4 0.16 75); }

/* — Hamburger user menu — */
.user-menu-wrap { position: relative; }
.user-menu-btn {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; padding: 9px 11px; cursor: pointer;
  background: var(--surface); border: 0.5px solid var(--border); border-radius: 8px;
  color: var(--text); transition: background 0.15s, border-color 0.15s;
}
.user-menu-btn:hover { background: var(--surface-hi); border-color: var(--border-hi); }
.user-menu-btn span {
  display: block; width: 14px; height: 1.5px;
  background: currentColor; border-radius: 1px;
}
.user-menu-pop {
  position: absolute; top: calc(100% + 8px); right: 0;
  min-width: 168px;
  background: var(--surface); backdrop-filter: blur(16px);
  border: 0.5px solid var(--border-hi); border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  overflow: hidden; z-index: 200;
}
.user-menu-item {
  display: block; width: 100%; padding: 11px 16px; text-align: left;
  background: transparent; border: 0; cursor: pointer;
  color: var(--text); font: 13px/1.4 var(--font-body);
}
.user-menu-item:hover { background: var(--surface-hi); }
.user-menu-divider { height: 0.5px; background: var(--border); }

/* — Locked overlay — */
.locked-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(7,5,13,0.85) 100%);
  display: flex; flex-direction: column;
  align-items: center; justify-content: flex-end;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
[data-theme="light"] .locked-overlay {
  background: linear-gradient(180deg, transparent 30%, rgba(244,241,236,0.92) 100%);
}
.app-card.locked:hover .locked-overlay { opacity: 1; }
.app-card.locked .app-card-visual { filter: grayscale(0.4) brightness(0.7); }

/* — Modal — */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(7,5,13,0.72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0;
  animation: fadeIn 0.25s ease forwards;
}
@keyframes fadeIn { to { opacity: 1; } }
.modal {
  width: 100%; max-width: 440px;
  background: var(--bg-1);
  border: 0.5px solid var(--border-hi);
  border-radius: var(--r-lg);
  padding: 36px 32px 28px;
  box-shadow: 0 40px 120px rgba(0,0,0,0.6);
  transform: translateY(20px) scale(0.96);
  opacity: 0;
  animation: modalIn 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
@keyframes modalIn { to { transform: translateY(0) scale(1); opacity: 1; } }
.modal-title {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: -0.02em;
  margin: 16px 0 8px;
  font-weight: 500;
}
.modal-sub { color: var(--text-dim); font-size: 14px; margin: 0 0 24px; }
.input {
  width: 100%;
  height: 46px;
  padding: 0 16px;
  border-radius: 12px;
  border: 0.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.input:focus { border-color: var(--accent); background: var(--surface-hi); }
.input + .input { margin-top: 10px; }
.modal-actions {
  display: flex; flex-direction: column; gap: 10px;
  margin-top: 22px;
}
.modal-quick {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  margin-bottom: 18px;
}
.modal-quick button {
  height: 38px;
  border-radius: 10px;
  border: 0.5px solid var(--border);
  background: var(--surface);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
}
.modal-quick button:hover { background: var(--surface-hi); color: var(--text); border-color: var(--border-hi); }

/* — About / Profile — */
.profile-hero {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 56px;
  align-items: start;
  padding: 60px 0;
}
@media (max-width: 800px) {
  .profile-hero { grid-template-columns: 1fr; gap: 32px; }
}
.avatar {
  width: 320px; height: 320px;
  border-radius: 50%;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  border: 0.5px solid var(--border-hi);
  box-shadow: var(--shadow-md), var(--shadow-glow);
  position: relative;
  overflow: hidden;
}
.avatar img {
  width: 78%;
  height: 78%;
  object-fit: contain;
  position: relative;
  z-index: 1;
}
.avatar img.avatar-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.avatar::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 25%, rgba(255,255,255,0.35), transparent 55%);
  pointer-events: none;
}
.profile-name {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.0;
  margin: 0 0 8px;
}
.profile-handle {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent);
  margin: 0 0 20px;
}
.profile-bio {
  font-size: 18px;
  line-height: 1.5;
  color: var(--text-dim);
  margin: 0 0 24px;
  max-width: 580px;
}
.profile-meta {
  display: flex; flex-wrap: wrap; gap: 8px 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-mute);
  margin-bottom: 28px;
}
.profile-meta span::before { content: '◇'; margin-right: 8px; color: var(--accent); }

.profile-section { padding: 60px 0; border-top: 0.5px solid var(--border); }
.profile-section h3 {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin: 0 0 28px;
}
.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.now-card {
  padding: 22px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 0.5px solid var(--border);
}
.now-card h4 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
.now-card p { font-size: 13.5px; line-height: 1.5; color: var(--text-dim); margin: 0; }

.role-list { list-style: none; padding: 0; margin: 0; }
.role-list li {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
  padding: 10px 0;
  border-bottom: 0.5px solid var(--border);
  font-size: 14px;
}
.role-list li:last-child { border-bottom: none; }
.role-co {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.005em;
}
.role-title { font-size: 13.5px; color: var(--text-dim); line-height: 1.5; }
@media (max-width: 640px) {
  .role-list li { grid-template-columns: 1fr; gap: 4px; }
}

.skill-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 0.5px solid var(--border);
  font-size: 12.5px;
  color: var(--text-dim);
}
.chip.accent {
  background: var(--accent-soft);
  color: oklch(0.85 0.16 var(--accent-h));
  border-color: oklch(0.72 0.18 var(--accent-h) / 0.3);
}

.social-row { display: flex; flex-wrap: wrap; gap: 10px; }
.social-link {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--surface);
  border: 0.5px solid var(--border);
  font-size: 13px;
  font-family: var(--font-mono);
  cursor: pointer;
  transition: all 0.2s ease;
}
.social-link:hover { background: var(--surface-hi); border-color: var(--border-hi); transform: translateY(-1px); }

/* — Admin dashboard — */
.admin-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
  padding-top: 100px;
  min-height: 100vh;
}
@media (max-width: 840px) {
  .admin-shell { grid-template-columns: 1fr; }
}
.admin-side {
  position: sticky; top: 100px;
  align-self: start;
  padding: 22px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 0.5px solid var(--border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.admin-side h4 {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin: 0 0 12px;
}
.admin-nav-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  cursor: pointer;
  color: var(--text-dim);
  transition: all 0.18s ease;
  margin-bottom: 2px;
}
.admin-nav-item:hover { background: var(--surface-hi); color: var(--text); }
.admin-nav-item.active {
  background: linear-gradient(135deg,
    oklch(0.72 0.18 var(--accent-h) / 0.2),
    oklch(0.78 0.14 var(--accent-2-h) / 0.15));
  color: var(--text);
  border: 0.5px solid var(--border-hi);
}
.admin-nav-count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-mute);
}
.admin-main {
  padding-bottom: 80px;
}

.panel {
  padding: 28px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 0.5px solid var(--border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  margin-bottom: 18px;
}
.panel h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
}
.panel-sub { color: var(--text-dim); font-size: 13.5px; margin: 0 0 24px; }

.field-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 20px;
  align-items: start;
  padding: 14px 0;
  border-bottom: 0.5px solid var(--border);
}
.field-row:last-child { border-bottom: none; }
.field-row label {
  font-size: 12.5px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  padding-top: 12px;
}
.field-row .input { width: 100%; }
.textarea {
  width: 100%;
  min-height: 90px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 0.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  resize: vertical;
  outline: none;
}
.textarea:focus { border-color: var(--accent); }

/* Members & permission table */
.member-row {
  display: grid;
  grid-template-columns: 220px 1fr 100px;
  gap: 16px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 0.5px solid var(--border);
}
.member-row:last-child { border-bottom: none; }
.member-id {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: -0.01em;
}
.mini-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  color: #0a0612;
  overflow: hidden;
}
.mini-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.access-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.access-tag {
  padding: 4px 10px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  background: var(--surface-hi);
  border: 0.5px solid var(--border);
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
}
.access-tag.on {
  background: oklch(0.72 0.18 var(--accent-h) / 0.22);
  color: oklch(0.9 0.14 var(--accent-h));
  border-color: oklch(0.72 0.18 var(--accent-h) / 0.4);
}
[data-theme="light"] .access-tag.on { color: oklch(0.4 0.18 var(--accent-h)); }
.role-tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-mute);
  text-align: right;
}

/* — Footer — */
.footer {
  padding: 80px 28px 60px;
  text-align: center;
  position: relative;
  z-index: 2;
  border-top: 0.5px solid var(--border);
  margin-top: 80px;
}
.footer-mark {
  display: inline-flex; align-items: center; gap: 12px;
  margin-bottom: 24px;
}
.footer-text {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--text-mute);
}

/* — Toggle — */
.theme-toggle, .lang-toggle, .nav-seg {
  display: inline-flex;
  align-items: center;
  gap: 0;
  height: 30px;
  padding: 3px;
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  box-sizing: border-box;
}
.theme-toggle button, .lang-toggle button, .nav-seg button {
  background: transparent;
  border: 0;
  height: 100%;
  padding: 0 11px;
  border-radius: 999px;
  color: var(--text-mute);
  cursor: pointer;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: all 0.18s ease;
  font: inherit;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}
.theme-toggle button.on, .lang-toggle button.on, .nav-seg button.on {
  background: var(--surface-hi);
  color: var(--text);
}

/* — Nav controls cluster (right side of the nav) — */
.nav-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
/* Round pill button (theme toggle, sign-out shortcut) — same height as nav-status */
.nav-pill-btn {
  height: 30px;
  min-width: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 0.5px solid var(--border);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s ease;
  box-sizing: border-box;
}
.nav-pill-btn:hover {
  background: var(--surface-hi);
  color: var(--text);
}
/* Primary sign-in pill — same height, accent fill */
.nav-signin {
  height: 30px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--accent);
  border: 0.5px solid transparent;
  color: oklch(0.18 0.04 280);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  transition: all 0.18s ease;
  box-sizing: border-box;
}
.nav-signin:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

/* — Scroll reveal — */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.2, 0.7, 0.2, 1),
              transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.reveal.in {
  opacity: 1 !important;
  transform: none !important;
}
/* Failsafe: if JS / IntersectionObserver fails for any reason, content is still visible after a beat */
@media (prefers-reduced-motion: no-preference) {
  .reveal { animation: revealFallback 0.01s linear 1.2s forwards; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}
@keyframes revealFallback {
  to { opacity: 1; transform: none; }
}

/* — Stats strip — */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 0.5px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin: 60px 0 20px;
}
.stat {
  padding: 28px 24px;
  background: var(--bg-1);
}
.stat-num {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 400;
  letter-spacing: -0.03em;
  margin-bottom: 4px;
}
.stat-lbl {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-mute);
}

/* — Misc — */
.divider {
  height: 0.5px; background: var(--border);
  margin: 32px 0;
}
.tabs {
  display: inline-flex;
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 32px;
}
.tab {
  padding: 8px 18px;
  border: 0;
  background: transparent;
  color: var(--text-dim);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.tab.on {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0a0612;
}

.kbd {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--surface-hi);
  border: 0.5px solid var(--border);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
}

/* — Toast — */
.toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 12px 20px;
  background: var(--bg-1);
  border: 0.5px solid var(--border-hi);
  border-radius: 999px;
  font-size: 13px;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ─── Sun (hero variant: orb) — 3D spherical, equirectangular texture ──── */
.sun-stage {
  /* Cap to viewport height so the sphere never overflows the hero on
     short windows. Sized at 80% of the previous footprint so the sphere
     reads as a celestial body, not a wall.                              */
  width: min(420px, 56vw, 56vh);
  aspect-ratio: 1;
  position: relative;
}
.sun-corona-outer, .sun-corona-mid, .sun-corona-rim {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.sun-corona-outer {
  /* Soft far halo — brighter and reaching further out so the sphere sits
     in a wider, warmer atmosphere. */
  inset: -34%;
  background: radial-gradient(circle,
    rgba(255,180,80,0.55) 0%,
    rgba(255,130,45,0.32) 30%,
    rgba(230,70,20,0.16) 56%,
    rgba(200,40,10,0.06) 74%,
    transparent 92%);
  filter: blur(44px);
  animation: sunBreathe 5.5s ease-in-out infinite;
}
.sun-corona-mid {
  /* Pumped-up middle wash — more luminance, slightly wider falloff. */
  inset: -16%;
  background: radial-gradient(circle,
    rgba(255,200,110,0.62) 0%,
    rgba(255,140,55,0.36) 38%,
    rgba(255,90,30,0.14) 62%,
    transparent 86%);
  filter: blur(18px);
  animation: sunBreathe 7s ease-in-out infinite reverse;
}
/* Tight bright rim hugging the sphere's silhouette. The radial stops are
   intentionally hard inside the rim band so the limb reads as a glowing
   ring, then fades out cleanly past the body.                            */
.sun-corona-rim {
  inset: -6%;
  background: radial-gradient(circle,
    transparent 0%,
    transparent 40%,
    rgba(255,170,70,0.55) 47%,
    rgba(255,110,30,0.45) 52%,
    rgba(255,80,20,0.18) 60%,
    transparent 78%);
  filter: blur(6px);
  mix-blend-mode: screen;
  animation: sunBreathe 6s ease-in-out infinite;
}

/* Three.js canvas sits inside .sun-stage above the corona divs. No extra
   drop-shadow — the in-shader rim and the toned-down corona divs handle
   all the glow, so the sphere edge stays crisp instead of bleeding into
   a wide orange halo (which read as a "ring/border" before).            */
.sun-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

@keyframes sunBreathe {
  0%, 100% { transform: scale(1);     opacity: 1; }
  50%      { transform: scale(1.045); opacity: 0.82; }
}
