/* ==========================================================================
   CoreDevs SMP — design system
   ========================================================================== */

:root {
  --bg: #060b10;
  --bg-soft: #09121a;
  --panel: #0c1721;
  --panel-2: #101f2b;
  --panel-3: #142736;
  --line: rgba(150, 184, 200, 0.13);
  --line-strong: rgba(150, 184, 200, 0.25);
  --text: #e8f4f9;
  --muted: #93a9b4;
  --faint: #667e8a;
  --green: #22d3ee;
  --green-bright: #67e8f9;
  --green-deep: #0e5a6b;
  --gold: #fbbf24;
  --gold-soft: rgba(251, 191, 36, 0.12);
  --purple: #a78bfa;
  --cyan: #2dd4bf;
  --red: #f87171;
  --blue: #60a5fa;
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.9);
  --font-display: "Bahnschrift", "DIN Alternate", "Trebuchet MS", "Segoe UI", sans-serif;
  --font-body: "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  --max: 1180px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
*::selection { background: rgba(34, 211, 238, 0.28); color: #fff; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1100px 600px at 85% -10%, rgba(34, 211, 238, 0.1), transparent 65%),
    radial-gradient(800px 500px at 8% 4%, rgba(251, 191, 36, 0.06), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.modal-open { overflow: hidden; }

html { scrollbar-color: #1b3340 #050a0e; scrollbar-width: thin; }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: #050a0e; }
::-webkit-scrollbar-thumb { background: #1b3340; border: 3px solid #050a0e; border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: #264b5e; }

.ambient-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(130, 165, 185, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(130, 165, 185, 0.05) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 20%, transparent 75%);
}

#site-header, #site-footer, #app { position: relative; z-index: 1; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

a { color: var(--green-bright); text-decoration: none; }
a:hover { color: #a5f3fc; }

img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, h5 {
  margin: 0 0 0.55em;
  font-family: var(--font-display);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 650;
  text-wrap: balance;
}
section[id] { scroll-margin-top: 104px; }
p { margin: 0 0 1em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: -100px;
  z-index: 200;
  padding: 0.8rem 1.2rem;
  border-radius: var(--radius-sm);
  background: var(--green);
  color: #03141a;
  font-weight: 700;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 1rem; color: #03141a; }

.container {
  width: min(var(--max), calc(100% - 3rem));
  margin-inline: auto;
}

/* ==========================================================================
   Header and navigation
   ========================================================================== */

/* The header markup is injected into this wrapper; it is the sticky element
   because a sticky child cannot leave its own short parent. */
#site-header { position: sticky; top: 0; z-index: 80; }
.site-header {
  position: relative;
  z-index: 1;
  border-bottom: 1px solid transparent;
  transition: background 0.25s ease, border-color 0.25s ease;
}
.site-header.scrolled,
.site-header.always-solid {
  background: rgba(6, 11, 15, 0.82);
  backdrop-filter: blur(18px) saturate(1.3);
  border-color: var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 78px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--text);
  flex-shrink: 0;
}
.brand:hover { color: var(--text); }
.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, rgba(34, 211, 238, 0.2), rgba(14, 90, 107, 0.15));
  border: 1px solid rgba(34, 211, 238, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 0 30px -12px rgba(34, 211, 238, 0.6);
}
.brand-mark svg { width: 26px; height: 26px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.brand-text small {
  font-size: 0.64rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--faint);
  margin-top: 3px;
}

.main-nav { display: flex; align-items: center; gap: 0.15rem; margin-inline: auto; }
.nav-link {
  padding: 0.55rem 0.68rem;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: color 0.18s ease, background 0.18s ease;
}
.nav-link:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.nav-link.active {
  color: var(--green-bright);
  background: rgba(34, 211, 238, 0.08);
  box-shadow: inset 0 -2px 0 rgba(34, 211, 238, 0.55);
}
.header-actions { display: flex; align-items: center; gap: 0.55rem; flex-shrink: 0; }
/* The status pill and vote shortcut duplicate the footer status and the Vote
   nav link; hiding them keeps the header inside its 1180px container with
   every nav item still visible. */
.site-header .server-pill,
.header-actions .btn-vote { display: none; }

.server-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.42rem 0.75rem;
  border: 1px solid var(--line);
  background: rgba(10, 18, 26, 0.7);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.74rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--faint);
  box-shadow: 0 0 0 3px rgba(100, 126, 140, 0.12);
  flex-shrink: 0;
}
.status-dot.online {
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.13), 0 0 12px rgba(34, 211, 238, 0.5);
  animation: pulse-dot 2.8s ease infinite;
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.13), 0 0 12px rgba(34, 211, 238, 0.5); }
  50% { box-shadow: 0 0 0 5px rgba(34, 211, 238, 0.04), 0 0 18px rgba(34, 211, 238, 0.65); }
}

.account-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 38px;
  padding: 0.25rem 0.65rem 0.25rem 0.3rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
}
.account-chip:hover { color: var(--text); border-color: var(--line-strong); }
.account-chip .avatar { width: 28px; height: 28px; border-radius: 50%; }
.account-chip .avatar-fallback { font-size: 0.7rem; }

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--text);
  place-items: center;
}
.mobile-toggle svg { width: 19px; height: 19px; }
.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  background: rgba(6, 11, 15, 0.97);
  backdrop-filter: blur(18px);
}
.mobile-nav.open { display: block; }
.mobile-nav .container { display: grid; grid-template-columns: 1fr 1fr; gap: 0.25rem; padding-block: 0.8rem 1.1rem; }
.mobile-nav a {
  padding: 0.8rem;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
}
.mobile-nav a.active { color: var(--green-bright); background: rgba(34, 211, 238, 0.08); }
.mobile-nav .mobile-server { grid-column: 1 / -1; color: var(--faint); font-size: 0.8rem; padding: 0.6rem 0.8rem 0; }

/* ==========================================================================
   Building blocks
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 42px;
  padding: 0.68rem 1.1rem;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.16s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 17px; height: 17px; flex-shrink: 0; }
.btn-primary {
  background: linear-gradient(180deg, #4ce3f2, var(--green));
  color: #03141a;
  border-color: #67e8f9;
  box-shadow: 0 10px 30px -14px rgba(34, 211, 238, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
.btn-primary:hover { background: linear-gradient(180deg, #67e8f9, #38dcee); color: #03141a; }
.btn-gold {
  background: linear-gradient(180deg, #fcd34d, var(--gold));
  color: #201500;
  border-color: #fde68a;
  box-shadow: 0 10px 30px -14px rgba(251, 191, 36, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.btn-ghost {
  background: rgba(255, 255, 255, 0.025);
  border-color: var(--line-strong);
  color: var(--text);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.06); border-color: rgba(150, 184, 200, 0.4); color: var(--text); }
.btn-quiet { background: transparent; border-color: transparent; color: var(--muted); }
.btn-quiet:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.btn-danger { background: rgba(248, 113, 113, 0.1); border-color: rgba(248, 113, 113, 0.3); color: #fca5a5; }
.btn-danger:hover { background: rgba(248, 113, 113, 0.17); color: #fecaca; }
.btn-sm { min-height: 34px; padding: 0.4rem 0.7rem; font-size: 0.78rem; border-radius: 7px; }
.btn-lg { min-height: 50px; padding: 0.9rem 1.5rem; font-size: 0.98rem; border-radius: 11px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.disabled { opacity: 0.5; pointer-events: none; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1rem;
  color: var(--green-bright);
  font-family: var(--font-mono);
  font-size: 0.69rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: linear-gradient(90deg, var(--green), transparent);
}
.eyebrow.gold { color: var(--gold); }
.eyebrow.gold::before { background: linear-gradient(90deg, var(--gold), transparent); }
.eyebrow.with-icon { gap: 0.45rem; }
.eyebrow.with-icon::before { display: none; }
.eyebrow.with-icon svg { width: 14px; height: 14px; flex: 0 0 auto; }

.muted { color: var(--muted); }
.faint { color: var(--faint); }
.mono { font-family: var(--font-mono); }
.small { font-size: 0.82rem; }
.tiny { font-size: 0.72rem; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.stack-sm > * + * { margin-top: 0.55rem; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.hidden, [hidden] { display: none !important; }

.card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.025), transparent 35%),
    var(--panel);
  box-shadow: var(--shadow);
}
.card-pad { padding: clamp(1.2rem, 2.4vw, 2rem); }
.card-hover { transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease; }
.card-hover:hover { transform: translateY(-3px); border-color: rgba(34, 211, 238, 0.25); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.24rem 0.55rem;
  border-radius: 5px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 0.69rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.chip.green { color: var(--green-bright); border-color: rgba(34, 211, 238, 0.25); background: rgba(34, 211, 238, 0.08); }
.chip.gold { color: var(--gold); border-color: rgba(251, 191, 36, 0.25); background: var(--gold-soft); }
.chip.purple { color: var(--purple); border-color: rgba(167, 139, 250, 0.25); background: rgba(167, 139, 250, 0.08); }
.chip.red { color: #fca5a5; border-color: rgba(248, 113, 113, 0.25); background: rgba(248, 113, 113, 0.08); }
.chip.blue { color: #93c5fd; border-color: rgba(96, 165, 250, 0.25); background: rgba(96, 165, 250, 0.08); }

.rank-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.16rem 0.42rem;
  border-radius: 4px;
  border: 1px solid color-mix(in srgb, var(--rank, #94a3b8) 35%, transparent);
  background: color-mix(in srgb, var(--rank, #94a3b8) 10%, transparent);
  color: var(--rank, #94a3b8);
  font-family: var(--font-mono);
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.faction-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--faction, var(--muted));
  font-size: 0.76rem;
  font-weight: 600;
}
.faction-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  background: currentColor;
  transform: rotate(45deg);
  opacity: 0.8;
}

.avatar {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: var(--panel-3);
  overflow: hidden;
  image-rendering: pixelated;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 700;
}
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.avatar-fallback {
  font-size: 0.82rem;
  text-transform: uppercase;
  color: var(--muted);
}
.avatar-lg { width: 76px; height: 76px; border-radius: 14px; }
.avatar-lg .avatar-fallback { font-size: 1.5rem; }
.avatar-xl { width: 112px; height: 112px; border-radius: 18px; }
.avatar-xl .avatar-fallback { font-size: 2.2rem; }
.avatar-sm { width: 28px; height: 28px; border-radius: 6px; }
.avatar-xs { width: 22px; height: 22px; border-radius: 4px; }

.code-inline {
  font-family: var(--font-mono);
  font-size: 0.84em;
  padding: 0.12em 0.38em;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  color: var(--green-bright);
}

.progress {
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}
.progress > span {
  display: block;
  height: 100%;
  width: var(--value, 0%);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green-deep), var(--green));
  transition: width 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.progress.gold > span { background: linear-gradient(90deg, #78350f, var(--gold)); }
.progress.purple > span { background: linear-gradient(90deg, #4c1d95, var(--purple)); }

.empty-state {
  padding: 3rem 1.5rem;
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.012);
}
.empty-icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 1rem;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: rgba(34, 211, 238, 0.07);
  border: 1px solid rgba(34, 211, 238, 0.18);
  color: var(--green);
}
.empty-icon svg { width: 24px; height: 24px; }
.empty-state h3 { margin-bottom: 0.35rem; }
.empty-state p { color: var(--muted); margin-bottom: 0; }
.inline-empty { display: flex; align-items: center; justify-content: center; gap: 0.6rem; padding: 2rem 1.2rem; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: rgba(255, 255, 255, 0.012); color: var(--faint); font-size: 0.82rem; text-align: center; }
.inline-empty[hidden] { display: none; }
.inline-empty svg { width: 18px; height: 18px; flex: 0 0 auto; color: var(--green); }

.banner {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 0.9rem 1.05rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font-size: 0.85rem;
}
.banner svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; color: var(--green); }
.banner.warn { border-color: rgba(251, 191, 36, 0.22); background: var(--gold-soft); color: #fde68a; }
.banner.warn svg { color: var(--gold); }
.banner.error { border-color: rgba(248, 113, 113, 0.25); background: rgba(248, 113, 113, 0.07); color: #fecaca; }
.banner.error svg { color: var(--red); }
.banner.success { border-color: rgba(52, 211, 153, 0.28); background: rgba(52, 211, 153, 0.08); color: #bbf7d0; }
.banner.success svg { color: var(--green); }
.banner strong { color: var(--text); }

/* ==========================================================================
   Sections and heroes
   ========================================================================== */

.page { animation: page-in 0.38s ease both; }
@keyframes page-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.section { padding-block: clamp(2.6rem, 6vw, 5rem); }
.section-tight { padding-block: clamp(1.7rem, 4vw, 3rem); }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 1.7rem;
}
.section-head h2 { font-size: clamp(1.55rem, 3vw, 2.2rem); margin: 0; }
.section-head p { color: var(--muted); max-width: 560px; margin: 0.5rem 0 0; font-size: 0.92rem; }
.section-head .eyebrow { margin-bottom: 0.7rem; }
.section-line {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.4rem;
}
.section-line h2 { font-size: 1.15rem; margin: 0; white-space: nowrap; }
.section-line::after { content: ""; height: 1px; flex: 1; background: linear-gradient(90deg, var(--line-strong), transparent); }

.hero {
  position: relative;
  padding: clamp(3rem, 7vw, 6.5rem) 0 clamp(2.5rem, 5vw, 4.5rem);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  width: 560px;
  height: 560px;
  right: -140px;
  top: -220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.13), transparent 68%);
  pointer-events: none;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(330px, 0.72fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.7rem, 6.2vw, 5rem);
  letter-spacing: -0.045em;
  margin-bottom: 1.1rem;
  max-width: 12ch;
}
.hero h1 .accent {
  color: transparent;
  background: linear-gradient(100deg, var(--green-bright), var(--green) 38%, #5eead4 68%, var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
}
.hero-lead {
  max-width: 540px;
  color: var(--muted);
  font-size: clamp(0.95rem, 1.3vw, 1.08rem);
  line-height: 1.7;
  margin-bottom: 1.7rem;
}
.hero-actions { display: flex; gap: 0.7rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.hero-meta { display: flex; align-items: center; gap: 1.4rem; flex-wrap: wrap; color: var(--faint); font-size: 0.73rem; }
.hero-meta span { display: inline-flex; align-items: center; gap: 0.4rem; }
.hero-meta svg { width: 14px; height: 14px; }

.ip-box {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  max-width: 440px;
  padding: 0.5rem 0.55rem 0.5rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: rgba(10, 18, 26, 0.7);
  backdrop-filter: blur(10px);
}
.ip-box .ip-label { font-size: 0.6rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); line-height: 1.2; }
.ip-box .ip-value { font-family: var(--font-mono); font-size: 0.9rem; color: var(--text); line-height: 1.3; }
.ip-box button {
  margin-left: auto;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  border-radius: 7px;
  padding: 0.45rem 0.7rem;
  font-size: 0.72rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}
.ip-box button:hover { color: var(--green-bright); border-color: rgba(34, 211, 238, 0.3); }
.ip-box button svg { width: 13px; height: 13px; }

.server-panel {
  position: relative;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(160deg, rgba(34, 211, 238, 0.06), transparent 40%),
    linear-gradient(180deg, #0f2029, #0a141b);
  box-shadow: 0 40px 100px -40px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
  transform: perspective(1200px) rotateY(-1.2deg) rotateX(0.6deg);
}
.server-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(34, 211, 238, 0.03) 1px, transparent 1px);
  background-size: 100% 6px;
  pointer-events: none;
  opacity: 0.5;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 1.1rem clamp(1.2rem, 2.4vw, 1.7rem);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.018);
}
.panel-title { display: flex; align-items: center; gap: 0.5rem; font-family: var(--font-mono); font-size: 0.65rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.panel-body { padding: clamp(1.2rem, 2.4vw, 1.7rem); position: relative; }
.panel-live {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  margin-bottom: 1rem;
}
.panel-live strong { font-family: var(--font-display); font-size: 2.4rem; line-height: 1; letter-spacing: -0.04em; }
.panel-live span { color: var(--faint); font-size: 0.78rem; }
.panel-online { display: grid; gap: 0.2rem; margin-bottom: 1rem; }
.online-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 0.45rem;
  border-radius: 7px;
  color: var(--text);
  font-size: 0.82rem;
}
a.online-row:hover { background: rgba(255, 255, 255, 0.04); color: var(--text); }
.online-row .meta { margin-left: auto; text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.panel-footer {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  border-top: 1px solid var(--line);
  background: var(--line);
}
.panel-stat { padding: 0.9rem clamp(1.2rem, 2.4vw, 1.7rem); background: #0a141b; }
.panel-stat small { display: block; color: var(--faint); font-size: 0.61rem; letter-spacing: 0.09em; text-transform: uppercase; margin-bottom: 0.2rem; }
.panel-stat strong { font-family: var(--font-mono); font-size: 0.9rem; font-weight: 600; }

.play-details { background: linear-gradient(150deg, rgba(251, 191, 36, 0.045), transparent 45%), var(--panel); }
.play-details .eyebrow { margin-bottom: 0.9rem; }
.play-details-list { display: grid; gap: 0.55rem; }
.play-details-list > div { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding-bottom: 0.55rem; border-bottom: 1px solid var(--line); }
.play-details-list > div:last-child { padding-bottom: 0; border-bottom: 0; }
.play-details-list span { color: var(--faint); font-size: 0.72rem; }
.play-details-list strong { color: var(--text); font-family: var(--font-mono); font-size: 0.78rem; font-weight: 500; text-align: right; overflow-wrap: anywhere; }
.play-details-actions { display: flex; gap: 0.45rem; flex-wrap: wrap; margin-top: 1rem; }

.stats-band {
  border-block: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(34, 211, 238, 0.035), transparent 30%, transparent 70%, rgba(251, 191, 36, 0.03)),
    rgba(9, 16, 22, 0.5);
}
.stats-band-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat-cell { padding: 1.4rem clamp(0.8rem, 2vw, 2rem); border-left: 1px solid var(--line); }
.stat-cell:first-child { border-left: 0; }
.stat-cell .stat-label { color: var(--faint); font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.14em; text-transform: uppercase; }
.stat-cell .stat-value { font-family: var(--font-display); font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 650; letter-spacing: -0.03em; margin-top: 0.25rem; line-height: 1.1; }
.stat-cell .stat-value small { font-size: 0.55em; color: var(--faint); font-family: var(--font-body); font-weight: 500; margin-left: 0.2rem; }

/* ==========================================================================
   Home
   ========================================================================== */

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.9rem; }
.feature-card {
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.025), transparent 60%), var(--panel);
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}
.feature-card:hover { border-color: rgba(34, 211, 238, 0.22); transform: translateY(-2px); background: var(--panel-2); }
.feature-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
  border-radius: 9px;
  background: rgba(34, 211, 238, 0.07);
  border: 1px solid rgba(34, 211, 238, 0.16);
  color: var(--green);
}
.feature-icon svg { width: 20px; height: 20px; }
.feature-card:nth-child(2n) .feature-icon { background: var(--gold-soft); border-color: rgba(251, 191, 36, 0.17); color: var(--gold); }
.feature-card:nth-child(3n) .feature-icon { background: rgba(167, 139, 250, 0.07); border-color: rgba(167, 139, 250, 0.17); color: var(--purple); }
.feature-card h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }
.feature-card p { color: var(--muted); font-size: 0.84rem; line-height: 1.6; margin: 0; }
.feature-card-link {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: var(--text);
}
.feature-card-link:hover { color: var(--text); box-shadow: 0 24px 55px -30px rgba(0, 0, 0, 0.95); }
.feature-card-link::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -70px;
  bottom: -110px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.14), transparent 68%);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.feature-card-link:hover::after { opacity: 1; }
.feature-card-link p { flex: 1; }
.feature-card-foot {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 1.1rem;
  color: var(--green-bright);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.feature-card-foot svg { width: 14px; height: 14px; transition: transform 0.18s ease; }
.feature-card-link:hover .feature-card-foot svg { transform: translateX(3px); }

.lock-list { display: grid; gap: 0.55rem; margin: 1rem 0 1.1rem; padding: 0; list-style: none; }
.lock-list li { display: flex; align-items: center; gap: 0.55rem; color: var(--muted); font-size: 0.8rem; }
.lock-list svg { width: 15px; height: 15px; flex-shrink: 0; color: var(--green); }

.home-split { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 1rem; align-items: start; }
.home-split > * { min-width: 0; }
.home-split .card-pad { padding: 1.4rem; }

.thread-mini {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--line);
}
.thread-mini:first-of-type { border-top: 0; padding-top: 0; }
.thread-mini .thread-mini-body { min-width: 0; flex: 1; }
.thread-mini .thread-mini-title { display: block; color: var(--text); font-weight: 600; font-size: 0.9rem; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread-mini .thread-mini-title:hover { color: var(--green-bright); }
.thread-mini .thread-mini-meta { color: var(--faint); font-size: 0.7rem; margin-top: 0.18rem; display: flex; gap: 0.5rem; flex-wrap: wrap; }
.thread-mini .thread-mini-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--muted);
}
.thread-mini .thread-mini-icon svg { width: 16px; height: 16px; }

.top-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0;
  border-top: 1px solid var(--line);
}
.top-row:first-of-type { border-top: 0; padding-top: 0; }
.top-position {
  width: 25px;
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--faint);
  text-align: center;
}
.top-position.top-1 { color: var(--gold); }
.top-position.top-2 { color: #d1d5db; }
.top-position.top-3 { color: #d97706; }
.top-row .top-name { font-size: 0.86rem; font-weight: 600; min-width: 0; }
.top-row .top-value { margin-left: auto; font-family: var(--font-mono); font-size: 0.77rem; color: var(--green-bright); white-space: nowrap; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; counter-reset: step; }
.step {
  position: relative;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  counter-increment: step;
}
.step::before {
  content: "0" counter(step);
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--green);
  margin-bottom: 0.9rem;
  letter-spacing: 0.1em;
}
.step h3 { font-size: 1rem; margin-bottom: 0.4rem; }
.step p { color: var(--muted); font-size: 0.83rem; margin: 0; }

.cta-band {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  align-items: center;
  padding: clamp(1.8rem, 4vw, 2.8rem);
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(600px 250px at 90% 0%, rgba(34, 211, 238, 0.13), transparent 65%),
    linear-gradient(140deg, #0d1e28, #09141b);
}
.cta-band h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
.cta-band p { color: var(--muted); margin: 0; max-width: 540px; }
.cta-actions { display: flex; justify-content: flex-end; gap: 0.65rem; flex-wrap: wrap; }

/* ==========================================================================
   Page headers, tabs and filters
   ========================================================================== */

.page-head { padding: clamp(2.4rem, 5vw, 4rem) 0 clamp(1.5rem, 3vw, 2.4rem); }
.page-head h1 { font-size: clamp(2.1rem, 4.8vw, 3.6rem); margin-bottom: 0.65rem; }
.page-head .lead { color: var(--muted); max-width: 660px; font-size: 0.98rem; margin: 0; }
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  color: var(--faint);
  font-size: 0.72rem;
}
.breadcrumbs a { color: var(--faint); }
.breadcrumbs a:hover { color: var(--green-bright); }
.breadcrumbs span { opacity: 0.5; }
.detail-crumbs { padding-top: 1.25rem; }

.toolbar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  padding: 0.7rem;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--panel);
}
.toolbar .search {
  position: relative;
  flex: 1 1 220px;
  min-width: 180px;
}
.toolbar .search svg {
  position: absolute;
  left: 0.7rem;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--faint);
  pointer-events: none;
}
.toolbar input[type="search"],
.toolbar input[type="text"],
.toolbar select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.18);
  padding: 0.45rem 0.7rem;
  color: var(--text);
  font-size: 0.83rem;
}
.toolbar .search input { padding-left: 2rem; }
.toolbar select { width: auto; cursor: pointer; }
.toolbar input:focus, .toolbar select:focus { border-color: rgba(34, 211, 238, 0.4); outline: none; }
.checkline { display: inline-flex; align-items: center; gap: 0.45rem; color: var(--muted); font-size: 0.8rem; cursor: pointer; user-select: none; }
.checkline input { accent-color: var(--green); width: 15px; height: 15px; }

/* Settings groups and switches */
.settings-group { border: 1px solid var(--line); border-radius: 10px; background: rgba(255, 255, 255, 0.012); overflow: hidden; }
.settings-group + .settings-group { margin-top: 0.55rem; }
.settings-group > summary { display: flex; align-items: center; gap: 0.65rem; padding: 0.7rem 0.8rem; cursor: pointer; list-style: none; user-select: none; }
.settings-group > summary::-webkit-details-marker { display: none; }
.settings-group > summary:hover { background: rgba(255, 255, 255, 0.025); }
.settings-group[open] > summary { border-bottom: 1px solid var(--line); }
.settings-group-icon { display: grid; place-items: center; flex: 0 0 30px; width: 30px; height: 30px; border: 1px solid rgba(34, 211, 238, 0.2); border-radius: 7px; background: rgba(34, 211, 238, 0.06); color: var(--green); }
.settings-group-icon svg { width: 15px; height: 15px; }
.settings-group-title { flex: 1; min-width: 0; }
.settings-group-title strong { display: block; font-size: 0.82rem; line-height: 1.3; }
.settings-group-title span { display: block; color: var(--faint); font-size: 0.65rem; line-height: 1.35; }
.settings-group-meta { color: var(--faint); font-family: var(--font-mono); font-size: 0.58rem; white-space: nowrap; }
.settings-group > summary .chevron { width: 15px; height: 15px; flex: 0 0 auto; color: var(--faint); transition: transform 0.2s ease; }
.settings-group[open] > summary .chevron { transform: rotate(90deg); }
.settings-group-body { padding: 0.35rem 0.8rem 0.55rem; }
.settings-subhead { padding: 0.65rem 0 0.15rem; color: var(--faint); font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.08em; text-transform: uppercase; }
.settings-subhead:first-child { padding-top: 0.15rem; }
.chip svg { width: 13px; height: 13px; flex: 0 0 auto; }
.settings-hint { display: flex; align-items: flex-start; gap: 0.35rem; margin: 0 0 0.5rem; color: var(--faint); font-size: 0.68rem; line-height: 1.45; }
.settings-hint svg { width: 13px; height: 13px; flex: 0 0 auto; margin-top: 0.1rem; color: var(--green); }
.setting-row { display: flex; align-items: center; gap: 0.75rem; padding: 0.65rem 0; border-top: 1px solid var(--line); }
.setting-row:first-child { border-top: 0; }
.privacy-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 2rem; }
.privacy-grid .setting-row:nth-child(1), .privacy-grid .setting-row:nth-child(2) { border-top: 0; }
.setting-copy { flex: 1; min-width: 0; }
.setting-copy strong { display: block; font-size: 0.8rem; font-weight: 600; line-height: 1.35; }
.setting-copy span { display: block; margin-top: 0.1rem; color: var(--faint); font-size: 0.68rem; line-height: 1.45; }
.setting-control { flex: 0 0 auto; display: flex; align-items: center; gap: 0.35rem; }
.setting-select { min-width: 150px; border: 1px solid var(--line); border-radius: 7px; background: rgba(0, 0, 0, 0.25); color: var(--text); padding: 0.36rem 0.5rem; font-size: 0.74rem; }
.setting-select:focus { outline: none; border-color: rgba(34, 211, 238, 0.45); }
.switch { position: relative; display: inline-flex; flex: 0 0 38px; width: 38px; height: 22px; }
.switch input { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.switch-track { position: absolute; inset: 0; border: 1px solid var(--line-strong); border-radius: 999px; background: rgba(255, 255, 255, 0.05); transition: background 0.18s ease, border-color 0.18s ease; }
.switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--muted); transition: transform 0.18s ease, background 0.18s ease; }
.switch input:checked + .switch-track { background: rgba(34, 211, 238, 0.28); border-color: rgba(34, 211, 238, 0.55); }
.switch input:checked + .switch-track::after { transform: translateX(16px); background: var(--green-bright); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--green); outline-offset: 2px; }
.switch input:disabled { cursor: not-allowed; }
.switch input:disabled + .switch-track { opacity: 0.45; }

.panel-title { display: flex; align-items: center; gap: 0.5rem; min-width: 0; }
.panel-title svg { width: 17px; height: 17px; flex: 0 0 auto; color: var(--green); }
.panel-title h2 { margin: 0; }
.filter-count { margin-left: auto; color: var(--faint); font-family: var(--font-mono); font-size: 0.7rem; }

.tabs {
  display: inline-flex;
  gap: 0.2rem;
  padding: 0.28rem;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
  flex-wrap: wrap;
}
.tab {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.48rem 0.85rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 0.79rem;
  font-weight: 600;
}
.tab svg { width: 14px; height: 14px; flex: 0 0 auto; }
.tab:hover { color: var(--text); }
.tab.active { background: rgba(34, 211, 238, 0.11); color: var(--green-bright); }

.section-nav {
  position: sticky;
  top: 84px;
  z-index: 30;
  display: flex;
  gap: 0.25rem;
  overflow-x: auto;
  margin: 0 0 1rem;
  padding: 0.3rem;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(9, 18, 26, 0.92);
  backdrop-filter: blur(14px);
  scrollbar-width: none;
}
.section-nav::-webkit-scrollbar { display: none; }
.section-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex: 0 0 auto;
  padding: 0.45rem 0.65rem;
  border-radius: 7px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  transition: color 0.16s ease, background 0.16s ease;
}
.section-nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.section-nav a.active { color: var(--green-bright); background: rgba(34, 211, 238, 0.11); }
.section-nav a svg { width: 15px; height: 15px; flex: 0 0 auto; color: var(--green); }
.page:has(.section-nav) [id] { scroll-margin-top: 145px; }

.pagination { display: flex; align-items: center; justify-content: center; gap: 0.5rem; margin-top: 1.5rem; }
.pagination .page-info { color: var(--faint); font-size: 0.76rem; font-family: var(--font-mono); padding-inline: 0.4rem; }

/* ==========================================================================
   Player and faction lists
   ========================================================================== */

.player-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(34, 211, 238, 0.04), transparent 40%, rgba(251, 191, 36, 0.03)),
    var(--panel);
}
.player-stat { min-width: 0; padding: 0.95rem 1.1rem; border-left: 1px solid var(--line); }
.player-stat:first-child { border-left: 0; }
.player-stat span svg { width: 13px; height: 13px; vertical-align: -2px; margin-right: 0.25rem; color: var(--green); }
.player-stat > span { display: block; color: var(--faint); font-family: var(--font-mono); font-size: 0.58rem; letter-spacing: 0.11em; text-transform: uppercase; }
.player-stat strong { display: block; margin-top: 0.2rem; font-family: var(--font-display); font-size: 1.45rem; line-height: 1.1; letter-spacing: -0.03em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-stat strong.is-online { color: var(--green-bright); text-shadow: 0 0 24px rgba(34, 211, 238, 0.35); }
.player-stat strong.player-stat-name { font-size: 1.05rem; color: var(--gold); }
.player-stat small { display: block; margin-top: 0.2rem; color: var(--faint); font-size: 0.68rem; }

.player-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; }
.player-card {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--panel);
  color: var(--text);
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}
.player-card:hover { border-color: rgba(34, 211, 238, 0.24); background: var(--panel-2); transform: translateY(-1px); color: var(--text); }
.player-card .player-main { min-width: 0; flex: 1; }
.player-card .player-name { font-weight: 600; font-size: 0.9rem; display: flex; align-items: center; gap: 0.4rem; }
.player-card .player-sub { display: flex; align-items: center; gap: 0.4rem; color: var(--faint); font-size: 0.7rem; margin-top: 0.16rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-card .player-value { text-align: right; flex-shrink: 0; }
.player-card .player-value strong { display: block; font-family: var(--font-mono); font-size: 0.77rem; color: var(--green-bright); font-weight: 500; }
.player-card .player-value small { color: var(--faint); font-size: 0.65rem; }
.player-card > svg { width: 16px; height: 16px; flex: 0 0 auto; color: var(--faint); }
.online-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); display: inline-block; flex-shrink: 0; }
.online-dot.on { background: var(--green); box-shadow: 0 0 8px rgba(34, 211, 238, 0.6); }

.data-table-wrap { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--panel); }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.84rem; }
.data-table th {
  text-align: left;
  padding: 0.7rem 1rem;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.018);
  white-space: nowrap;
}
.data-table td { padding: 0.8rem 1rem; border-bottom: 1px solid rgba(150, 184, 200, 0.07); vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr { transition: background 0.15s ease; }
.data-table tbody tr:hover { background: rgba(255, 255, 255, 0.022); }
.data-table .cell-main { display: flex; align-items: center; gap: 0.65rem; min-width: 0; }
.data-table .cell-main .name { font-weight: 600; color: var(--text); }
.data-table .cell-main a.name:hover { color: var(--green-bright); }
.data-table .cell-sub { color: var(--faint); font-size: 0.7rem; }
.data-table .num { font-family: var(--font-mono); text-align: right; white-space: nowrap; }
.data-table .action-col { text-align: right; width: 1%; }

.faction-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.9rem; }
.faction-card {
  position: relative;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.faction-card:hover { border-color: color-mix(in srgb, var(--faction, var(--green)) 40%, transparent); transform: translateY(-2px); color: var(--text); }
.faction-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, var(--faction, var(--green)), transparent 80%);
  opacity: 0.8;
}
.faction-card .faction-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.8rem; margin-bottom: 0.8rem; }
.faction-card .faction-id { display: flex; align-items: center; gap: 0.65rem; min-width: 0; }
.faction-card .faction-id h3 { font-size: 1.05rem; }
.faction-card .faction-sub { display: flex; align-items: center; gap: 0.28rem; color: var(--faint); font-size: 0.68rem; margin-top: 0.1rem; }
.faction-card .faction-sub svg { width: 11px; height: 11px; flex: 0 0 auto; color: var(--gold); }
.faction-crest {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--faction, var(--green)) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--faction, var(--green)) 30%, transparent);
  color: var(--faction, var(--green));
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  flex-shrink: 0;
}
.faction-crest-letter { position: absolute; inset: 0; display: grid; place-items: center; }
.faction-crest-img {
  position: absolute;
  inset: 2px;
  width: calc(100% - 4px);
  height: calc(100% - 4px);
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35));
}
.faction-crest.has-banner, .faction-banner .faction-crest-lg.has-banner { background: transparent; border-color: transparent; }
.faction-card h3 { font-size: 1.1rem; margin: 0; display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.faction-card .faction-desc { color: var(--muted); font-size: 0.8rem; line-height: 1.55; min-height: 2.5em; margin: 0 0 1rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.faction-card .faction-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; padding-top: 0.85rem; border-top: 1px solid var(--line); }
.faction-card .faction-stat small { display: block; color: var(--faint); font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.08em; }
.faction-card .faction-stat strong { font-family: var(--font-mono); font-size: 0.8rem; font-weight: 500; }
.faction-card .faction-members { display: flex; align-items: center; margin-top: 0.85rem; }
.faction-card .faction-members .avatar { margin-right: -6px; border: 2px solid var(--panel); }
.faction-card .faction-member-stack { display: flex; }
.faction-card .faction-members span { margin-left: auto; color: var(--faint); font-size: 0.68rem; }
.faction-card .faction-members .faction-presence { display: inline-flex; align-items: center; }
.faction-card .faction-members .faction-presence .online-dot { margin-right: 0.3rem; }
.faction-card .faction-members > svg { width: 15px; height: 15px; flex: 0 0 auto; margin-left: 0.35rem; color: var(--faint); }

/* Detail pages */
.profile-hero {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(500px 220px at 10% 0%, rgba(34, 211, 238, 0.1), transparent 65%),
    linear-gradient(150deg, var(--panel-2), var(--panel));
  overflow: hidden;
}
.profile-head { display: flex; align-items: center; gap: 1.2rem; padding: clamp(1.4rem, 3vw, 2.2rem); flex-wrap: wrap; }
.profile-identity { flex: 1; min-width: 200px; }
.profile-identity h1 { font-size: clamp(1.7rem, 4vw, 2.8rem); margin: 0 0 0.3rem; display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.profile-identity .meta { display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; color: var(--faint); font-size: 0.78rem; }
.profile-identity .eyebrow { margin-bottom: 0.35rem; }
.profile-side { display: flex; flex-direction: column; align-items: stretch; gap: 0.55rem; flex: 0 0 200px; }
.profile-skin-stage { width: 100%; height: 252px; border-radius: 14px; }
.profile-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.profile-avatar { position: relative; flex: 0 0 auto; }
.profile-avatar .presence-pip { width: 14px; height: 14px; right: -3px; bottom: -3px; border-width: 3px; }
.profile-presence { display: flex; align-items: center; gap: 0.55rem; flex-wrap: wrap; margin-top: 0.6rem; }
.presence-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.26rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}
.presence-pill.on { color: var(--green-bright); border-color: rgba(34, 211, 238, 0.28); background: rgba(34, 211, 238, 0.08); }
.presence-pill svg { width: 13px; height: 13px; flex: 0 0 auto; }
a.presence-pill:hover { color: var(--text); border-color: rgba(34, 211, 238, 0.22); }
.profile-meta.faction-note { font-weight: 600; }
.profile-meta.faction-note svg { color: currentColor; }
.profile-meta { display: inline-flex; align-items: center; gap: 0.3rem; color: var(--faint); font-size: 0.72rem; }
.profile-meta svg { width: 13px; height: 13px; flex: 0 0 auto; color: var(--green); }
.presence-pip {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid var(--panel);
  background: var(--faint);
  z-index: 2;
}
.presence-pip.on { background: var(--green); box-shadow: 0 0 10px rgba(34, 211, 238, 0.65); }
.profile-stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.profile-stat { padding: 1rem clamp(0.9rem, 2vw, 1.4rem); border-left: 1px solid var(--line); }
.profile-stat:first-child { border-left: 0; }
.profile-stat small { display: flex; align-items: center; gap: 0.3rem; color: var(--faint); font-family: var(--font-mono); font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.1em; }
.profile-stat small svg { width: 12px; height: 12px; flex: 0 0 auto; color: var(--green); }
.profile-stat strong { display: block; font-family: var(--font-mono); font-size: 1rem; font-weight: 500; margin-top: 0.2rem; }
.profile-identity .meta svg { width: 12px; height: 12px; vertical-align: -2px; margin-right: 0.22rem; color: var(--green); }

/* Minecraft-style item tiles used for skills and collections */
.mc-tile {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 27px;
  width: 27px;
  height: 27px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(0, 0, 0, 0.28));
  color: var(--text);
  font-family: var(--font-display);
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), inset 0 -3px 6px rgba(0, 0, 0, 0.32);
}
.mc-tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, rgba(255, 255, 255, 0.16), transparent 55%); pointer-events: none; }
.mc-tile-glyph { position: relative; z-index: 0; }
.mc-tile img { position: absolute; inset: 1px; z-index: 1; width: calc(100% - 2px); height: calc(100% - 2px); object-fit: contain; image-rendering: pixelated; }
.mc-tile.mining { border-color: rgba(34, 211, 238, 0.4); color: #a5f3fc; background: linear-gradient(145deg, rgba(34, 211, 238, 0.24), rgba(8, 47, 58, 0.65)); }
.mc-tile.combat { border-color: rgba(248, 113, 113, 0.4); color: #fecaca; background: linear-gradient(145deg, rgba(248, 113, 113, 0.22), rgba(58, 16, 19, 0.65)); }
.mc-tile.food { border-color: rgba(52, 211, 153, 0.4); color: #a7f3d0; background: linear-gradient(145deg, rgba(52, 211, 153, 0.2), rgba(7, 48, 38, 0.65)); }
.mc-tile.wood { border-color: rgba(251, 191, 36, 0.4); color: #fde68a; background: linear-gradient(145deg, rgba(251, 191, 36, 0.22), rgba(58, 43, 9, 0.65)); }
.mc-tile.magic { border-color: rgba(167, 139, 250, 0.42); color: #ddd6fe; background: linear-gradient(145deg, rgba(167, 139, 250, 0.22), rgba(34, 25, 68, 0.65)); }
.mc-tile.stone { border-color: rgba(148, 163, 184, 0.35); color: #cbd5e1; background: linear-gradient(145deg, rgba(148, 163, 184, 0.18), rgba(23, 32, 42, 0.65)); }

.progress-row { display: flex; gap: 0.6rem; align-items: flex-start; min-width: 0; }
.progress-row .mc-tile { margin-top: 1px; }
.progress-body { flex: 1; min-width: 0; }
.inline-more { margin-top: 0.8rem; padding-top: 0.55rem; border-top: 1px dashed var(--line); }
.inline-more > summary { display: flex; align-items: center; gap: 0.3rem; color: var(--green); font-size: 0.72rem; font-weight: 600; cursor: pointer; list-style: none; user-select: none; }
.inline-more > summary::-webkit-details-marker { display: none; }
.inline-more > summary svg { width: 13px; height: 13px; transition: transform 0.18s ease; }
.inline-more[open] > summary svg { transform: rotate(90deg); }
.inline-more[open] > summary { margin-bottom: 0.7rem; }

.map-page { background: var(--bg); }
.map-page-frame {
  height: calc(100vh - 79px);
  height: calc(100dvh - 79px);
  min-height: 460px;
  overflow: hidden;
  background: var(--bg);
}
.map-page-frame iframe { display: block; width: 100%; height: 100%; border: 0; }
.faction-map-frame { height: 300px; border-bottom: 1px solid var(--line); background: var(--bg); }
.faction-map-frame iframe { display: block; width: 100%; height: 100%; border: 0; }

.two-col { display: grid; grid-template-columns: 1.55fr 0.9fr; gap: 1rem; align-items: start; }
.panel-box { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); overflow: hidden; }
.panel-box-head { padding: 1rem clamp(1.2rem, 2.4vw, 1.7rem); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; }
.panel-box-head h2, .panel-box-head h3 { margin: 0; font-size: 0.95rem; }
.panel-box-body { padding: clamp(1.2rem, 2.4vw, 1.7rem); }
.panel-box-body.flush { padding: 0; }
.panel-fold > summary { list-style: none; cursor: pointer; user-select: none; }
.panel-fold > summary::-webkit-details-marker { display: none; }
.panel-fold > summary:hover { background: rgba(255, 255, 255, 0.025); }
.panel-fold:not([open]) > summary.panel-box-head { border-bottom: 0; }
.panel-fold > summary .panel-head-actions { display: flex; align-items: center; gap: 0.5rem; margin-left: auto; }
.panel-fold > summary .chevron { width: 15px; height: 15px; flex: 0 0 auto; color: var(--faint); transition: transform 0.2s ease; }
.panel-fold[open] > summary .chevron { transform: rotate(90deg); }
.panel-subhead { display: flex; align-items: center; gap: 0.35rem; color: var(--faint); font-size: 0.7rem; font-weight: 600; letter-spacing: 0.02em; }
.panel-subhead svg { width: 13px; height: 13px; flex: 0 0 auto; color: var(--green); }
.panel-subhead.danger svg { color: #fca5a5; }
/* Friends, allies and enemies stay readable next to their label. */
#socials .panel-subhead svg, #relations .panel-subhead svg { width: 12px; height: 12px; }
.relation-list .chip svg { width: 12px; height: 12px; }
.relation-list .chip { font-size: 0.68rem; }

.progress-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem 1.2rem; }
.progress-row .progress-row-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.6rem; margin-bottom: 0.3rem; }
.progress-row .progress-name { font-size: 0.79rem; font-weight: 600; display: flex; align-items: center; gap: 0.35rem; }
.progress-row .progress-level { font-family: var(--font-mono); font-size: 0.67rem; color: var(--faint); }
.progress-row .progress-level strong { color: var(--green-bright); font-weight: 500; }

.faction-banner {
  padding: clamp(1.5rem, 4vw, 2.6rem);
  border-radius: var(--radius-lg);
  border: 1px solid color-mix(in srgb, var(--faction, var(--green)) 28%, var(--line));
  background:
    radial-gradient(600px 240px at 0% 0%, color-mix(in srgb, var(--faction, var(--green)) 14%, transparent), transparent 70%),
    linear-gradient(140deg, var(--panel-2), #09141b);
}
.faction-banner h1 { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; font-size: clamp(2rem, 5vw, 3.3rem); margin-bottom: 0.4rem; }
.faction-banner .faction-crest-lg {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--faction, var(--green));
  background: color-mix(in srgb, var(--faction, var(--green)) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--faction, var(--green)) 30%, transparent);
}
.faction-banner-preview { display: flex; align-items: center; gap: 0.65rem; flex-wrap: wrap; justify-content: flex-end; }
.faction-banner-preview .setting-select { min-width: 150px; }
.faction-banner .lead { color: var(--muted); max-width: 680px; margin: 0.15rem 0 1rem; }
.faction-banner-head { display: flex; align-items: flex-start; gap: 1.1rem; flex-wrap: wrap; }
.faction-banner-copy { flex: 1; min-width: 240px; }
.faction-banner-copy .eyebrow { margin-bottom: 0.35rem; }
.faction-banner-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-left: auto; }
.faction-banner-meta { display: flex; align-items: center; gap: 0.65rem 1rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.faction-leader { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.25rem 0.65rem 0.25rem 0.25rem; border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, 0.025); color: var(--text); }
.faction-leader:hover { color: var(--text); border-color: color-mix(in srgb, var(--faction, var(--green)) 38%, transparent); }
.faction-leader small { display: block; color: var(--faint); font-family: var(--font-mono); font-size: 0.52rem; letter-spacing: 0.1em; text-transform: uppercase; line-height: 1.3; }
.faction-leader .faction-leader-copy { font-size: 0.78rem; font-weight: 600; }
.faction-leader > svg { width: 13px; height: 13px; flex: 0 0 auto; color: var(--gold); }
.faction-banner-meta .faction-crew { margin: 0; }
.faction-prefix { display: inline-flex; align-items: center; gap: 0.35rem; max-width: 100%; padding: 0.25rem 0.65rem; border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, 0.025); color: var(--muted); font-size: 0.72rem; white-space: nowrap; }
.faction-prefix small { color: var(--faint); font-family: var(--font-mono); font-size: 0.52rem; letter-spacing: 0.1em; text-transform: uppercase; }
.faction-prefix svg { width: 13px; height: 13px; flex: 0 0 auto; color: var(--green); }
.faction-prefix .mc-text { font-weight: 600; }
.faction-hero-stats { display: flex; gap: 1.8rem; flex-wrap: wrap; }
.faction-hero-stat small { display: flex; align-items: center; gap: 0.3rem; color: var(--faint); font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase; }
.faction-hero-stat small svg { width: 12px; height: 12px; flex: 0 0 auto; color: var(--faction, var(--green)); }
.faction-hero-stat strong { font-family: var(--font-mono); font-size: 1rem; font-weight: 500; }
.faction-crew { display: flex; align-items: center; gap: 0.6rem; margin-top: 1rem; flex-wrap: wrap; }
.faction-crew-avatars { display: flex; }
.faction-crew-avatars .avatar { width: 24px; height: 24px; margin-right: -7px; border: 2px solid #09141b; border-radius: 50%; }
.faction-crew-avatars .avatar-fallback { font-size: 0.6rem; }
.faction-crew > span { color: var(--faint); font-size: 0.72rem; }

.roster-tools { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; padding: 0.85rem clamp(1.2rem, 2.4vw, 1.7rem); border-bottom: 1px solid var(--line); }
.roster-tools .search { position: relative; flex: 1 1 200px; min-width: 170px; }
.roster-tools .search svg { position: absolute; left: 0.65rem; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--faint); pointer-events: none; }
.roster-tools input[type="search"] { width: 100%; min-height: 36px; padding: 0.4rem 0.65rem 0.4rem 1.9rem; border: 1px solid var(--line); border-radius: 7px; background: rgba(0, 0, 0, 0.18); color: var(--text); font-size: 0.8rem; }
.roster-tools input[type="search"]:focus { border-color: rgba(34, 211, 238, 0.4); outline: none; }
.roster-tools .filter-count { margin-left: auto; }
.roster-body { display: flex; flex-direction: column; }
.roster-group { padding: 1rem clamp(1.2rem, 2.4vw, 1.7rem); border-bottom: 1px solid var(--line); }
.roster-group:last-child { border-bottom: 0; }
.roster-group[hidden] { display: none; }
.roster-group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.6rem; margin-bottom: 0.65rem; }
.roster-group-head h3 { margin: 0; color: var(--faint); font-family: var(--font-mono); font-size: 0.64rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
.roster-group-head span { color: var(--faint); font-size: 0.64rem; }
.roster-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 0.5rem; }
.roster-card { display: flex; align-items: center; gap: 0.45rem; min-width: 0; padding: 0.55rem 0.6rem; border: 1px solid var(--line); border-radius: 9px; background: rgba(255, 255, 255, 0.018); color: var(--text); transition: border-color 0.18s ease, background 0.18s ease; }
.roster-card:hover { border-color: rgba(34, 211, 238, 0.26); background: var(--panel-2); color: var(--text); }
.roster-card[hidden] { display: none; }
.roster-card-link { display: flex; align-items: center; gap: 0.6rem; flex: 1 1 0; min-width: 0; color: var(--text); }
.roster-card-link:hover { color: var(--text); }
.roster-kick { flex: 0 0 auto; padding-inline: 0.55rem; }
.roster-kick svg { width: 12px; height: 12px; }
.roster-manage { padding: 0.9rem clamp(1.2rem, 2.4vw, 1.7rem); border-bottom: 1px solid var(--line); background: rgba(34, 211, 238, 0.025); }
.roster-manage .settings-hint { margin-bottom: 0; }
.roster-manage .group-create .field { margin-bottom: 0; }
.roster-manage-hint { margin: 0; padding: 0.85rem clamp(1.2rem, 2.4vw, 1.7rem); border-top: 1px solid var(--line); }
.roster-pending-chip { padding-right: 0.28rem; gap: 0.3rem; }
.roster-pending-cancel { display: inline-grid; place-items: center; width: 18px; height: 18px; padding: 0; border: 0; border-radius: 4px; background: transparent; color: var(--faint); line-height: 1; }
.roster-pending-cancel:hover { color: #fca5a5; background: rgba(248, 113, 113, 0.14); }
.roster-pending-cancel svg { width: 11px; height: 11px; }
.roster-avatar { position: relative; flex: 0 0 auto; }
.roster-avatar .avatar { width: 34px; height: 34px; border-radius: 7px; }
.roster-avatar .presence-pip { right: -2px; bottom: -2px; border-color: var(--panel); }
.roster-main { min-width: 0; flex: 1; }
.roster-name { display: flex; align-items: center; gap: 0.35rem; font-size: 0.82rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.roster-name .rank-badge { flex-shrink: 0; }
.roster-sub { display: flex; align-items: center; gap: 0.3rem; color: var(--faint); font-size: 0.64rem; margin-top: 0.12rem; }
.roster-balance { text-align: right; flex-shrink: 0; }
.roster-balance strong { display: block; font-family: var(--font-mono); font-size: 0.7rem; font-weight: 500; color: var(--green-bright); }
.roster-balance small { color: var(--faint); font-size: 0.58rem; }
.roster-empty { padding: 1.6rem 1.2rem; margin: 0; text-align: center; color: var(--faint); font-size: 0.78rem; }
.roster-empty[hidden] { display: none; }

.command-copy { display: flex; align-items: center; gap: 0.6rem; width: 100%; padding: 0.75rem 0.9rem; border: 1px dashed rgba(34, 211, 238, 0.3); border-radius: 9px; background: rgba(34, 211, 238, 0.055); color: var(--green-bright); text-align: left; cursor: pointer; transition: border-color 0.18s ease, background 0.18s ease; }
.command-copy:hover { border-color: rgba(34, 211, 238, 0.55); background: rgba(34, 211, 238, 0.1); }
.command-copy code { font-family: var(--font-mono); font-size: 0.79rem; }
.command-copy svg { width: 15px; height: 15px; margin-left: auto; flex: 0 0 auto; color: var(--faint); }
.join-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.relation-list { display: flex; gap: 0.4rem; flex-wrap: wrap; }

/* ==========================================================================
   Forums
   ========================================================================== */

.category-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.category-card {
  position: relative;
  min-width: 0;
  display: flex;
  gap: 1rem;
  padding: 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
  transition: border-color 0.18s ease, background 0.18s ease;
}
.category-card:hover, .category-card:focus-within { border-color: rgba(34, 211, 238, 0.22); background: var(--panel-2); color: var(--text); }
.category-hit { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.category-hit:focus-visible { outline-offset: 2px; }
.category-icon {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--green);
}
.category-icon svg { width: 20px; height: 20px; }
.category-grid > .category-group:nth-child(4n + 2) > .category-card .category-icon { color: var(--gold); border-color: rgba(251, 191, 36, 0.18); background: var(--gold-soft); }
.category-grid > .category-group:nth-child(4n + 3) > .category-card .category-icon { color: var(--purple); border-color: rgba(167, 139, 250, 0.18); background: rgba(167, 139, 250, 0.07); }
.category-grid > .category-group:nth-child(4n + 4) > .category-card .category-icon { color: var(--cyan); border-color: rgba(45, 212, 191, 0.18); background: rgba(45, 212, 191, 0.07); }
.category-card .category-main { flex: 1; min-width: 0; }
.category-card h3 { font-size: 1rem; margin-bottom: 0.25rem; }
.category-card p { color: var(--muted); font-size: 0.79rem; margin: 0; }
.category-latest { margin-top: 0.75rem; padding-top: 0.7rem; border-top: 1px solid var(--line); color: var(--faint); font-size: 0.71rem; display: flex; align-items: center; gap: 0.4rem; min-width: 0; }
.category-latest > svg { width: 13px; height: 13px; flex-shrink: 0; }
.category-latest a { position: relative; z-index: 2; flex: 1; min-width: 0; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.category-latest a:hover { color: var(--green-bright); }
.category-count { margin-left: auto; color: var(--faint); font-family: var(--font-mono); font-size: 0.65rem; text-align: right; flex-shrink: 0; }
.category-count strong { display: block; color: var(--text); font-weight: 500; font-size: 0.8rem; }
.category-group { display: flex; flex-direction: column; gap: 0.45rem; min-width: 0; }
.category-children { display: flex; flex-direction: column; gap: 0.4rem; margin-left: 2.3rem; }
.category-card.subcategory { padding: 0.8rem 0.95rem; gap: 0.7rem; border-radius: 9px; background: rgba(255, 255, 255, 0.014); }
.category-card.subcategory .category-icon { width: 30px; height: 30px; border-radius: 7px; }
.category-card.subcategory .category-icon svg { width: 15px; height: 15px; }
.category-card.subcategory h3 { font-size: 0.86rem; margin-bottom: 0.1rem; }
.category-card.subcategory p { font-size: 0.72rem; }
.category-card.subcategory .category-latest { margin-top: 0.45rem; padding-top: 0.4rem; font-size: 0.66rem; }
.category-subcount { display: inline-flex; align-items: center; gap: 0.25rem; margin-top: 0.45rem; color: var(--green); font-family: var(--font-mono); font-size: 0.62rem; }
.category-subcount svg { width: 12px; height: 12px; }
.category-sublist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; margin-bottom: 1.25rem; }

.forum-manage { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 1rem; align-items: start; }
.fm-panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); overflow: hidden; }
.fm-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; padding: 0.85rem 1rem; border-bottom: 1px solid var(--line); }
.fm-panel-head .eyebrow { margin-bottom: 0.15rem; }
.fm-panel-head strong { display: block; font-size: 0.92rem; }
.fm-list { display: flex; flex-direction: column; gap: 2px; padding: 0.45rem; max-height: 62vh; overflow: auto; }
.fm-item { display: flex; align-items: center; gap: 0.5rem; width: 100%; padding: 0.45rem 0.55rem; padding-left: calc(0.55rem + (var(--depth, 0) * 1.05rem)); border: 1px solid transparent; border-radius: 7px; background: transparent; color: var(--muted); text-align: left; font: inherit; cursor: pointer; }
.fm-item:hover { background: rgba(255, 255, 255, 0.03); color: var(--text); }
.fm-item.active { border-color: rgba(34, 211, 238, 0.35); background: rgba(34, 211, 238, 0.08); color: var(--text); }
.fm-item-icon { display: grid; place-items: center; flex: 0 0 22px; width: 22px; height: 22px; border-radius: 5px; background: rgba(255, 255, 255, 0.03); color: var(--green); }
.fm-item-icon svg { width: 13px; height: 13px; }
.fm-item-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.79rem; font-weight: 600; }
.fm-item-sub { padding: 0.05rem 0.25rem; border: 1px solid var(--line); border-radius: 3px; color: var(--faint); font-family: var(--font-mono); font-size: 0.52rem; letter-spacing: 0.05em; text-transform: uppercase; }
.fm-item-meta { color: var(--faint); font-family: var(--font-mono); font-size: 0.6rem; }
.fm-empty { margin: 0; padding: 0.9rem; color: var(--faint); font-size: 0.75rem; text-align: center; }
.fm-hint { display: flex; align-items: flex-start; gap: 0.35rem; margin: 0; padding: 0.7rem 0.8rem; border-top: 1px solid var(--line); color: var(--faint); font-size: 0.65rem; line-height: 1.45; }
.fm-hint svg { flex: 0 0 auto; width: 13px; height: 13px; margin-top: 0.1rem; color: var(--green); }
.fm-editor form { padding: 1rem; }
.fm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7rem; }
.fm-grid-3 { grid-template-columns: 1fr 1fr 90px; }
.wiki-manage .fm-editor textarea { min-height: 360px; font-family: var(--font-mono); font-size: 0.78rem; line-height: 1.6; }
.wm-group + .wm-group { margin-top: 0.3rem; }
.wm-group-title { padding: 0.55rem 0.55rem 0.3rem; color: var(--faint); font-family: var(--font-mono); font-size: 0.56rem; letter-spacing: 0.1em; text-transform: uppercase; }
.fm-editor .form-footer { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; flex-wrap: wrap; margin-top: 1rem; padding-top: 0.8rem; border-top: 1px solid var(--line); }

.thread-table { width: 100%; border-collapse: collapse; }
.thread-table th { text-align: left; padding: 0.65rem 1.1rem; color: var(--faint); font-family: var(--font-mono); font-size: 0.61rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, 0.018); }
.thread-table td { padding: 0.85rem 1.1rem; border-bottom: 1px solid rgba(150, 184, 200, 0.07); vertical-align: middle; }
.thread-table tbody tr:last-child td { border-bottom: 0; }
.thread-table tbody tr:hover { background: rgba(255, 255, 255, 0.022); }
.thread-main { display: flex; align-items: center; gap: 0.8rem; min-width: 0; }
.thread-main .thread-body { min-width: 0; }
.thread-title { color: var(--text); font-weight: 600; font-size: 0.9rem; display: flex; align-items: center; gap: 0.45rem; flex-wrap: wrap; }
.thread-title:hover { color: var(--green-bright); }
.thread-byline { color: var(--faint); font-size: 0.7rem; display: flex; align-items: center; gap: 0.4rem; margin-top: 0.2rem; flex-wrap: wrap; }
.thread-replies { text-align: center; font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); }
.thread-replies small { display: block; font-family: var(--font-body); font-size: 0.6rem; color: var(--faint); }
.thread-last { color: var(--faint); font-size: 0.72rem; text-align: right; white-space: nowrap; }
.thread-last strong { display: block; color: var(--muted); font-weight: 500; font-size: 0.75rem; }
.pin-mark { color: var(--gold); display: inline-flex; }
.pin-mark svg, .lock-mark svg { width: 13px; height: 13px; }
.lock-mark { color: var(--faint); display: inline-flex; }

.forum-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }

.post-list { display: grid; gap: 0.8rem; }
.post {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
}
.post.op { border-color: rgba(34, 211, 238, 0.2); }
.post-side {
  padding: 1.2rem;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.014);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.post-side .author { display: flex; gap: 0.6rem; align-items: center; }
.post-side .author-name { font-weight: 600; font-size: 0.83rem; color: var(--text); line-height: 1.25; }
.post-side .author-meta { color: var(--faint); font-size: 0.66rem; margin-top: 0.15rem; }
.post-side .author-stats { color: var(--faint); font-size: 0.66rem; display: flex; flex-direction: column; gap: 0.1rem; }
.post-body { min-width: 0; display: flex; flex-direction: column; }
.post-head { display: flex; align-items: center; gap: 0.6rem; padding: 0.65rem 1.2rem; border-bottom: 1px solid var(--line); color: var(--faint); font-size: 0.68rem; flex-wrap: wrap; }
.post-head .post-actions { margin-left: auto; display: flex; gap: 0.3rem; flex-wrap: wrap; justify-content: flex-end; }
.post-content { padding: 1.3rem 1.3rem 1.5rem; font-size: 0.9rem; line-height: 1.7; color: #d6e7ee; overflow-wrap: anywhere; }
.post-content:empty { display: none; }
.post-content > :last-child { margin-bottom: 0; }
.post-attachments { display: grid; gap: 0.55rem; padding: 0 1.3rem 1.3rem; }
.post-content:empty + .post-attachments { padding-top: 1.3rem; }
.post-attachment-image { display: block; width: fit-content; max-width: 100%; border-radius: 9px; border: 1px solid var(--line); overflow: hidden; background: #060d12; }
.post-attachment-image img { display: block; max-width: 100%; max-height: 560px; width: auto; height: auto; border-radius: 0; }
.post-attachment-image:hover { border-color: rgba(34, 211, 238, 0.35); }
.post-attachment-file { display: flex; align-items: center; gap: 0.55rem; width: fit-content; max-width: 100%; padding: 0.55rem 0.7rem; border: 1px solid var(--line); border-radius: 8px; background: rgba(255, 255, 255, 0.025); color: var(--muted); text-decoration: none; }
.post-attachment-file:hover { border-color: rgba(34, 211, 238, 0.35); background: rgba(34, 211, 238, 0.05); color: var(--text); }
.post-attachment-file > svg { width: 15px; height: 15px; flex: 0 0 auto; color: var(--faint); }
.post-attachment-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 7px; background: rgba(34, 211, 238, 0.08); color: var(--green-bright); flex: 0 0 auto; }
.post-attachment-icon svg { width: 16px; height: 16px; }
.post-attachment-main { display: flex; flex-direction: column; min-width: 0; gap: 0.1rem; }
.post-attachment-main strong { color: var(--text); font-size: 0.78rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: min(60vw, 420px); }
.post-attachment-main small { color: var(--faint); font-family: var(--font-mono); font-size: 0.62rem; }
.post-content p { margin-bottom: 0.8rem; }
.post-content h1, .post-content h2, .post-content h3 { margin-top: 1.4rem; color: var(--text); }
.post-content h1 { font-size: 1.4rem; }
.post-content h2 { font-size: 1.2rem; }
.post-content h3 { font-size: 1.02rem; }
.post-content ul, .post-content ol { padding-left: 1.4rem; margin: 0.6rem 0 1rem; }
.post-content li { margin-bottom: 0.3rem; }
.post-content blockquote { margin: 1rem 0; padding: 0.6rem 1rem; border-left: 2px solid var(--green); background: rgba(34, 211, 238, 0.04); color: var(--muted); border-radius: 0 7px 7px 0; }
.post-content code { font-family: var(--font-mono); font-size: 0.82em; padding: 0.12em 0.35em; border-radius: 4px; background: rgba(255, 255, 255, 0.07); color: var(--green-bright); }
.post-content pre { margin: 1rem 0; padding: 1rem; border-radius: 8px; border: 1px solid var(--line); background: #060d12; overflow-x: auto; }
.post-content pre code { padding: 0; background: none; color: #cbd5e1; font-size: 0.8rem; }
.post-content a { text-decoration: underline; text-underline-offset: 2px; }
.post-content hr { margin: 1.5rem 0; }
.post-content img { border-radius: 8px; }
.post-content table { min-width: 420px; font-size: 0.8rem; }
.post-content th, .post-content td { padding: 0.55rem 0.7rem; }
.post-content th { background: rgba(255, 255, 255, 0.03); color: var(--muted); font-weight: 600; text-align: left; }
.table-wrap { max-width: 100%; overflow-x: auto; }
.post-content .table-wrap { margin: 1rem 0; }

.post-reply { display: flex; align-items: center; gap: 0.45rem; margin: 0.8rem 1.3rem 0; padding: 0.45rem 0.65rem; border-left: 2px solid rgba(34, 211, 238, 0.4); border-radius: 0 6px 6px 0; background: rgba(34, 211, 238, 0.04); color: var(--faint); font-size: 0.72rem; text-decoration: none; overflow: hidden; }
.post-reply:hover { background: rgba(34, 211, 238, 0.08); color: var(--muted); }
.post-reply-main { display: inline-flex; align-items: center; gap: 0.3rem; white-space: nowrap; }
.post-reply-main strong { color: var(--muted); font-weight: 600; }
.post-reply-main svg { width: 12px; height: 12px; }
.post-reply-excerpt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.post-highlight { animation: postHighlight 1.6s ease; }
@keyframes postHighlight { 0%, 100% { box-shadow: none; } 20% { box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.35); } }

.post-reactions { display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; padding: 0 1.3rem 1.1rem; }
.reaction-chips { display: inline-flex; flex-wrap: wrap; gap: 0.35rem; }
.reaction-chip { display: inline-flex; align-items: center; gap: 0.3rem; min-height: 28px; padding: 0.18rem 0.5rem; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); color: var(--muted); font-size: 0.78rem; line-height: 1; cursor: pointer; }
.reaction-chip:hover { border-color: rgba(34, 211, 238, 0.35); color: var(--text); background: rgba(34, 211, 238, 0.06); }
.reaction-chip.active { border-color: rgba(34, 211, 238, 0.45); background: rgba(34, 211, 238, 0.12); color: var(--green-bright); }
.reaction-image { width: 18px; height: 18px; object-fit: contain; }
.reaction-count { font-family: var(--font-mono); font-size: 0.68rem; color: var(--faint); }
.reaction-chip.active .reaction-count { color: inherit; }
.reaction-add { position: relative; display: inline-flex; }
.reaction-add-btn { padding: 0.18rem 0.42rem; color: var(--faint); }
.reaction-add-btn svg { width: 13px; height: 13px; }
.reaction-menu { position: absolute; z-index: 20; bottom: calc(100% + 0.35rem); left: 0; display: flex; gap: 0.15rem; padding: 0.35rem; border: 1px solid var(--line-strong); border-radius: 9px; background: #0a141b; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35); }
.reaction-choice { width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 7px; background: transparent; cursor: pointer; font-size: 1rem; }
.reaction-choice:hover { background: rgba(255, 255, 255, 0.08); }

.reply-box { margin-top: 1rem; }
.reply-target { display: flex; align-items: center; gap: 0.45rem; flex-wrap: wrap; margin-bottom: 0.55rem; padding: 0.5rem 0.7rem; border: 1px solid rgba(34, 211, 238, 0.18); background: rgba(34, 211, 238, 0.05); border-radius: 7px; color: var(--faint); font-size: 0.72rem; }
.reply-target-main { display: inline-flex; align-items: center; gap: 0.35rem; white-space: nowrap; }
.reply-target-main strong { color: var(--green-bright); font-weight: 600; }
.reply-target-main svg { width: 13px; height: 13px; }
.reply-target-excerpt { color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
.reply-target-cancel { margin-left: auto; display: grid; place-items: center; width: 24px; height: 24px; border: 0; border-radius: 5px; background: transparent; color: var(--faint); cursor: pointer; }
.reply-target-cancel:hover { background: rgba(255, 255, 255, 0.06); color: var(--text); }
.reply-target-cancel svg { width: 12px; height: 12px; }
.reply-box textarea { width: 100%; min-height: 140px; resize: vertical; border: 1px solid var(--line-strong); border-radius: 9px; background: rgba(0, 0, 0, 0.2); padding: 0.8rem 0.9rem; color: var(--text); font-size: 0.88rem; line-height: 1.6; }
.reply-box textarea:focus { outline: none; border-color: rgba(34, 211, 238, 0.45); box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.07); }
.form-footer { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; margin-top: 0.65rem; flex-wrap: wrap; color: var(--faint); font-size: 0.7rem; }

/* ==========================================================================
   Wiki
   ========================================================================== */

.wiki-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 1.4rem; align-items: start; }
.wiki-mobile-menu { display: none; }
.wiki-sidebar { position: sticky; top: 98px; min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); overflow: hidden; max-height: calc(100vh - 120px); overflow-y: auto; }
.wiki-sidebar-head { padding: 0.9rem 1rem; border-bottom: 1px solid var(--line); font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); }
.wiki-group { padding: 0.7rem 0.6rem; border-bottom: 1px solid rgba(150, 184, 200, 0.06); }
.wiki-group:last-child { border-bottom: 0; }
.wiki-group-title { padding: 0 0.45rem 0.35rem; color: var(--faint); font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.1em; text-transform: uppercase; }
.wiki-link { display: block; padding: 0.4rem 0.45rem; border-radius: 6px; color: var(--muted); font-size: 0.79rem; line-height: 1.35; }
.wiki-link:hover { background: rgba(255, 255, 255, 0.04); color: var(--text); }
.wiki-link.active { background: rgba(34, 211, 238, 0.1); color: var(--green-bright); }
.wiki-content { min-width: 0; }
.wiki-article { padding: clamp(1.4rem, 4vw, 2.6rem); }
.wiki-article .wiki-meta { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 1.2rem; color: var(--faint); font-size: 0.71rem; }
.wiki-article h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
.wiki-article .lead { font-size: 1rem; color: var(--muted); margin-bottom: 1.5rem; }
.wiki-article h2 { margin-top: 2.2rem; font-size: 1.35rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--line); }
.wiki-article h3 { margin-top: 1.6rem; font-size: 1.05rem; }
.wiki-toc { margin: 0 0 1.8rem; padding: 1rem 1.15rem; border: 1px solid var(--line); border-radius: 10px; background: rgba(255, 255, 255, 0.018); }
.wiki-toc-title { margin-bottom: 0.55rem; color: var(--faint); font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.12em; text-transform: uppercase; }
.wiki-toc ol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.25rem 1.4rem; margin: 0; padding-left: 1.15rem; }
.wiki-toc li { margin: 0; font-size: 0.82rem; line-height: 1.45; }
.wiki-toc a { color: var(--muted); }
.wiki-toc a:hover { color: var(--green-bright); }
.wiki-article p, .wiki-article li { color: #c3d5de; }
.wiki-article ul, .wiki-article ol { padding-left: 1.5rem; }
.wiki-article li { margin-bottom: 0.4rem; }
.wiki-article blockquote { margin: 1.4rem 0; padding: 0.9rem 1.1rem; border-left: 2px solid var(--green); background: rgba(34, 211, 238, 0.045); border-radius: 0 8px 8px 0; color: var(--muted); }
.wiki-article blockquote p:last-child { margin-bottom: 0; }
.wiki-article code { font-family: var(--font-mono); font-size: 0.84em; padding: 0.12em 0.35em; background: rgba(255, 255, 255, 0.07); border-radius: 4px; color: var(--green-bright); }
.wiki-article pre { padding: 1rem; border-radius: 9px; border: 1px solid var(--line); background: #060d12; overflow-x: auto; }
.wiki-article pre code { background: none; padding: 0; color: #cbd5e1; }
.wiki-article table { min-width: 480px; margin: 1.2rem 0; }
.wiki-article th { text-align: left; font-weight: 600; color: var(--muted); background: rgba(255, 255, 255, 0.03); }
.wiki-article th, .wiki-article td { padding: 0.6rem 0.8rem; border-bottom: 1px solid var(--line); font-size: 0.85rem; }
.wiki-nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.wiki-nav a { display: flex; flex-direction: column; padding: 0.8rem 1rem; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); min-width: 180px; }
.wiki-nav a:hover { border-color: rgba(34, 211, 238, 0.3); }
.wiki-nav small { display: flex; align-items: center; gap: 0.35rem; color: var(--faint); font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase; }
.wiki-nav a.next small { justify-content: flex-end; }
.wiki-nav small svg { width: 13px; height: 13px; flex-shrink: 0; }
.wiki-nav strong { color: var(--text); font-size: 0.83rem; font-weight: 600; margin-top: 0.2rem; }
.wiki-nav a.next { text-align: right; margin-left: auto; }

.wiki-jump {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.4rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(120deg, rgba(34, 211, 238, 0.04), transparent 55%), var(--panel);
}
.wiki-jump-links { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.wiki-jump-links .chip { color: var(--muted); }
.wiki-jump-links .chip:hover { color: var(--green-bright); border-color: rgba(34, 211, 238, 0.3); }
.wiki-jump-links .chip span { color: var(--faint); font-family: var(--font-mono); font-size: 0.62rem; }
.wiki-section + .wiki-section { margin-top: 2.2rem; }
.wiki-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.8rem; }
.wiki-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 0.85rem;
  align-items: start;
  padding: 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.02), transparent 60%), var(--panel);
  color: var(--text);
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}
.wiki-card:hover { border-color: rgba(34, 211, 238, 0.28); background: var(--panel-2); color: var(--text); transform: translateY(-2px); }
.wiki-card-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid rgba(34, 211, 238, 0.18);
  background: rgba(34, 211, 238, 0.07);
  color: var(--green);
}
.wiki-card-icon svg { width: 21px; height: 21px; }
.wiki-card:nth-child(2n) .wiki-card-icon { color: var(--gold); border-color: rgba(251, 191, 36, 0.18); background: var(--gold-soft); }
.wiki-card:nth-child(3n) .wiki-card-icon { color: var(--purple); border-color: rgba(167, 139, 250, 0.18); background: rgba(167, 139, 250, 0.07); }
.wiki-card-body { min-width: 0; }
.wiki-card .wiki-card-cat { color: var(--green); font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 0.35rem; }
.wiki-card h3 { font-size: 1rem; margin-bottom: 0.3rem; }
.wiki-card p { color: var(--muted); font-size: 0.8rem; margin: 0; line-height: 1.55; }
.wiki-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; margin-top: 0.8rem; color: var(--faint); font-size: 0.68rem; }
.wiki-card-foot svg { width: 14px; height: 14px; transition: color 0.18s ease, transform 0.18s ease; }
.wiki-card:hover .wiki-card-foot svg { color: var(--green-bright); transform: translateX(3px); }

/* ==========================================================================
   Shop
   ========================================================================== */

.shop-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; align-items: stretch; }
.rank-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(165deg, color-mix(in srgb, var(--rank-color, var(--green)) 7%, transparent), transparent 42%),
    var(--panel);
  padding: 1.5rem;
  overflow: hidden;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}
.rank-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, var(--rank-color, var(--green)), transparent 85%);
}
.rank-card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--rank-color, var(--green)) 40%, transparent); }
.rank-card.featured {
  border-color: color-mix(in srgb, var(--rank-color, var(--purple)) 45%, var(--line));
  box-shadow: 0 22px 70px -34px color-mix(in srgb, var(--rank-color, var(--purple)) 55%, transparent);
}
.rank-featured-label {
  position: absolute;
  top: 0;
  right: 1.4rem;
  padding: 0.32rem 0.65rem;
  border-radius: 0 0 6px 6px;
  background: var(--rank-color, var(--purple));
  color: #0b0612;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.rank-card .rank-name { font-family: var(--font-display); font-size: 1.55rem; letter-spacing: 0.02em; color: var(--rank-color, var(--green)); margin-bottom: 0.2rem; }
.rank-card .rank-tagline { color: var(--muted); font-size: 0.82rem; min-height: 2.8em; margin: 0 0 1.2rem; }
.rank-price { display: flex; align-items: baseline; gap: 0.35rem; margin-bottom: 1.2rem; }
.rank-price strong { font-family: var(--font-display); font-size: 2.1rem; letter-spacing: -0.03em; }
.rank-price span { color: var(--faint); font-size: 0.72rem; }
.rank-perks { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: 0.55rem; }
.rank-perks li { display: flex; gap: 0.55rem; color: var(--muted); font-size: 0.81rem; line-height: 1.5; }
.rank-perks li svg { width: 15px; height: 15px; flex-shrink: 0; margin-top: 3px; color: var(--rank-color, var(--green)); }
.rank-actions { margin-top: auto; }
.rank-note { margin-top: 0.65rem; color: var(--faint); font-size: 0.66rem; text-align: center; }

.shop-note {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.9rem 1.1rem;
  border: 1px solid rgba(251, 191, 36, 0.18);
  border-radius: 9px;
  background: var(--gold-soft);
  color: #fde68a;
  font-size: 0.8rem;
}
.shop-note svg { width: 17px; height: 17px; flex-shrink: 0; margin-top: 1px; color: var(--gold); }
.shop-note a { color: var(--gold); text-decoration: underline; text-underline-offset: 2px; }
.shop-note-launch { background: rgba(251, 191, 36, 0.07); }

.compare-wrap { border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; background: var(--panel); }
.compare { width: 100%; border-collapse: collapse; min-width: 620px; }
.compare th, .compare td { padding: 0.8rem 1rem; border-bottom: 1px solid var(--line); text-align: center; font-size: 0.82rem; }
.compare tbody tr:last-child td { border-bottom: 0; }
.compare thead th { position: sticky; top: 0; background: var(--panel-2); font-family: var(--font-display); font-size: 0.83rem; letter-spacing: 0.04em; }
.compare thead th:first-child, .compare tbody td:first-child { text-align: left; color: var(--muted); font-weight: 600; }
.compare tbody tr:hover { background: rgba(255, 255, 255, 0.02); }
.compare .featured-col { background: rgba(167, 139, 250, 0.04); }
.compare .yes { color: var(--green); font-weight: 700; }
.compare .no { color: var(--faint); }

.kit-details { margin-top: 0.7rem; border-top: 1px solid var(--line); padding-top: 0.7rem; }
.kit-details summary { cursor: pointer; color: var(--faint); font-size: 0.7rem; font-weight: 600; letter-spacing: 0.03em; list-style: none; }
.kit-details summary::-webkit-details-marker { display: none; }
.kit-details summary::before { content: "+"; display: inline-block; width: 1rem; color: var(--rank-color, var(--green)); }
.kit-details[open] summary::before { content: "−"; }
.kit-list { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.6rem; }
.kit-item { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.17rem 0.4rem; border-radius: 4px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.025); color: var(--muted); font-size: 0.62rem; font-family: var(--font-mono); }
.kit-item .kit-cube { width: 8px; height: 8px; border-radius: 2px; background: var(--kit-color, var(--faint)); }

/* ==========================================================================
   Account, admin, auth
   ========================================================================== */

.account-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 1rem; align-items: start; }
.account-card { padding: 1.4rem; }
.account-avatar-block { display: flex; align-items: center; gap: 0.9rem; padding-bottom: 1.1rem; border-bottom: 1px solid var(--line); margin-bottom: 1.1rem; }
.account-avatar-block h2 { font-size: 1.1rem; margin-bottom: 0.15rem; }
.account-list { display: grid; gap: 0.55rem; font-size: 0.8rem; }
.account-list div { display: flex; justify-content: space-between; gap: 1rem; color: var(--faint); }
.account-list strong { color: var(--muted); font-weight: 500; }
.account-list span svg { width: 13px; height: 13px; vertical-align: -2px; margin-right: 0.25rem; color: var(--green); }

/* Interactive Minecraft models */
.model-stage { position: relative; overflow: hidden; border: 1px solid var(--line); background:
  radial-gradient(120% 90% at 50% 18%, rgba(34, 211, 238, 0.12), transparent 62%),
  rgba(3, 10, 16, 0.55); }
.model-stage canvas { position: absolute; inset: 0; display: block; width: 100% !important; height: 100% !important; }
.model-status { position: absolute; inset: 0; display: grid; place-items: center; padding: 0.7rem; color: var(--faint); font-size: 0.65rem; text-align: center; pointer-events: none; }
.model-hint { position: absolute; right: 0.42rem; bottom: 0.32rem; color: var(--faint); font-size: 0.55rem; letter-spacing: 0.02em; pointer-events: none; opacity: 0; transition: opacity 0.2s ease; }
.model-stage.is-ready .model-hint { opacity: 0.75; }
.model-stage.is-failed .model-status { color: #fca5a5; }
.profile-skin-stage { cursor: grab; }
.profile-skin-stage:active { cursor: grabbing; }

/* Linked pets on a player profile */
.pet-toolbar { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin: 0 0 0.65rem; }
.pet-control { display: inline-flex; align-items: center; gap: 0.35rem; color: var(--faint); font-size: 0.65rem; }
.pet-control select { min-height: 30px; border: 1px solid var(--line); border-radius: 7px; background: rgba(0, 0, 0, 0.2); color: var(--text); padding: 0.28rem 0.45rem; font-size: 0.72rem; cursor: pointer; }
.pet-control select:focus { outline: none; border-color: rgba(34, 211, 238, 0.45); }
.pet-toolbar .filter-count { margin-left: auto; }
.pet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 0.75rem; }
.pet-card { display: flex; flex-direction: column; gap: 0.55rem; align-items: stretch; min-width: 0; padding: 0.65rem; border: 1px solid var(--line); border-radius: 10px; background: rgba(255, 255, 255, 0.015); }
.pet-card.is-dead { border-color: rgba(248, 113, 113, 0.18); background: rgba(248, 113, 113, 0.03); }
.pet-stage { height: 190px; border-radius: 9px; cursor: grab; }
.pet-stage:active { cursor: grabbing; }
.pet-card.is-dead .pet-stage { filter: grayscale(0.82); opacity: 0.7; }
.pet-main { min-width: 0; }
.pet-name { display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; font-size: 0.84rem; font-weight: 600; line-height: 1.25; }
.pet-name .chip { padding: 0.03rem 0.34rem; font-size: 0.54rem; }
.pet-name-btn { appearance: none; max-width: 100%; margin: 0; padding: 0 0 1px; border: 0; border-bottom: 1px dashed transparent; background: none; color: inherit; font: inherit; line-height: inherit; text-align: left; cursor: text; }
.pet-name-btn:hover { color: var(--green-bright); border-bottom-color: rgba(34, 211, 238, 0.45); }
.pet-name-btn:focus-visible { outline: 1px solid rgba(34, 211, 238, 0.55); outline-offset: 2px; }
.pet-rename { display: flex; flex: 1 1 100%; align-items: center; gap: 0.3rem; min-width: 0; }
.pet-rename-input { flex: 1; min-width: 0; height: 28px; padding: 0 0.45rem; border: 1px solid var(--line-strong); border-radius: 6px; background: rgba(0, 0, 0, 0.24); color: var(--text); font: inherit; font-size: 0.76rem; }
.pet-rename-input:focus { outline: none; border-color: rgba(34, 211, 238, 0.55); }
.pet-rename .btn { min-height: 28px; padding: 0.2rem 0.52rem; font-size: 0.64rem; }
.pet-type { margin-top: 0.1rem; color: var(--faint); font-size: 0.65rem; }
.pet-meta { display: flex; justify-content: space-between; gap: 0.45rem; flex-wrap: wrap; margin-top: 0.32rem; color: var(--faint); font-family: var(--font-mono); font-size: 0.58rem; }
.pet-meta strong { color: var(--muted); font-weight: 500; }
.pet-card .progress { margin-top: 0.35rem; }
.pet-actions { display: flex; gap: 0.35rem; flex-wrap: wrap; margin-top: 0; padding-top: 0.5rem; border-top: 1px solid var(--line); }
.pet-actions .btn { min-height: 29px; padding: 0.28rem 0.5rem; font-size: 0.68rem; }
.pet-actions .btn svg { width: 13px; height: 13px; }
.link-code-box {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px dashed rgba(34, 211, 238, 0.35);
  border-radius: 9px;
  background: rgba(34, 211, 238, 0.045);
  text-align: center;
}
.link-code { font-family: var(--font-mono); font-size: 1.7rem; letter-spacing: 0.24em; color: var(--green-bright); margin: 0.45rem 0; }
.link-code-command { font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); background: rgba(0, 0, 0, 0.25); border: 1px solid var(--line); padding: 0.45rem 0.6rem; border-radius: 6px; display: inline-block; }

.order-list { display: grid; gap: 0.6rem; }
.order-row { display: flex; align-items: center; gap: 0.8rem; padding: 0.8rem 0.9rem; border: 1px solid var(--line); border-radius: 9px; background: rgba(255, 255, 255, 0.015); flex-wrap: wrap; }
.order-row .order-main { flex: 1; min-width: 150px; }
.order-row .order-title { font-weight: 600; font-size: 0.85rem; display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.order-row .order-meta { color: var(--faint); font-size: 0.68rem; margin-top: 0.2rem; }
.order-row .order-note { flex-basis: 100%; color: var(--muted); font-size: 0.74rem; padding-top: 0.4rem; border-top: 1px solid var(--line); }
.direct-address { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.78rem; word-break: break-all; line-height: 1.5; }

/* Minecraft legacy text colors and formatting */
.mc-text { display: inline; }
.mc-bold { font-weight: 700; }
.mc-italic { font-style: italic; }
.mc-underline { text-decoration: underline; }
.mc-strike { text-decoration: line-through; }
.mc-underline.mc-strike { text-decoration: underline line-through; }
.mc-black { color: #000; text-shadow: 0 0 1px rgba(255, 255, 255, 0.45); }
.mc-dark-blue { color: #0000aa; }
.mc-dark-green { color: #00aa00; }
.mc-dark-aqua { color: #00aaaa; }
.mc-dark-red { color: #aa0000; }
.mc-dark-purple { color: #aa00aa; }
.mc-gold { color: #ffaa00; }
.mc-gray { color: #aaaaaa; }
.mc-dark-gray { color: #555555; }
.mc-blue { color: #5555ff; }
.mc-green { color: #55ff55; }
.mc-aqua { color: #55ffff; }
.mc-red { color: #ff5555; }
.mc-light-purple { color: #ff55ff; }
.mc-yellow { color: #ffff55; }
.mc-white { color: #fff; }

/* Guided progression editor */
.pg-topbar { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 0.9rem; }
.pg-topbar-note { display: inline-flex; align-items: center; gap: 0.35rem; color: var(--faint); font-size: 0.72rem; }
.pg-topbar-note svg { width: 14px; height: 14px; color: var(--green); }
.pg-guide { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.5rem; margin-bottom: 1rem; }
.pg-guide-step { display: flex; gap: 0.55rem; padding: 0.6rem 0.7rem; border: 1px solid var(--line); border-radius: 9px; background: rgba(255, 255, 255, 0.015); }
.pg-guide-step > span { display: grid; place-items: center; flex: 0 0 auto; width: 1.35rem; height: 1.35rem; border-radius: 50%; background: rgba(34, 211, 238, 0.1); color: var(--green-bright); font-family: var(--font-mono); font-size: 0.66rem; font-weight: 700; }
.pg-guide-step strong { display: block; font-size: 0.74rem; line-height: 1.3; }
.pg-guide-step p { margin: 0.1rem 0 0; color: var(--faint); font-size: 0.66rem; line-height: 1.4; }
.pg-layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 0.9rem; align-items: start; }
.pg-rail { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 0.5rem; min-width: 0; }
.pg-rail-top { display: flex; gap: 0.4rem; }
.pg-search { position: relative; flex: 1; min-width: 0; }
.pg-search svg { position: absolute; left: 0.55rem; top: 50%; width: 14px; height: 14px; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.pg-search .pg-input { padding-left: 1.75rem; }
.pg-list { display: flex; flex-direction: column; gap: 0.3rem; max-height: calc(100vh - 280px); overflow: auto; padding-right: 2px; }
.pg-card { display: flex; flex: 0 0 68px; align-items: center; gap: 0.55rem; height: 68px; min-height: 68px; padding: 0.45rem 0.6rem; border: 1px solid var(--line); border-radius: 8px; background: rgba(255, 255, 255, 0.014); color: var(--text); text-align: left; overflow: hidden; }
.pg-card:hover { border-color: var(--line-strong); }
.pg-card.active { border-color: rgba(34, 211, 238, 0.45); background: rgba(34, 211, 238, 0.06); }
.pg-card.dirty { border-style: dashed; }
.pg-card-icon { position: relative; display: grid; place-items: center; flex: 0 0 auto; width: 34px; height: 34px; border: 1px solid rgba(34, 211, 238, 0.2); border-radius: 7px; background: rgba(34, 211, 238, 0.07); }
.pg-cube { position: absolute; inset: 6px; border-radius: 3px; background: linear-gradient(135deg, rgba(34, 211, 238, 0.55), rgba(14, 90, 107, 0.45)); opacity: 0.55; }
.pg-glyph { position: relative; color: var(--green-bright); font-family: var(--font-mono); font-size: 0.62rem; font-weight: 700; letter-spacing: 0.02em; }
.pg-card-text { display: flex; flex-direction: column; gap: 0.06rem; min-width: 0; flex: 1; }
.pg-card-name { display: block; font-size: 0.82rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pg-card-sub { display: block; color: var(--faint); font-family: var(--font-mono); font-size: 0.6rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pg-card-meta { display: block; color: var(--faint); font-size: 0.6rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pg-card-state { flex: 0 0 8px; display: flex; justify-content: center; }
.pg-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 6px rgba(251, 191, 36, 0.5); }
.pg-rail-empty { padding: 0.8rem; color: var(--faint); font-size: 0.72rem; }
.pg-rail-note { display: flex; gap: 0.35rem; align-items: flex-start; margin: 0; padding: 0.5rem 0.55rem; border: 1px solid var(--line); border-radius: 8px; color: var(--faint); font-size: 0.64rem; line-height: 1.45; }
.pg-rail-note svg { width: 13px; height: 13px; flex: 0 0 auto; margin-top: 0.1rem; color: var(--green); }
.pg-main { min-width: 0; }
.pg-editor { border: 1px solid var(--line); border-radius: 11px; background: var(--panel); }
.pg-editor-empty { padding: 1rem; }
.pg-editor-head { display: flex; align-items: flex-start; gap: 0.75rem; flex-wrap: wrap; padding: 0.95rem 1rem; border-bottom: 1px solid var(--line); }
.pg-editor-icon { position: relative; display: grid; place-items: center; flex: 0 0 auto; width: 40px; height: 40px; border: 1px solid rgba(34, 211, 238, 0.22); border-radius: 8px; background: rgba(34, 211, 238, 0.08); }
.pg-editor-icon .pg-cube { inset: 7px; }
.pg-editor-icon .pg-glyph { font-size: 0.72rem; }
.pg-editor-title { flex: 1; min-width: 180px; }
.pg-editor-title .eyebrow { margin-bottom: 0.15rem; }
.pg-editor-title h2 { font-size: 1.25rem; line-height: 1.2; }
.pg-editor-title p { margin: 0.2rem 0 0; overflow-wrap: anywhere; }
.pg-editor-title .small.faint { font-family: var(--font-mono); font-size: 0.64rem; }
.pg-head-actions { display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; }
.pg-badge { color: var(--gold); }
.pg-step { padding: 1rem; border-bottom: 1px solid var(--line); }
.pg-step:last-of-type { border-bottom: 0; }
.pg-step-head { display: flex; align-items: flex-start; gap: 0.55rem; flex-wrap: wrap; margin-bottom: 0.8rem; }
.pg-step-head > div { flex: 1; min-width: 180px; }
.pg-step-head h3 { font-size: 0.94rem; }
.pg-step-head p { margin: 0.15rem 0 0; color: var(--faint); font-size: 0.7rem; line-height: 1.45; }
.pg-step-num { display: grid; place-items: center; flex: 0 0 auto; width: 1.55rem; height: 1.55rem; border: 1px solid rgba(34, 211, 238, 0.25); border-radius: 50%; background: rgba(34, 211, 238, 0.08); color: var(--green-bright); font-family: var(--font-mono); font-size: 0.72rem; font-weight: 700; }
.pg-grid { display: grid; gap: 0.7rem; }
.pg-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pg-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pg-input { width: 100%; min-height: 38px; padding: 0.45rem 0.6rem; border: 1px solid var(--line-strong); border-radius: 7px; background: rgba(0, 0, 0, 0.2); color: var(--text); font-family: inherit; font-size: 0.8rem; }
.pg-input:focus { outline: none; border-color: rgba(34, 211, 238, 0.45); box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.07); }
.pg-input:disabled { opacity: 0.55; }
.pg-mono { font-family: var(--font-mono); font-size: 0.76rem; }
.pg-label { display: block; margin-bottom: 0.3rem; color: var(--muted); font-size: 0.7rem; font-weight: 600; }
.pg-picker-row { display: flex; gap: 0.35rem; }
.pg-picker-row .pg-input { flex: 1; min-width: 0; }
.pg-formula { margin-top: 0.2rem; }
.pg-presets { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.45rem; }
.pg-presets .chip { cursor: pointer; }
.pg-formula-preview { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.5rem; }
.pg-preview-chip { display: inline-flex; gap: 0.35rem; align-items: baseline; padding: 0.22rem 0.5rem; border: 1px solid var(--line); border-radius: 6px; background: rgba(0, 0, 0, 0.14); color: var(--faint); font-family: var(--font-mono); font-size: 0.62rem; }
.pg-preview-chip strong { color: var(--green-bright); font-weight: 600; }
.pg-preview-chip.bad { color: #fca5a5; border-color: rgba(248, 113, 113, 0.3); }
.pg-actions { display: grid; gap: 0.55rem; }
.pg-action { padding: 0.7rem 0.75rem; border: 1px solid var(--line); border-radius: 9px; background: rgba(0, 0, 0, 0.1); }
.pg-action-head { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.55rem; }
.pg-action-num { display: grid; place-items: center; flex: 0 0 auto; width: 1.5rem; height: 1.5rem; border-radius: 6px; background: rgba(34, 211, 238, 0.08); color: var(--green-bright); font-family: var(--font-mono); font-size: 0.68rem; font-weight: 700; }
.pg-action-event { flex: 0 1 260px; min-width: 180px; }
.pg-action-event .pg-input { min-height: 34px; padding: 0.3rem 0.5rem; font-size: 0.78rem; }
.pg-action-hint { flex: 1; min-width: 140px; color: var(--faint); font-size: 0.66rem; }
.pg-action .field { margin-bottom: 0; }
.pg-chips { display: flex; flex-wrap: wrap; gap: 0.2rem; margin-top: 0.45rem; }
.pg-icon-btn { padding: 0.35rem 0.5rem; }
.pg-empty { padding: 0.9rem; border: 1px dashed var(--line); border-radius: 9px; color: var(--faint); font-size: 0.75rem; text-align: center; }
.pg-defaults { padding: 0.75rem; border: 1px solid var(--line); border-radius: 9px; background: rgba(255, 255, 255, 0.012); }
.pg-subhead { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.55rem; }
.pg-subhead strong { display: block; font-size: 0.8rem; }
.pg-subhead .small { display: block; margin-top: 0.05rem; }
.pg-levels-head { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin: 0.9rem 0 0.45rem; }
.pg-legend { display: inline-flex; align-items: center; gap: 0.3rem; color: var(--faint); font-size: 0.64rem; }
.pg-legend-dot { width: 8px; height: 8px; border-radius: 2px; border: 1px solid var(--line-strong); background: rgba(255, 255, 255, 0.04); }
.pg-legend-dot.custom { border-color: rgba(34, 211, 238, 0.5); background: rgba(34, 211, 238, 0.35); }
.pg-level-grid { display: grid; grid-template-columns: repeat(auto-fill, 48px); justify-content: start; gap: 0.28rem; max-height: 276px; overflow: auto; padding: 0.15rem 0.2rem 0.2rem 0; }
.pg-tile { position: relative; display: grid; place-items: center; width: 48px; height: 40px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: rgba(255, 255, 255, 0.025); color: var(--muted); font-family: var(--font-mono); font-size: 0.7rem; font-weight: 600; line-height: 1; }
.pg-tile:hover { border-color: var(--line-strong); color: var(--text); }
.pg-tile.custom { border-color: rgba(34, 211, 238, 0.3); background: rgba(34, 211, 238, 0.07); color: var(--green-bright); }
.pg-tile.active { border-color: rgba(34, 211, 238, 0.7); box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.12); color: #fff; }
.pg-tile-dot { position: absolute; top: 4px; right: 4px; width: 4px; height: 4px; border-radius: 50%; background: var(--green-bright); }
.pg-max-row { display: flex; align-items: center; gap: 0.25rem; flex-wrap: wrap; }
.pg-max-row .pg-input { width: 86px; text-align: center; }
.pg-max-row .btn { min-width: 40px; }
.pg-action-tools { display: flex; align-items: center; gap: 0.2rem; margin-left: auto; }
.pg-action-tools .btn { padding: 0.3rem 0.45rem; font-size: 0.66rem; }
.pg-level-toolbar { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin: 0.9rem 0 0.5rem; }
.pg-segmented { display: inline-flex; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.pg-seg { padding: 0.34rem 0.62rem; border: 0; background: transparent; color: var(--faint); font-size: 0.7rem; font-weight: 600; cursor: pointer; }
.pg-seg:hover { color: var(--text); }
.pg-seg.active { background: rgba(34, 211, 238, 0.1); color: var(--green-bright); }
.pg-jump { display: flex; align-items: center; gap: 0.25rem; }
.pg-jump .pg-input { width: 108px; min-height: 32px; padding: 0.3rem 0.45rem; }
.pg-level-table-wrap { max-height: 348px; overflow: auto; border: 1px solid var(--line); border-radius: 9px; }
.pg-level-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 0.72rem; }
.pg-level-table th { position: sticky; top: 0; z-index: 1; padding: 0.45rem 0.5rem; background: var(--panel); border-bottom: 1px solid var(--line); color: var(--faint); font-family: var(--font-mono); font-size: 0.56rem; letter-spacing: 0.07em; text-transform: uppercase; text-align: left; }
.pg-level-table td { height: 34px; padding: 0.2rem 0.5rem; border-bottom: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pg-level-table tr:last-child td { border-bottom: 0; }
.pg-level-table tbody tr { cursor: pointer; }
.pg-level-table tr.custom { background: rgba(34, 211, 238, 0.04); }
.pg-level-table tr.active { background: rgba(34, 211, 238, 0.1); box-shadow: inset 2px 0 0 rgba(34, 211, 238, 0.7); }
.pg-level-table th:nth-child(1), .pg-level-table td:nth-child(1) { width: 60px; }
.pg-level-table th:nth-child(2), .pg-level-table td:nth-child(2) { width: 16%; }
.pg-level-table th:nth-child(3), .pg-level-table td:nth-child(3) { width: 92px; }
.pg-level-table th:nth-child(4), .pg-level-table td:nth-child(4) { width: 56px; }
.pg-level-table th:nth-child(5), .pg-level-table td:nth-child(5) { width: 84px; }
.pg-level-table th:nth-child(6), .pg-level-table td:nth-child(6) { width: 70px; }
.pg-level-table th:nth-child(7), .pg-level-table td:nth-child(7) { width: 74px; }
.pg-level-table th:nth-child(8), .pg-level-table td:nth-child(8) { width: 78px; }
.pg-level-table th:nth-child(9), .pg-level-table td:nth-child(9) { width: 62px; }
.pg-level-num button { width: 38px; padding: 0.14rem 0; border: 1px solid var(--line); border-radius: 5px; background: rgba(255, 255, 255, 0.03); color: var(--text); font-family: var(--font-mono); font-size: 0.7rem; cursor: pointer; }
.pg-level-num button:hover { border-color: rgba(34, 211, 238, 0.45); color: var(--green-bright); }
.pg-level-money { font-family: var(--font-mono); font-size: 0.68rem; color: var(--muted); }
.pg-level-count { font-family: var(--font-mono); color: var(--faint); text-align: center; }
.pg-level-state { text-align: center; }
.pg-pill { display: inline-flex; padding: 0.1rem 0.4rem; border: 1px solid rgba(34, 211, 238, 0.25); border-radius: 4px; background: rgba(34, 211, 238, 0.1); color: var(--green-bright); font-size: 0.56rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.pg-pill.ghost { background: transparent; border-color: var(--line); color: var(--faint); }
.pg-level-edit { text-align: right; }
.pg-level-edit .btn { padding: 0.18rem 0.45rem; font-size: 0.62rem; }
.pg-preset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0.4rem; }
.pg-preset-card { display: flex; flex-direction: column; gap: 0.18rem; min-height: 90px; padding: 0.6rem 0.65rem; border: 1px solid var(--line); border-radius: 8px; background: rgba(255, 255, 255, 0.02); color: var(--text); text-align: left; cursor: pointer; }
.pg-preset-card:hover { border-color: rgba(34, 211, 238, 0.45); background: rgba(34, 211, 238, 0.05); }
.pg-preset-name { font-size: 0.8rem; font-weight: 600; }
.pg-preset-hint { color: var(--faint); font-size: 0.66rem; line-height: 1.35; }
.pg-preset-meta { margin-top: auto; color: var(--green-bright); font-family: var(--font-mono); font-size: 0.58rem; }
.pg-bulk-fields [hidden] { display: none; }
.pg-bulk-note { padding: 0.5rem 0.6rem; border: 1px solid rgba(34, 211, 238, 0.2); border-radius: 7px; background: rgba(34, 211, 238, 0.05); color: var(--muted); font-size: 0.7rem; line-height: 1.4; }
.pg-bulk-amount { width: 88px; flex: 0 0 88px; }
.pg-input { min-width: 0; }
.pg-reward { margin-top: 0.75rem; padding: 0.85rem; border: 1px solid var(--line); border-radius: 10px; background: rgba(0, 0, 0, 0.14); }
.pg-reward-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.pg-reward-head h4 { font-size: 0.9rem; }
.pg-reward-head .eyebrow { margin-bottom: 0.1rem; font-size: 0.6rem; }
.pg-reward-actions { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.pg-reward .field { margin-bottom: 0.7rem; }
.pg-reward .checkline { margin-bottom: 0.4rem; }
.pg-subsection { margin-top: 0.85rem; padding-top: 0.7rem; border-top: 1px solid var(--line); }
.pg-row { display: grid; grid-template-columns: minmax(0, 2fr) 96px minmax(0, 2fr) 34px; gap: 0.4rem; align-items: end; margin-bottom: 0.45rem; }
.pg-row .field { margin-bottom: 0; }
.pg-row-1 { grid-template-columns: minmax(0, 1fr) auto; }
.pg-row-skill { grid-template-columns: minmax(0, 1fr) 110px auto; align-items: center; }
.pg-amount { max-width: 110px; }
.pg-item-advanced { grid-column: 1 / -1; padding: 0.5rem 0.6rem; border: 1px dashed var(--line); border-radius: 7px; }
.pg-item-advanced > summary { cursor: pointer; color: var(--faint); font-size: 0.66rem; list-style: none; }
.pg-item-advanced > summary::-webkit-details-marker { display: none; }
.pg-item-advanced[open] > summary { margin-bottom: 0.55rem; color: var(--muted); }
.pg-ench-row { display: grid; grid-template-columns: minmax(0, 1fr) 76px auto; gap: 0.3rem; margin-bottom: 0.3rem; }
.pg-flags { display: flex; gap: 0.9rem; flex-wrap: wrap; align-items: center; margin-top: 0.2rem; }
.pg-flags .checkline .pg-input { width: 90px; }
.pg-item-advanced textarea.pg-input { min-height: 66px; resize: vertical; }
.pg-footer { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; padding: 0.8rem 1rem; border-top: 1px solid var(--line); background: rgba(255, 255, 255, 0.012); border-radius: 0 0 11px 11px; }
.pg-picker-search { margin-bottom: 0.5rem; }
.pg-picker-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 0.28rem; max-height: 46vh; overflow: auto; padding-right: 2px; }
.pg-option { display: flex; flex-direction: column; gap: 0.05rem; padding: 0.42rem 0.55rem; border: 1px solid var(--line); border-radius: 7px; background: rgba(255, 255, 255, 0.02); color: var(--text); text-align: left; }
.pg-option:hover { border-color: var(--line-strong); }
.pg-option.selected { border-color: rgba(34, 211, 238, 0.55); background: rgba(34, 211, 238, 0.1); }
.pg-option-name { font-size: 0.74rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pg-option-id { color: var(--faint); font-family: var(--font-mono); font-size: 0.56rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pg-picker-footer { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.6rem; }
.pg-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@media (max-width: 980px) {
  .pg-layout { grid-template-columns: 1fr; }
  .pg-rail { position: static; }
  .pg-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); max-height: 250px; }
  .pg-guide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .pg-grid-2, .pg-grid-3 { grid-template-columns: 1fr; }
  .pg-row, .pg-row-skill { grid-template-columns: 1fr; }
  .pg-amount { max-width: none; }
  .pg-guide { grid-template-columns: 1fr; }
  .pg-level-grid { grid-template-columns: repeat(auto-fill, 44px); }
  .pg-tile { width: 44px; height: 38px; }
  .pg-level-table { min-width: 640px; }
  .pg-level-table-wrap { overflow: auto; }
  .pg-action-tools { margin-left: 0; }
  .pg-editor-head { padding: 0.8rem; }
  .pg-step { padding: 0.8rem; }
  .pg-reward-head { flex-direction: column; }
}

.status-pill { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.15rem 0.45rem; border-radius: 4px; font-size: 0.6rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.status-pill.pending { background: rgba(251, 191, 36, 0.1); color: var(--gold); border: 1px solid rgba(251, 191, 36, 0.2); }
.status-pill.approved { background: rgba(34, 211, 238, 0.1); color: var(--green); border: 1px solid rgba(34, 211, 238, 0.2); }
.status-pill.denied { background: rgba(248, 113, 113, 0.08); color: #fca5a5; border: 1px solid rgba(248, 113, 113, 0.18); }
.status-pill.paid { background: rgba(52, 211, 153, 0.1); color: var(--green); border: 1px solid rgba(52, 211, 153, 0.22); }

.admin-summary { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.7rem; margin-bottom: 1rem; }
.summary-tile { display: flex; align-items: center; gap: 0.65rem; padding: 0.85rem 1rem; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.summary-tile-icon { display: grid; place-items: center; flex: 0 0 30px; width: 30px; height: 30px; border: 1px solid rgba(34, 211, 238, 0.18); border-radius: 7px; background: rgba(34, 211, 238, 0.06); color: var(--green); }
.summary-tile-icon svg { width: 15px; height: 15px; }
.summary-copy { min-width: 0; }
.summary-tile small { display: block; color: var(--faint); font-family: var(--font-mono); font-size: 0.59rem; letter-spacing: 0.08em; text-transform: uppercase; }
.summary-tile strong { font-family: var(--font-display); font-size: 1.5rem; font-weight: 650; overflow-wrap: anywhere; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(205px, 1fr)); gap: 0.7rem; }
.tool-card { display: flex; flex-direction: column; gap: 0.5rem; padding: 1rem; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: inherit; transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease; }
.tool-card:hover { border-color: rgba(34, 211, 238, 0.35); background: rgba(34, 211, 238, 0.03); transform: translateY(-1px); }
.tool-card-top { display: flex; align-items: center; gap: 0.55rem; }
.tool-card-icon { display: grid; place-items: center; flex: 0 0 32px; width: 32px; height: 32px; border: 1px solid rgba(34, 211, 238, 0.2); border-radius: 8px; background: rgba(34, 211, 238, 0.06); color: var(--green); }
.tool-card-icon svg { width: 16px; height: 16px; }
.tool-card strong { font-size: 0.86rem; }
.tool-card p { margin: 0; color: var(--faint); font-size: 0.72rem; line-height: 1.5; }
.tool-card-go { display: inline-flex; align-items: center; gap: 0.3rem; margin-top: auto; padding-top: 0.35rem; color: var(--green); font-size: 0.72rem; font-weight: 600; }
.tool-card-go svg { width: 13px; height: 13px; }
.admin-block { margin-bottom: 1.1rem; }
.admin-block:last-child { margin-bottom: 0; }
.props { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.admin-order-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; justify-content: flex-end; }
.admin-note-input { width: 100%; min-height: 34px; border: 1px solid var(--line); border-radius: 6px; background: rgba(0, 0, 0, 0.2); color: var(--text); padding: 0.35rem 0.5rem; font-size: 0.75rem; }

/* LuckPerms permission matrix */
.admin-perm-callout { border-color: rgba(34, 211, 238, 0.2); background: linear-gradient(120deg, rgba(34, 211, 238, 0.05), transparent 55%), var(--panel); }
.perm-target-card { margin-bottom: 0.85rem; }
.perm-target-row { display: flex; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }
.perm-search-row { display: flex; gap: 0.45rem; }
.perm-search-row input { flex: 1; }
.perm-player-results { margin-top: 0.8rem; }
.perm-player-list { display: grid; gap: 0.35rem; }
.perm-player-option {
  display: flex; align-items: center; gap: 0.65rem; width: 100%; text-align: left;
  padding: 0.55rem 0.7rem; border: 1px solid var(--line); border-radius: 8px;
  background: rgba(0, 0, 0, 0.14); color: var(--text);
}
.perm-player-option:hover, .perm-player-option.selected { border-color: rgba(34, 211, 238, 0.45); background: rgba(34, 211, 238, 0.06); }
.perm-player-main { display: flex; flex-direction: column; gap: 0.1rem; flex: 1; min-width: 0; }
.perm-player-main strong { font-size: 0.82rem; }
.perm-player-main span { color: var(--faint); font-size: 0.68rem; }
.perm-matrix-card { padding: 1.1rem; }
.perm-matrix-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 0.9rem; flex-wrap: wrap; }
.perm-matrix-head h2 { font-size: 1.2rem; }
.perm-context { display: flex; gap: 0.3rem; flex-wrap: wrap; }
.perm-table { width: 100%; border-collapse: collapse; }
.perm-table th { text-align: left; padding: 0.55rem 0.6rem; color: var(--faint); font-family: var(--font-mono); font-size: 0.58rem; letter-spacing: 0.08em; text-transform: uppercase; border-bottom: 1px solid var(--line); }
.perm-table td { padding: 0.7rem 0.6rem; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 0.78rem; }
.perm-table tr:last-child td { border-bottom: 0; }
.perm-table td strong { display: block; font-size: 0.82rem; }
.perm-table td .chip { margin-top: 0.35rem; }
.perm-node { color: var(--green-bright); font-size: 0.68rem; overflow-wrap: anywhere; }
.perm-select { min-width: 140px; border: 1px solid var(--line); border-radius: 7px; background: rgba(0, 0, 0, 0.25); color: var(--text); padding: 0.4rem 0.5rem; font-size: 0.75rem; }
.perm-select:focus { border-color: rgba(34, 211, 238, 0.45); outline: none; }
.perm-pill { display: inline-flex; align-items: center; padding: 0.16rem 0.48rem; border-radius: 4px; font-family: var(--font-mono); font-size: 0.6rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; }
.perm-pill.allow { color: #6ee7b7; background: rgba(52, 211, 153, 0.1); border: 1px solid rgba(52, 211, 153, 0.22); }
.perm-pill.deny { color: #fca5a5; background: rgba(248, 113, 113, 0.09); border: 1px solid rgba(248, 113, 113, 0.22); }
.perm-pill.unset { color: var(--faint); background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); }
.perm-inline.allow { color: #6ee7b7; }
.perm-legend { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 0.8rem; color: var(--faint); font-size: 0.68rem; }
.perm-legend span { display: inline-flex; align-items: center; gap: 0.35rem; }

/* LuckPerms GUI */
.lp-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 1rem; align-items: start; }
.lp-sidebar { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); overflow: hidden; position: sticky; top: 96px; }
.lp-sidebar-head { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; padding: 0.8rem 0.9rem; border-bottom: 1px solid var(--line); }
.lp-sidebar-head .eyebrow { margin: 0; }
.lp-sidebar-head strong { margin-left: 0.35rem; color: var(--muted); font-family: var(--font-mono); font-size: 0.7rem; }
.lp-sidebar-search { padding: 0.6rem; border-bottom: 1px solid var(--line); }
.lp-sidebar-search .lp-input { width: 100%; }
.lp-sidebar-list { max-height: 62vh; overflow-y: auto; padding: 0.35rem; }
.lp-group-btn { display: flex; flex-direction: column; gap: 0.15rem; width: 100%; text-align: left; border: 1px solid transparent; border-radius: 8px; background: transparent; padding: 0.5rem 0.6rem; color: var(--text); }
.lp-group-btn:hover { background: rgba(255, 255, 255, 0.03); }
.lp-group-btn.active { border-color: rgba(34, 211, 238, 0.35); background: rgba(34, 211, 238, 0.07); }
.lp-group-name { font-weight: 600; font-size: 0.82rem; }
.lp-group-meta { color: var(--faint); font-family: var(--font-mono); font-size: 0.6rem; }
.lp-input { min-height: 34px; border: 1px solid var(--line); border-radius: 7px; background: rgba(0, 0, 0, 0.25); color: var(--text); padding: 0.35rem 0.55rem; font-size: 0.76rem; }
.lp-input:focus { outline: none; border-color: rgba(34, 211, 238, 0.45); box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.07); }
.lp-detail { padding: 1.1rem; min-width: 0; }
.lp-detail-inner { min-width: 0; }
.lp-detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.lp-detail-head h2 { margin: 0.1rem 0 0.5rem; font-size: 1.45rem; }
.lp-meta { display: flex; gap: 0.3rem; flex-wrap: wrap; }
.lp-section { border-top: 1px solid var(--line); padding-top: 0.95rem; margin-top: 0.95rem; }
.lp-section h3 { margin: 0 0 0.15rem; font-size: 0.95rem; }
.lp-section .spread { align-items: flex-start; gap: 0.8rem; flex-wrap: wrap; }
.lp-inline-form { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.lp-inline-form .lp-input { flex: 1; min-width: 160px; }
.lp-add-node { margin: 0.7rem 0; }
.lp-add-node .lp-input { font-family: var(--font-mono); }
.lp-node-filter { max-width: 220px; }
.lp-parent-list { display: flex; flex-direction: column; gap: 0.35rem; margin-top: 0.6rem; }
.lp-parent-row { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; padding: 0.35rem 0.5rem; border: 1px solid var(--line); border-radius: 8px; background: rgba(0, 0, 0, 0.12); }
.lp-other { margin-top: 0.7rem; }
.lp-other summary { cursor: pointer; color: var(--muted); font-size: 0.76rem; }
.lp-impact { display: flex; gap: 0.3rem; flex-wrap: wrap; margin-top: 0.6rem; }
.lp-impact-pill { border: 1px solid var(--line); border-radius: 5px; padding: 0.15rem 0.45rem; font-size: 0.66rem; color: var(--faint); }
.lp-impact-pill.allow { color: #6ee7b7; border-color: rgba(52, 211, 153, 0.22); background: rgba(52, 211, 153, 0.07); }
.lp-impact-pill.deny { color: #fca5a5; border-color: rgba(248, 113, 113, 0.22); background: rgba(248, 113, 113, 0.06); }
.lp-player-results { margin-top: 0.4rem; }
.lp-node-table .perm-select { min-width: 118px; }
.lp-effective-display { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; margin-top: 0.75rem; }
.lp-effective-item { min-width: 0; padding: 0.55rem 0.7rem; border: 1px solid var(--line); border-radius: 8px; background: rgba(0, 0, 0, 0.14); }
.lp-effective-item .eyebrow { margin: 0 0 0.2rem; }
.lp-display-value { min-height: 1.4em; font-size: 0.9rem; line-height: 1.5; overflow-wrap: anywhere; }
.lp-meta-group { margin-top: 0.85rem; }
.lp-meta-group .eyebrow { margin: 0 0 0.35rem; }
.lp-raw-value { margin-top: 0.15rem; }
.lp-raw-value code { color: var(--faint); font-size: 0.62rem; }
.lp-meta-values { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.lp-meta-chip { max-width: 100%; gap: 0.35rem; white-space: normal; }
.lp-meta-chip code { color: var(--faint); font-family: var(--font-mono); font-size: 0.65rem; }
.lp-meta-chip span { overflow-wrap: anywhere; }
.lp-display-group { margin-top: 0.9rem; padding: 0.8rem; border: 1px solid var(--line); border-radius: 10px; background: rgba(0, 0, 0, 0.12); }
.lp-display-group-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.7rem; flex-wrap: wrap; margin-bottom: 0.55rem; }
.lp-display-group-head .eyebrow { margin: 0 0 0.1rem; }
.lp-display-list, .lp-meta-list { display: flex; flex-direction: column; gap: 0.4rem; }
.lp-display-entry { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.7rem; padding: 0.55rem 0.65rem; border: 1px solid var(--line); border-radius: 8px; background: rgba(255, 255, 255, 0.02); }
.lp-display-entry-main { flex: 1; min-width: 0; }
.lp-display-entry-meta { display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; margin-top: 0.35rem; }
.lp-display-entry-actions, .lp-meta-entry-actions { display: flex; align-items: center; gap: 0.3rem; flex-wrap: wrap; justify-content: flex-end; flex: 0 0 auto; }
.lp-display-entry-actions .btn, .lp-meta-entry-actions .btn { white-space: nowrap; }
.lp-raw-inline { color: var(--faint); font-family: var(--font-mono); font-size: 0.62rem; overflow-wrap: anywhere; }
.lp-empty-note { padding: 0.55rem 0.65rem; border: 1px dashed var(--line); border-radius: 8px; background: rgba(0, 0, 0, 0.08); }
.lp-meta-entry { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.7rem; padding: 0.5rem 0.65rem; border: 1px solid var(--line); border-radius: 8px; background: rgba(255, 255, 255, 0.02); }
.lp-meta-entry-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.lp-meta-entry-equals { color: var(--faint); }
.lp-meta-entry-value { color: var(--text); font-size: 0.8rem; overflow-wrap: anywhere; }
.lp-meta-entry-main .small { flex-basis: 100%; }
.lp-format-toolbar { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin: 0.15rem 0 0.45rem; padding: 0.45rem; border: 1px solid var(--line); border-radius: 8px; background: rgba(0, 0, 0, 0.14); }
.lp-format-title { color: var(--faint); font-family: var(--font-mono); font-size: 0.56rem; letter-spacing: 0.08em; text-transform: uppercase; flex: 0 0 auto; }
.lp-format-colors, .lp-format-styles { display: flex; align-items: center; gap: 0.25rem; flex-wrap: wrap; }
.lp-format-styles { padding-left: 0.5rem; border-left: 1px solid var(--line); }
.lp-format-swatch { width: 22px; height: 22px; border-radius: 5px; border: 1px solid rgba(255, 255, 255, 0.2); background: var(--swatch); padding: 0; cursor: pointer; transition: transform 0.12s ease, box-shadow 0.12s ease; }
.lp-format-swatch:hover { transform: translateY(-1px); box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.25); }
.lp-format-swatch:focus-visible, .lp-format-style:focus-visible { outline: 2px solid rgba(34, 211, 238, 0.6); outline-offset: 1px; }
.lp-format-style { min-width: 26px; height: 24px; padding: 0 0.35rem; border: 1px solid var(--line); border-radius: 5px; background: rgba(255, 255, 255, 0.035); color: var(--text); font-size: 0.7rem; line-height: 1; display: inline-grid; place-items: center; cursor: pointer; }
.lp-format-style:hover { border-color: rgba(34, 211, 238, 0.32); background: rgba(34, 211, 238, 0.07); }
.lp-format-style.is-wide { min-width: auto; padding: 0 0.45rem; }
.lp-format-underline { text-decoration: underline; }
.lp-format-strike { text-decoration: line-through; }
.lp-format-obfuscated { font-weight: 700; filter: blur(0.3px); }
.lp-char-count { float: right; color: var(--faint); font-family: var(--font-mono); font-size: 0.6rem; font-weight: 400; letter-spacing: 0; }
.lp-edit-note { display: flex; align-items: flex-start; gap: 0.4rem; margin-bottom: 0.8rem; padding: 0.5rem 0.65rem; border: 1px solid rgba(34, 211, 238, 0.18); border-radius: 7px; background: rgba(34, 211, 238, 0.05); color: var(--muted); font-size: 0.72rem; line-height: 1.45; }
.lp-edit-note svg { width: 14px; height: 14px; flex: 0 0 auto; margin-top: 0.1rem; color: var(--green-bright); }
.lp-editor-preview { display: flex; align-items: center; gap: 0.5rem; min-height: 2.2rem; margin: 0.15rem 0 0.85rem; padding: 0.4rem 0.55rem; border: 1px dashed var(--line); border-radius: 7px; background: rgba(0, 0, 0, 0.14); overflow-wrap: anywhere; }
.lp-editor-preview .eyebrow { flex: 0 0 auto; margin: 0; }
.lp-editor-preview .lp-display-preview-text { font-size: 1rem; }
.lp-editor-priority-field { max-width: 190px; }
.lp-editor-priority { max-width: 100%; }
.lp-modal-actions { display: flex; align-items: center; justify-content: flex-end; gap: 0.5rem; margin-top: 1rem; }
.lp-display-preview-text { font-size: 0.9rem; }
@media (max-width: 620px) {
  .lp-display-entry, .lp-meta-entry { flex-direction: column; }
  .lp-display-entry-actions, .lp-meta-entry-actions { justify-content: flex-start; }
  .lp-format-styles { padding-left: 0; border-left: 0; }
  .lp-modal-actions .btn { flex: 1; }
}
@media (max-width: 860px) {
  .lp-effective-display { grid-template-columns: 1fr; }
  .lp-layout { grid-template-columns: 1fr; }
  .lp-sidebar { position: static; }
  .lp-sidebar-list { max-height: 240px; }
  .lp-detail-head { flex-direction: column; }
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 1.2rem;
  background: rgba(3, 7, 10, 0.72);
  backdrop-filter: blur(8px);
  animation: fade-in 0.18s ease both;
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: min(460px, 100%);
  max-height: calc(100vh - 2.4rem);
  overflow-y: auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(165deg, rgba(34, 211, 238, 0.05), transparent 30%),
    #0b1720;
  box-shadow: 0 50px 120px -30px #000;
  padding: 1.7rem;
  animation: modal-in 0.25s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.modal.wide { width: min(620px, 100%); }
@keyframes modal-in { from { opacity: 0; transform: translateY(14px) scale(0.985); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.2rem; }
.modal-head h2 { font-size: 1.4rem; margin: 0 0 0.2rem; }
.modal-head p { color: var(--muted); font-size: 0.8rem; margin: 0; }
.modal-close { width: 32px; height: 32px; border-radius: 7px; border: 1px solid var(--line); background: transparent; color: var(--muted); display: grid; place-items: center; flex-shrink: 0; }
.modal-close:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.modal-close svg { width: 15px; height: 15px; }
.auth-account { display: flex; align-items: center; gap: 0.55rem; padding: 0.6rem 0.75rem; margin-bottom: 0.9rem; border: 1px solid rgba(34, 211, 238, 0.22); border-radius: 8px; background: rgba(34, 211, 238, 0.06); color: var(--text); font-size: 0.8rem; font-weight: 600; }
.auth-account::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--green-bright); box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12); flex-shrink: 0; }
.login-method-row { display: flex; align-items: center; gap: 0.75rem; }
.login-method-mark { width: 38px; height: 38px; display: grid; place-items: center; flex-shrink: 0; border: 1px solid rgba(34, 211, 238, 0.22); border-radius: 9px; background: rgba(34, 211, 238, 0.06); color: var(--green-bright); }
.login-method-mark svg { width: 17px; height: 17px; }
.login-method-copy { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 0.15rem; }
.login-method-copy strong { font-size: 0.9rem; }
.login-method-copy span { color: var(--muted); font-size: 0.74rem; line-height: 1.4; }
@media (max-width: 520px) {
  .login-method-row { flex-wrap: wrap; }
  .login-method-row .btn { width: 100%; }
}

.pin-pad { display: grid; width: min(100%, 260px); margin: 0 auto; gap: 0.5rem; }
.pin-screen-wrap { position: relative; }
.field .pin-pad input.pin-screen {
  height: 50px;
  padding: 0 2.4rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.28);
  text-align: center;
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 0.52em;
  font-variant-numeric: tabular-nums;
  cursor: default;
}
.field .pin-pad input.pin-screen:focus { outline: none; border-color: rgba(34, 211, 238, 0.45); box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.07); }
.pin-count { position: absolute; top: 50%; right: 0.7rem; transform: translateY(-50%); color: var(--faint); font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0; }
.pin-keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.4rem; }
.pin-key {
  min-height: 43px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  font-size: 1.02rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
}
.pin-key:hover { border-color: rgba(34, 211, 238, 0.32); background: rgba(34, 211, 238, 0.07); }
.pin-key:active { transform: translateY(1px); }
.pin-key-empty { visibility: hidden; pointer-events: none; }
.pin-key-back { color: var(--muted); }
.pin-key-back svg { width: 19px; height: 19px; }
.pin-pad.complete input.pin-screen { border-color: rgba(34, 211, 238, 0.42); box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.06); }

.method-current { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 1rem; padding: 0.7rem 0.8rem; border: 1px solid var(--line); border-radius: 10px; background: rgba(0, 0, 0, 0.14); }
.method-current-mark { width: 34px; height: 34px; display: grid; place-items: center; flex-shrink: 0; border-radius: 8px; background: rgba(34, 211, 238, 0.08); color: var(--green-bright); }
.method-current-mark svg { width: 16px; height: 16px; }
.method-current span { display: block; color: var(--faint); font-size: 0.66rem; }
.method-current strong { display: block; margin-top: 0.1rem; font-size: 0.86rem; }
.field-label { display: block; color: var(--muted); font-size: 0.73rem; font-weight: 600; margin-bottom: 0.35rem; }
.method-options { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.method-option { position: relative; display: flex; align-items: flex-start; gap: 0.5rem; padding: 0.7rem; border: 1px solid var(--line); border-radius: 10px; background: rgba(0, 0, 0, 0.14); cursor: pointer; }
.method-option input { position: absolute; opacity: 0; pointer-events: none; }
.method-option-body { display: flex; flex-direction: column; gap: 0.15rem; }
.method-option strong { font-size: 0.82rem; }
.method-option small { color: var(--muted); font-size: 0.68rem; line-height: 1.35; }
.method-option:has(input:checked) { border-color: rgba(34, 211, 238, 0.45); background: rgba(34, 211, 238, 0.07); box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.08); }
.method-step-actions { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.9rem; }
.method-step-actions .btn-primary { flex: 1; }
@media (max-width: 520px) {
  .method-options { grid-template-columns: 1fr; }
}
.field { margin-bottom: 0.85rem; }
.field label { display: block; color: var(--muted); font-size: 0.73rem; font-weight: 600; margin-bottom: 0.35rem; }
.field input, .field textarea, .field select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
  padding: 0.65rem 0.75rem;
  color: var(--text);
  font-size: 0.86rem;
}
.field textarea { min-height: 160px; resize: vertical; line-height: 1.55; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: rgba(34, 211, 238, 0.45); box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.07); }
.field .hint { color: var(--faint); font-size: 0.68rem; margin-top: 0.3rem; line-height: 1.45; }
.form-error { padding: 0.6rem 0.8rem; border-radius: 7px; border: 1px solid rgba(248, 113, 113, 0.25); background: rgba(248, 113, 113, 0.07); color: #fecaca; font-size: 0.78rem; margin-bottom: 0.8rem; }
.form-error:empty { display: none; }

/* ==========================================================================
   Search palette
   ========================================================================== */

.icon-btn {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(10, 18, 26, 0.6);
  color: var(--muted);
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.icon-btn:hover { color: var(--text); border-color: var(--line-strong); background: rgba(255, 255, 255, 0.05); }
.icon-btn svg { width: 17px; height: 17px; }

.modal.palette {
  width: min(700px, 100%);
  max-height: min(74vh, 660px);
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-self: start;
  margin-top: 7vh;
}
.modal.palette .modal-body { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.palette { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.palette-search {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.95rem 1.15rem;
  border-bottom: 1px solid var(--line);
}
.palette-search > svg { width: 18px; height: 18px; color: var(--muted); flex-shrink: 0; }
.palette-search input {
  flex: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 1rem; /* 16px keeps iOS from zooming the page on focus */
}
.palette-search input::placeholder { color: var(--faint); }
.palette-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 0.28rem;
  flex-shrink: 0;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  line-height: 1;
}
.palette-results {
  flex: 1;
  min-height: 150px;
  max-height: min(56vh, 480px);
  overflow-y: auto;
  padding: 0.45rem;
  overscroll-behavior: contain;
}
.palette-group + .palette-group { margin-top: 0.2rem; }
.palette-group-label {
  padding: 0.55rem 0.7rem 0.25rem;
  color: var(--faint);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.palette-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text);
}
.palette-item:hover,
.palette-item.active {
  color: var(--text);
  background: rgba(34, 211, 238, 0.08);
  border-color: rgba(34, 211, 238, 0.18);
}
.palette-item.active .palette-title { color: var(--green-bright); }
.palette-icon,
.palette-art {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
}
.palette-art { border: 0; background: transparent; }
.palette-art .avatar { width: 30px; height: 30px; border-radius: 7px; }
.palette-icon svg { width: 16px; height: 16px; }
.palette-icon img { width: 24px; height: 24px; object-fit: contain; image-rendering: pixelated; }
.palette-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.palette-title { font-size: 0.85rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.palette-sub { color: var(--faint); font-size: 0.7rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.palette-meta { flex-shrink: 0; color: var(--gold); font-size: 0.72rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.palette-empty { padding: 2.4rem 1.4rem; text-align: center; }
.palette-empty strong { display: block; margin-bottom: 0.3rem; font-size: 0.92rem; }
.palette-empty p { margin: 0; color: var(--muted); font-size: 0.78rem; }
.palette-foot {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.5rem 1rem;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 0.66rem;
}
.palette-foot span { display: inline-flex; align-items: center; gap: 0.28rem; white-space: nowrap; }
.palette-status { margin-left: auto; overflow: hidden; text-overflow: ellipsis; }
.palette-all { color: var(--green-bright); font-weight: 600; white-space: nowrap; }
.palette-all:hover { color: #a5f3fc; }

/* ==========================================================================
   Search results page
   ========================================================================== */

.search-page-form { margin-bottom: 1.4rem; }
@media (max-width: 560px) {
  .search-page-form .search { flex-basis: 100%; }
  .search-page-form .btn { width: 100%; }
}
.search-suggestions { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.8rem; }
.search-suggestions .chip:hover { color: var(--green-bright); border-color: rgba(34, 211, 238, 0.3); }
.search-quick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0.9rem; }
.search-quick-grid .feature-card { display: block; color: var(--text); }
.search-quick-grid .feature-card:hover { color: var(--text); }
.search-group { margin-top: 1.9rem; }
.search-group-head {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  flex-wrap: wrap;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line);
}
.search-group-head h2 { margin: 0; font-size: 1.05rem; }
.search-group-count { color: var(--faint); font-size: 0.7rem; }
.search-group-more {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.74rem;
  font-weight: 600;
}
.search-group-more svg { width: 14px; height: 14px; }
.search-result {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.35rem;
  border-bottom: 1px solid var(--line);
  color: var(--text);
}
.search-result:hover { color: var(--text); background: rgba(34, 211, 238, 0.04); }
.search-result:last-child { border-bottom: 0; }
.search-result-icon,
.search-result-art {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
}
.search-result-art { border: 0; background: transparent; }
.search-result-art .avatar { width: 34px; height: 34px; border-radius: 8px; }
.search-result-icon svg { width: 17px; height: 17px; }
.search-result-icon img { width: 26px; height: 26px; object-fit: contain; image-rendering: pixelated; }
.search-result-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.search-result-title { font-weight: 600; font-size: 0.9rem; }
.search-result-sub {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--faint);
  font-size: 0.74rem;
  line-height: 1.45;
}
.search-result-meta { flex-shrink: 0; color: var(--gold); font-size: 0.75rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.search-group-note { margin: 0.5rem 0 0; color: var(--faint); font-size: 0.7rem; }
@media (max-width: 560px) {
  .search-result { gap: 0.6rem; padding: 0.65rem 0.2rem; }
  .search-result-title { font-size: 0.85rem; }
  .search-result-sub { font-size: 0.7rem; }
}

/* ==========================================================================
   API docs and code
   ========================================================================== */

.docs-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 1.3rem; align-items: start; }
.docs-nav { position: sticky; top: 98px; min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); padding: 0.7rem; }
.docs-nav a { display: block; padding: 0.4rem 0.55rem; border-radius: 5px; color: var(--muted); font-size: 0.77rem; }
.docs-nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.docs-body { min-width: 0; }
.docs-body h2 { margin-top: 2rem; }
.docs-body h2:first-child { margin-top: 0; }
.endpoint {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
  margin-bottom: 0.6rem;
  overflow: hidden;
}
.endpoint summary { display: flex; align-items: center; gap: 0.65rem; padding: 0.7rem 0.9rem; cursor: pointer; list-style: none; font-size: 0.81rem; }
.endpoint summary::-webkit-details-marker { display: none; }
.endpoint summary:hover { background: rgba(255, 255, 255, 0.02); }
.endpoint .path { font-family: var(--font-mono); color: var(--text); }
.endpoint .desc { color: var(--faint); margin-left: auto; font-size: 0.7rem; text-align: right; }
.endpoint .endpoint-body { padding: 0.9rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.79rem; }
.method { display: inline-flex; align-items: center; justify-content: center; min-width: 46px; padding: 0.18rem 0.4rem; border-radius: 4px; font-family: var(--font-mono); font-size: 0.6rem; font-weight: 700; letter-spacing: 0.04em; }
.method.get { background: rgba(34, 211, 238, 0.1); color: var(--green-bright); border: 1px solid rgba(34, 211, 238, 0.2); }
.method.post { background: rgba(96, 165, 250, 0.1); color: #93c5fd; border: 1px solid rgba(96, 165, 250, 0.2); }
.method.delete { background: rgba(248, 113, 113, 0.09); color: #fca5a5; border: 1px solid rgba(248, 113, 113, 0.18); }

pre.code-block { position: relative; margin: 0.8rem 0 1.2rem; border: 1px solid var(--line); border-radius: 9px; background: #060d12; overflow: hidden; }
pre.code-block .code-head { display: flex; align-items: center; justify-content: space-between; padding: 0.45rem 0.8rem; border-bottom: 1px solid var(--line); color: var(--faint); font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.05em; }
pre.code-block code { display: block; padding: 0.9rem 1rem; overflow-x: auto; font-family: var(--font-mono); font-size: 0.75rem; line-height: 1.65; color: #c7dae3; }
.copy-code { border: 1px solid var(--line); border-radius: 4px; background: transparent; color: var(--faint); font-size: 0.6rem; padding: 0.2rem 0.4rem; }
.copy-code:hover { color: var(--green-bright); border-color: rgba(34, 211, 238, 0.3); }

/* ==========================================================================
   Footer, toasts, loading
   ========================================================================== */

.site-footer { margin-top: clamp(2rem, 6vw, 5rem); border-top: 1px solid var(--line); background: rgba(4, 9, 13, 0.65); }
.footer-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  flex-wrap: wrap;
  padding-block: 1.05rem;
  border-bottom: 1px solid var(--line);
}
.footer-cta-status { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.footer-cta-status strong { display: block; color: var(--text); font-size: 0.82rem; }
.footer-cta-status span:not(.status-dot) { display: block; color: var(--faint); font-size: 0.7rem; margin-top: 0.1rem; }
.footer-cta-actions { display: flex; align-items: center; gap: 0.45rem; flex-wrap: wrap; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 2rem; padding-block: 2.6rem 2rem; }
.footer-brand p { color: var(--faint); font-size: 0.8rem; max-width: 300px; margin: 0.7rem 0 0; }
.footer-col h4 { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); margin: 0 0 0.85rem; font-weight: 600; }
.footer-col a, .footer-col span { display: block; color: var(--muted); font-size: 0.8rem; padding: 0.22rem 0; }
.footer-col a:hover { color: var(--green-bright); }
.footer-col .footer-value { font-family: var(--font-mono); color: var(--text); font-size: 0.78rem; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-block: 1.1rem; border-top: 1px solid var(--line); color: var(--faint); font-size: 0.7rem; }
.footer-bottom .footer-links { display: flex; gap: 1rem; flex-wrap: wrap; }
.footer-bottom a { color: var(--faint); }
.footer-bottom a:hover { color: var(--muted); }

.toast-root { position: fixed; right: 1.2rem; bottom: 1.2rem; z-index: 160; display: grid; gap: 0.5rem; max-width: min(360px, calc(100vw - 2.4rem)); }
.toast {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: #0c1a23;
  color: var(--text);
  font-size: 0.8rem;
  box-shadow: var(--shadow);
  animation: toast-in 0.24s ease both;
}
.toast.success { border-color: rgba(34, 211, 238, 0.3); }
.toast.error { border-color: rgba(248, 113, 113, 0.3); }
.toast svg { width: 17px; height: 17px; flex-shrink: 0; margin-top: 1px; }
.toast.success svg { color: var(--green); }
.toast.error svg { color: var(--red); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.boot-screen { display: grid; place-items: center; text-align: center; min-height: 62vh; padding: 4rem 1.5rem; }
.boot-screen h1 { font-size: clamp(1.7rem, 4vw, 2.6rem); }
.boot-screen p { color: var(--muted); max-width: 400px; }
.boot-mark { display: flex; gap: 5px; margin-bottom: 1.5rem; }
.boot-mark span { width: 10px; height: 10px; background: var(--green); border-radius: 2px; animation: boot-bounce 1.1s ease infinite; }
.boot-mark span:nth-child(2) { animation-delay: 0.15s; background: var(--gold); }
.boot-mark span:nth-child(3) { animation-delay: 0.3s; }
@keyframes boot-bounce { 0%, 100% { transform: translateY(0); opacity: 0.5; } 50% { transform: translateY(-8px); opacity: 1; } }

.skeleton { border-radius: 6px; background: linear-gradient(90deg, rgba(255,255,255,0.035) 25%, rgba(255,255,255,0.07) 50%, rgba(255,255,255,0.035) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite linear; }
@keyframes shimmer { to { background-position: -200% 0; } }
.page-loading { display: grid; gap: 1rem; padding-block: 3rem; }
.skeleton-hero { height: 220px; border-radius: var(--radius-lg); }
.skeleton-line { height: 14px; width: 70%; }
.skeleton-line.short { width: 40%; }
.skeleton-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.8rem; }
.skeleton-card { height: 150px; border-radius: var(--radius); }

.noscript { position: fixed; inset: 0; z-index: 200; display: grid; place-content: center; text-align: center; background: var(--bg); padding: 2rem; }
.error-page { padding: 6rem 0; text-align: center; }
.error-page .error-code { font-family: var(--font-display); font-size: clamp(4rem, 12vw, 8rem); line-height: 1; color: rgba(34, 211, 238, 0.22); letter-spacing: -0.06em; }
.error-page h1 { margin-top: -0.6rem; }
.error-page p { color: var(--muted); max-width: 440px; margin-inline: auto; }
.error-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1280px) {
  .main-nav { gap: 0; min-width: 0; }
  .nav-link { padding-inline: 0.5rem; font-size: 0.82rem; }
}

@media (max-width: 1160px) {
  .main-nav { display: none; }
  .mobile-toggle { display: grid; }
}

@media (max-width: 980px) {
  .main-nav { display: none; }
  .mobile-toggle { display: grid; }
  .section-nav { top: 72px; }
  .header-actions .btn-vote { display: none; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero h1 { max-width: 15ch; }
  .server-panel { transform: none; max-width: 460px; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .home-split, .two-col { grid-template-columns: 1fr; }
  .player-grid, .faction-grid { grid-template-columns: 1fr 1fr; }
  .player-stats { grid-template-columns: 1fr 1fr; }
  .player-stat:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); }
  .player-stat:nth-child(4) { border-top: 1px solid var(--line); }
  .shop-grid { grid-template-columns: 1fr; max-width: 560px; }
  /* Keep the configured rank order (Member, VIP, VIP+) on small screens. */
  .rank-card .rank-tagline { min-height: 0; }
  .account-grid { grid-template-columns: 1fr; }
  .category-grid { grid-template-columns: 1fr; }
  .forum-manage { grid-template-columns: 1fr; }
  .fm-list { max-height: 320px; }
  .forum-hero { align-items: flex-start; flex-direction: column; }
  .post { grid-template-columns: 150px minmax(0, 1fr); }
  .wiki-layout, .docs-layout { grid-template-columns: 1fr; }
  .wiki-layout > .wiki-sidebar { display: none; }
  .wiki-mobile-menu {
    display: block;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    overflow: hidden;
  }
  .wiki-mobile-menu summary {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.85rem 1rem;
    cursor: pointer;
    list-style: none;
    color: var(--text);
    font-weight: 600;
    font-size: 0.85rem;
  }
  .wiki-mobile-menu summary::-webkit-details-marker { display: none; }
  .wiki-mobile-menu summary svg { width: 16px; height: 16px; color: var(--green); }
  .wiki-mobile-menu summary span { margin-left: auto; color: var(--faint); font-family: var(--font-mono); font-size: 0.62rem; font-weight: 500; }
  .wiki-mobile-menu summary::after { content: ""; width: 7px; height: 7px; flex-shrink: 0; border-right: 1.5px solid var(--faint); border-bottom: 1.5px solid var(--faint); transform: rotate(45deg); transition: transform 0.18s ease; }
  .wiki-mobile-menu[open] summary { border-bottom: 1px solid var(--line); }
  .wiki-mobile-menu[open] summary::after { transform: rotate(-135deg); }
  .wiki-mobile-menu .wiki-sidebar { display: block; position: static; max-height: 320px; overflow-y: auto; overflow-x: hidden; border: 0; border-radius: 0; }
  .wiki-mobile-menu .wiki-group { min-width: 0; border-bottom: 1px solid rgba(150, 184, 200, 0.06); border-right: 0; }
  .wiki-mobile-menu .wiki-group:last-child { border-bottom: 0; }
  .wiki-sidebar, .docs-nav { position: static; max-height: none; }
  .wiki-group { min-width: 160px; border-bottom: 0; border-right: 1px solid var(--line); }
  .docs-nav { display: flex; gap: 0.2rem; overflow-x: auto; }
  .admin-summary { grid-template-columns: repeat(3, 1fr); }
  .props { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .profile-stats { grid-template-columns: repeat(2, 1fr); }
  .profile-stat:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); }
  .profile-stat:nth-child(4) { border-top: 1px solid var(--line); }
  .steps { grid-template-columns: 1fr; }
  .cta-band { grid-template-columns: 1fr; }
  .cta-actions { justify-content: flex-start; }
}

@media (max-width: 720px) {
  .container { width: calc(100% - 1.8rem); }
  .header-inner { min-height: 66px; gap: 0.7rem; }
  .brand-text small { display: none; }
  .brand-mark { width: 36px; height: 36px; }
  .brand-text strong { font-size: 1rem; }
  .account-chip span:not(.avatar) { display: none; }
  .account-chip { padding-right: 0.3rem; }
  .hero { padding-top: 2.4rem; }
  .hero h1 { font-size: clamp(2.35rem, 11vw, 3.3rem); }
  .hero-actions .btn { flex: 1; }
  .ip-box { max-width: none; width: 100%; }
  .stats-band-grid { grid-template-columns: 1fr 1fr; }
  .stat-cell { padding-block: 1.1rem; }
  .stat-cell:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); }
  .stat-cell:nth-child(4) { border-top: 1px solid var(--line); }
  .feature-grid, .player-grid, .faction-grid, .wiki-cards { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 0.8rem; }
  .thread-table th:nth-child(2), .thread-table td:nth-child(2),
  .thread-table th:nth-child(4), .thread-table td:nth-child(4) { display: none; }
  .thread-table td, .thread-table th { padding-inline: 0.7rem; }
  .thread-title { font-size: 0.84rem; }
  .thread-last { font-size: 0.64rem; }
  .thread-last strong { font-size: 0.68rem; }
  .post { grid-template-columns: 1fr; }
  .post-side { flex-direction: row; flex-wrap: wrap; align-items: center; border-right: 0; border-bottom: 1px solid var(--line); padding: 0.8rem 1rem; }
  .post-side .author-stats { display: none; }
  .post-side .avatar { width: 30px; height: 30px; }
  .post-side .author { flex: 1; }
  .post-content { padding: 1rem; font-size: 0.85rem; }
  .post-head { padding-inline: 1rem; }
  .post-reactions { padding: 0 1rem 1rem; }
  .post-reply { margin-inline: 1rem; }
  .progress-list { grid-template-columns: 1fr; }
  .fm-grid, .fm-grid-3 { grid-template-columns: 1fr; }
  .category-sublist { grid-template-columns: 1fr; }
  .category-children { margin-left: 0; }
  .profile-head { align-items: flex-start; }
  .profile-side { flex-basis: 100%; width: 100%; }
  .profile-skin-stage { width: 100%; height: 180px; }
  .profile-actions { width: 100%; }
  .profile-actions .btn { flex: 1; }
  .model-hint { display: none; }
  .profile-stats { grid-template-columns: 1fr 1fr; }
  .map-page-frame { height: calc(100vh - 67px); height: calc(100dvh - 67px); min-height: 380px; }
  .faction-map-frame { height: 240px; }
  .faction-hero-stats { gap: 1.2rem; }
  .faction-banner-actions { width: 100%; margin-left: 0; }
  .faction-banner-actions .btn { flex: 1; }
  .faction-banner-copy { min-width: 0; }
  .faction-banner .faction-crest-lg { width: 52px; height: 52px; border-radius: 12px; font-size: 1.6rem; }
  .faction-hero-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem 1.1rem; }
  .faction-hero-stat:last-child { grid-column: 1 / -1; }
  .roster-grid { grid-template-columns: 1fr; }
  .privacy-grid { grid-template-columns: 1fr; }
  .privacy-grid .setting-row:nth-child(2) { border-top: 1px solid var(--line); }
  .profile-avatar .avatar-xl { width: 76px; height: 76px; border-radius: 14px; }
  .profile-identity { min-width: 0; }
  .profile-presence { gap: 0.4rem; }
  .admin-summary { grid-template-columns: 1fr 1fr; }
  .footer-cta { align-items: flex-start; }
  .footer-cta-actions { width: 100%; }
  .footer-cta-actions .btn { flex: 1; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.6rem; padding-block: 2.2rem 1.5rem; }
  .panel-footer { grid-template-columns: 1fr 1fr; }
  .panel-stat:last-child { display: none; }
  .modal { padding: 1.25rem; }
  .modal.palette { width: 100%; padding: 0; margin-top: 1rem; max-height: calc(100dvh - 4rem); }
  .palette-results { max-height: none; }
  .palette-foot { gap: 0.6rem; }
  .palette-foot .palette-status { display: none; }
  .palette-all { margin-left: auto; }
  .link-code { font-size: 1.45rem; }
  .compare th, .compare td { padding-inline: 0.7rem; }
  .data-table th, .data-table td { padding-inline: 0.7rem; }
  .data-table .hide-mobile { display: none; }
  .wiki-nav a { min-width: 0; flex: 1; }
  .wiki-nav strong { font-size: 0.77rem; }
  .wiki-jump { align-items: flex-start; }
  .wiki-jump .btn { width: 100%; }
}

@media (max-width: 480px) {
  .header-actions .btn { min-height: 36px; padding: 0.45rem 0.7rem; font-size: 0.78rem; }
  .hero-meta { gap: 0.8rem; }
  .stats-band-grid { grid-template-columns: 1fr 1fr; }
  .stat-cell .stat-label { font-size: 0.55rem; }
  .toolbar { padding: 0.55rem; }
  .filter-count { display: none; }
  .mobile-nav .container { grid-template-columns: 1fr; }
  .post-side .author .author-meta { display: none; }
  .wiki-card { grid-template-columns: 38px minmax(0, 1fr); gap: 0.7rem; padding: 0.95rem; }
  .wiki-card-icon { width: 38px; height: 38px; border-radius: 9px; }
  .wiki-card-icon svg { width: 18px; height: 18px; }
  .player-stat { padding: 0.8rem 0.9rem; }
  .player-stat strong { font-size: 1.25rem; }
}

@media (max-width: 380px) {
  /* The sign-in chip is the first thing to go; the mobile menu still has it. */
  .header-actions [data-account-slot] { display: none; }
  .header-inner { gap: 0.5rem; }
  .brand-text strong { font-size: 0.92rem; letter-spacing: 0.04em; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
/* Economy browser */
.economy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 0.65rem;
}
.economy-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  transition: border-color 160ms ease, transform 160ms ease;
}
.economy-item:hover {
  border-color: rgba(45, 212, 191, 0.4);
  transform: translateY(-1px);
}
.economy-icon {
  position: relative;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: linear-gradient(145deg, rgba(45, 212, 191, 0.12), rgba(6, 11, 16, 0.9));
  image-rendering: pixelated;
  overflow: hidden;
}
.economy-icon img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  image-rendering: pixelated;
  z-index: 1;
}
.economy-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--accent);
  font-weight: 800;
  font-size: 1rem;
}
.economy-body { min-width: 0; flex: 1; }
.economy-name {
  font-weight: 700;
  font-size: 0.86rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.economy-meta { color: var(--faint); font-size: 0.68rem; margin-top: 0.1rem; }
.economy-value { text-align: right; flex: 0 0 auto; }
.economy-value strong { display: block; color: var(--gold); font-size: 0.9rem; white-space: nowrap; }
.economy-value small { color: var(--faint); font-size: 0.64rem; white-space: nowrap; }
@media (max-width: 560px) {
  .economy-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .economy-item { padding: 0.5rem; gap: 0.45rem; }
  .economy-icon { width: 34px; height: 34px; flex-basis: 34px; }
  .economy-icon img { width: 26px; height: 26px; }
  .economy-value small { display: none; }
}
.home-board-dots {
  display: flex;
  gap: 0.35rem;
  justify-content: center;
  margin-top: 0.75rem;
}
.home-board-dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.32);
  cursor: pointer;
  transition: background 160ms ease, width 160ms ease;
}
.home-board-dot.active {
  width: 22px;
  background: var(--accent);
}

/* ==========================================================================
   Auction house
   ========================================================================== */

.auction-hero {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 1rem;
}
.auction-hero-stat {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(34, 211, 238, 0.06), rgba(255, 255, 255, 0.012));
  padding: 0.8rem 0.9rem;
}
.auction-hero-stat span { display: flex; align-items: center; gap: 0.35rem; color: var(--muted); font-size: 0.68rem; }
.auction-hero-stat span svg { width: 14px; height: 14px; color: var(--green); }
.auction-hero-stat strong { display: block; margin-top: 0.25rem; font-size: 1.35rem; line-height: 1.1; }
.auction-hero-stat small { display: block; margin-top: 0.2rem; color: var(--faint); font-size: 0.62rem; }

.auction-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
  gap: 0.75rem;
}
.auction-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.018);
  overflow: hidden;
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.auction-card:hover { border-color: rgba(34, 211, 238, 0.35); transform: translateY(-2px); }
.auction-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.85rem 0.85rem 0;
}
.auction-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.2);
  overflow: hidden;
}
.auction-icon img { position: relative; z-index: 2; width: 38px; height: 38px; object-fit: contain; image-rendering: pixelated; }
.auction-fallback { position: absolute; z-index: 1; color: var(--faint); font-size: 1.2rem; font-weight: 700; }
.auction-amount {
  position: absolute;
  right: 2px;
  bottom: 2px;
  z-index: 3;
  padding: 0.05rem 0.25rem;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.72);
  color: var(--text);
  font-size: 0.58rem;
  font-family: var(--font-mono);
}
.auction-time {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--faint);
  font-size: 0.62rem;
  font-family: var(--font-mono);
  white-space: nowrap;
}
.auction-time svg { width: 12px; height: 12px; }
.auction-body { padding: 0.65rem 0.85rem 0.85rem; }
.auction-name { font-size: 0.9rem; font-weight: 700; line-height: 1.25; }
.auction-seller { margin-top: 0.15rem; color: var(--faint); font-size: 0.67rem; }
.auction-seller a { color: var(--muted); }
.auction-prices { display: flex; gap: 0.9rem; margin-top: 0.65rem; }
.auction-price { min-width: 0; }
.auction-price small { display: block; color: var(--faint); font-size: 0.58rem; text-transform: uppercase; letter-spacing: 0.04em; }
.auction-price strong { display: block; color: var(--gold); font-size: 0.9rem; line-height: 1.25; }
.auction-price span { display: block; color: var(--faint); font-size: 0.58rem; }
.auction-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.75rem; }

@media (max-width: 900px) {
  .auction-hero { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .auction-hero { grid-template-columns: 1fr; }
  .auction-grid { grid-template-columns: 1fr; }
}

/* Faction custom groups */
.group-create { display: flex; align-items: flex-end; gap: 0.75rem; flex-wrap: wrap; }
.group-create .field { flex: 1; min-width: 180px; margin: 0; }
.group-stack { display: grid; gap: 0.55rem; }
.group-perm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
.group-perm-grid .setting-row { border-top: 0; padding: 0.35rem 0; align-items: flex-start; }
.group-perm .setting-copy span { font-size: 0.6rem; color: var(--faint); }
.group-members { display: grid; gap: 0.25rem; margin-top: 0.5rem; }
.group-member-row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.45rem 0; border-top: 1px solid var(--line); }
.group-member { display: flex; align-items: center; gap: 0.5rem; min-width: 0; }
.group-member span { display: flex; flex-direction: column; min-width: 0; }
.group-member strong { font-size: 0.78rem; }
.group-member small { color: var(--faint); font-size: 0.62rem; }
@media (max-width: 640px) {
  .group-perm-grid { grid-template-columns: 1fr; }
  .group-member-row { align-items: flex-start; flex-direction: column; }
}
