/* =============================================================================
   BTW TOOL — AURORA design system
   Premium desktop UI · glassmorphism · layered depth · GPU-smooth motion
   Quality bar: Discord · Linear · Arc · Raycast · Cursor · Steam 2025
   NOTE: All legacy class names + CSS variable names are preserved so the
   existing renderer.js keeps working untouched.
   ============================================================================= */

:root {
  color-scheme: dark;
  /* ── Theme accent color (user-customizable) ── */
  --theme-accent: #8a93ff;
  --theme-accent-rgb: 138, 147, 255;
  --theme-accent-dim: rgba(138, 147, 255, 0.15);

  /* ── Background system — deep ink ── */
  --bg-deep:   #07090f;
  --bg-dark:   #0c1019;
  --bg-panel:  rgba(12, 16, 28, 0.78);
  --bg-card:   rgba(18, 24, 40, 0.62);
  --bg-card-2: rgba(26, 34, 56, 0.55);
  --bg-input:  rgba(255, 255, 255, 0.06);
  --bg-hover:  rgba(255, 255, 255, 0.12);

  /* Surface elevations */
  --surface-1: rgba(255, 255, 255, 0.03);
  --surface-2: rgba(255, 255, 255, 0.06);
  --surface-3: rgba(255, 255, 255, 0.10);

  /* ── Borders ── */
  --border:      rgba(255, 255, 255, 0.12);
  --border-lt:   rgba(255, 255, 255, 0.22);
  --border-glow: rgba(var(--theme-accent-rgb), 0.35);
  --hairline:    rgba(255, 255, 255, 0.08);

  /* ── Accents ── */
  --accent:    var(--theme-accent);
  --accent-2:  var(--theme-accent);
  --accent-dk: var(--theme-accent);
  --blue:      #5865f2;
  --purple:    #a855f7;
  --purple-2:  #c084fc;
  --pink:      #ec4899;
  --cyan:      #22d3ee;
  --green:     #10ff9d;
  --red:       #ff4060;
  --yellow:    #ffd04d;

  /* ── Text ── */
  --text:       #f4f6fb;
  --text-norm:  #f4f6fb;
  --text-dim:   #9aa3b5;
  --text-faint: #6b7385;

  /* ── Glows & shadows ── */
  --glow-accent: 0 0 24px rgba(var(--theme-accent-rgb), 0.30);
  --glow-soft:   0 8px 30px rgba(0, 0, 0, 0.45);
  --shadow-card: 0 0 0 1px rgba(255,255,255,0.06) inset, 0 8px 32px rgba(0,0,0,0.30);
  --shadow-pop:  0 0 0 1px rgba(255,255,255,0.08) inset, 0 16px 48px rgba(0,0,0,0.35);

  /* ── Typography ── */
  --font-sans:    'DM Sans', 'Segoe UI', system-ui, sans-serif;
  --font-display: 'Bricolage Grotesque', 'DM Sans', 'Segoe UI', sans-serif;
  --font-mono:    'JetBrains Mono', 'Cascadia Code', 'Consolas', monospace;

  /* Landing — warm charcoal, Discord blurple only as accent */
  --landing-accent: #5865f2;
  --landing-accent-rgb: 88, 101, 242;
  --landing-ink: #080809;
  --landing-paper: #f4f1ea;
  --landing-mist: #9c9a94;

  /* ── Radii ── */
  --r-xs: 7px;  --r-sm: 10px; --r-md: 13px; --r-lg: 16px; --r-xl: 20px; --r-2xl: 26px;

  /* ── Motion ── */
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.5, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast: 0.14s;
  --dur:      0.24s;
  --dur-slow: 0.45s;

  /* mouse-reactive defaults */
  --mx: 50%; --my: 50%;

  /* Shell chrome (sidebar / content / titlebar) */
  --shell-sidebar: linear-gradient(180deg, rgba(8,8,10,0.88) 0%, rgba(8,8,10,0.78) 100%);
  --shell-content: rgba(8,8,10,0.35);
  --shell-titlebar: rgba(6, 8, 16, 0.72);
  --shell-border: rgba(255,255,255,0.06);
  --icon-muted: rgba(255,255,255,0.45);
  --overlay-soft: rgba(255,255,255,0.06);
  --btn-solid-bg: #fff;
  --btn-solid-fg: #0a0a0b;
  --color-scheme: dark;
}

/* ── Light theme ── */
[data-theme="light"] {
  color-scheme: light;
  --bg-deep:   #eef0f5;
  --bg-dark:   #e4e7ef;
  --bg-panel:  rgba(255, 255, 255, 0.92);
  --bg-card:   rgba(255, 255, 255, 0.88);
  --bg-card-2: rgba(248, 249, 252, 0.95);
  --bg-input:  rgba(0, 0, 0, 0.045);
  --bg-hover:  rgba(0, 0, 0, 0.07);
  --surface-1: rgba(0, 0, 0, 0.025);
  --surface-2: rgba(0, 0, 0, 0.05);
  --surface-3: rgba(0, 0, 0, 0.09);
  --border:      rgba(0, 0, 0, 0.10);
  --border-lt:   rgba(0, 0, 0, 0.18);
  --hairline:    rgba(0, 0, 0, 0.07);
  --text:       #14171f;
  --text-norm:  #14171f;
  --text-dim:   #4a5160;
  --text-faint: #7a8194;
  --glow-soft:   0 8px 28px rgba(0, 0, 0, 0.08);
  --shadow-card: 0 0 0 1px rgba(0,0,0,0.05) inset, 0 4px 18px rgba(0,0,0,0.06);
  --shadow-pop:  0 0 0 1px rgba(0,0,0,0.06) inset, 0 10px 28px rgba(0,0,0,0.10);
  --shell-sidebar: linear-gradient(180deg, rgba(255,255,255,0.96) 0%, rgba(245,247,252,0.94) 100%);
  --shell-content: rgba(255,255,255,0.55);
  --shell-titlebar: rgba(255,255,255,0.92);
  --shell-border: rgba(0,0,0,0.08);
  --icon-muted: rgba(0,0,0,0.38);
  --overlay-soft: rgba(0,0,0,0.04);
  --btn-solid-bg: #151821;
  --btn-solid-fg: #f4f6fb;
  --color-scheme: light;
}

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

html { height: 100%; scroll-behavior: smooth; }
body {
  min-height: 100%;
  background: var(--bg-deep);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'ss01';
  letter-spacing: -0.01em;
  user-select: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button { cursor: pointer; font-family: inherit; outline: none; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; outline: none; color-scheme: var(--color-scheme); }
select {
  background: var(--bg-input);
  color: var(--text);
  border: 1px solid var(--border);
}
select option,
select optgroup {
  background-color: var(--bg-dark);
  color: var(--text);
}
[data-theme="light"] select option,
[data-theme="light"] select optgroup {
  background-color: #ffffff;
  color: #111218;
}

.hidden { display: none !important; }
.muted  { color: var(--text-dim) !important; }

/* Premium scrollbars everywhere */
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--border-lt), var(--border));
  border-radius: 99px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.3); background-clip: padding-box; }

/* Ambient cursor light (driven by enhance.js) */
.cursor-glow { display: none !important; }

.bg-grid {
  position: fixed; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(ellipse 78% 60% at 50% 46%, #000 28%, transparent 76%);
  -webkit-mask-image: radial-gradient(ellipse 78% 60% at 50% 46%, #000 28%, transparent 76%);
  pointer-events: none;
  z-index: 0;
  animation: gridShift 64s linear infinite;
}
@keyframes gridShift { to { background-position: 52px 52px; } }

.bg-grid::after {
  content: '';
  position: absolute; inset: 0;
  background-image:
    radial-gradient(1px 1px at 25% 35%, rgba(255,255,255,0.45), transparent),
    radial-gradient(1px 1px at 75% 25%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1px 1px at 45% 75%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 85% 65%, rgba(255,255,255,0.32), transparent),
    radial-gradient(2px 2px at 15% 85%, rgba(255,255,255,0.55), transparent),
    radial-gradient(1px 1px at 65% 45%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1px 1px at 35% 12%, rgba(255,255,255,0.4), transparent);
  background-size: 620px 620px;
  animation: twinkle 5s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: 0.35; } to { opacity: 0.9; } }

.bg-blob {
  position: fixed; border-radius: 50%;
  /* blur removed */
  opacity: 0.15;
  pointer-events: none; z-index: 0;
  mix-blend-mode: screen;
  will-change: transform;
}
.bg-blob--cyan   { width: 560px; height: 560px; background: radial-gradient(circle, var(--accent) 0%, transparent 66%); top: -14%; left: 26%; animation: drift1 20s ease-in-out infinite; }
.bg-blob--purple { width: 680px; height: 680px; background: radial-gradient(circle, var(--purple) 0%, transparent 66%); top: -18%; right: -14%; animation: drift2 24s ease-in-out infinite; }
.bg-blob--blue   { width: 540px; height: 540px; background: radial-gradient(circle, var(--blue) 0%, transparent 66%); bottom: -20%; left: -10%; animation: drift3 28s ease-in-out infinite; }
@keyframes drift1 { 0%,100% { transform: translate3d(0,0,0) scale(1); } 33% { transform: translate3d(60px,-40px,0) scale(1.08); } 66% { transform: translate3d(-50px,60px,0) scale(0.94); } }
@keyframes drift2 { 0%,100% { transform: translate3d(0,0,0) scale(1); } 50% { transform: translate3d(-80px,80px,0) scale(1.1); } }
@keyframes drift3 { 0%,100% { transform: translate3d(0,0,0) scale(1); } 40% { transform: translate3d(70px,-50px,0) scale(1.05); } 80% { transform: translate3d(-40px,30px,0) scale(0.96); } }

/* =============================================================================
   Title bar
   ============================================================================= */
.titlebar {
  position: relative; z-index: 100;
  display: flex; align-items: center;
  height: 40px; padding-left: 16px;
  background: var(--shell-titlebar);
  border-bottom: 1px solid var(--hairline);
  -webkit-app-region: drag;
}
.titlebar__brand { display: flex; align-items: center; gap: 9px; }
.titlebar__logo-img { width: 20px; height: 20px; border-radius: 6px; object-fit: cover; box-shadow: 0 0 10px rgba(255,255,255,0.25); }
.titlebar__title { font-family: var(--font-display); font-size: 12.5px; font-weight: 700; letter-spacing: 0.2px; }
.titlebar__sep   { color: var(--text-faint); }
.titlebar__sub   { color: var(--text-faint); font-size: 11px; }
.titlebar__drag  { flex: 1; height: 100%; }
.titlebar__controls { display: flex; -webkit-app-region: no-drag; }

.tbtn {
  width: 46px; height: 40px;
  color: var(--text-dim); font-size: 12px;
  transition: background var(--dur-fast), color var(--dur-fast);
}
.tbtn:hover { background: var(--surface-2); color: var(--text); }
.tbtn--close:hover { background: linear-gradient(135deg, #444444, #222222); color: #fff; }

/* =============================================================================
   App / screens
   ============================================================================= */
.app { position: relative; z-index: 10; margin-top: 64px; height: calc(100vh - 64px); overflow: hidden; }
body:has(#webNav.hidden) .app,
body:has(.web-nav.hidden) .app {
  margin-top: 0;
  height: 100vh;
}
body:has(.landing:not(.hidden)) { overflow-y: auto; height: auto; min-height: 100vh; }
body:has(.app:not(.hidden)) { overflow: hidden; height: 100vh; }
.screen { width: 100%; height: 100%; }

/* =============================================================================
   Glass card primitive
   ============================================================================= */
.glass-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-card);
  transition: transform 0.3s var(--ease-out), border-color 0.3s, box-shadow 0.3s;
}
.glass-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--theme-accent-rgb), 0.3), transparent);
  opacity: 0; transition: opacity 0.3s;
}
.glass-card:hover::before { opacity: 1; }
.glass-card:hover { border-color: rgba(var(--theme-accent-rgb), 0.25); }

.glow-cyan   { box-shadow: var(--glow-accent); border-color: rgba(var(--theme-accent-rgb), 0.25); }
.glow-purple { box-shadow: var(--glow-accent); border-color: rgba(var(--theme-accent-rgb), 0.25); }

/* =============================================================================
   Login
   ============================================================================= */
.screen--login { display: flex; align-items: center; justify-content: center; padding: 24px; position: relative; overflow: hidden; }

/* Video background */
.login-video-bg {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 0; opacity: 0.4;
}
.screen--login > .login-card { position: relative; z-index: 1; }

/* 3D hover effect */
.login-card--3d {
  transform-style: preserve-3d;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
  will-change: transform;
}
.login-card--3d:hover {
  transform: translateY(-4px) rotateX(2deg) rotateY(-2deg);
  box-shadow: 0 20px 60px -10px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.12) inset;
}
.login-card {
  width: 470px; max-width: 100%;
  border-radius: var(--r-2xl);
  animation: loginIn 0.7s var(--ease-out) both;
}
@keyframes loginIn { from { opacity: 0; transform: translateY(26px) scale(0.97); } to { opacity: 1; transform: none; } }
.login-card__inner { padding: 46px 46px 36px; position: relative; z-index: 1; }

.login-logo { position: relative; width: 80px; height: 80px; margin: 0 auto 22px; }
.login-logo__core {
  position: relative; width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(140deg, #ffffff 0%, #cccccc 100%);
  color: #fff; border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 10px 30px -6px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.4);
}
.login-logo__core img { width: 100%; height: 100%; object-fit: cover; }
.login-title {
  text-align: center; font-family: var(--font-display);
  font-size: 30px; font-weight: 800; letter-spacing: -0.6px;
  background: linear-gradient(120deg, #ffffff 0%, #cccccc 60%, #aaaaaa 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.login-sub  { text-align: center; color: var(--text-dim); font-size: 12.5px; margin: 5px 0 20px; }

/* Login security badges */
.login-security {
  display: flex; justify-content: center; gap: 16px; margin-top: 16px;
}
.login-security__item {
  font-size: 10px; font-weight: 700; color: var(--text-faint);
  letter-spacing: 0.5px;
}

.login-error{ text-align: center; color: var(--red); font-size: 11.5px; font-weight: 600; min-height: 16px; margin-top: 10px; }
.login-foot { text-align: center; color: var(--text-faint); font-size: 10.5px; margin-top: 18px; }
.login-btn  { width: 100%; margin-top: 4px; }

/* =============================================================================
   WebGL dark bg + 3D key cube
   ============================================================================= */
.webgl-bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
  display: block;
}
.webgl-bg--app {
  position: absolute; inset: 0; z-index: 0;
}
.screen--app > .sidebar,
.screen--app > .content {
  position: relative; z-index: 1;
  min-height: 0;
}
.screen--app .sidebar {
  background: var(--shell-sidebar);
  backdrop-filter: blur(18px);
  border-right-color: var(--shell-border);
}
.screen--app .content {
  background: var(--shell-content);
}

.screen--keycube {
  background: #050506;
  perspective: 1100px;
  overflow: hidden;
}
.keycube {
  --cube-w: 500px;
  --cube-h: 320px;
  --cube-d: 100px;
  position: relative;
  width: var(--cube-w);
  height: var(--cube-h);
  margin: auto;
  z-index: 2;
  transform-style: preserve-3d;
  transition: transform 0.08s linear;
}
@media (max-width: 560px) {
  .keycube { --cube-w: calc(100vw - 40px); --cube-h: 340px; }
}
.keycube.is-flipping {
  transition: transform 1.6s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}
.keycube.is-flipped {
  transform: rotateX(180deg) !important;
  pointer-events: none;
}
.keycube__face {
  position: absolute;
  left: 0; right: 0; top: 0; bottom: 0;
  margin: auto;
  background: #0b0b0d;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 0 80px rgba(0,0,0,0.85), inset 0 0 40px rgba(255,255,255,0.02);
}
.keycube__face--front {
  width: var(--cube-w);
  height: var(--cube-h);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 32px;
  box-sizing: border-box;
  background: linear-gradient(180deg, #101012 0%, #080809 100%);
}
.keycube__face--back {
  width: var(--cube-w);
  height: var(--cube-h);
  transform: translateZ(calc(var(--cube-d) * -1)) rotateY(180deg) rotate(180deg);
  display: flex; align-items: center; justify-content: center;
  background: #0a0a0c;
}
.keycube__face--back h1 {
  font-family: var(--font-display);
  font-size: clamp(22px, 4vw, 28px); font-weight: 800;
  letter-spacing: -0.03em;
  color: #f4f1ea;
  margin: 0;
}
.keycube__face--top {
  width: var(--cube-w);
  height: var(--cube-d);
  transform: translateY(calc(var(--cube-h) / -2)) translateZ(calc(var(--cube-d) / -2)) rotateX(90deg);
  background: #070708;
}
.keycube__face--bottom {
  width: var(--cube-w);
  height: var(--cube-d);
  transform: translateY(calc(var(--cube-h) / 2)) translateZ(calc(var(--cube-d) / -2)) rotateX(90deg);
  background: #050506;
}
.keycube__face--left {
  width: var(--cube-d);
  height: var(--cube-h);
  transform: translateX(calc(var(--cube-w) / -2)) translateZ(calc(var(--cube-d) / -2)) rotateY(-90deg);
  background: #09090b;
}
.keycube__face--right {
  width: var(--cube-d);
  height: var(--cube-h);
  transform: translateX(calc(var(--cube-w) / 2)) translateZ(calc(var(--cube-d) / -2)) rotateY(90deg);
  background: #09090b;
}

.keycube__brand {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 8px;
}
.keycube__brand img {
  width: 28px; height: 28px; border-radius: 7px; object-fit: cover;
}
.keycube__brand span {
  font-family: var(--font-display);
  font-size: 15px; font-weight: 700; letter-spacing: 0.04em;
  color: #f4f1ea;
}
.keycube__hint {
  font-size: 12px; color: rgba(244,241,234,0.4);
  margin: 0 0 18px; letter-spacing: 0.04em;
}
.keycube__input {
  width: min(320px, 100%);
  height: 48px;
  padding: 0 18px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  background: rgba(0,0,0,0.45);
  color: #f4f1ea;
  font-size: 14px;
  outline: none;
  box-shadow: inset 0 0 18px rgba(255,255,255,0.03);
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}
.keycube__input:focus {
  border-color: rgba(255,255,255,0.28);
  box-shadow: inset 0 0 22px rgba(255,255,255,0.06), 0 0 0 3px rgba(255,255,255,0.04);
}
.keycube__input::placeholder { color: rgba(244,241,234,0.28); }
.keycube__submit {
  margin-top: 16px;
  height: 46px; padding: 0 36px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.14);
  background: #f4f1ea; color: #080809;
  font-size: 13px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}
.keycube__submit:hover {
  background: #fff;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
  transform: translateY(-1px);
}
.keycube__error {
  min-height: 16px; margin-top: 10px;
  font-size: 12px; font-weight: 600; color: #ff4060; text-align: center;
}
.keycube__foot {
  margin-top: 10px; font-size: 10px; color: rgba(244,241,234,0.3);
  letter-spacing: 0.04em;
}
.keycube__back {
  margin-top: 8px;
  background: none; border: 0; cursor: pointer;
  font-size: 12px; color: rgba(244,241,234,0.4);
  transition: color 0.2s;
}
.keycube__back:hover { color: #f4f1ea; }
.keycube__back.hidden { display: none; }

.screen--keycube .admin-login-btn {
  position: absolute; bottom: 20px; right: 20px; z-index: 5;
}

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


/* =============================================================================
   Forms / inputs
   ============================================================================= */
.form-row { margin-bottom: 15px; }
.label { display: flex; justify-content: space-between; font-size: 10px; font-weight: 800; letter-spacing: 1.4px; margin-bottom: 7px; }
.label__name { color: var(--text); }
.label__name.muted { color: var(--text-dim); }
.label__hint { color: var(--text-faint); font-weight: 700; }
.label__hint--required { color: var(--red); }

.input-wrap {
  position: relative; display: flex; align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  transition: border-color var(--dur), box-shadow var(--dur), background var(--dur);
  overflow: hidden;
  min-height: 52px;
  width: 100%;
}
.input-wrap::before {
  content: ''; position: absolute; inset: 0;
  border-radius: inherit; padding: 1px;
  background: linear-gradient(120deg, rgba(255,255,255,0.3), transparent 40%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity var(--dur);
  pointer-events: none;
}
.input-wrap--accent { border-color: rgba(var(--theme-accent-rgb), 0.28); }
.input-wrap:focus-within {
  border-color: rgba(var(--theme-accent-rgb), 0.45);
  box-shadow: 0 0 0 3px rgba(var(--theme-accent-rgb), 0.08), 0 0 20px rgba(var(--theme-accent-rgb), 0.06);
  background: var(--surface-2);
}
.input-wrap:focus-within::before { opacity: 1; }
.input-wrap__icon {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 12px 0 16px; color: var(--icon-muted); font-size: 14px; font-weight: 700;
  flex-shrink: 0;
}
.input-wrap__icon .btw-ico svg { width: 17px; height: 17px; }
.input {
  flex: 1; min-width: 0; background: transparent; border: none;
  color: var(--text); font-size: 14px; padding: 15px 18px 15px 0;
  color-scheme: var(--color-scheme);
}
.input::placeholder { color: var(--text-faint); }
textarea.input {
  padding: 14px 16px; resize: vertical; min-height: 120px; line-height: 1.55;
  font-family: inherit;
}

/* glass-input — same tokens as input-wrap */
.glass-input {
  width: 100%; box-sizing: border-box;
  background: var(--bg-input) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--r-md) !important;
  color: var(--text) !important;
  padding: 14px 16px !important;
  font-size: 14px !important;
  font-family: inherit !important;
  color-scheme: var(--color-scheme);
  transition: border-color var(--dur), box-shadow var(--dur), background var(--dur);
}
.glass-input:focus {
  outline: none;
  border-color: rgba(var(--theme-accent-rgb), 0.45) !important;
  box-shadow: 0 0 0 3px rgba(var(--theme-accent-rgb), 0.10);
  background: var(--surface-2) !important;
}
textarea.glass-input { line-height: 1.55; min-height: 120px; resize: vertical; }
.glass-input--sm { width: auto !important; min-width: 120px; padding: 10px 14px !important; }

.form-sep { height: 1px; background: var(--hairline); margin: 18px 0; }
.tool-panel {
  padding: 22px 24px;
  border-radius: var(--r-lg);
}
.tool-panel .form-row:last-child,
.tool-panel .form-group:last-child { margin-bottom: 0; }

/* Descriptive intro copy + numbered how-to steps (Badge-Timeline style) */
.tool-panel__desc {
  margin: 0 0 16px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-muted, #aeb4c2);
}
.tool-steps {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tool-steps li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-norm, #cdd2dc);
}
.tool-steps li b { color: #fff; font-weight: 700; }
.tool-steps__num {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.actions-row--tight { margin-top: 4px; margin-bottom: 0; }
.actions-row--tight .btn { flex: 1; min-width: 150px; }
.form-group { margin-bottom: 16px; }
.form-group > .label,
.form-group > label.field-label {
  display: block; color: var(--text-dim); font-size: 11px; font-weight: 700;
  margin-bottom: 8px; letter-spacing: 0.3px;
}
.field-label { color: var(--text-dim); font-size: 11px; font-weight: 700; margin-bottom: 8px; display: block; }
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
}
@media (max-width: 720px) {
  .form-grid { grid-template-columns: 1fr; }
}
.delay-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.chip-btn {
  height: 34px; padding: 0 14px; border-radius: var(--r-sm);
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text-dim); font-size: 11px; font-weight: 700; cursor: pointer;
  transition: all var(--dur-fast);
}
.chip-btn:hover { color: var(--text); border-color: rgba(var(--theme-accent-rgb), 0.35); background: var(--surface-3); }
.chip-btn.is-active {
  color: var(--text); border-color: rgba(var(--theme-accent-rgb), 0.5);
  background: rgba(var(--theme-accent-rgb), 0.14);
}
.auth-row { display: flex; flex-wrap: wrap; gap: 14px; }
.auth-row label {
  font-size: 13px; display: inline-flex; align-items: center; gap: 6px;
  color: var(--text); cursor: pointer;
}

/* =============================================================================
   Buttons
   ============================================================================= */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  gap: 10px; padding: 0 22px; height: 46px;
  border-radius: var(--r-md);
  font-size: 13px; font-weight: 700; letter-spacing: 0.3px;
  transition: transform var(--dur-fast) var(--ease-spring), box-shadow var(--dur), background var(--dur), opacity var(--dur), filter var(--dur), border-color var(--dur);
  overflow: hidden; white-space: nowrap;
  isolation: isolate;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.985); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn--full { width: 100%; }
.btn--small { height: auto; padding: 6px 12px; font-size: 11px; border-radius: var(--r-xs); }

.btn--primary {
  background: var(--btn-solid-bg);
  color: var(--btn-solid-fg);
  box-shadow: 0 4px 18px rgba(0,0,0,0.18);
}
.btn--primary:hover {
  filter: brightness(0.96);
  box-shadow: 0 8px 28px rgba(0,0,0,0.22);
}
.btn--primary::before { display: none; }

.btn--solid {
  background: var(--btn-solid-bg);
  color: var(--btn-solid-fg);
  box-shadow: 0 4px 18px rgba(0,0,0,0.18);
  gap: 8px;
}
.btn--solid:hover {
  filter: brightness(0.96);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.22);
}
.btn--solid .btw-ico { color: var(--btn-solid-fg); }
.btn--solid .btw-ico svg { width: 15px; height: 15px; }
.btn--solid .btn__arrow .btw-ico svg { width: 14px; height: 14px; }

.btn--warn {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #111;
  box-shadow: 0 4px 18px rgba(251, 191, 36, 0.25);
}
.btn--warn:hover { filter: brightness(1.05); }

.btn--secondary { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.btn--secondary:hover { border-color: rgba(var(--theme-accent-rgb), 0.4); background: var(--surface-3); }

.btn--danger {
  background: linear-gradient(135deg, #fb7185 0%, #e11d48 100%);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.10) inset, 0 4px 20px rgba(255,64,96,0.25);
  gap: 8px;
}
.btn--danger:hover {
  filter: brightness(1.08);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.15) inset, 0 8px 30px rgba(255,64,96,0.40);
}
.btn--danger .btw-ico svg { width: 15px; height: 15px; }

.btn__arrow { transition: transform var(--dur) var(--ease-spring); }
.btn:hover .btn__arrow { transform: translateX(4px); }

/* Loading state — animated spinner overlay (JS toggles .loading) */
.btn.loading { color: transparent !important; pointer-events: none; }
.btn.loading .btn__arrow { opacity: 0; }
.btn.loading::after {
  content: ''; position: absolute; inset: 0; margin: auto;
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.35); border-top-color: #fff;
  animation: spin 0.7s linear infinite;
}

/* Ripple (enhance.js injects .ripple spans) */
/* =============================================================================
   Sidebar
   ============================================================================= */
.screen--app { display: grid; grid-template-columns: 260px 1fr; height: 100%; position: relative; min-height: 0; }


.sidebar {
  position: relative;
  background: var(--shell-sidebar);
  border-right: 1px solid var(--hairline);
  display: flex; flex-direction: column;
  padding: 12px 14px; overflow-y: auto;
  gap: 4px;
  animation: sidebarIn 0.6s var(--ease-out) both;
}
@keyframes sidebarIn { from { opacity: 0; transform: translateX(-16px); } to { opacity: 1; transform: none; } }

.sidebar__brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 16px; }
.sidebar__brand-icon {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(var(--theme-accent-rgb), 0.2), rgba(var(--theme-accent-rgb), 0.05));
  color: #fff; border-radius: 11px; font-size: 18px; font-weight: 900;
  box-shadow: 0 4px 14px -2px rgba(var(--theme-accent-rgb), 0.2), inset 0 1px 0 rgba(255,255,255,0.1);
  overflow: hidden;
  border: 1px solid rgba(var(--theme-accent-rgb), 0.15);
}
.sidebar__brand-icon img { width: 100%; height: 100%; object-fit: cover; }
.sidebar__brand-name { font-family: var(--font-display); font-size: 14.5px; font-weight: 800; }
.sidebar__brand-ver  { font-size: 9px; font-weight: 700; color: var(--text-dim); letter-spacing: 0.5px; }

/* Profile card (built by JS) — flex-shrink:0 so crowded sidebar can't squash + clip it */
.sidebar > .profile,
.profile.glass-card {
  flex: 0 0 auto;
  overflow: visible;
  padding: 12px;
  margin-bottom: 12px;
  border-radius: var(--r-lg);
  min-height: 96px;
  box-sizing: border-box;
}
.profile.glass-card:hover {
  transform: none !important;
}
.profile__top {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
}
.profile__avatar-wrap {
  position: relative;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 50%;
  box-sizing: border-box;
  background: rgba(var(--theme-accent-rgb), 0.15);
  padding: 2px;
  border: 1px solid rgba(var(--theme-accent-rgb), 0.2);
}
.profile__avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  background-color: var(--bg-deep);
  display: block;
}
.profile__online {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--green);
  border: 2px solid var(--bg-dark);
  box-shadow: 0 0 8px rgba(16,255,157,0.4);
  z-index: 1;
}
.profile__info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  flex: 1;
  min-width: 0;
  line-height: 1.2;
}
.profile__name {
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}
.profile__badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.5px;
  width: fit-content;
  line-height: 1.2;
}
.profile__badge--nitro {
  background: rgba(var(--theme-accent-rgb), 0.15);
  border: 1px solid rgba(var(--theme-accent-rgb), 0.3);
  color: var(--text);
  box-shadow: 0 2px 10px -2px rgba(var(--theme-accent-rgb), 0.15);
}
.profile__badge--free {
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-faint);
}
.profile__id-row {
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border-radius: var(--r-xs);
  padding: 6px 6px 6px 10px;
  margin-top: 10px;
  min-height: 28px;
  box-sizing: border-box;
}
.profile__id {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.3;
}
.profile__copy {
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 700;
  width: 26px;
  height: 22px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background var(--dur-fast), color var(--dur-fast);
}
.profile__copy:hover { background: rgba(var(--theme-accent-rgb), 0.15); color: var(--theme-accent); }

.sidebar__section { font-size: 9px; font-weight: 800; color: var(--text-faint); letter-spacing: 2px; padding: 0 8px; margin-bottom: 7px; margin-top: 8px; }

.nav-cat {
  font-size: 9px;
  font-weight: 800;
  color: var(--text-faint);
  letter-spacing: 1.8px;
  padding: 14px 10px 6px;
  margin-top: 2px;
  user-select: none;
  pointer-events: none;
}
.nav-cat:first-child { padding-top: 4px; }

/* Nav */
.nav { display: flex; flex-direction: column; gap: 2px; flex: 0 0 auto; }
.nav-btn {
  position: relative; display: flex; align-items: center; gap: 11px;
  padding: 0 12px; height: 38px;
  border: 1px solid transparent; border-radius: var(--r-md);
  color: var(--text-dim); font-size: 12.5px; font-weight: 600; text-align: left;
  transition: color var(--dur), background var(--dur), border-color var(--dur), transform var(--dur-fast);
  overflow: hidden;
  width: 100%;
  cursor: pointer;
  background: transparent;
}
.nav-btn::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(160px circle at var(--mx) var(--my), rgba(var(--theme-accent-rgb), 0.08), transparent 60%);
  opacity: 0; transition: opacity var(--dur); pointer-events: none;
}
.nav-btn__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; flex-shrink: 0;
  color: var(--text-faint);
  transition: color var(--dur), transform var(--dur) var(--ease-spring);
}
.nav-btn__icon svg,
.btw-ico svg {
  width: 16px; height: 16px;
  display: block;
}
.btw-ico {
  display: inline-flex; align-items: center; justify-content: center;
  line-height: 0;
}
.theme-mode-btn__icon {
  display: inline-flex; width: 14px; height: 14px; margin-right: 4px;
  color: inherit;
}
.theme-mode-btn__icon svg { width: 14px; height: 14px; display: block; }

.nav-btn:hover { background: var(--surface-2); color: var(--text); transform: translateX(2px); }
.nav-btn:hover::after { opacity: 1; }
.nav-btn:hover .nav-btn__icon { color: var(--theme-accent); transform: scale(1.12); }
.nav-btn.active {
  background: linear-gradient(90deg, rgba(var(--theme-accent-rgb), 0.12) 0%, rgba(var(--theme-accent-rgb), 0.02) 100%);
  border-color: rgba(var(--theme-accent-rgb), 0.25);
  color: var(--text); font-weight: 700;
}
.nav-btn.active::before {
  content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 22px; border-radius: 0 3px 3px 0;
  background: var(--theme-accent);
  box-shadow: 0 0 10px rgba(var(--theme-accent-rgb), 0.5);
}
.nav-btn.active .nav-btn__icon { color: var(--theme-accent); }

.nav-btn--logout { color: var(--red); background: rgba(251,87,115,0.06); border-color: rgba(251,87,115,0.2); font-weight: 700; }
.nav-btn--logout:hover { background: rgba(251,87,115,0.14); border-color: var(--red); color: #fff; }
.nav-btn--logout .nav-btn__icon { color: var(--red); }

.topbar-logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px;
  border-radius: var(--r-md);
  flex-shrink: 0;
  margin-left: 2px;
  border: 1px solid color-mix(in srgb, var(--red) 32%, transparent);
  background: color-mix(in srgb, var(--red) 10%, var(--bg-card));
  color: var(--red);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background var(--dur-fast), border-color var(--dur-fast), color var(--dur-fast), transform var(--dur-fast), box-shadow var(--dur-fast);
}
.topbar-logout__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  color: inherit;
}
.topbar-logout__icon svg,
.topbar-logout .btw-ico svg {
  width: 15px;
  height: 15px;
  display: block;
}
.topbar-logout:hover {
  background: color-mix(in srgb, var(--red) 22%, var(--bg-card));
  border-color: var(--red);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px -10px rgba(251, 87, 115, 0.55);
}
.topbar-logout:active {
  transform: translateY(0) scale(0.98);
}
[data-theme="light"] .topbar-logout:hover {
  color: #fff;
  background: var(--red);
}

.sidebar__spacer { flex: 1; }

/* =============================================================================
   Content area
   ============================================================================= */
.content { display: flex; flex-direction: column; overflow: hidden; background: var(--shell-content); min-height: 0; }

.topbar { display: flex; align-items: center; padding: 12px 28px 8px; gap: 16px; flex-shrink: 0; }
.topbar__title h1 { font-family: var(--font-display); font-size: 23px; font-weight: 800; letter-spacing: -0.4px; }
.topbar__title p { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.topbar__actions { margin-left: auto; display: flex; gap: 10px; align-items: center; }

#langToggle {
  height: 40px; padding: 0 14px !important; border-radius: var(--r-md) !important;
  background: var(--surface-2) !important; color: var(--text-norm) !important;
  border: 1px solid var(--border) !important; font-weight: 800; font-size: 11px; letter-spacing: 1px;
  transition: all var(--dur);
}
#langToggle:hover { border-color: rgba(var(--theme-accent-rgb), 0.4) !important; color: var(--theme-accent) !important; transform: translateY(-2px); }

.search {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 0 12px 0 14px; height: 40px;
  transition: all var(--dur);
}
.search:focus-within { border-color: rgba(var(--theme-accent-rgb), 0.35); box-shadow: 0 0 0 3px rgba(var(--theme-accent-rgb), 0.10); }
.search__icon { color: var(--text-dim); font-size: 14px; }
.search__input { background: transparent; border: none; color: var(--text); font-size: 12px; width: 190px; }
.search__input::placeholder { color: var(--text-faint); }
.search kbd { font-family: var(--font-mono); font-size: 10px; color: var(--text-faint); background: var(--bg-input); border: 1px solid var(--border); border-radius: 5px; padding: 2px 6px; }

.status-pill {
  display: flex; align-items: center; gap: 8px; padding: 0 14px; height: 40px;
  background: color-mix(in srgb, var(--green) 8%, var(--bg-card));
  border: 1px solid color-mix(in srgb, var(--green) 28%, transparent);
  border-radius: var(--r-md); font-size: 11px; font-weight: 700; color: var(--green);
  /* blur removed */
}
.status-pill__dot { width: 8px; height: 8px; background: var(--green); border-radius: 50%; box-shadow: 0 0 10px var(--green); animation: pulseDot 1.6s ease-in-out infinite; }
@keyframes pulseDot { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.55; transform: scale(0.82); } }

/* Pages + transitions */
.pages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px 28px 36px;
  display: flex;
  flex-direction: column;
  scroll-behavior: smooth;
  overscroll-behavior: contain;
}
.pages:has(#pageHome:not(.hidden)) {
  overflow: hidden;
  padding-bottom: 16px;
}
.pages::-webkit-scrollbar { width: 8px; }
.pages::-webkit-scrollbar-thumb {
  background: var(--surface-3);
  border-radius: 99px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
.pages::-webkit-scrollbar-thumb:hover { background: rgba(var(--theme-accent-rgb), 0.35); background-clip: padding-box; }

.page {
  animation: pageIn 0.42s var(--ease-out);
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1100px;
  /* Grow with content so .pages can scroll */
  flex: 0 0 auto;
  min-height: auto;
  height: auto;
  overflow: visible;
  padding-bottom: 8px;
}
#pageHome.page {
  max-width: none;
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
  padding-bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.dash-empty {
  flex-shrink: 0;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid rgba(var(--theme-accent-rgb), 0.28);
}
.dash-empty__ico {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(var(--theme-accent-rgb), 0.12);
  color: var(--theme-accent);
}
.dash-empty__ico .btw-ico svg { width: 18px; height: 18px; }
.dash-empty__title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-strong);
}
.dash-empty__text {
  margin: 0;
  max-width: 62ch;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
}
.dash-empty__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}
.page.hidden { display: none; }
@keyframes pageIn { from { opacity: 0; transform: translateY(14px) scale(0.992); } to { opacity: 1; transform: none; } }

/* =============================================================================
   Dashboard widgets
   ============================================================================= */
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  flex-shrink: 0;
}
.metric {
  position: relative; padding: 10px 14px; border-radius: var(--r-lg);
  background: var(--bg-card);
  border: 1px solid var(--border); overflow: hidden;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-card);
  transition: transform 0.3s var(--ease-out), border-color 0.3s, box-shadow 0.3s;
  animation: pop 0.5s var(--ease-out) both;
}
.metric::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--theme-accent-rgb), 0.25), transparent);
  opacity: 0.5; transition: opacity 0.3s;
}
.metric:hover::before { opacity: 1; }
.metric:nth-child(1) { animation-delay: 0.02s; }
.metric:nth-child(2) { animation-delay: 0.08s; }
.metric:nth-child(3) { animation-delay: 0.14s; }
.metric:nth-child(4) { animation-delay: 0.20s; }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(0.96); } to { opacity: 1; transform: none; } }
.metric::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(360px circle at var(--mx) var(--my), rgba(255,255,255,0.06), transparent 60%);
  opacity: 0; transition: opacity var(--dur); pointer-events: none;
}
.metric:hover {
  transform: translateY(-3px) scale(1.01);
  border-color: rgba(var(--theme-accent-rgb), 0.25);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4), 0 0 0 1px rgba(var(--theme-accent-rgb), 0.1) inset;
}
.metric:hover::after { opacity: 1; }
.metric__top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.metric__label { font-size: 9px; font-weight: 800; color: var(--text-faint); letter-spacing: 1.4px; }
.metric__delta { font-size: 9px; font-weight: 800; padding: 2px 7px; border-radius: 99px; background: var(--bg-input); border: 1px solid; }
.metric__value { font-family: var(--font-display); font-size: 21px; font-weight: 800; letter-spacing: -0.5px; }
.metric__chart { display: block; margin-top: 6px; width: 100%; height: 28px; }

/* Quick action grid (legacy fallback) */
.action-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.action-card {
  position: relative; padding: 14px; border-radius: var(--r-lg);
  background: var(--bg-card);
  border: 1px solid var(--border); cursor: pointer; overflow: hidden;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-card);
  transition: transform 0.3s var(--ease-out), border-color 0.3s, box-shadow 0.3s;
}
.action-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, transparent, rgba(var(--theme-accent-rgb), 0.4), transparent); transition: height var(--dur), opacity var(--dur); opacity: 0.5; }
.action-card::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(320px circle at var(--mx) var(--my), rgba(var(--theme-accent-rgb), 0.06), transparent 55%);
  opacity: 0; transition: opacity var(--dur); pointer-events: none;
}
.action-card:hover { transform: translateY(-4px) scale(1.01); border-color: rgba(var(--theme-accent-rgb), 0.25); box-shadow: 0 16px 40px rgba(0,0,0,0.4), 0 0 0 1px rgba(var(--theme-accent-rgb), 0.1) inset; }
.action-card:hover::before { height: 3px; opacity: 1; }
.action-card:hover::after { opacity: 0.15; }
.action-card__icon {
  width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-md); background: rgba(var(--theme-accent-rgb), 0.1); border: 1px solid rgba(var(--theme-accent-rgb), 0.2); color: var(--theme-accent);
  font-size: 15px; font-weight: 800; margin-bottom: 8px;
  transition: transform var(--dur) var(--ease-spring), background var(--dur), border-color var(--dur);
}
.action-card:hover .action-card__icon { background: rgba(var(--theme-accent-rgb), 0.2); border-color: rgba(var(--theme-accent-rgb), 0.35); }
.action-card:hover .action-card__icon { transform: scale(1.1) rotate(-4deg); }
.action-card__arrow { position: absolute; top: 12px; right: 14px; color: var(--text-faint); font-size: 14px; font-weight: 800; transition: transform var(--dur) var(--ease-spring), color var(--dur); }
.action-card:hover .action-card__arrow { transform: translateX(4px); color: rgba(255,255,255,0.9); }
.action-card__title { font-size: 12px; font-weight: 800; margin-bottom: 2px; }
.action-card__desc { font-size: 10px; color: var(--text-dim); line-height: 1.4; }

/* ── Tool Constellation ── */
.constellation {
  --mx: 50%;
  --my: 50%;
  position: relative;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  background:
    radial-gradient(520px circle at var(--mx) var(--my), rgba(var(--theme-accent-rgb), 0.14), transparent 55%),
    linear-gradient(160deg, rgba(255,255,255,0.03), transparent 45%),
    var(--bg-card);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  padding: 12px;
  min-height: 0;
  flex: 0 0 auto;
}
.constellation__aura {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(circle at 20% 30%, rgba(var(--theme-accent-rgb), 0.12), transparent 42%),
    radial-gradient(circle at 80% 70%, rgba(255,255,255,0.04), transparent 40%);
  pointer-events: none;
  animation: constAura 14s ease-in-out infinite alternate;
}
@keyframes constAura {
  from { transform: translate3d(-2%, -1%, 0) scale(1); opacity: 0.7; }
  to { transform: translate3d(2%, 1%, 0) scale(1.06); opacity: 1; }
}
.constellation__links {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: visible;
}
.constellation__links line {
  stroke: rgba(var(--theme-accent-rgb), 0.22);
  stroke-width: 1;
  stroke-dasharray: 4 6;
  animation: constDash 8s linear infinite;
}
@keyframes constDash {
  to { stroke-dashoffset: -80; }
}
.constellation__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.orbit-card {
  --ox: 0px;
  --oy: 0px;
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  border-radius: var(--r-md);
  opacity: 0;
  transform: translateY(18px) scale(0.94);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-spring);
  transition-delay: calc(var(--i, 0) * 45ms);
  animation: orbitFloat 6s ease-in-out infinite;
  animation-delay: calc(var(--i, 0) * -0.35s);
  animation-play-state: paused;
}
.constellation.is-ready .orbit-card {
  opacity: 1;
  transform: none;
  animation-play-state: running;
}
@keyframes orbitFloat {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -3px; }
}
.orbit-card__inner {
  position: relative;
  height: 100%;
  min-height: 88px;
  padding: 12px 12px 12px;
  border-radius: inherit;
  background: rgba(8, 8, 12, 0.55);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  overflow: hidden;
  transform: translate3d(var(--ox), var(--oy), 0);
  transition:
    transform 0.35s var(--ease-out),
    border-color 0.3s,
    background 0.3s,
    box-shadow 0.3s;
}
.orbit-card__inner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(180px circle at var(--mx, 50%) var(--my, 50%),
    hsla(var(--hue, 230), 80%, 70%, 0.18), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.orbit-card__inner::after {
  content: '';
  position: absolute;
  top: 0; left: 12%; right: 12%; height: 1px;
  background: linear-gradient(90deg, transparent, hsla(var(--hue, 230), 80%, 75%, 0.55), transparent);
  opacity: 0.55;
}
.orbit-card:hover .orbit-card__inner,
.orbit-card:focus-visible .orbit-card__inner {
  border-color: hsla(var(--hue, 230), 80%, 70%, 0.45);
  background: rgba(12, 12, 18, 0.72);
  box-shadow:
    0 16px 40px rgba(0,0,0,0.4),
    0 0 0 1px hsla(var(--hue, 230), 80%, 70%, 0.12) inset,
    0 0 40px hsla(var(--hue, 230), 80%, 60%, 0.12);
}
.orbit-card:hover .orbit-card__inner::before,
.orbit-card:focus-visible .orbit-card__inner::before { opacity: 1; }
.orbit-card--lg .orbit-card__inner { min-height: 124px; padding: 16px; }
.orbit-card--lg { grid-column: span 2; }
.orbit-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 10px;
  font-size: 16px;
  margin-bottom: 10px;
  background: hsla(var(--hue, 230), 70%, 60%, 0.12);
  border: 1px solid hsla(var(--hue, 230), 70%, 65%, 0.28);
  transition: transform 0.35s var(--ease-spring), background 0.25s;
}
.orbit-card:hover .orbit-card__icon {
  transform: scale(1.12) rotate(-6deg);
  background: hsla(var(--hue, 230), 70%, 60%, 0.22);
}
.orbit-card__title {
  display: block;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 3px;
  line-height: 1.15;
}
.orbit-card__desc {
  display: block;
  font-size: 10px;
  color: var(--text-dim);
  line-height: 1.35;
  max-width: 22ch;
}
.orbit-card__go {
  position: absolute;
  top: 12px; right: 12px;
  font-size: 13px;
  font-weight: 800;
  color: var(--text-faint);
  transition: transform 0.3s var(--ease-spring), color 0.25s;
}
.orbit-card:hover .orbit-card__go {
  transform: translateX(3px);
  color: #fff;
}
.orbit-card.is-launching .orbit-card__inner {
  transform: translate3d(var(--ox), var(--oy), 0) scale(1.08);
  border-color: hsla(var(--hue, 230), 90%, 75%, 0.8);
  box-shadow: 0 0 0 1px hsla(var(--hue, 230), 90%, 70%, 0.35), 0 20px 50px hsla(var(--hue, 230), 80%, 50%, 0.35);
}
.orbit-card.is-launching {
  z-index: 5;
  animation: none;
}

@media (max-width: 1100px) {
  .constellation__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .orbit-card--lg { grid-column: span 1; }
  .orbit-card--lg .orbit-card__inner { min-height: 88px; padding: 12px; }
}
@media (max-width: 720px) {
  .constellation__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .constellation__aura,
  .orbit-card,
  .constellation__links line { animation: none !important; }
  .orbit-card { opacity: 1; transform: none; }
}

/* Dashboard layout */
.dash-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 16px;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}
.dash-grid--lounge {
  grid-template-columns: minmax(0, 1fr) 280px;
  min-height: 0;
}
.dash-main {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  height: 100%;
}
.dash-main .chat-section,
.dash-main .chat-section--hero {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}
.dash-sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
  overflow: hidden;
  height: 100%;
}

.chat-section--hero {
  min-height: 0;
}
.chat-section--hero .chat-section__messages {
  min-height: 0;
  flex: 1 1 auto;
}
.chat-section--hero .chat-section__input-wrap {
  position: relative;
  bottom: auto;
  z-index: 2;
  flex-shrink: 0;
}

.tool-stage {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 0 0 auto;
  min-height: auto;
  width: 100%;
  overflow: visible;
}
.tool-bar {
  display: flex;
  gap: 12px;
  align-items: stretch;
  width: 100%;
}
.tool-bar__input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
}
.tool-bar .btn,
.tool-bar .btn--solid {
  flex: 0 0 auto;
  min-width: 148px;
  height: auto;
  align-self: stretch;
}
.tool-note {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.5;
  padding: 10px 14px;
  border-radius: var(--r-md);
  background: var(--surface-1);
  border: 1px solid var(--hairline);
}
.page-head {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 4px;
  flex-shrink: 0;
}
.page-head__icon {
  width: 52px; height: 52px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
  color: var(--tool-c, var(--theme-accent));
  border: 1px solid color-mix(in srgb, var(--tool-c, var(--theme-accent)) 35%, transparent);
  background: color-mix(in srgb, var(--tool-c, var(--theme-accent)) 14%, transparent);
  flex-shrink: 0;
}
.page-head__icon--accent {
  color: var(--theme-accent);
  border-color: rgba(var(--theme-accent-rgb), 0.35);
  background: rgba(var(--theme-accent-rgb), 0.12);
}
.page-head__icon .btw-ico svg { width: 22px; height: 22px; }
.page-head__icon .btw-ico { display: flex; }
.input-wrap__icon {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 12px 0 16px; color: var(--icon-muted);
}
.input-wrap__icon .btw-ico svg { width: 17px; height: 17px; }

.actions-row { display: flex; gap: 10px; margin-bottom: 4px; flex-wrap: wrap; }
.actions-row .btn { flex: 1; min-width: 140px; }
.list-card {
  padding: 14px;
  border-radius: var(--r-lg);
  min-height: 280px;
  flex: 0 0 auto;
  max-height: none;
  overflow: visible;
}
.list-card:has(.list-row) {
  max-height: min(62vh, 560px);
  overflow-y: auto;
}
.list-info {
  text-align: center; padding: 56px 24px; color: var(--text-dim);
  font-size: 13px; font-weight: 600; line-height: 1.5;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.list-info__ico {
  width: 48px; height: 48px; border-radius: 14px;
  display: grid; place-items: center;
  background: var(--surface-1);
  border: 1px solid var(--border);
  color: var(--text-faint);
}
.list-info__ico .btw-ico svg { width: 22px; height: 22px; }
.list-info--err { color: var(--red); }
.list-info--ok { color: var(--green); }
.list-row__icon .btw-ico svg { width: 14px; height: 14px; }

@media (max-width: 1100px) {
  .dash-grid--lounge {
    grid-template-columns: 1fr;
    overflow: auto;
  }
  .dash-sidebar { order: 2; height: auto; overflow: visible; }
  .dash-main { min-height: 420px; }
  .dash-main .chat-section--hero { min-height: 420px; }
  #pageHome.page {
    height: auto;
    max-height: none;
    overflow: visible;
  }
}
@media (max-width: 900px) {
  .screen--app { grid-template-columns: 220px 1fr; }
  .pages { padding: 4px 16px 28px; }
  .page { max-width: none; }
  .tool-bar { flex-wrap: wrap; }
  .tool-bar .btn { flex: 1 1 140px; min-height: 48px; }
}


.dash-badges__grid { display: flex; flex-wrap: wrap; gap: 8px; }
.dash-badge-icon { width: 28px; height: 28px; object-fit: contain; transition: transform 0.2s; }
.dash-badge-icon:hover { transform: scale(1.25); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; padding: 0 4px; }
.section-head__title { font-family: var(--font-display); font-size: 14.5px; font-weight: 800; }
.section-head__more { font-size: 11px; font-weight: 700; color: var(--text-dim); cursor: pointer; transition: opacity var(--dur); }
.section-head__more:hover { opacity: 0.75; }

/* Activity feed */
.activity {
  padding: 14px;
  border-radius: var(--r-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-card);
  transition: border-color 0.3s, box-shadow 0.3s;
  display: flex; flex-direction: column; min-height: 0;
  flex: 1 1 auto;
  overflow: hidden;
}
.activity:hover { border-color: rgba(var(--theme-accent-rgb), 0.2); box-shadow: 0 8px 30px rgba(0,0,0,0.3); }
.activity__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.activity__title {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-size: 13px; font-weight: 800;
}
.activity__title .btw-ico { color: var(--theme-accent); }
.activity__live { display: flex; align-items: center; gap: 5px; color: var(--green); background: rgba(52,211,153,0.1); border-radius: 99px; padding: 3px 9px; font-size: 9px; font-weight: 800; }
.activity__live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); animation: pulseDot 1.6s infinite; }
#activityFeed {
  position: relative;
  display: flex; flex-direction: column; gap: 2px;
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  padding-left: 2px;
}
#activityFeed::before {
  content: '';
  position: absolute; left: 17px; top: 8px; bottom: 8px;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,0.08), transparent);
  pointer-events: none;
}
.act-item {
  display: flex; gap: 10px; align-items: center;
  padding: 8px 8px; border-radius: 10px;
  transition: background 0.25s var(--ease-out), transform 0.25s var(--ease-out);
  border: 1px solid transparent;
  position: relative; z-index: 1;
}
.act-item:hover { background: rgba(255,255,255,0.03); transform: translateX(2px); }
.act-item__icon {
  width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid color-mix(in srgb, var(--act-color, #888) 40%, transparent);
  color: var(--act-color, #fff);
  border-radius: 10px; flex-shrink: 0;
  box-shadow: 0 0 0 4px rgba(0,0,0,0.25), inset 0 0 12px color-mix(in srgb, var(--act-color, #888) 12%, transparent);
}
@supports not (background: color-mix(in srgb, red 50%, blue)) {
  .act-item__icon {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.12);
  }
}
.act-item__icon .btw-ico svg { width: 14px; height: 14px; }
.act-item__main { flex: 1; min-width: 0; }
.act-item__row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.act-item__src {
  font-size: 11.5px; font-weight: 650; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.act-item__time {
  font-size: 10px; color: var(--text-faint); flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  font-family: var(--font-mono);
}
.act-item__msg { font-size: 11px; color: var(--text-dim); margin-top: 1px; }
.activity__sep { height: 1px; background: var(--hairline); margin: 10px 0; }
.activity__more {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  text-align: center; font-size: 11px; font-weight: 700; color: var(--text-dim);
  cursor: pointer; padding: 6px 0; transition: color var(--dur);
}
.activity__more:hover { color: var(--theme-accent); }
.activity__more .btw-ico svg { width: 12px; height: 12px; }

.dash-badges {
  padding: 14px; border-radius: var(--r-lg);
  background: var(--bg-card); border: 1px solid var(--border);
  flex-shrink: 0;
}
.dash-badges__head {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-size: 13px; font-weight: 800; margin-bottom: 12px;
}
.dash-badges__head .btw-ico { color: var(--theme-accent); }
.dash-badges__empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; padding: 22px 12px;
  border-radius: 12px;
  border: 1px dashed rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.02);
  color: var(--text-dim); font-size: 12px; text-align: center;
}
.dash-badges__empty .btw-ico {
  width: 36px; height: 36px; border-radius: 12px;
  background: rgba(var(--theme-accent-rgb), 0.1);
  border: 1px solid rgba(var(--theme-accent-rgb), 0.2);
  color: var(--theme-accent);
}
.dash-badges__empty .btw-ico svg { width: 18px; height: 18px; }

/* =============================================================================
   Chat section — premium lounge
   ============================================================================= */
.chat-section {
  position: relative;
  padding: 0;
  border-radius: 8px;
  background: #313338;
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  color: #dbdee1;
}
[data-theme="light"] .chat-section {
  background: #ffffff;
  border-color: rgba(0,0,0,0.08);
  color: #2e3338;
}
.chat-section__head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
  background: rgba(0,0,0,0.12);
  box-shadow: 0 1px 0 rgba(0,0,0,0.2);
}
[data-theme="light"] .chat-section__head {
  background: #fff;
  border-bottom-color: rgba(0,0,0,0.08);
  box-shadow: 0 1px 0 rgba(0,0,0,0.06);
}
.chat-section__title {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 16px; font-weight: 700;
  min-width: 0;
  color: #f2f3f5;
  font-family: var(--font-sans);
}
[data-theme="light"] .chat-section__title { color: #060607; }
.chat-section__title-ico {
  width: 24px; height: 24px; border-radius: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent;
  border: 0;
  color: #80848e;
  flex-shrink: 0;
}
.chat-section__title-ico svg { width: 20px; height: 20px; }
.chat-section__title-meta {
  display: flex; flex-direction: column; gap: 0; min-width: 0;
}
.chat-section__title-label { font-size: 16px; font-weight: 700; letter-spacing: 0; color: inherit; }
.chat-section__title-sub { font-size: 12px; font-weight: 500; color: #949ba4; }
.chat-section__online {
  display: flex; align-items: center; gap: 6px;
  color: #23a559;
  background: transparent;
  border: 0;
  border-radius: 0; padding: 0;
  font-size: 12px; font-weight: 500;
  flex-shrink: 0;
  white-space: nowrap;
}
.chat-section__online-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #23a559; box-shadow: none;
  animation: none;
}
.chat-section__messages {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 16px 0 8px;
  scroll-behavior: smooth;
  background: transparent;
}
.chat-section__messages::-webkit-scrollbar { width: 8px; }
.chat-section__messages::-webkit-scrollbar-track { background: transparent; }
.chat-section__messages::-webkit-scrollbar-thumb { background: #1a1b1e; border-radius: 4px; }
.chat-section__messages::-webkit-scrollbar-thumb:hover { background: #0c0d0e; }

.chat-msg {
  position: relative;
  display: flex; gap: 16px; align-items: flex-start;
  padding: 2px 48px 2px 16px;
  max-width: 100%;
  animation: chatMsgIn 0.18s var(--ease-out);
  border: 0;
  border-radius: 0;
  transition: background 0.1s;
}
.chat-msg:hover { background: rgba(2,2,2,0.14); border-color: transparent; }
[data-theme="light"] .chat-msg:hover { background: rgba(0,0,0,0.04); }
.chat-msg--self,
.chat-msg--self:hover,
.chat-msg--admin,
.chat-msg--admin:hover {
  background: transparent;
  border-color: transparent;
}
.chat-msg--self:hover,
.chat-msg--admin:hover { background: rgba(2,2,2,0.14); }
.chat-msg--compact { padding-top: 0; padding-bottom: 0; min-height: 22px; }
.chat-msg--flash { background: rgba(88,101,242,0.18) !important; }

/* Discord-style mention / reply-to-you highlight */
.chat-msg--ping,
.chat-msg--ping.chat-msg--self,
.chat-msg--ping.chat-msg--admin {
  background: rgba(240, 177, 50, 0.1) !important;
  box-shadow: inset 2px 0 0 #f0b132;
}
.chat-msg--ping:hover,
.chat-msg--ping.chat-msg--self:hover,
.chat-msg--ping.chat-msg--admin:hover {
  background: rgba(240, 177, 50, 0.15) !important;
}
[data-theme="light"] .chat-msg--ping,
[data-theme="light"] .chat-msg--ping.chat-msg--self,
[data-theme="light"] .chat-msg--ping.chat-msg--admin {
  background: rgba(240, 177, 50, 0.16) !important;
}
[data-theme="light"] .chat-msg--ping:hover {
  background: rgba(240, 177, 50, 0.22) !important;
}

.chat-msg__avatar {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  background-size: cover; background-position: center;
  background-color: #1e1f22;
  border: 0;
  box-shadow: none;
  margin-top: 2px;
}
.chat-msg__gutter {
  width: 40px; flex-shrink: 0;
  display: flex; justify-content: center;
  padding-top: 4px;
}
.chat-msg__time-gutter {
  font-size: 10px;
  color: #949ba4;
  opacity: 0;
  font-variant-numeric: tabular-nums;
}
.chat-msg--compact:hover .chat-msg__time-gutter { opacity: 1; }
.chat-msg__body { flex: 1; min-width: 0; position: relative; padding-right: 8px; }
.chat-msg__head { display: flex; gap: 8px; align-items: baseline; margin-bottom: 0; flex-wrap: wrap; }
.chat-msg__author {
  font-size: 16px; font-weight: 500; color: #f2f3f5; cursor: pointer;
}
.chat-msg__author:hover { text-decoration: underline; }
[data-theme="light"] .chat-msg__author { color: #060607; }
.chat-msg--self .chat-msg__author { color: #f2f3f5; }
.chat-msg--admin .chat-msg__author { color: #ed4245; }
.chat-msg__badge {
  display: inline-flex;
  align-items: center;
  height: 15px;
  padding: 0 4px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  background: #5865f2;
  position: relative;
  top: -1px;
}
.chat-msg__avatar--admin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: #5865f2;
  border: 0;
}
.chat-msg__avatar--admin .btw-ico svg { width: 18px; height: 18px; }
.chat-msg__actions {
  position: absolute;
  top: -16px;
  right: 14px;
  margin: 0;
  display: inline-flex;
  gap: 0;
  opacity: 0;
  pointer-events: none;
  background: #313338;
  border: 1px solid #1e1f22;
  border-radius: 4px;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.1), 0 4px 8px rgba(0,0,0,0.25);
  overflow: hidden;
  z-index: 3;
}
.chat-msg:hover .chat-msg__actions { opacity: 1; pointer-events: auto; }
[data-theme="light"] .chat-msg__actions {
  background: #fff;
  border-color: #e3e5e8;
}
.chat-msg__action {
  width: 32px;
  height: 32px;
  border-radius: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #b5bac1;
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: background 0.1s, color 0.1s;
}
.chat-msg__action .btw-ico svg { width: 16px; height: 16px; }
.chat-msg__action:hover {
  color: #dbdee1;
  border-color: transparent;
  background: rgba(255,255,255,0.06);
}
.chat-msg__action--ban:hover {
  color: #ed4245;
  border-color: transparent;
  background: rgba(237,66,69,0.12);
}
.chat-msg__reply {
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  margin: 0 0 4px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  color: #b5bac1;
}
.chat-msg__reply-bar {
  width: 2px;
  align-self: stretch;
  min-height: 16px;
  border-radius: 1px;
  background: #4e5058;
  flex-shrink: 0;
}
.chat-msg__reply-meta {
  display: flex;
  gap: 6px;
  min-width: 0;
  font-size: 12px;
  line-height: 1.25;
}
.chat-msg__reply-meta strong { color: #f2f3f5; font-weight: 500; }
.chat-msg__reply-meta span {
  color: #b5bac1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-msg__reply:hover .chat-msg__reply-meta span { color: #dbdee1; }
.chat-mention {
  display: inline;
  padding: 0 2px;
  border-radius: 3px;
  background: rgba(88,101,242,0.3);
  color: #dee0fc;
  font-weight: 500;
}
.chat-mention--me {
  background: rgba(88,101,242,0.5);
  color: #fff;
  font-weight: 600;
}
.chat-msg--ping .chat-mention--me {
  background: rgba(88,101,242,0.55);
  color: #fff;
}
.chat-ban-note {
  margin: 0 16px 8px;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(237,66,69,0.12);
  border: 1px solid rgba(237,66,69,0.28);
  color: #ed4245;
  font-size: 13px;
  font-weight: 500;
}
.chat-section__input-wrap--banned {
  opacity: 0.55;
  pointer-events: none;
}
.chat-msg__time {
  font-size: 12px; color: #949ba4; flex-shrink: 0;
  font-variant-numeric: tabular-nums; font-family: var(--font-sans);
  margin-left: 2px;
}
.chat-msg__content {
  font-size: 16px; color: #dbdee1; line-height: 1.375;
  word-break: break-word;
  white-space: pre-wrap;
}
[data-theme="light"] .chat-msg__content { color: #2e3338; }
.chat-msg__content a { color: #00a8fc; text-decoration: none; }
.chat-msg__content a:hover { text-decoration: underline; }

.chat-msg__empty {
  margin: auto;
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  text-align: left; color: #949ba4; font-size: 14px;
  padding: 16px;
  max-width: 520px;
}
.chat-msg__empty-ico {
  width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center;
  background: #4e5058;
  border: 0;
  color: #fff;
  box-shadow: none;
  margin-bottom: 4px;
}
.chat-msg__empty-ico svg { width: 22px; height: 22px; }
.chat-msg__empty strong { color: #f2f3f5; font-size: 24px; font-weight: 700; display: block; margin-bottom: 4px; }

.chat-section__typing {
  font-size: 12px; color: #949ba4;
  padding: 0 16px; height: 22px; flex-shrink: 0;
  display: flex; align-items: center; gap: 4px;
}
.chat-section__typing .typing-text { font-weight: 500; color: #b5bac1; }
.chat-section__typing .typing-dots { display: inline-flex; gap: 3px; }
.chat-section__typing .typing-dot { width: 4px; height: 4px; border-radius: 50%; background: #949ba4; animation: typingBounce 1.2s infinite; }
.chat-section__typing .typing-dot:nth-child(2) { animation-delay: 0.15s; }
.chat-section__typing .typing-dot:nth-child(3) { animation-delay: 0.3s; }
@keyframes typingBounce { 0%, 60%, 100% { transform: translateY(0); opacity: 0.4; } 30% { transform: translateY(-4px); opacity: 1; } }

.chat-composer {
  position: relative;
  flex-shrink: 0;
  padding: 0 16px 16px;
}
.chat-reply-bar {
  display: flex;
  align-items: stretch;
  gap: 10px;
  margin-bottom: 0;
  padding: 8px 12px;
  background: #2b2d31;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
}
[data-theme="light"] .chat-reply-bar { background: #f2f3f5; }
.chat-reply-bar__accent {
  width: 4px;
  border-radius: 4px;
  background: #5865f2;
  flex-shrink: 0;
}
.chat-reply-bar__body { flex: 1; min-width: 0; }
.chat-reply-bar__label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #949ba4;
}
.chat-reply-bar__label .btw-ico svg { width: 12px; height: 12px; }
.chat-reply-bar__label strong { color: #f2f3f5; font-weight: 600; }
.chat-reply-bar__text {
  font-size: 13px;
  color: #b5bac1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-reply-bar__close {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  color: #b5bac1;
  align-self: center;
}
.chat-reply-bar__close:hover { background: rgba(255,255,255,0.06); color: #fff; }
.chat-mention-menu {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: calc(100% - 8px);
  z-index: 8;
  max-height: 220px;
  overflow: auto;
  background: #2b2d31;
  border: 1px solid #1e1f22;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  padding: 6px;
}
[data-theme="light"] .chat-mention-menu {
  background: #fff;
  border-color: #e3e5e8;
}
.chat-mention-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 4px;
  color: #dbdee1;
  text-align: left;
}
.chat-mention-item:hover,
.chat-mention-item.is-active {
  background: #5865f2;
  color: #fff;
}
.chat-mention-item__av {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #1e1f22 center/cover no-repeat;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.chat-mention-item__av .btw-ico svg { width: 12px; height: 12px; }
.chat-mention-item__name { font-size: 14px; font-weight: 500; }
.chat-section__input-wrap {
  padding: 0;
  flex-shrink: 0;
  border-top: 0;
  background: transparent;
}
.chat-section__input-row {
  display: flex; gap: 8px; align-items: center;
  background: #383a40;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 12px;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  min-height: 44px;
}
.chat-reply-bar:not(.hidden) + .js-chat-mentions + .chat-section__input-wrap .chat-section__input-row,
.chat-reply-bar:not(.hidden) ~ .chat-section__input-wrap .chat-section__input-row {
  border-radius: 0 0 8px 8px;
}
[data-theme="light"] .chat-section__input-row { background: #ebedef; }
.chat-section__input-row:focus-within {
  border-color: transparent;
  background: #383a40;
  box-shadow: none;
}
.chat-section__input {
  flex: 1; min-width: 0; background: transparent; border: none;
  color: #dbdee1; font-size: 15px; font-family: var(--font-sans);
  outline: none; padding: 11px 0;
}
[data-theme="light"] .chat-section__input { color: #2e3338; }
.chat-section__input::placeholder { color: #6d6f78; }
.chat-section__send {
  width: 32px; height: 32px; padding: 0;
  border: none; border-radius: 4px;
  background: transparent; color: #b5bac1;
  display: grid; place-items: center;
  cursor: pointer; flex-shrink: 0;
  transition: color 0.15s, background 0.15s;
  box-shadow: none;
}
.chat-section__send .btw-ico svg { width: 18px; height: 18px; }
.chat-section__send:hover { transform: none; color: #fff; background: rgba(255,255,255,0.06); }
.chat-section__send:active { transform: none; }
.chat-section__send:disabled { opacity: 0.4; cursor: not-allowed; }

.chat-msg__avatar--click { cursor: pointer; }
.chat-msg__author[data-chat-profile] { cursor: pointer; }

.dc-popout-host {
  position: fixed;
  z-index: 1200;
  width: min(400px, calc(100vw - 20px));
  filter: drop-shadow(0 16px 40px rgba(0,0,0,0.6));
  animation: chatMsgIn 0.16s var(--ease-out);
}
.dc-popout {
  position: relative;
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  background: #111214;
  border: 1px solid rgba(255,255,255,0.08);
  color: #dbdee1;
}
.dc-popout__banner {
  height: 90px;
  background: #5865f2;
  background-size: cover !important;
  background-position: center !important;
}
.dc-popout__avatar-section {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: flex-end;
  padding: 0 16px;
  margin-top: -48px;
  min-height: 92px;
}
.dc-popout__avatar-wrap {
  position: relative;
  flex-shrink: 0;
}
.dc-popout__avatar-ring {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  border: 7px solid #111214;
  box-sizing: border-box;
  overflow: hidden;
  background: #1e1f22;
}
.dc-popout__avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #1e1f22 center/cover no-repeat;
}
.dc-popout__avatar--admin {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #5865f2;
  color: #fff;
}
.dc-popout__avatar--admin .btw-ico svg { width: 34px; height: 34px; }
.dc-popout__status {
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #80848e;
  border: 4px solid #111214;
  box-sizing: border-box;
  z-index: 5;
}
.dc-popout__deco {
  position: absolute;
  inset: -10px;
  width: calc(100% + 20px);
  height: calc(100% + 20px);
  pointer-events: none;
  object-fit: contain;
  z-index: 4;
}
.dc-popout__profile-frame {
  position: absolute;
  inset: -18%;
  width: 136%;
  height: 136%;
  object-fit: contain;
  pointer-events: none;
  z-index: 3;
  filter: drop-shadow(0 6px 12px rgba(0,0,0,0.3));
}
.dc-popout__profile-frame--bg {
  z-index: 1;
  opacity: 0.95;
}
.dc-popout__effect-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: screen;
  opacity: 0.9;
}
.dc-popout--effect { isolation: isolate; }
.dc-popout__body {
  position: relative;
  z-index: 2;
  padding: 12px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.dc-popout__identity {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  padding: 12px;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.06);
}
.dc-popout__identity--plate {
  min-height: 96px;
  padding: 0;
  background: rgba(0,0,0,0.2);
}
.dc-popout__nameplate {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.dc-popout__identity-content {
  position: relative;
  z-index: 1;
  padding: 12px;
  background: linear-gradient(90deg, rgba(0,0,0,0.55), rgba(0,0,0,0.14) 70%, transparent);
}
.dc-popout__identity:not(.dc-popout__identity--plate) .dc-popout__identity-content {
  padding: 0;
  background: none;
}
.dc-popout__name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.dc-popout__name {
  font-size: 22px;
  font-weight: 800;
  color: #f2f3f5;
  line-height: 1.15;
  letter-spacing: -0.02em;
  word-break: break-word;
}
.dc-popout__username {
  margin-top: 3px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.7);
  line-height: 1.3;
}
.dc-popout__clan {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.1);
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}
.dc-popout__clan img { width: 14px; height: 14px; border-radius: 3px; }
.dc-popout__badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 8px;
}
.dc-popout__badge {
  display: inline-flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
}
.dc-popout__badge img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  display: block;
}
.dc-popout__section { display: flex; flex-direction: column; gap: 4px; }
.dc-popout__label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
}
.dc-popout__bio,
.dc-popout__value {
  font-size: 14px;
  line-height: 1.45;
  color: rgba(255,255,255,0.92);
  word-break: break-word;
}
.dc-popout__muted { color: rgba(255,255,255,0.55); }
.dc-popout__downloads {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.dc-popout__downloads:has(> :only-child) {
  grid-template-columns: 1fr;
}
.dc-popout__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 2px;
}
.dc-popout__actions:has(> :only-child) { grid-template-columns: 1fr; }
.dc-popout__btn {
  height: 34px;
  border: none;
  border-radius: 3px;
  background: #5865f2;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, filter 0.15s;
}
.dc-popout__btn:hover { background: #4752c4; }
.dc-popout__btn--ghost {
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.12);
}
.dc-popout__btn--ghost:hover { background: rgba(0,0,0,0.5); }
.dc-popout--loading .dc-popout__body { padding-top: 16px; }
.dc-popout--loading .dc-popout__muted { padding: 8px 0 4px; }

/* Light profile themes (cream / white Discord themes) */
.dc-popout--light { color: #060607; }
.dc-popout--light .dc-popout__identity {
  background: rgba(255,255,255,0.55);
  border-color: rgba(0,0,0,0.08);
}
.dc-popout--light .dc-popout__identity-content {
  background: linear-gradient(90deg, rgba(255,255,255,0.7), rgba(255,255,255,0.2) 70%, transparent);
}
.dc-popout--light .dc-popout__name { color: #060607; }
.dc-popout--light .dc-popout__username,
.dc-popout--light .dc-popout__label,
.dc-popout--light .dc-popout__muted { color: rgba(0,0,0,0.55); }
.dc-popout--light .dc-popout__bio,
.dc-popout--light .dc-popout__value { color: rgba(0,0,0,0.88); }
.dc-popout--light .dc-popout__btn--ghost {
  background: rgba(0,0,0,0.08);
  color: rgba(0,0,0,0.85);
  border-color: rgba(0,0,0,0.12);
}
.dc-popout--light .dc-popout__clan {
  background: rgba(0,0,0,0.08);
  border-color: rgba(0,0,0,0.12);
  color: #060607;
}

[data-theme="light"] .dc-popout-host { filter: drop-shadow(0 12px 28px rgba(0,0,0,0.25)); }

@keyframes chatMsgIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.orbit-card__icon .btw-ico svg { width: 16px; height: 16px; }
.orbit-card__icon { color: inherit; }

/* =============================================================================
   Sub-page header
   ============================================================================= */
.page-head { display: flex; gap: 16px; align-items: center; margin-bottom: 4px; flex-shrink: 0; }
.page-head__icon {
  width: 52px; height: 52px; display: inline-flex; align-items: center; justify-content: center;
  color: var(--tool-c, var(--theme-accent));
  border: 1px solid color-mix(in srgb, var(--tool-c, var(--theme-accent)) 35%, transparent);
  background: color-mix(in srgb, var(--tool-c, var(--theme-accent)) 14%, transparent);
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.page-head__icon--accent {
  color: var(--theme-accent);
  border-color: rgba(var(--theme-accent-rgb), 0.35);
  background: rgba(var(--theme-accent-rgb), 0.12);
}
.page-head__icon .btw-ico { display: flex; }
.page-head__icon .btw-ico svg { width: 22px; height: 22px; }
.page-head__text h2 { font-family: var(--font-display); font-size: 22px; font-weight: 800; letter-spacing: -0.4px; color: var(--text); }
.page-head__text p { font-size: 12px; color: var(--text-dim); margin-top: 3px; }
.page-head__title { font-family: var(--font-display); font-size: 22px; font-weight: 800; letter-spacing: -0.4px; color: var(--text); }
.page-head__sub { font-size: 12px; color: var(--text-dim); margin-top: 3px; }

/* =============================================================================
   ID lookup
   ============================================================================= */
.lookup-row { display: flex; gap: 12px; margin-bottom: 18px; }
.lookup-row .input-wrap { flex: 1; }
.lookup-row .input-wrap__icon { font-size: 18px; }
.lookup-row .btn { width: 170px; }

.result-card {
  padding: 0; background: transparent !important; border: none !important; box-shadow: none !important;
  display: flex; flex-direction: column;
  flex: 0 0 auto;
  min-height: 240px;
  overflow: visible;
}
.result-empty {
  flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 48px 20px;
  border: 1px dashed var(--border);
  border-radius: var(--r-lg);
  background: var(--surface-1);
}
.result-empty__icon {
  width: 96px; height: 96px; display: flex; align-items: center; justify-content: center;
  background: var(--overlay-soft); border: 1px solid var(--border); color: var(--accent-2);
  border-radius: 50%; font-size: 32px; font-weight: 800; margin-bottom: 14px;
  animation: float 3.4s ease-in-out infinite;
}
.result-empty__icon .btw-ico svg { width: 36px; height: 36px; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
.result-empty__title { font-size: 14px; font-weight: 800; }
.result-empty__sub { font-size: 11px; color: var(--text-dim); }

/* Discord profile card */
.dc-card {
  position: relative;
  width: 100%;
  border-radius: 22px;
  overflow: hidden;
  background: #111214;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: var(--shadow-pop);
  animation: pop 0.45s var(--ease-out) both;
  isolation: isolate;
}
.dc-card--effect::before {
  content: '';
  position: absolute;
  z-index: 4;
  inset: -45% -15% auto;
  height: 75%;
  pointer-events: none;
  background:
    radial-gradient(circle at 28% 55%, rgba(var(--theme-accent-rgb),0.32), transparent 27%),
    radial-gradient(circle at 70% 30%, rgba(255,255,255,0.16), transparent 24%);
  filter: blur(20px);
  mix-blend-mode: screen;
  animation: dcEffectFloat 7s ease-in-out infinite alternate;
}
.dc-card__effect-layer {
  position: absolute;
  z-index: 4;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  mix-blend-mode: screen;
}
@keyframes dcEffectFloat {
  from { transform: translate3d(-2%, -4%, 0) scale(0.95); opacity: 0.55; }
  to { transform: translate3d(4%, 6%, 0) scale(1.08); opacity: 0.9; }
}
@media (prefers-reduced-motion: reduce) {
  .dc-card--effect::before { animation: none; opacity: 0.65; }
  .dc-card__effect-layer { mix-blend-mode: normal; opacity: 0.85; }
}
.dc-card__banner {
  position: relative;
  z-index: 1;
  width: 100%;
  height: clamp(128px, 19vw, 190px);
  background: #000;
  background-size: cover !important;
  background-position: center !important;
  flex-shrink: 0;
}
.dc-card__avatar-section {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  padding: 0 24px;
  margin-top: -52px;
  position: relative;
  z-index: 5;
}
.dc-card__avatar-wrap { position: relative; flex-shrink: 0; }
.dc-card__avatar-ring { width: 104px; height: 104px; border-radius: 50%; border: 7px solid #111214; transition: border-color var(--dur); }
.dc-card__avatar { width: 100%; height: 100%; border-radius: 50%; background-size: cover; background-position: center; background-color: #2b2d31; }
.dc-card__profile-frame {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  width: calc(100% + 42px);
  height: calc(100% + 42px);
  transform: translate(-50%, -50%);
  pointer-events: none;
  object-fit: contain;
  filter: drop-shadow(0 8px 14px rgba(0,0,0,0.28));
}
.dc-card__profile-frame--bg {
  z-index: 1;
  opacity: 0.95;
}
.dc-card__status-dot { position: absolute; bottom: 4px; right: 4px; width: 21px; height: 21px; border-radius: 50%; border: 4px solid #111214; background: #80848e; z-index: 4; }
.dc-card__status-bubble { display: flex; align-items: center; gap: 6px; background: #1e1f22; border-radius: var(--r-sm); padding: 8px 12px; max-width: 220px; margin-bottom: 8px; position: relative; word-break: break-word; box-shadow: 0 2px 10px rgba(0,0,0,0.5); }
.dc-card__status-bubble::before { content: ''; position: absolute; left: -8px; top: 50%; transform: translateY(-50%); border: 8px solid transparent; border-right: 8px solid #1e1f22; border-left: 0; }
.dc-status-emoji { font-size: 16px; line-height: 1; flex-shrink: 0; }
.dc-status-text { font-size: 13px; color: #dbdee1; line-height: 1.4; }
.dc-card__body { position: relative; z-index: 2; padding: 10px 24px 24px; }
.dc-card__identity {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  margin: 0 -8px 12px;
}
.dc-card__identity--nameplate {
  min-height: 116px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(0,0,0,0.14);
}
.dc-card__nameplate {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.dc-card__identity-content {
  position: relative;
  z-index: 1;
  padding: 8px;
}
.dc-card__identity--nameplate .dc-card__identity-content {
  min-height: 116px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(90deg, rgba(0,0,0,0.54), rgba(0,0,0,0.08) 72%, transparent);
  text-shadow: 0 2px 12px rgba(0,0,0,0.75);
}
.dc-card__name-row { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; min-width: 0; }
.dc-card__name { font-family: var(--font-display); font-size: clamp(22px, 3vw, 30px); font-weight: 800; color: #f2f3f5; line-height: 1.15; margin-bottom: 2px; letter-spacing: -0.5px; }
.dc-card__name.has-namestyle {
  /* Inline Discord name style (color / gradient / font) wins */
  color: inherit;
  -webkit-text-fill-color: unset;
}
.dc-card--light .dc-card__name.has-namestyle {
  color: inherit;
}
.dc-card__username { font-size: 13px; font-weight: 400; color: #949ba4; margin-bottom: 4px; }
.dc-card__pronouns { font-size: 13px; font-weight: 400; color: #949ba4; }
.dc-card--light .dc-card__pronouns { color: rgba(0,0,0,0.5); }
.dc-card__badge-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 5px; min-height: 26px; }
.dc-badge { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; cursor: pointer; transition: transform 0.2s var(--ease-spring); }
.dc-badge img { width: 24px; height: 24px; object-fit: contain; filter: drop-shadow(0 2px 3px rgba(0,0,0,0.35)); }
.dc-badge:hover { transform: scale(1.32) translateY(-2px); }
.dc-card__bio { font-size: 13px; color: #dbdee1; margin-bottom: 10px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.dc-card__bio-link { display: block; font-size: 13px; color: #cccccc; text-decoration: none; margin-bottom: 10px; word-break: break-all; cursor: pointer; transition: color var(--dur-fast); }
.dc-card__bio-link:hover { color: #ffffff; text-decoration: underline; }
.dc-card__btns { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.dc-pill { display: inline-flex; align-items: center; gap: 5px; padding: 8px 16px; border-radius: var(--r-xs); font-size: 13px; font-weight: 600; cursor: pointer; transition: filter var(--dur-fast), transform var(--dur-fast); white-space: nowrap; }
.dc-pill:hover { transform: translateY(-2px); }
.dc-pill:active { transform: scale(0.97); }
.dc-pill--primary { background: rgba(255,255,255,0.15); color: #fff; border: 1px solid rgba(255,255,255,0.2); box-shadow: 0 4px 14px -4px rgba(0,0,0,0.4); }
.dc-pill--primary:hover { background: rgba(255,255,255,0.22); border-color: rgba(255,255,255,0.3); }
.dc-pill--ghost { background: rgba(255,255,255,0.05); color: #dbdee1; border: 1px solid rgba(255,255,255,0.1); }
.dc-pill--ghost:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.18); }
.dc-card__divider { height: 1px; background: rgba(255,255,255,0.07); margin: 10px 0; }
.dc-card__section-label { font-size: 11px; font-weight: 700; color: #f2f3f5; margin-bottom: 2px; }
.dc-card__section-value { font-size: 14px; color: #dbdee1; }
.dc-clan-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 25px;
  padding: 0 8px;
  border-radius: 7px;
  background: rgba(0,0,0,0.34);
  border: 1px solid rgba(255,255,255,0.16);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-shadow: none;
}
.dc-clan-tag img { width: 16px; height: 16px; object-fit: contain; border-radius: 4px; }
.dc-card__badge-list,
.dc-card__cosmetics {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 7px 0 14px;
}
.dc-badge-detail,
.dc-cosmetic-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 9px;
  background: rgba(255,255,255,0.065);
  border: 1px solid rgba(255,255,255,0.1);
  color: #dbdee1;
  font-size: 11px;
  font-weight: 650;
}
.dc-badge-detail img { width: 18px; height: 18px; object-fit: contain; }
.dc-cosmetic-chip::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--theme-accent);
  box-shadow: 0 0 8px rgba(var(--theme-accent-rgb),0.7);
}

/* Dark tema (default): beyaz yazi */
/* Light tema: siyah yazi */
.dc-card--light .dc-card__name { color: #000000; }
.dc-card--light .dc-card__name.has-namestyle {
  /* Keep Discord name style colors on light theme cards */
  color: inherit;
}
.dc-namestyle-swatches {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 2px;
}
.dc-namestyle-swatch {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.35);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.2);
}
.dc-card--light .dc-namestyle-swatch { border-color: rgba(0,0,0,0.2); }
.dc-cosmetic-chip--namestyle { gap: 8px; }
.dc-card--light .dc-card__username { color: rgba(0,0,0,0.6); }
.dc-card--light .dc-card__bio { color: rgba(0,0,0,0.85); }
.dc-card--light .dc-card__bio-link { color: rgba(0,0,0,0.7); }
.dc-card--light .dc-card__bio-link:hover { color: #000000; }
.dc-card--light .dc-card__section-label { color: rgba(0,0,0,0.7); }
.dc-card--light .dc-card__section-value { color: rgba(0,0,0,0.9); }
.dc-card--light .dc-card__divider { background: rgba(0,0,0,0.1); }
.dc-card--light .dc-badge-detail,
.dc-card--light .dc-cosmetic-chip { background: rgba(0,0,0,0.07); border-color: rgba(0,0,0,0.12); color: rgba(0,0,0,0.82); }
.dc-card--light .dc-pill--ghost { background: rgba(0,0,0,0.08); color: rgba(0,0,0,0.8); border-color: rgba(0,0,0,0.12); }
.dc-card--light .dc-card__status-bubble { background: rgba(255,255,255,0.9); }
.dc-card--light .dc-card__status-bubble::before { border-right-color: rgba(255,255,255,0.9); }
.dc-card--light .dc-status-text { color: rgba(0,0,0,0.8); }

/* Connections */
.dc-card__connections { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.dc-conn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: var(--r-sm); background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.1); transition: transform 0.2s var(--ease-spring), background 0.2s; cursor: pointer; text-decoration: none; }
.dc-conn:hover { transform: translateY(-2px) scale(1.1); background: rgba(255,255,255,0.15); }
.dc-conn__logo { width: 18px; height: 18px; object-fit: contain; }
.dc-conn__fallback { display: none; font-size: 16px; align-items: center; justify-content: center; width: 100%; height: 100%; }
.dc-card--light .dc-conn { background: rgba(0,0,0,0.06); border-color: rgba(0,0,0,0.1); }
.dc-card--light .dc-conn:hover { background: rgba(0,0,0,0.12); }

/* Guild badges */
.dc-card__guild-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.dc-card__guild-badge { display: inline-flex; align-items: center; gap: 4px; }
.dc-card__guild-badge__icon { width: 20px; height: 20px; object-fit: contain; border-radius: 4px; }

/* SQL data box — outside the card, below it */
.sql-data-box {
  position: relative; margin-top: 14px;
  border-radius: var(--r-lg); overflow: hidden;
  background: var(--surface); border: 1px solid var(--border);
}
.sql-data-box__title {
  padding: 12px 16px; font-size: 12px; font-weight: 800; color: var(--text-dim);
  border-bottom: 1px solid var(--hairline); letter-spacing: 0.5px;
}
.sql-data-box__content { padding: 14px 16px; }
.sql-data-box__row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0;
}
.sql-data-box__row + .sql-data-box__row { border-top: 1px solid var(--hairline); }
.sql-data-box__label { font-size: 11px; font-weight: 700; color: var(--text-dim); letter-spacing: 1px; text-transform: uppercase; }
.sql-data-box__value { font-size: 14px; font-weight: 600; color: #fff; font-family: var(--font-mono); }

/* Avatar decoration */
.dc-card__avatar-deco {
  position: absolute; top: -15px; left: -15px;
  width: calc(100% + 30px); height: calc(100% + 30px);
  pointer-events: none;
  z-index: 3;
  object-fit: contain;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,0.26));
}

@media (max-width: 620px) {
  .dc-card__banner { height: 124px; }
  .dc-card__avatar-section { padding: 0 16px; margin-top: -44px; }
  .dc-card__avatar-ring { width: 88px; height: 88px; }
  .dc-card__body { padding: 8px 16px 18px; }
  .dc-card__identity--nameplate,
  .dc-card__identity--nameplate .dc-card__identity-content { min-height: 96px; }
  .dc-card__identity--nameplate .dc-card__identity-content { padding: 14px; }
  .dc-card__status-bubble { display: none; }
}

/* legacy compat (kept) */
.dc-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: var(--r-xs); font-size: 13px; font-weight: 600; cursor: pointer; transition: filter var(--dur-fast), transform var(--dur-fast); }
.dc-btn--primary { background: rgba(255,255,255,0.95); color: #000; }
.dc-btn--ghost { background: rgba(255,255,255,0.08); color: #dbdee1; border: 1px solid rgba(255,255,255,0.1); }
.badge-chip { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: var(--r-sm); background: var(--bg-input); border: 1px solid var(--border); cursor: pointer; transition: transform 0.2s var(--ease-spring); }
.badge-chip img { width: 24px; height: 24px; object-fit: contain; }
.badge-chip:hover { transform: translateY(-3px) scale(1.12); }
.badge { display: inline-block; font-size: 9px; font-weight: 800; padding: 4px 8px; border-radius: 6px; background: rgba(255,255,255,0.15); color: #fff; }
.badge--nitro { background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.25); }

/* =============================================================================
   Bulk lists
   ============================================================================= */
.list-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 9px 12px; margin-bottom: 6px;
  transition: border-color var(--dur), background var(--dur), transform var(--dur-fast), box-shadow var(--dur);
  cursor: pointer; animation: rowIn 0.32s var(--ease-out) both;
}
@keyframes rowIn { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }
.list-row:hover { border-color: var(--row-color, rgba(255,255,255,0.3)); background: var(--bg-card); transform: translateX(3px); }
.list-row.selected { background: color-mix(in srgb, var(--row-color, rgba(255,255,255,0.15)) 10%, transparent); border-color: var(--row-color, rgba(255,255,255,0.3)); box-shadow: 0 0 14px -2px var(--row-color, rgba(255,255,255,0.15)); }
.list-row__icon, .list-row__img {
  width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-input); border: 1px solid var(--row-color, rgba(255,255,255,0.3)); color: var(--row-color, #fff);
  border-radius: var(--r-xs); font-size: 11px; font-weight: 800; flex-shrink: 0;
}
.list-row__img { background-size: cover; background-position: center; background-color: #2b2d31; }
.list-row__name { flex: 1; font-size: 12px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row__status { font-size: 9px; font-weight: 800; padding: 3px 8px; border-radius: 99px; }
.list-row__status--ready { color: #fff; background: rgba(255,255,255,0.10); }
.list-row__status--ok { color: var(--green); background: rgba(52,211,153,0.12); }
.list-row__status--fail { color: var(--red); background: rgba(251,87,115,0.12); }

/* Wide grid layout for people / server lists (fill the width instead of a tall column) */
.list-card--grid.list-card:has(.list-row) {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 8px;
  align-content: start;
  max-height: min(66vh, 620px);
}
.list-card--grid .list-row { margin-bottom: 0; }
.list-card--grid .list-row:hover { transform: translateY(-2px); }
.list-card--grid .list-info { grid-column: 1 / -1; }
.list-count {
  grid-column: 1 / -1;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 2px 4px 8px; margin-bottom: 2px;
  font-size: 12px; font-weight: 600; color: var(--text-dim);
  border-bottom: 1px solid var(--border);
}
.list-count b { color: var(--text); font-weight: 800; }

/* Discord-style message list (Message Cleaner) */
.dc-msglist { display: flex; flex-direction: column; }
.dc-msglist__head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 2px 6px 10px; margin-bottom: 4px;
  font-size: 12px; font-weight: 600; color: var(--text-dim);
  border-bottom: 1px solid var(--border);
}
.dc-msglist__head b { color: var(--text); font-weight: 800; }
.dc-msglist__hint { color: var(--text-faint); font-weight: 500; }

/* Friends DM sweep divider */
.dc-msglist__sep {
  padding: 6px 10px; margin: 6px 0 2px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--text-dim); background: var(--bg-card); border-radius: 6px;
  display: flex; align-items: center;
}
.dc-msglist__sep--friend {
  color: var(--text); font-size: 12px; text-transform: none; letter-spacing: 0;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  border-left: 3px solid var(--accent);
}

/* DM search panel */
.dm-search { margin-top: 14px; }
.dm-search__head { display: flex; flex-direction: column; gap: 3px; margin-bottom: 12px; }
.dm-search__title { font-size: 14px; font-weight: 800; color: var(--text); display: flex; align-items: center; gap: 6px; }
.dm-search__title svg { width: 16px; height: 16px; }
.dm-search__sub { font-size: 11.5px; color: var(--text-dim); line-height: 1.4; }
.dm-search__row { display: flex; gap: 8px; align-items: stretch; flex-wrap: wrap; }
.dm-search__input {
  width: 100%; min-height: 92px; resize: vertical;
  font-size: 14px; line-height: 1.5; padding: 12px 14px;
  font-family: inherit;
}
.dm-search__actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.dm-search__results { margin-top: 12px; }

.dm-search__resulthead {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  padding: 8px 10px; margin-bottom: 8px; border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 10%, var(--bg-card));
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  font-size: 12.5px; font-weight: 700; color: var(--text);
}
.dm-search__count { font-size: 11.5px; font-weight: 500; color: var(--text-dim); }
.dm-search__count b { color: var(--text); }
.dm-search__list { display: flex; flex-direction: column; gap: 8px; max-height: 460px; overflow-y: auto; }

.dm-hit {
  display: flex; align-items: center; gap: 10px;
  min-height: 46px; padding: 8px 11px;
  border-radius: 9px; background: var(--bg-card);
  border: 1px solid var(--border);
  transition: border-color 0.15s, opacity 0.2s;
}
.dm-hit--active { border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.dm-hit--done { opacity: 0.55; }
.dm-hit__av { width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; background: var(--bg-input); object-fit: cover; }
.dm-hit__meta { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.dm-hit__name { font-size: 13px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-hit__cid { font-size: 10.5px; color: var(--text-faint); cursor: pointer; font-family: monospace; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-hit__cid:hover { color: var(--accent); }
.dm-hit__badge {
  font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 12px; flex-shrink: 0; white-space: nowrap;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 15%, transparent);
}
.dm-hit__clean {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 700; cursor: pointer; white-space: nowrap;
  padding: 6px 12px; border-radius: 7px; border: 1px solid color-mix(in srgb, var(--red) 35%, transparent);
  background: color-mix(in srgb, var(--red) 10%, transparent); color: var(--red);
  transition: background 0.15s;
}
.dm-hit__clean:hover:not(:disabled) { background: color-mix(in srgb, var(--red) 20%, transparent); }
.dm-hit__clean:disabled { cursor: default; opacity: 0.85; }

/* Friends DM scan list */
.frd-scan-head {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  padding: 10px 12px; margin-bottom: 6px; border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 10%, var(--bg-card));
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  font-size: 13px; font-weight: 700; color: var(--text);
}
.frd-scan-head__total { font-size: 12px; font-weight: 500; color: var(--text-dim); }
.frd-scan-head__total b { color: var(--text); }

.frd-scan-list {
  display: flex; flex-direction: column; gap: 3px;
  max-height: 380px; overflow-y: auto;
  padding: 2px 0;
}
.frd-scan-row {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px; border-radius: 7px;
  background: var(--bg-card); border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s;
}
.frd-scan-row--active {
  background: color-mix(in srgb, var(--accent) 8%, var(--bg-card));
  border-color: color-mix(in srgb, var(--accent) 30%, transparent);
}
.frd-scan-row__av {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  background: var(--bg-input);
}
.frd-scan-row__name {
  flex: 1; font-size: 13px; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.frd-scan-row__count {
  font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 12px;
  white-space: nowrap; flex-shrink: 0;
}
.frd-scan-row__count--scanning { color: var(--text-dim); background: var(--bg-input); }
.frd-scan-row__count--has { color: var(--accent); background: color-mix(in srgb, var(--accent) 15%, transparent); }
.frd-scan-row__count--zero { color: var(--text-faint); background: var(--bg-input); }
.frd-scan-row__count--fail { color: var(--red); background: color-mix(in srgb, var(--red) 12%, transparent); }
.frd-scan-row__count--done { color: var(--green); background: color-mix(in srgb, var(--green) 12%, transparent); }
.frd-scan-row__unfriend {
  font-size: 10px; font-weight: 800; letter-spacing: 0.04em;
  color: var(--red); background: color-mix(in srgb, var(--red) 12%, transparent);
  padding: 2px 7px; border-radius: 10px; flex-shrink: 0;
}

/* Message option toggles (friends DM / unfriend checkboxes) */
.msg-opt-toggle {
  display: flex; align-items: flex-start; gap: 10px;
  cursor: pointer; padding: 10px 12px; border-radius: 8px;
  background: var(--bg-card); border: 1px solid var(--border);
  transition: border-color var(--dur-fast);
}
.msg-opt-toggle:hover { border-color: var(--accent); }
.msg-opt-toggle--danger:hover { border-color: var(--red); }
.msg-opt-toggle input[type="checkbox"] { display: none; }
.msg-opt-toggle__box {
  flex-shrink: 0; width: 18px; height: 18px; margin-top: 2px;
  border-radius: 4px; border: 2px solid var(--border);
  background: var(--bg-input); display: flex; align-items: center; justify-content: center;
  transition: background var(--dur-fast), border-color var(--dur-fast);
}
.msg-opt-toggle input:checked ~ .msg-opt-toggle__check,
.msg-opt-toggle__box:has(input:checked) { background: var(--accent); border-color: var(--accent); }
.msg-opt-toggle input[type="checkbox"]:checked + .msg-opt-toggle__check::after {
  content: '✓'; color: #fff; font-size: 11px; font-weight: 900; line-height: 1;
}
/* Simpler approach: style the box via JS-set class */
.msg-opt-toggle.is-checked .msg-opt-toggle__box { background: var(--accent); border-color: var(--accent); }
.msg-opt-toggle.is-checked .msg-opt-toggle__box::after { content: '✓'; color: #fff; font-size: 11px; font-weight: 900; line-height: 1; display: flex; align-items: center; justify-content: center; width: 100%; }
.msg-opt-toggle--danger.is-checked .msg-opt-toggle__box { background: var(--red); border-color: var(--red); }
.msg-opt-toggle__text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.msg-opt-toggle__text b { font-size: 13px; color: var(--text); }
.msg-opt-toggle__text small { font-size: 11px; color: var(--text-dim); line-height: 1.4; }
.msg-exclude {
  padding: 10px 12px; border-radius: 8px;
  background: var(--bg-card); border: 1px solid var(--border);
}
.msg-exclude .field-label { display: block; margin-bottom: 7px; }
.msg-exclude__input { width: 100%; min-height: 68px; resize: vertical; font: inherit; line-height: 1.4; }
.msg-exclude small { display: block; margin-top: 6px; color: var(--text-dim); font-size: 11px; line-height: 1.4; }

.dc-msg {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 7px 10px; border-radius: 8px;
  transition: background var(--dur-fast);
  animation: rowIn 0.25s var(--ease-out) both;
}
.dc-msg:hover { background: rgba(255, 255, 255, 0.035); }
.dc-msg__avatar {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  object-fit: cover; display: grid; place-items: center;
  color: #fff; font-weight: 700; font-size: 16px; line-height: 1;
}
.dc-msg__body { min-width: 0; flex: 1; }
.dc-msg__head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 2px; flex-wrap: wrap; }
.dc-msg__author { font-size: 15px; font-weight: 600; color: #f2f3f5; }
.dc-msg__time { font-size: 11px; color: #949ba4; }
.dc-msg__content { font-size: 14px; line-height: 1.45; color: #dbdee1; word-break: break-word; white-space: pre-wrap; }
.dc-msg__edited { font-size: 10px; color: #72767d; margin-left: 5px; }
.dc-mention {
  background: rgba(88, 101, 242, 0.3); color: #c9cdfb;
  border-radius: 4px; padding: 0 3px; font-weight: 500;
  transition: background var(--dur-fast);
}
.dc-mention:hover { background: rgba(88, 101, 242, 0.6); color: #fff; }
.dc-msg__attach, .dc-msg__empty { color: #949ba4; font-style: italic; }

/* Message list pagination (prev / next arrows) */
.dc-pager {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  padding: 14px 8px 4px; margin-top: 8px;
  border-top: 1px solid var(--border);
}
.dc-pager__btn {
  width: 38px; height: 38px; border-radius: 10px;
  display: grid; place-items: center;
  font-size: 20px; font-weight: 700; line-height: 1;
  color: var(--text); background: var(--surface-2);
  border: 1px solid var(--border); cursor: pointer;
  transition: background var(--dur-fast), border-color var(--dur-fast), transform var(--dur-fast), opacity var(--dur-fast);
}
.dc-pager__btn:hover:not(:disabled) {
  background: rgba(var(--theme-accent-rgb), 0.18);
  border-color: rgba(var(--theme-accent-rgb), 0.5);
  transform: translateY(-1px);
}
.dc-pager__btn:disabled { opacity: 0.35; cursor: default; }
.dc-pager__info { font-size: 12.5px; font-weight: 600; color: var(--text-dim); min-width: 190px; text-align: center; }
.dc-pager__info b { color: var(--text); font-weight: 800; }

/* Live delete status pill on each message row */
.dc-msg__state {
  flex-shrink: 0; align-self: center;
  font-size: 10px; font-weight: 800; letter-spacing: 0.02em;
  padding: 4px 9px; border-radius: 99px; white-space: nowrap;
}
.dc-msg__state--pending { color: #fbbf24; background: rgba(251, 191, 36, 0.14); }
.dc-msg__state--ok { color: var(--green); background: rgba(52, 211, 153, 0.14); }
.dc-msg__state--fail { color: var(--red); background: rgba(251, 87, 115, 0.14); }
.dc-msg--deleted { opacity: 0.5; }
.dc-msg--deleted .dc-msg__content { text-decoration: line-through; }
/* Keep the counter header pinned while the deleting list scrolls */
.list-card:has(.dc-msg) { max-height: min(66vh, 640px); overflow-y: auto; }
#msgClearHead {
  position: sticky; top: -14px; z-index: 2;
  margin: -2px -4px 6px; padding: 12px 8px;
  background: var(--bg-card, #16181d);
}

/* =============================================================================
   Toast
   ============================================================================= */
.toast-container { position: fixed; bottom: 24px; right: 24px; display: flex; flex-direction: column; gap: 10px; z-index: 1000; pointer-events: none; }
.toast {
  position: relative; display: flex; align-items: center;
  background: rgba(0, 0, 0, 0.85); border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--r-md); padding: 13px 18px 13px 20px;
  font-size: 12.5px; font-weight: 600; color: var(--text);
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.6);
  animation: toastIn 0.42s var(--ease-spring);
  pointer-events: auto; min-width: 230px; max-width: 360px; overflow: hidden;
}
.toast::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: rgba(255,255,255,0.6); }
.toast--ok::before   { background: #10ff9d; }
.toast--err::before  { background: #ff4060; }
.toast--warn::before { background: #ffd04d; }
@keyframes toastIn { from { transform: translateX(120%); opacity: 0; } to { transform: none; opacity: 1; } }
.toast.fade-out { animation: toastOut 0.32s var(--ease-out) forwards; }
@keyframes toastOut { to { transform: translateX(120%); opacity: 0; } }

/* =============================================================================
   Form blocks / server cloner
   ============================================================================= */
.form-block { padding: 22px 24px; border-radius: var(--r-lg); margin-bottom: 0; }
.form-block.tool-panel { margin-bottom: 0; }
.form-block .label { margin-top: 0; }
.form-block .form-grid + .copy-options { margin-top: 18px; }
.form-block .copy-options { margin: 18px 0 16px; display: flex; flex-direction: column; gap: 8px; }

.icon-btn { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r-sm); color: var(--text-dim); font-size: 14px; cursor: pointer; transition: all var(--dur); }
.icon-btn:hover { color: #fff; border-color: rgba(255,255,255,0.3); transform: translateY(-2px); }

.copy-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 16px 0 18px; }
.check-row { display: flex; align-items: flex-start; gap: 10px; padding: 13px 14px; background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--r-md); cursor: pointer; transition: all var(--dur); }
.check-row:hover { border-color: rgba(255,255,255,0.3); background: var(--bg-card); transform: translateY(-2px); }
.check-row input[type="checkbox"] { position: absolute; opacity: 0; pointer-events: none; }
.check-box { width: 18px; height: 18px; border-radius: 6px; border: 2px solid var(--border-lt); background: var(--bg-deep); flex-shrink: 0; margin-top: 2px; position: relative; transition: all var(--dur); }
.check-row input:checked + .check-box { background: rgba(255,255,255,0.9); border-color: rgba(255,255,255,0.5); box-shadow: 0 0 14px rgba(255,255,255,0.25); }
.check-row input:checked + .check-box::after { content: '✓'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #0a0c18; font-size: 12px; font-weight: 900; }
.check-text { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.check-text b { font-size: 12px; font-weight: 700; color: var(--text); }
.check-text i { font-size: 10px; color: var(--text-dim); font-style: normal; }

.progress-card { padding: 16px 20px; border-radius: var(--r-md); margin-bottom: 16px; border-color: rgba(255,255,255,0.15); box-shadow: var(--shadow-card), 0 0 28px -8px rgba(255,255,255,0.15); animation: pop 0.4s var(--ease-out); }
.progress-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.progress-title { font-size: 12px; font-weight: 700; color: var(--text); }
.progress-pct { font-family: var(--font-mono); font-size: 14px; font-weight: 800; color: #fff; }
.progress-bar { height: 8px; background: var(--bg-input); border-radius: 99px; overflow: hidden; position: relative; }
.progress-fill { height: 100%; width: 0%; background: rgba(255,255,255,0.85); border-radius: 99px; transition: width 0.45s var(--ease-smooth); position: relative; overflow: hidden; }
.progress-fill::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.45), transparent); animation: shimmer 1.6s linear infinite; }
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

/* =============================================================================
   Skeleton / shimmer utilities (available for loading states)
   ============================================================================= */
.skeleton { position: relative; overflow: hidden; background: var(--surface-2); border-radius: var(--r-sm); }
.skeleton::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent); animation: shimmer 1.4s linear infinite; }

/* =============================================================================
   Shared keyframes
   ============================================================================= */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%,100% { opacity: 0.55; transform: scale(1); } 50% { opacity: 0.9; transform: scale(1.08); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* =============================================================================
   Accessibility — respect reduced motion
   ============================================================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001s !important; animation-iteration-count: 1 !important; transition-duration: 0.05s !important; }
  .bg-blob, .bg-grid, .bg-grid::after { animation: none !important; }
}

/* =============================================================================
   Profile Edit Modal
   ============================================================================= */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.65);
  /* blur removed */
  /* blur removed */
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.25s ease both;
}
.modal-overlay.hidden { display: none !important; }

.modal {
  width: 460px; max-width: 92vw;
  max-height: 88vh;
  overflow-y: auto;
  padding: 0;
  border-radius: var(--r-xl);
  animation: fadeUp 0.3s var(--ease-out) both;
}
.modal__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px 12px;
  border-bottom: 1px solid var(--hairline);
}
.modal__head h3 {
  font-family: var(--font-display);
  font-size: 17px; font-weight: 800;
  background: linear-gradient(120deg, #fff 0%, #aaa 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.modal__close {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-dim); font-size: 14px;
  transition: background var(--dur-fast), color var(--dur-fast);
}
.modal__close:hover { background: var(--bg-hover); color: #fff; }

.modal__body { padding: 18px 22px 22px; }

.profile-edit__avatar-row,
.profile-edit__banner-row {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 16px;
}
.profile-edit__avatar {
  width: 64px; height: 64px; border-radius: 50%;
  background-size: cover; background-position: center;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px var(--border);
}
.profile-edit__avatar-info,
.profile-edit__banner-info { flex: 1; min-width: 0; }
.profile-edit__avatar-info label,
.profile-edit__banner-info label {
  display: block; font-size: 11px; font-weight: 700;
  color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.4px;
  margin-bottom: 6px;
}
.profile-edit__banner {
  width: 120px; height: 48px; border-radius: 8px;
  background-size: cover; background-position: center;
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 2px var(--border);
}
.profile-edit__banner span { font-size: 10px; color: var(--text-faint); }

.file-input {
  width: 100%;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  border: 1px dashed var(--border);
  background: var(--bg-input);
  color: var(--text-dim);
  font-size: 12px;
  cursor: pointer;
  transition: border-color var(--dur-fast);
}
.file-input:hover { border-color: var(--border-lt); }

.hint {
  display: block;
  font-size: 10px; color: var(--text-faint); margin-top: 4px;
}

/* Admin login button on login screen */
.screen--login { position: relative; }
.admin-login-btn {
  position: absolute;
  bottom: 24px;
  right: 24px;
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 650;
  padding: 8px 14px;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background var(--dur-fast), border-color var(--dur-fast), color var(--dur-fast), transform var(--dur-fast);
  font-family: var(--font-sans);
  letter-spacing: 0.02em;
}
.admin-login-btn:hover {
  background: var(--bg-hover);
  border-color: rgba(var(--theme-accent-rgb), 0.35);
  color: var(--text);
  transform: translateY(-1px);
}

/* Admin login modal */
.admin-login-overlay {
  background:
    radial-gradient(ellipse at 50% 20%, rgba(var(--theme-accent-rgb), 0.18), transparent 55%),
    rgba(0, 0, 0, 0.72);
}
.admin-login-card {
  position: relative;
  width: min(440px, 94vw);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: var(--shadow-pop);
}
.admin-login-card__glow {
  position: absolute;
  inset: -40% auto auto -20%;
  width: 70%;
  height: 55%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(var(--theme-accent-rgb), 0.22), transparent 70%);
  filter: blur(28px);
}
.admin-login-card__head {
  position: relative;
  z-index: 1;
  padding: 22px 24px 14px;
  border-bottom: 1px solid var(--hairline);
}
.admin-login-card__brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.admin-login-card__icon {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: var(--theme-accent);
  border: 1px solid rgba(var(--theme-accent-rgb), 0.35);
  background: rgba(var(--theme-accent-rgb), 0.12);
  flex-shrink: 0;
}
.admin-login-card__icon .btw-ico svg { width: 22px; height: 22px; }
.admin-login-card__eyebrow {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 2px;
}
.admin-login-card__head h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: var(--text);
  background: none;
  -webkit-text-fill-color: unset;
}
.admin-login-card__body {
  position: relative;
  z-index: 1;
  padding: 18px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.admin-login-card__sub {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.45;
  margin: 0 0 14px;
}
.admin-login-card__body .form-row { margin-bottom: 14px; }
.admin-login-card__body .btn--full {
  margin-top: 4px;
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.admin-login-card__error {
  min-height: 18px;
  margin: 10px 0 0;
  text-align: center;
  font-size: 12px;
  font-weight: 650;
  color: var(--red);
}

/* Admin dashboard */
#pageAdmin.page {
  max-width: none;
  width: 100%;
}
.admin-stage {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
}
.admin-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
.admin-stat {
  position: relative;
  padding: 18px 16px;
  border-radius: var(--r-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  overflow: hidden;
  min-width: 0;
}
.admin-stat::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: rgba(var(--theme-accent-rgb), 0.55);
  opacity: 0.55;
}
.admin-stat--accent::before { opacity: 1; background: var(--theme-accent); }
.admin-stat__value {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text);
  line-height: 1.1;
}
.admin-stat--accent .admin-stat__value { color: var(--theme-accent); }
.admin-stat__label {
  margin-top: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.admin-panel {
  padding: 20px 22px;
  border-radius: var(--r-xl);
  background: var(--bg-card);
  border: 1px solid var(--border);
}
.admin-panel__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.admin-panel__title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--text);
}
.admin-panel__sub {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-dim);
}
.admin-toolbar {
  display: flex;
  gap: 10px;
  align-items: stretch;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.admin-toolbar__plan {
  flex: 1 1 220px;
  min-width: 180px;
  min-height: 48px;
  padding: 0 38px 0 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background-color: #151922;
  color: #f2f3f5;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color-scheme: dark;
  appearance: none;
  -webkit-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #a8b0c0 50%),
    linear-gradient(135deg, #a8b0c0 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 2px),
    calc(100% - 12px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}
.admin-toolbar__plan option,
.admin-toolbar__plan optgroup {
  background-color: #11141c;
  color: #f2f3f5;
}
[data-theme="light"] .admin-toolbar__plan {
  background-color: #ffffff;
  color: #111218;
  color-scheme: light;
  background-image:
    linear-gradient(45deg, transparent 50%, #6b7280 50%),
    linear-gradient(135deg, #6b7280 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 2px),
    calc(100% - 12px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}
[data-theme="light"] .admin-toolbar__plan option,
[data-theme="light"] .admin-toolbar__plan optgroup {
  background-color: #ffffff;
  color: #111218;
}
.admin-toolbar__plan:focus {
  outline: none;
  border-color: rgba(var(--theme-accent-rgb), 0.45);
  box-shadow: 0 0 0 3px rgba(var(--theme-accent-rgb), 0.12);
}
.admin-toolbar .btn {
  flex: 0 0 auto;
  min-height: 48px;
  min-width: 132px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.admin-toolbar .btn .btw-ico svg { width: 15px; height: 15px; }
.admin-toolbar__search {
  flex: 1 1 240px;
  min-width: 200px;
}
.admin-key-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.admin-key-empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--text-faint);
  font-size: 13px;
  border: 1px dashed var(--hairline);
  border-radius: var(--r-lg);
  background: var(--surface-1);
}
.admin-key-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(220px, 1fr) auto;
  gap: 14px 18px;
  align-items: center;
  padding: 14px 16px;
  border-radius: var(--r-lg);
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  transition: border-color var(--dur-fast), background var(--dur-fast);
}
.admin-key-row:hover {
  background: var(--bg-hover);
  border-color: var(--border);
}
.admin-key-row__code {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  word-break: break-all;
  line-height: 1.35;
}
.admin-key-row__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.admin-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 7px;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}
.admin-chip--plan {
  color: var(--theme-accent);
  border-color: rgba(var(--theme-accent-rgb), 0.28);
  background: rgba(var(--theme-accent-rgb), 0.1);
}
.admin-key-row__details {
  display: grid;
  gap: 4px;
  font-size: 12px;
  color: var(--text-dim);
  min-width: 0;
}
.admin-key-row__details strong {
  color: var(--text);
  font-weight: 700;
}
.admin-key-row__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.admin-slot-input {
  width: 56px;
  min-height: 36px;
  padding: 0 8px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  color-scheme: var(--color-scheme);
}
.admin-slot-input:focus {
  outline: none;
  border-color: rgba(var(--theme-accent-rgb), 0.45);
}
.admin-key-row__actions .btn {
  min-height: 36px;
  padding: 0 12px;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.admin-key-row__actions .btn .btw-ico svg { width: 13px; height: 13px; }
.admin-log-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: min(52vh, 520px);
  overflow: auto;
  padding-right: 4px;
}
.admin-log-row {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
  padding: 10px 12px;
  border-radius: var(--r-md);
  background: var(--surface-1);
  border: 1px solid transparent;
  font-size: 12px;
}
.admin-log-row:hover { border-color: var(--hairline); }
.admin-log-row__time {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  white-space: nowrap;
}
.admin-log-row__token {
  font-family: var(--font-mono);
  color: var(--text-dim);
  word-break: break-all;
}
@media (max-width: 1100px) {
  .admin-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .admin-key-row { grid-template-columns: 1fr; }
  .admin-key-row__actions { justify-content: flex-start; }
}
@media (max-width: 720px) {
  .admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-log-row { grid-template-columns: 1fr; gap: 4px; }
  .admin-toolbar .btn { flex: 1 1 calc(50% - 10px); min-width: 0; }
}

.admin-panel--keys {
  border-color: rgba(var(--theme-accent-rgb), 0.28);
  box-shadow: 0 0 0 1px rgba(var(--theme-accent-rgb), 0.08);
}
.admin-key-create {
  margin-bottom: 14px;
  padding: 14px;
  border-radius: var(--r-lg);
  background: var(--surface-1);
  border: 1px solid var(--hairline);
}
.admin-key-create__label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 8px;
}
.admin-toolbar--create {
  margin-bottom: 0;
}
.admin-toolbar--create .btn--solid {
  min-width: 180px;
}
.admin-panel--chat { padding-bottom: 18px; }
.admin-chat-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(220px, 0.7fr);
  gap: 14px;
  align-items: stretch;
}
.chat-section--admin {
  min-height: 420px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin: 0;
}
.chat-section--admin .chat-section__messages {
  flex: 1 1 auto;
  min-height: 280px;
  max-height: min(52vh, 560px);
}
.admin-ban-panel {
  padding: 14px;
  border-radius: var(--r-lg);
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.admin-ban-panel__title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 10px;
}
.admin-ban-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: auto;
  max-height: min(52vh, 560px);
}
.admin-ban-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r-md);
  background: var(--bg-card);
  border: 1px solid var(--hairline);
}
.admin-ban-row__name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.admin-ban-row__meta {
  margin-top: 3px;
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--text-faint);
  word-break: break-all;
}
@media (max-width: 1100px) {
  .admin-chat-layout { grid-template-columns: 1fr; }
}

/* =============================================================================
   Full-screen Account Picker (screen--accounts)
   ============================================================================= */
.screen--accounts {
  display: flex;
  flex-direction: column;
  background: #070708;
  padding: 0;
  overflow: hidden;
  position: relative;
}
.acct-screen__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 70% 50% at 15% -10%, rgba(255,255,255,0.07), transparent 55%),
    radial-gradient(ellipse 55% 40% at 90% 0%, rgba(180,180,190,0.05), transparent 50%),
    linear-gradient(180deg, #0c0c0e 0%, #070708 45%, #050506 100%);
}
.acct-screen__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.screen--accounts > *:not(.acct-screen__bg) { position: relative; z-index: 1; }

/* Top header bar */
.acct-screen__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 20px clamp(18px, 3vw, 36px) 14px;
  background: rgba(0,0,0,0.35);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
}
.acct-screen__brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 200px;
}
.acct-screen__logo {
  width: 42px; height: 42px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.12), 0 8px 20px rgba(0,0,0,0.45);
}
.acct-screen__title {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 800;
  background: linear-gradient(120deg, #fff 0%, #aaa 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.3px;
}
.acct-screen__sub {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 2px;
}
.acct-screen__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.acct-chip {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  white-space: nowrap;
}
.acct-chip--soft {
  color: var(--text-dim);
  background: rgba(255,255,255,0.04);
}
.acct-chip--time {
  font-variant-numeric: tabular-nums;
  color: rgba(255,255,255,0.78);
}
.acct-screen__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.acct-screen__progress {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px clamp(18px, 3vw, 36px) 0;
  flex-shrink: 0;
}
.acct-screen__progress-bar {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
}
.acct-screen__progress-bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(255,255,255,0.55), rgba(255,255,255,0.95));
  transition: width 0.35s var(--ease-out, ease);
}
.acct-screen__error {
  text-align: center;
  color: var(--red);
  font-size: 12px; font-weight: 600;
  padding: 8px 20px 0;
  flex-shrink: 0;
  min-height: 24px;
}
.acct-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
  padding: 28px 12px;
}
.acct-card__slotn {
  margin-top: 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
}
.exit-key-overlay { z-index: 1200; }
.exit-key-modal { width: 420px; max-width: 92vw; }
.exit-key-modal__text {
  margin: 0 0 18px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-dim);
}
.exit-key-modal__text strong { color: #fff; }
.exit-key-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

/* Scrollable grid area */
.accounts-grid {
  flex: 1;
  overflow-y: auto;
  padding: 32px 40px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 20px;
  align-content: start;
}
.accounts-grid::-webkit-scrollbar { width: 8px; }
.accounts-grid::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
}

/* Account Card — portrait layout */
.acct-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 0;
  border-radius: var(--r-xl);
  cursor: pointer;
  text-align: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.09);
  overflow: hidden;
  transition: transform 0.22s var(--ease-spring), border-color 0.18s, box-shadow 0.22s;
  position: relative;
  animation: cardPop 0.4s var(--ease-spring) both;
}
.acct-card:nth-child(1) { animation-delay: 0.03s; }
.acct-card:nth-child(2) { animation-delay: 0.07s; }
.acct-card:nth-child(3) { animation-delay: 0.11s; }
.acct-card:nth-child(4) { animation-delay: 0.15s; }
.acct-card:nth-child(5) { animation-delay: 0.19s; }
.acct-card:nth-child(6) { animation-delay: 0.23s; }
@keyframes cardPop {
  from { opacity: 0; transform: translateY(16px) scale(0.94); }
  to   { opacity: 1; transform: none; }
}
.acct-card:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: rgba(255,255,255,0.22);
  box-shadow: 0 20px 50px -14px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.12);
}
.acct-card--empty {
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.02);
}

/* Avatar top section */
.acct-card__avatar-section {
  width: 100%;
  padding: 28px 20px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  position: relative;
  transition: background 0.18s;
}
.acct-card:hover .acct-card__avatar-section {
  background: rgba(255,255,255,0.05);
}
.acct-card__avatar {
  width: 80px; height: 80px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  background-color: #1a1a1a;
  box-shadow: 0 0 0 3px rgba(255,255,255,0.12), 0 8px 24px rgba(0,0,0,0.5);
  transition: box-shadow 0.2s;
  flex-shrink: 0;
}
.acct-card:hover .acct-card__avatar {
  box-shadow: 0 0 0 3px rgba(255,255,255,0.28), 0 12px 32px rgba(0,0,0,0.6);
}
.acct-card__avatar--empty {
  display: flex; align-items: center; justify-content: center;
  font-size: 32px;
  background: rgba(255,255,255,0.04);
  border: 2px dashed rgba(255,255,255,0.15);
  box-shadow: none;
  color: var(--text-dim);
}

/* Info bottom section */
.acct-card__info {
  width: 100%;
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}
.acct-card__tag {
  font-size: 9px; font-weight: 800;
  color: rgba(255,255,255,0.30);
  letter-spacing: 1.2px;
  text-transform: uppercase;
}
.acct-card__name {
  font-size: 14px; font-weight: 800;
  color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 100%;
}
.acct-card__sub {
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 10px;
}
.acct-card__login {
  border: none;
  border-radius: var(--r-sm);
  padding: 9px 0;
  background: #ffffff;
  color: #000000;
  font-size: 11px; font-weight: 800;
  letter-spacing: 0.4px;
  cursor: pointer;
  width: 100%;
  transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
}
.acct-card__login:hover {
  background: #e8e8e8;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.4);
}
.acct-card__login:active { transform: scale(0.97); }
.acct-card--empty .acct-card__login {
  background: rgba(255,255,255,0.07);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.15);
}
.acct-card--empty .acct-card__login:hover {
  background: rgba(255,255,255,0.13);
}

/* Delete button — hidden, slot deletion disabled */
.acct-card__del { display: none; }

.slot-info { font-size: 11px; opacity: 0.85; margin-left: 6px; }
.link-btn { display: block; margin: 12px auto 0; background: transparent; border: none; color: var(--text-dim); font-size: 12px; cursor: pointer; text-decoration: underline; }
.link-btn:hover { color: #fff; }

/* =========================================================
   Web landing + navigation — MetaMask-style scroll story
   ========================================================= */
.web-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: clamp(12px, 2vw, 28px);
  height: 64px;
  padding: 0 clamp(18px, 3.5vw, 40px);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.35s ease, border-color 0.35s ease;
}
.web-nav.scrolled {
  background: rgba(8, 8, 9, 0.85);
  border-bottom-color: rgba(255,255,255,0.06);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.web-nav__brand {
  display: flex; align-items: center; gap: 10px;
  justify-self: start;
  min-width: 0;
}
.web-nav__logo {
  width: 30px; height: 30px; border-radius: 8px; object-fit: cover;
  flex-shrink: 0;
}
.web-nav__title {
  font-family: var(--font-display); font-size: 15px; font-weight: 700;
  letter-spacing: -0.02em; color: #fff;
  white-space: nowrap;
}
.web-nav__title span { color: #fff; font-weight: 500; opacity: 0.55; }
.web-nav__links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(22px, 3vw, 36px);
  justify-self: center;
}
.web-nav__links a {
  color: rgba(255,255,255,0.55); font-size: 13px; font-weight: 500;
  text-decoration: none; transition: color 0.2s;
  letter-spacing: 0.01em;
}
.web-nav__links a:hover { color: #fff; }
.web-nav__links a::after { display: none; }
.web-nav__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  justify-self: end;
  min-width: 0;
  flex-wrap: nowrap;
}
.nav-pill {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(12, 12, 14, 0.72);
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(10px);
  gap: 0;
  flex-shrink: 0;
  box-sizing: border-box;
}
.nav-pill__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 34px;
  padding: 0 16px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,0.55);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.15s;
  white-space: nowrap;
}
.nav-pill__btn:hover { color: rgba(255,255,255,0.85); }
.nav-pill__btn.is-active {
  background: #fff;
  color: #0a0a0b;
  box-shadow: 0 1px 0 rgba(255,255,255,0.2);
}
.nav-pill__ico {
  width: 14px; height: 14px; flex-shrink: 0;
}
.nav-pill--lang {
  height: 40px;
  padding: 4px;
}
.nav-pill--lang .nav-pill__btn {
  width: 32px;
  min-width: 32px;
  height: 32px;
  padding: 0;
  font-size: 10px;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.38);
}
.nav-pill--lang .nav-pill__btn.is-active {
  background: #fff;
  color: #0a0a0b;
}

/* Mini track player — top right */
/* Discord pill in the top nav */
.nav-discord {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(88, 101, 242, 0.16);
  border: 1px solid rgba(88, 101, 242, 0.45);
  color: #c7ccff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  backdrop-filter: blur(10px);
  box-sizing: border-box;
  transition: background 0.18s ease, transform 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}
.nav-discord svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav-discord:hover {
  background: rgba(88, 101, 242, 0.9);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(88, 101, 242, 0.4);
}

/* Footer discord link */
.landing__footer-link--discord {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #8a93ff;
}
.landing__footer-link--discord:hover { color: #c7ccff; }
.landing__footer-link--discord svg { flex-shrink: 0; }

@media (max-width: 1100px) {
  .nav-discord span { display: none; }
  .nav-discord { padding: 0 10px; }
}
@media (max-width: 860px) {
  .web-nav {
    grid-template-columns: 1fr auto;
  }
  .web-nav__links { display: none; }
  .web-nav__actions { gap: 6px; }
  .nav-pill:not(.nav-pill--lang) .nav-pill__btn { padding: 0 12px; height: 32px; }
  .nav-pill:not(.nav-pill--lang) .nav-pill__ico { width: 13px; height: 13px; }
  .nav-pill,
  .nav-pill--lang,
  .track-player { height: 36px; }
  .nav-pill--lang .nav-pill__btn { width: 28px; min-width: 28px; height: 28px; }
  .track-player__play { width: 30px; height: 30px; }
}

.web-nav__login {
  height: 36px; padding: 0 16px; border-radius: 8px;
  font-size: 13px; font-weight: 600;
  background: #fff; color: #080809;
  transition: transform 0.2s ease, opacity 0.2s;
}
.web-nav__login:hover { transform: translateY(-1px); opacity: 0.92; }
.web-nav__login:active { transform: none; }

.scroll-progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0;
  background: var(--landing-accent);
  z-index: 9999;
  transition: width 0.05s linear;
}

html.lenis, html.lenis body { height: auto !important; min-height: 100vh; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

.intro-overlay {
  position: fixed; inset: 0; z-index: 99999;
  background: #000;
  display: flex; align-items: center; justify-content: center;
  transition: opacity 1.2s ease-out;
}
.intro-overlay.fade-out { opacity: 0; pointer-events: none; }
.intro-overlay.hidden { display: none !important; }
.intro-video {
  max-width: 100vw; max-height: 100vh;
  width: 100vw; height: 100vh;
  object-fit: contain;
}

[data-reveal] { opacity: 0; }
#hero [data-reveal] { opacity: 1; }

/* ── Landing shell ── */
.landing {
  position: relative; z-index: 10;
  min-height: 100vh; overflow-x: clip;
  background: var(--landing-ink);
  color: #f4f1ea;
}
.landing.hidden { display: none !important; }

/* ── Hero ── */
.landing__hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(88px, 12vh, 120px) clamp(16px, 4vw, 48px) clamp(48px, 8vh, 80px);
  isolation: isolate;
  overflow: hidden;
  background: #000;
}
.landing__hero--cinema {
  /* Full-bleed cinematic stage — covers the top of the site */
  min-height: 100vh;
  min-height: 100dvh;
  padding: 0;
  gap: 0;
  justify-content: stretch;
  align-items: stretch;
}
.landing__hero-media {
  position: absolute; inset: 0; z-index: -1; overflow: hidden;
}
.landing__hero-img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  transform: scale(1.06);
  filter: saturate(0.85) brightness(0.55);
}
.landing__hero-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(8,8,9,0.35) 0%, rgba(8,8,9,0.55) 40%, rgba(8,8,9,0.96) 100%),
    linear-gradient(90deg, rgba(8,8,9,0.7) 0%, transparent 55%);
}
.landing__hero-inner {
  max-width: 920px;
  padding-bottom: 24px;
}
.landing__hero-inner--cinema {
  display: none;
}
.landing__brand-block {
  position: relative;
  z-index: 2;
  max-width: 920px;
  margin: 0 auto;
  padding: clamp(56px, 10vh, 120px) clamp(20px, 5vw, 72px) clamp(40px, 6vh, 72px);
}
.landing__hero--cinema .scroll-hint {
  position: absolute;
  right: clamp(20px, 5vw, 72px);
  bottom: 40px;
  z-index: 21;
}


/* ── Cinematic 3D cube hero (full-bleed) ── */
.hero-cinema {
  --cinema-scale: 1;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: hidden;
}
.hero-cinema__stage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 0;
  overflow: hidden;
  transform: none;
  animation: heroCinemaBrightness var(--track-dur, 392s) linear forwards;
}
.hero-cinema__full {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1000px;
  height: 562px;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  /* Base centering + responsive cover scale; zoom runs on inner layer */
  transform: translate(-50%, -50%) scale(var(--cinema-scale));
  transform-origin: center center;
}
.hero-cinema__zoom {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: heroCinemaZoom var(--track-dur, 392s) linear forwards;
}
.hero-cinema__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.hero-cinema__cube-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1; /* text BEHIND the boy */
}
.hero-cinema__boy {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 2; /* silhouette IN FRONT of scrolling text */
  pointer-events: none;
  transform-origin: 50% 100%;
  animation:
    heroCinemaBlur var(--track-dur, 392s) linear forwards,
    heroCinemaSway 7.5s ease-in-out infinite;
}
@keyframes heroCinemaSway {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
  25% { transform: translate3d(2px, -1px, 0) rotate(0.35deg); }
  50% { transform: translate3d(0, 1px, 0) rotate(-0.2deg); }
  75% { transform: translate3d(-2px, -1px, 0) rotate(-0.35deg); }
}
.hero-cinema__hue {
  position: absolute;
  inset: 0;
  z-index: 3;
  mix-blend-mode: overlay;
  background: radial-gradient(ellipse at center, #1e5799 0%, #7db9e8 100%);
  pointer-events: none;
}
.hero-cinema__hue.animated {
  animation: heroCinemaHue 8s infinite;
}
.hero-cinema__cube {
  position: relative;
  width: 870px;
  height: 190px;
  transform-style: preserve-3d;
  perspective: 480px;
  perspective-origin: 51% 70%;
}
.hero-cinema__face {
  position: absolute;
  width: 870px;
  height: 190px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: transparent;
  opacity: 0.5;
}
.hero-cinema__face--top,
.hero-cinema__face--bottom {
  width: 870px;
  height: 870px;
}
.hero-cinema__face--front {
  transform: translateZ(435px);
  display: none;
}
.hero-cinema__face--back {
  transform: translateZ(-435px) rotateY(180deg) scaleX(-1);
}
.hero-cinema__face--left {
  transform: translateX(-435px) rotateY(-90deg) scaleX(-1);
}
.hero-cinema__face--right {
  transform: translateX(435px) rotateY(90deg) scaleX(-1);
}
.hero-cinema__face--top {
  transform: translateY(-435px) rotateX(90deg) scaleY(-1);
}
.hero-cinema__face--bottom {
  transform: translateY(-245px) rotateX(-90deg) scaleY(-1);
}
.hero-cinema__text p {
  white-space: nowrap;
  overflow: hidden;
  font-family: "Bebas Neue", sans-serif;
  font-weight: 400;
  font-size: calc(6em + 13.3px);
  padding-top: 20px;
  margin: 0;
  color: #fff;
  line-height: 1;
}
.hero-cinema__text p span { color: #ff2d2d; }
.hero-cinema__face--left p {
  margin-left: 870px;
  animation: none;
  will-change: margin-left;
}
.hero-cinema__face--back p {
  margin-left: 0px;
  animation: none;
  will-change: margin-left;
}
.hero-cinema__face--right p {
  margin-left: -870px;
  animation: none;
  will-change: margin-left;
}
.hero-cinema__reflect {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 380px;
  filter: blur(10px);
  z-index: 1; /* reflection also behind boy */
  pointer-events: none;
}
.hero-cinema__reflect .hero-cinema__cube {
  perspective-origin: 51% -30%;
}
.hero-cinema__reflect .hero-cinema__face--back {
  transform: translateZ(-435px) rotateY(180deg) scaleX(-1) scaleY(-1);
}
.hero-cinema__reflect .hero-cinema__face--left {
  transform: translateX(-435px) rotateY(-90deg) scaleX(-1) scaleY(-1);
}
.hero-cinema__reflect .hero-cinema__face--right {
  transform: translateX(435px) rotateY(90deg) scaleX(-1) scaleY(-1);
}
.hero-cinema__reflect p {
  transform: scaleY(0.7);
}

@keyframes heroCinemaLeft {
  100% { margin-left: -220000px; }
}
@keyframes heroCinemaBack {
  100% { margin-left: -221000px; }
}
@keyframes heroCinemaRight {
  100% { margin-left: -222000px; }
}
@keyframes heroCinemaHue {
  0%, 100% { filter: hue-rotate(0deg); }
  50% { filter: hue-rotate(100deg); }
}
@keyframes heroCinemaZoom {
  0% { transform: scale(1); }
  100% { transform: scale(2.5); }
}
@keyframes heroCinemaBlur {
  0% { filter: blur(0px); }
  100% { filter: blur(3px); }
}
@keyframes heroCinemaBrightness {
  0% { filter: brightness(1) contrast(1); }
  100% { filter: brightness(0.8) contrast(1.3); }
}

.hero-cinema.is-idle .hero-cinema__stage,
.hero-cinema.is-idle .hero-cinema__zoom,
.hero-cinema.is-idle .hero-cinema__hue {
  animation-play-state: paused !important;
}
.hero-cinema.is-idle .hero-cinema__text {
  opacity: 0;
  transition: opacity 0.6s ease;
}
.hero-cinema:not(.is-idle) .hero-cinema__text {
  opacity: 1;
  transition: opacity 0.6s ease;
}

@media (prefers-reduced-motion: reduce) {
  .hero-cinema__stage,
  .hero-cinema__zoom,
  .hero-cinema__hue.animated,
  .hero-cinema__face--left p,
  .hero-cinema__face--back p,
  .hero-cinema__face--right p {
    animation: none !important;
  }
  .hero-cinema.is-idle .hero-cinema__text,
  .hero-cinema:not(.is-idle) .hero-cinema__text { opacity: 1; }
}


.landing__kicker {
  font-size: 13px; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: rgba(244,241,234,0.55);
  margin-bottom: 22px;
}
.landing__headline {
  font-family: var(--font-display);
  font-size: clamp(48px, 9vw, 104px);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.045em;
  color: #f4f1ea;
  margin: 0 0 28px;
}
.landing__headline .line {
  display: block;
}
.landing__subtitle {
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.55;
  color: rgba(244,241,234,0.62);
  max-width: 440px;
  margin: 0 0 36px;
  font-weight: 400;
}
.landing__ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.landing__cta-primary {
  height: 50px; padding: 0 26px; border-radius: 10px;
  font-size: 14px; font-weight: 650;
  background: #f4f1ea; color: #080809;
  transition: background 0.2s, box-shadow 0.25s;
  will-change: transform;
}
.landing__cta-primary:hover { background: #fff; box-shadow: 0 12px 32px rgba(0,0,0,0.35); }
.landing__cta-secondary {
  height: 50px; padding: 0 26px; border-radius: 10px;
  font-size: 14px; font-weight: 650;
  background: transparent; color: #f4f1ea;
  border: 1px solid rgba(244,241,234,0.22);
  transition: border-color 0.2s, background 0.2s, box-shadow 0.25s;
  will-change: transform;
}
.landing__cta-secondary:hover {
  border-color: rgba(244,241,234,0.5);
  background: rgba(255,255,255,0.04);
  box-shadow: 0 10px 28px rgba(0,0,0,0.25);
}

.scroll-hint {
  position: absolute; right: clamp(20px, 5vw, 72px); bottom: 40px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  color: rgba(244,241,234,0.4); font-size: 10px; font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase;
}
.scroll-hint__line {
  width: 1px; height: 48px;
  background: linear-gradient(180deg, rgba(244,241,234,0.5), transparent);
  animation: scrollLine 2.2s ease-in-out infinite;
}
@keyframes scrollLine {
  0%,100% { transform: scaleY(0.35); transform-origin: top; opacity: 0.5; }
  50% { transform: scaleY(1); transform-origin: top; opacity: 1; }
}

/* ── Stats ── */
.mm-stats {
  padding: clamp(64px, 10vh, 120px) clamp(20px, 5vw, 72px);
  border-top: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.mm-stats__row {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
}
.stat { text-align: left; }
.stat__num {
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 800; letter-spacing: -0.04em;
  line-height: 1; color: #f4f1ea;
}
.stat__num span { color: var(--landing-accent); }
.stat__label {
  margin-top: 10px; font-size: 13px; font-weight: 500;
  color: var(--landing-mist); letter-spacing: 0.02em;
}

/* ── Sticky scroll story (pin + progress) ── */
.sticky-story {
  position: relative;
  background: var(--landing-ink);
}
.sticky-story__track {
  height: 720vh; /* scroll runway — 12 steps over ~6.2 viewports */
  position: relative;
}
.sticky-story__pin {
  height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.sticky-story__frame {
  width: min(920px, calc(100% - 40px));
  height: min(640px, calc(100vh - 100px));
  display: grid;
  grid-template-rows: auto 1fr auto;
  grid-template-columns: 1fr;
  gap: 18px;
  position: relative;
  padding: 28px 28px 22px;
  border-radius: 20px;
  background: #0c0c0e;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 40px 100px -40px rgba(0,0,0,0.75);
}
.sticky-story__top {
  display: flex; align-items: center; gap: 16px;
}
.sticky-story__kicker {
  font-size: 12px; font-weight: 650; letter-spacing: 0.14em;
  text-transform: uppercase; color: rgba(244,241,234,0.45);
  white-space: nowrap; margin: 0;
}
.sticky-story__progress {
  flex: 1; height: 3px; border-radius: 99px;
  background: rgba(255,255,255,0.08); overflow: hidden;
}
.sticky-story__bar {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, #5865f2, #a5b4ff);
  border-radius: inherit;
  will-change: width;
}
.sticky-story__count {
  font-family: var(--font-mono); font-size: 12px;
  color: rgba(244,241,234,0.45); white-space: nowrap;
}
.sticky-story__count span { color: #f4f1ea; font-weight: 700; }

.sticky-story__center {
  display: flex; align-items: center; justify-content: center;
  min-height: 0; position: relative;
}
.sticky-story__card {
  text-align: center;
  max-width: 560px;
  width: 100%;
  will-change: transform, opacity;
}
.sticky-story__idx {
  font-family: var(--font-mono); font-size: 13px; font-weight: 600;
  color: var(--landing-accent); letter-spacing: 0.08em;
  margin-bottom: 16px;
}
.sticky-story__title {
  font-family: var(--font-display);
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 800; letter-spacing: -0.04em;
  line-height: 0.95; color: #f4f1ea;
  margin: 0 0 16px;
}
.sticky-story__desc {
  font-size: clamp(15px, 1.8vw, 17px);
  line-height: 1.55; color: var(--landing-mist);
  margin: 0 auto 28px; max-width: 42ch;
}
.sticky-story__console {
  text-align: left;
  margin: 0 auto;
  max-width: 440px;
  padding: 16px 18px;
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  font-family: var(--font-mono); font-size: 12.5px; line-height: 1.7;
}
.sticky-line { display: flex; gap: 10px; color: rgba(244,241,234,0.7); }
.sticky-line span { flex-shrink: 0; opacity: 0.45; min-width: 0.9em; }
.sticky-line--cmd { color: #f4f1ea; }
.sticky-line--cmd span { color: rgba(244,241,234,0.35); }
.sticky-line--ok { color: #57f287; }
.sticky-line--ok span { color: #57f287; opacity: 1; }
.sticky-line--warn { color: #febc2e; }
.sticky-line--dim { color: rgba(244,241,234,0.35); }

.sticky-story__rail {
  display: flex; flex-wrap: wrap; gap: 6px;
  justify-content: center;
  max-width: 100%;
}
.sticky-story__dot {
  appearance: none; cursor: pointer;
  height: 28px; padding: 0 10px; border-radius: 8px;
  font-size: 11px; font-weight: 600;
  color: rgba(244,241,234,0.35);
  background: rgba(255,255,255,0.03);
  border: 1px solid transparent;
  transition: color 0.25s, background 0.25s, border-color 0.25s, transform 0.25s;
  white-space: nowrap;
}
.sticky-story__dot.is-active {
  color: #f4f1ea;
  background: rgba(88,101,242,0.18);
  border-color: rgba(88,101,242,0.35);
  transform: translateY(-1px);
}
.sticky-story__dot.is-done {
  color: rgba(87,242,135,0.85);
}
.sticky-story__dot:hover {
  color: #f4f1ea;
  background: rgba(255,255,255,0.07);
  transform: translateY(-1px);
}
.sticky-story__dot:focus-visible {
  outline: 2px solid rgba(88,101,242,0.7);
  outline-offset: 2px;
}

.sticky-story__hint {
  position: absolute; bottom: -36px; left: 50%; transform: translateX(-50%);
  font-size: 11px; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: rgba(244,241,234,0.3);
  margin: 0; white-space: nowrap;
  pointer-events: none;
}

.sticky-story__card.is-swap {
  animation: stickySwap 0.35s var(--ease-out);
}
@keyframes stickySwap {
  from { opacity: 0.35; transform: translateY(18px) scale(0.98); filter: blur(4px); }
  to { opacity: 1; transform: none; filter: none; }
}

@media (max-width: 900px) {
  .sticky-story__track { height: 560vh; }
  .sticky-story__frame {
    height: min(580px, calc(100vh - 80px));
    padding: 20px 16px 16px;
  }
  .sticky-story__rail { max-height: 72px; overflow: hidden; }
  .sticky-story__dot { font-size: 10px; height: 24px; padding: 0 8px; }
  .sticky-story__hint { display: none; }
}

/* ── Section heads ── */
.landing__section {
  padding: clamp(80px, 12vh, 140px) clamp(20px, 5vw, 72px);
  max-width: 1200px; margin: 0 auto;
}
.mm-section-head { margin-bottom: clamp(40px, 6vh, 64px); max-width: 700px; }
.mm-section-head__title {
  font-family: var(--font-display);
  font-size: clamp(40px, 7vw, 80px);
  font-weight: 800; line-height: 0.95;
  letter-spacing: -0.04em; color: #f4f1ea;
  margin: 0 0 18px;
}
.mm-section-head__title em {
  font-style: italic; font-weight: 700;
  color: var(--landing-accent);
}
.mm-section-head__sub {
  font-size: 16px; color: var(--landing-mist); line-height: 1.5;
  max-width: 400px;
}

/* legacy title hooks (unused but safe) */
.landing__section-title { font-family: var(--font-display); font-size: clamp(32px, 5vw, 56px); font-weight: 800; }
.landing__section-sub { color: var(--landing-mist); }

/* ── Showcase ── */
.showcase { max-width: 1100px; }
.showcase__mockup {
  border-radius: 16px; overflow: hidden;
  background: #101012;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 40px 100px -40px rgba(0,0,0,0.8);
  transform-style: preserve-3d;
  transition: box-shadow 0.35s;
}
.showcase__mockup.is-tilting {
  box-shadow: 0 50px 120px -30px rgba(0,0,0,0.85), 0 0 0 1px rgba(88,101,242,0.15);
}
.showcase__mockup-bar {
  display: flex; align-items: center; gap: 8px; padding: 14px 18px;
  background: rgba(255,255,255,0.03); border-bottom: 1px solid rgba(255,255,255,0.06);
}
.showcase__mockup-bar span { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.12); }
.showcase__mockup-bar span:nth-child(1) { background: #ff5f57; }
.showcase__mockup-bar span:nth-child(2) { background: #febc2e; }
.showcase__mockup-bar span:nth-child(3) { background: #28c840; }
.showcase__mockup-url { margin-left: 14px; font-size: 11px; color: var(--landing-mist); font-family: var(--font-mono); }
.showcase__mockup-body { display: flex; min-height: 340px; }
.showcase__sidebar {
  flex: 0 0 180px; padding: 16px 12px;
  border-right: 1px solid rgba(255,255,255,0.06);
  display: flex; flex-direction: column; gap: 2px;
  background: rgba(0,0,0,0.25);
}
.showcase__sidebar-item {
  padding: 10px 12px; border-radius: 8px; font-size: 13px; font-weight: 500;
  color: var(--landing-mist); cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.showcase__sidebar-item:hover { color: #fff; background: rgba(255,255,255,0.04); }
.showcase__sidebar-item.active {
  background: rgba(88,101,242,0.18); color: #fff;
}
.showcase__content { flex: 1; padding: 24px; }

.console-panel { display: flex; flex-direction: column; gap: 14px; }
.console-panel__title {
  font-family: var(--font-display); font-size: 18px; font-weight: 700;
  letter-spacing: -0.02em; color: #f4f1ea;
}
.console-panel__desc { font-size: 13px; color: var(--landing-mist); line-height: 1.5; }
.console-input-row { display: flex; gap: 10px; }
.console-input {
  flex: 1; height: 42px; padding: 0 14px; border-radius: 10px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1);
  color: #fff; font-size: 13px; font-family: var(--font-mono);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.console-input:focus {
  border-color: rgba(88,101,242,0.55);
  box-shadow: 0 0 0 3px rgba(88,101,242,0.15);
}
.console-input::placeholder { color: rgba(255,255,255,0.28); }
.console-btn {
  height: 42px; padding: 0 18px; border-radius: 10px;
  font-size: 13px; font-weight: 650;
  background: #f4f1ea; color: #080809;
  transition: transform 0.2s, opacity 0.2s;
}
.console-btn:hover { transform: translateY(-1px); }
.console-btn:disabled { opacity: 0.5; pointer-events: none; }

.console-result { margin-top: 4px; }
.console-result__card {
  padding: 18px; border-radius: 12px;
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08);
  animation: consoleResultIn 0.4s var(--ease-out);
}
@keyframes consoleResultIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.console-result__row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.05);
}
.console-result__row:last-child { border-bottom: none; }
.console-result__label { font-size: 11px; font-weight: 600; color: var(--landing-mist); letter-spacing: 0.06em; text-transform: uppercase; }
.console-result__value { font-size: 13px; font-weight: 600; color: #fff; font-family: var(--font-mono); }
.console-result__value.muted { color: var(--landing-mist); }
.console-result__error {
  padding: 14px; border-radius: 10px;
  background: rgba(255,80,80,0.08); border: 1px solid rgba(255,80,80,0.2);
  color: rgba(255,140,140,0.95); font-size: 12px; font-weight: 600;
}
.lookup-fallback-link {
  display: inline-flex; align-items: center; gap: 4px;
  margin-top: 8px; padding: 8px 14px; border-radius: 8px;
  background: rgba(88,101,242,0.15); border: 1px solid rgba(88,101,242,0.3);
  color: #a5b4ff; font-size: 12px; font-weight: 650; text-decoration: none;
}
.lookup-fallback-link:hover { background: rgba(88,101,242,0.25); }
.console-result__loading { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--landing-mist); }
.console-result__spinner {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.15); border-top-color: var(--landing-accent);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.console-locked {
  display: flex; align-items: center; justify-content: center;
  min-height: 200px; font-size: 14px; font-weight: 600; color: var(--landing-mist);
  background: rgba(255,255,255,0.02); border-radius: 12px;
  border: 1px dashed rgba(255,255,255,0.1);
}

/* lookup card styles preserved */
.lookup-card-wrap { padding-top: 0; padding-bottom: 0; }
.lookup-card {
  position: relative; border-radius: 12px; overflow: hidden;
  border: 1px solid rgba(0,0,0,0.12);
  box-shadow: 0 20px 60px -15px rgba(0,0,0,0.5);
}
.lookup-banner { height: 80px; background-size: cover; background-position: center top; }
.lookup-body { padding: 14px; }
.lookup-profile { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; margin-top: -28px; }
.lookup-avatar-wrap { position: relative; flex-shrink: 0; width: 56px; height: 56px; }
.lookup-avatar { width: 56px; height: 56px; border-radius: 50%; border: 3px solid rgba(0,0,0,0.3); object-fit: cover; }
.lookup-avatar-deco { position: absolute; top: -12px; left: -12px; width: 80px; height: 80px; pointer-events: none; z-index: 2; }
.lookup-name-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 2px; }
.lookup-tag { font-size: 10px; font-weight: 800; padding: 2px 7px; border-radius: 4px; border: 1px solid; }
.lookup-tag--clan { background: rgba(0,0,0,0.2); border-color: rgba(0,0,0,0.3); }
.lookup-info { flex: 1; min-width: 0; }
.lookup-name { font-size: 15px; font-weight: 800; }
.lookup-name.has-namestyle {
  color: inherit !important;
  -webkit-text-fill-color: unset;
}
.lookup-username { font-size: 12px; font-weight: 600; margin-top: 2px; }
.lookup-id { font-size: 11px; font-weight: 600; font-family: var(--font-mono); margin-top: 4px; }
.lookup-badges { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 14px; }
.lookup-badge-icon { width: 24px; height: 24px; object-fit: contain; }
.lookup-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid; gap: 8px; }
.lookup-row:last-child { border-bottom: none; }
.lookup-row--bio { align-items: flex-start; }
.lookup-card--dark .lookup-name { color: #ffffff; }
.lookup-card--dark .lookup-username { color: rgba(255,255,255,0.7); }
.lookup-card--dark .lookup-id { color: rgba(255,255,255,0.5); }
.lookup-card--dark .lookup-label { color: rgba(255,255,255,0.5); }
.lookup-card--dark .lookup-value { color: #ffffff; }
.lookup-card--dark .lookup-value--bio { color: rgba(255,255,255,0.9); }
.lookup-card--dark .lookup-tag { background: rgba(255,255,255,0.12); color: #ffffff; border-color: rgba(255,255,255,0.2); }
.lookup-card--dark .lookup-tag--clan { background: rgba(88,101,242,0.25); border-color: rgba(88,101,242,0.5); }
.lookup-card--dark .lookup-row { border-bottom-color: rgba(255,255,255,0.08); }
.lookup-card--light .lookup-name { color: #000000; }
.lookup-card--light .lookup-username { color: rgba(0,0,0,0.7); }
.lookup-card--light .lookup-id { color: rgba(0,0,0,0.5); }
.lookup-card--light .lookup-label { color: rgba(0,0,0,0.6); }
.lookup-card--light .lookup-value { color: #000000; }
.lookup-card--light .lookup-value--bio { color: rgba(0,0,0,0.85); }
.lookup-card--light .lookup-tag { background: rgba(0,0,0,0.12); color: #000000; border-color: rgba(0,0,0,0.2); }
.lookup-card--light .lookup-tag--clan { background: rgba(0,0,0,0.2); border-color: rgba(0,0,0,0.3); }
.lookup-card--light .lookup-row { border-bottom-color: rgba(0,0,0,0.1); }
.lookup-label { font-size: 11px; font-weight: 800; letter-spacing: 0.5px; text-transform: uppercase; flex-shrink: 0; }
.lookup-value { font-size: 12px; font-weight: 700; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lookup-value--bio { white-space: normal; text-align: left; font-size: 12px; font-weight: 700; line-height: 1.4; max-height: 3em; overflow: hidden; }
.lookup-effect { color: #ffd700; }
.lookup-nameplate { height: 22px; width: auto; object-fit: contain; border-radius: 4px; vertical-align: middle; }
.lookup-connections { display: flex; flex-direction: row; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.lookup-conn {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 8px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.06);
  text-decoration: none; color: inherit;
}
.lookup-conn:hover { background: rgba(255,255,255,0.12); }
.lookup-conn__logo { width: 20px; height: 20px; object-fit: contain; }
.lookup-conn__fallback { width: 20px; height: 20px; display: none; align-items: center; justify-content: center; font-size: 14px; }
.lookup-conn__name { display: none; }
.lookup-tag__icon { width: 16px; height: 16px; border-radius: 3px; object-fit: cover; vertical-align: middle; margin-right: 4px; }
.lookup-tag { display: inline-flex; align-items: center; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 4px; background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.8); margin-left: 6px; }
.lookup-tag--guild { background: rgba(88,101,242,0.15); }
.lookup-guild-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.lookup-guild-badge { display: flex; align-items: center; gap: 4px; }
.lookup-guild-badge__icon { width: 20px; height: 20px; border-radius: 4px; object-fit: cover; }

.sql-spoiler-blur {
  position: relative; margin-top: 14px; border-radius: 10px; overflow: hidden;
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08);
}
.sql-spoiler-blur__title {
  padding: 10px 14px; font-size: 12px; font-weight: 700; color: var(--landing-mist);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.sql-spoiler-blur__content { padding: 12px 14px; }
.sql-spoiler-blur__row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; }
.sql-spoiler-blur__label { font-size: 11px; font-weight: 700; color: var(--landing-mist); letter-spacing: 1px; text-transform: uppercase; }
.sql-spoiler-blur__value { font-size: 13px; font-weight: 600; color: #fff; font-family: var(--font-mono); }

/* ── How steps ── */
.mm-steps {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px;
}
.mm-step {
  padding: 28px 0 0;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.mm-step__num {
  font-family: var(--font-mono); font-size: 12px; font-weight: 500;
  color: var(--landing-accent); margin-bottom: 20px; letter-spacing: 0.06em;
}
.mm-step__title {
  font-family: var(--font-display); font-size: 28px; font-weight: 750;
  letter-spacing: -0.03em; margin-bottom: 10px; color: #f4f1ea;
}
.mm-step__desc { font-size: 15px; color: var(--landing-mist); line-height: 1.5; }

/* legacy steps */
.steps { display: none; }

/* ── FAQ ── */
.faq-list { max-width: 720px; }
.faq-item {
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding: 26px 0;
}
.faq-item__q {
  font-family: var(--font-display); font-size: 20px; font-weight: 700;
  letter-spacing: -0.02em; margin-bottom: 10px; color: #f4f1ea;
}
.faq-item__a { font-size: 15px; color: var(--landing-mist); line-height: 1.6; }

/* ── Pricing ── */
.pricing-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
.pricing-card {
  position: relative; padding: 32px 28px; border-radius: 16px;
  background: #101012; border: 1px solid rgba(255,255,255,0.08);
  transition: border-color 0.25s, box-shadow 0.3s;
  transform-style: preserve-3d;
}
.pricing-card:hover { border-color: rgba(255,255,255,0.18); box-shadow: 0 24px 50px rgba(0,0,0,0.45); }
.pricing-card.popular {
  border-color: rgba(88,101,242,0.45);
  background: linear-gradient(180deg, rgba(88,101,242,0.12), #101012 50%);
}
.pricing-card.popular::after {
  content: 'Popular';
  position: absolute; inset: 18px 18px auto auto;
  font-size: 11px; font-weight: 650; letter-spacing: 0.04em;
  padding: 4px 10px; border-radius: 6px;
  background: var(--landing-accent); color: #fff;
  transform: none; width: auto; height: auto; z-index: 2;
}
.pricing-card__name {
  font-size: 12px; font-weight: 650; color: var(--landing-mist);
  letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 14px;
}
.pricing-card__price {
  font-family: var(--font-display); font-size: 40px; font-weight: 800;
  letter-spacing: -0.03em; margin-bottom: 8px; color: #f4f1ea;
}
.pricing-card__price span { font-size: 14px; color: var(--landing-mist); font-weight: 500; }
.pricing-card__desc { font-size: 14px; color: var(--landing-mist); margin-bottom: 24px; line-height: 1.5; }
.pricing-card__features { list-style: none; margin-bottom: 28px; }
.pricing-card__features li {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; color: #f4f1ea; margin-bottom: 12px;
}
.pricing-card__features li::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--landing-accent); flex-shrink: 0;
}
.pricing-card__btn {
  width: 100%; height: 46px; border-radius: 10px; font-size: 14px; font-weight: 650;
  display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none; box-sizing: border-box;
}
.pricing-card__btn--primary {
  background: #f4f1ea; color: #080809;
  transition: transform 0.2s, background 0.2s;
}
.pricing-card__btn--primary:hover { transform: translateY(-1px); background: #fff; }
.pricing-card__btn--secondary {
  background: transparent; border: 1px solid rgba(255,255,255,0.14); color: #f4f1ea;
  transition: border-color 0.2s, background 0.2s;
}
.pricing-card__btn--secondary:hover {
  border-color: rgba(255,255,255,0.3); background: rgba(255,255,255,0.04);
}

/* ── Final CTA ── */
.mm-cta {
  text-align: left;
  padding: clamp(100px, 16vh, 180px) clamp(20px, 5vw, 72px);
  max-width: 1100px; margin: 0 auto;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.mm-cta__title {
  font-family: var(--font-display);
  font-size: clamp(48px, 9vw, 96px);
  font-weight: 800; line-height: 0.95;
  letter-spacing: -0.045em; margin: 0 0 20px; color: #f4f1ea;
}
.mm-cta__sub {
  font-size: 17px; color: var(--landing-mist);
  margin-bottom: 36px; max-width: 400px; line-height: 1.5;
}

.landing__footer {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start;
  gap: 8px 10px;
  padding: 36px clamp(20px, 5vw, 72px) 56px;
  color: rgba(244,241,234,0.35); font-size: 13px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.landing__footer-brand { color: rgba(244,241,234,0.7); font-weight: 600; }
.landing__footer-sep { opacity: 0.4; }
.landing__footer-link { color: #f4f1ea; text-decoration: none; font-weight: 500; }
.landing__footer-link:hover { color: var(--landing-accent); }

.back-to-landing {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 20px;
  color: var(--text-dim); font-size: 12px; font-weight: 700;
  background: none; cursor: pointer; transition: color 0.2s;
}
.back-to-landing:hover { color: var(--accent); }

.glass-card:hover {
  transform: translateY(-2px);
  border-color: rgba(var(--theme-accent-rgb), 0.2);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3), 0 0 0 1px rgba(var(--theme-accent-rgb), 0.08) inset;
}
.sidebar > .profile.glass-card:hover {
  transform: none;
  box-shadow: var(--shadow-card);
}

/* Theme switcher (app) */
.theme-switcher { display: flex; flex-direction: column; gap: 8px; padding: 8px 8px 12px; margin-top: 4px; }
.theme-switcher__label { font-size: 9px; font-weight: 800; color: var(--text-faint); letter-spacing: 2px; }
.theme-switcher__modes { display: flex; gap: 6px; }
.theme-mode-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 5px;
  height: 32px; border-radius: var(--r-sm); border: 1px solid var(--border);
  background: var(--bg-input); color: var(--text-dim); font-size: 10px; font-weight: 700;
  cursor: pointer; transition: all var(--dur-fast);
}
.theme-mode-btn:hover { border-color: rgba(var(--theme-accent-rgb), 0.3); color: var(--text); }
.theme-mode-btn.active { background: rgba(var(--theme-accent-rgb), 0.15); border-color: rgba(var(--theme-accent-rgb), 0.35); color: var(--theme-accent); }
.theme-mode-btn__icon { font-size: 12px; }
.theme-color-picker-row { display: flex; align-items: center; gap: 8px; }
.theme-color-picker {
  width: 32px; height: 32px; border-radius: var(--r-sm); border: 2px solid var(--border);
  cursor: pointer; background: none; padding: 0; overflow: hidden;
}
.theme-color-picker:hover { border-color: rgba(var(--theme-accent-rgb), 0.4); }
.theme-color-picker::-webkit-color-swatch-wrapper { padding: 0; }
.theme-color-picker::-webkit-color-swatch { border: none; border-radius: 6px; }
.theme-color-presets { display: flex; gap: 5px; flex: 1; flex-wrap: wrap; }
.theme-color-preset {
  width: 22px; height: 22px; border-radius: 6px; border: 2px solid transparent;
  cursor: pointer; transition: transform var(--dur-fast), border-color var(--dur-fast);
}
.theme-color-preset:hover { transform: scale(1.15); }
.theme-color-preset.active { border-color: var(--text); transform: scale(1.1); }

@media (max-width: 900px) {
  .mm-stats__row { grid-template-columns: 1fr 1fr; gap: 32px 20px; }
  .mm-steps { grid-template-columns: 1fr; gap: 20px; }
  .pricing-grid { grid-template-columns: 1fr; }
  .showcase__mockup-body { flex-direction: column; }
  .showcase__sidebar {
    flex: 0 0 auto; flex-direction: row; flex-wrap: wrap;
    border-right: none; border-bottom: 1px solid rgba(255,255,255,0.06);
  }
}
@media (max-width: 768px) {
  .web-nav__links { display: none; }
  .web-nav { padding: 0 18px; }
  .scroll-hint { display: none; }
  .landing__hero { align-items: center; padding-bottom: 64px; }
  .landing__hero--cinema { padding-bottom: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .scroll-hint__line { animation: none; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .tilt-3d, .mag-btn { transform: none !important; }
}

/* ── 3D tilt + shine + ripple (landing polish) ── */
.tilt-3d {
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.45s var(--ease-out);
}
.tilt-3d.is-tilting { transition: transform 0.08s linear; will-change: transform; }
/* Shine uses ::before so cards keep ::after free for their own badges. */
.tilt-3d::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(
    420px circle at var(--shine-x, 50%) var(--shine-y, 50%),
    rgba(255,255,255,0.12),
    transparent 55%
  );
  transition: opacity 0.3s;
  z-index: 2;
}
.tilt-3d.is-tilting::before { opacity: 1; }
.tilt-3d > * { position: relative; z-index: 1; }

.mag-btn { will-change: transform; transition: transform 0.25s var(--ease-out), background 0.2s, box-shadow 0.25s, border-color 0.2s; }

.landing__cta-primary,
.landing__cta-secondary,
.pricing-card__btn,
.console-btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.ripple {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  transform: scale(0);
  opacity: 0.55;
  animation: rippleOut 0.55s var(--ease-out) forwards;
  z-index: 5;
}
@keyframes rippleOut {
  to { transform: scale(2.2); opacity: 0; }
}

.mm-step {
  transition: transform 0.35s var(--ease-out), border-color 0.3s;
}
.mm-step:hover {
  transform: translateY(-4px);
  border-top-color: rgba(88,101,242,0.45);
}

.faq-item {
  transition: transform 0.3s var(--ease-out), padding 0.3s;
}
.faq-item:hover { transform: translateX(6px); }

/* CSS Scroll-driven Animations — light progressive enhancement (no GSAP conflict) */
@supports (animation-timeline: view()) {
  .landing__footer {
    animation: viewRise linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 40%;
  }
  @keyframes viewRise {
    from { opacity: 0.2; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

@media (hover: none), (pointer: coarse) {
  .tilt-3d.is-tilting { transform: none !important; }
  .tilt-3d::before { display: none; }
  .mag-btn { transform: none !important; }
}

/* =============================================================================
   HypeSquad
   ============================================================================= */
.hs-status { display: flex; align-items: center; gap: 14px; padding: 16px 20px; margin-bottom: 20px; border-radius: var(--r-lg); }
.hs-status__icon { font-size: 24px; flex-shrink: 0; }
.hs-status__text { font-size: 14px; color: var(--text-dim); }
.hs-status__text b { font-weight: 800; }

.hs-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 8px; }
.hs-card {
  position: relative; padding: 24px 20px; border-radius: var(--r-lg);
  display: flex; flex-direction: column; align-items: center; text-align: center;
  overflow: hidden; transition: transform 0.3s var(--ease-out), border-color 0.3s, box-shadow 0.3s;
}
.hs-card__glow {
  position: absolute; top: -40px; left: 50%; transform: translateX(-50%);
  width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--hs-rgb), 0.15), transparent 70%);
  pointer-events: none; transition: opacity 0.3s;
}
.hs-card:hover { transform: translateY(-4px); border-color: rgba(var(--hs-rgb), 0.4); box-shadow: 0 16px 40px rgba(0,0,0,0.3), 0 0 0 1px rgba(var(--hs-rgb), 0.1) inset; }
.hs-card:hover .hs-card__glow { opacity: 1.5; }
.hs-card--active { border-color: rgba(var(--hs-rgb), 0.5); box-shadow: 0 0 24px rgba(var(--hs-rgb), 0.15), 0 0 0 1px rgba(var(--hs-rgb), 0.2) inset; }
.hs-card--active .hs-card__glow { opacity: 1.5; }

.hs-card__icon {
  width: 56px; height: 56px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; font-size: 26px; margin-bottom: 14px;
  background: rgba(var(--hs-rgb), 0.12); border: 2px solid rgba(var(--hs-rgb), 0.3);
  color: var(--hs-color); position: relative; z-index: 1;
  transition: transform 0.3s var(--ease-spring);
}
.hs-card__icon img { width: 32px; height: 32px; object-fit: contain; }
.hs-card:hover .hs-card__icon { transform: scale(1.1); }

.hs-card__name { font-family: var(--font-display); font-size: 16px; font-weight: 800; margin-bottom: 4px; position: relative; z-index: 1; }
.hs-card__tagline { font-size: 12px; font-weight: 700; color: var(--hs-color); margin-bottom: 10px; position: relative; z-index: 1; }
.hs-card__desc { font-size: 12px; color: var(--text-dim); line-height: 1.5; margin-bottom: 16px; position: relative; z-index: 1; }

.hs-card__badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 99px; border: 1px solid;
  font-size: 10px; font-weight: 800; letter-spacing: 0.5px;
  margin-bottom: 16px; position: relative; z-index: 1;
}
.hs-card__badge-icon { font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }
.hs-card__badge-icon img { width: 16px; height: 16px; object-fit: contain; }

.hs-card__btn {
  width: 100%; padding: 11px 16px; border-radius: var(--r-md);
  background: rgba(var(--hs-rgb), 0.15); border: 1px solid rgba(var(--hs-rgb), 0.3);
  color: var(--hs-color); font-size: 13px; font-weight: 800; cursor: pointer;
  transition: all 0.2s; position: relative; z-index: 1;
  font-family: var(--font-display);
}
.hs-card__btn:hover:not(:disabled) { background: rgba(var(--hs-rgb), 0.25); border-color: rgba(var(--hs-rgb), 0.5); transform: translateY(-1px); }
.hs-card__btn:active:not(:disabled) { transform: scale(0.97); }
.hs-card__btn:disabled { opacity: 0.7; cursor: not-allowed; }

.hs-leave-wrap { display: flex; justify-content: center; margin-top: 8px; }
.hs-leave-btn {
  padding: 10px 28px; border-radius: var(--r-md);
  background: rgba(251, 87, 115, 0.08); border: 1px solid rgba(251, 87, 115, 0.25);
  color: var(--red); font-size: 13px; font-weight: 700; cursor: pointer;
  transition: all 0.2s; font-family: var(--font-display);
}
.hs-leave-btn:hover:not(:disabled) { background: rgba(251, 87, 115, 0.15); border-color: var(--red); }
.hs-leave-btn:disabled { opacity: 0.5; cursor: not-allowed; }

@media (max-width: 900px) {
  .hs-grid { grid-template-columns: 1fr; }
}

/* =============================================================================
   Emoji Stealer
   ============================================================================= */
.emoji-input-wrap { padding: 0; margin-bottom: 0; border-radius: var(--r-lg); background: transparent; border: none; box-shadow: none; }
.emoji-input-row { display: flex; gap: 10px; margin-bottom: 10px; align-items: stretch; }
.emoji-input {
  flex: 1; min-width: 0; padding: 14px 16px; border-radius: var(--r-md);
  background: var(--bg-input); border: 1px solid var(--border);
  color: var(--text); font-size: 13px; font-family: var(--font-mono);
  color-scheme: var(--color-scheme);
  transition: border-color var(--dur), box-shadow var(--dur), background var(--dur);
}
.emoji-input:focus {
  outline: none;
  border-color: rgba(var(--theme-accent-rgb), 0.45);
  box-shadow: 0 0 0 3px rgba(var(--theme-accent-rgb), 0.08);
  background: var(--surface-2);
}
.emoji-input::placeholder { color: var(--text-faint); }

.emoji-fetch-btn {
  padding: 0 22px; min-width: 140px; height: 48px; border-radius: var(--r-md); white-space: nowrap;
  background: var(--btn-solid-bg); border: none;
  color: var(--btn-solid-fg); font-size: 13px; font-weight: 700; cursor: pointer;
  transition: all var(--dur-fast); flex-shrink: 0;
}
.emoji-fetch-btn:hover:not(:disabled) { filter: brightness(0.96); transform: translateY(-1px); }
.emoji-fetch-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.emoji-hint { font-size: 12px; color: var(--text-faint); }

.emoji-loading, .emoji-error {
  text-align: center; padding: 40px; font-size: 14px; color: var(--text-dim);
}
.emoji-error { color: var(--red); }

.emoji-stats {
  display: flex; align-items: center; gap: 24px; padding: 18px 24px;
  margin-bottom: 20px; border-radius: var(--r-lg); flex-wrap: wrap;
}
.emoji-stat { text-align: center; }
.emoji-stat__num { font-family: var(--font-display); font-size: 28px; font-weight: 800; color: var(--text); }
.emoji-stat__label { font-size: 11px; color: var(--text-dim); margin-top: 2px; }

.emoji-download-btn {
  margin-left: auto; display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: var(--r-md); cursor: pointer;
  background: rgba(var(--theme-accent-rgb), 0.15); border: 1px solid rgba(var(--theme-accent-rgb), 0.3);
  color: var(--theme-accent); font-size: 13px; font-weight: 800;
  transition: all 0.2s; font-family: var(--font-display);
}
.emoji-download-btn:hover:not(:disabled) { background: rgba(var(--theme-accent-rgb), 0.25); border-color: rgba(var(--theme-accent-rgb), 0.5); transform: translateY(-1px); }
.emoji-download-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.emoji-download-btn__icon { font-size: 16px; }

.emoji-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 12px;
}
.emoji-item {
  position: relative; padding: 12px 8px; border-radius: var(--r-md);
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  transition: all 0.2s;
}
.emoji-item:hover { border-color: rgba(var(--theme-accent-rgb), 0.3); background: rgba(255,255,255,0.06); transform: translateY(-2px); }
.emoji-item img { width: 48px; height: 48px; object-fit: contain; }
.emoji-item__name {
  font-size: 10px; color: var(--text-dim); text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.emoji-item__badge {
  position: absolute; top: 4px; right: 4px;
  font-size: 8px; font-weight: 800; padding: 2px 5px; border-radius: 4px;
  background: rgba(244, 123, 103, 0.2); color: #f47b67; border: 1px solid rgba(244, 123, 103, 0.3);
}

/* =============================================================================
   Badge Scanner
   ============================================================================= */
.badge-input-wrap { padding: 16px; margin-bottom: 16px; border-radius: var(--r-lg); }
.badge-input-row { display: flex; gap: 10px; margin-bottom: 16px; align-items: stretch; }
.badge-input {
  flex: 1; min-width: 0; padding: 14px 16px; border-radius: var(--r-md);
  background: var(--bg-input); border: 1px solid var(--border);
  color: var(--text); font-size: 13px; font-family: var(--font-mono);
  color-scheme: var(--color-scheme);
  transition: border-color var(--dur), box-shadow var(--dur), background var(--dur);
}
.badge-input:focus {
  outline: none;
  border-color: rgba(var(--theme-accent-rgb), 0.45);
  box-shadow: 0 0 0 3px rgba(var(--theme-accent-rgb), 0.08);
  background: var(--surface-2);
}
.badge-input::placeholder { color: var(--text-faint); }

.badge-scan-btn {
  padding: 0 22px; min-width: 120px; height: 48px; border-radius: var(--r-md); white-space: nowrap;
  background: var(--btn-solid-bg); border: none;
  color: var(--btn-solid-fg); font-size: 13px; font-weight: 700; cursor: pointer;
  transition: all var(--dur-fast); flex-shrink: 0;
}
.badge-scan-btn:hover:not(:disabled) { filter: brightness(0.96); transform: translateY(-1px); }
.badge-scan-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.badge-filter-wrap { margin-top: 4px; }
.badge-filter-label { font-size: 12px; color: var(--text-dim); margin-bottom: 10px; }
.badge-filter-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.badge-filter-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 99px; cursor: pointer;
  background: var(--surface-1); border: 1px solid var(--border);
  font-size: 12px; color: var(--text-dim); transition: all 0.2s; user-select: none;
}
.badge-filter-chip input { display: none; }
.badge-filter-chip:hover { border-color: rgba(var(--badge-color), 0.4); color: var(--text); }
.badge-filter-chip--active {
  background: rgba(var(--badge-color), 0.15); border-color: rgba(var(--badge-color), 0.5);
  color: var(--badge-color);
}
.badge-filter-chip__icon { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; }
.badge-filter-chip__icon img { width: 18px; height: 18px; object-fit: contain; }

.badge-stats {
  display: flex; gap: 24px; padding: 18px 24px; margin-bottom: 20px;
  border-radius: var(--r-lg); flex-wrap: wrap;
}
.badge-stat { text-align: center; }
.badge-stat__num { font-family: var(--font-display); font-size: 28px; font-weight: 800; color: var(--text); }
.badge-stat__label { font-size: 11px; color: var(--text-dim); margin-top: 2px; }

.badge-empty { text-align: center; padding: 40px; font-size: 14px; color: var(--text-dim); }

.badge-user-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; margin-bottom: 20px; }
.badge-user-card {
  display: flex; align-items: center; gap: 12px; padding: 14px;
  border-radius: var(--r-md); background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  transition: all 0.2s;
}
.badge-user-card:hover { border-color: rgba(var(--theme-accent-rgb), 0.3); background: rgba(255,255,255,0.06); }
.badge-user-card--removed { opacity: 0.4; }
.badge-user-card__avatar {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  background-size: cover; background-position: center; background-color: rgba(255,255,255,0.05);
}
.badge-user-card__info { flex: 1; min-width: 0; }
.badge-user-card__name { font-size: 14px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge-user-card__id { font-size: 11px; color: var(--text-faint); font-family: var(--font-mono); }
.badge-user-card__badges { display: flex; gap: 4px; margin-top: 4px; }
.badge-user-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 6px;
  background: rgba(var(--badge-color), 0.15); border: 1px solid rgba(var(--badge-color), 0.3);
  transition: transform 0.2s;
}
.badge-user-badge:hover { transform: scale(1.2); }
.badge-user-badge img { width: 18px; height: 18px; object-fit: contain; }
.badge-user-card__kick {
  padding: 8px 16px; border-radius: var(--r-sm); white-space: nowrap;
  background: rgba(251, 87, 115, 0.08); border: 1px solid rgba(251, 87, 115, 0.25);
  color: var(--red); font-size: 12px; font-weight: 700; cursor: pointer;
  transition: all 0.2s; font-family: var(--font-display);
}
.badge-user-card__kick:hover:not(:disabled) { background: rgba(251, 87, 115, 0.15); border-color: var(--red); }
.badge-user-card__kick:disabled { opacity: 0.5; cursor: not-allowed; }

.badge-console {
  margin-top: 20px; border-radius: var(--r-lg); overflow: hidden;
}
.badge-console__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; border-bottom: 1px solid var(--border);
  background: var(--surface-1);
}
.badge-console__title { font-size: 12px; font-weight: 700; color: var(--text-dim); font-family: var(--font-mono); }
.badge-console__clear {
  padding: 4px 10px; border-radius: var(--r-sm); font-size: 11px; cursor: pointer;
  background: rgba(255,255,255,0.05); border: 1px solid var(--border); color: var(--text-dim);
  transition: all 0.2s;
}
.badge-console__clear:hover { color: var(--text); border-color: rgba(255,255,255,0.2); }
.badge-console__body {
  max-height: 300px; overflow-y: auto; padding: 12px 16px;
  font-family: var(--font-mono); font-size: 12px; line-height: 1.6;
}
.badge-console__line { padding: 2px 0; }
.badge-console__time { color: var(--text-faint); }
.badge-console__line--info { color: var(--text-dim); }
.badge-console__line--ok { color: #43b581; }
.badge-console__line--err { color: var(--red); }
.badge-console__line--user { color: var(--text); }
.badge-console__line--user b { color: var(--theme-accent); }


/* =============================================================================
   Nick Generator
   ============================================================================= */
.nickgen-config { padding: 20px; margin-bottom: 20px; border-radius: var(--r-lg); }
.nickgen-config__row { display: flex; gap: 24px; margin-bottom: 16px; flex-wrap: wrap; }
.nickgen-field { flex: 1; min-width: 200px; }
.nickgen-field__label { display: block; font-size: 12px; color: var(--text-dim); margin-bottom: 8px; font-weight: 700; }

.nickgen-length-grid { display: flex; gap: 8px; flex-wrap: wrap; }
.nickgen-length-chip {
  display: inline-flex; align-items: center; padding: 8px 16px; border-radius: var(--r-md);
  cursor: pointer; background: var(--surface-1); border: 1px solid var(--border);
  font-size: 13px; color: var(--text-dim); transition: all 0.2s; user-select: none;
}
.nickgen-length-chip input { display: none; }
.nickgen-length-chip:hover { border-color: rgba(var(--theme-accent-rgb), 0.3); color: var(--text); }
.nickgen-length-chip.active {
  background: rgba(var(--theme-accent-rgb), 0.15); border-color: rgba(var(--theme-accent-rgb), 0.5);
  color: var(--theme-accent);
}

.nickgen-style-grid { display: flex; gap: 8px; flex-wrap: wrap; }
.nickgen-style-chip {
  display: inline-flex; align-items: center; padding: 8px 16px; border-radius: var(--r-md);
  cursor: pointer; background: var(--surface-1); border: 1px solid var(--border);
  font-size: 13px; color: var(--text-dim); transition: all 0.2s; user-select: none;
}
.nickgen-style-chip input { display: none; }
.nickgen-style-chip:hover { border-color: rgba(var(--theme-accent-rgb), 0.3); color: var(--text); }
.nickgen-style-chip.active {
  background: rgba(var(--theme-accent-rgb), 0.15); border-color: rgba(var(--theme-accent-rgb), 0.5);
  color: var(--theme-accent);
}

.nickgen-toggle-grid { display: flex; gap: 8px; flex-wrap: wrap; }
.nickgen-toggle-chip {
  display: inline-flex; align-items: center; padding: 8px 16px; border-radius: var(--r-md);
  cursor: pointer; background: var(--surface-1); border: 1px solid var(--border);
  font-size: 13px; color: var(--text-dim); transition: all 0.2s; user-select: none;
}
.nickgen-toggle-chip input { display: none; }
.nickgen-toggle-chip:hover { border-color: rgba(var(--theme-accent-rgb), 0.3); color: var(--text); }
.nickgen-toggle-chip.active {
  background: rgba(var(--theme-accent-rgb), 0.15); border-color: rgba(var(--theme-accent-rgb), 0.5);
  color: var(--theme-accent);
}

.nickgen-sep-grid { display: flex; gap: 8px; flex-wrap: wrap; }
.nickgen-sep-chip {
  display: inline-flex; align-items: center; padding: 8px 16px; border-radius: var(--r-md);
  cursor: pointer; background: var(--surface-1); border: 1px solid var(--border);
  font-size: 14px; color: var(--text-dim); transition: all 0.2s; user-select: none;
  font-family: var(--font-mono);
}
.nickgen-sep-chip input { display: none; }
.nickgen-sep-chip:hover { border-color: rgba(var(--theme-accent-rgb), 0.3); color: var(--text); }
.nickgen-sep-chip.active {
  background: rgba(var(--theme-accent-rgb), 0.15); border-color: rgba(var(--theme-accent-rgb), 0.5);
  color: var(--theme-accent);
}

.nickgen-count-input {
  width: 80px; padding: 10px 12px; border-radius: var(--r-md);
  background: var(--bg-input); border: 1px solid var(--border);
  color: var(--text); font-size: 14px; font-family: var(--font-mono);
  color-scheme: var(--color-scheme);
}
.nickgen-count-input:focus {
  outline: none;
  border-color: rgba(var(--theme-accent-rgb), 0.45);
  box-shadow: 0 0 0 3px rgba(var(--theme-accent-rgb), 0.08);
}

.nickgen-actions { display: flex; gap: 12px; margin-top: 8px; }
.nickgen-btn {
  padding: 0 22px; height: 46px; border-radius: var(--r-md); white-space: nowrap;
  background: var(--btn-solid-bg); border: none;
  color: var(--btn-solid-fg); font-size: 13px; font-weight: 700; cursor: pointer;
  transition: all var(--dur-fast);
}
.nickgen-btn:hover:not(:disabled) { filter: brightness(0.96); transform: translateY(-1px); }
.nickgen-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.nickgen-btn--secondary {
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
}
.nickgen-btn--secondary:hover:not(:disabled) { border-color: rgba(var(--theme-accent-rgb), 0.35); filter: none; color: var(--text); }
.nickgen-btn--danger {
  background: color-mix(in srgb, var(--red) 18%, transparent); border: 1px solid color-mix(in srgb, var(--red) 40%, transparent); color: var(--red);
}
.nickgen-btn--danger:hover:not(:disabled) { background: color-mix(in srgb, var(--red) 28%, transparent); filter: none; }

.nickgen-console { border-radius: var(--r-lg); overflow: hidden; }
.nickgen-console__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; border-bottom: 1px solid var(--border); background: var(--surface-1);
}
.nickgen-console__title { font-size: 12px; font-weight: 700; color: var(--text-dim); font-family: var(--font-mono); }
.nickgen-console__stats { font-size: 11px; color: var(--text-faint); font-family: var(--font-mono); }
.nickgen-console__body {
  max-height: 400px; overflow-y: auto; padding: 12px 16px;
  font-family: var(--font-mono); font-size: 12px; line-height: 1.8;
}
.nickgen-console__empty { color: var(--text-faint); text-align: center; padding: 20px; }
.nickgen-line { padding: 1px 0; }
.nickgen-line__time { color: var(--text-faint); }
.nickgen-line--info { color: var(--text-dim); }
.nickgen-line--info b { color: var(--theme-accent); }
.nickgen-line--checking { color: var(--text-faint); }
.nickgen-line--avail { color: #43b581; }
.nickgen-line--taken { color: var(--text-dim); }
.nickgen-line--err { color: var(--red); }
.nickgen-line--warn { color: var(--yellow); }
.nickgen-line--done { color: #43b581; font-weight: 700; }
.nickgen-line--neutral { color: var(--text); }
.nickgen-nick {
  display: inline-block; padding: 1px 8px; border-radius: 4px;
  background: rgba(var(--theme-accent-rgb), 0.1); color: var(--theme-accent);
  font-weight: 700;
}
.nickgen-status { font-weight: 800; }
.nickgen-status--avail { color: #43b581; }
.nickgen-status--taken { color: var(--red); }

/* =============================================================================
   Badge Timeline
   ============================================================================= */
.bt-source { padding: 22px 24px; margin-bottom: 0; }
.bt-source__row {
  display: flex; align-items: flex-end; flex-wrap: wrap; gap: 12px;
  width: 100%;
}
.bt-source__row .input-wrap { min-height: 52px; }
.bt-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.bt-field--grow { flex: 1 1 280px; min-width: 0; }
.bt-field__label {
  font-size: 10px; font-weight: 800; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--text-faint);
}
.bt-input {
  width: 100%; box-sizing: border-box; height: 48px; padding: 0 14px;
  border-radius: var(--r-md); font-size: 13px; color: var(--text);
  background: var(--bg-input);
  border: 1px solid var(--border);
  transition: border-color var(--dur), box-shadow var(--dur), background var(--dur);
  color-scheme: var(--color-scheme);
  font-family: inherit;
}
.bt-input:focus {
  outline: none;
  border-color: rgba(var(--theme-accent-rgb), 0.45);
  box-shadow: 0 0 0 3px rgba(var(--theme-accent-rgb), 0.10);
  background: var(--surface-2);
}
.bt-btn {
  height: 48px; padding: 0 18px; border-radius: var(--r-md); flex-shrink: 0;
  font-size: 13px; font-weight: 700; white-space: nowrap;
  background: var(--btn-solid-bg); color: var(--btn-solid-fg); border: none;
  transition: transform var(--dur-fast) var(--ease-spring), filter var(--dur);
}
.bt-btn:hover { transform: translateY(-1px); filter: brightness(0.96); }
.bt-btn--ghost {
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--border);
}
.bt-btn--ghost:hover { border-color: rgba(var(--theme-accent-rgb), 0.4); filter: none; }
.bt-btn--danger {
  background: rgba(251, 87, 115, 0.14); color: #ff8095;
  border: 1px solid rgba(251, 87, 115, 0.45);
}
.bt-btn--danger:hover { background: rgba(251, 87, 115, 0.9); color: #fff; filter: none; }
.bt-btn__ico { display: inline-flex; margin-right: 7px; }
.bt-btn__ico .btw-ico svg { width: 15px; height: 15px; }
/* Compact action row (photo-2 style buttons, sized to content) */
.actions-row--bt { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 0; }
.actions-row--bt .bt-btn { flex: 0 0 auto; }

.bt-status { min-height: 18px; margin-top: 10px; font-size: 12px; color: var(--text-faint); }
.bt-status.is-loading { color: var(--text-dim); }
.bt-status.is-ok { color: #43b581; }
.bt-status.is-warn { color: var(--yellow); }
.bt-status.is-err { color: var(--red); }

.bt-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 18px 0 14px; color: var(--text-faint);
  font-size: 10px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase;
}
.bt-divider::before, .bt-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

.bt-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }

.bt-card {
  padding: 20px; border-radius: var(--r-lg, 16px);
  background: var(--surface-1, rgba(255,255,255,0.03));
  border: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 18px;
}
.bt-card--empty { gap: 14px; }
.bt-card__head { display: flex; align-items: center; gap: 12px; }
.bt-card__icon {
  width: 38px; height: 38px; flex-shrink: 0; border-radius: var(--r-md);
  display: inline-flex; align-items: center; justify-content: center; font-size: 18px;
  background: rgba(var(--theme-accent-rgb), 0.12);
  border: 1px solid rgba(var(--theme-accent-rgb), 0.25);
}
.bt-card__title { font-family: var(--font-display); font-size: 16px; font-weight: 800; color: var(--text); }
.bt-card__sub { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.bt-card__empty {
  font-size: 13px; color: var(--text-faint); line-height: 1.6;
  padding: 22px; text-align: center;
  border: 1px dashed var(--border); border-radius: var(--r-md);
}

/* Current badge → next badge */
.bt-now {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px;
}
.bt-badge { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; margin: 0; }
.bt-badge__art {
  width: 60px; height: 60px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--tier) 16%, transparent);
  border-color: color-mix(in srgb, var(--tier) 45%, transparent);
  box-shadow: 0 0 24px -6px var(--tier);
}
.bt-badge__art img { width: 34px; height: 34px; object-fit: contain; }
.bt-badge__art.is-missing { background: var(--tier); box-shadow: 0 0 24px -6px var(--tier); }
.bt-badge__art.is-missing img { display: none; }
.bt-badge__name { display: block; font-size: 13px; font-weight: 800; color: var(--text); }
.bt-badge__meta { display: block; font-size: 11px; color: var(--text-faint); margin-top: 2px; }
.bt-badge--next .bt-badge__art { opacity: 0.55; filter: saturate(0.5); }
.bt-badge--done { font-size: 12px; color: var(--text-faint); }
.bt-arrow { font-size: 18px; color: var(--text-faint); }

/* Exact upgrade date */
.bt-target {
  padding: 16px; border-radius: var(--r-md); text-align: center;
  background: rgba(var(--theme-accent-rgb), 0.07);
  border: 1px solid rgba(var(--theme-accent-rgb), 0.18);
}
.bt-target__label {
  font-size: 10px; font-weight: 800; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--text-faint);
}
.bt-target__date {
  font-family: var(--font-display); font-size: 30px; font-weight: 800;
  letter-spacing: -0.5px; color: var(--text); margin: 6px 0 4px;
}
.bt-target__meta { font-size: 12px; color: var(--text-dim); }
.bt-target__meta b { color: var(--theme-accent); font-weight: 800; }
.bt-target--maxed { background: rgba(67,181,129,0.08); border-color: rgba(67,181,129,0.25); }
.bt-target--maxed .bt-target__date { font-size: 22px; color: #43b581; }

.bt-progress {
  height: 6px; border-radius: 99px; overflow: hidden; margin: 14px 0 6px;
  background: rgba(255,255,255,0.07);
}
.bt-progress__fill {
  height: 100%; border-radius: inherit;
  background: linear-gradient(90deg, rgba(var(--theme-accent-rgb), 0.5), var(--theme-accent));
  transition: width 0.6s var(--ease-out);
}
.bt-progress__legend {
  display: flex; justify-content: space-between; gap: 8px;
  font-size: 10px; font-weight: 700; color: var(--text-faint);
}

/* Full tier schedule */
.bt-steps { list-style: none; display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; }
.bt-step {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 12px; border-radius: var(--r-sm);
  border: 1px solid transparent;
  transition: background var(--dur), border-color var(--dur);
}
.bt-step:hover { background: rgba(255,255,255,0.03); }
.bt-step__art {
  width: 30px; height: 30px; flex-shrink: 0; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.05);
  background: color-mix(in srgb, var(--tier) 14%, transparent);
}
.bt-step__art img { width: 20px; height: 20px; object-fit: contain; }
.bt-step__art.is-missing { background: var(--tier); }
.bt-step__art.is-missing img { display: none; }
.bt-step__body { flex: 1; min-width: 0; }
.bt-step__name { font-size: 13px; font-weight: 700; color: var(--text); }
.bt-step__tier {
  font-size: 10px; font-weight: 800; color: var(--text-faint);
  padding: 1px 6px; border-radius: 4px; margin-left: 4px;
  background: rgba(255,255,255,0.06);
}
.bt-step__date { font-size: 11px; color: var(--text-dim); margin-top: 2px; }
.bt-step__status { font-size: 11px; font-weight: 800; white-space: nowrap; }
.bt-step__check { color: #43b581; }
.bt-step__left { color: var(--text-faint); }

.bt-step.is-locked { opacity: 0.5; }
.bt-step.is-locked .bt-step__art { filter: saturate(0.25); }
.bt-step.is-next {
  background: rgba(var(--theme-accent-rgb), 0.09);
  border-color: rgba(var(--theme-accent-rgb), 0.28);
}
.bt-step.is-next .bt-step__left { color: var(--theme-accent); }

.bt-note {
  font-size: 11px; line-height: 1.6; color: var(--text-faint);
  padding-top: 4px; border-top: 1px solid var(--border); margin: 0;
}

@media (max-width: 1100px) {
  .bt-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .bt-source__row { flex-direction: column; align-items: stretch; }
  .bt-btn { width: 100%; }
  .bt-target__date { font-size: 24px; }
}
