:root {
  --bg: #111318;
  --panel: #181b22;
  --panel-2: #1e222b;
  --fg: #eaedf2;
  --muted: rgba(234, 237, 242, 0.62);
  --line: rgba(255, 255, 255, 0.06);
  --gold: #f4c24f;
  --cyan: #48c8ff;
  --accent: #48c8ff;
  --accent-dim: rgba(72, 200, 255, 0.14);
  --ok: #23a55a;
  --bad: #f87171;
  --font: "Inter", system-ui, sans-serif;
}

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

html {
  color-scheme: dark;
}

body {
  min-height: 100vh;
  font-family: var(--font);
  color: var(--fg);
  background:
    radial-gradient(circle at top left, rgba(244, 194, 79, 0.08), transparent 26%),
    radial-gradient(circle at top right, rgba(72, 200, 255, 0.08), transparent 30%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.g {
  color: var(--gold);
}

.c {
  color: var(--cyan);
}

.cta,
.ghost-btn,
.join-block .primary,
.dash-user button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 46px;
  padding: 0 1.35rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.9rem;
  font-family: var(--font);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.cta,
.join-block .primary {
  background: var(--gold);
  color: #1a1508;
  border: 1.5px solid var(--gold);
  box-shadow: 0 6px 18px rgba(244, 194, 79, 0.18);
}

.cta:hover,
.join-block .primary:hover {
  transform: translateY(-1px);
  background: #f0b83a;
  border-color: #f0b83a;
  box-shadow: 0 8px 22px rgba(244, 194, 79, 0.26);
}

.landing .cta-ghost,
.ghost-btn,
.dash-user button {
  background: transparent;
  color: var(--fg);
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  box-shadow: none;
}

.landing .cta-ghost:hover,
.ghost-btn:hover,
.dash-user button:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.28);
}

.dash-logout-btn {
  padding-inline: 1rem;
  border-radius: 12px;
}

.page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1.25rem;
}

.status,
.preview-nav,
.legal {
  width: min(100%, 34rem);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.6rem;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

.status .mark {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin-bottom: 1.25rem;
  font-size: 1.15rem;
  border: 1px solid var(--line);
}

.status .mark.ok {
  background: rgba(35, 165, 90, 0.12);
  color: var(--ok);
  border-color: rgba(35, 165, 90, 0.25);
}

.status .mark.bad {
  background: rgba(248, 113, 113, 0.12);
  color: var(--bad);
  border-color: rgba(248, 113, 113, 0.25);
}

.status .mark.warn {
  background: rgba(244, 194, 79, 0.12);
  color: var(--gold);
  border-color: rgba(244, 194, 79, 0.25);
}

.status h1,
.preview-nav h1,
.legal h1,
.dash-main h1 {
  font-size: clamp(1.8rem, 4vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: 0.75rem;
}

.status p,
.status .body,
.preview-nav p,
.legal p,
.legal li,
.dash-main .sub,
.join-block .sub {
  color: var(--muted);
  line-height: 1.65;
  font-size: 0.95rem;
}

.status .hint,
.legal-contact,
.dash-foot {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: 0.84rem;
  color: var(--muted);
}

.landing {
  min-height: 100vh;
}

.land-top,
.dash-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
  background: rgba(17, 19, 24, 0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.land-top-brand,
.dash-header .brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.dash-user {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.dash-user-card {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  height: 46px;
  padding: 0.35rem 0.8rem 0.35rem 0.4rem;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.dash-user-avatar {
  position: relative;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.dash-user-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.dash-user-avatar::after {
  content: "";
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ok);
  border: 2px solid rgba(24, 27, 34, 0.98);
  box-shadow: 0 0 0 1px rgba(35, 165, 90, 0.22);
}

.dash-user-avatar-fallback {
  display: inline-grid;
  place-items: center;
  font-size: 0.9rem;
  font-weight: 800;
  color: #101318;
  background: linear-gradient(135deg, var(--gold), var(--cyan));
}

.dash-user-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.1;
}

.dash-user-name {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--fg);
}

.dash-user-role {
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.dash-header .brand-logo,
.brand-logo {
  display: block;
  object-fit: contain;
  border-radius: 50%;
}

.brand-chip.brand-logo {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.land-top-brand .brand-logo {
  width: 36px;
  height: 36px;
}

.land-logo.brand-logo {
  width: clamp(128px, 16vw, 180px);
  height: clamp(128px, 16vw, 180px);
  margin: 0 auto 1rem;
  filter: drop-shadow(0 0 28px rgba(72, 200, 255, 0.18));
}

.brand-logo.dim {
  opacity: 0.35;
  filter: grayscale(0.4) drop-shadow(0 0 22px rgba(72, 200, 255, 0.1));
}

.land-top-nav {
  display: flex;
  gap: 1.6rem;
}

.land-top-nav a {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(234, 237, 242, 0.72);
}

.land-top-nav a:hover {
  color: var(--fg);
}

.land-hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 88px 1.5rem 5rem;
  overflow: hidden;
  text-align: center;
}

.land-hero-bg,
.land-hero-canvas {
  position: absolute;
  inset: 0;
}

.land-hero-glow {
  position: absolute;
  left: 50%;
  top: 44%;
  width: min(70vw, 34rem);
  height: min(70vw, 34rem);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(244, 194, 79, 0.16), transparent 58%);
  filter: blur(8px);
  animation: pulse 5s ease-in-out infinite;
}

.land-hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 20%, transparent 75%);
}

.land-hero-copy {
  position: relative;
  z-index: 1;
  width: min(100%, 44rem);
}

.land-logo {
  filter: drop-shadow(0 0 28px rgba(72, 200, 255, 0.18));
}

.land-brand {
  font-size: clamp(2.9rem, 8vw, 4.8rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
  margin-bottom: 1rem;
}

.land-tag {
  font-size: clamp(1.05rem, 2.4vw, 1.2rem);
  font-weight: 700;
  margin-bottom: 0.65rem;
}

.land-lead {
  max-width: 40rem;
  margin: 0 auto 2rem;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.land-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.land-cta .cta {
  min-width: 190px;
}

.land-block {
  padding: 4.5rem clamp(1.25rem, 4vw, 3rem);
  background: var(--panel);
}

.land-block-alt {
  background: var(--bg);
}

.land-block-inner {
  width: min(100%, 68rem);
  margin: 0 auto;
}

.land-block h2 {
  text-align: center;
  font-size: clamp(1.55rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.55rem;
}

.land-block-lead {
  max-width: 40rem;
  margin: 0 auto 2rem;
  text-align: center;
  color: var(--muted);
  line-height: 1.65;
}

.land-steps,
.land-points {
  list-style: none;
  display: grid;
  gap: 1rem;
}

.land-steps {
  grid-template-columns: repeat(3, 1fr);
}

.land-points {
  grid-template-columns: repeat(2, 1fr);
}

.land-steps li,
.land-points li,
.guild-list li,
.join-block,
.dash-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.land-steps li {
  display: grid;
  grid-template-columns: 2.4rem 1fr;
  gap: 0.95rem;
  padding: 1.45rem;
}

.land-steps .n {
  color: var(--gold);
  font-weight: 800;
  font-size: 0.9rem;
}

.land-steps strong {
  display: block;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.land-steps p,
.land-points li {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.land-steps code,
.legal code,
.empty code {
  color: var(--gold);
  background: rgba(244, 194, 79, 0.08);
  padding: 0.12rem 0.4rem;
  border-radius: 4px;
}

.land-points li {
  padding: 1.3rem 1.4rem;
}

.land-foot {
  padding: 1.8rem clamp(1.25rem, 4vw, 3rem);
  border-top: 1px solid var(--line);
  background: var(--bg);
}

.land-foot-inner {
  width: min(100%, 68rem);
  margin: 0 auto;
}

.land-foot-brand {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 0.65rem;
}

.land-foot-credits {
  color: var(--muted);
  font-size: 0.84rem;
  margin-bottom: 1rem;
}

.land-foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem 1.25rem;
  font-size: 0.84rem;
  color: rgba(234, 237, 242, 0.62);
}

.land-foot-links a:hover,
.legal-back a:hover,
.preview-nav a:hover {
  color: var(--gold);
}

.dash {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.dash-main {
  width: min(100%, 1080px);
  margin: 0 auto;
  padding: 96px clamp(1.25rem, 4vw, 2rem) 4rem;
}

.guild-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.guild-list li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem 1.5rem;
  padding: 1.2rem 1.25rem;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.guild-list li:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.12);
}

.guild-list .name {
  font-weight: 700;
  font-size: 1rem;
}

.guild-list .id {
  font-size: 0.8rem;
  color: var(--muted);
}

.guild-list .count {
  grid-row: 1 / 3;
  grid-column: 2;
  text-align: right;
  align-self: center;
  color: var(--gold);
  font-size: 1.45rem;
  font-weight: 800;
}

.guild-list .count span {
  display: block;
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.7rem;
  text-transform: uppercase;
}

.join-block,
.dash-card {
  margin-top: 2rem;
  padding: 1.5rem;
}

.join-block h2,
.dash-card h2,
.legal h2 {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.45rem;
}

.join-block label {
  display: block;
  margin: 0.9rem 0 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.join-block select,
.captcha-form input {
  width: 100%;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--fg);
  padding: 0.75rem 0.85rem;
  font: inherit;
}

#joinResult,
.empty,
.preview-nav a small {
  color: var(--muted);
}

.preview-nav ul {
  list-style: none;
}

.preview-nav a {
  display: block;
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--line);
  font-weight: 700;
}

.preview-nav a small {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.82rem;
}

.verify-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1.25rem;
  position: relative;
  overflow: hidden;
  text-align: center;
}

.verify-screen::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 42rem;
  height: 42rem;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(244, 194, 79, 0.12), transparent 68%);
  animation: pulse 3.2s ease-in-out infinite;
}

.verify-particles {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.verify-inner {
  position: relative;
  z-index: 1;
  width: min(100%, 28rem);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.75rem;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
}

.verify-loading.hide,
.verify-result {
  display: none;
}

.verify-result.show {
  display: block;
}

.logo-glow {
  position: absolute;
  left: 50%;
  top: 1.8rem;
  width: 8rem;
  height: 8rem;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(72, 200, 255, 0.28), transparent 70%);
  filter: blur(8px);
}

.verify-logo.brand-logo,
.captcha-logo.brand-logo {
  display: block;
  margin: 0 auto 1rem;
  filter: drop-shadow(0 0 22px rgba(72, 200, 255, 0.2));
}

.verify-logo.brand-logo {
  width: 88px;
  height: 88px;
}

.captcha-logo.brand-logo {
  width: 64px;
  height: 64px;
}

.verify-brand {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 1rem;
}

.verify-pct {
  color: var(--gold);
  font-size: 1.55rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.verify-checklist {
  list-style: none;
  width: min(100%, 15rem);
  margin: 0 auto 1.2rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.verify-checklist li {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.verify-checklist .dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
}

.verify-checklist li.current {
  color: var(--fg);
}

.verify-checklist li.current .dot {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(72, 200, 255, 0.2);
}

.verify-checklist li.done {
  color: var(--ok);
}

.verify-checklist li.done .dot {
  background: var(--ok);
  border-color: var(--ok);
}

.verify-bar {
  width: min(100%, 15rem);
  height: 6px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  overflow: hidden;
}

.verify-bar > i {
  display: block;
  height: 100%;
}

.verify-bar.determinate > i {
  width: 0%;
  background: linear-gradient(90deg, rgba(72, 200, 255, 0.4), var(--gold));
  transition: width 0.12s linear;
}

.verify-hint-live,
.captcha-counter {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.84rem;
}

.captcha-form {
  margin-top: 1.1rem;
  display: grid;
  gap: 0.7rem;
}

.captcha-submit {
  width: 100%;
  margin-top: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border: none;
  cursor: pointer;
  min-height: 2.75rem;
}

.captcha-submit:disabled {
  cursor: wait;
  opacity: 0.92;
}

.captcha-btn-spinner {
  display: none;
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(0, 0, 0, 0.18);
  border-top-color: rgba(0, 0, 0, 0.72);
  border-radius: 50%;
  animation: captcha-spin 0.75s linear infinite;
}

.captcha-submit.is-loading .captcha-btn-spinner {
  display: inline-block;
}

@keyframes captcha-spin {
  to {
    transform: rotate(360deg);
  }
}

.captcha-err {
  color: var(--bad) !important;
}

.result-badge {
  width: 2.25rem;
  height: 2.25rem;
  margin: 0 auto 1rem;
  border-radius: 50%;
  display: none;
  place-items: center;
  font-size: 1rem;
  border: 1px solid var(--line);
}

.result-badge.ok,
.result-badge.bad {
  display: grid;
}

.result-badge.ok {
  background: rgba(35, 165, 90, 0.12);
  color: var(--ok);
  border-color: rgba(35, 165, 90, 0.25);
}

.result-badge.bad {
  background: rgba(248, 113, 113, 0.12);
  color: var(--bad);
  border-color: rgba(248, 113, 113, 0.25);
}

.legal-page {
  align-items: start;
}

.legal {
  width: min(100%, 52rem);
  margin-top: 96px;
}

.legal-back {
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
}

.legal-back a {
  color: var(--muted);
}

.legal-updated {
  margin-bottom: 1.5rem;
  color: var(--muted);
  font-size: 0.84rem;
}

.legal ul {
  margin: 0.5rem 0 1rem 1.15rem;
  display: grid;
  gap: 0.4rem;
}

.legal strong {
  color: var(--fg);
}

.chart {
  display: flex;
  align-items: flex-end;
  gap: 0.35rem;
  height: 8rem;
  margin-top: 1rem;
}

.chart .bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 0.35rem;
}

.chart .bar i {
  display: block;
  width: 100%;
  min-height: 2px;
  background: linear-gradient(180deg, var(--gold), rgba(72, 200, 255, 0.25));
  border-radius: 3px 3px 0 0;
}

.chart .bar span,
.status-list li,
.jobs-table,
.pill {
  font-size: 0.82rem;
}

.status-list {
  list-style: none;
  margin-top: 1rem;
  display: grid;
  gap: 0.55rem;
}

.status-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.status-list strong {
  color: var(--fg);
}

.jobs-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.jobs-table th,
.jobs-table td {
  text-align: left;
  padding: 0.55rem 0.35rem;
  border-bottom: 1px solid var(--line);
}

.jobs-table th {
  color: var(--muted);
}

.pill {
  display: inline-block;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  background: var(--panel-2);
  border: 1px solid var(--line);
}

.pill-completed {
  color: var(--ok);
}

.pill-running,
.pill-pending,
.pill-queued {
  color: var(--cyan);
}

.pill-scheduled,
.pill-awaiting_confirm {
  color: #a78bfa;
}

.pill-cancelled,
.pill-failed {
  color: var(--bad);
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.6;
    transform: translate(-50%, -50%) scale(0.94);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.04);
  }
}

@media (max-width: 900px) {
  .land-steps,
  .land-points {
    grid-template-columns: 1fr;
  }

  .dash-main {
    width: min(100%, 760px);
  }
}

@media (max-width: 640px) {
  .land-top,
  .dash-header {
    height: 56px;
  }

  .dash-header {
    height: auto;
    gap: 0.8rem;
    align-items: flex-start;
    flex-direction: column;
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
  }

  .dash-user {
    width: 100%;
    justify-content: space-between;
  }

  .dash-user-card {
    flex: 1 1 auto;
    max-width: calc(100% - 126px);
  }

  .land-top-nav {
    gap: 0.8rem;
  }

  .land-top-nav a {
    font-size: 0.74rem;
  }

  .land-hero,
  .dash-main {
    padding-top: 84px;
  }

  .land-cta {
    flex-direction: column;
  }

  .land-cta .cta {
    width: 100%;
  }

  .land-steps li {
    grid-template-columns: 2.2rem 1fr;
  }

  .status,
  .preview-nav,
  .legal,
  .verify-inner {
    padding: 1.2rem;
  }
}
