:root {
  --bg: #0A0612;
  --panel: #140C22;
  --panel-2: #0E081A;
  --line: #2B1F42;
  --line-soft: #1E1530;
  --text: #F2EEFA;
  --muted: #A79BC0;
  --muted-2: #6F6289;

  --accent-1: #9333EA;
  --accent-2: #E1157A;
  --accent-soft: #221333;
  --accent-text: #D8AFFF;

  --online: #3BA55C;
  --idle: #F0B429;
  --dnd: #ED4245;
  --offline: #6B7280;

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-sans: "Inter", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --grad: linear-gradient(115deg, var(--accent-1), var(--accent-2));

  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 10px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

.mono { font-family: var(--font-mono); }
.muted { color: var(--muted); }
.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.grad-dot { color: var(--accent-2); }

.page-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background: var(--bg);
}
.page-bg video, .page-bg img.bg-gif {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.16;
}
.page-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 42px 42px;
  opacity: 0.35;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.6), transparent 65%);
}
.page-bg .blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
}
.page-bg .blob-1 {
  width: 640px; height: 640px;
  top: -220px; right: -160px;
  background: radial-gradient(circle, var(--accent-1), transparent 70%);
  opacity: 0.28;
}
.page-bg .blob-2 { display: none; }
.page-bg .scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,6,18,0.5), rgba(10,6,18,0.94) 62%, var(--bg));
}

.sound-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 10px 16px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
}
.sound-btn:hover { border-color: var(--accent-1); color: var(--accent-text); }
.sound-btn svg { width: 16px; height: 16px; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

.nav-outer { padding: 0; position: relative; z-index: 10; }
.nav {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line-soft);
  padding: 20px 24px;
}
.nav-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.nav-avatar {
  width: 30px; height: 30px;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--panel-2);
  border: 1px solid var(--line);
  flex-shrink: 0;
}
.nav-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nav-name { font-family: var(--font-display); font-weight: 700; font-size: 1rem; letter-spacing: -0.01em; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 6px 12px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.nav-links a svg { width: 14px; height: 14px; }
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--accent-text); border-color: var(--accent-1); }
.nav-links a.locked { color: var(--muted-2); }

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: start;
  padding: 64px 0 56px;
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; padding: 40px 0; }
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--r-sm);
  margin-bottom: 22px;
}
.badge .pip {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-1);
}

.hero-copy h1 {
  font-family: var(--font-display);
  font-size: 3.1rem;
  line-height: 1.06;
  font-weight: 700;
  margin: 0 0 18px;
  letter-spacing: -0.02em;
}
@media (max-width: 560px) { .hero-copy h1 { font-size: 2.2rem; } }

.hero-copy .lead {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
  max-width: 52ch;
  margin: 0 0 28px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--r-md);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: opacity 0.15s ease, border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn svg { width: 15px; height: 15px; }
.btn-grad { background: var(--grad); color: #fff; }
.btn-grad:hover { opacity: 0.88; }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--accent-1); color: var(--accent-text); }
.btn-ghost.locked { color: var(--muted-2); }
.btn-wide { width: 100%; justify-content: center; }

.profile-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent-1);
  border-radius: var(--r-lg);
  padding: 22px;
}
.profile-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--accent-text);
  margin: 0 0 14px;
}
.profile-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.avatar-glow {
  width: 56px; height: 56px;
  border-radius: var(--r-md);
  padding: 2px;
  background: var(--grad);
  flex-shrink: 0;
}
.avatar-glow span {
  display: block;
  width: 100%; height: 100%;
  border-radius: calc(var(--r-md) - 2px);
  overflow: hidden;
  background: var(--panel-2);
}
.avatar-glow img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile-head h2 { font-family: var(--font-display); margin: 0 0 2px; font-size: 1.1rem; font-weight: 700; }
.profile-head p { margin: 0; font-size: 0.86rem; color: var(--muted); }

.status-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.status-widget {
  background: var(--panel-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-sm);
  padding: 12px;
  min-height: 78px;
}
.status-top { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.status-mini-avatar {
  position: relative;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--panel);
  border: 1px solid var(--line);
  overflow: hidden;
  flex-shrink: 0;
}
.status-mini-avatar img { width: 100%; height: 100%; object-fit: cover; }
.status-mini-avatar .pip {
  position: absolute;
  bottom: -1px; right: -1px;
  width: 8px; height: 8px;
  border-radius: 50%;
  border: 2px solid var(--panel-2);
}
.status-icon {
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent-text);
}
.status-icon svg { width: 16px; height: 16px; }
.status-label { font-family: var(--font-mono); font-size: 0.78rem; font-weight: 500; color: var(--muted); }
.status-value { font-size: 0.86rem; font-weight: 700; margin: 0; }
.status-sub { font-size: 0.74rem; color: var(--muted-2); margin: 4px 0 0; }

.pip-online { background: var(--online); }
.pip-idle { background: var(--idle); }
.pip-dnd { background: var(--dnd); }
.pip-offline { background: var(--offline); }
.val-online { color: var(--online); }
.val-idle { color: var(--idle); }
.val-dnd { color: var(--dnd); }
.val-offline { color: var(--muted); }
.val-active { color: var(--accent-text); }

.tagline-bar {
  border-top: 1px solid var(--line-soft);
  padding: 12px 2px 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.section { padding: 40px 0; border-top: 1px solid var(--line-soft); }
.section.no-border { border-top: none; }
.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--accent-text);
  margin: 0 0 10px;
}
.section h2 { font-family: var(--font-display); font-size: 1.85rem; font-weight: 700; margin: 0 0 10px; letter-spacing: -0.015em; }
.section .lead { color: var(--muted); font-size: 0.98rem; max-width: 60ch; margin: 0 0 32px; }
.section.centered { text-align: center; }
.section.centered .lead { margin-left: auto; margin-right: auto; }
.section-icon {
  width: 44px; height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent-text);
  margin: 0 auto 18px;
}
.section-icon svg { width: 20px; height: 20px; }

.community-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 700px) { .community-grid { grid-template-columns: 1fr; } }
.community-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent-2);
  border-radius: var(--r-md);
  padding: 18px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.community-thumb {
  width: 58px; height: 58px;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--panel-2);
  border: 1px solid var(--line);
  flex-shrink: 0;
}
.community-thumb span { display: block; width: 100%; height: 100%; }
.community-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.community-body h3 { font-family: var(--font-display); margin: 0 0 2px; font-size: 1.02rem; font-weight: 700; }
.community-body .role { margin: 0 0 12px; font-family: var(--font-mono); font-size: 0.8rem; color: var(--accent-text); font-weight: 500; }

.project-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 700px) { .project-grid { grid-template-columns: 1fr; } }
.project-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent-1);
  border-radius: var(--r-md);
  padding: 22px;
}
.project-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 16px; }
.icon-box {
  width: 38px; height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent-text);
}
.icon-box svg { width: 18px; height: 18px; }
.icon-box-btn {
  width: 32px; height: 32px;
  border-radius: var(--r-sm);
  background: var(--panel-2);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
  text-decoration: none;
}
.icon-box-btn:hover { color: var(--accent-text); border-color: var(--accent-1); }
.icon-box-btn svg { width: 15px; height: 15px; }
.project-card h3 { font-family: var(--font-display); margin: 0 0 8px; font-size: 1.08rem; font-weight: 700; }
.project-card p { margin: 0 0 18px; color: var(--muted); font-size: 0.9rem; line-height: 1.55; }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.tag-pill {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--muted);
  background: var(--panel-2);
  border: 1px solid var(--line-soft);
  padding: 4px 10px;
  border-radius: var(--r-sm);
}
.lock-row {
  border-top: 1px solid var(--line-soft);
  padding-top: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted-2);
}
.lock-row svg { width: 13px; height: 13px; }

.notice-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.84rem;
  margin-top: 24px;
}
.notice-bar svg { width: 15px; height: 15px; color: var(--accent-text); flex-shrink: 0; }

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; max-width: 900px; margin: 0 auto; }
@media (max-width: 700px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent-2);
  border-radius: var(--r-md);
  padding: 24px;
}
.contact-card .icon-box { margin-bottom: 18px; }
.contact-card .section-eyebrow { margin-bottom: 8px; }
.contact-card h3 { font-family: var(--font-display); margin: 0 0 10px; font-size: 1.25rem; font-weight: 700; }
.contact-card p { margin: 0 0 20px; color: var(--muted); font-size: 0.92rem; line-height: 1.55; }

.back-wrap { text-align: center; margin-top: 40px; }

.login-wrap { display: flex; justify-content: center; padding: 70px 0; }
.login-card {
  width: 100%; max-width: 380px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent-1);
  border-radius: var(--r-lg);
  padding: 30px 26px;
  text-align: center;
}
.login-card .icon-box { margin: 0 auto 16px; width: 48px; height: 48px; }
.login-card .icon-box svg { width: 22px; height: 22px; }
.login-card h1 { font-family: var(--font-display); font-size: 1.35rem; margin: 0 0 8px; }
.login-card p.lead { font-size: 0.88rem; margin: 0 0 22px; }
.field {
  width: 100%;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 11px 14px;
  color: var(--text);
  font-size: 0.9rem;
  margin-bottom: 12px;
  font-family: var(--font-sans);
}
.field::placeholder { color: var(--muted-2); }
.login-back { display: block; margin-top: 16px; font-size: 0.85rem; color: var(--muted); text-decoration: none; }
.login-back:hover { color: var(--accent-text); }

.foot {
  border-top: 1px solid var(--line-soft);
  padding: 26px 0 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}
.foot-copy { font-family: var(--font-mono); font-size: 0.82rem; color: var(--muted-2); }
.foot-social { display: flex; gap: 8px; }
.foot-social a {
  width: 32px; height: 32px;
  border-radius: var(--r-sm);
  background: var(--panel);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
  text-decoration: none;
}
.foot-social a svg { width: 15px; height: 15px; }
.foot-social a:hover { color: var(--accent-text); border-color: var(--accent-1); }

main.frame { position: relative; z-index: 1; }

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent-1);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

.fit-tabs { display: flex; gap: 6px; margin-bottom: 22px; flex-wrap: wrap; }
.fit-tab {
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.86rem;
  font-weight: 500;
  padding: 9px 16px;
  border-radius: var(--r-sm);
  cursor: pointer;
}
.fit-tab.is-active { color: var(--accent-text); border-color: var(--accent-1); background: var(--accent-soft); }

.fit-progress {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 24px;
  color: var(--muted); font-family: var(--font-mono); font-size: 0.82rem;
}
.fit-progress-track {
  flex: 1; height: 6px; border-radius: 999px;
  background: var(--panel-2); border: 1px solid var(--line-soft); overflow: hidden;
}
.fit-progress-fill { height: 100%; background: var(--grad); width: 0%; transition: width 0.25s ease; }

.fit-panel { display: none; }
.fit-panel.is-active { display: block; }

.fit-group { margin-bottom: 28px; }
.fit-group h3 { font-family: var(--font-display); font-size: 1rem; font-weight: 700; margin: 0 0 12px; color: var(--accent-text); }

.fit-item {
  display: grid;
  grid-template-columns: 22px 1.3fr 0.5fr 0.9fr;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-sm);
  background: var(--panel);
  margin-bottom: 8px;
}
.fit-item.is-done { opacity: 0.5; }
.fit-item.is-done .fit-item-title { text-decoration: line-through; }
@media (max-width: 700px) {
  .fit-item { grid-template-columns: 22px 1fr; }
  .fit-item-sets, .fit-item-weight { grid-column: 2; font-size: 0.8rem; }
}

.fit-check {
  appearance: none;
  width: 19px; height: 19px;
  border-radius: 4px;
  border: 1.5px solid var(--line);
  background: var(--panel-2);
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
}
.fit-check:checked { background: var(--grad); border-color: transparent; }
.fit-check:checked::after {
  content: "";
  position: absolute; left: 6px; top: 2px;
  width: 5px; height: 9px;
  border: solid #fff; border-width: 0 2px 2px 0;
  transform: rotate(40deg);
}

.fit-item-title { font-size: 0.92rem; font-weight: 600; }
.fit-item-sub { display: block; font-size: 0.78rem; color: var(--muted-2); font-weight: 500; margin-top: 2px; }
.fit-item-sets, .fit-item-weight { font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); }

.fit-reset {
  background: none; border: none; color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 0.78rem; text-decoration: underline; cursor: pointer;
  padding: 0; margin-top: 6px;
}
.fit-reset:hover { color: var(--accent-text); }
