:root {
  /* Vorynx Cups — amber / teal / magenta on deep dark, lime for the brand mark */
  /* Brand lime sampled from the logo (rgb 204 249 0). One lime everywhere. */
  --lime: #ccf900;
  --lime-hot: #e6ff5c;
  --lime-deep: #9dc400;
  --lime-rgb: 204, 249, 0;
  --amber-rgb: 240, 180, 41;
  --amber-deep-rgb: 217, 142, 43;
  --teal-rgb: 47, 211, 195;
  --magenta-rgb: 255, 77, 141;
  --discord-rgb: 88, 101, 242;
  --violet-rgb: 139, 108, 255;
  --focus: #d98e2b;
  --glow-lime: 0 0 32px rgba(var(--lime-rgb), 0.38);
  --bg: #090c10;
  --bg-elevated: #141a22;
  --ink: #f4f1ea;
  --muted: #9aa3ad;
  --volt: #f0b429;
  --volt-hot: #ffd36a;
  --volt-dim: #c48912;
  --accent: #f0b429;
  --accent-hover: #ffd36a;
  --accent-2: #3ecfb8;
  --amber: #f0b429;
  --amber-hot: #ffd36a;
  --teal: #2fd3c3;
  --teal-hot: #6af0e0;
  --discord: #5865f2;
  --discord-hot: #7b85ff;
  --discord-deep: #4752c4;
  --magenta: #ff4d8d;
  --magenta-hot: #ff7eaf;
  --gold: #f0b429;
  --gold-soft: #ffe7a8;
  --cyan: #3ecfb8;
  --violet: #8b6cff;
  --card: #121820;
  --card-top: #1a222c;
  --line: rgba(255, 255, 255, 0.09);
  --line-bright: rgba(255, 255, 255, 0.16);
  --success: #4fbf82;
  --warning: #f0b429;
  --danger: #e85d4c;
  --danger-soft: #ff9a8c;
  --live: #ff4d8d;
  --shadow: 0 22px 52px rgba(0, 0, 0, 0.5);
  --glow-volt: 0 0 32px rgba(var(--amber-rgb), 0.38);
  --glow-teal: 0 0 28px rgba(var(--teal-rgb), 0.28);
  --glow-magenta: 0 0 28px rgba(var(--magenta-rgb), 0.28);
  --glow-discord: 0 10px 28px rgba(var(--discord-rgb), 0.4);
  --radius: 14px;
  --radius-sm: 10px;
  --font: "Work Sans", system-ui, sans-serif;
  --display: "Rajdhani", "Work Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  --stage-max: 1180px;
  --sidebar-w: 248px;
  --sidebar-collapsed: 76px;
  --topbar-h: 60px;

  /* Motion system — one vocabulary for the whole UI */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);        /* default exits / settles */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);    /* big reveals, panels */
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);     /* ambient loops */
  --ease-snap: cubic-bezier(0.2, 0, 0, 1);           /* micro-interactions */
  --ease-spring: cubic-bezier(0.34, 1.35, 0.64, 1);  /* fallback overshoot */
  --dur-fast: 150ms;
  --dur-base: 260ms;
  --dur-slow: 520ms;
  --dur-reveal: 760ms;
}
@supports (animation-timing-function: linear(0, 1)) {
  :root {
    /* Physically-derived spring (stiffness 170, damping 18) sampled to linear() */
    --ease-spring: linear(
      0, 0.009, 0.035 2.1%, 0.141 4.4%, 0.281 6.7%, 0.723 12.9%, 0.938 16.7%,
      1.017 18.9%, 1.077 21.2%, 1.104 23.2%, 1.114 25.2%, 1.104 28.1%, 1.075 31.7%,
      1.02 37.2%, 0.99 41.1%, 0.981 44.8%, 0.987 50.2%, 1.001 57.5%, 1.005 64.1%, 1
    );
  }
}

* { box-sizing: border-box; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--ink); }
body {
  font-family: var(--font);
  background:
    radial-gradient(980px 560px at 6% -8%, rgba(var(--amber-rgb), 0.18) 0%, transparent 58%),
    radial-gradient(860px 520px at 102% 2%, rgba(var(--teal-rgb), 0.14) 0%, transparent 52%),
    radial-gradient(720px 480px at 70% 110%, rgba(var(--magenta-rgb), 0.1) 0%, transparent 50%),
    radial-gradient(640px 400px at -8% 88%, rgba(var(--discord-rgb), 0.12) 0%, transparent 48%),
    linear-gradient(180deg, #121820 0%, #0a0e14 48%, #07090d 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: -20%;
  z-index: 0;
  background:
    radial-gradient(circle at 18% 22%, rgba(var(--amber-rgb), 0.16), transparent 36%),
    radial-gradient(circle at 82% 18%, rgba(var(--teal-rgb), 0.12), transparent 34%),
    radial-gradient(circle at 74% 78%, rgba(var(--magenta-rgb), 0.1), transparent 38%);
  animation: mesh-drift 18s ease-in-out infinite;
  filter: blur(8px);
}
body::after {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  background: linear-gradient(115deg, transparent 0%, rgba(255, 255, 255, 0.015) 42%, transparent 70%);
  animation: sheen-pan 14s linear infinite;
}

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
  z-index: 1;
}

#app { position: relative; z-index: 2; min-height: 100vh; }

.panel-swap {
  animation: panel-swap 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
}

h1, h2, h3, .mark {
  font-family: var(--display);
  letter-spacing: -0.01em;
  margin: 0;
  font-weight: 700;
}

.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  font-size: 13px;
  color: var(--muted);
}

a { color: var(--volt); transition: color 0.15s ease; }
a:hover { color: var(--volt-hot); }

/* Keyboard focus ? volt lime, mouse stays clean */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.nav-item:focus-visible,
.yu-btn:focus-visible,
.ds-btn:focus-visible,
.rail-btn:focus-visible,
.rail-chip:focus-visible,
.server-pill:focus-visible,
.server-action:focus-visible,
.sidebar-toggle:focus-visible,
.notif-btn:focus-visible,
.filter-chip:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  border-color: rgba(var(--lime-rgb), 0.55);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3), 0 0 0 3px rgba(var(--lime-rgb), 0.12);
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(26px) scale(0.985); filter: blur(6px); }
  60% { filter: blur(0); }
  to { opacity: 1; transform: none; filter: blur(0); }
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(14px); filter: blur(4px); }
  60% { filter: blur(0); }
  to { opacity: 1; transform: none; filter: blur(0); }
}
@keyframes pop-in {
  from { opacity: 0; transform: translateY(18px) scale(0.78); }
  40% { opacity: 1; }
  to { opacity: 1; transform: none; }
}
@keyframes title-reveal {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.97);
    letter-spacing: 0.02em;
    filter: blur(12px) drop-shadow(0 2px 18px rgba(0, 0, 0, 0)) drop-shadow(0 0 30px rgba(var(--amber-deep-rgb), 0));
  }
  55% { filter: blur(0) drop-shadow(0 2px 18px rgba(0, 0, 0, 0.45)) drop-shadow(0 0 30px rgba(var(--amber-deep-rgb), 0.14)); }
  to {
    opacity: 1;
    transform: none;
    letter-spacing: -0.03em;
    filter: blur(0) drop-shadow(0 2px 18px rgba(0, 0, 0, 0.45)) drop-shadow(0 0 30px rgba(var(--amber-deep-rgb), 0.14));
  }
}
@keyframes topbar-drop {
  from { opacity: 0; transform: translateY(-100%); }
  to { opacity: 1; transform: none; }
}
@keyframes flash-in {
  from { opacity: 0; transform: translateY(-8px) scale(0.985); }
  to { opacity: 1; transform: none; }
}
@keyframes backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes error-nudge {
  0%, 100% { translate: 0 0; }
  20% { translate: -4px 0; }
  40% { translate: 4px 0; }
  60% { translate: -2px 0; }
  80% { translate: 2px 0; }
}
@keyframes soft-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(var(--discord-rgb), 0.45), 0 12px 40px rgba(var(--discord-rgb), 0.35); }
  50% { box-shadow: 0 0 0 14px rgba(var(--discord-rgb), 0), 0 16px 48px rgba(var(--discord-rgb), 0.5); }
}
@keyframes float-y {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes orb-drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(24px, -18px) scale(1.08); }
}
@keyframes shine-sweep {
  0% { transform: translateX(-120%) skewX(-18deg); opacity: 0; }
  35% { opacity: 0.55; }
  100% { transform: translateX(220%) skewX(-18deg); opacity: 0; }
}
@keyframes shine-idle {
  0%, 78% { transform: translateX(-140%) skewX(-18deg); opacity: 0; }
  84% { opacity: 0.5; }
  100% { transform: translateX(240%) skewX(-18deg); opacity: 0; }
}
@keyframes glow-ring {
  0% { box-shadow: 0 0 0 0 rgba(var(--amber-rgb), 0.42); }
  70%, 100% { box-shadow: 0 0 0 16px rgba(var(--amber-rgb), 0); }
}
@keyframes mesh-drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  40% { transform: translate(4%, -3%) scale(1.06); }
  70% { transform: translate(-3%, 4%) scale(1.03); }
}
@keyframes sheen-pan {
  0% { transform: translateX(-12%); opacity: 0.35; }
  50% { transform: translateX(8%); opacity: 0.7; }
  100% { transform: translateX(-12%); opacity: 0.35; }
}
@keyframes panel-swap {
  from { opacity: 0; transform: translateY(12px) scale(0.994); filter: blur(5px) saturate(0.85); }
  60% { filter: blur(0) saturate(1); }
  to { opacity: 1; transform: none; filter: none; }
}
@keyframes child-rise {
  from { opacity: 0; transform: translateY(10px); filter: blur(3px); }
  to { opacity: 1; transform: none; filter: blur(0); }
}
@keyframes accent-breathe {
  0%, 100% { opacity: 0.75; filter: saturate(1); }
  50% { opacity: 1; filter: saturate(1.25); }
}

/* `backwards` fill: the entrance holds its "from" state during the delay, then hands control
   back to normal styles — so hover transforms/filters keep working after the reveal. */
.anim-rise { animation: rise-in var(--dur-reveal) var(--ease-out-expo) backwards; }
.anim-fade { animation: fade-up var(--dur-slow) var(--ease-out-expo) backwards; }
.anim-float { animation: float-y 4.5s var(--ease-in-out) infinite; }

/* Hero choreography — logo springs, title unblurs, then copy + CTAs cascade */
.yu-rise {
  animation: fade-up 0.72s var(--ease-out-expo) backwards;
  animation-delay: var(--stagger, 0s);
}
.yu-logo.yu-rise { animation: pop-in 1.05s var(--ease-spring) backwards; }
.yu-title.yu-rise { animation: title-reveal 0.9s var(--ease-out-expo) backwards; }
.yu-rise-2 { --stagger: 0.12s; }
.yu-rise-3 { --stagger: 0.24s; }
.yu-rise-4 { --stagger: 0.34s; }
.yu-rise-5 { --stagger: 0.48s; }
.yu-rise-6 { --stagger: 0.56s; }
.yu-rise-7 { --stagger: 0.64s; }
.yu-cta.yu-rise > * { animation: fade-up 0.6s var(--ease-out-expo) backwards; }
.yu-cta.yu-rise > :nth-child(1) { animation-delay: calc(var(--stagger) + 0.06s); }
.yu-cta.yu-rise > :nth-child(2) { animation-delay: calc(var(--stagger) + 0.14s); }
.yu-cta.yu-rise > :nth-child(3) { animation-delay: calc(var(--stagger) + 0.22s); }
.yu-topbar { animation: topbar-drop 0.7s var(--ease-out-expo) backwards; }

/* Hold the hero still while the boot splash covers it, so the cascade is actually seen */
html.vx-booting .yu-rise,
html.vx-booting .yu-cta.yu-rise > *,
html.vx-booting .yu-topbar,
html.vx-booting .anim-rise,
html.vx-booting .anim-fade {
  animation-play-state: paused;
}

.boot-splash-title { display: none; }
.boot-splash-sub { display: none; }

.vx-splash {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: grid;
  place-items: center;
  padding: clamp(24px, 6vh, 48px) 20px;
  background: #000;
  color: #f4f1ea;
  overflow: hidden;
}
.vx-splash::before {
  content: "";
  position: absolute;
  inset: -18%;
  background:
    radial-gradient(circle at 50% 42%, rgba(var(--lime-rgb), 0.12), transparent 42%),
    radial-gradient(circle at 50% 100%, rgba(var(--lime-rgb), 0.05), transparent 46%);
  pointer-events: none;
}
.vx-splash-inner {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
}
/* Boot orb: the brand mark spins like a coin in 3D inside two counter-rotating rings,
   over a breathing lime glow. On "ready" the spin lands face-on and pops. */
.vx-orb {
  position: relative;
  width: clamp(148px, 24vw, 196px);
  height: clamp(148px, 24vw, 196px);
  display: grid;
  place-items: center;
  margin-bottom: 30px;
  perspective: 720px;
  perspective-origin: 50% 45%;
}
.vx-orb::before {
  content: "";
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--lime-rgb), 0.28) 0%, rgba(var(--lime-rgb), 0.08) 38%, transparent 68%);
  filter: blur(10px);
  animation: vx-glow 2.2s var(--ease-in-out) infinite;
  pointer-events: none;
}
.vx-logo-mark {
  width: 66%;
  height: 66%;
  object-fit: contain;
  background: transparent;
  position: relative;
  z-index: 2;
  transform-origin: 50% 52%;
  transform-style: preserve-3d;
  backface-visibility: visible;
  will-change: transform, filter;
  filter: drop-shadow(0 0 14px rgba(var(--lime-rgb), 0.55)) drop-shadow(0 0 34px rgba(var(--lime-rgb), 0.22));
  animation: vx-coin 2.2s cubic-bezier(0.45, 0.02, 0.55, 0.98) infinite;
}
.vx-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    conic-gradient(from 0deg, transparent 0 58%, rgba(var(--lime-rgb), 0.55) 74%, var(--lime) 84%, var(--lime-hot) 90%, transparent 100%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 1.5px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 1.5px));
  animation: vx-spin 1.6s cubic-bezier(0.4, 0.1, 0.6, 0.9) infinite;
  filter: drop-shadow(0 0 10px rgba(var(--lime-rgb), 0.55));
}
.vx-ring::before {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  border: 1px dashed rgba(var(--lime-rgb), 0.28);
  animation: vx-spin-rev 6s linear infinite;
}
.vx-ring::after {
  content: "";
  position: absolute;
  inset: 20px;
  border-radius: 50%;
  border: 1px solid rgba(var(--lime-rgb), 0.1);
}
/* Edge glint peaks at ~70° / ~110° (mark still visible, foreshortened); at 90° the coin is truly
   edge-on for a frame, and vx-glow flares at that exact moment so light seems to pass through. */
@keyframes vx-coin {
  0%   { transform: rotateX(6deg) rotateY(0deg); filter: drop-shadow(0 0 14px rgba(var(--lime-rgb), 0.55)) drop-shadow(0 0 34px rgba(var(--lime-rgb), 0.22)) brightness(1); }
  15%  { filter: drop-shadow(0 0 14px rgba(var(--lime-rgb), 0.55)) drop-shadow(0 0 34px rgba(var(--lime-rgb), 0.22)) brightness(1); }
  20%  { filter: drop-shadow(0 0 22px rgba(var(--lime-rgb), 0.95)) drop-shadow(0 0 48px rgba(var(--lime-rgb), 0.4)) brightness(1.75); }
  30%  { filter: drop-shadow(0 0 22px rgba(var(--lime-rgb), 0.95)) drop-shadow(0 0 48px rgba(var(--lime-rgb), 0.4)) brightness(1.75); }
  35%  { filter: drop-shadow(0 0 14px rgba(var(--lime-rgb), 0.55)) drop-shadow(0 0 34px rgba(var(--lime-rgb), 0.22)) brightness(1); }
  50%  { transform: rotateX(6deg) rotateY(180deg); filter: drop-shadow(0 0 14px rgba(var(--lime-rgb), 0.55)) drop-shadow(0 0 34px rgba(var(--lime-rgb), 0.22)) brightness(1); }
  65%  { filter: drop-shadow(0 0 14px rgba(var(--lime-rgb), 0.55)) drop-shadow(0 0 34px rgba(var(--lime-rgb), 0.22)) brightness(1); }
  70%  { filter: drop-shadow(0 0 22px rgba(var(--lime-rgb), 0.95)) drop-shadow(0 0 48px rgba(var(--lime-rgb), 0.4)) brightness(1.75); }
  80%  { filter: drop-shadow(0 0 22px rgba(var(--lime-rgb), 0.95)) drop-shadow(0 0 48px rgba(var(--lime-rgb), 0.4)) brightness(1.75); }
  85%  { filter: drop-shadow(0 0 14px rgba(var(--lime-rgb), 0.55)) drop-shadow(0 0 34px rgba(var(--lime-rgb), 0.22)) brightness(1); }
  100% { transform: rotateX(6deg) rotateY(360deg); filter: drop-shadow(0 0 14px rgba(var(--lime-rgb), 0.55)) drop-shadow(0 0 34px rgba(var(--lime-rgb), 0.22)) brightness(1); }
}
@keyframes vx-glow {
  0%, 50%, 100% { opacity: 0.5; transform: scale(0.9); }
  25%, 75% { opacity: 1; transform: scale(1.14); }
}
@keyframes vx-spin-rev {
  to { transform: rotate(-360deg); }
}
@keyframes vx-land {
  0%   { transform: rotateX(6deg) rotateY(0deg) scale(1); }
  55%  { transform: rotateX(0deg) rotateY(0deg) scale(1.16); }
  100% { transform: rotateX(0deg) rotateY(0deg) scale(1.1); }
}
.vx-splash-kicker {
  margin: 0 0 8px;
  font-family: var(--display), "Rajdhani", sans-serif;
  font-size: clamp(15px, 2.2vw, 18px);
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--lime);
  text-shadow: 0 0 18px rgba(var(--lime-rgb), 0.35);
  animation: kicker-track 1.1s var(--ease-out-expo) both;
}
@keyframes kicker-track {
  from { opacity: 0; letter-spacing: 0.6em; filter: blur(6px); }
  to { opacity: 1; letter-spacing: 0.22em; filter: blur(0); }
}
.vx-splash-status {
  margin: 0 0 22px;
  min-height: 1.35em;
  font-size: clamp(13px, 1.8vw, 15px);
  font-weight: 500;
  color: rgba(244, 241, 234, 0.72);
  letter-spacing: 0.02em;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.vx-splash-status.is-out {
  opacity: 0;
  transform: translateY(6px);
}
.vx-splash-status.is-in {
  opacity: 1;
  transform: none;
}
.vx-splash-bar {
  width: min(280px, 78vw);
  height: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.vx-splash-bar > i {
  display: block;
  height: 100%;
  width: 38%;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, var(--lime), var(--lime-hot), var(--lime), transparent);
  animation: vx-bar 1.15s ease-in-out infinite;
}
.vx-splash[data-mode="ready"] .vx-splash-bar > i {
  width: 100%;
  animation: none;
  background: var(--lime);
}
.vx-splash[data-mode="ready"] .vx-ring {
  animation: none;
  opacity: 0.35;
  transition: opacity 0.4s ease;
}
.vx-splash[data-mode="ready"] .vx-ring::before { animation-play-state: paused; }
.vx-splash[data-mode="ready"] .vx-orb::before {
  animation: none;
  opacity: 1;
  transform: scale(1.18);
  transition: transform 0.5s var(--ease-spring), opacity 0.3s ease;
}
.vx-splash[data-mode="ready"] .vx-logo-mark {
  animation: vx-land 0.6s var(--ease-spring) forwards;
  filter: drop-shadow(0 0 28px rgba(var(--lime-rgb), 0.9)) drop-shadow(0 0 56px rgba(var(--lime-rgb), 0.42));
  transition: filter 0.35s ease;
}
.vx-splash[data-mode="error"] .vx-ring {
  animation: none;
  opacity: 0.2;
}
.vx-splash[data-mode="error"] .vx-logo-mark {
  animation: none;
  transform: rotateX(6deg);
  filter: drop-shadow(0 0 14px rgba(var(--lime-rgb), 0.3)) saturate(0.6);
}
.vx-splash-error {
  margin: 18px 0 0;
  max-width: 36ch;
  color: #ff9a8c;
  font-size: 13px;
  line-height: 1.45;
}
.vx-splash-error[hidden],
.vx-splash-actions[hidden] {
  display: none !important;
}
.vx-splash-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
}
html.vx-splash-leaving .vx-splash {
  opacity: 0;
  transform: scale(1.06);
  filter: blur(10px);
  transition:
    opacity 0.6s var(--ease-in-out),
    transform 0.72s var(--ease-out-expo),
    filter 0.6s var(--ease-in-out);
  pointer-events: none;
}
html.vx-splash-leaving .vx-splash-inner {
  transform: scale(0.94);
  opacity: 0;
  transition: transform 0.5s var(--ease-in-out), opacity 0.4s ease;
}
.vx-app-reveal .picker-screen,
.vx-app-reveal .login-screen {
  animation: vx-reveal 0.9s var(--ease-out-expo) both;
}
@keyframes vx-spin {
  to { transform: rotate(360deg); }
}
@keyframes vx-bar {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(340%); }
}
@keyframes vx-reveal {
  from { opacity: 0; transform: scale(1.025); filter: blur(8px); }
  50% { opacity: 1; }
  to { opacity: 1; transform: none; filter: blur(0); }
}
@media (prefers-reduced-motion: reduce) {
  .vx-logo-mark,
  .vx-ring,
  .vx-ring::before,
  .vx-orb::before,
  .vx-splash-bar > i,
  .vx-splash-kicker,
  html.vx-splash-leaving .vx-splash,
  html.vx-splash-leaving .vx-splash-inner,
  .vx-app-reveal .picker-screen,
  .vx-app-reveal .login-screen,
  .login-bg-banner,
  .nx-haze,
  .nx-dust,
  .nx-shards::before,
  .nx-shards::after,
  .yu-logo {
    animation: none !important;
    transition: none !important;
  }
}
.delay-1 { animation-delay: 0.08s; }
.delay-2 { animation-delay: 0.16s; }
.delay-3 { animation-delay: 0.28s; }
@keyframes card-in {
  from { opacity: 0; transform: translateY(16px) scale(0.94); filter: blur(4px); }
  70% { filter: blur(0); }
  to { opacity: 1; transform: none; filter: blur(0); }
}
.server-grid .server-card.anim-fade {
  animation: card-in 0.62s var(--ease-out-expo) backwards;
  animation-delay: calc(0.12s + var(--i, 0) * 45ms);
}
.server-grid .server-card:nth-child(1) { --i: 0; }
.server-grid .server-card:nth-child(2) { --i: 1; }
.server-grid .server-card:nth-child(3) { --i: 2; }
.server-grid .server-card:nth-child(4) { --i: 3; }
.server-grid .server-card:nth-child(5) { --i: 4; }
.server-grid .server-card:nth-child(6) { --i: 5; }
.server-grid .server-card:nth-child(7) { --i: 6; }
.server-grid .server-card:nth-child(8) { --i: 7; }
.server-grid .server-card:nth-child(9) { --i: 8; }
.server-grid .server-card:nth-child(10) { --i: 9; }
.server-grid .server-card:nth-child(11) { --i: 10; }
.server-grid .server-card:nth-child(n+12) { --i: 11; }

/* Login ? Yunite layout, DropSpot amber palette (subtle polish) */
.login-screen,
.yunite-hero {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  padding: 0;
}
.login-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.login-bg-scene {
  position: absolute;
  inset: -48px;
  background:
    radial-gradient(ellipse 85% 65% at 18% 28%, rgba(var(--amber-rgb), 0.72) 0%, transparent 58%),
    radial-gradient(ellipse 75% 55% at 82% 18%, rgba(var(--teal-rgb), 0.48) 0%, transparent 52%),
    radial-gradient(ellipse 60% 50% at 50% 78%, rgba(var(--discord-rgb), 0.32) 0%, transparent 55%),
    radial-gradient(ellipse 45% 40% at 92% 72%, rgba(var(--magenta-rgb), 0.28) 0%, transparent 50%),
    linear-gradient(165deg, #1a120c 0%, #0d1012 42%, #0c161c 100%);
  filter: blur(32px) saturate(1.28);
  transform: scale(1.1);
  animation: mesh-drift 16s ease-in-out infinite;
}
.login-bg-blur {
  position: absolute;
  inset: 0;
  backdrop-filter: blur(2px);
  background: rgba(8, 10, 12, 0.22);
}
.login-bg-veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 50% 35%, rgba(var(--amber-deep-rgb), 0.08), transparent 60%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.28) 42%, rgba(13, 16, 18, 0.78) 100%);
}

.yu-topbar {
  position: relative;
  z-index: 3;
  width: 100%;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}
.yu-topbar-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 0 22px;
  height: 58px;
}
.yu-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
  font-family: var(--font);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.01em;
  text-transform: none;
  white-space: nowrap;
  transition: opacity 0.2s ease;
}
.yu-brand:hover { opacity: 0.9; }
.yu-brand img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(var(--lime-rgb), 0.55));
  transition: filter 0.25s ease, transform 0.25s ease;
}
.yu-brand:hover img {
  filter: drop-shadow(0 0 14px rgba(var(--lime-rgb), 0.8));
  transform: scale(1.04);
}
.yu-brand em,
.yu-brand span { color: #fff; font-style: normal; }
.yu-links {
  display: flex;
  align-items: center;
  gap: 26px;
  flex: 1;
  justify-content: center;
}
.yu-links a {
  position: relative;
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 6px 0;
  transition: color 0.2s ease;
}
.yu-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1.5px;
  border-radius: 1px;
  background: var(--volt);
  transform: scaleX(0);
  /* wipe in from the left, wipe out to the right */
  transform-origin: right;
  transition: transform var(--dur-base) var(--ease-snap);
}
.yu-links a:hover { color: #fff; }
.yu-links a:hover::after { transform: scaleX(1); transform-origin: left; }
.yu-nav-cta {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
  border-radius: 6px;
  background: var(--volt);
  color: #1a1300 !important;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(var(--amber-deep-rgb), 0.28);
  transition: transform var(--dur-base) var(--ease-spring), box-shadow var(--dur-base) ease, background var(--dur-base) ease;
}
.yu-nav-cta:hover {
  background: var(--volt-hot);
  color: #1a1300 !important;
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 8px 22px rgba(var(--amber-deep-rgb), 0.4);
}
.yu-nav-cta:active { transform: scale(0.97); transition-duration: var(--dur-fast); }

.yu-hero-stage {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 58px);
}
.yu-center {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: min(460px, calc(100% - 40px));
  margin: 0 auto;
  padding: 48px 0 64px;
}
.yu-logo {
  width: 120px;
  height: 120px;
  object-fit: contain;
  margin-bottom: 24px;
  border-radius: 20px;
  filter: drop-shadow(0 10px 28px rgba(0, 0, 0, 0.5)) drop-shadow(0 0 36px rgba(var(--amber-deep-rgb), 0.28));
  transition: filter 0.35s ease, transform 0.35s ease;
}
.yu-logo:hover {
  transform: translateY(-2px);
  filter: drop-shadow(0 14px 32px rgba(0, 0, 0, 0.55)) drop-shadow(0 0 44px rgba(var(--amber-deep-rgb), 0.4));
}
.yu-title {
  font-family: var(--font);
  font-size: clamp(2.85rem, 7vw, 3.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.02;
  color: #fff;
  text-transform: none;
  margin: 0 0 14px;
  /* ivory-to-warm gradient fill; drop-shadow (not text-shadow) so it doesn't bleed through the clip */
  background: linear-gradient(180deg, #ffffff 0%, #f4f1ea 55%, #d8d2c4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 18px rgba(0, 0, 0, 0.45)) drop-shadow(0 0 30px rgba(var(--amber-deep-rgb), 0.14));
}
.yu-tagline {
  margin: 0 0 36px;
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(1.08rem, 2.4vw, 1.22rem);
  font-weight: 500;
  line-height: 1.5;
  max-width: 28rem;
  text-transform: none;
  font-family: var(--font);
  letter-spacing: 0.01em;
  text-shadow: 0 1px 16px rgba(0, 0, 0, 0.35);
}
.nx-powered {
  margin: 10px 0 0;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(244, 247, 234, 0.55);
}

.yu-cta {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  width: 100%;
}
.yu-btn-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
}
.yu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 16px;
  border-radius: 6px;
  font-family: var(--font);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.01em;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  position: relative;
  transition:
    filter var(--dur-base) var(--ease-out),
    transform var(--dur-base) var(--ease-spring),
    box-shadow var(--dur-base) var(--ease-out),
    border-color var(--dur-base) ease,
    background var(--dur-base) ease,
    opacity var(--dur-base) ease;
}
.yu-btn:hover { filter: brightness(1.06); transform: translateY(-2px); }
.yu-btn:active {
  transform: translateY(0) scale(0.975);
  filter: brightness(0.97);
  transition-duration: var(--dur-fast);
}
/* Primary CTA: soft radar ring so the eye lands on it, without fighting the hover shadow */
.yu-btn-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  animation: glow-ring 3s var(--ease-out) 1.6s infinite;
}
.yu-btn-cta:hover::before { animation-play-state: paused; opacity: 0; transition: opacity 0.2s; }
.yu-btn .discord-ico { transition: transform var(--dur-base) var(--ease-spring); }
.yu-btn:hover .discord-ico { transform: translateX(-2px) rotate(-6deg) scale(1.08); }
.yu-btn:disabled,
.yu-btn.is-loading,
.yu-btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  filter: none;
  pointer-events: none;
}
.yu-btn.is-loading::after {
  content: "";
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.yu-btn-primary,
.yu-btn-cta {
  background: var(--volt);
  color: #1a1300 !important;
  min-height: 56px;
  font-size: 17px;
  border-color: rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, var(--amber-hot) 0%, var(--volt) 42%, #e2a51f 100%);
  box-shadow:
    0 10px 28px rgba(var(--amber-deep-rgb), 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.38),
    inset 0 -1px 0 rgba(0, 0, 0, 0.12);
}
.yu-btn-primary:hover,
.yu-btn-cta:hover {
  color: #1a1300 !important;
  filter: none;
  background: linear-gradient(180deg, #ffe08a 0%, var(--amber-hot) 48%, var(--volt) 100%);
  box-shadow:
    0 14px 36px rgba(var(--amber-deep-rgb), 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}
.yu-btn-blue {
  background: linear-gradient(180deg, #4f8ff7, #3b82f6 60%, #2563eb);
  color: #fff !important;
  border-color: rgba(180, 210, 255, 0.2);
  box-shadow: 0 6px 18px rgba(59, 130, 246, 0.32);
}
.yu-btn-blue:hover {
  color: #fff !important;
  box-shadow: 0 10px 26px rgba(59, 130, 246, 0.45);
}
.yu-btn-discord {
  background: linear-gradient(180deg, #6d78f7, #5865f2 55%, #4752c4);
  color: #fff !important;
  border-color: rgba(180, 190, 255, 0.22);
  box-shadow: 0 6px 18px rgba(var(--discord-rgb), 0.32);
  min-height: 48px;
  font-size: 14px;
}
.yu-btn-discord:hover {
  color: #fff !important;
  filter: none;
  box-shadow: 0 10px 26px rgba(var(--discord-rgb), 0.45);
}
.yu-btn-teal {
  background: var(--teal);
  color: #041412 !important;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 6px 18px rgba(63, 143, 134, 0.28);
  min-height: 48px;
  font-size: 14px;
}
.yu-btn-teal:hover {
  color: #041412 !important;
  filter: none;
  background: var(--teal-hot);
  box-shadow: 0 10px 26px rgba(63, 143, 134, 0.4);
}
.yu-btn-help {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.82) !important;
  font-weight: 600;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: none;
  min-height: 44px;
  font-size: 14px;
}
.yu-btn-help:hover {
  color: #fff !important;
  filter: none;
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(var(--lime-rgb), 0.35);
}
.discord-ico { width: 22px; height: 22px; flex-shrink: 0; }

/* Keep legacy discord-btn usable in app chrome */
.discord-btn {
  position: relative;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 18px !important;
  background: #5865f2 !important;
  color: #fff !important;
  border-radius: 4px !important;
  font-family: var(--font) !important;
  font-weight: 700 !important;
  font-size: 15px !important;
  text-decoration: none !important;
}
.discord-btn:hover { filter: brightness(1.08); color: #fff !important; }

.yu-features {
  position: relative;
  z-index: 2;
  width: min(980px, calc(100% - 40px));
  margin: 8px auto 48px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 800px) {
  .yu-features { grid-template-columns: 1fr; gap: 12px; margin-bottom: 36px; }
  .yu-topbar-inner { flex-wrap: wrap; height: auto; min-height: 54px; padding: 10px 14px; gap: 10px 14px; }
  .yu-links {
    display: flex;
    flex: 1 1 100%;
    order: 3;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px 16px;
    padding-top: 2px;
  }
  .yu-links a { font-size: 12.5px; padding: 4px 0; }
  .yu-nav-cta { margin-left: auto; }
  .yu-btn-row { grid-template-columns: 1fr; }
  .priority-row { grid-template-columns: 1fr; align-items: stretch; }
  .scrim-host-actions { grid-template-columns: 1fr; }
}
.yu-feature {
  padding: 24px 22px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.06) 0%, transparent 42%),
    rgba(14, 17, 20, 0.68);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  text-align: left;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
  transition:
    transform var(--dur-base) var(--ease-spring),
    border-color var(--dur-base) ease,
    box-shadow var(--dur-base) ease,
    background var(--dur-base) ease;
}
.yu-feature:hover {
  transform: translateY(-4px) scale(1.012);
  border-color: rgba(var(--lime-rgb), 0.32);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.38),
    0 0 0 1px rgba(var(--lime-rgb), 0.08),
    0 0 28px rgba(var(--teal-rgb), 0.12);
  background:
    linear-gradient(165deg, rgba(var(--lime-rgb), 0.09) 0%, rgba(var(--teal-rgb), 0.07) 48%, transparent 70%),
    rgba(16, 19, 22, 0.82);
}
.yu-feature h3 {
  font-family: var(--font);
  font-size: 1.05rem;
  margin: 0 0 10px;
  letter-spacing: -0.015em;
  text-transform: none;
  color: #fff;
  font-weight: 700;
}
.yu-feature p {
  margin: 0;
  color: rgba(232, 230, 223, 0.7);
  font-size: 14px;
  line-height: 1.55;
  text-transform: none;
  font-family: var(--font);
  font-weight: 400;
}
.yu-footer {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 28px;
  padding: 12px 20px 40px;
}
.yu-footer a {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: color 0.2s ease;
}
.yu-footer a:hover { color: #fff; }

.bot-profile-preview {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--card);
  padding-bottom: 16px;
}
.bot-profile-banner {
  height: 96px;
  background:
    linear-gradient(120deg, rgba(var(--lime-rgb), 0.35), rgba(var(--discord-rgb), 0.25)),
    #1a1f23;
  background-size: cover;
  background-position: center;
}
.bot-profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 3px solid var(--card);
  margin: -36px 0 0 16px;
  object-fit: cover;
  background: #0d1012;
  display: block;
}
.bot-profile-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 16px 0;
}
.bot-profile-meta strong { font-size: 1.05rem; }

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .anim-fade,
  .anim-rise,
  .yu-rise,
  .yu-cta.yu-rise > *,
  .yu-topbar,
  .vx-app-reveal .picker-screen,
  .vx-app-reveal .login-screen,
  .anim-float,
  .skeleton,
  .panel-enter,
  .panel-swap,
  body::before,
  body::after,
  .login-bg-scene,
  .page-hero::after,
  .yu-panel::before,
  .btn::before,
  .main,
  .app-panel {
    animation: none !important;
  }
  .skeleton {
    animation: none !important;
    background: rgba(255, 255, 255, 0.06);
    background-size: auto;
  }
  .yu-brand img,
  .yu-logo,
  .yu-btn,
  .yu-nav-cta,
  .yu-feature,
  .yu-links a::after,
  .btn,
  .server-card,
  .stat-card,
  .nav-item,
  .rail-btn {
    transition: none !important;
  }
  .yu-btn:hover,
  .yu-nav-cta:hover,
  .yu-feature:hover,
  .yu-logo:hover,
  .btn:hover,
  .server-card:hover,
  .stat-card:hover,
  .server-tile:hover,
  .rail-btn:hover,
  .server-action:hover {
    transform: none !important;
  }
}

/* Registration tab */
.reg-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 16px;
}
@media (max-width: 960px) {
  .reg-grid { grid-template-columns: 1fr; }
}
.reg-roster {
  max-height: 420px;
  overflow: auto;
}
.reg-roster table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.reg-roster th, .reg-roster td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
}
.reg-roster th { color: var(--muted); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; }
.priority-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.7fr auto;
  gap: 8px;
  align-items: end;
  margin-bottom: 10px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--volt);
  color: #120b05;
  padding: 10px 14px;
  font-weight: 700;
  border-radius: 0 0 8px 0;
}
.skip-link:focus {
  left: 0;
}
.noscript-banner {
  position: relative;
  z-index: 5;
  margin: 0 auto;
  max-width: 640px;
  padding: 16px 20px;
  color: var(--ink);
  background: rgba(18, 21, 29, 0.95);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.noscript-banner a { color: var(--volt); }

@media (max-width: 560px) {
  .yu-center { padding: 28px 0 36px; width: min(100%, calc(100% - 28px)); }
  .yu-logo { width: 88px; height: 88px; margin-bottom: 16px; }
  .yu-title { font-size: 2.15rem; }
  .yu-tagline { font-size: 0.98rem; margin-bottom: 26px; }
  .yu-topbar-inner { gap: 12px; padding: 0 14px; height: 54px; }
  .yu-nav-cta { padding: 8px 12px; font-size: 12.5px; }
  .yu-btn { min-height: 46px; }
  .yu-btn-primary { min-height: 50px; }
  .yu-features { width: min(100%, calc(100% - 28px)); margin-bottom: 24px; }
  .yu-feature { padding: 18px 16px; }
  .yu-hero-stage { min-height: calc(100vh - 54px); }
}

/* Electron desktop chrome */
body.electron-app .app-bar {
  padding-top: 14px;
  -webkit-app-region: drag;
}
body.electron-app .app-bar button,
body.electron-app .app-bar a,
body.electron-app .server-pill,
body.electron-app .user-chip {
  -webkit-app-region: no-drag;
}
body.electron-app .app-canvas {
  padding-top: 18px;
}
body.electron-app .app-stage {
  background:
    radial-gradient(720px 300px at 12% -8%, rgba(var(--discord-rgb), 0.12), transparent 55%),
    radial-gradient(520px 260px at 100% 0%, rgba(var(--lime-rgb), 0.08), transparent 50%),
    linear-gradient(180deg, rgba(10, 12, 18, 0.4), transparent);
}

/* Picker */
.picker-screen {
  min-height: 100vh;
  padding: 56px 28px 88px;
  max-width: 1080px;
  margin: 0 auto;
}
.picker-head { text-align: center; margin-bottom: 36px; }
.picker-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  margin: 0 auto 14px;
  display: block;
  filter: drop-shadow(0 0 16px rgba(var(--lime-rgb), 0.3));
}
.picker-kicker {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--volt);
  font-weight: 600;
}
.picker-welcome {
  font-size: clamp(26px, 3.5vw, 34px) !important;
  font-weight: 700 !important;
  letter-spacing: -0.03em !important;
  color: #fff;
  margin-bottom: 8px;
}

.welcome-back {
  text-align: left;
  max-width: 640px;
  margin: 0 auto 22px;
  padding: 22px 24px 20px;
  background:
    linear-gradient(165deg, rgba(var(--lime-rgb), 0.08), transparent 46%),
    linear-gradient(180deg, var(--card-top), var(--card));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.welcome-back-title {
  font-family: var(--display);
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  margin: 0 0 16px;
}
.welcome-back-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 22px 32px;
  align-items: start;
}
.welcome-back-stats {
  display: grid;
  gap: 7px;
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.02em;
}
.wb-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
}
.wb-row strong {
  color: var(--volt-hot);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.welcome-back-recent h3 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
}
.welcome-back-rule {
  height: 1px;
  margin-bottom: 10px;
  background: repeating-linear-gradient(
    90deg,
    rgba(244, 241, 234, 0.45) 0 6px,
    transparent 6px 10px
  );
}
.welcome-back-recent ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.welcome-back-recent li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
}
.wb-event-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wb-event-rank {
  flex: none;
  color: var(--teal-hot);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.wb-empty {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 13px;
}
.app-main .welcome-back {
  max-width: none;
  margin: 0 0 22px;
}
@media (max-width: 720px) {
  .welcome-back-body {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}
.picker-sub {
  color: var(--muted);
  font-size: 15px;
  margin: 0 0 16px;
}
.picker-logout { margin-top: 8px; border-radius: 10px !important; }
.picker-section-label {
  margin: 0 0 14px;
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.picker-admin {
  margin: 14px 0 0;
}
.picker-admin .btn { display: inline-flex; }
.picker-or {
  text-align: center;
  color: var(--muted);
  margin: 40px 0 24px;
  font-size: 14px;
}
.picker-or::before {
  content: "";
  display: block;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
  margin-bottom: 24px;
}
.server-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 16px;
}
.server-card {
  background: linear-gradient(180deg, var(--card-top), var(--card));
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius);
  padding: 22px 16px 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition:
    transform var(--dur-base) var(--ease-spring),
    border-color var(--dur-base) ease,
    box-shadow var(--dur-base) ease;
}
.server-card:hover {
  transform: translateY(-5px) scale(1.015);
  border-color: rgba(var(--lime-rgb), 0.28);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.4), var(--glow-volt);
}
.server-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  background: #0a0b0d;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
  transition: transform var(--dur-slow) var(--ease-spring), box-shadow var(--dur-base) ease;
}
.server-card:hover .server-icon {
  transform: scale(1.08) rotate(-3deg);
  box-shadow: 0 0 0 3px rgba(var(--amber-rgb), 0.35), 0 8px 20px rgba(0, 0, 0, 0.4);
}
.server-icon.ph {
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 800;
  color: var(--volt);
  background: linear-gradient(145deg, #252830, #14161c);
}
.server-card h3 {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  color: #fff;
  line-height: 1.3;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin: 0;
}
.server-action {
  appearance: none;
  border: 0;
  cursor: pointer;
  width: 100%;
  margin-top: auto;
  padding: 10px 12px;
  border-radius: 10px;
  font-family: inherit;
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
  text-align: center;
  display: block;
  background: linear-gradient(180deg, var(--discord-hot), var(--discord));
  color: #fff;
  box-shadow: 0 8px 20px rgba(var(--discord-rgb), 0.28);
  transition: transform var(--dur-base) var(--ease-spring), filter var(--dur-fast) ease, box-shadow var(--dur-base) ease;
}
.server-action:hover { filter: brightness(1.08); transform: translateY(-1px); color: #fff; box-shadow: 0 12px 26px rgba(var(--discord-rgb), 0.4); }
.server-action:active { transform: scale(0.97); transition-duration: var(--dur-fast); }
.server-action.invite {
  background: linear-gradient(180deg, #2a3040, #1a1e28);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line-bright);
}
.server-action:disabled { opacity: 0.6; cursor: wait; }
.muted-center { text-align: center; color: var(--muted); grid-column: 1 / -1; }

/* App shell */
.app-shell { min-height: 100vh; display: flex; flex-direction: column; }
.app-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(10, 12, 18, 0.88);
  backdrop-filter: blur(20px) saturate(1.2);
  position: sticky;
  top: 0;
  z-index: 30;
}
.app-bar-left, .app-bar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.app-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(var(--lime-rgb), 0.35));
  flex-shrink: 0;
}
.app-title-block { display: flex; flex-direction: column; line-height: 1.15; margin-right: 6px; }
.app-product { font-weight: 700; font-size: 15px; letter-spacing: -0.02em; color: #fff; }
.app-product-sub { font-size: 11px; color: var(--muted); letter-spacing: 0.04em; }

.server-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: min(300px, 42vw);
  padding: 6px 12px 6px 6px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  cursor: pointer;
  font: inherit;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.server-pill:hover {
  border-color: rgba(var(--lime-rgb), 0.35);
  background: rgba(var(--lime-rgb), 0.06);
  box-shadow: 0 0 24px rgba(var(--lime-rgb), 0.08);
}
.app-server-ico {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: #151820;
}
.app-server-ico.ph {
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--volt);
}
.server-pill-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
}
.server-pill-chev {
  color: var(--volt);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.user-chip {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--ink);
  font-size: 13px;
  white-space: nowrap;
}

.btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  font-weight: 650;
  font-size: 14px;
  letter-spacing: 0.01em;
  padding: 11px 16px;
  min-height: 42px;
  background: linear-gradient(180deg, var(--volt-hot), var(--volt) 55%, var(--volt-dim));
  color: #0c1004;
  border-radius: var(--radius-sm);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 22px rgba(var(--lime-rgb), 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.34);
  transition:
    transform var(--dur-base) var(--ease-spring),
    filter var(--dur-fast) ease,
    box-shadow var(--dur-base) ease,
    opacity var(--dur-fast) ease,
    background var(--dur-fast) ease;
}
/* Sheen: a slow, rare idle pass; a quick deliberate sweep on hover */
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 20%, rgba(255,255,255,0.38) 48%, transparent 72%);
  transform: translateX(-140%) skewX(-18deg);
  animation: shine-idle 9s var(--ease-in-out) infinite;
  pointer-events: none;
}
.btn:hover::before { animation: shine-sweep 0.75s var(--ease-out) 1; }
.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
  box-shadow: 0 10px 24px rgba(var(--lime-rgb), 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.32);
}
.btn:active { transform: translateY(0) scale(0.97); filter: brightness(0.97); transition-duration: var(--dur-fast); }
.btn.ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line-bright);
}
.btn.ghost:hover {
  box-shadow: inset 0 0 0 1px rgba(var(--lime-rgb), 0.45);
  color: var(--volt-hot);
  background: rgba(var(--lime-rgb), 0.06);
}
.btn.btn-sm { padding: 8px 12px; font-size: 13px; min-height: 34px; }
.btn.ghost::before { display: none; }
.btn.magenta {
  background: linear-gradient(180deg, var(--magenta-hot), var(--magenta) 55%, #c01860);
  color: white;
  box-shadow: 0 8px 22px rgba(var(--magenta-rgb), 0.32);
}
.btn.gold {
  background: linear-gradient(180deg, var(--gold-soft), var(--gold) 60%, #c48912);
  color: #1a1405;
  box-shadow: 0 8px 22px rgba(var(--amber-rgb), 0.3);
}
.btn.danger,
.btn.btn-danger {
  background: linear-gradient(180deg, #ff7a7a, var(--danger));
  color: #fff;
  box-shadow: 0 6px 16px rgba(255, 92, 92, 0.22);
}
.btn.danger:hover,
.btn.btn-danger:hover {
  filter: brightness(1.05);
  box-shadow: 0 10px 22px rgba(255, 92, 92, 0.3);
}
.btn-primary {
  background: linear-gradient(180deg, var(--volt-hot), var(--volt) 55%, var(--volt-dim));
  color: #0c1004;
}
.btn:disabled, .btn.is-loading {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  filter: none;
  pointer-events: none;
  box-shadow: none;
}
.btn.is-loading::after {
  content: "";
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.app-body {
  display: grid;
  grid-template-columns: 96px 1fr;
  flex: 1;
  min-height: 0;
}
.app-rail {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 10px;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  background:
    linear-gradient(180deg, rgba(14, 16, 24, 0.98), rgba(8, 10, 14, 0.92)),
    radial-gradient(140px 200px at 50% 0%, rgba(var(--lime-rgb), 0.07), transparent 70%);
}
.rail-brand-mark {
  width: 28px;
  height: 3px;
  border-radius: 99px;
  margin: 0 auto 8px;
  background: linear-gradient(90deg, var(--volt), transparent);
  opacity: 0.7;
}
.rail-btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 13px 6px;
  border-radius: 14px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.rail-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-1px);
}
.rail-btn.active {
  color: #101408;
  background: linear-gradient(160deg, var(--volt-hot), var(--volt) 55%, var(--volt-dim));
  box-shadow: var(--glow-volt);
  font-weight: 700;
}
.rail-ico {
  font-size: 15px;
  line-height: 1;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
}
.rail-btn.active .rail-ico { background: rgba(16, 20, 8, 0.18); }
.rail-label {
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.app-stage {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background:
    radial-gradient(720px 300px at 12% -8%, rgba(var(--discord-rgb), 0.08), transparent 55%),
    radial-gradient(520px 260px at 100% 0%, rgba(var(--lime-rgb), 0.05), transparent 50%);
}
.app-subnav {
  padding: 18px 28px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(9, 11, 16, 0.45);
}
.subnav-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.subnav-section {
  display: block;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #fff;
}
.subnav-blurb {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.subnav-active {
  flex-shrink: 0;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(var(--lime-rgb), 0.1);
  border: 1px solid rgba(var(--lime-rgb), 0.22);
  color: var(--volt-hot);
  font-size: 12px;
  font-weight: 600;
}
.subnav-chips {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 16px;
}
.chip-group { display: flex; flex-direction: column; gap: 8px; }
.chip-group-label {
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(139, 149, 168, 0.8);
  font-weight: 650;
}
.chip-group-row { display: flex; flex-wrap: wrap; gap: 8px; }
.rail-chip {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  padding: 8px 14px;
  border-radius: 999px;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition:
    color var(--dur-fast) ease,
    border-color var(--dur-fast) ease,
    background var(--dur-fast) ease,
    box-shadow var(--dur-base) ease,
    transform var(--dur-base) var(--ease-spring);
}
.rail-chip:active { transform: scale(0.95); transition-duration: var(--dur-fast); }
.rail-chip:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
}
.rail-chip.active {
  color: #101408;
  border-color: transparent;
  background: linear-gradient(180deg, var(--volt-hot), var(--volt));
  box-shadow: 0 8px 22px rgba(var(--lime-rgb), 0.18);
  font-weight: 700;
}

.app-canvas {
  flex: 1;
  padding: 22px 28px 72px;
}
.main, .app-panel {
  max-width: var(--stage-max);
  margin: 0 auto;
  padding: 0;
  animation: fade-up 0.35s ease both;
}
.app-panel > h2,
.main > h2 {
  font-size: clamp(24px, 2.8vw, 30px);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #fff;
  margin: 0 0 6px;
}
.main > p { color: var(--muted); }

.page-hero {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-end;
  padding: 20px 22px;
  margin-bottom: 10px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(135deg, rgba(var(--lime-rgb), 0.14), transparent 42%),
    linear-gradient(210deg, rgba(var(--teal-rgb), 0.1), transparent 50%),
    linear-gradient(180deg, rgba(28, 36, 48, 0.96), rgba(12, 16, 24, 0.92));
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.page-hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -40% auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--magenta-rgb), 0.18), transparent 68%);
  animation: accent-breathe 5.5s ease-in-out infinite;
  pointer-events: none;
}
.page-kicker {
  margin: 0 0 6px;
  font-size: 11px;
  color: var(--volt);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 650;
}
.page-lead { margin: 6px 0 0; color: var(--muted); max-width: 44ch; }
.stat-row { display: flex; flex-wrap: wrap; gap: 10px; }
.stat-pill {
  min-width: 140px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.stat-pill span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.stat-pill strong { font-size: 13px; color: #fff; font-weight: 600; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 16px;
}
.card {
  background:
    linear-gradient(155deg, rgba(var(--lime-rgb), 0.04), transparent 40%),
    linear-gradient(180deg, var(--card-top), var(--card));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.045);
  position: relative;
  overflow: hidden;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--volt), transparent 55%, var(--discord));
  opacity: 0.8;
}
.card:hover {
  border-color: rgba(var(--lime-rgb), 0.22);
  box-shadow: var(--shadow), 0 0 28px rgba(var(--lime-rgb), 0.05);
}
.card.card-accent-volt {
  border-color: rgba(var(--lime-rgb), 0.28);
  background:
    linear-gradient(155deg, rgba(var(--lime-rgb), 0.1), transparent 42%),
    linear-gradient(180deg, var(--card-top), var(--card));
}
.card.card-accent-volt::before {
  background: linear-gradient(90deg, var(--volt), var(--magenta));
  opacity: 1;
}
.role-select-wrap {
  display: grid;
  gap: 10px;
}
.role-select {
  font-weight: 600;
}
.role-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(var(--lime-rgb), 0.06);
  border: 1px solid rgba(var(--lime-rgb), 0.18);
  color: var(--ink);
  font-size: 14px;
}
.role-preview.muted {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--line);
  color: var(--muted);
}
.role-swatch {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.35);
}
.card h3 {
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--volt);
  margin-bottom: 12px;
  font-weight: 700;
}
.card p, label { color: var(--muted); font-size: 14px; }
label { display: block; margin-top: 2px; font-weight: 500; }

input, select, textarea {
  width: 100%;
  margin: 6px 0 14px;
  padding: 11px 13px;
  background: #090b10;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font: inherit;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: border-color var(--dur-fast) ease, box-shadow var(--dur-base) var(--ease-out), background-color var(--dur-fast) ease;
}
input:hover:not(:focus), select:hover:not(:focus), textarea:hover:not(:focus) { border-color: var(--line-bright); }
select { background-color: #000; color: #f3f5f8; color-scheme: dark; }
select option, select optgroup { background-color: #000; color: #f3f5f8; }
#scrim-mode, #scrim-mode option, #scrim-mode optgroup {
  background-color: #000 !important;
  color: #fff !important;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: rgba(var(--lime-rgb), 0.45);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3), 0 0 0 3px rgba(var(--lime-rgb), 0.1);
}

.table { width: 100%; border-collapse: collapse; }
.table th, .table td {
  text-align: left;
  padding: 11px 8px;
  border-bottom: 1px solid rgba(42, 49, 66, 0.85);
  font-size: 14px;
}
.table th {
  color: var(--volt);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.rank-1 { color: var(--gold); text-shadow: 0 0 12px rgba(240, 201, 58, 0.3); }
.pill {
  display: inline-block;
  padding: 3px 10px;
  background: linear-gradient(180deg, rgba(var(--lime-rgb), 0.16), rgba(90, 110, 18, 0.3));
  color: var(--volt-hot);
  border: 1px solid rgba(var(--lime-rgb), 0.3);
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.server-tile {
  cursor: pointer;
  display: flex;
  gap: 12px;
  align-items: center;
  text-align: left;
  width: 100%;
  color: inherit;
}
.server-tile:hover { transform: translateY(-2px); }
.server-tile img, .ph {
  width: 46px;
  height: 46px;
  object-fit: cover;
  border-radius: 10px;
  background: linear-gradient(145deg, #2a3040, #151820);
}
.flash {
  padding: 12px 14px;
  background: linear-gradient(90deg, rgba(240, 201, 58, 0.14), rgba(35, 24, 10, 0.88));
  border: 1px solid var(--gold);
  border-radius: 12px;
  color: var(--gold-soft);
  margin-bottom: 16px;
  animation: flash-in var(--dur-slow) var(--ease-out-expo) backwards;
}
.error {
  animation: flash-in var(--dur-slow) var(--ease-out-expo) backwards, error-nudge 0.5s var(--ease-out) 0.1s 1;
  padding: 12px 14px;
  background: linear-gradient(90deg, rgba(255, 90, 54, 0.14), rgba(42, 16, 12, 0.88));
  border: 1px solid var(--danger);
  border-radius: 12px;
  color: var(--danger-soft);
  margin-bottom: 16px;
}
.points-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.stack-after { margin-top: 18px; }
.hint-line {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 13px;
}
.scope-banner {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(var(--lime-rgb), 0.28);
  background: linear-gradient(90deg, rgba(var(--lime-rgb), 0.1), rgba(18, 22, 32, 0.9));
  color: var(--ink);
  font-size: 14px;
}
.table-card { overflow-x: auto; }
.page-lead .pill { margin-right: 4px; }

@media (max-width: 860px) {
  .app-body { grid-template-columns: 1fr; }
  .app-rail {
    flex-direction: row;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 10px;
  }
  .rail-brand-mark { display: none; }
  .rail-btn { min-width: 72px; }
  .app-title-block { display: none; }
  .server-pill { max-width: 150px; }
  .app-canvas, .app-subnav { padding-left: 16px; padding-right: 16px; }
  .points-grid { grid-template-columns: repeat(2, 1fr); }
  .login-bg-dark { clip-path: none; opacity: 0.92; }
  .login-bg-glow { clip-path: none; opacity: 0.45; }
  .subnav-meta { flex-direction: column; }
}

.scrim-host-panel {
  background:
    linear-gradient(160deg, rgba(var(--discord-rgb), 0.1), transparent 35%),
    linear-gradient(180deg, #1a1e28, #12151c);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 20px 0;
  box-shadow: var(--shadow);
}
.scrim-host-topbar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--line);
}
.scrim-host-topbar > div {
  background: linear-gradient(180deg, #1e222c, #16181f);
  padding: 10px 14px;
  font-size: 13px;
}
.scrim-host-topbar label {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 4px;
}
.scrim-host-status {
  background: linear-gradient(90deg, rgba(var(--lime-rgb), 0.1), rgba(28, 32, 40, 0.95));
  padding: 10px 14px;
  font-size: 13px;
  border-bottom: 1px solid var(--line);
  color: var(--volt-hot);
}
.scrim-host-body {
  padding: 28px 20px 24px;
  text-align: center;
}
.scrim-host-alert {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(61, 232, 255, 0.25), rgba(30, 58, 95, 0.9));
  color: var(--cyan);
  display: grid;
  place-items: center;
  font-size: 32px;
  margin: 0 auto 16px;
  box-shadow: 0 0 28px rgba(61, 232, 255, 0.25);
}
.scrim-host-details {
  text-align: left;
  background: linear-gradient(180deg, #1e222c, #14161c);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 18px;
  margin: 16px auto;
  max-width: 420px;
  font-size: 14px;
  line-height: 1.8;
}
.scrim-host-details strong {
  color: var(--muted);
  font-weight: 500;
  min-width: 110px;
  display: inline-block;
}
.scrim-host-progress {
  max-width: 420px;
  margin: 24px auto 0;
}
.scrim-host-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 8px;
  color: var(--muted);
}
.scrim-host-progress-bar {
  height: 8px;
  background: #1a1e28;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 99px;
}
.scrim-host-progress-bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--volt-dim), var(--volt), var(--cyan));
  box-shadow: 0 0 12px rgba(var(--lime-rgb), 0.45);
  transition: width 0.3s;
}
.scrim-host-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  max-width: 420px;
  margin: 20px auto 0;
}
.scrim-host-actions .btn {
  padding: 14px;
  font-size: 15px;
}
.btn.dispatch {
  background: linear-gradient(180deg, #5cf0ff, #2ec4d9 55%, #1a8fa3);
  color: #041218;
  box-shadow: 0 0 24px rgba(61, 232, 255, 0.35);
}
.btn.cancel-scrim {
  background: linear-gradient(180deg, #ff7a5c, var(--danger) 55%, #c43018);
  color: white;
  box-shadow: 0 0 24px rgba(255, 90, 54, 0.3);
}

/* Levels ? premium ladder UI */
.levels-hero {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 20px;
  align-items: center;
  background:
    linear-gradient(135deg, rgba(240, 201, 58, 0.14), transparent 42%),
    linear-gradient(180deg, var(--card-top), var(--card));
  border-color: rgba(240, 201, 58, 0.28);
}
.levels-eyebrow {
  margin: 0 0 6px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
}
.levels-hero-title {
  margin: 0 0 8px;
  font-size: 1.35rem;
  color: #fff;
  letter-spacing: -0.02em;
}
.levels-hero p { margin: 0; color: var(--muted); line-height: 1.5; }
.levels-curve {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.levels-curve-pill {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(240, 201, 58, 0.2);
}
.levels-curve-pill span {
  display: block;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold-soft);
}
.levels-curve-pill strong {
  display: block;
  margin-top: 4px;
  color: #fff;
  font-size: 1rem;
}
.levels-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}
.levels-board {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.levels-board li {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  grid-template-rows: auto auto;
  gap: 2px 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.levels-rank {
  grid-row: 1 / span 2;
  font-weight: 800;
  color: var(--gold);
}
.levels-name { color: #fff; font-weight: 600; }
.levels-meta { color: var(--muted); font-size: 12px; text-align: right; }
.levels-bar {
  grid-column: 2 / span 2;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.levels-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--volt));
  border-radius: inherit;
}
.levels-role-row {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 1.5fr auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 12px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(240, 201, 58, 0.04);
  border: 1px solid rgba(240, 201, 58, 0.12);
}
.levels-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.levels-rewards-card { margin-top: 16px; }

@media (max-width: 860px) {
  .levels-hero { grid-template-columns: 1fr; }
  .levels-fields { grid-template-columns: 1fr; }
  .levels-role-row { grid-template-columns: 1fr; }
  .levels-board li { grid-template-columns: 36px 1fr; }
  .levels-meta { grid-column: 2; text-align: left; }
}

/* Anti-stretch + layout safety */
.card h3, h1, h2, h3 {
  text-wrap: balance;
  overflow-wrap: anywhere;
}
img, svg { max-width: 100%; height: auto; }
body { text-rendering: optimizeLegibility; }

/* ========== Dashboard v2 shell ========== */
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}
.status-dot.ok { background: var(--success); box-shadow: 0 0 8px rgba(61, 214, 140, 0.5); }
.status-dot.warn { background: var(--warning); }
.status-dot.err { background: var(--danger); }
.status-dot.live { background: var(--live); box-shadow: 0 0 8px rgba(255, 77, 109, 0.55); }

.pill-live {
  background: rgba(255, 77, 109, 0.15);
  color: #ff8fa3;
  border: 1px solid rgba(255, 77, 109, 0.35);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.app-shell.v2 {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  background: transparent;
  transition: grid-template-columns var(--dur-slow) var(--ease-out-expo);
}
.app-shell.v2 > .app-sidebar {
  grid-column: 1;
  grid-row: 1;
}
.app-shell.v2 > .app-main {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
}
/* Never participate in the desktop grid ? fixed overlay only when the drawer is open */
.mobile-nav-backdrop {
  display: none !important;
  position: fixed;
  inset: 0;
  z-index: 35;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  appearance: none;
  background: rgba(4, 6, 8, 0.62);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  cursor: pointer;
}
.app-shell.v2.sidebar-collapsed {
  grid-template-columns: var(--sidebar-collapsed) 1fr;
}
.app-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(255, 255, 255, 0.09);
  background: linear-gradient(180deg, #0c1016 0%, #090c11 100%);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.02);
  z-index: 20;
  overflow: hidden;
}
.app-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 16px 14px;
  border-bottom: 1px solid var(--line);
  min-height: var(--topbar-h);
}
.app-sidebar-brand img { width: 28px; height: 28px; object-fit: contain; }
.app-sidebar-brand strong {
  font-family: var(--display);
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.app-sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 10px 20px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav-group-label {
  margin: 14px 10px 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.nav-item {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  text-align: left;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  transition:
    background var(--dur-base) ease,
    color var(--dur-base) ease,
    box-shadow var(--dur-base) ease,
    transform var(--dur-base) var(--ease-spring);
  white-space: nowrap;
}
.nav-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 3px;
  height: 16px;
  border-radius: 3px;
  background: var(--volt);
  transform: translateY(-50%) scaleY(0);
  opacity: 0;
  transition: transform var(--dur-base) var(--ease-spring), opacity var(--dur-fast) ease;
}
.nav-item:hover {
  color: var(--ink);
  background: linear-gradient(90deg, rgba(var(--lime-rgb), 0.1), rgba(var(--teal-rgb), 0.06));
  transform: translateX(3px);
}
.nav-item:hover::before { transform: translateY(-50%) scaleY(1); opacity: 1; }
.nav-item:active { transform: translateX(3px) scale(0.98); transition-duration: var(--dur-fast); }
.nav-item.active {
  color: #1a1300;
  background: linear-gradient(90deg, var(--volt-hot), var(--volt) 55%, #e8a23a);
  box-shadow: var(--glow-volt);
  transform: none;
  animation: nav-pop var(--dur-slow) var(--ease-spring) 1;
}
.nav-item.active::before { display: none; }
@keyframes nav-pop {
  0% { transform: scale(0.96); }
  100% { transform: none; }
}
.nav-item .nav-ico { width: 18px; text-align: center; opacity: 0.85; flex-shrink: 0; transition: transform var(--dur-base) var(--ease-spring); }
.nav-item:hover .nav-ico { transform: scale(1.15); }
.app-sidebar-foot {
  padding: 12px;
  border-top: 1px solid var(--line);
}
.app-sidebar-foot .server-mini {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 10px;
  background: rgba(255,255,255,0.03);
}
.app-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.app-topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 10, 13, 0.82);
  backdrop-filter: blur(14px);
}
.app-topbar-search {
  flex: 1;
  max-width: 360px;
  min-width: 120px;
}
.app-topbar-search input {
  width: 100%;
  margin: 0;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 12px;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
}
.app-topbar-search input:focus {
  outline: none;
  border-color: rgba(var(--lime-rgb), 0.45);
}
.app-content {
  padding: 24px 24px 52px;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

.ov-greet h1 {
  font-family: var(--font);
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
  text-transform: none;
}
.ov-greet p { margin: 0 0 22px; color: var(--muted); font-size: 15px; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.stat-card {
  background:
    linear-gradient(165deg, rgba(var(--lime-rgb), 0.08), transparent 42%),
    linear-gradient(180deg, var(--card-top), var(--bg-elevated));
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius);
  padding: 16px 14px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition: border-color var(--dur-base) ease, transform var(--dur-base) var(--ease-spring), box-shadow var(--dur-base) ease;
}
.stat-card:hover {
  transform: translateY(-3px) scale(1.01);
  border-color: rgba(var(--lime-rgb), 0.42);
  box-shadow: 0 16px 34px rgba(0,0,0,0.32), var(--glow-volt);
}
.stat-grid .stat-card:nth-child(2) {
  background:
    linear-gradient(165deg, rgba(var(--teal-rgb), 0.1), transparent 42%),
    linear-gradient(180deg, var(--card-top), var(--bg-elevated));
}
.stat-grid .stat-card:nth-child(2):hover {
  border-color: rgba(var(--teal-rgb), 0.45);
  box-shadow: 0 16px 34px rgba(0,0,0,0.32), var(--glow-teal);
}
.stat-grid .stat-card:nth-child(3) {
  background:
    linear-gradient(165deg, rgba(var(--magenta-rgb), 0.1), transparent 42%),
    linear-gradient(180deg, var(--card-top), var(--bg-elevated));
}
.stat-grid .stat-card:nth-child(3):hover {
  border-color: rgba(var(--magenta-rgb), 0.42);
  box-shadow: 0 16px 34px rgba(0,0,0,0.32), var(--glow-magenta);
}
.stat-grid .stat-card:nth-child(4) {
  background:
    linear-gradient(165deg, rgba(var(--discord-rgb), 0.12), transparent 42%),
    linear-gradient(180deg, var(--card-top), var(--bg-elevated));
}
.stat-grid .stat-card:nth-child(5) {
  background:
    linear-gradient(165deg, rgba(var(--violet-rgb), 0.12), transparent 42%),
    linear-gradient(180deg, var(--card-top), var(--bg-elevated));
}
.stat-card .label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.stat-card .value {
  font-family: var(--display);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.stat-card .value.is-counting { color: var(--volt-hot); transition: color 0.4s ease; }
.stat-card .hint { margin-top: 6px; font-size: 12px; color: var(--muted); }

.panel-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 14px;
  margin-bottom: 14px;
}
.panel-card {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}
.panel-card h3 {
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 14px;
  letter-spacing: -0.01em;
  text-transform: none;
}
.status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
}
.status-row:last-child { border-bottom: 0; }
.status-row .k { color: var(--muted); }
.status-row .v { font-weight: 650; color: var(--ink); font-variant-numeric: tabular-nums; }

.activity-list { list-style: none; margin: 0; padding: 0; }
.activity-list li {
  display: grid;
  grid-template-columns: 16px 1fr auto;
  gap: 10px;
  align-items: start;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.activity-list li:last-child { border-bottom: 0; }
.activity-list .msg { color: var(--ink); line-height: 1.4; }
.activity-list time { color: var(--muted); font-size: 11px; white-space: nowrap; }

.lobby-list { display: grid; gap: 10px; }
.lobby-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.02);
}
.lobby-card h4 { margin: 0 0 4px; font-size: 0.95rem; text-transform: none; font-family: var(--font); }
.lobby-meta { color: var(--muted); font-size: 12.5px; }

.empty-state {
  text-align: center;
  padding: 36px 20px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
}
.empty-state strong { display: block; color: var(--ink); margin-bottom: 6px; font-size: 1rem; }

.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.04), rgba(255,255,255,0.08), rgba(255,255,255,0.04));
  background-size: 200% 100%;
  animation: shimmer 1.2s ease-in-out infinite;
  border-radius: 8px;
  height: 14px;
}
@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.filter-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.filter-chip {
  appearance: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 7px 12px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 650;
  cursor: pointer;
  transition:
    background var(--dur-fast) ease,
    border-color var(--dur-fast) ease,
    color var(--dur-fast) ease,
    transform var(--dur-base) var(--ease-spring);
}
.filter-chip:hover { color: var(--ink); border-color: var(--line-bright); background: rgba(255, 255, 255, 0.04); }
.filter-chip:active { transform: scale(0.95); transition-duration: var(--dur-fast); }
.filter-chip.active {
  background: rgba(var(--lime-rgb), 0.12);
  border-color: rgba(var(--lime-rgb), 0.4);
  color: var(--volt-hot);
}

.notif-btn {
  position: relative;
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
  color: var(--ink);
  width: 38px;
  height: 38px;
  border-radius: 10px;
  cursor: pointer;
  transition: background var(--dur-fast) ease, border-color var(--dur-fast) ease, transform var(--dur-base) var(--ease-spring);
}
.notif-btn:hover, .sidebar-toggle:hover { background: rgba(255,255,255,0.07); border-color: var(--line-bright); }
.notif-btn:active, .sidebar-toggle:active { transform: scale(0.92); transition-duration: var(--dur-fast); }
.notif-btn .badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--live);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.sidebar-toggle {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
  color: var(--ink);
  width: 38px;
  height: 38px;
  border-radius: 10px;
  cursor: pointer;
  display: none;
  transition: background var(--dur-fast) ease, border-color var(--dur-fast) ease, transform var(--dur-base) var(--ease-spring);
}

.app-shell.v2.sidebar-collapsed .app-sidebar-brand strong,
.app-shell.v2.sidebar-collapsed .nav-group-label,
.app-shell.v2.sidebar-collapsed .nav-item span:not(.nav-ico),
.app-shell.v2.sidebar-collapsed .server-mini-text { display: none; }
.app-shell.v2.sidebar-collapsed .nav-item { justify-content: center; padding: 12px; }

@media (max-width: 1100px) {
  .stat-grid { grid-template-columns: repeat(3, 1fr); }
  .panel-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .app-shell.v2 { grid-template-columns: 1fr; }
  .app-shell.v2 > .app-sidebar,
  .app-shell.v2 > .app-main {
    grid-column: 1;
    grid-row: 1;
  }
  .app-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: min(280px, 86vw);
    transform: translateX(-105%);
    transition: transform 0.42s var(--ease-out-expo);
    box-shadow: var(--shadow);
    z-index: 40;
  }
  .mobile-nav-backdrop { animation: backdrop-in 0.3s ease both; }
  .app-shell.v2.mobile-nav-open .app-sidebar,
  .app-shell.v2.sidebar-open .app-sidebar,
  .app-shell.v2.mobile-nav .app-sidebar {
    transform: translateX(0);
  }
  .app-shell.v2.mobile-nav-open::before,
  .app-shell.v2.sidebar-open::before {
    content: none;
  }
  .app-shell.v2.mobile-nav-open .mobile-nav-backdrop,
  .app-shell.v2.sidebar-open .mobile-nav-backdrop {
    display: block !important;
  }
  .sidebar-toggle { display: inline-grid; place-items: center; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .app-content { padding: 16px 14px 40px; }
  .priority-row { grid-template-columns: 1fr; }
  .scrim-host-actions { grid-template-columns: 1fr; }
  .scrim-host-topbar { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .stat-grid { grid-template-columns: 1fr; }
}

/* ——— Yunite-inspired rich panels (DropSpot amber / teal) ——— */
.yu-panel {
  position: relative;
  margin: 0 0 16px;
  border-radius: 14px;
  background: linear-gradient(180deg, #151a1f 0%, #111518 100%);
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
  overflow: hidden;
  contain: layout style;
}
.yu-panel::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--amber) 0%,
    var(--amber-hot) 18%,
    var(--teal) 42%,
    #7b85ff 68%,
    var(--magenta) 100%
  );
  animation: accent-breathe 6s ease-in-out infinite;
  pointer-events: none;
}
.yu-panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--line);
}
.yu-panel-head h3 {
  margin: 0;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9ec4ff;
}
.yu-panel-head-amber h3 { color: var(--gold-soft); }
.yu-panel-head-teal h3 { color: var(--teal-hot); }
.yu-panel-ico { font-size: 1.05rem; line-height: 1; }
.yu-panel-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.yu-panel-body { padding: 16px; }
.yu-help {
  margin: 8px 0 12px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}
.yu-field-label {
  display: block;
  margin: 10px 0 6px;
  font-size: 0.82rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.yu-input,
.yu-panel-body input[type="text"],
.yu-panel-body input[type="file"],
.yu-panel-body textarea,
.yu-panel-body select {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--line-bright);
  background: #0b0e11;
  color: var(--ink);
  padding: 10px 12px;
}
.yu-panel-body textarea {
  min-height: 180px;
  resize: vertical;
  font-family: inherit;
  line-height: 1.45;
}
.rules-cmd-row {
  display: flex;
  align-items: stretch;
  gap: 0;
}
.rules-cmd-bang {
  display: grid;
  place-items: center;
  min-width: 42px;
  padding: 0 10px;
  border: 1px solid var(--line-bright);
  border-right: 0;
  border-radius: 10px 0 0 10px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-weight: 700;
}
.rules-cmd-row input {
  border-radius: 0 10px 10px 0 !important;
}
.rules-preview {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
}
.rules-preview img {
  width: min(280px, 100%);
  height: auto;
  max-height: 160px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #07090b;
}
.yu-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.yu-row select { flex: 1; min-width: 180px; }
.yu-check {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  font-weight: 600;
}
.yu-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--magenta);
  flex-shrink: 0;
}
.yu-log-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 14px;
  margin-top: 12px;
}
.yu-log-item {
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.yu-log-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(var(--lime-rgb), 0.25);
}
.yu-log-ico { width: 1.25rem; text-align: center; }

/* Richer existing cards — same colour system, smoother shell */
.app-shell.v2 .card,
.app-shell.v2 .panel-card,
.app-shell.v2 .stat-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
  transition: border-color var(--dur-base) ease, transform var(--dur-base) var(--ease-spring), box-shadow var(--dur-base) ease;
}
.app-shell.v2 .card::before,
.app-shell.v2 .panel-card::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--amber), var(--teal), var(--magenta));
  opacity: 0.85;
  pointer-events: none;
}
.app-shell.v2 .card:hover,
.app-shell.v2 .panel-card:hover {
  border-color: rgba(var(--lime-rgb), 0.38);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.36), 0 0 0 1px rgba(var(--teal-rgb), 0.12);
  transform: translateY(-2px);
}
.app-sidebar-nav {
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--lime-rgb), 0.35) transparent;
}
.app-content {
  content-visibility: auto;
}
@media (max-width: 980px) {
  .yu-log-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .yu-log-grid { grid-template-columns: 1fr; }
  .yu-panel-actions { width: 100%; margin-left: 0; }
}
/* Tab change: the panel de-blurs in, then its top-level blocks cascade a beat behind */
.panel-swap > * {
  animation: child-rise 0.55s var(--ease-out-expo) backwards;
  animation-delay: calc(60ms + var(--i, 0) * 45ms);
}
.panel-swap > :nth-child(1) { --i: 0; }
.panel-swap > :nth-child(2) { --i: 1; }
.panel-swap > :nth-child(3) { --i: 2; }
.panel-swap > :nth-child(4) { --i: 3; }
.panel-swap > :nth-child(5) { --i: 4; }
.panel-swap > :nth-child(6) { --i: 5; }
.panel-swap > :nth-child(7) { --i: 6; }
.panel-swap > :nth-child(n+8) { --i: 7; }
.panel-swap .stat-grid > .stat-card,
.panel-swap .grid > .card,
.panel-swap .panel-grid > .panel-card,
.panel-swap .host-preset-grid > .host-preset-card {
  animation: card-in 0.6s var(--ease-out-expo) backwards;
  animation-delay: calc(140ms + var(--i, 0) * 55ms);
}
.panel-swap .stat-grid > :nth-child(1), .panel-swap .grid > :nth-child(1), .panel-swap .panel-grid > :nth-child(1), .panel-swap .host-preset-grid > :nth-child(1) { --i: 0; }
.panel-swap .stat-grid > :nth-child(2), .panel-swap .grid > :nth-child(2), .panel-swap .panel-grid > :nth-child(2), .panel-swap .host-preset-grid > :nth-child(2) { --i: 1; }
.panel-swap .stat-grid > :nth-child(3), .panel-swap .grid > :nth-child(3), .panel-swap .panel-grid > :nth-child(3), .panel-swap .host-preset-grid > :nth-child(3) { --i: 2; }
.panel-swap .stat-grid > :nth-child(4), .panel-swap .grid > :nth-child(4), .panel-swap .panel-grid > :nth-child(4), .panel-swap .host-preset-grid > :nth-child(4) { --i: 3; }
.panel-swap .stat-grid > :nth-child(5), .panel-swap .grid > :nth-child(5), .panel-swap .panel-grid > :nth-child(5), .panel-swap .host-preset-grid > :nth-child(5) { --i: 4; }
.panel-swap .stat-grid > :nth-child(n+6), .panel-swap .grid > :nth-child(n+6), .panel-swap .panel-grid > :nth-child(n+6), .panel-swap .host-preset-grid > :nth-child(n+6) { --i: 5; }

/* Pointer spotlight — app.js feeds --mx/--my (px) on hover; pure CSS otherwise */
.card, .panel-card, .stat-card, .yu-feature, .server-card, .host-preset-card {
  --mx: 50%;
  --my: 50%;
  position: relative;
  overflow: hidden;
}
.card::after,
.panel-card::after,
.stat-card::after,
.yu-feature::after,
.server-card::after,
.host-preset-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(
    260px circle at var(--mx) var(--my),
    rgba(255, 255, 255, 0.085),
    rgba(var(--amber-rgb), 0.05) 32%,
    transparent 62%
  );
  transition: opacity var(--dur-slow) ease;
  z-index: 0;
}
.yu-feature::after { background: radial-gradient(280px circle at var(--mx) var(--my), rgba(var(--teal-rgb), 0.12), rgba(var(--lime-rgb), 0.06) 34%, transparent 64%); }
.card:hover::after,
.panel-card:hover::after,
.stat-card:hover::after,
.yu-feature:hover::after,
.server-card:hover::after,
.host-preset-card:hover::after { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .app-shell.v2 .card,
  .app-shell.v2 .panel-card,
  .yu-log-item,
  .app-shell.v2 {
    transition: none;
  }
  .panel-swap > *,
  .panel-swap .stat-grid > .stat-card,
  .panel-swap .grid > .card,
  .panel-swap .panel-grid > .panel-card,
  .panel-swap .host-preset-grid > .host-preset-card,
  .nav-item.active,
  .yu-btn-cta::before,
  .error,
  .flash {
    animation: none !important;
  }
  .card::after, .panel-card::after, .stat-card::after, .yu-feature::after, .server-card::after, .host-preset-card::after { display: none; }
}

/* Host preset cards (Yunite-style) */
.host-preset-lead {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.95rem;
}
.host-preset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}
.host-preset-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 18px 16px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, #161b20 0%, #101418 100%);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition: border-color var(--dur-fast) ease, transform var(--dur-base) var(--ease-spring), box-shadow var(--dur-base) ease;
}
.host-preset-card:hover:not(:disabled) {
  border-color: rgba(var(--lime-rgb), 0.45);
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.32);
}
.host-preset-card:active:not(:disabled) { transform: scale(0.985); transition-duration: var(--dur-fast); }
.host-preset-card:disabled,
.host-preset-card.is-locked {
  opacity: 0.55;
  cursor: not-allowed;
}
.host-preset-name {
  font-family: var(--display);
  font-size: 1.55rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.02em;
}
.host-preset-badge {
  align-self: center;
  padding: 3px 10px;
  border: 1px solid var(--amber);
  color: var(--amber-hot);
  border-radius: 6px;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.host-preset-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--muted);
}
.host-preset-row strong { color: var(--ink); font-weight: 600; }
.host-preset-cta {
  margin-top: 8px;
  text-align: center;
  font-size: 0.82rem;
  color: var(--muted);
}
.host-admin-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.host-admin-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
}


