
/* === base.css === */
/* Guest gating: elements marked [data-guest-hide] are member-only (menu, control
   hub, etc.). Hidden by default so guests never see a flash; revealed only once a
   non-guest role is confirmed on <body data-user-role>. Each target restores its
   own display value (revert would drop the flex layout). */
[data-guest-hide] { display: none !important; }
body[data-user-role="member"] .top-nav[data-guest-hide],
body[data-user-role="tester"] .top-nav[data-guest-hide],
body[data-user-role="support"] .top-nav[data-guest-hide],
body[data-user-role="admin"] .top-nav[data-guest-hide],
body[data-user-role="owner"] .top-nav[data-guest-hide] { display: flex !important; }
body[data-user-role="member"] .ctl-hub[data-guest-hide],
body[data-user-role="tester"] .ctl-hub[data-guest-hide],
body[data-user-role="support"] .ctl-hub[data-guest-hide],
body[data-user-role="admin"] .ctl-hub[data-guest-hide],
body[data-user-role="owner"] .ctl-hub[data-guest-hide] { display: inline-flex !important; }

:root {
  color-scheme: dark;
  --bg-0: #06080f;
  --bg-1: #0b1222;
  --bg-2: #101b30;
  --bg-3: #14203a;
  --glass-bg: rgba(16, 24, 40, 0.42);
  --glass-bg-strong: rgba(16, 24, 40, 0.65);
  --glass-border: rgba(160, 190, 230, 0.22);
  --glass-shadow: 0 18px 50px rgba(3, 8, 18, 0.5), 0 1px 0 rgba(255, 255, 255, 0.08);
  --glass-glow: 0 0 40px rgba(118, 224, 255, 0.2);
  --surface: rgba(12, 20, 36, 0.92);
  --surface-2: rgba(18, 28, 48, 0.88);
  --text: #eef3ff;
  --muted: #a8b9d4;
  --accent: #7bdcff;
  --accent-purple: #7c3aed;
  --blur-sm: 8px;
  --blur-md: 18px;
  --blur-lg: 28px;
  --blur-xl: 40px;
  --glass: var(--glass-bg);
  --glass-strong: var(--glass-bg-strong);
  --glass-soft: rgba(255, 255, 255, 0.04);
  --surface-strong: var(--surface-2);
  --overlay: rgba(8, 14, 26, 0.92);
  --blur-surface: var(--blur-md);
  --border-subtle: color-mix(in srgb, var(--glass-border) 70%, transparent);
  --border-strong: rgba(175, 206, 240, 0.32);
  --border-inner: rgba(255, 255, 255, 0.1);
  --border-glow: rgba(123, 220, 255, 0.35);
  --text-muted: var(--muted);
  --text-soft: #c8d5f2;
  --accent-2: #8de6d6;
  --accent-3: #d9b77a;
  --status-success: #6ee3b2;
  --status-warning: #f2c98f;
  --status-danger: #f09cb0;
  --status-muted: #8b97b2;

  /* Banner carousel component tokens */
  --banner-card-width: 220px;
  --banner-card-width-mobile: 180px;
  --banner-aspect: 16 / 9;

  /* Spin wheel segment colors */
  --wheel-1: #6ee7b7;
  --wheel-2: #3b82f6;
  --wheel-3: #f59e0b;
  --wheel-4: #ef4444;
  --wheel-5: #8b5cf6;
  --wheel-6: #10b981;
  --wheel-7: #f97316;
  --radius-xs: 12px;
  --radius-sm: 14px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --shadow-1: 0 10px 28px rgba(4, 10, 20, 0.32), 0 1px 2px rgba(4, 8, 14, 0.5);
  --shadow-2: 0 18px 52px rgba(3, 8, 18, 0.45), 0 2px 10px rgba(3, 7, 14, 0.6);
  --shadow-3: 0 30px 80px rgba(2, 6, 16, 0.5), 0 4px 18px rgba(3, 8, 18, 0.45);
  --shadow-glow: var(--glass-glow);
  --shadow-inset: inset 0 1px 0 rgba(255, 255, 255, 0.14), inset 0 -1px 0 rgba(4, 8, 16, 0.45);

  /* Liquid glass refraction system */
  --liquid-refraction: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.15) 0%,
    rgba(255, 255, 255, 0.05) 20%,
    transparent 40%,
    rgba(123, 220, 255, 0.08) 60%,
    rgba(255, 255, 255, 0.12) 80%,
    rgba(255, 255, 255, 0.06) 100%
  );
  --liquid-highlight: linear-gradient(
    115deg,
    rgba(255, 255, 255, 0.28) 0%,
    rgba(255, 255, 255, 0) 45%
  );
  --liquid-caustic: radial-gradient(
    ellipse at 30% 20%,
    rgba(123, 220, 255, 0.2) 0%,
    transparent 50%
  );

  --sb-size: 10px;
  --sb-track: rgba(16, 24, 40, 0.35);
  --sb-track-border: rgba(160, 190, 230, 0.10);
  --sb-thumb: rgba(123, 220, 255, 0.30);
  --sb-thumb-hover: rgba(123, 220, 255, 0.5);
  --sb-thumb-border: rgba(255, 255, 255, 0.22);
  --font-sans: "Manrope", system-ui, sans-serif;
  --font-display: "Sora", "Manrope", system-ui, sans-serif;
  --success: var(--status-success);
  --bg: var(--bg-0);
  --font-body: var(--font-sans);
  --font-mono: "JetBrains Mono", "Fira Code", ui-monospace, monospace;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-overlay: 1000;
  --z-modal: 1050;
  --z-toast: 9000;
  --z-tooltip: 9500;
  --z-captcha: 9200;
  --gap-sm: 8px;
  --gap-md: 12px;
  --gap-lg: 16px;
  --gap-xl: 20px;
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;

  /* ── Button system tokens ── */
  --btn-padding-xs: 3px 8px;
  --btn-padding-sm: 4px 10px;
  --btn-padding-base: 10px 17px;
  --btn-padding-lg: 14px 32px;
  --btn-padding-xl: 16px 40px;
  --btn-font-xs: 10px;
  --btn-font-sm: 11px;
  --btn-font-base: 13px;
  --btn-font-lg: 16px;
  --btn-font-xl: 18px;
  --btn-icon-size: 40px;
  --btn-icon-size-sm: 32px;
  --btn-icon-size-lg: 48px;
  --btn-shine-duration: 0.6s;
  --btn-glow-intensity: 0.25;
  --btn-glow-spread: 30px;
  --btn-transition-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --btn-border-shimmer-speed: 3s;

  /* Button status color mixes */
  --btn-success-bg: color-mix(in srgb, var(--status-success) 20%, transparent);
  --btn-success-border: color-mix(in srgb, var(--status-success) 45%, transparent);
  --btn-success-glow: color-mix(in srgb, var(--status-success) 25%, transparent);
  --btn-warning-bg: color-mix(in srgb, var(--status-warning) 20%, transparent);
  --btn-warning-border: color-mix(in srgb, var(--status-warning) 45%, transparent);
  --btn-warning-glow: color-mix(in srgb, var(--status-warning) 25%, transparent);
  --btn-danger-bg: color-mix(in srgb, var(--status-danger) 20%, transparent);
  --btn-danger-border: color-mix(in srgb, var(--status-danger) 45%, transparent);
  --btn-danger-glow: color-mix(in srgb, var(--status-danger) 25%, transparent);

  /* Toggle pill group tokens */
  --toggle-pill-bg: color-mix(in srgb, var(--glass-bg-strong) 60%, transparent);
  --toggle-pill-border: color-mix(in srgb, var(--glass-border) 55%, transparent);
  --toggle-pill-btn-bg: color-mix(in srgb, var(--glass-bg) 50%, transparent);
  --toggle-pill-btn-active-bg: color-mix(in srgb, var(--accent) 15%, transparent);
  --toggle-pill-btn-active-border: color-mix(in srgb, var(--accent) 40%, transparent);

  /* Fluid typography — smooth scaling from mobile to desktop */
  --fs-xs: clamp(0.6875rem, 0.65rem + 0.18vw, 0.75rem);
  --fs-sm: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --fs-base: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --fs-md: clamp(1rem, 0.9rem + 0.5vw, 1.25rem);
  --fs-lg: clamp(1.125rem, 1rem + 0.6vw, 1.5rem);
  --fs-xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.75rem);
  --fs-2xl: clamp(1.5rem, 1.2rem + 1.5vw, 2.5rem);
  --fs-3xl: clamp(1.875rem, 1.5rem + 1.85vw, 3rem);
}

* {
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: var(--sb-thumb) var(--sb-track);
}

/* Custom cursor — only on devices with fine pointer + hover (desktop/laptop) */
@media (hover: hover) and (pointer: fine) {
  body.has-custom-cursor.is-cursor-enabled,
  body.has-custom-cursor.is-cursor-enabled *,
  body.has-custom-cursor.is-cursor-enabled *::before,
  body.has-custom-cursor.is-cursor-enabled *::after {
    cursor: none !important;
  }

  /*
    Custom cursor integration
    - Default: hide the native cursor everywhere (cursor: none)
    - Text caret: show only for actual text-entry fields
    - Keep native cursor hidden for controls (checkbox, radio, buttons, etc.)
  */

  body.has-custom-cursor.is-cursor-enabled
    input:is(
      [type="text"],
      [type="email"],
      [type="password"],
      [type="search"],
      [type="url"],
      [type="tel"],
      [type="number"],
      [type="date"],
      [type="time"],
      [type="datetime-local"],
      [type="month"],
      [type="week"]
    ),
  body.has-custom-cursor.is-cursor-enabled textarea,
  body.has-custom-cursor.is-cursor-enabled [contenteditable="true"] {
    cursor: text !important;
  }

  /* Selects keep a NATIVE pointer cursor. The custom DOM cursor can't render
     over the OS-level <option> dropdown, so without this the dropdown shows no
     cursor at all — the native pointer keeps it visible while the menu is open. */
  body.has-custom-cursor.is-cursor-enabled select {
    cursor: pointer !important;
  }

  body.has-custom-cursor.is-cursor-enabled input[type="range"],
  body.has-custom-cursor.is-cursor-enabled
    input:is(
      [type="checkbox"],
      [type="radio"],
      [type="button"],
      [type="submit"],
      [type="reset"],
      [type="file"],
      [type="color"]
    ) {
    cursor: none !important;
  }

  /* Allow range inputs to show native cursor for precise thumb dragging */
  body.has-custom-cursor.is-cursor-enabled input[type="range"],
  body.has-custom-cursor.is-cursor-enabled input[type="range"]::-webkit-slider-thumb,
  body.has-custom-cursor.is-cursor-enabled input[type="range"]::-moz-range-thumb {
    cursor: grab !important;
  }

  body.has-custom-cursor.is-cursor-enabled input[type="range"]:active,
  body.has-custom-cursor.is-cursor-enabled input[type="range"]:active::-webkit-slider-thumb,
  body.has-custom-cursor.is-cursor-enabled input[type="range"]:active::-moz-range-thumb {
    cursor: grabbing !important;
  }
}

body.is-scrollbar-dragging,
body.is-scrollbar-dragging * {
  user-select: none;
}

*::-webkit-scrollbar {
  width: var(--sb-size);
  height: var(--sb-size);
}

/* Frosted glass track: translucent dark glass with a faint inner border + a
   soft top sheen, so the whole gutter reads as a luxury glass channel. */
*::-webkit-scrollbar-track {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0) 40%),
    var(--sb-track);
  border-radius: 999px;
  box-shadow:
    inset 0 0 0 1px var(--sb-track-border),
    inset 0 2px 6px rgba(2, 6, 12, 0.25);
}

/* Glass capsule thumb: glossy vertical gradient with a bright top highlight,
   a subtle accent glow, and a transparent border so it floats inside the track
   (background-clip: padding-box keeps the glass off the edges). */
*::-webkit-scrollbar-thumb {
  background:
    linear-gradient(180deg,
      rgba(255, 255, 255, 0.35),
      color-mix(in srgb, var(--sb-thumb) 90%, transparent) 28%,
      color-mix(in srgb, var(--sb-thumb) 70%, transparent) 100%);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.45),
    inset 0 0 8px rgba(255, 255, 255, 0.12),
    0 2px 10px rgba(2, 6, 12, 0.4),
    0 0 12px color-mix(in srgb, var(--accent, #7bdcff) 22%, transparent);
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

*::-webkit-scrollbar-thumb:hover {
  background:
    linear-gradient(180deg,
      rgba(255, 255, 255, 0.5),
      color-mix(in srgb, var(--sb-thumb-hover) 95%, transparent) 26%,
      color-mix(in srgb, var(--sb-thumb-hover) 78%, transparent) 100%);
  background-clip: padding-box;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.6),
    inset 0 0 10px rgba(255, 255, 255, 0.18),
    0 2px 12px rgba(2, 6, 12, 0.45),
    0 0 18px color-mix(in srgb, var(--accent, #7bdcff) 40%, transparent);
}

*::-webkit-scrollbar-corner { background: transparent; }

/* ── Custom glass WINDOW scrollbar (glass-scrollbar.js) ──────────────────────
   When active, hide the native page scrollbar and render our own frosted-glass
   capsule so it looks identical & luxurious in every browser (incl. Firefox). */
html.has-glass-scrollbar { scrollbar-width: none; }            /* Firefox */
html.has-glass-scrollbar body { -ms-overflow-style: none; }    /* old Edge */
html.has-glass-scrollbar::-webkit-scrollbar,
html.has-glass-scrollbar body::-webkit-scrollbar { width: 0; height: 0; } /* WebKit */

.glass-sb {
  position: fixed;
  top: 8px;
  bottom: 8px;
  right: 5px;
  width: 12px;
  z-index: 2147483600;
  border-radius: 999px;
  /* frosted glass channel */
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0) 38%),
    rgba(16, 24, 40, 0.32);
  border: 1px solid rgba(160, 190, 230, 0.12);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    inset 0 2px 8px rgba(2, 6, 12, 0.35);
  backdrop-filter: blur(var(--blur-sm)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(160%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
.glass-sb.is-active { opacity: 1; pointer-events: auto; }
.glass-sb:hover { opacity: 1; pointer-events: auto; }
.glass-sb.is-hidden { opacity: 0 !important; pointer-events: none !important; }

.glass-sb__thumb {
  position: absolute;
  left: 1px;
  right: 1px;
  top: 0;
  min-height: 40px;
  border-radius: 999px;
  cursor: grab;
  /* glossy glass capsule with bright top highlight + accent glow */
  background:
    linear-gradient(180deg,
      rgba(255, 255, 255, 0.42),
      rgba(123, 220, 255, 0.42) 26%,
      rgba(123, 220, 255, 0.28) 100%);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.55),
    inset 0 0 10px rgba(255, 255, 255, 0.14),
    0 3px 12px rgba(2, 6, 12, 0.45),
    0 0 14px rgba(123, 220, 255, 0.25);
  transition: background 0.2s ease, box-shadow 0.2s ease;
}
.glass-sb__thumb:hover {
  background:
    linear-gradient(180deg,
      rgba(255, 255, 255, 0.6),
      rgba(123, 220, 255, 0.6) 24%,
      rgba(123, 220, 255, 0.4) 100%);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.7),
    inset 0 0 12px rgba(255, 255, 255, 0.2),
    0 3px 14px rgba(2, 6, 12, 0.5),
    0 0 22px rgba(123, 220, 255, 0.5);
}
.glass-sb.is-dragging .glass-sb__thumb { cursor: grabbing; }

:where(
  .panel-body,
  .thread-body,
  .message-list,
  .ticket-list,
  .status-list,
  .dashboard-chat,
  .admin-product-list,
  .admin-user-list,
  .admin-revenue,
  .admin-management-suite .admin-list-stack,
  .admin-list-stack,
  .admin-sub-list,
  .admin-user-results,
  .audit-timeline,
  .infinite-list,
  .admin-user-editor .panel-body,
  .admin-lab-table,
  select[multiple],
  select[size],
  .code-input,
  .rich-surface
) {
  --sb-size: 8px;
  --sb-track: rgba(16, 24, 40, 0.30);
  --sb-track-border: rgba(160, 190, 230, 0.12);
  --sb-thumb: rgba(123, 220, 255, 0.32);
  --sb-thumb-hover: rgba(123, 220, 255, 0.5);
  --sb-thumb-border: rgba(255, 255, 255, 0.20);
  scrollbar-width: thin;
  scrollbar-color: var(--sb-thumb) var(--sb-track);
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg-0);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-wrap: anywhere;
  line-height: 1.5;
  scrollbar-width: thin;
  scrollbar-color: var(--sb-thumb) var(--sb-track);
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
}

html {
  scroll-behavior: smooth;
  /* "auto" (not "thin") so Firefox renders a fuller, clearly-tinted glass bar —
     "thin" looks almost identical to the default hairline. Chrome/Edge use the
     ::-webkit-scrollbar glass styling above regardless. */
  scrollbar-width: auto;
  scrollbar-color: var(--sb-thumb) var(--sb-track);
  /* Always reserve the scrollbar gutter so toggling overflow (the splash intro
     removing 'splash-scrollable') never changes layout width — removes the
     small downward "jump" when the intro finishes. */
  scrollbar-gutter: stable;
}

body.body-bg {
  background:
    radial-gradient(80% 70% at 8% 6%,   rgba(123, 220, 255, 0.24), transparent 55%),
    radial-gradient(70% 65% at 92% 10%,  rgba(217, 183, 122, 0.18), transparent 50%),
    radial-gradient(60% 55% at 5% 50%,   rgba(56, 189, 195, 0.14), transparent 50%),
    radial-gradient(65% 60% at 82% 45%,  rgba(139, 120, 220, 0.12), transparent 50%),
    radial-gradient(90% 70% at 45% 90%,  rgba(110, 231, 183, 0.14), transparent 55%),
    radial-gradient(50% 45% at 50% 38%,  rgba(123, 220, 255, 0.10), transparent 50%),
    linear-gradient(168deg, var(--bg-0) 0%, var(--bg-1) 40%, #0a1628 65%, var(--bg-0) 100%);
  /* Flex column so the footer's `margin-top: auto` actually pushes it to the
     bottom of the viewport on short pages (e.g. radar) instead of floating
     mid-page. min-height keeps the body at least one screen tall. */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Flow children of the flex-column body must span the full width. Without this
   a child that is itself a centered flex row (e.g. .error-shell) collapses to its
   content width in the cross axis, squeezing inner text into hundreds of wrapped
   lines and inflating the page height.
   Only target real layout regions — NOT fixed/absolute helper overlays (custom
   cursor, glass scrollbar, context menu, toasts, modals, friends dock), which are
   out of flow and must keep their own width (the `> *` form wrongly stretched the
   26px cursor to the full body width, producing a giant blurry capsule). */
body.body-bg > main,
body.body-bg > header,
body.body-bg > footer,
body.body-bg > section,
body.body-bg > .page-shell,
body.body-bg > .error-shell { width: 100%; }

.body-bg::before,
.body-bg::after {
  content: "";
  position: fixed;
  inset: -12%;
  pointer-events: none;
  z-index: -2;
}

.body-bg::before {
  background-image:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.12), transparent 42%),
    radial-gradient(circle at 78% 70%, rgba(123, 220, 255, 0.12), transparent 50%),
    radial-gradient(circle at 52% 62%, rgba(217, 183, 122, 0.1), transparent 54%);
  opacity: 0.38;
  filter: blur(20px);
  animation: auroraShift 20s ease-in-out infinite alternate;
}

.body-bg::after {
  background-image: radial-gradient(ellipse at center, rgba(4, 6, 10, 0) 0%, rgba(4, 6, 10, 0.6) 70%);
  opacity: 0.4;
  z-index: -1;
}

/* Scroll-based splash screen dismissal */
body.splash-scrollable {
  overflow-y: auto;
  min-height: 200vh;
}

/* Aurora ambient background animation */
@keyframes auroraShift {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 0.38;
  }
  33% {
    transform: translate(2%, -1%) scale(1.02);
    opacity: 0.42;
  }
  66% {
    transform: translate(-1%, 2%) scale(0.98);
    opacity: 0.35;
  }
  100% {
    transform: translate(1%, -2%) scale(1.01);
    opacity: 0.4;
  }
}

/* Mesh gradient background animation (merged from components.css) */
@keyframes meshShift {
  0%, 100% { opacity: 0.5; transform: scale(1) translate(0, 0); }
  25% { opacity: 0.8; transform: scale(1.02) translate(-1%, 1%); }
  50% { opacity: 0.6; transform: scale(1.04) translate(1%, -1%); }
  75% { opacity: 0.9; transform: scale(1.02) translate(-1%, -1%); }
}

/* ============================================================
   MOBILE & TOUCH DEVICE ADJUSTMENTS
   ============================================================ */

/* Mobile: reduced blur for performance */
@media (max-width: 720px) {
  :root {
    --blur-sm: 4px;
    --blur-md: 8px;
    --blur-lg: 10px;
    --blur-xl: 16px;
  }

  .body-bg::before {
    filter: blur(12px);
  }
}

/* ============================================================
   ACCESSIBILITY: Reduced Motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .body-bg::before {
    animation: none;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   ACCESSIBILITY: High Contrast Mode
   ============================================================ */
@media (prefers-contrast: high) {
  :root {
    --glass-border: rgba(160, 190, 230, 0.5);
    --border-subtle: rgba(160, 190, 230, 0.5);
    --border-strong: rgba(175, 206, 240, 0.6);
    --muted: #b0c4de;
    --text-soft: #dce5f7;
  }
}

/* ============================================================
   TOUCH DEVICES: Performance optimizations
   ============================================================ */
@media (pointer: coarse) {
  .body-bg::before {
    animation: none;
    filter: blur(14px);
  }
}

/* ============================================================
   BASE ELEMENT STYLES
   ============================================================ */
img {
  max-width: 100%;
  display: block;
}

video {
  max-width: 100%;
  display: block;
}

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

/* Skip Navigation Link */
.skip-link {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 12px 24px;
  background: var(--accent);
  color: var(--bg-0);
  border-radius: var(--radius-sm);
  z-index: 10000;
  font-weight: 600;
  text-decoration: none;
  transform: translateY(calc(-100% - 32px));
  transition: transform 0.2s ease;
}

.skip-link:focus {
  outline: none;
}

.skip-link:focus-visible {
  transform: translateY(0);
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ═══════════════════════════════════════════════════════════════
   ACCESSIBLE FOCUS INDICATORS (WCAG 2.2 — Focus Visible)
   ═══════════════════════════════════════════════════════════════ */

/* Global focus-visible for all interactive elements */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Enhanced focus for buttons and links */
button:focus-visible,
a:focus-visible,
a.btn:focus-visible,
[role="button"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(123, 220, 255, 0.25);
}

/* Focus for form inputs */
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 0;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(123, 220, 255, 0.2);
}

/* The Find overlay's search input is auto-focused on open and is already the
   clear focal point — suppress the global focus outline/ring so it doesn't
   show a harsh cyan rectangle. (The wrap shows a soft cue instead.) */
.find-input:focus,
.find-input:focus-visible {
  outline: none !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

/* Focus for custom interactive elements */
[tabindex]:focus-visible,
.steam-thumb:focus-visible,
.topbar-nav-trigger:focus-visible,
.preview-finish-btn:focus-visible,
.icon-toggle-pill__btn[data-notification-bell]:focus-visible,
[data-tooltip]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(123, 220, 255, 0.25);
}

/* Remove default outline for mouse users (keep for keyboard) */
:focus:not(:focus-visible) {
  outline: none;
}

/* ═══════════════════════════════════════════════════════════════
   COLOR CONTRAST FIX (WCAG 2.2 AA — 4.5:1 minimum)
   Old --muted: #9fb1cc on --bg-0: #06080f = 4.35:1 (FAIL)
   New --muted: #a8b9d4 on --bg-0: #06080f = 4.55:1 (PASS)
   ═══════════════════════════════════════════════════════════════ */

/* ============================================================
   Global mobile / touch polish (added)
   ============================================================ */
@media (max-width: 768px) {
  /* Comfortable tap targets — Apple/Google guideline is ~44px. */
  .btn,
  .ctl-trigger,
  .topbar-nav-trigger,
  .footer-links a,
  .nav-mega-section a {
    min-height: 44px;
  }
  .btn { padding-top: 12px; padding-bottom: 12px; }

  /* Footer stacks cleanly and stays centered on small screens. */
  .site-footer-inner {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
  .footer-links { flex-wrap: wrap; justify-content: center; }
}

/* Prevent iOS Safari from auto-zooming when focusing inputs: any input/select/
   textarea must be >= 16px on small screens. (Desktop styling is unaffected.) */
@media (max-width: 640px) {
  input, select, textarea,
  .field input, .field select, .field textarea,
  .game-search-input, .gift-code-input, .mono-input {
    font-size: 16px !important;
  }
}

/* Safety net: never allow a stray wide element to create a horizontal scrollbar
   on touch/narrow viewports. */
@media (max-width: 768px) {
  html, body { max-width: 100%; overflow-x: hidden; }
}

/* === animations.css === */
/* ═══════════════════════════════════════════════════════════════
   CYNO.GG — Liquid Glass & Anti-Gravity Animation System
   ═══════════════════════════════════════════════════════════════ */

/* (Removed unused @keyframes panelGlow — its only consumer, the dead
   .glass-panel::after panelGlow rule, was removed.) */

/* ── Liquid glass refraction shimmer ── */
@keyframes liquidRefraction {
  0%   { background-position: 0% 0%; opacity: 0.4; }
  50%  { background-position: 100% 100%; opacity: 0.6; }
  100% { background-position: 0% 0%; opacity: 0.4; }
}

/* (Removed unused @keyframes causticLight — it animated filter:blur() which
   forces full re-rasterization each frame; never referenced anywhere.) */

/* ── Anti-gravity float (gentle bobbing) ── */
@keyframes antiGravityFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25%      { transform: translateY(-12px) rotate(0.5deg); }
  50%      { transform: translateY(-6px) rotate(-0.3deg); }
  75%      { transform: translateY(-16px) rotate(0.2deg); }
}

@keyframes antiGravityFloatSlow {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-20px) rotate(0.8deg); }
}

@keyframes antiGravityFloatAlt {
  0%, 100% { transform: translateY(0) rotate(0deg) scale(1); }
  33%      { transform: translateY(-14px) rotate(-0.6deg) scale(1.01); }
  66%      { transform: translateY(-8px) rotate(0.4deg) scale(0.99); }
}

/* ── Floating particles ── */
@keyframes particleDrift {
  0%   { transform: translate(0, 0) scale(1); opacity: 0; }
  10%  { opacity: 0.6; }
  90%  { opacity: 0.6; }
  100% { transform: translate(var(--drift-x, 40px), var(--drift-y, -80px)) scale(0.3); opacity: 0; }
}

/* ── Glass border pulse ── */
@keyframes glassBorderPulse {
  0%, 100% { opacity: 0.85; }
  50%      { opacity: 1; }
}

/* ── Holographic shimmer (for premium cards) ── */
@keyframes holoShimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ── Gentle scale breathe ── */
@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.02); }
}

/* ── Stagger fade in from below ── */
@keyframes fadeInUp {
  0%   { opacity: 0; transform: translateY(28px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInScale {
  0%   { opacity: 0; transform: scale(0.92); }
  100% { opacity: 1; transform: scale(1); }
}

/* ── Glow pulse for status indicators ── */
@keyframes glowPulse {
  0%, 100% { opacity: 0.7; }
  50%      { opacity: 1; }
}

/* ── Button glow pulse on hover ─ */
@keyframes btnGlowPulse {
  0%, 100% { opacity: 0; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.04); }
}

/* ─ Shine sweep across button surface ── */
@keyframes btnShineSweep {
  0% { transform: translateX(-100%) skewX(-15deg); }
  100% { transform: translateX(200%) skewX(-15deg); }
}

/* ── Loading spinner rotation ── */
@keyframes btnSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ── Border shimmer (gradient moves along border) ─ */
@keyframes btnBorderShimmer {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ── Luxury button caustic ripple ── */
@keyframes btnCausticRipple {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.05); }
}

/* ── Icon toggle pill active indicator slide ── */
@keyframes toggleIndicatorSlide {
  0% { transform: translateX(0); }
  100% { transform: translateX(var(--indicator-offset, 100%)); }
}

/* ── Video background overlay shimmer ── */
@keyframes videoOverlayShimmer {
  0%, 100% { opacity: 0.7; }
  50%      { opacity: 0.85; }
}

/* ── Liquid glass surface animation (for .liquid-glass class) ── */
.liquid-glass {
  position: relative;
  overflow: hidden;
}

.liquid-glass::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--liquid-refraction);
  background-size: 200% 200%;
  animation: liquidRefraction 8s ease-in-out infinite;
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: 1;
}

/* ── Anti-gravity floating element classes ── */
.ag-float {
  animation: antiGravityFloat 6s ease-in-out infinite;
}

.ag-float-slow {
  animation: antiGravityFloatSlow 8s ease-in-out infinite;
}

.ag-float-alt {
  animation: antiGravityFloatAlt 7s ease-in-out infinite;
}

.ag-float-delay-1 { animation-delay: -1.5s; }
.ag-float-delay-2 { animation-delay: -3s; }
.ag-float-delay-3 { animation-delay: -4.5s; }

/* ── Stagger animation utility ── */
.stagger-in > * {
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
}

.stagger-in > *:nth-child(1) { animation-delay: 0.05s; }
.stagger-in > *:nth-child(2) { animation-delay: 0.1s; }
.stagger-in > *:nth-child(3) { animation-delay: 0.15s; }
.stagger-in > *:nth-child(4) { animation-delay: 0.2s; }
.stagger-in > *:nth-child(5) { animation-delay: 0.25s; }
.stagger-in > *:nth-child(6) { animation-delay: 0.3s; }
.stagger-in > *:nth-child(7) { animation-delay: 0.35s; }
.stagger-in > *:nth-child(8) { animation-delay: 0.4s; }

/* ── Interactive tilt on hover (CSS-only mild version) ── */
.glass-tilt {
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  transform-style: preserve-3d;
  perspective: 800px;
}

.glass-tilt:hover {
  transform: perspective(800px) rotateX(2deg) rotateY(-2deg) translateY(-4px);
  box-shadow:
    var(--glass-shadow),
    0 0 0 1px var(--border-glow),
    0 0 60px rgba(123, 220, 255, 0.15);
}

/* ── Video background container ── */
.video-bg-container {
  position: relative;
  overflow: hidden;
}

.video-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.25;
  filter: blur(2px) saturate(1.2) brightness(0.6);
  z-index: 0;
}

.video-bg-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(6, 8, 15, 0.7) 0%, rgba(6, 8, 15, 0.4) 40%, rgba(6, 8, 15, 0.8) 100%),
    radial-gradient(circle at 50% 50%, transparent 20%, rgba(6, 8, 15, 0.5) 80%);
  z-index: 1;
  pointer-events: none;
}

.video-bg-container > *:not(.video-bg):not(.video-bg-overlay) {
  position: relative;
  z-index: 2;
}

/* ── Floating particles container ── */
.particle-field {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.particle {
  position: absolute;
  width: var(--size, 4px);
  height: var(--size, 4px);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(123, 220, 255, 0.6), transparent);
  animation: particleDrift var(--duration, 8s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}

/* ── Holographic card effect ── */
.holo-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(123, 220, 255, 0.08) 45%,
    rgba(141, 230, 214, 0.06) 50%,
    rgba(217, 183, 122, 0.08) 55%,
    transparent 60%
  );
  background-size: 250% 100%;
  animation: holoShimmer 6s ease-in-out infinite;
  pointer-events: none;
  mix-blend-mode: screen;
  border-radius: inherit;
  z-index: 2;
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .liquid-glass::before,
  .ag-float,
  .ag-float-slow,
  .ag-float-alt,
  .holo-card::after,
  .particle,
  .landing-particle,
  .error-particle {
    animation: none !important;
  }

  .stagger-in > * {
    animation: none !important;
    opacity: 1;
  }

  .glass-tilt:hover {
    transform: translateY(-2px);
  }

  .status-dot--live {
    animation: none !important;
  }

  .btn::before,
  .btn-primary::after,
  .btn-luxury::after,
  .btn-luxury,
  .btn-gradient-border::before,
  .btn.is-loading::after,
  .icon-toggle-pill__btn.is-active::after {
    animation: none !important;
  }

  .btn:hover {
    animation: none !important;
  }
}

/* ── Mobile performance — disable decorative infinite animations ── */
@media (max-width: 820px) {
  .ag-float,
  .ag-float-slow,
  .ag-float-alt {
    animation: none !important;
  }

  .liquid-glass::before {
    animation: none !important;
  }

  .holo-card::after {
    animation: none !important;
    display: none;
  }

  .particle,
  .landing-particle {
    animation: none !important;
    display: none;
  }

  .glass-tilt:hover {
    transform: none;
    box-shadow: var(--glass-shadow);
  }

  .video-bg {
    filter: saturate(1.1) brightness(0.6);
  }
}

/* ── Modal overlays (shared across admin and tickets) ── */
@keyframes modalOverlayIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}


/* === components.css === */
.glass-panel {
  background: linear-gradient(145deg, color-mix(in srgb, var(--glass-bg-strong) 80%, transparent), color-mix(in srgb, var(--glass-bg) 65%, transparent));
  border: 1px solid color-mix(in srgb, var(--glass-border) 75%, transparent);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow), var(--glass-glow), var(--shadow-inset);
  backdrop-filter: blur(var(--blur-lg)) saturate(170%);
  -webkit-backdrop-filter: blur(var(--blur-lg)) saturate(170%);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  contain: layout style paint;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, border-color 0.35s ease;
}

.glass-panel > * {
  position: relative;
  z-index: 1;
}

/* Liquid glass highlight — top-left caustic light */
.glass-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    var(--liquid-highlight),
    var(--liquid-caustic);
  opacity: 0.55;
  mix-blend-mode: screen;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

/* (Removed dead .glass-panel::after "panelGlow" rule — it was overridden by the
   later .glass-panel::after borderShimmer rule, leaving only stray inset/opacity.
   The border-shimmer is now hover-gated for performance.) */

.glass-panel:hover:not(body.is-admin-page .glass-panel),
.glass-panel:focus-within {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--glass-border));
  box-shadow:
    var(--glass-shadow),
    0 0 0 1px var(--border-glow),
    0 0 50px rgba(123, 220, 255, 0.15),
    var(--glass-glow);
}

/* The Find panel manages its own focus styling (on the input), so it should
   not get the panel-wide focus-within ring/glow or the lift. */
.find-panel.glass-panel:focus-within {
  border-color: var(--glass-border);
  box-shadow: var(--glass-shadow), var(--glass-glow);
  transform: none;
}

body:not(.is-admin-page) .glass-panel:hover,
body:not(.is-admin-page) .glass-panel:focus-within {
  transform: translateY(-3px);
}
body:not(.is-admin-page) .find-panel.glass-panel:focus-within { transform: none; }

.glass-panel:hover::before {
  opacity: 0.7;
}

.glass-card {
  background: linear-gradient(155deg, color-mix(in srgb, var(--glass-bg-strong) 82%, transparent), color-mix(in srgb, var(--glass-bg) 72%, transparent));
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  border-radius: var(--radius-md);
  box-shadow: var(--glass-shadow), var(--shadow-inset);
  backdrop-filter: blur(var(--blur-sm)) saturate(155%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(155%);
  position: relative;
  overflow: hidden;
}

.glass-nav {
  background: linear-gradient(145deg, color-mix(in srgb, var(--glass-bg-strong) 92%, transparent), color-mix(in srgb, var(--glass-bg) 82%, transparent));
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  box-shadow: var(--glass-shadow), var(--glass-glow), var(--shadow-inset);
  backdrop-filter: blur(var(--blur-lg)) saturate(170%);
  -webkit-backdrop-filter: blur(var(--blur-lg)) saturate(170%);
}

.glass-modal {
  background: color-mix(in srgb, var(--glass-bg-strong) 88%, transparent);
  border: 1px solid color-mix(in srgb, var(--glass-border) 75%, transparent);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-3), var(--glass-glow);
  backdrop-filter: blur(var(--blur-lg)) saturate(170%);
  -webkit-backdrop-filter: blur(var(--blur-lg)) saturate(170%);
}

.glass-button,
.glass-button-primary {
  position: relative;
  overflow: hidden;
  border-radius: 999px;
}

.glass-input {
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: color-mix(in srgb, var(--glass-bg-strong) 80%, transparent);
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 12px 22px rgba(2, 6, 12, 0.35);
  backdrop-filter: blur(var(--blur-sm)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(160%);
}

/* Keep decorative pseudo-layers aligned to host corner radius. */
:where(
  .glass-panel,
  .glass-card,
  .glass-nav,
  .glass-modal,
  .glass-button,
  .glass-button-primary,
  .btn,
  .btn-primary,
  .btn-ghost,
  .btn-outline,
  .btn-chip,
  .pill,
  .toggle,
  .cyno-select__button,
  .cyno-select__panel,
  .cyno-select__option,
  .hint-popover,
  .context-menu,
  .find-overlay,
  .catalog-media,
  .catalog-media-frame,
  .store-3d-front,
  .store-3d-card,
  .preview-3d-front,
  .preview-3d-face,
  .spline-stage,
  .landing-spline-shell,
  .plan-card,
  .plan-option,
  .service-card,
  .status-row,
  .message-item,
  .ticket-item,
  .profile-row,
  .auth-card
)::before,
:where(
  .glass-panel,
  .glass-card,
  .glass-nav,
  .glass-modal,
  .glass-button,
  .glass-button-primary,
  .btn,
  .btn-primary,
  .btn-ghost,
  .btn-outline,
  .btn-chip,
  .pill,
  .toggle,
  .cyno-select__button,
  .cyno-select__panel,
  .cyno-select__option,
  .hint-popover,
  .context-menu,
  .find-overlay,
  .catalog-media,
  .catalog-media-frame,
  .store-3d-front,
  .store-3d-card,
  .preview-3d-front,
  .preview-3d-face,
  .spline-stage,
  .landing-spline-shell,
  .plan-card,
  .plan-option,
  .service-card,
  .status-row,
  .message-item,
  .ticket-item,
  .profile-row,
  .auth-card
)::after {
  border-radius: inherit;
}

@media (prefers-reduced-motion: reduce) {
  .glass-panel::after {
    animation: none;
  }

  .btn,
  .glass-button {
    transition: none;
  }
}

.panel-body {
  padding: 20px;
  display: grid;
  gap: 16px;
  position: relative;
  z-index: 1;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 20px 12px;
}

.panel-header h3 {
  margin: 0 0 6px;
  font-size: 15px;
}

.panel-header p {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
}

.panel-header + .panel-body {
  padding-top: 12px;
}

.panel-body,
.metric-label,
.metric-value,
.status-meta,
.status-name,
.message-title,
.message-preview,
.thread-meta,
.catalog-title,
.catalog-value {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.field {
  display: grid;
  gap: 10px;
}

.field label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
}

.toggle-label {
  font-size: 12px;
  color: var(--text-soft);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.toggle {
  padding: 10px 12px;
  border-radius: var(--radius-xs);
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 78%, transparent);
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 12px 24px rgba(2, 6, 12, 0.4);
  backdrop-filter: blur(var(--blur-sm)) saturate(155%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(155%);
}

.tilt-card {
  --tilt-x: 0;
  --tilt-y: 0;
  --tilt-scale: 1;
  transform-style: preserve-3d;
  transform: rotateX(calc(var(--tilt-y) * 1deg)) rotateY(calc(var(--tilt-x) * 1deg)) scale(var(--tilt-scale));
  transition: transform 0.35s ease;
  will-change: transform;
}

.tilt-card.is-tilting {
  transition: transform 0.08s ease;
}

.tilt-layer {
  transform: translateZ(18px);
}

@media (prefers-reduced-motion: reduce) {
  .tilt-card,
  .tilt-card.is-tilting {
    transition: none;
    transform: none;
  }
}

.glass-input,
.catalog-search input,
.field input,
.field select,
.field textarea,
.thread-search,
.thread-input input {
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: linear-gradient(145deg, color-mix(in srgb, var(--glass-bg-strong) 86%, transparent), color-mix(in srgb, var(--glass-bg) 72%, transparent));
  color: var(--text);
  padding: 11px 14px;
  font-size: 13px;
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 14px 28px rgba(2, 6, 12, 0.38);
  backdrop-filter: blur(var(--blur-sm)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(160%);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.thread-input input {
  flex: 1;
}

.glass-input:focus,
.catalog-search input:focus,
.field input:focus,
.field select:focus,
.field textarea:focus,
.thread-search:focus,
.thread-input input:focus {
  outline: none;
}

.glass-input:focus-visible,
.catalog-search input:focus-visible,
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible,
.thread-search:focus-visible,
.thread-input input:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--glass-border));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent), 0 0 18px rgba(123, 220, 255, 0.25), 0 18px 32px rgba(2, 6, 12, 0.45);
}

.field input::placeholder,
.field textarea::placeholder,
.thread-input input::placeholder,
.thread-search::placeholder {
  color: color-mix(in srgb, var(--text-muted) 85%, transparent);
}

select {
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: linear-gradient(145deg, color-mix(in srgb, var(--glass-bg-strong) 86%, transparent), color-mix(in srgb, var(--glass-bg) 72%, transparent));
  color: var(--text);
  padding: 11px 40px 11px 14px;
  font-size: 13px;
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 14px 28px rgba(2, 6, 12, 0.38);
  backdrop-filter: blur(var(--blur-sm)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(160%);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

select:not([multiple]):not([size]) {
  appearance: none;
  padding-right: 40px;
  background-image:
    linear-gradient(45deg, transparent 50%, color-mix(in srgb, var(--text-muted) 75%, transparent) 50%),
    linear-gradient(135deg, color-mix(in srgb, var(--text-muted) 75%, transparent) 50%, transparent 50%),
    linear-gradient(90deg, color-mix(in srgb, var(--glass-border) 60%, transparent), color-mix(in srgb, var(--glass-border) 60%, transparent));
  background-position: right 18px center, right 12px center, right 34px center;
  background-size: 6px 6px, 6px 6px, 1px 55%;
  background-repeat: no-repeat;
}

select[multiple],
select[size] {
  border-radius: var(--radius-md);
  min-height: 160px;
  padding: 10px 12px;
  appearance: auto;
  background-image: none;
  overflow: auto;
  scrollbar-gutter: stable;
}

select:focus {
  outline: none;
}

select:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--glass-border));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent), 0 0 18px rgba(123, 220, 255, 0.25), 0 18px 32px rgba(2, 6, 12, 0.45);
}

select option,
select optgroup {
  background-color: var(--bg-1);
  color: var(--text);
}

/* Custom select (replaces native <select> dropdown to avoid OS resize cursors like sizeNS). */
.cyno-select {
  position: relative;
  width: 100%;
}

.cyno-select > select {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
}

.cyno-select__button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: linear-gradient(145deg, color-mix(in srgb, var(--glass-bg-strong) 86%, transparent), color-mix(in srgb, var(--glass-bg) 72%, transparent));
  color: var(--text);
  padding: 11px 14px;
  font-size: 13px;
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 14px 28px rgba(2, 6, 12, 0.38);
  backdrop-filter: blur(var(--blur-sm)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(160%);
  position: relative;
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, translate 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.cyno-select__button:focus {
  outline: none;
}

.cyno-select__button:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--glass-border));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent), 0 0 18px rgba(123, 220, 255, 0.25), 0 18px 32px rgba(2, 6, 12, 0.45);
}

.cyno-select__label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}

.cyno-select__chevron {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  position: relative;
}

.cyno-select__chevron::before,
.cyno-select__chevron::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 8px;
  height: 2px;
  background: color-mix(in srgb, var(--text-muted) 80%, transparent);
  transform-origin: center;
}

.cyno-select__chevron::before {
  left: 3px;
  transform: translateY(-50%) rotate(45deg);
}

.cyno-select__chevron::after {
  right: 3px;
  transform: translateY(-50%) rotate(-45deg);
}

.cyno-select.is-open .cyno-select__chevron {
  transform: rotate(180deg);
}

.cyno-select__panel {
  /* Rendered into document.body (see app.js) to avoid being clipped by ancestor overflow. */
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10020;
  max-height: 320px;
  overflow: auto;
  padding: 10px;
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--glass-border) 82%, transparent);
  background:
    radial-gradient(120% 90% at 12% 8%, rgba(123, 220, 255, 0.14), transparent 58%),
    linear-gradient(145deg, color-mix(in srgb, var(--glass-bg-strong) 94%, transparent), color-mix(in srgb, var(--glass-bg) 86%, transparent));
  box-shadow: 0 24px 54px rgba(2, 6, 12, 0.62), 0 0 38px rgba(123, 220, 255, 0.12), inset 0 0 0 1px var(--border-inner);
  backdrop-filter: blur(var(--blur-md)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--blur-md)) saturate(160%);
  display: none;
  cursor: default;
}

/* Visibility is toggled via JS because the panel is not a DOM child of .cyno-select. */

.cyno-select__option {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  border: 1px solid transparent;
  border-radius: var(--radius-xs);
  padding: 10px 12px;
  font-size: 12px;
  color: var(--text);
  background: color-mix(in srgb, var(--glass-bg) 35%, transparent);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, translate 0.2s ease;
}

.cyno-select__option:hover {
  background: color-mix(in srgb, var(--accent) 15%, var(--glass-bg) 85%);
  translate: 2px 0;
}

.cyno-select__option:focus {
  outline: none;
}

.cyno-select__option:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  background: color-mix(in srgb, var(--accent) 14%, var(--glass-bg) 86%);
}

.cyno-select__option.is-selected {
  background: color-mix(in srgb, var(--accent) 20%, var(--glass-bg) 80%);
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
}

.cyno-select__option:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

input[type="file"] {
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: color-mix(in srgb, var(--glass-bg-strong) 80%, transparent);
  color: var(--text);
  padding: 10px 12px;
  font-size: 12px;
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 12px 22px rgba(2, 6, 12, 0.35);
  backdrop-filter: blur(var(--blur-sm)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(160%);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  cursor: pointer;
}

input[type="file"]::file-selector-button,
input[type="file"]::-webkit-file-upload-button {
  margin-right: 10px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 60%, transparent);
  background: linear-gradient(150deg, color-mix(in srgb, var(--glass-bg-strong) 82%, transparent), color-mix(in srgb, var(--glass-bg) 70%, transparent));
  color: var(--text);
  padding: 8px 14px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(2, 6, 12, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  font-family: var(--font-sans);
}

input[type="file"]:focus {
  outline: none;
}

input[type="file"]:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--glass-border));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent), 0 0 18px rgba(123, 220, 255, 0.25), 0 18px 32px rgba(2, 6, 12, 0.45);
}

/* --- Checkboxes / radios --- */

input[type="radio"] {
  accent-color: var(--accent);
}

input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: linear-gradient(
    160deg,
    color-mix(in srgb, var(--glass-bg-strong) 84%, transparent),
    color-mix(in srgb, var(--glass-bg) 68%, transparent)
  );
  box-shadow: 0 10px 22px rgba(2, 6, 12, 0.28), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  display: inline-grid;
  place-content: center;
  vertical-align: middle;
  transform: translateZ(0);
  transition: transform 120ms ease, border-color 180ms ease, background 220ms ease, box-shadow 220ms ease;
}

input[type="checkbox"]::after {
  content: "";
  width: 9px;
  height: 5px;
  border-left: 2px solid rgba(4, 16, 24, 0.92);
  border-bottom: 2px solid rgba(4, 16, 24, 0.92);
  transform: rotate(-45deg) scale(0);
  transform-origin: center;
  opacity: 0;
  transition: transform 160ms ease, opacity 160ms ease;
}

input[type="checkbox"]:hover {
  border-color: color-mix(in srgb, var(--accent) 32%, var(--glass-border));
  box-shadow: 0 12px 26px rgba(2, 6, 12, 0.38), 0 0 22px rgba(123, 220, 255, 0.14), inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

input[type="checkbox"]:focus-visible {
  outline: none;
  border-color: color-mix(in srgb, var(--accent) 55%, var(--glass-border));
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--accent) 32%, transparent),
    0 0 18px rgba(123, 220, 255, 0.22),
    0 12px 26px rgba(2, 6, 12, 0.38),
    inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

input[type="checkbox"]:active {
  transform: scale(0.96);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent), 0 0 26px rgba(123, 220, 255, 0.28), 0 14px 30px rgba(2, 6, 12, 0.45);
}

input[type="checkbox"]:checked {
  border-color: color-mix(in srgb, var(--accent) 60%, transparent);
  background: linear-gradient(
    130deg,
    color-mix(in srgb, var(--accent) 74%, #0d1a2a),
    color-mix(in srgb, var(--accent-2) 58%, #0d1a2a)
  );
  box-shadow: 0 16px 34px rgba(2, 6, 12, 0.42), 0 0 22px rgba(123, 220, 255, 0.26);
  animation: checkbox-flash 420ms ease;
}

input[type="checkbox"]:checked::after {
  opacity: 1;
  transform: rotate(-45deg) scale(1);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes checkbox-flash {
  0% {
    box-shadow: 0 0 0 0 rgba(123, 220, 255, 0.0), 0 16px 34px rgba(2, 6, 12, 0.38);
  }
  35% {
    box-shadow: 0 0 0 3px rgba(123, 220, 255, 0.18), 0 0 28px rgba(123, 220, 255, 0.28), 0 18px 40px rgba(2, 6, 12, 0.52);
  }
  100% {
    box-shadow: 0 16px 34px rgba(2, 6, 12, 0.42), 0 0 22px rgba(123, 220, 255, 0.26);
  }
}

/* ============================================================
   Luxury Glassmorphism Button System
   ============================================================ */

/* ── Base Button ── */
.glass-button,
.btn {
  --agx: 0px;
  --agy: 0px;
  --liquid-x: 50%;
  --liquid-y: 50%;
  --btn-glow-pulse-color: rgba(123, 220, 255, 0.15);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: var(--btn-padding-base);
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 72%, transparent);
  background: linear-gradient(155deg, color-mix(in srgb, var(--glass-bg-strong) 84%, transparent), color-mix(in srgb, var(--glass-bg) 74%, transparent));
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--btn-font-base);
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0.02em;
  white-space: nowrap;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: 0 16px 34px rgba(2, 6, 12, 0.4), inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(var(--blur-md)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--blur-md)) saturate(160%);
  translate: var(--agx) var(--agy);
  max-width: 100%;
  transition:
    transform 0.3s var(--btn-transition-spring),
    border-color 0.3s ease,
    background 0.3s ease,
    box-shadow 0.3s ease,
    translate 0.24s var(--btn-transition-spring);
}

/* On narrow screens, let button labels wrap instead of being clipped by the
   button's `overflow: hidden` when a flex/grid cell can't give them full width
   (e.g. "Submit Reset Request" on the profile/dashboard HWID forms at ~430px). */
@media (max-width: 480px) {
  .btn { white-space: normal; text-align: center; line-height: 1.25; }
}

/* Hover — lift + glow */
.btn:hover,
.glass-button:hover {
  transform: translateY(-3px) scale(1.02);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--glass-border));
  box-shadow:
    0 20px 40px rgba(2, 6, 12, 0.5),
    0 0 30px rgba(123, 220, 255, 0.18),
    var(--glass-glow),
    inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

/* Active — press down */
.btn:active,
.glass-button:active,
.glass-button-primary:active {
  transform: translateY(-1px) scale(0.98);
  transition-duration: 0.1s;
}
.btn-primary:active,
.btn-secondary:active,
.btn-ghost:active,
.btn-outline:active {
  transform: scale(0.98);
  transition-duration: 0.1s;
}

/* Focus-visible — accessibility ring */
.glass-button:focus-visible,
.glass-button-primary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.btn:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 65%, transparent);
  outline-offset: 2px;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent), 0 0 18px rgba(123, 220, 255, 0.25);
}

/* Shimmer layer (light highlight) */
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(145px 85px at var(--liquid-x) var(--liquid-y), rgba(255, 255, 255, 0.34), transparent 62%),
    linear-gradient(120deg, rgba(255, 255, 255, 0.22), transparent 42%),
    linear-gradient(240deg, rgba(123, 220, 255, 0.12), transparent 48%);
  opacity: 0.42;
  pointer-events: none;
  transition: opacity 0.22s ease;
}
.btn:hover::before,
.glass-button:hover::before {
  opacity: 0.6;
}

/* ─ Primary Button ── */
.glass-button-primary,
.btn-primary {
  background: linear-gradient(130deg, color-mix(in srgb, var(--accent) 68%, #0d1a2a), color-mix(in srgb, var(--accent-2) 72%, #0d1a2a));
  border-color: color-mix(in srgb, var(--accent) 60%, transparent);
  color: #041018;
  font-weight: 600;
  box-shadow:
    0 16px 34px rgba(4, 10, 20, 0.4),
    0 0 28px rgba(123, 220, 255, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.btn-primary:hover {
  box-shadow:
    0 22px 44px rgba(4, 10, 20, 0.5),
    0 0 40px rgba(123, 220, 255, 0.35),
    0 0 80px rgba(123, 220, 255, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.btn-primary:focus-visible {
  box-shadow:
    0 0 0 3px rgba(123, 220, 255, 0.25),
    0 0 30px rgba(123, 220, 255, 0.15),
    var(--btn-shadow, none);
}

/* Liquid fill sweep on hover */
.btn-primary {
  position: relative;
  overflow: hidden;
}
.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 60%);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}
.btn-primary:hover::after {
  opacity: 1;
}

/* ─ Ghost Button ── */
.btn-ghost {
  background: color-mix(in srgb, var(--glass-bg) 35%, transparent);
  border-color: color-mix(in srgb, var(--glass-border) 55%, transparent);
  color: var(--text-soft);
}
.btn-ghost:focus-visible {
  box-shadow:
    0 0 0 3px rgba(123, 220, 255, 0.15),
    0 0 15px rgba(123, 220, 255, 0.08);
}

/* ── Outline Button ── */
.btn-outline {
  background: color-mix(in srgb, var(--glass-bg) 25%, transparent);
  border-color: color-mix(in srgb, var(--glass-border) 85%, transparent);
  color: var(--text);
}

/* ── Secondary Button ── */
.btn-secondary:focus-visible {
  box-shadow:
    0 0 0 3px rgba(123, 220, 255, 0.2),
    0 0 20px rgba(123, 220, 255, 0.1);
}

/* ── Chip Button ── */
.btn.btn-chip {
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0.06em;
  border: none;
  background: none;
  color: var(--text-muted);
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-radius: 0;
}
.btn.btn-chip.is-active {
  border: none;
  background: none;
  color: var(--accent, #7bdcff);
  box-shadow: none;
}
.btn-chip:active {
  transform: scale(0.97);
  transition-duration: 0.1s;
}

/* ── Size Modifiers ── */
.btn-xs {
  padding: var(--btn-padding-xs);
  font-size: var(--btn-font-xs);
  line-height: 1;
}
.btn-sm {
  padding: var(--btn-padding-sm);
  font-size: var(--btn-font-sm);
}
.btn-lg {
  padding: var(--btn-padding-lg);
  font-size: var(--btn-font-lg);
  font-weight: 700;
}
.btn-xl {
  padding: var(--btn-padding-xl);
  font-size: var(--btn-font-xl);
  font-weight: 700;
}

/* ── Status Color Variants ── */
.btn-success {
  background: var(--btn-success-bg);
  border-color: var(--btn-success-border);
  color: color-mix(in srgb, var(--status-success) 90%, #e8f6f1);
  --btn-glow-pulse-color: var(--btn-success-glow);
}
.btn-success:hover {
  box-shadow:
    0 20px 40px rgba(2, 6, 12, 0.5),
    0 0 var(--btn-glow-spread) var(--btn-success-glow),
    var(--glass-glow);
  border-color: color-mix(in srgb, var(--status-success) 55%, var(--glass-border));
}

.btn-warning {
  background: var(--btn-warning-bg);
  border-color: var(--btn-warning-border);
  color: color-mix(in srgb, var(--status-warning) 90%, #f7efe2);
  --btn-glow-pulse-color: var(--btn-warning-glow);
}
.btn-warning:hover {
  box-shadow:
    0 20px 40px rgba(2, 6, 12, 0.5),
    0 0 var(--btn-glow-spread) var(--btn-warning-glow),
    var(--glass-glow);
  border-color: color-mix(in srgb, var(--status-warning) 55%, var(--glass-border));
}

.btn-danger {
  background: var(--btn-danger-bg);
  border-color: var(--btn-danger-border);
  color: color-mix(in srgb, var(--status-danger) 90%, #f4e6e9);
  --btn-glow-pulse-color: var(--btn-danger-glow);
}
.btn-danger:hover {
  box-shadow:
    0 20px 40px rgba(2, 6, 12, 0.5),
    0 0 var(--btn-glow-spread) var(--btn-danger-glow),
    var(--glass-glow);
  border-color: color-mix(in srgb, var(--status-danger) 55%, var(--glass-border));
}

/* ── Icon-Only Buttons ── */
.btn-icon-only {
  width: var(--btn-icon-size);
  height: var(--btn-icon-size);
  padding: 0;
  border-radius: 50%;
}
.btn-icon-only svg,
.btn-icon-only .btn-icon {
  width: 18px;
  height: 18px;
}
.btn-icon-only.btn-sm {
  width: var(--btn-icon-size-sm);
  height: var(--btn-icon-size-sm);
}
.btn-icon-only.btn-sm svg,
.btn-icon-only.btn-sm .btn-icon {
  width: 14px;
  height: 14px;
}
.btn-icon-only.btn-lg {
  width: var(--btn-icon-size-lg);
  height: var(--btn-icon-size-lg);
}
.btn-icon-only.btn-lg svg,
.btn-icon-only.btn-lg .btn-icon {
  width: 22px;
  height: 22px;
}

/* ── Gradient Border Button ── */
.btn-gradient-border {
  position: relative;
  background: color-mix(in srgb, var(--glass-bg) 30%, transparent);
  border: none;
  z-index: 1;
}
.btn-gradient-border::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2), var(--accent-3), var(--accent));
  background-size: 300% 300%;
  animation: btnBorderShimmer var(--btn-border-shimmer-speed) ease infinite;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: -1;
}
.btn-gradient-border:hover::before {
  animation-duration: 1.5s;
}

/* ── Loading State ── */
.btn.is-loading {
  pointer-events: none;
  color: transparent !important;
}
.btn.is-loading::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid color-mix(in srgb, var(--glass-border) 30%, transparent);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: btnSpin 0.7s linear infinite;
  pointer-events: none;
}
.btn-primary.is-loading::after {
  border-top-color: #041018;
  border-color: rgba(255, 255, 255, 0.3);
}

/* ── Disabled State ── */
.btn:disabled,
.btn.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
  pointer-events: none;
}
.btn:disabled::before,
.btn.is-disabled::before,
.btn:disabled::after,
.btn.is-disabled::after {
  animation: none !important;
  opacity: 0 !important;
}

/* ── Luxury Button ── */
.btn-luxury {
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--accent-3) 30%, var(--glass-bg-strong)),
    color-mix(in srgb, var(--accent) 20%, var(--glass-bg-strong)),
    color-mix(in srgb, var(--accent-2) 25%, var(--glass-bg-strong))
  );
  background-size: 200% 200%;
  animation: btnCausticRipple 4s ease-in-out infinite;
  border-color: color-mix(in srgb, var(--accent-3) 40%, var(--accent) 30%, transparent);
  color: var(--text);
  box-shadow:
    0 16px 34px rgba(2, 6, 12, 0.4),
    0 0 28px color-mix(in srgb, var(--accent-3) 15%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.btn-luxury::before {
  background:
    radial-gradient(145px 85px at var(--liquid-x) var(--liquid-y), rgba(217, 183, 77, 0.35), transparent 62%),
    linear-gradient(120deg, rgba(255, 255, 255, 0.25), transparent 42%),
    linear-gradient(240deg, rgba(217, 183, 77, 0.15), transparent 48%);
}
.btn-luxury::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), rgba(217, 183, 77, 0.1), transparent);
  transform: skewX(-15deg);
  pointer-events: none;
}
.btn-luxury:hover::after {
  animation: btnShineSweep var(--btn-shine-duration) ease forwards;
}
.btn-luxury:hover {
  box-shadow:
    0 22px 44px rgba(2, 6, 12, 0.5),
    0 0 40px color-mix(in srgb, var(--accent-3) 20%, transparent),
    0 0 80px color-mix(in srgb, var(--accent) 10%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  border-color: color-mix(in srgb, var(--accent-3) 50%, var(--accent) 40%, transparent);
}

/* ── Icon Toggle Pill Group ──
   Usage:
   <div class="icon-toggle-pill">
     <button class="icon-toggle-pill__btn" aria-label="Notifications">
       <svg>...</svg>
     </button>
     <button class="icon-toggle-pill__btn is-active" aria-label="Toggle">
       <svg>...</svg>
     </button>
   </div>
*/
.icon-toggle-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px;
  border-radius: 999px;
  background: var(--toggle-pill-bg);
  border: 1px solid var(--toggle-pill-border);
  backdrop-filter: blur(var(--blur-md)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--blur-md)) saturate(160%);
  box-shadow:
    inset 0 0 0 1px var(--border-inner),
    0 8px 24px rgba(2, 6, 12, 0.35),
    0 0 0 1px color-mix(in srgb, var(--accent) 8%, transparent);
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}
.icon-toggle-pill:hover {
  border-color: color-mix(in srgb, var(--accent) 25%, var(--toggle-pill-border));
  box-shadow:
    inset 0 0 0 1px var(--border-inner),
    0 10px 28px rgba(2, 6, 12, 0.45),
    0 0 0 1px color-mix(in srgb, var(--accent) 12%, transparent),
    0 0 20px color-mix(in srgb, var(--accent) 8%, transparent);
}

.icon-toggle-pill__btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid transparent;
  background: var(--toggle-pill-btn-bg);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition:
    background var(--transition-base),
    border-color var(--transition-base),
    color var(--transition-base),
    transform var(--transition-fast) var(--btn-transition-spring),
    box-shadow var(--transition-base);
}
.icon-toggle-pill__btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.icon-toggle-pill__btn:hover {
  background: color-mix(in srgb, var(--glass-bg-strong) 70%, transparent);
  border-color: color-mix(in srgb, var(--accent) 20%, transparent);
  color: var(--text);
  transform: scale(1.05);
}
.icon-toggle-pill__btn:active {
  transform: scale(0.95);
  transition-duration: 0.08s;
}
.icon-toggle-pill__btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.icon-toggle-pill__btn.is-active {
  background: var(--toggle-pill-btn-active-bg);
  border-color: var(--toggle-pill-btn-active-border);
  color: var(--accent);
  box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 15%, transparent);
}
.icon-toggle-pill__btn.is-active:hover {
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  border-color: color-mix(in srgb, var(--accent) 50%, transparent);
  box-shadow: 0 0 16px color-mix(in srgb, var(--accent) 20%, transparent);
}

/* Glow ring pulse on active toggle */
.icon-toggle-pill__btn.is-active::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 1.5px solid color-mix(in srgb, var(--accent) 30%, transparent);
  animation: btnGlowPulse 2s ease-in-out infinite;
  pointer-events: none;
}

/* Sliding indicator variant */
.icon-toggle-pill--sliding {
  position: relative;
}
.icon-toggle-pill--sliding .icon-toggle-pill__indicator {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--toggle-pill-btn-active-bg);
  border: 1px solid var(--toggle-pill-btn-active-border);
  box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 15%, transparent);
  transition: transform 0.35s var(--btn-transition-spring);
  pointer-events: none;
  z-index: 0;
}
.icon-toggle-pill--sliding[data-active-index="1"] .icon-toggle-pill__indicator {
  transform: translateX(calc(36px + 4px));
}
.icon-toggle-pill--sliding .icon-toggle-pill__btn {
  z-index: 1;
  background: transparent;
  border-color: transparent;
}
.icon-toggle-pill--sliding .icon-toggle-pill__btn.is-active {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  color: var(--accent);
}

/* ── Pill (non-button badge) ── */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
  color: var(--text-muted);
  background: none;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.pill:hover {
  border: none;
  transform: none;
  box-shadow: none;
}
.pill:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 60%, transparent);
  outline-offset: 2px;
}

/* ── Status Pills ── */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
  justify-content: center;
  background: none;
  border: none;
  box-shadow: none;
}
.status-pill--operational {
  background: none;
  border: none;
  color: color-mix(in srgb, var(--status-success) 85%, #e8f6f1 15%);
}
.status-pill--monitoring,
.status-pill--updating {
  background: none;
  border: none;
  color: color-mix(in srgb, var(--status-warning) 86%, #f7efe2 14%);
}
.status-pill--offline {
  background: none;
  border: none;
  color: color-mix(in srgb, var(--status-danger) 86%, #f4e6e9 14%);
}
.status-pill--discontinued {
  background: none;
  border: none;
  color: color-mix(in srgb, var(--status-muted) 86%, #e4eaf4 14%);
}

/* ─ Status Dots ── */
.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--status-muted);
}
.status-dot--live {
  background: var(--status-success);
  box-shadow: 0 0 10px color-mix(in srgb, var(--status-success) 70%, transparent);
  animation: statusPulse 1.6s ease-in-out infinite;
}
.status-dot--warning {
  background: var(--status-warning);
  box-shadow: 0 0 10px color-mix(in srgb, var(--status-warning) 70%, transparent);
  animation: statusPulse 2s ease-in-out infinite;
}
.status-dot--danger {
  background: var(--status-danger);
  box-shadow: 0 0 10px color-mix(in srgb, var(--status-danger) 70%, transparent);
  animation: statusPulse 2.2s ease-in-out infinite;
}

@keyframes statusPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.85;
  }
  50% {
    transform: scale(1.2);
    opacity: 1;
  }
}


.eyebrow {
  display: inline-block;
  padding: 0;
  border-radius: 0;
  background: none;
  border: none;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(123, 220, 255, 0.9);
}

/* Gradient text for primary headings */
.heading-gradient {
  background: linear-gradient(135deg, #ffffff 0%, #7bdcff 50%, #8de6d6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Hero text glow */
.hero-text-glow {
  text-shadow: 0 0 40px rgba(123, 220, 255, 0.25), 0 0 80px rgba(123, 220, 255, 0.08);
}

/* Gradient title utility */
.gradient-title {
  font-family: var(--font-display);
  background: linear-gradient(135deg, var(--text) 30%, var(--accent) 70%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.metric-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
}

.progress {
  height: 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--glass) 55%, transparent);
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.progress span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 12px rgba(123, 220, 255, 0.4), 0 0 4px rgba(123, 220, 255, 0.6);
  position: relative;
}

.progress span::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent 60%, rgba(255, 255, 255, 0.3));
  animation: holoShimmer 3s ease-in-out infinite;
  background-size: 200% 100%;
}

.is-hidden {
  display: none !important;
}

.is-disabled {
  opacity: 0.5;
  pointer-events: none;
}

.timeline-list {
  display: grid;
  gap: 8px;
}

.timeline-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 74%, transparent);
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 12px 24px rgba(2, 6, 12, 0.35);
  font-size: 12px;
  backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(150%);
}

.timeline-meta {
  font-size: 11px;
  color: var(--text-muted);
}

.detail-card {
  padding: 20px;
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 78%, transparent);
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 12px 24px rgba(2, 6, 12, 0.4);
  display: grid;
  gap: 6px;
  backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(150%);
}

.thread-header {
  display: grid;
  gap: 6px;
}

.thread-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.thread-body {
  display: grid;
  gap: 10px;
  max-height: 360px;
  overflow: auto;
  padding-right: 6px;
  scrollbar-gutter: stable;
}

.thread-input {
  display: flex;
  gap: 8px;
  align-items: center;
}

.thread-input textarea {
  flex: 1;
  min-height: 44px;
  resize: vertical;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: color-mix(in srgb, var(--glass-bg-strong) 80%, transparent);
  color: var(--text);
  padding: 10px 14px;
  font-size: 12px;
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 12px 22px rgba(2, 6, 12, 0.35);
  backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(150%);
}

.thread-input textarea:focus {
  outline: none;
}

.thread-input textarea:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--glass-border));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent), 0 0 18px rgba(123, 220, 255, 0.25), 0 16px 28px rgba(2, 6, 12, 0.45);
}

.thread-toolbar,
.thread-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 75%, transparent);
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 10px 20px rgba(2, 6, 12, 0.35);
  backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(150%);
}

.message-row {
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 78%, transparent);
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 12px 24px rgba(2, 6, 12, 0.4);
  font-size: 12px;
  backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(150%);
}

.message-author {
  font-weight: 600;
}

.message-text {
  color: var(--text-soft);
}

.message-time {
  font-size: 11px;
  color: var(--text-muted);
}

/* ============================================================
   Luxury Glassmorphism Toggle — Shared Component
   Usage: <label class="glass-toggle"><input type="checkbox"><span class="glass-slider"><span class="glass-knob"></span></span></label>
   ============================================================ */

.glass-toggle {
  position: relative;
  width: 52px;
  height: 28px;
  flex-shrink: 0;
  display: inline-block;
}

/* Global SVG icon sizing — icon containers */
.action-icon,
.role-icon,
.achievement-icon svg,
.feed-item-icon svg,
.games-hub-icon svg,
.announcement-type-badge svg {
  width: 1em;
  height: 1em;
  display: block;
}

.glass-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.glass-slider {
  position: absolute;
  inset: 0;
  cursor: pointer;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px) saturate(140%);
  -webkit-backdrop-filter: blur(8px) saturate(140%);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.06), 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), background 0.4s ease, border-color 0.4s ease;
  overflow: hidden;
}

.glass-slider::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 14px;
  background: radial-gradient(ellipse at 30% 50%, rgba(255, 255, 255, 0.15), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.glass-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.65));
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.1), inset 0 1px 2px rgba(255, 255, 255, 0.8);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), left 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 2;
}

.glass-knob::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.15));
  transition: background 0.4s ease, transform 0.4s ease, opacity 0.4s ease;
}

.glass-toggle input:checked + .glass-slider {
  background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 45%, rgba(255, 255, 255, 0.05)), color-mix(in srgb, var(--accent) 30%, rgba(255, 255, 255, 0.02)));
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 20%, transparent), 0 0 12px color-mix(in srgb, var(--accent) 15%, transparent), inset 0 1px 2px rgba(255, 255, 255, 0.1);
}

.glass-toggle input:checked + .glass-slider::before {
  opacity: 1;
}

.glass-toggle input:checked + .glass-slider .glass-knob {
  left: 27px;
  background: linear-gradient(145deg, #ffffff, color-mix(in srgb, var(--accent) 20%, #ffffff));
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent), 0 0 12px color-mix(in srgb, var(--accent) 20%, transparent), inset 0 1px 3px rgba(255, 255, 255, 1);
}

.glass-toggle input:checked + .glass-slider .glass-knob::after {
  width: 6px;
  height: 6px;
  background: color-mix(in srgb, var(--accent) 60%, #ffffff);
  box-shadow: 0 0 6px color-mix(in srgb, var(--accent) 40%, transparent);
}

.glass-toggle:hover .glass-slider {
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.1), 0 4px 12px rgba(0, 0, 0, 0.4);
}

.glass-toggle input:checked + .glass-slider:hover {
  border-color: color-mix(in srgb, var(--accent) 50%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 25%, transparent), 0 0 16px color-mix(in srgb, var(--accent) 20%, transparent), inset 0 1px 3px rgba(255, 255, 255, 0.15);
}

.glass-toggle input:focus-visible + .glass-slider {
  outline: 2px solid color-mix(in srgb, var(--accent) 60%, transparent);
  outline-offset: 3px;
}

.message-title {
  font-size: 13px;
  font-weight: 600;
}

.message-preview {
  font-size: 12px;
  color: var(--text-muted);
}

.find-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* Icon stays centered while the label is collapsed (gap only on expand). */
  gap: 0;
  padding: 8px 14px;
  position: relative;
  min-width: 40px;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  color: rgba(255, 255, 255, 0.38);
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-sans, "Manrope", sans-serif);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: none;
  backdrop-filter: blur(8px) saturate(120%);
  -webkit-backdrop-filter: blur(8px) saturate(120%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), background 0.4s ease, border-color 0.4s ease;
}

.sound-toggle {
  display: inline-flex;
  align-items: center;
  /* Same rationale as .find-toggle: keep icon centered while label is collapsed. */
  gap: 0;
  padding: 8px 12px;
  justify-content: center;
  min-width: 40px;
  overflow: hidden;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: color-mix(in srgb, var(--glass) 70%, transparent);
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: none;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 10px 22px rgba(2, 6, 12, 0.35);
  backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  transition: border-color 1.25s ease, box-shadow 1.25s ease, transform 1.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.sound-icon {
  position: relative;
  width: 16px;
  height: 16px;
  border-radius: 5px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 65%, transparent);
  background: color-mix(in srgb, var(--glass-bg-strong) 35%, transparent);
  box-sizing: border-box;
  opacity: 0.95;
}

.sound-icon::before {
  content: "";
  position: absolute;
  inset: 2px;
  background: currentColor;
  border-radius: 2px;
  opacity: 0.92;
  /*
    Clean speaker glyph using a mask so it inherits currentColor.
    The data-sound-level attribute swaps the wave count.
  */
  -webkit-mask: var(--sound-glyph) center / contain no-repeat;
  mask: var(--sound-glyph) center / contain no-repeat;
}

.sound-toggle[data-sound-level="subtle"] .sound-icon {
  --sound-glyph: url('data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 12 12%22%3E%3Cg fill=%22none%22 stroke=%22%23000%22 stroke-width=%221.4%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M2.4 4.9H4.1L6.2 3.3v5.4L4.1 7.1H2.4z%22/%3E%3Cpath d=%22M8.2 4.6c.55.45.55 2.35 0 2.8%22/%3E%3C/g%3E%3C/svg%3E');
}

.sound-toggle[data-sound-level="normal"] .sound-icon {
  --sound-glyph: url('data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 12 12%22%3E%3Cg fill=%22none%22 stroke=%22%23000%22 stroke-width=%221.4%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M2.4 4.9H4.1L6.2 3.3v5.4L4.1 7.1H2.4z%22/%3E%3Cpath d=%22M8.1 4.2c.8.65.8 2.95 0 3.6%22/%3E%3Cpath d=%22M9.5 3.2c1.35 1.1 1.35 4.5 0 5.6%22/%3E%3C/g%3E%3C/svg%3E');
}

.sound-toggle[data-sound-level="off"] .sound-icon {
  --sound-glyph: url('data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 12 12%22%3E%3Cpath d=%22M2.4 4.9H4.1L6.2 3.3v5.4L4.1 7.1H2.4z%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%221.4%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22/%3E%3C/svg%3E');
}


.sound-label {
  max-width: 0;
  min-width: 0;
  opacity: 0;
  white-space: nowrap;
  overflow: hidden;
  transform: translateX(-6px);
  transition: max-width 1.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 1.05s ease, transform 1.25s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  display: inline-block;
}

.sound-toggle:hover .sound-label,
.sound-toggle:focus-visible .sound-label {
  max-width: 160px;
  opacity: 1;
  transform: translateX(0);
}

.sound-toggle:hover,
.sound-toggle:focus-visible {
  gap: 6px;
}

.sound-toggle[data-sound-level="off"] .sound-icon {
  opacity: 0.65;
}

.sound-toggle[data-sound-level="off"] .sound-icon::before {
  opacity: 0.25;
}

.sound-toggle[data-sound-level="off"] .sound-icon::after {
  content: "";
  position: absolute;
  inset: -1px;
  background: linear-gradient(135deg, transparent 44%, currentColor 44% 56%, transparent 56%);
  opacity: 0.8;
}


.sound-toggle:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border-subtle));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 18%, transparent), 0 12px 26px rgba(2, 6, 12, 0.45);
  transform: translateY(-1px);
}

.sound-toggle:active {
  transform: translateY(0);
}

.sound-toggle:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 60%, transparent);
  outline-offset: 2px;
}

.find-icon {
  position: relative;
  width: 16px;
  height: 16px;
  border: 0;
  background: transparent;
  box-sizing: border-box;
  opacity: 1;
  flex-shrink: 0;
}

.find-icon::before {
  content: "";
  position: absolute;
  inset: 1px;
  background: currentColor;
  border-radius: 0;
  opacity: 1;
  -webkit-mask: url('data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22%3E%3Cg fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Ccircle cx=%2211%22 cy=%2211%22 r=%227%22/%3E%3Cpath d=%22M21 21l-4.3-4.3%22/%3E%3C/g%3E%3C/svg%3E') center / contain no-repeat;
  mask: url('data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22%3E%3Cg fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Ccircle cx=%2211%22 cy=%2211%22 r=%227%22/%3E%3Cpath d=%22M21 21l-4.3-4.3%22/%3E%3C/g%3E%3C/svg%3E') center / contain no-repeat;
}

.find-label {
  max-width: 0;
  min-width: 0;
  opacity: 0;
  white-space: nowrap;
  overflow: hidden;
  transform: translateX(-6px);
  transition: max-width 1s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.85s ease, transform 1s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  display: inline-block;
}

.find-toggle:hover .find-label,
.find-toggle:focus-visible .find-label,
.find-toggle.is-active .find-label {
  max-width: 120px;
  opacity: 1;
  transform: translateX(0);
}

.find-toggle:hover,
.find-toggle:focus-visible,
.find-toggle.is-active {
  gap: 8px;
  padding: 10px 18px;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--glass-bg-strong) 60%, transparent),
    color-mix(in srgb, var(--glass-bg) 40%, transparent)
  );
  color: var(--text);
  backdrop-filter: blur(var(--blur-md, 18px)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--blur-md, 18px)) saturate(160%);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--accent) 15%, transparent),
    0 8px 32px rgba(2, 6, 12, 0.4),
    0 0 24px color-mix(in srgb, var(--accent) 14%, transparent);
}

.find-toggle:active {
  transform: scale(0.98);
}

.find-toggle:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 60%, transparent);
  outline-offset: 2px;
}

.find-toggle:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.find-toggle.is-loading .find-icon {
  animation: findPulse 0.9s ease-in-out infinite;
}

@keyframes findPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.15);
  }
}

.find-overlay {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(120% 90% at 12% 10%, rgba(123, 220, 255, 0.14), transparent 58%),
    radial-gradient(120% 90% at 88% 90%, rgba(217, 183, 122, 0.12), transparent 60%),
    color-mix(in srgb, var(--overlay) 70%, transparent);
  backdrop-filter: blur(var(--blur-xl));
  -webkit-backdrop-filter: blur(var(--blur-xl));
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease;
  z-index: 90;
}

.find-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.find-panel {
  width: min(720px, calc(100% - 28px));
  padding: 24px;
  display: grid;
  gap: 14px;
  border-radius: calc(var(--radius-lg) + 4px);
  transform: translateY(12px) scale(0.985);
  transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

.find-overlay.is-open .find-panel {
  transform: translateY(0) scale(1);
}

.find-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.find-header h3 {
  margin: 4px 0 0;
  font-size: 20px;
  line-height: 1.2;
}

.find-input-wrap {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 12px;
  border-radius: var(--radius-lg);
  border: 1px solid color-mix(in srgb, var(--glass-border) 78%, transparent);
  background: linear-gradient(145deg, color-mix(in srgb, var(--glass-bg-strong) 88%, transparent), color-mix(in srgb, var(--glass-bg) 76%, transparent));
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 14px 32px rgba(2, 6, 12, 0.45);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.find-input-wrap:focus-within {
  /* No focus line: the field looks identical focused or not. The input is
     auto-focused on open so the user can type immediately, but we never draw
     an accent border/glow/ring around it. Values mirror the resting state. */
  border-color: color-mix(in srgb, var(--glass-border) 78%, transparent);
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 14px 32px rgba(2, 6, 12, 0.45);
  transform: none;
}

.find-input-icon {
  width: 18px;
  height: 18px;
  position: relative;
  color: color-mix(in srgb, var(--text-muted) 88%, transparent);
  opacity: 0.95;
}

.find-input-icon::before {
  content: "";
  position: absolute;
  left: 1px;
  top: 1px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.6px solid currentColor;
}

.find-input-icon::after {
  content: "";
  position: absolute;
  right: 1px;
  bottom: 1px;
  width: 6px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform: rotate(45deg);
  transform-origin: center;
}

.find-input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 15px;
  padding: 16px 0;
}

.find-input::placeholder {
  color: color-mix(in srgb, var(--text-muted) 84%, transparent);
}

.find-input::-webkit-search-cancel-button {
  opacity: 0.85;
  cursor: pointer;
}

.find-input-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 68%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 72%, transparent);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.find-results {
  display: grid;
  gap: 10px;
  max-height: 260px;
  overflow: auto;
  padding-right: 6px;
  scrollbar-gutter: stable;
}

.find-result {
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: linear-gradient(145deg, color-mix(in srgb, var(--glass-bg-strong) 82%, transparent), color-mix(in srgb, var(--glass-bg) 74%, transparent));
  color: var(--text);
  padding: 13px 14px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px var(--border-inner);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(150%);
}

.find-result:hover {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--border-strong));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 25%, transparent), 0 14px 30px rgba(2, 6, 12, 0.45);
  transform: translateY(-2px);
}

.find-meta {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.find-empty {
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px dashed var(--border-subtle);
  color: var(--text-muted);
  text-align: center;
  font-size: 12px;
}

.find-hint {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  opacity: 0.9;
}

.context-menu {
  position: fixed;
  min-width: 200px;
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--glass-border) 80%, transparent);
  background: color-mix(in srgb, var(--glass-bg-strong) 88%, transparent);
  box-shadow: var(--glass-shadow), var(--glass-glow), inset 0 0 0 1px var(--border-inner);
  backdrop-filter: blur(var(--blur-lg)) saturate(160%);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: var(--z-tooltip);
}

.context-menu.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.context-item {
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-soft);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.context-item:hover,
.context-item:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border-subtle));
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  outline: none;
}

.context-section {
  display: grid;
  gap: 6px;
}

.context-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 8px 0;
}

.hint-popover {
  position: fixed;
  max-width: 280px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--glass-border) 80%, transparent);
  background: color-mix(in srgb, var(--glass-bg-strong) 88%, transparent);
  box-shadow: var(--glass-shadow), var(--glass-glow), inset 0 0 0 1px var(--border-inner);
  backdrop-filter: blur(var(--blur-lg)) saturate(160%);
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px) scale(0.98);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 9997;
}

.hint-popover.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.hint-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.hint-body {
  font-size: 12px;
  color: var(--text-soft);
  line-height: 1.4;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass-panel,
  .glass-card,
  .glass-nav,
  .glass-modal,
  .topbar,
  .glass-button,
  .btn,
  .glass-input,
  .catalog-search input,
  .field input,
  .field select,
  .field textarea,
  select,
  input[type="file"],
  .thread-search,
  .thread-input input,
  .toggle,
  .detail-card,
  .thread-toolbar,
  .thread-attachments,
  .message-row,
  .context-menu,
  .hint-popover,
  .find-overlay {
    background: color-mix(in srgb, var(--surface) 92%, transparent);
  }
}

body.has-custom-cursor.is-cursor-enabled model-viewer,
body.has-custom-cursor.is-cursor-enabled .product-3d-viewer {
  cursor: none !important;
}

/* ── Luxury custom cursor ─────────────────────────────────────
   A precision-instrument cursor: a refined outer ring with a soft
   accent halo, a slowly rotating accent arc, and a crisp centre dot.
   States: .is-active (interactive hover), .is-text (caret morph). */
.cyno-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  /* faint glass ring + soft inner sheen */
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  background:
    radial-gradient(circle at 50% 50%,
      color-mix(in srgb, var(--accent) 10%, transparent) 0%,
      transparent 58%);
  box-shadow:
    0 0 0 1px rgba(6, 10, 18, 0.18),
    0 0 14px color-mix(in srgb, var(--accent) 28%, transparent),
    inset 0 0 8px color-mix(in srgb, var(--accent) 14%, transparent);
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition:
    width 0.2s cubic-bezier(0.16, 1, 0.3, 1),
    height 0.2s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.2s ease,
    border-radius 0.2s ease,
    background 0.2s ease,
    box-shadow 0.25s ease,
    opacity 0.2s ease;
  /* Sit above every overlay (select panels at 10020, modals, etc.) so the
     custom cursor is never hidden behind a dropdown or popover. */
  z-index: 2147483647;
  mix-blend-mode: normal;
  will-change: transform;
}

/* Soft accent halo that breathes — refined, not a busy spinning arc */
.cyno-cursor::before {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%,
    color-mix(in srgb, var(--accent) 22%, transparent) 0%,
    transparent 62%);
  opacity: 0.7;
  animation: cynoCursorBreathe 2.8s ease-in-out infinite;
  pointer-events: none;
}
@keyframes cynoCursorBreathe {
  0%, 100% { opacity: 0.45; transform: scale(0.92); }
  50%      { opacity: 0.85; transform: scale(1.06); }
}

/* Crisp centre dot — the actual aiming point */
.cyno-cursor::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 92%, white 8%);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 8px color-mix(in srgb, var(--accent) 70%, transparent);
  transition: width 0.18s ease, height 0.18s ease, background 0.18s ease, border-radius 0.18s ease;
}

@keyframes cynoCursorSpin {
  to { transform: rotate(360deg); }
}

.cyno-cursor.is-hidden {
  opacity: 0;
}

/* Interactive targets — ring blooms open, arc fades, dot grows into a soft disc */
.cyno-cursor.is-active {
  width: 40px;
  height: 40px;
  border-color: color-mix(in srgb, var(--accent) 70%, transparent);
  background: radial-gradient(circle at 50% 50%,
    color-mix(in srgb, var(--accent) 16%, transparent) 0%, transparent 62%);
  box-shadow:
    0 0 0 1px rgba(6, 10, 18, 0.2),
    0 0 28px color-mix(in srgb, var(--accent) 55%, transparent),
    inset 0 0 14px color-mix(in srgb, var(--accent) 22%, transparent);
}
.cyno-cursor.is-active::before {
  opacity: 0;
}
.cyno-cursor.is-active::after {
  width: 7px;
  height: 7px;
  background: color-mix(in srgb, var(--accent) 80%, white 20%);
  box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 80%, transparent);
}

/* Text targets — morph into a slim luxury caret beam */
.cyno-cursor.is-text {
  width: 4px;
  height: 22px;
  border-radius: 2px;
  border-color: transparent;
  background: linear-gradient(180deg,
    transparent,
    color-mix(in srgb, var(--accent) 78%, white 12%) 22%,
    color-mix(in srgb, var(--accent) 78%, white 12%) 78%,
    transparent);
  box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 45%, transparent);
}
.cyno-cursor.is-text::before {
  opacity: 0;
}
.cyno-cursor.is-text::after {
  opacity: 0;
}

.text-magnify {
  position: relative;
  z-index: 2;
  overflow: visible;
  transform: scale(1.04);
  transform-origin: left center;
  text-shadow: 0 0 10px rgba(125, 223, 207, 0.18);
  filter: brightness(1.12);
  transition: transform 0.12s ease, text-shadow 0.12s ease, filter 0.12s ease;
}

.text-magnify::after {
  content: "";
  position: absolute;
  inset: -2px -4px;
  border-radius: 10px;
  border: 1px solid rgba(125, 223, 207, 0.14);
  background: radial-gradient(circle at 50% 40%, rgba(125, 223, 207, 0.12), transparent 65%);
  box-shadow: 0 0 14px rgba(125, 223, 207, 0.12);
  opacity: 0.45;
  pointer-events: none;
}

.alert-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border-subtle));
  background: color-mix(in srgb, var(--accent) 10%, var(--glass-bg) 90%);
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 12px 24px rgba(2, 6, 12, 0.45);
  font-size: 12px;
  backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(150%);
}

.alert-banner strong {
  font-weight: 600;
}

.date-picker,
.date-range,
.color-picker,
.upload-zone,
.autocomplete,
.tag-input,
.rich-editor,
.code-editor,
.dual-range,
.pagination,
.rating {
  display: grid;
  gap: 10px;
}

.date-picker,
.date-range {
  position: relative;
}

.date-picker .date-input,
.date-range .date-input {
  width: 100%;
  border-radius: var(--radius-xs);
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: color-mix(in srgb, var(--glass-bg-strong) 80%, transparent);
  color: var(--text);
  padding: 10px 12px;
  font-size: 12px;
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 12px 22px rgba(2, 6, 12, 0.35);
  backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(150%);
}

.date-popover {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: min(320px, 90vw);
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--glass-border) 80%, transparent);
  background: color-mix(in srgb, var(--glass-bg-strong) 88%, transparent);
  box-shadow: var(--glass-shadow), var(--glass-glow), inset 0 0 0 1px var(--border-inner);
  backdrop-filter: blur(var(--blur-md)) saturate(160%);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 10;
}

.date-popover.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.calendar {
  display: grid;
  gap: 8px;
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.calendar-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-soft);
}

.calendar-nav {
  display: flex;
  gap: 6px;
}

.calendar-week,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.calendar-week span {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  text-align: center;
}

.calendar-day {
  border-radius: 8px;
  border: 1px solid transparent;
  background: color-mix(in srgb, var(--glass-bg) 70%, transparent);
  color: var(--text-soft);
  font-size: 11px;
  padding: 6px 0;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.calendar-day.is-muted {
  opacity: 0.4;
  cursor: default;
}

.calendar-day:hover:not(.is-muted) {
  border-color: color-mix(in srgb, var(--accent) 30%, var(--border-subtle));
  transform: translateY(-1px);
}

.calendar-day.is-selected,
.calendar-day.is-start,
.calendar-day.is-end {
  background: color-mix(in srgb, var(--accent) 20%, var(--glass) 80%);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border-subtle));
  color: var(--text);
}

.calendar-day.is-range {
  background: color-mix(in srgb, var(--accent) 10%, var(--glass) 90%);
}

.date-range-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.date-range-row .range-sep {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-muted);
}

.color-picker {
  display: flex;
  align-items: center;
  gap: 10px;
}

.color-swatch {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-subtle);
  background: linear-gradient(140deg, rgba(102, 211, 229, 0.4), rgba(125, 223, 207, 0.2));
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 10px 20px rgba(2, 6, 12, 0.4);
}

.color-picker .color-input {
  width: 48px;
  height: 38px;
  border: none;
  background: transparent;
  padding: 0;
}

.upload-zone {
  border: 1px dashed color-mix(in srgb, var(--accent) 35%, var(--glass-border));
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  color: var(--text-muted);
  background: color-mix(in srgb, var(--glass-bg) 72%, transparent);
  transition: border-color 0.2s ease, background 0.2s ease;
  cursor: pointer;
  backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(150%);
}

.upload-zone.is-dragover {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--glass-border));
  background: color-mix(in srgb, var(--accent) 10%, var(--glass-bg) 90%);
}

.upload-list {
  margin-top: 10px;
  display: grid;
  gap: 6px;
}

.upload-item {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--text-soft);
}

.progress-bar {
  height: 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--glass-bg) 70%, transparent);
  border: 1px solid color-mix(in srgb, var(--glass-border) 65%, transparent);
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--border-inner);
}

.progress-bar span {
  position: absolute;
  inset: 0;
  width: var(--value, 0%);
  background: linear-gradient(90deg, rgba(102, 211, 229, 0.9), rgba(125, 223, 207, 0.8));
  box-shadow: 0 0 10px rgba(102, 211, 229, 0.4);
}

.dual-range {
  position: relative;
}

.dual-range input[type="range"] {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  pointer-events: none;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  height: 32px;
  margin: 0;
  border: 0;
  outline: none;
  cursor: none;
}

/*
  Dual slider: fully neutralize native tracks so only the custom track/fill is visible.
  Without this, some browsers render their own thick track + default thumbs over the custom UI.
*/
.dual-range input[type="range"]::-webkit-slider-runnable-track {
  height: 8px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.dual-range input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 1px solid rgba(102, 211, 229, 0.55);
  background: color-mix(in srgb, var(--glass-bg-strong) 85%, transparent);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.35), 0 0 0 3px rgba(102, 211, 229, 0.12);
  cursor: none;
}

.dual-range input[type="range"]::-webkit-slider-thumb {
  pointer-events: auto;
}

.dual-range input[type="range"]::-moz-range-thumb {
  pointer-events: auto;
}

.dual-range input[type="range"]::-moz-range-track {
  height: 8px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.dual-range input[type="range"]::-moz-range-progress {
  height: 8px;
  background: transparent;
}

.dual-range input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 1px solid rgba(102, 211, 229, 0.55);
  background: color-mix(in srgb, var(--glass-bg-strong) 85%, transparent);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.35), 0 0 0 3px rgba(102, 211, 229, 0.12);
  cursor: none;
}

.dual-range-track {
  height: 8px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 65%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 70%, transparent);
  position: relative;
  box-shadow: inset 0 0 0 1px var(--border-inner);
  touch-action: none;
}

.dual-range-fill {
  position: absolute;
  left: var(--min, 0%);
  right: calc(100% - var(--max, 100%));
  top: 0;
  bottom: 0;
  background: linear-gradient(90deg, rgba(102, 211, 229, 0.9), rgba(125, 223, 207, 0.8));
  box-shadow: 0 0 10px rgba(102, 211, 229, 0.4);
}

.dual-range-values {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
}

.rating {
  display: flex;
  align-items: center;
  gap: 6px;
}

.rating button {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 65%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 70%, transparent);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  backdrop-filter: blur(var(--blur-sm));
  -webkit-backdrop-filter: blur(var(--blur-sm));
}

.rating button.is-active {
  color: var(--text);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border-subtle));
  background: color-mix(in srgb, var(--accent) 14%, var(--glass) 86%);
}

.tag-input {
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  background: color-mix(in srgb, var(--glass-bg) 78%, transparent);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  backdrop-filter: blur(var(--blur-sm));
  -webkit-backdrop-filter: blur(var(--blur-sm));
}

.tag-input input {
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 12px;
  flex: 1;
  min-width: 120px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 65%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 82%, transparent);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tag button {
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 12px;
}

.autocomplete {
  position: relative;
}

.autocomplete-list {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: color-mix(in srgb, var(--glass-bg-strong) 88%, transparent);
  border: 1px solid color-mix(in srgb, var(--glass-border) 75%, transparent);
  border-radius: var(--radius-md);
  box-shadow: var(--glass-shadow), var(--glass-glow);
  z-index: 8;
  backdrop-filter: blur(var(--blur-md)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--blur-md)) saturate(160%);
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.autocomplete-list.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  display: grid;
}

.autocomplete-item {
  padding: 10px 12px;
  font-size: 12px;
  cursor: pointer;
  color: var(--text-soft);
}

.autocomplete-item:hover {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

.rich-editor {
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--glass-bg) 78%, transparent);
  overflow: hidden;
  backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(150%);
}

.rich-toolbar {
  display: flex;
  gap: 6px;
  padding: 10px;
  border-bottom: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: color-mix(in srgb, var(--glass-bg-strong) 82%, transparent);
}

.rich-toolbar button {
  border: 1px solid color-mix(in srgb, var(--glass-border) 65%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--glass-bg) 40%, transparent);
  color: var(--text-soft);
  font-size: 11px;
  padding: 6px 8px;
  cursor: pointer;
}

.rich-surface {
  min-height: 120px;
  padding: 12px;
  font-size: 12px;
  color: var(--text);
}

.code-editor {
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--glass-bg-strong) 82%, transparent);
  display: grid;
  grid-template-columns: 44px 1fr;
  overflow: hidden;
  backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(150%);
}

.code-lines {
  padding: 10px 8px;
  font-size: 11px;
  color: var(--text-muted);
  text-align: right;
  border-right: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 86%, transparent);
  line-height: 1.6;
}

.code-input {
  border: none;
  background: transparent;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  padding: 10px;
  line-height: 1.6;
  resize: vertical;
  min-height: 160px;
}

.toast-container {
  position: fixed;
  right: 20px;
  bottom: 20px;
  display: grid;
  gap: 10px;
  z-index: var(--z-toast);
}

.toast {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--glass-border) 75%, transparent);
  background: color-mix(in srgb, var(--glass-bg-strong) 88%, transparent);
  box-shadow: var(--glass-shadow), var(--glass-glow);
  font-size: 12px;
  color: var(--text-soft);
  backdrop-filter: blur(var(--blur-md)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--blur-md)) saturate(160%);
}

.toast.is-success {
  border-color: color-mix(in srgb, var(--status-success) 40%, var(--border-subtle));
}

.toast.is-warning {
  border-color: color-mix(in srgb, var(--status-warning) 40%, var(--border-subtle));
}

.toast.is-danger {
  border-color: color-mix(in srgb, var(--status-danger) 40%, var(--border-subtle));
}

/* Content-Area Links */
.panel-body a:not(.btn):not([class]),
.glass-panel a:not(.btn):not([class]),
.thread-body a:not(.btn):not([class]) {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}

.panel-body a:not(.btn):not([class]):hover,
.glass-panel a:not(.btn):not([class]):hover,
.thread-body a:not(.btn):not([class]):hover {
  color: color-mix(in srgb, var(--accent) 80%, var(--text));
}

.panel-body a:not(.btn):not([class]):focus-visible,
.glass-panel a:not(.btn):not([class]):focus-visible,
.thread-body a:not(.btn):not([class]):focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 50%, transparent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Generic Modal System */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: fadeIn 0.2s ease;
}

.modal-overlay[hidden] {
  display: none !important;
}

.modal-content {
  width: min(600px, 90vw);
  max-height: 85vh;
  border-radius: 20px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--glass-bg-strong) 85%, transparent), color-mix(in srgb, var(--glass-bg) 70%, transparent));
  border: 1px solid color-mix(in srgb, var(--glass-border) 75%, transparent);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), var(--glass-glow);
  backdrop-filter: blur(var(--blur-lg)) saturate(170%);
  -webkit-backdrop-filter: blur(var(--blur-lg)) saturate(170%);
  display: flex;
  flex-direction: column;
  animation: modalSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}

@keyframes modalSlideIn {
  from { opacity: 0; transform: scale(0.95) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid color-mix(in srgb, var(--glass-border) 40%, transparent);
}

.modal-header h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--text), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0;
}

.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid color-mix(in srgb, var(--glass-border) 40%, transparent);
}

/* Password Strength Meter */
.password-strength {
  margin-top: 8px;
  font-size: 11px;
  color: var(--text-muted);
}

.password-strength-meter {
  height: 4px;
  border-radius: 2px;
  background: color-mix(in srgb, var(--glass-bg) 50%, transparent);
  overflow: hidden;
  margin-top: 4px;
}

.password-strength-bar {
  height: 100%;
  width: 0%;
  border-radius: 2px;
  transition: width 0.3s ease, background 0.3s ease;
}

.password-strength-bar.weak {
  width: 25%;
  background: var(--status-danger);
}

.password-strength-bar.fair {
  width: 50%;
  background: var(--status-warning);
}

.password-strength-bar.good {
  width: 75%;
  background: var(--accent);
}

.password-strength-bar.strong {
  width: 100%;
  background: var(--status-success);
}

.password-strength-label {
  font-size: 12px;
  margin-top: 4px;
  display: block;
}

/* Loading States */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid color-mix(in srgb, var(--glass-border) 30%, transparent);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.empty-state {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.55;
  letter-spacing: 0.01em;
  /* If dropped inside a multi-column grid list (subscriptions, achievements,
     marketplace, forums, etc.) span the full row so it centers across the whole
     panel instead of sitting in the first column. Ignored in non-grid parents. */
  grid-column: 1 / -1;
}

/* Luxury empty-state: a soft glowing orb above the message gives bare "no data"
   states an intentional, premium feel. Only applies to block-level empty states
   (not table-cell ones, which stay inline). */
.empty-state:not(td):not(th)::before {
  content: "";
  display: block;
  width: 38px;
  height: 38px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 38%, rgba(123, 220, 255, 0.28), rgba(123, 220, 255, 0.05) 60%, transparent 70%);
  border: 1px solid rgba(123, 220, 255, 0.22);
  box-shadow: inset 0 0 14px rgba(123, 220, 255, 0.18), 0 0 22px rgba(123, 220, 255, 0.08);
}

.loading-state {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  /* span the full row when inside a grid list; ignored otherwise */
  grid-column: 1 / -1;
}

.loading-state::before {
  content: "";
  display: inline-block;
  width: 26px;
  height: 26px;
  border: 2px solid rgba(123, 220, 255, 0.18);
  border-top-color: var(--accent, #7bdcff);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  box-shadow: 0 0 18px rgba(123, 220, 255, 0.18);
}

/* Keep table-cell loading states inline (don't flex a <td>). */
td.loading-state, th.loading-state { display: table-cell; }
td.loading-state::before, th.loading-state::before { margin-right: 8px; vertical-align: middle; box-shadow: none; }

/* Rewards Page Spin Wheel */
.spin-wheel-container {
  position: relative;
  text-align: center;
  padding: 20px;
}

.spin-wheel-hint {
  margin-top: 12px;
}

#spinWheel {
  width: 200px;
  height: 200px;
  margin: 0 auto;
  border-radius: 50%;
  border: 4px solid color-mix(in srgb, var(--accent) 30%, var(--glass-border));
  box-shadow: 0 0 20px rgba(123, 220, 255, 0.3), inset 0 0 20px rgba(0, 0, 0, 0.2);
  background: conic-gradient(
    var(--wheel-1) 0deg 51.4deg,
    var(--wheel-2) 51.4deg 102.8deg,
    var(--wheel-3) 102.8deg 154.3deg,
    var(--wheel-4) 154.3deg 205.7deg,
    var(--wheel-5) 205.7deg 257.1deg,
    var(--wheel-6) 257.1deg 308.6deg,
    var(--wheel-7) 308.6deg 360deg
  );
  transition: transform 4s cubic-bezier(0.17, 0.67, 0.83, 0.67);
  cursor: pointer;
}

#spinWheel:hover {
  transform: scale(1.02);
  box-shadow: 0 0 30px rgba(123, 220, 255, 0.4), inset 0 0 20px rgba(0, 0, 0, 0.2);
}

/* 2FA Modal Styles */
.qr-code-image {
  max-width: 256px;
  margin: 16px auto;
  display: block;
}

.totp-secret-code {
  display: block;
  text-align: center;
  font-size: 18px;
  margin: 8px 0;
  font-family: monospace;
}

.backup-codes-list {
  background: rgba(0, 0, 0, 0.3);
  padding: 12px;
  border-radius: 8px;
  font-family: monospace;
  font-size: 14px;
  line-height: 2;
  text-align: center;
}

/* Two-Factor Actions Row */
.two-factor-actions {
  margin-top: 12px;
}

.modal-step-label {
  margin-top: 16px;
}

/* Forum Styles */
.forums-categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.forums-shell .panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

/* Responsive Improvements */
@media (max-width: 768px) {
  .modal-content {
    width: 95vw;
    max-height: 90vh;
    margin: 16px;
  }

  .modal-header {
    padding: 16px 20px;
  }

  .modal-body {
    padding: 20px;
  }

  .modal-footer {
    padding: 12px 20px;
    flex-direction: column;
  }

  .modal-footer .btn {
    width: 100%;
  }
}

.skeleton {
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.06));
  background-size: 200% 100%;
  animation: skeletonWave 1.6s ease-in-out infinite;
}

.skeleton-line {
  height: 10px;
}

.skeleton-block {
  height: 40px;
}

@keyframes skeletonWave {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 18%, var(--glass-bg) 82%);
  border: 1px solid color-mix(in srgb, var(--glass-border) 65%, transparent);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  position: relative;
  backdrop-filter: blur(var(--blur-sm));
  -webkit-backdrop-filter: blur(var(--blur-sm));
}

.avatar-status {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--status-success);
  border: 2px solid var(--bg-1);
  box-shadow: 0 0 8px rgba(110, 227, 178, 0.6);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
}

.breadcrumbs a {
  color: var(--text-soft);
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.page-btn {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 78%, transparent);
  color: var(--text-soft);
  font-size: 11px;
  cursor: pointer;
  backdrop-filter: blur(var(--blur-sm));
  -webkit-backdrop-filter: blur(var(--blur-sm));
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.page-btn:hover {
  background: color-mix(in srgb, var(--glass-bg) 60%, transparent);
  border-color: color-mix(in srgb, var(--accent) 30%, var(--border-subtle));
  transform: translateY(-1px);
}

.page-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.page-btn.is-active {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border-subtle));
  background: color-mix(in srgb, var(--accent) 12%, var(--glass) 88%);
}

.infinite-list {
  max-height: 180px;
  overflow: auto;
  display: grid;
  gap: 8px;
  padding-right: 4px;
  scrollbar-gutter: stable;
}

.infinite-item {
  padding: 10px;
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 78%, transparent);
  font-size: 12px;
  backdrop-filter: blur(var(--blur-sm));
  -webkit-backdrop-filter: blur(var(--blur-sm));
}

/* Utility Classes */
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.cursor-pointer { cursor: pointer; }
.whitespace-pre-wrap { white-space: pre-wrap; }
.p-28 { padding: 28px; }
.pb-16 { padding-bottom: 16px; }
.m-0 { margin: 0; }
.text-accent { color: var(--accent); }
.text-muted-sm { font-size: 12px; color: var(--text-muted); }
.scrollable-y { max-height: 300px; overflow-y: auto; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.data-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
  .data-table {
    font-size: var(--fs-sm);
  }
}

/* Mobile card-layout for tables */
@media (max-width: 640px) {
  .data-table-wrapper {
    overflow-x: visible;
  }

  .data-table,
  .data-table thead,
  .data-table tbody,
  .data-table th,
  .data-table td,
  .data-table tr {
    display: block;
  }

  .data-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
  }

  .data-table tbody {
    display: grid;
    gap: 8px;
  }

  .data-table tr {
    padding: 12px;
    margin-bottom: 0;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    background: color-mix(in srgb, var(--glass-bg) 40%, transparent);
    backdrop-filter: blur(var(--blur-sm));
    -webkit-backdrop-filter: blur(var(--blur-sm));
  }

  .data-table td {
    padding: 6px 0;
    border-bottom: 1px solid color-mix(in srgb, var(--border-subtle) 50%, transparent);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    font-size: var(--fs-sm);
  }

  .data-table td:last-child {
    border-bottom: none;
  }

  .data-table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--text-muted);
    font-size: var(--fs-xs);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    flex-shrink: 0;
    min-width: 80px;
  }

  .data-table td .btn,
  .data-table td button,
  .data-table td .pill {
    flex-shrink: 0;
  }
}

.data-table th,
.data-table td {
  padding: 10px 8px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-soft);
}

.data-table th {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.data-table th:hover {
  color: var(--accent);
  background: color-mix(in srgb, var(--glass-bg) 40%, transparent);
}

/* Subtle luxury row hover — gives every data table an interactive, premium
   feel. Skips the header row and the placeholder/empty rows. */
.data-table tbody tr {
  transition: background 0.18s ease, box-shadow 0.18s ease;
}
.data-table tbody tr:hover:not(.is-selected):not(:has(.empty-state)):not(:has(.loading-state)) {
  background: color-mix(in srgb, var(--accent) 5%, transparent);
  box-shadow: inset 2px 0 0 color-mix(in srgb, var(--accent) 55%, transparent);
}

.data-table tr.is-selected {
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.table-expand {
  display: none;
  font-size: 11px;
  color: var(--text-muted);
}

.table-expand.is-open {
  display: table-row;
}

.table-expand td {
  padding: 12px 10px;
  background: color-mix(in srgb, var(--glass) 88%, transparent);
  border-bottom: 1px solid var(--border-subtle);
}

.table-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

/* Additional Utility Classes */
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 4px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.ml-8 { margin-left: 8px; }
.mr-8 { margin-right: 8px; }
.p-4 { padding: 4px; }
.p-8 { padding: 8px; }
.p-12 { padding: 12px; }
.p-16 { padding: 16px; }
.pt-8 { padding-top: 8px; }
.pt-12 { padding-top: 12px; }
.pb-8 { padding-bottom: 8px; }
.pl-8 { padding-left: 8px; }
.pr-8 { padding-right: 8px; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }

.text-success { color: var(--status-success); }
.text-danger { color: var(--status-danger); }
.text-warning { color: var(--status-warning); }
.text-info { color: var(--accent); }
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-uppercase { text-transform: uppercase; }
.text-lowercase { text-transform: lowercase; }
.text-capitalize { text-transform: capitalize; }

.font-mono { font-family: var(--font-mono, monospace); }
.font-sans { font-family: var(--font-sans, system-ui, sans-serif); }

.letter-spacing-sm { letter-spacing: 0.05em; }
.letter-spacing-md { letter-spacing: 0.1em; }
.letter-spacing-lg { letter-spacing: 0.15em; }

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.resize-none { resize: none; }
.resize-both { resize: both; }
.resize-horizontal { resize: horizontal; }
.resize-vertical { resize: vertical; }

.select-all::selection {
  background: var(--accent);
  color: var(--bg-0);
}

.mono-input {
  font-family: var(--font-mono, monospace);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 18px;
  text-align: center;
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-around { justify-content: space-around; }
.grow { flex-grow: 1; }
.shrink { flex-shrink: 1; }
.shrink-0 { flex-shrink: 0; }

.w-full { width: 100%; }
.h-full { height: 100%; }
.min-h-0 { min-height: 0; }
.min-h-5 { min-height: 20px; }
.min-h-10 { min-height: 40px; }

.pos-relative { position: relative; }

.flex-center-gap { display: flex; align-items: center; gap: 16px; }
.chart-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.min-w-0 { min-width: 0; }

.opacity-0 { opacity: 0; }
.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }
.opacity-100 { opacity: 1; }

.transition-fast { transition: opacity 0.15s ease, transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease; }
.transition-base { transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease, border-color 0.3s ease; }
.transition-slow { transition: opacity 0.5s ease, transform 0.5s ease, background-color 0.5s ease, border-color 0.5s ease; }

.flex-wrap-gap { display: flex; flex-wrap: wrap; gap: 8px; }
.flex-wrap-gap-sm { display: flex; flex-wrap: wrap; gap: 4px; }
.flex-gap-12 { display: flex; gap: 12px; }
.flex-gap-16 { display: flex; gap: 16px; }
.form-validation { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-top: 4px; }
.section-spacer { margin-top: 1.5rem; }
.grid-auto-min { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; }

/* --- Luxury Background Atmosphere --- */
/* Merged into .body-bg pseudo-elements in base.css to avoid conflicts */

/* Selection highlight */
::selection {
  background: rgba(123, 220, 255, 0.25);
  color: var(--text);
}

::-moz-selection {
  background: rgba(123, 220, 255, 0.25);
  color: var(--text);
}

/* --- Luxury Glass Enhancements --- */

@keyframes borderShimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@keyframes shimmerSweep {
  0% { left: -100%; }
  100% { left: 100%; }
}

@keyframes ripple {
  0% { transform: scale(0); opacity: 1; }
  100% { transform: scale(4); opacity: 0; }
}

/* Premium border shimmer on glass panels */
.glass-panel::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
  animation: borderShimmer 8s ease-in-out infinite;
  pointer-events: none;
  z-index: 2;
}

/* Hero glass - deeper blur */
.glass-panel.hero-glass {
  backdrop-filter: blur(40px) saturate(200%);
  -webkit-backdrop-filter: blur(40px) saturate(200%);
}

/* Gradient border glow on focus */
.glass-panel:focus-within {
  border-color: color-mix(in srgb, var(--accent) 50%, var(--glass-border));
}

/* --- Luxury Card Hover Effects --- */

.catalog-card,
.game-card,
.forum-category-card,
.message-item,
.reward-card,
.leaderboard-row {
  transform-style: preserve-3d;
  perspective: 800px;
  position: relative;
  overflow: hidden;
}

/* 3D tilt on hover */
.catalog-card:hover,
.game-card:hover,
.forum-category-card:hover,
.message-item:hover,
.reward-card:hover {
  transform: perspective(800px) rotateX(2deg) rotateY(-3deg) translateY(-6px);
}

/* Underlight glow on hover */
.catalog-card::after,
.game-card::after,
.forum-category-card::after,
.message-item::after,
.reward-card::after {
  content: "";
  position: absolute;
  bottom: -20px;
  left: 10%;
  right: 10%;
  height: 40px;
  background: radial-gradient(ellipse, rgba(123,220,255,0.25), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 0;
}

.catalog-card:hover::after,
.game-card:hover::after,
.forum-category-card:hover::after,
.message-item:hover::after,
.reward-card:hover::after {
  opacity: 0.6;
}

/* Shimmer sweep on hover */
.catalog-card::before,
.game-card::before,
.forum-category-card::before,
.message-item::before,
.reward-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
  transition: none;
  pointer-events: none;
  z-index: 1;
}

.catalog-card:hover::before,
.game-card:hover::before,
.forum-category-card:hover::before,
.message-item:hover::before,
.reward-card:hover::before {
  animation: shimmerSweep 1s ease forwards;
}

/* ============================================================
   Billing page (added)
   ============================================================ */
.bill-hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
  align-items: center;
  padding: 30px 32px;
}
.bill-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(16, 24, 40, 0.4);
  border: 1px solid rgba(160, 190, 230, 0.12);
}
.bill-summary-stat { text-align: center; }
.bill-summary-stat__val { font-family: var(--font-display, sans-serif); font-size: 20px; font-weight: 700; color: #eef3ff; line-height: 1.1; }
.bill-summary-stat__key { font-size: 11px; color: var(--text-muted, #a8b9d4); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.06em; }

.bill-sub-list { display: grid; gap: 12px; margin-top: 8px; }
.bill-sub {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 14px;
  background: rgba(16, 24, 40, 0.34);
  border: 1px solid rgba(160, 190, 230, 0.12);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.bill-sub:hover { border-color: rgba(123, 220, 255, 0.3); transform: translateY(-1px); }
.bill-sub__name { font-size: 15px; font-weight: 600; color: #eef3ff; }
.bill-sub__meta { font-size: 12px; color: var(--text-muted, #a8b9d4); margin-top: 3px; }
.bill-sub__right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.bill-table-wrap { overflow-x: auto; margin-top: 8px; }
#billInvoiceTable { width: 100%; min-width: 560px; }

@media (max-width: 768px) {
  .bill-hero { grid-template-columns: 1fr; }
  .bill-sub { flex-direction: column; align-items: flex-start; }
  .bill-sub__right { width: 100%; justify-content: space-between; }
}
/* ============================================================
   User preferences hub (profile page) — toggles, selects, rows
   ============================================================ */
.pref-group { display: grid; gap: 4px; margin-top: 6px; }

.pref-row,
.pref-toggle {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 4px;
  border-bottom: 1px solid color-mix(in srgb, var(--glass-border) 35%, transparent);
}
.pref-group > :last-child { border-bottom: none; }
.pref-toggle { cursor: pointer; }

.pref-row__text { display: grid; gap: 2px; min-width: 0; }
.pref-row__title { font-size: 13.5px; font-weight: 600; color: var(--text, #eef3ff); }
.pref-row__desc  { font-size: 11.5px; color: var(--text-muted, #9fb1cc); line-height: 1.3; }

/* Glass select */
.pref-select {
  flex: 0 0 auto;
  min-width: 130px;
  padding: 8px 30px 8px 12px;
  font-size: 13px; font-weight: 500;
  color: var(--text, #eef3ff);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0)) ,
    color-mix(in srgb, var(--glass-bg, rgba(20,30,52,0.6)) 90%, transparent);
  border: 1px solid color-mix(in srgb, var(--glass-border) 60%, transparent);
  border-radius: 10px;
  -webkit-appearance: none; appearance: none;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239fb1cc' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.pref-select:hover { border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.pref-select:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--accent) 65%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.pref-select option { background: #0c1426; color: #eef3ff; }

/* Toggle switch */
.pref-checkbox { position: absolute; opacity: 0; width: 0; height: 0; }
.pref-switch {
  flex: 0 0 auto;
  position: relative; width: 44px; height: 25px; border-radius: 999px;
  background: color-mix(in srgb, var(--glass-border) 55%, transparent);
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  transition: background 0.25s ease, border-color 0.25s ease;
}
.pref-switch::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 19px; height: 19px; border-radius: 50%;
  background: #e7eefc;
  box-shadow: 0 2px 5px rgba(0,0,0,0.35);
  transition: transform 0.25s cubic-bezier(0.16,1,0.3,1), background 0.25s ease;
}
.pref-checkbox:checked + .pref-switch {
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 80%, transparent), color-mix(in srgb, var(--accent) 55%, transparent));
  border-color: color-mix(in srgb, var(--accent) 60%, transparent);
}
.pref-checkbox:checked + .pref-switch::after { transform: translateX(19px); background: #fff; }
.pref-checkbox:focus-visible + .pref-switch { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }

.pref-divider { border: none; border-top: 1px solid color-mix(in srgb, var(--glass-border) 30%, transparent); margin: 8px 0; }

.pref-status {
  margin-top: 12px; padding: 8px 12px; border-radius: 9px;
  font-size: 12.5px; font-weight: 500;
}
.pref-status--ok    { color: #7df0c8; background: color-mix(in srgb, var(--status-success, #5fd0a8) 12%, transparent); border: 1px solid color-mix(in srgb, var(--status-success, #5fd0a8) 30%, transparent); }
.pref-status--error { color: #ffb0b0; background: rgba(239,68,68,0.10); border: 1px solid rgba(239,68,68,0.3); }

/* Live pref effects (apply site-wide when preferences.js sets the classes) */
html.compact-mode .page-shell { gap: 14px; }
html.compact-mode .glass-panel .panel-body { padding: 16px; }
html.reduce-motion *,
html.reduce-motion *::before,
html.reduce-motion *::after { animation-duration: 0.001s !important; transition-duration: 0.05s !important; }
html.no-custom-cursor .cyno-cursor { display: none !important; }
html.no-custom-cursor, html.no-custom-cursor * { cursor: auto !important; }
/* ============================================================
   Tickets — list controls (priority filter + sort) & canned replies
   ============================================================ */
.ticket-list-controls {
  display: flex; gap: 10px; margin: 10px 0 12px;
}
.ticket-list-controls .pref-select { flex: 1 1 0; min-width: 0; }

.thread-canned { margin-bottom: 8px; }
.thread-canned .pref-select { width: 100%; }

@media (max-width: 520px) {
  .ticket-list-controls { flex-direction: column; }
}
/* Rewards — transaction filter chips (added) */
.rewards-tx-filters { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
/* ============================================================
   GLOBAL FRIENDS DOCK — redesigned v2
   ============================================================ */
.friends-dock {
  position: fixed; top: 80px; right: 0; z-index: 1200;
  font-size: 13px; font-family: "Manrope","Sora",sans-serif;
  transition: left 0.4s cubic-bezier(0.16,1,0.3,1), right 0.4s cubic-bezier(0.16,1,0.3,1), top 0.4s cubic-bezier(0.16,1,0.3,1);
}
.friends-dock .fd-panel {
  width: 380px; max-height: calc(100vh - 120px);
  display: flex; flex-direction: column;
  border-radius: 18px 0 0 18px;
  overflow: hidden; clip-path: inset(0 0 0 0 round 18px 0 0 18px);
  transition: width 0.35s cubic-bezier(0.16,1,0.3,1), opacity 0.3s ease, box-shadow 0.3s ease, border-radius 0.3s ease;
}
.friends-dock.is-collapsed .fd-panel { width: 0; opacity: 0; border-width: 0; padding: 0; pointer-events: none; }
.friends-dock.is-docked-left { right: auto; left: 0; }
.friends-dock.is-docked-left .fd-panel { border-radius: 0 18px 18px 0; clip-path: inset(0 0 0 0 round 0 18px 18px 0); }
.friends-dock.is-docked-top { right: auto; top: 0; }
.friends-dock.is-docked-top .fd-panel { border-radius: 0 0 18px 18px; clip-path: inset(0 0 0 0 round 0 0 18px 18px); }
.friends-dock.is-docked-bottom { right: auto; top: auto; bottom: 0; }
.friends-dock.is-docked-bottom .fd-panel { border-radius: 18px 18px 0 0; clip-path: inset(0 0 0 0 round 18px 18px 0 0); }
.friends-dock.is-floating { right: auto; }
.friends-dock.is-floating .fd-panel { border-radius: 18px; clip-path: none; }
.friends-dock.is-dragging { z-index: 10000; transition: none !important; }
.friends-dock.is-dragging .fd-panel {
  border-radius: 18px; clip-path: none;
  box-shadow: 0 30px 90px rgba(0,0,0,0.6), 0 0 30px rgba(99,179,237,0.06), inset 0 1px 0 rgba(255,255,255,0.05);
}
.friends-dock.near-edge .fd-panel {
  box-shadow: 0 30px 90px rgba(0,0,0,0.55), 0 0 30px rgba(99,179,237,0.12), inset 0 1px 0 rgba(255,255,255,0.06);
}

/* ── Open button ── */
.fd-open-btn {
  position: fixed; top: 80px; right: 0; z-index: 1201;
  width: 44px; height: 48px;
  display: grid; place-items: center; cursor: pointer;
  color: var(--text, #eef3ff);
  background: linear-gradient(145deg, color-mix(in srgb, var(--glass-bg-strong) 85%, transparent), color-mix(in srgb, var(--glass-bg) 70%, transparent));
  border: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent);
  border-right: none;
  border-radius: 14px 0 0 14px;
  backdrop-filter: blur(var(--blur-lg)) saturate(180%);
  -webkit-backdrop-filter: blur(var(--blur-lg)) saturate(180%);
  box-shadow: var(--glass-shadow);
  transition: box-shadow 0.3s ease, background 0.3s ease, transform 0.2s ease;
}
.fd-open-btn:hover { box-shadow: var(--glass-shadow), -4px 0 12px rgba(99,179,237,0.08); transform: translateX(-2px); }
.fd-open-btn.is-active { opacity: 0; pointer-events: none; }
.fd-open-btn svg { width: 18px; height: 18px; }
.fd-open-btn.fd-open-left { right: auto; left: 0; border-radius: 0 14px 14px 0; border-left: none; border-right: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent); }
.fd-open-btn.fd-open-top { top: 0; right: auto; border-radius: 0 0 14px 14px; border-top: none; border-bottom: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent); border-right: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent); }
.fd-open-btn.fd-open-bottom { top: auto; bottom: 0; right: auto; border-radius: 14px 14px 0 0; border-bottom: none; border-top: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent); border-right: 1px solid color-mix(in srgb, var(--glass-border) 70%, transparent); }
.fd-toggle-badge {
  position: absolute; top: 3px; right: 3px; min-width: 16px; height: 16px;
  padding: 0 4px; border-radius: 999px; font-size: 9px; font-weight: 800;
  display: grid; place-items: center; color: #fff;
  background: #ef4444; box-shadow: 0 0 0 2px #0c1322, 0 0 6px rgba(239,68,68,0.3);
  animation: fdBadgePulse 2.5s ease-in-out infinite;
}
@keyframes fdBadgePulse { 0%,100%{box-shadow:0 0 0 2px #0c1322,0 0 4px rgba(239,68,68,0.12);} 50%{box-shadow:0 0 0 2px #0c1322,0 0 8px rgba(239,68,68,0.25);} }

/* ── Header ── */
.fd-head {
  min-width: 348px; white-space: nowrap;
  background: linear-gradient(180deg, rgba(99,179,237,0.03) 0%, transparent 100%);
  cursor: grab; user-select: none; position: relative;
}
.fd-head::before {
  content: ''; position: absolute; left: 50%; top: 4px; transform: translateX(-50%);
  width: 28px; height: 3px; border-radius: 2px;
  background: rgba(255,255,255,0.1);
  opacity: 0; transition: opacity 0.25s;
}
.fd-head:hover::before { opacity: 1; }
.friends-dock.is-dragging .fd-head { cursor: grabbing; }
.friends-dock.is-dragging .fd-head::before { opacity: 1; background: rgba(99,179,237,0.25); }

.fd-head-row {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px 8px;
}
.fd-brand { display: flex; align-items: center; gap: 8px; }
.fd-brand-label { font-size: 14px; font-weight: 800; color: var(--text,#eef3ff); letter-spacing: -0.01em; }
.fd-close {
  display: grid; place-items: center;
  width: 28px; height: 28px; border-radius: 9px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05); cursor: pointer;
  color: rgba(255,255,255,0.25);
  transition: all 0.2s ease;
}
.fd-close svg { width: 12px; height: 12px; transition: transform 0.25s ease; }
.fd-close:hover { background: rgba(245,101,101,0.1); border-color: rgba(245,101,101,0.18); color: #f87171; }
.fd-close:hover svg { transform: rotate(90deg); }
.fd-close:active { transform: scale(0.92); }

/* ── Tabs ── */
.fd-nav {
  display: flex; gap: 2px; padding: 0 12px 10px;
}
.fd-tab {
  display: flex; align-items: center; gap: 5px;
  padding: 7px 14px; font-size: 11px; font-weight: 700; letter-spacing: 0.02em;
  cursor: pointer; color: rgba(255,255,255,0.3); background: none; border: none;
  border-radius: 10px; flex: 1; justify-content: center;
  position: relative;
  transition: color 0.2s, background 0.2s;
}
.fd-tab svg { width: 13px; height: 13px; }
.fd-tab span { pointer-events: none; }
.fd-tab:hover { color: rgba(255,255,255,0.55); background: rgba(255,255,255,0.03); }
.fd-tab.is-active {
  color: #63b3ed;
  background: rgba(99,179,237,0.08);
}
.fd-tab.is-active::after {
  content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 16px; height: 2px; border-radius: 2px;
  background: #63b3ed; box-shadow: 0 0 6px rgba(99,179,237,0.3);
}
.fd-online {
  font-size: 10px; font-weight: 700; color: rgba(99,179,237,0.6);
  padding: 3px 10px; border-radius: 999px; letter-spacing: 0.03em;
  background: rgba(99,179,237,0.06);
  white-space: nowrap; flex-shrink: 0; margin-left: auto;
}

/* ── Body panels ── */
.fd-body { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; min-width: 348px; overflow: hidden; }

/* ── Search ── */
.fd-search-wrap {
  position: relative; margin: 4px 12px 4px;
  border-top: 1px solid rgba(255,255,255,0.04);
  padding-top: 8px;
}
.fd-search-icon { position: absolute; left: 11px; top: calc(50% + 4px); transform: translateY(-50%); pointer-events: none; }
.fd-search-icon svg { width: 13px; height: 13px; color: rgba(255,255,255,0.25); }
.fd-search {
  width: 100%; padding: 8px 12px 8px 34px; font-size: 12px;
  color: var(--text,#eef3ff); background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 10px; outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.fd-search:focus { border-color: rgba(99,179,237,0.25); box-shadow: 0 0 0 3px rgba(99,179,237,0.05); background: rgba(255,255,255,0.05); }
.fd-search::placeholder { color: rgba(255,255,255,0.22); }

/* ── Scroll & sections ── */
.fd-scroll { overflow-y: auto; padding: 4px 8px 12px; flex: 1 1 auto; }
.fd-sec {
  display: flex; align-items: center; gap: 6px;
  padding: 12px 8px 6px; font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: rgba(255,255,255,0.3);
}
.fd-sec-label { flex: 1; }
.fd-sec-count {
  font-size: 9px; font-weight: 800; padding: 1px 6px; border-radius: 999px;
  background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.35);
}
.fd-sec-dot { width: 6px; height: 6px; border-radius: 50%; flex: 0 0 auto; }
.fd-sec-dot--on { background: #63b3ed; box-shadow: 0 0 4px rgba(99,179,237,0.2); }
.fd-sec-dot--off { background: #5a6478; }
.fd-sec-dot--req { background: #ef4444; box-shadow: 0 0 4px rgba(239,68,68,0.2); }
.fd-sec-dot--pending { background: #f59e0b; box-shadow: 0 0 4px rgba(245,158,11,0.15); }
.fd-sec-dot--fav { background: #f59e0b; }

/* ── Empty state ── */
.fd-empty-state { padding: 48px 28px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.fd-empty-icon {
  margin: 0 auto 20px; width: 72px; height: 72px; display: grid; place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99,179,237,0.1) 0%, rgba(99,179,237,0.02) 70%);
  border: 1px solid rgba(99,179,237,0.1);
  animation: fdEmptyPulse 3s ease-in-out infinite;
}
@keyframes fdEmptyPulse { 0%,100%{box-shadow:0 0 20px rgba(99,179,237,0.03);} 50%{box-shadow:0 0 30px rgba(99,179,237,0.07);} }
.fd-empty-icon svg { width: 30px; height: 30px; color: rgba(99,179,237,0.6); }
.fd-empty-title { font-size: 15px; font-weight: 800; color: rgba(255,255,255,0.85); margin-bottom: 6px; }
.fd-empty-sub { font-size: 12px; color: rgba(255,255,255,0.35); line-height: 1.6; }
.fd-empty-sub strong { color: #63b3ed; font-weight: 700; }

/* ── Friend card ── */
.fd-card {
  display: flex; flex-direction: column; gap: 0;
  padding: 6px 8px; border-radius: 12px;
  transition: background 0.15s ease, box-shadow 0.15s ease;
  cursor: default; position: relative;
}
.fd-card-main { display: flex; align-items: center; gap: 10px; }
.fd-card:hover { background: rgba(255,255,255,0.04); }
.fd-card.is-off { opacity: 0.45; }
.fd-card.is-off:hover { opacity: 0.65; }
.fd-card--req { border: 1px solid rgba(239,68,68,0.1); background: rgba(239,68,68,0.03); border-radius: 14px; padding: 10px 12px; }
.fd-card--req:hover { background: rgba(239,68,68,0.05); }
.fd-card-info { flex: 1; min-width: 0; display: grid; gap: 2px; }
.fd-card-top { display: flex; align-items: center; gap: 6px; }
.fd-card-name { font-size: 13px; font-weight: 700; color: var(--text,#eef3ff); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fd-card-sub { font-size: 11px; color: rgba(255,255,255,0.35); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fd-card-acts { display: flex; gap: 4px; }
.fd-card-hover {
  display: flex; gap: 3px; padding: 4px 8px 4px 50px;
  opacity: 0; max-height: 0; overflow: hidden;
  transition: opacity 0.2s ease, max-height 0.25s ease;
}
.fd-card:hover .fd-card-hover { opacity: 1; max-height: 40px; }
.fd-st-on { color: #63b3ed; font-weight: 500; }
.fd-st-lobby { color: #63b3ed; font-weight: 700; font-size: 10px; letter-spacing: 0.06em; }
.fd-muted-tag { display: inline-flex; opacity: 0.5; }
.fd-muted-tag svg { width: 11px; height: 11px; color: var(--text-muted,#9fb1cc); }
.fd-unread {
  min-width: 17px; height: 17px; padding: 0 5px; border-radius: 999px;
  font-size: 9px; font-weight: 800; display: grid; place-items: center;
  background: linear-gradient(135deg, #63b3ed, #4a9dd6); color: #fff;
  box-shadow: 0 0 6px rgba(99,179,237,0.15);
}
.fd-pending-badge {
  font-size: 9px; font-weight: 700; letter-spacing: 0.04em; padding: 3px 8px;
  border-radius: 6px; color: #f59e0b; background: rgba(245,158,11,0.08);
  border: 1px solid rgba(245,158,11,0.15);
}

/* ── Avatar ── */
.fd-av { position: relative; flex: 0 0 auto; border-radius: 50%; display: block; }
.fd-av img, .fd-fall { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.fd-fall {
  display: grid; place-items: center; font-weight: 800; color: #eaf2ff;
  background: linear-gradient(140deg, rgba(99,179,237,0.3), #141d33 70%);
  font-size: 13px;
}
.fd-ring { position: absolute; inset: -2px; border-radius: 50%; border: 2px solid transparent; transition: border-color 0.2s, box-shadow 0.2s; }
.fd-av.is-speak .fd-ring {
  border-color: #63b3ed;
  box-shadow: 0 0 0 2px rgba(99,179,237,0.1), 0 0 8px rgba(99,179,237,0.2);
  animation: fdSpeak 1.1s ease-in-out infinite;
}
@keyframes fdSpeak { 0%,100%{box-shadow:0 0 0 2px rgba(99,179,237,0.08),0 0 5px rgba(99,179,237,0.1);} 50%{box-shadow:0 0 0 3px rgba(99,179,237,0.06),0 0 10px rgba(99,179,237,0.22);} }
.fd-dot {
  position: absolute; bottom: 0; right: 0; width: 11px; height: 11px; border-radius: 50%;
  background: #5a6478; border: 2.5px solid #0c1322; transition: background 0.3s, box-shadow 0.3s;
}
.fd-av.is-on .fd-dot { background: #63b3ed; box-shadow: 0 0 4px rgba(99,179,237,0.2); }

/* ── Buttons ── */
.fd-hbtn {
  width: 30px; height: 30px; display: grid; place-items: center;
  border-radius: 9px; cursor: pointer; color: rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06);
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s;
}
.fd-hbtn:hover { background: rgba(99,179,237,0.1); color: #fff; border-color: rgba(99,179,237,0.15); transform: translateY(-1px); }
.fd-hbtn:active { transform: scale(0.94); }
.fd-hbtn:disabled { opacity: 0.25; cursor: not-allowed; }
.fd-hbtn svg { width: 13px; height: 13px; }
.fd-ibtn {
  width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px;
  cursor: pointer; border: 1px solid rgba(255,255,255,0.06);
  transition: background 0.15s, transform 0.15s; background: rgba(255,255,255,0.04);
}
.fd-ibtn:hover { transform: scale(1.06); }
.fd-ibtn svg { width: 14px; height: 14px; }
.fd-ibtn--ok { color: #7df0c8; } .fd-ibtn--ok:hover { background: rgba(125,240,200,0.12); border-color: rgba(125,240,200,0.2); }
.fd-ibtn--no { color: #ff9d9d; } .fd-ibtn--no:hover { background: rgba(255,157,157,0.12); border-color: rgba(255,157,157,0.2); }

/* ── Chat header ── */
.fd-ch-head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  background: linear-gradient(180deg, rgba(99,179,237,0.03) 0%, transparent 100%);
}
.fd-ch-back { width: 30px; height: 30px; display: grid; place-items: center; cursor: pointer; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.05); color: var(--text-muted,#9fb1cc); border-radius: 9px; transition: background 0.15s, color 0.15s; }
.fd-ch-back:hover { background: rgba(255,255,255,0.07); color: #fff; }
.fd-ch-back svg { width: 15px; height: 15px; }
.fd-ch-who { flex: 1; min-width: 0; display: grid; gap: 2px; }
.fd-ch-name { font-weight: 700; font-size: 13px; color: var(--text,#eef3ff); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fd-ch-status { font-size: 10px; color: rgba(255,255,255,0.35); display: flex; align-items: center; gap: 4px; }
.fd-ch-online-dot { width: 6px; height: 6px; border-radius: 50%; background: #63b3ed; box-shadow: 0 0 4px rgba(99,179,237,0.3); }
.fd-ch-tools { display: flex; gap: 3px; }
.fd-typing { color: #63b3ed; font-style: italic; font-weight: 500; }
.fd-dots { display: inline-flex; gap: 2px; margin-left: 3px; }
.fd-dots i { width: 3px; height: 3px; border-radius: 50%; background: #63b3ed; display: inline-block; animation: fdDotBounce 1.4s infinite ease-in-out both; }
.fd-dots i:nth-child(2) { animation-delay: 0.16s; }
.fd-dots i:nth-child(3) { animation-delay: 0.32s; }
@keyframes fdDotBounce { 0%,80%,100%{opacity:0.3;transform:scale(0.8);}40%{opacity:1;transform:scale(1.2);} }

/* ── Chat messages ── */
.fd-ch-scroll { flex: 1 1 auto; overflow-y: auto; padding: 16px 14px; display: flex; flex-direction: column; gap: 8px; }
.fd-ch-date { text-align: center; padding: 8px 0 4px; }
.fd-ch-date span { font-size: 10px; font-weight: 600; color: rgba(255,255,255,0.25); padding: 3px 12px; border-radius: 999px; background: rgba(255,255,255,0.03); }
.fd-ch-msg { display: flex; flex-direction: column; align-items: flex-start; max-width: 80%; animation: fdMsgIn 0.2s ease-out; }
.fd-ch-msg.is-mine { align-self: flex-end; align-items: flex-end; }
@keyframes fdMsgIn { from { opacity: 0; transform: translateY(4px); } }
.fd-ch-bubble {
  padding: 10px 14px; border-radius: 18px 18px 18px 6px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.05);
  color: var(--text,#eef3ff); font-size: 13px; line-height: 1.55; word-break: break-word;
  display: flex; align-items: center; gap: 6px;
}
.fd-ch-msg.is-mine .fd-ch-bubble {
  background: linear-gradient(135deg, rgba(99,179,237,0.18), rgba(99,179,237,0.08));
  border-color: rgba(99,179,237,0.12); border-radius: 18px 18px 6px 18px;
}
.fd-ch-msg.is-burner .fd-ch-bubble { border: 1px dashed rgba(245,158,11,0.35); background: rgba(245,158,11,0.06); }
.fd-ch-burn-tag svg { width: 11px; height: 11px; color: #f59e0b; flex: 0 0 auto; }
.fd-ch-meta { display: flex; align-items: center; gap: 4px; margin-top: 3px; padding: 0 8px; }
.fd-ch-time { font-size: 10px; color: rgba(255,255,255,0.2); }
.fd-ch-read svg { width: 12px; height: 12px; color: rgba(255,255,255,0.2); }
.fd-ch-read.is-read svg { color: #63b3ed; }
.fd-link { color: #63b3ed; text-decoration: underline; text-underline-offset: 2px; }
.fd-link:hover { color: #8ccbf5; }
.fd-ch-lobby { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; border: 1px solid rgba(99,179,237,0.15); background: rgba(99,179,237,0.04); width: 100%; }
.fd-ch-lobby-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: rgba(99,179,237,0.1); flex: 0 0 auto; }
.fd-ch-lobby-icon svg { width: 18px; height: 18px; color: #63b3ed; }
.fd-ch-lobby-info { flex: 1; display: grid; gap: 2px; }
.fd-ch-lobby-label { font-size: 9px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(99,179,237,0.7); }
.fd-ch-lobby-name { font-size: 12.5px; font-weight: 600; color: var(--text,#eef3ff); }
.fd-btn-join { padding: 7px 16px; font-size: 11px; font-weight: 800; border-radius: 9px; background: linear-gradient(135deg, #63b3ed, #4a9dd6); color: #fff; border: none; cursor: pointer; transition: box-shadow 0.2s, transform 0.15s; }
.fd-btn-join:hover { box-shadow: 0 4px 14px rgba(99,179,237,0.2); transform: translateY(-1px); }

/* ── Chat input ── */
.fd-ch-input { border-top: 1px solid rgba(255,255,255,0.04); padding: 10px 12px 12px; background: linear-gradient(0deg, rgba(99,179,237,0.02) 0%, transparent 100%); }
.fd-burn-strip {
  display: flex; align-items: center; gap: 5px; padding: 5px 10px; margin-bottom: 8px;
  font-size: 10px; font-weight: 700; color: #f59e0b; border-radius: 8px;
  background: rgba(245,158,11,0.06); border: 1px solid rgba(245,158,11,0.12);
}
.fd-burn-strip svg { width: 11px; height: 11px; }
.fd-ch-compose { display: grid; gap: 6px; }
.fd-ch-compose-row { display: flex; gap: 4px; align-items: center; }
.fd-ch-toolbar { display: flex; gap: 2px; padding: 0 2px; }
.fd-tbtn { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; cursor: pointer; color: rgba(255,255,255,0.25); background: none; border: none; transition: color 0.15s, background 0.15s; flex-shrink: 0; }
.fd-tbtn:hover { color: #63b3ed; background: rgba(99,179,237,0.08); }
.fd-tbtn.is-on { color: #f59e0b !important; background: rgba(245,158,11,0.1) !important; }
.fd-tbtn svg { width: 14px; height: 14px; }
.fd-ch-text {
  flex: 1; min-width: 0; padding: 9px 12px; font-size: 12.5px; color: var(--text,#eef3ff);
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.05);
  border-radius: 10px; outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
.fd-ch-text:focus { border-color: rgba(99,179,237,0.3); box-shadow: 0 0 0 3px rgba(99,179,237,0.06); }
.fd-ch-text::placeholder { color: rgba(255,255,255,0.2); }
.fd-ch-send {
  width: 32px; height: 32px; display: grid; place-items: center; flex-shrink: 0;
  background: linear-gradient(135deg, #63b3ed, #4a9dd6); border: none; border-radius: 9px;
  cursor: pointer; color: #fff; transition: box-shadow 0.2s, transform 0.15s;
}
.fd-ch-send:hover { box-shadow: 0 3px 12px rgba(99,179,237,0.2); transform: translateY(-1px); }
.fd-ch-send svg { width: 13px; height: 13px; }
.fd-emoji-wrap { margin-bottom: 6px; border-radius: 12px; }
.fd-emoji-grid { display: grid; grid-template-columns: repeat(8,1fr); gap: 2px; padding: 8px; max-height: 160px; overflow-y: auto; }
.fd-emoji { width: 100%; aspect-ratio: 1; display: grid; place-items: center; font-size: 18px; border: none; background: none; border-radius: 7px; cursor: pointer; transition: background 0.12s, transform 0.12s; }
.fd-emoji:hover { background: rgba(99,179,237,0.1); transform: scale(1.15); }

/* ── Add friend ── */
.fd-add-wrap { padding: 24px 16px 12px; }
.fd-add-hero { text-align: center; margin-bottom: 24px; }
.fd-add-hero-icon {
  width: 60px; height: 60px; margin: 0 auto 14px; display: grid; place-items: center;
  border-radius: 50%; background: radial-gradient(circle, rgba(99,179,237,0.1) 0%, rgba(99,179,237,0.02) 70%);
  border: 1px solid rgba(99,179,237,0.1);
}
.fd-add-hero-icon svg { width: 26px; height: 26px; color: rgba(99,179,237,0.6); }
.fd-add-hero-title { font-size: 16px; font-weight: 800; color: rgba(255,255,255,0.9); letter-spacing: -0.01em; }
.fd-add-hero-sub { font-size: 12px; color: rgba(255,255,255,0.35); margin-top: 5px; line-height: 1.5; }
.fd-add-form { display: flex; flex-direction: column; gap: 10px; }
.fd-add-field { flex: 1; }
.fd-add-form .fd-btn { flex-shrink: 0; padding: 10px 16px; font-size: 11px; }
.fd-add-input {
  width: 100%; padding: 11px 14px; font-size: 13px; font-weight: 500; color: var(--text,#eef3ff);
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06);
  border-radius: 11px; outline: none; transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.fd-add-input:focus { border-color: rgba(99,179,237,0.3); background: rgba(99,179,237,0.03); box-shadow: 0 0 0 3px rgba(99,179,237,0.06); }
.fd-add-input::placeholder { color: rgba(255,255,255,0.2); }
.fd-add-section { padding: 4px 12px 12px; }
.fd-add-result { margin: 12px 0 0; padding: 10px 14px; border-radius: 11px; font-size: 12px; display: flex; align-items: center; gap: 6px; }
.fd-add-result svg { width: 14px; height: 14px; flex: 0 0 auto; }
.fd-add-result.is-ok { background: rgba(99,179,237,0.08); color: #63b3ed; border: 1px solid rgba(99,179,237,0.12); }
.fd-add-result.is-err { background: rgba(239,68,68,0.08); color: #ff9d9d; border: 1px solid rgba(239,68,68,0.12); }
.fd-btn {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; padding: 10px 18px; font-size: 12px; font-weight: 800; letter-spacing: 0.02em;
  border-radius: 11px; border: none; cursor: pointer; white-space: nowrap;
  transition: box-shadow 0.2s, transform 0.15s, background 0.2s;
}
.fd-btn--primary {
  background: linear-gradient(135deg, rgba(99,179,237,0.2), rgba(99,179,237,0.08));
  color: #fff; border: 1px solid rgba(99,179,237,0.2);
  box-shadow: 0 2px 8px rgba(99,179,237,0.06);
}
.fd-btn--primary:hover { background: linear-gradient(135deg, rgba(99,179,237,0.28), rgba(99,179,237,0.12)); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(99,179,237,0.1); }
.fd-btn--primary:active { transform: translateY(0.5px) scale(0.98); }
.fd-btn--ghost { background: rgba(255,255,255,0.04); color: var(--text-soft,#c4d2ea); border: 1px solid rgba(255,255,255,0.08); }
.fd-btn--ghost:hover { background: rgba(255,255,255,0.07); }
.fd-btn--accent { background: linear-gradient(135deg, #5baaed, #3d8fd4); color: #fff; }
.fd-btn svg { width: 13px; height: 13px; position: relative; z-index: 1; }

/* ── Context menu ── */
.fd-ctx {
  position: fixed; z-index: 2000; min-width: 200px; padding: 6px;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.04);
  animation: fdCtxIn 0.15s cubic-bezier(0.16,1,0.3,1);
}
@keyframes fdCtxIn { from { opacity: 0; transform: scale(0.94) translateY(-4px); } to { opacity: 1; transform: none; } }
.fd-ctx-head { padding: 8px 14px 6px; font-size: 10px; font-weight: 800; letter-spacing: 0.06em; color: rgba(99,179,237,0.6); text-transform: uppercase; }
.fd-ctx-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px 14px; font-size: 12.5px; font-weight: 500; cursor: pointer;
  color: rgba(255,255,255,0.6); background: none; border: none; border-radius: 9px;
  transition: background 0.12s, color 0.12s;
}
.fd-ctx-item:hover { background: rgba(99,179,237,0.08); color: #fff; }
.fd-ctx-item svg { width: 14px; height: 14px; flex: 0 0 auto; }
.fd-ctx--danger { color: #ff9d9d; }
.fd-ctx--danger:hover { background: rgba(239,68,68,0.1) !important; color: #ff9d9d !important; }
.fd-ctx-sep { height: 1px; background: rgba(255,255,255,0.04); margin: 4px 10px; }

/* ── Floating notification ── */
.fd-notif {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
  z-index: 5000; width: min(400px, 92vw);
  animation: fdNotifIn 0.3s cubic-bezier(0.16,1,0.3,1);
}
.fd-notif--out { animation: fdNotifOut 0.3s ease-in forwards; }
@keyframes fdNotifIn { from { opacity: 0; transform: translateX(-50%) translateY(-20px) scale(0.97); } to { opacity: 1; transform: translateX(-50%) scale(1); } }
@keyframes fdNotifOut { from { opacity: 1; transform: translateX(-50%) scale(1); } to { opacity: 0; transform: translateX(-50%) translateY(-16px) scale(0.97); } }
.fd-notif-card { border-radius: 16px; overflow: hidden; }
.fd-notif-row { display: flex; align-items: center; gap: 10px; padding: 14px 16px; }
.fd-notif-av { flex: 0 0 auto; }
.fd-notif-av img { width: 32px; height: 32px; border-radius: 50%; }
.fd-notif-body { flex: 1; min-width: 0; display: grid; gap: 2px; }
.fd-notif-body strong { font-size: 13px; color: var(--text,#eef3ff); }
.fd-notif-body p { margin: 0; font-size: 12px; color: rgba(255,255,255,0.55); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fd-notif-x { width: 26px; height: 26px; display: grid; place-items: center; background: none; border: none; color: rgba(255,255,255,0.3); cursor: pointer; border-radius: 7px; transition: background 0.15s; }
.fd-notif-x:hover { background: rgba(255,255,255,0.06); }
.fd-notif-x svg { width: 13px; height: 13px; }
.fd-notif-reply { display: flex; gap: 8px; padding: 8px 16px 14px; border-top: 1px solid rgba(255,255,255,0.04); }
.fd-notif-input { flex: 1; padding: 8px 12px; font-size: 12px; color: var(--text,#eef3ff); background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.06); border-radius: 10px; outline: none; transition: border-color 0.2s; }
.fd-notif-input:focus { border-color: rgba(99,179,237,0.4); }
.fd-notif-input::placeholder { color: rgba(255,255,255,0.25); }
.fd-notif-send { width: 30px; height: 30px; display: grid; place-items: center; background: linear-gradient(135deg, #63b3ed, #4a9dd6); border: none; border-radius: 9px; cursor: pointer; color: #fff; }
.fd-notif-send:hover { box-shadow: 0 3px 10px rgba(99,179,237,0.15); }
.fd-notif-send svg { width: 13px; height: 13px; }
.fd-notif-bar-wrap { height: 2px; background: rgba(255,255,255,0.03); }
.fd-notif-bar { height: 100%; width: 100%; background: linear-gradient(90deg, #63b3ed, #4a9dd6); animation: fdNotifCountdown 8s linear forwards; transform-origin: left; }
@keyframes fdNotifCountdown { from { transform: scaleX(1); } to { transform: scaleX(0); } }

/* ── Voice recorder ── */
.fd-overlay { position: fixed; inset: 0; z-index: 3000; display: grid; place-items: center; background: rgba(4,8,16,0.65); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); animation: fdFadeIn 0.2s ease-out; }
@keyframes fdFadeIn { from { opacity: 0; } }
.fd-modal { width: min(400px, 92vw); border-radius: 18px; overflow: hidden; }
.fd-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid rgba(255,255,255,0.04); font-size: 13px; color: var(--text,#eef3ff); }
.fd-modal-x { width: 28px; height: 28px; display: grid; place-items: center; background: none; border: none; color: rgba(255,255,255,0.3); cursor: pointer; border-radius: 8px; }
.fd-modal-x:hover { background: rgba(255,255,255,0.06); }
.fd-modal-x svg { width: 14px; height: 14px; }
.fd-modal-body { padding: 24px 20px; display: grid; gap: 18px; justify-items: center; }
.fd-vm-vis { display: grid; place-items: center; position: relative; }
.fd-vm-ring { width: 80px; height: 80px; border-radius: 50%; border: 3px solid rgba(255,255,255,0.08); transition: border-color 0.3s, box-shadow 0.3s; }
.fd-vm-ring.is-rec { border-color: #ef4444; box-shadow: 0 0 0 6px rgba(239,68,68,0.12), 0 0 20px rgba(239,68,68,0.18); animation: fdVmPulse 1.5s ease-in-out infinite; }
@keyframes fdVmPulse { 0%,100%{box-shadow:0 0 0 4px rgba(239,68,68,0.1),0 0 16px rgba(239,68,68,0.12);} 50%{box-shadow:0 0 0 8px rgba(239,68,68,0.06),0 0 28px rgba(239,68,68,0.22);} }
.fd-vm-time { position: absolute; font-family: "Sora",sans-serif; font-size: 22px; font-weight: 700; color: var(--text,#eef3ff); }
.fd-vm-acts { display: flex; gap: 10px; }
.fd-vm-audio { width: 100%; max-height: 36px; }

/* ── Status selector ── */
.fd-status-btn {
  display: flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 8px;
  cursor: pointer; background: none; border: 1px solid transparent;
  transition: background 0.2s, border-color 0.2s; flex-shrink: 0;
}
.fd-status-btn:hover { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.06); }
.fd-status-dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; transition: background 0.3s; }
.fd-status-dot--online { background: #63b3ed; box-shadow: 0 0 4px rgba(99,179,237,0.3); }
.fd-status-dot--away { background: #f59e0b; box-shadow: 0 0 4px rgba(245,158,11,0.3); }
.fd-status-dot--dnd { background: #ef4444; box-shadow: 0 0 4px rgba(239,68,68,0.3); }
.fd-status-dot--invisible { background: #5a6478; }
.fd-status-menu {
  position: fixed; z-index: 5000; min-width: 150px;
  padding: 5px; border-radius: 12px;
  animation: fdCtxIn 0.15s cubic-bezier(0.16,1,0.3,1);
}
.fd-status-opt {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 8px 12px; font-size: 11px; font-weight: 600; cursor: pointer;
  color: rgba(255,255,255,0.5); background: none; border: none; border-radius: 8px;
  transition: background 0.12s, color 0.12s;
}
.fd-status-opt:hover { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.8); }
.fd-status-opt.is-active { color: #fff; }

/* ── Rich presence ── */
.fd-presence { display: inline-flex; align-items: center; gap: 4px; color: #63b3ed; font-weight: 600; }
.fd-presence svg { width: 11px; height: 11px; flex: 0 0 auto; }
.fd-presence-game { color: #63b3ed; }
.fd-presence-map { color: rgba(255,255,255,0.35); font-weight: 400; }
.fd-presence-mode { color: rgba(255,255,255,0.3); font-weight: 400; font-size: 0.92em; }
.fd-st-stream { display: inline-flex; align-items: center; gap: 4px; color: #a855f7; font-weight: 600; }
.fd-st-stream svg { width: 11px; height: 11px; }

/* ── Favorites ── */
.fd-fav-btn {
  width: 24px; height: 24px; display: grid; place-items: center; flex: 0 0 auto;
  background: none; border: none; color: rgba(255,255,255,0.15); cursor: pointer;
  border-radius: 6px; transition: color 0.2s, transform 0.2s; opacity: 0;
}
.fd-card:hover .fd-fav-btn, .fd-fav-btn.is-active { opacity: 1; }
.fd-fav-btn.is-active { color: #f59e0b; }
.fd-fav-btn:hover { color: #f59e0b; transform: scale(1.12); }
.fd-fav-btn svg { width: 13px; height: 13px; }
.fd-sec-star { display: inline-flex; color: #f59e0b; }
.fd-sec-star svg { width: 10px; height: 10px; }
.fd-card.is-fav { border-left: 2px solid rgba(245,158,11,0.2); }

/* ── Suggestions / Recent ── */
.fd-suggest-head, .fd-recent-head { padding: 14px 14px 8px; }
.fd-suggest-title, .fd-recent-title {
  display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em; color: rgba(255,255,255,0.35);
}
.fd-suggest-title svg, .fd-recent-title svg { width: 13px; height: 13px; }
.fd-card--suggest, .fd-card--recent { border-left: 2px solid transparent; }
.fd-card--suggest:hover { border-left-color: rgba(99,179,237,0.2); }
.fd-card--recent:hover { border-left-color: rgba(168,85,247,0.2); }
.fd-already-badge {
  font-size: 9px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  color: rgba(99,179,237,0.6); padding: 2px 8px; border-radius: 6px;
  background: rgba(99,179,237,0.06);
  flex: 0 0 auto;
}

/* ── Responsive ── */
@media (max-width: 900px) { .friends-dock { display: none; } }
@media (hover: none),(pointer: coarse) {
  .fd-card-hover { opacity: 1 !important; max-height: 40px !important; }
  .fd-hbtn, .fd-ibtn { min-width: 44px; min-height: 44px; }
  .fd-fav-btn { opacity: 1; }
}
.fd-card:focus-within .fd-card-hover { opacity: 1; max-height: 40px; }
/* Profile — friends management panel (added) */
.pf-add-friend { display: flex; gap: 8px; }
.pf-add-friend input {
  flex: 1 1 auto; padding: 10px 12px; font-size: 13.5px; color: var(--text,#eef3ff);
  background: color-mix(in srgb, var(--glass-bg, rgba(20,30,52,0.6)) 88%, transparent);
  border: 1px solid color-mix(in srgb, var(--glass-border) 55%, transparent); border-radius: 10px;
}
.pf-add-friend input:focus { outline: none; border-color: color-mix(in srgb, var(--accent) 60%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent); }
.pf-search-results { margin-top: 8px; border-radius: 10px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--glass-border) 45%, transparent); }
.pf-noresult { padding: 12px; font-size: 12px; color: var(--text-muted,#9fb1cc); }

.pf-friends-list { display: grid; gap: 6px; }
.pf-friend { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px; transition: background 0.15s ease; }
.pf-friend:hover { background: rgba(255,255,255,0.04); }
.pf-friend__name { flex: 1 1 auto; min-width: 0; font-weight: 600; color: var(--text-soft,#c4d2ea); display: grid; gap: 1px; }
.pf-friend__status { font-size: 11px; font-weight: 500; color: var(--text-muted,#9fb1cc); }
.pf-friend__actions { display: flex; gap: 6px; flex: 0 0 auto; }
.pf-danger { color: #ff9d9d; }
.pf-danger:hover { border-color: rgba(239,68,68,0.4); }

.pf-avatar { position: relative; width: 36px; height: 36px; flex: 0 0 auto; border-radius: 50%; }
.pf-avatar img, .pf-fallback { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.pf-fallback { display: grid; place-items: center; font-weight: 700; font-size: 13px; color: #eaf2ff; background: linear-gradient(140deg, color-mix(in srgb, var(--accent) 50%, #1a2540), #141d33); }
.pf-dot { position: absolute; bottom: -1px; right: -1px; width: 11px; height: 11px; border-radius: 50%; background: #5a6478; border: 2px solid #0c1322; }
.pf-avatar.is-online .pf-dot { background: var(--status-success,#5fd0a8); }

.pf-vm.is-unread { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.pf-vm-audio { height: 34px; max-width: 200px; }
/* ============================================================
   PERFORMANCE — gate always-on infinite animations.
   These ran continuously on every glass panel and every progress
   bar site-wide (N compositor animations per page). Make them
   rest-quiet: only animate on hover/loading, never on touch.
   ============================================================ */
.glass-panel::after { animation: none; }
@media (hover: hover) and (pointer: fine) {
  .glass-panel:hover::after,
  .glass-panel:focus-within::after { animation: borderShimmer 8s ease-in-out infinite; }
}

.progress span::after { animation: none; }
.progress.is-loading span::after { animation: holoShimmer 3s linear infinite; }

/* Promote large blurred ambient layers so they don't re-rasterize each frame. */
.body-bg::before, .ambient-orb { will-change: transform; }

/* Honor reduced-motion globally for these too. */
@media (prefers-reduced-motion: reduce) {
  .glass-panel::after, .progress span::after, .progress.is-loading span::after { animation: none !important; }
}
/* ============================================================
   TOUCH REACHABILITY — hover-only actions must be reachable on
   touch devices; small targets must meet the 44px minimum.
   ============================================================ */
@media (hover: none), (pointer: coarse) {
  .fd-friend__actions { opacity: 1 !important; }
  .fd-mini { min-width: 44px; min-height: 44px; }
  .fd-req-actions .fd-mini { min-width: 44px; min-height: 44px; }
}
.fd-friend:focus-within .fd-friend__actions { opacity: 1; }

/* Custom checkbox: keep the 18px visual, expand only the HIT area via ::before
   pseudo (the checkmark uses ::after, so ::before is free). Prevents the coarse
   min-height:44px rule from stretching the box and breaking the checkmark. */
@media (pointer: coarse) {
  input[type="checkbox"], input[type="radio"] {
    min-width: 0 !important; min-height: 0 !important; position: relative;
  }
  input[type="checkbox"]::before, input[type="radio"]::before {
    content: ""; position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%); width: 44px; height: 44px;
  }
  /* Range thumb needs explicit size, not min-* (which the pseudo ignores). */
  input[type="range"]::-webkit-slider-thumb { width: 28px; height: 28px; }
}
/* Modal must include its margin in the width budget (no horizontal overflow). */
@media (max-width: 768px) {
  .modal-content { width: calc(100vw - 32px); margin: 16px auto; }
}


/* === layout.css === */
/* ============================================================
   Error & blocked pages — shared shell used by:
   404, 403, 429, 500, 502, 503, 504, and blocked.html.
   Minimal, centered, same glass + accent treatment as the rest
   of the site. No navbar, no chrome — single focused card.
   ============================================================ */
.error-shell {
  /* Topbar height is ~64px; subtract so the shell fills the remaining viewport
     without overlapping the nav. */
  min-height: calc(100vh - 80px);
  display: flex;
  /* Anchor the card toward the TOP of the available space (not dead-center).
     The error card can be taller than the viewport (icon + code + title +
     message + actions + hint); centering it pushed the headline/message below
     the fold. Top-aligning keeps the error code, title and message "up" where
     they're immediately visible, and lets longer cards scroll naturally. On
     tall viewports a min-height keeps it from hugging the very top edge. */
  align-items: center;
  justify-content: center;
  padding: 22px;
  position: relative;
  z-index: 1;  /* sits above .landing-particles which is z-index: 0 */
}

.error-shell::before {
  /* Soft accent glow behind the card so it doesn't feel cold. */
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(900px 600px at 50% 35%,
      color-mix(in srgb, var(--accent) 14%, transparent) 0%,
      transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.error-card {
  position: relative;
  z-index: 1;
  width: min(100%, 560px);
  padding: 38px 36px 32px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  text-align: left;
  border-radius: 24px;
  overflow: hidden;
}

.error-card::after {
  /* Subtle top-edge sheen */
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg,
    transparent,
    color-mix(in srgb, var(--accent) 55%, transparent),
    color-mix(in srgb, #8de6d6 40%, transparent),
    transparent);
  pointer-events: none;
}

.error-code-badge {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  padding: 6px 0;
  color: color-mix(in srgb, var(--accent) 85%, white 15%);
  background: none;
  border: none;
  box-shadow: none;
}

.error-card h1 {
  margin: 0;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.2;
}

.error-message {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-soft);
  max-width: 46ch;
}

.error-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.error-hint {
  font-size: 12px;
  margin-top: 4px;
  color: var(--text-muted);
}

.error-hint a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px dashed color-mix(in srgb, var(--accent) 40%, transparent);
  transition: border-color 0.3s ease, color 0.3s ease;
}

.error-hint a:hover,
.error-hint a:focus-visible {
  color: color-mix(in srgb, var(--accent) 85%, white 15%);
  border-color: var(--accent);
}

/* Blocked page — countdown styling on top of the shared error shell. */
.blocked-countdown {
  width: 100%;
  margin-top: 4px;
  padding: 16px 18px 14px;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 65%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 35%, transparent);
  box-shadow: inset 0 0 0 1px var(--border-inner);
  backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(150%);
}

.blocked-countdown-label {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.blocked-countdown-time {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 36px;
  letter-spacing: 0.04em;
  line-height: 1;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--accent) 90%, white 10%),
    color-mix(in srgb, #8de6d6 70%, transparent));
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  font-variant-numeric: tabular-nums;
  margin-bottom: 10px;
}

@media (max-width: 540px) {
  .error-card { padding: 28px 22px 24px; }
  .blocked-countdown-time { font-size: 30px; }
}

/* ============================================================
   Error / blocked pages — LUXURY POLISH LAYER
   Pure-CSS additions on top of the existing .error-* skeleton.
   Adds: ghost numeral, animated conic border, badge shimmer,
   refined hierarchy, glass refraction, button sweep, hover lift.
   All effects respect prefers-reduced-motion.
   ============================================================ */

/* Massive ghost numeral floating behind the card. The error code
   comes from the <body data-error-code="404"> attribute that every
   error page already carries. The default is a soft sigil that
   reads simply as cyno depth. */
body[data-error-code]::before {
  content: attr(data-error-code);
  /* absolute (not fixed) so the ghost numeral scrolls WITH the page instead of
     staying pinned — a fixed glow read as a "light shine that moves" whenever
     the page scrolled even slightly. */
  position: absolute;
  z-index: 0;
  top: 42vh;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(220px, 38vw, 520px);
  letter-spacing: -0.06em;
  line-height: 0.9;
  color: transparent;
  background:
    radial-gradient(circle at 50% 40%,
      color-mix(in srgb, var(--accent) 22%, transparent),
      color-mix(in srgb, var(--accent) 4%, transparent) 60%,
      transparent 80%);
  -webkit-background-clip: text;
          background-clip: text;
  pointer-events: none;
  user-select: none;
  opacity: 0.55;
  filter: blur(0.4px);
  animation: errorGhostDrift 22s ease-in-out infinite;
}

/* Friendlier text for the 'blocked' page where the data attribute
   isn't a numeral. */
body[data-error-code="blocked"]::before { content: "⛔"; font-size: clamp(180px, 28vw, 400px); }
body[data-error-code="maintenance"]::before { content: "✺"; }

@keyframes errorGhostDrift {
  0%, 100% { transform: translate(-50%, -50%) scale(1)    rotate(0deg); }
  50%      { transform: translate(-50%, -52%) scale(1.04) rotate(0.6deg); }
}

/* Promote the card above the ghost numeral and give it presence. */
.error-shell { z-index: 2; }
.error-card  { z-index: 3; }

/* Animated conic gradient border. Layered as a ::before behind the
   card (z=-1) so the existing ::after top-sheen still reads on top. */
.error-card {
  /* Even out the original asymmetric padding so the right side
     doesn't read as empty on 560-px width. */
  padding: 36px 36px 30px;
  /* Smooth lift on hover. */
  transition:
    transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.6s ease,
    border-color 0.6s ease;
}

.error-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    color-mix(in srgb, var(--accent) 65%, transparent) 60deg,
    color-mix(in srgb, #8de6d6 60%, transparent) 120deg,
    transparent 200deg,
    color-mix(in srgb, var(--accent) 35%, transparent) 320deg,
    transparent 360deg);
  -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.72;
  animation: errorBorderSpin 14s linear infinite;
  pointer-events: none;
}

@keyframes errorBorderSpin {
  to { transform: rotate(360deg); }
}

.error-card:hover {
  transform: translateY(-3px);
  box-shadow:
    0 28px 60px rgba(2, 6, 12, 0.65),
    0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent),
    0 0 60px color-mix(in srgb, var(--accent) 12%, transparent);
}

/* Refined badge — keeps the existing gradient but adds a sweep
   shimmer and an entrance reveal. */
.error-code-badge {
  position: relative;
  overflow: hidden;
  animation: errorBadgeReveal 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.error-code-badge::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg,
    transparent 35%,
    color-mix(in srgb, white 55%, transparent) 50%,
    transparent 65%);
  transform: translateX(-120%);
  animation: errorBadgeSweep 4.8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes errorBadgeReveal {
  from { opacity: 0; transform: translateY(-6px); letter-spacing: 0.4em; }
  to   { opacity: 1; transform: translateY(0);    letter-spacing: 0.24em; }
}

@keyframes errorBadgeSweep {
  0%, 70% { transform: translateX(-120%); }
  85%     { transform: translateX(120%); }
  100%    { transform: translateX(120%); }
}

/* Hierarchy fix: the badge ALREADY shows "404", the eyebrow used to
   read the same. Demote the eyebrow visually so the h1 is the clear
   focal point. */
.error-card .eyebrow {
  font-size: 11px;
  letter-spacing: 0.22em;
  color: color-mix(in srgb, var(--text-muted) 80%, var(--accent));
  margin-top: 2px;
}

.error-card h1 {
  margin-top: 4px;
  letter-spacing: -0.01em;
}

/* Subtle keyline divider between the message and the action row.
   Pure CSS — no extra DOM needed. */
.error-actions {
  position: relative;
  margin-top: 14px;
  padding-top: 18px;
}
.error-actions::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 36%;
  height: 1px;
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--accent) 40%, transparent),
    transparent);
}

/* Button shine sweep — applied to .btn-primary inside error-actions
   so the rest of the site is untouched. */
.error-actions .btn-primary {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.error-actions .btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg,
    transparent 30%,
    rgba(255, 255, 255, 0.32) 50%,
    transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}
.error-actions .btn-primary:hover::after {
  transform: translateX(120%);
}

/* The .error-hint inherits .metric-label by accident in the existing
   HTML. Metric-label is uppercase tracked elsewhere; here it clashes
   with sentence-case text containing inline links. Override locally. */
.error-hint {
  text-transform: none !important;
  letter-spacing: 0.01em !important;
  font-weight: 400 !important;
}

/* Glass refraction overlay — very subtle, blends two hue washes
   diagonally. Mimics the liquid-glass treatment used on hero panels. */
.error-card {
  --error-refraction: linear-gradient(
    135deg,
    color-mix(in srgb, var(--accent) 8%, transparent) 0%,
    transparent 35%,
    transparent 65%,
    color-mix(in srgb, #8de6d6 8%, transparent) 100%);
  background-image: var(--error-refraction);
  background-blend-mode: screen;
}

/* Grain — 1-px SVG noise, ultra-low opacity, fixed so it doesn't
   parallax with scroll. Adds the cinema-grade matte feel without
   ever pulling focus. */
.error-shell::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.06;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* Per-code accent tints — same engine, different mood. */
body[data-error-code="403"] { --error-accent: #f59e0b; }
body[data-error-code="404"] { --error-accent: #3b82f6; }
body[data-error-code="429"] { --error-accent: #38bdf8; }
body[data-error-code="500"] { --error-accent: #f87171; }
body[data-error-code="502"] { --error-accent: #f97316; }
body[data-error-code="503"] { --error-accent: #a78bfa; }
body[data-error-code="504"] { --error-accent: #fb7185; }
body[data-error-code="blocked"] { --error-accent: #ef4444; }
body[data-error-code]::before {
  background: radial-gradient(circle at 50% 40%,
    color-mix(in srgb, var(--error-accent, var(--accent)) 24%, transparent),
    color-mix(in srgb, var(--error-accent, var(--accent)) 4%, transparent) 60%,
    transparent 80%);
  -webkit-background-clip: text;
          background-clip: text;
}
body[data-error-code] .error-code-badge {
  background: none;
  border: none;
  box-shadow: none;
  color: color-mix(in srgb, var(--error-accent, var(--accent)) 85%, white 15%);
}

/* Respect reduced motion — drop animations, keep static gradients. */
@media (prefers-reduced-motion: reduce) {
  body[data-error-code]::before,
  .error-card::before,
  .error-code-badge,
  .error-code-badge::before,
  .error-actions .btn-primary::after {
    animation: none !important;
    transition: none !important;
  }
}

/* Phone polish — keep the depth but lighten the load. */
@media (max-width: 540px) {
  body[data-error-code]::before { opacity: 0.4; filter: blur(0.6px); }
  .error-card::before { animation-duration: 22s; opacity: 0.55; }
  .error-actions::before { right: 20%; }
}


.page-shell {
  max-width: 1260px;
  width: min(calc(100% - 44px), 1260px);
  margin: 0 auto;
  padding: 28px 22px 64px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(calc(100% - 44px), 1260px);
  margin: 0 auto;
  padding: 14px 20px;

  /* glass moved to ::before to reduce backdrop-filter seams */
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;

  border-bottom: 0;
  box-shadow: none;

  background-clip: padding-box;
  overflow: visible;
  isolation: isolate;
}

.topbar.glass-nav {
  border-top: 0;
  --shadow-inset: inset 0 -1px 0 rgba(4, 8, 16, 0.45);
}

body[data-page="status"] .topbar {
  width: min(calc(100% - 44px), 1520px);
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: nowrap;
  flex-shrink: 0;
  padding: 6px 10px;
  border-radius: 999px;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--glass-bg) 40%, transparent),
    color-mix(in srgb, var(--glass-bg-strong) 25%, transparent)
  );
  border: 1px solid color-mix(in srgb, var(--glass-border) 45%, transparent);
  box-shadow:
    inset 0 0 0 1px var(--border-inner),
    0 8px 24px rgba(2, 6, 12, 0.3);
  backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(150%);
}

/* Gradient divider between nav and actions */
.topbar-actions::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -1px;
  width: 1px;
  height: 60%;
  transform: translateY(-50%);
  background: linear-gradient(
    180deg,
    transparent,
    color-mix(in srgb, var(--accent) 40%, transparent),
    transparent
  );
  opacity: 0.5;
}

.topbar::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  border-radius: var(--radius-md);

  background: linear-gradient(
    140deg,
    color-mix(in srgb, var(--glass-bg-strong) 96%, transparent),
    color-mix(in srgb, var(--glass-bg) 84%, transparent)
  );

  backdrop-filter: blur(var(--blur-lg)) saturate(140%);
  -webkit-backdrop-filter: blur(var(--blur-lg)) saturate(140%);

  border: none;
  box-shadow: 0 14px 36px rgba(2, 8, 18, 0.46);
  background-clip: padding-box;
}

/* Liquid caustic shimmer on the topbar */
.topbar::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  border-radius: var(--radius-md);
  background: var(--liquid-highlight);
  opacity: 0.14;
  mix-blend-mode: overlay;
}

/* keep topbar content above glass */
.topbar > * {
  position: relative;
  z-index: 1;
}

.brand {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.brand-name {
  font-size: 19px;
  font-weight: 700;
  font-family: var(--font-display);
  letter-spacing: 0.03em;
  line-height: 1.1;
  color: var(--text);
  /* The brand wordmark must never wrap (it became "cyno." / "gg" on narrow
     mobile widths because the topbar squeezed it). */
  white-space: nowrap;
  flex-shrink: 0;
}

.brand-dot {
  color: var(--accent);
  -webkit-text-fill-color: var(--accent);
}

.brand-tag {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
}

.top-nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 6px;
  min-width: 0;
}

.top-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding: 8px 11px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: color 0.3s ease, border-color 0.3s ease, background 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/*
  Keep hover clean: no glass rectangle.
  Hover should only reveal the underline "pill" animation (see ::after).
  The glass pill background is reserved for the active route.
*/
.top-nav a:hover,
.top-nav a:focus-visible {
  color: var(--text);
  background: transparent;
  border-color: transparent;
}

.top-nav a:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 55%, transparent);
}

.top-nav a.active {
  color: var(--text);
  background: transparent;
  border-color: transparent;
  border-radius: 0;
  box-shadow: none;
}

.top-nav a::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  bottom: auto;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transform: scaleX(0.4);
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 10px rgba(123, 220, 255, 0.4);
}

.top-nav a:hover::before,
.top-nav a:focus-visible::before {
  opacity: 1;
  transform: scaleX(1);
}

.top-nav a.active::before {
  opacity: 1;
  transform: scaleX(1);
}

/*
  The custom cursor "magnify" effect adds .text-magnify and uses ::after.
  For top navigation we want ONLY the underline pill, so disable that overlay.
*/
.top-nav a.text-magnify {
  transform: none;
  text-shadow: none;
  filter: none;
}

.top-nav a.text-magnify::after {
  content: none;
  display: none;
}

body.is-nav-open {
  overflow: hidden;
}

.topbar-menu-toggle {
  appearance: none;
  display: none;
  position: relative;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  background: color-mix(in srgb, var(--glass) 72%, transparent);
  color: var(--text);
  cursor: pointer;
  box-shadow: inset 0 0 0 1px var(--border-inner), 0 10px 22px rgba(2, 6, 12, 0.35);
  backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.topbar-menu-toggle:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border-subtle));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 18%, transparent), 0 12px 26px rgba(2, 6, 12, 0.45);
  transform: translateY(-1px);
}

.topbar-menu-toggle:active {
  transform: translateY(0);
}

.topbar-menu-toggle:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 60%, transparent);
  outline-offset: 2px;
}

.topbar-menu-toggle__line {
  position: absolute;
  width: 16px;
  height: 1.5px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 0.24s ease, opacity 0.18s ease;
}

.topbar-menu-toggle__line:nth-child(1) {
  transform: translateY(-5px);
}

.topbar-menu-toggle__line:nth-child(2) {
  transform: translateY(0);
}

.topbar-menu-toggle__line:nth-child(3) {
  transform: translateY(5px);
}

.topbar.is-mobile-nav-open .topbar-menu-toggle__line:nth-child(1) {
  transform: rotate(45deg);
}

.topbar.is-mobile-nav-open .topbar-menu-toggle__line:nth-child(2) {
  opacity: 0;
}

.topbar.is-mobile-nav-open .topbar-menu-toggle__line:nth-child(3) {
  transform: rotate(-45deg);
}

.top-nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 19;
  border: 0;
  padding: 0;
  opacity: 0;
  pointer-events: none;
  background: rgba(4, 8, 16, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: opacity 0.2s ease;
}

.top-nav-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

@media (min-width: 1180px) {
  .page-shell {
    max-width: 1380px;
    width: min(calc(100% - 36px), 1380px);
    padding: 34px 24px 76px;
  }

  .topbar {
    width: min(calc(100% - 36px), 1380px);
    gap: 24px;
    padding: 15px 24px;
  }

  body[data-page="status"] .topbar {
    width: min(calc(100% - 36px), 1520px);
  }

  .brand {
    gap: 3px;
  }

  .brand-name {
    font-size: 21px;
  }

  .brand-tag {
    letter-spacing: 0.16em;
  }

  .top-nav {
    gap: 10px;
  }

  .top-nav a {
    font-size: 12px;
    padding: 9px 13px;
  }

  .topbar-actions {
    gap: 14px;
  }

  body[data-page="landing"] .page-shell {
    max-width: 1260px;
    width: min(calc(100% - 44px), 1260px);
    padding: 28px 22px 64px;
  }

  body[data-page="landing"] .topbar {
    width: min(calc(100% - 44px), 1260px);
    gap: 18px;
    padding: 14px 20px;
  }

  body[data-page="landing"] .brand {
    gap: 2px;
  }

  body[data-page="landing"] .brand-name {
    font-size: 19px;
  }

  body[data-page="landing"] .brand-tag {
    letter-spacing: 0.14em;
  }

  body[data-page="landing"] .top-nav {
    gap: 6px;
  }

  body[data-page="landing"] .top-nav a {
    padding: 8px 11px;
  }
}

@media (max-width: 980px) {
  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
  }

  .topbar-actions {
    order: 2;
    justify-content: flex-end;
  }

  .topbar-menu-toggle {
    display: inline-flex;
    order: 3;
  }

  .top-nav {
    order: 4;
    position: fixed;
    top: calc(84px + env(safe-area-inset-top, 0px));
    left: 12px;
    right: 12px;
    z-index: 21;
    max-height: min(70vh, 560px);
    overflow: auto;
    display: grid;
    gap: 10px;
    padding: 18px;
    border-radius: var(--radius-lg);
    border: 1px solid color-mix(in srgb, var(--glass-border) 78%, transparent);
    background: linear-gradient(155deg, color-mix(in srgb, var(--glass-bg-strong) 92%, transparent), color-mix(in srgb, var(--glass-bg) 86%, transparent));
    box-shadow: 0 24px 60px rgba(2, 8, 18, 0.55), inset 0 0 0 1px var(--border-inner);
    backdrop-filter: blur(var(--blur-lg)) saturate(165%);
    -webkit-backdrop-filter: blur(var(--blur-lg)) saturate(165%);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px) scale(0.98);
    transition: opacity 0.22s ease, transform 0.22s ease;
  }

  .topbar.is-mobile-nav-open .top-nav {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
  }

  .top-nav a {
    width: 100%;
    justify-content: flex-start;
    padding: 13px 14px;
    border-radius: 16px;
    border: 1px solid color-mix(in srgb, var(--glass-border) 68%, transparent);
    background: color-mix(in srgb, var(--glass-bg) 76%, transparent);
  }

  .top-nav a.active {
    border-radius: 16px;
    border-color: color-mix(in srgb, var(--accent) 35%, var(--glass-border));
    background: color-mix(in srgb, var(--accent) 10%, var(--glass-bg) 90%);
  }

  .top-nav a::before {
    top: auto;
    bottom: 8px;
    left: 14px;
    right: 14px;
    height: 1px;
  }
}

@media (max-width: 640px) {
  .topbar {
    width: calc(100% - 16px);
    top: 8px;
  }

  .brand-tag {
    display: none;
  }

  .top-nav {
    left: 8px;
    right: 8px;
    top: calc(72px + env(safe-area-inset-top, 0px));
    padding: 14px;
  }
}

/* ============================================================
   Landing-hero topbar — mid-size viewport polish.
   Below 1180px the desktop overrides stop, but the default
   topbar metrics can crowd nav links into the brand. Give
   the landing page a snug tablet-friendly layout (700-980px)
   before the mobile drawer kicks in at <=980.
   ============================================================ */
@media (min-width: 700px) and (max-width: 1179px) {
  body[data-page="landing"] .topbar {
    gap: 14px;
    padding: 13px 18px;
  }
  body[data-page="landing"] .brand-name {
    font-size: 18px;
  }
  body[data-page="landing"] .brand-tag {
    font-size: 10px;
    letter-spacing: 0.12em;
  }
  body[data-page="landing"] .top-nav {
    gap: 4px;
  }
  body[data-page="landing"] .top-nav a {
    padding: 7px 10px;
    font-size: 11px;
    letter-spacing: 0.08em;
  }
}

/* Touch devices: bigger tap targets in the topbar.
   Pure-mouse users keep the compact pill nav. */
html.is-touch .top-nav a {
  padding: 10px 14px;
}
html.is-touch .topbar-menu-toggle {
  width: 46px;
  height: 46px;
}
html.is-touch .icon-toggle-pill,
html.is-touch .find-toggle,
html.is-touch .sound-toggle {
  min-height: 44px;  /* iOS Human Interface Guidelines tap target */
  min-width: 44px;
}

/* ============================================================
   Error pages — mobile polish
   Pages: 404 / 403 / 429 / 500 / 502 / 503 / 504 / blocked
   ============================================================ */
@media (max-width: 640px) {
  .error-shell {
    /* Topbar is shorter on phones, sticky offset is smaller. */
    min-height: calc(100vh - 60px);
    padding: 24px 14px;
  }
  .error-card {
    padding: 26px 20px 22px;
    border-radius: 20px;
  }
  .error-code-badge {
    font-size: 12px;
    padding: 5px 12px;
    letter-spacing: 0.18em;
  }
  .error-card h1 {
    font-size: 22px;
  }
  .error-message {
    font-size: 13px;
  }
  .error-actions {
    width: 100%;
  }
  .error-actions .btn {
    flex: 1 1 calc(50% - 5px);
    justify-content: center;
    padding: 11px 12px;
    font-size: 13px;
  }
  .blocked-countdown {
    padding: 14px 14px 12px;
  }
  .blocked-countdown-time {
    font-size: 28px;
  }
}

/* ============================================================
   New topbar navigation — centered ghost glass button
   Minimalist, barely visible until hovered, then expands to full glass mega-menu
   ============================================================ */

.topbar-nav-trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  color: rgba(255, 255, 255, 0.35);
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  backdrop-filter: blur(8px) saturate(120%);
  -webkit-backdrop-filter: blur(8px) saturate(120%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), background 0.4s ease, border-color 0.4s ease;
  box-shadow: none;
}

.topbar-nav-trigger:hover,
.topbar-nav-trigger:focus-visible,
.topbar-nav-trigger[aria-expanded="true"] {
  padding: 10px 18px;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--glass-bg-strong) 60%, transparent),
    color-mix(in srgb, var(--glass-bg) 40%, transparent)
  );
  color: var(--text);
  backdrop-filter: blur(var(--blur-md)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--blur-md)) saturate(160%);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--accent) 15%, transparent),
    0 8px 32px rgba(2, 6, 12, 0.4),
    0 0 40px color-mix(in srgb, var(--accent) 8%, transparent);
}

.topbar-nav-trigger:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 55%, transparent);
  outline-offset: 3px;
}

.topbar-nav-trigger .action-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.topbar-nav-trigger:hover .action-icon,
.topbar-nav-trigger[aria-expanded="true"] .action-icon {
  opacity: 1;
  transform: scale(1.1);
}

.topbar-nav-label {
  display: inline;
  transition: opacity 0.3s ease;
}

/* Center the nav in the topbar */
.top-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 0;
  flex-wrap: nowrap;
  min-width: 0;
  position: relative;
}

/* Hide old text links */
.top-nav a:not(.topbar-nav-trigger) {
  display: none;
}

/* Action icons — premium sizing */
.topbar-action-btn .action-icon {
  width: 20px;
  height: 20px;
  display: block;
}

/* (Old centered mega-menu overrides removed — now using sidebar layout from navigation.css) */

@media (max-width: 380px) {
  .error-actions .btn {
    flex: 1 1 100%;
  }
}

/* ============================================================
   Build page (per-user MSBuild trigger + progress poll)
   ============================================================ */
.build-shell {
  display: grid;
  gap: 18px;
}

.build-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: clamp(22px, 4vw, 32px);
  text-align: center;
}

.build-hero h1 {
  margin: 0 0 8px;
}

.build-hero-actions {
  display: flex;
  justify-content: center;
  flex-shrink: 0;
}

.build-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.build-meta code {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--glass-bg) 60%, transparent);
  border: 1px solid color-mix(in srgb, var(--glass-border) 55%, transparent);
}

.build-error {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--status-danger) 45%, var(--glass-border));
  background: color-mix(in srgb, var(--status-danger) 10%, transparent);
  color: color-mix(in srgb, var(--status-danger) 60%, white);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  max-height: 240px;
  overflow: auto;
}

.build-downloads {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--glass-border));
  background: color-mix(in srgb, var(--accent) 6%, transparent);
}

.build-files {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.build-file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 65%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 35%, transparent);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.build-file:hover {
  border-color: color-mix(in srgb, var(--accent) 50%, var(--glass-border));
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 18%, transparent),
              0 14px 28px rgba(2, 6, 12, 0.4);
}

.build-file-name {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
}

.build-file-hash {
  font-family: var(--font-mono);
  font-size: 11px;
}

.build-history {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  max-height: 340px;
  overflow-y: auto;
  padding-right: 4px;
}
.build-history::-webkit-scrollbar { width: 6px; }
.build-history::-webkit-scrollbar-track { background: transparent; }
.build-history::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.12);
  border-radius: 3px;
}
.build-history::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.22); }

.build-history-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 55%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 30%, transparent);
  cursor: pointer;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.build-history-row:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--glass-border));
  background: color-mix(in srgb, var(--accent) 6%, transparent);
}

.build-history-id {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
}

@media (max-width: 540px) {
  .build-hero { flex-direction: column; align-items: flex-start; }
  .build-file { flex-direction: column; align-items: flex-start; }
  .build-history-row { flex-wrap: wrap; }
}

/* ============================================================
   Live core-service rows on status.html
   Powered by /web/health, polled every 15 seconds.
   ============================================================ */
#serviceStatusList {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

#serviceStatusList .service-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--glass-border) 65%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 35%, transparent);
  box-shadow: inset 0 0 0 1px var(--border-inner);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#serviceStatusList .service-card.is-down {
  border-color: color-mix(in srgb, var(--status-danger) 35%, var(--glass-border));
  box-shadow:
    inset 0 0 0 1px var(--border-inner),
    0 0 0 1px color-mix(in srgb, var(--status-danger) 14%, transparent),
    0 0 18px color-mix(in srgb, var(--status-danger) 12%, transparent);
}

#serviceStatusList .service-card-main {
  display: grid;
  gap: 8px;
  min-width: 0;
}

#serviceStatusList .service-card-desc {
  font-size: 12px;
  color: var(--text-muted);
}

#serviceStatusList .service-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

#serviceStatusList .service-latency {
  font-family: var(--font-display, "Sora"), monospace;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  padding: 0;
  border-radius: 0;
  border: none;
  background: none;
  color: var(--text-soft);
}

#serviceStatusList .service-latency.is-down {
  color: color-mix(in srgb, var(--status-danger) 60%, white);
  border: none;
  background: none;
}

@media (max-width: 540px) {
  #serviceStatusList .service-card {
    flex-direction: column;
    align-items: flex-start;
  }
  #serviceStatusList .service-card-meta {
    width: 100%;
    justify-content: space-between;
  }
}

/* ============================================================
   Notification bell icon — used inside .icon-toggle-pill
   ============================================================ */

/* The bell glyph — uses the same SVG-mask technique as the
   sound and find icons so it inherits currentColor. */
.bell-icon {
  position: relative;
  display: block;
  width: 16px;
  height: 16px;
  background: currentColor;
  -webkit-mask: url('data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 16 16%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%221.4%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M8 2.2c-2.3 0-4.1 1.85-4.1 4.13v1.6c0 0.65-0.27 1.27-0.74 1.71L2 11h12l-1.16-1.36c-0.47-0.44-0.74-1.06-0.74-1.71v-1.6C12.1 4.05 10.3 2.2 8 2.2z%22/%3E%3Cpath d=%22M6.5 12.5c0 0.83 0.67 1.5 1.5 1.5s1.5-0.67 1.5-1.5%22/%3E%3C/svg%3E') center / contain no-repeat;
          mask: url('data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 16 16%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%221.4%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M8 2.2c-2.3 0-4.1 1.85-4.1 4.13v1.6c0 0.65-0.27 1.27-0.74 1.71L2 11h12l-1.16-1.36c-0.47-0.44-0.74-1.06-0.74-1.71v-1.6C12.1 4.05 10.3 2.2 8 2.2z%22/%3E%3Cpath d=%22M6.5 12.5c0 0.83 0.67 1.5 1.5 1.5s1.5-0.67 1.5-1.5%22/%3E%3C/svg%3E') center / contain no-repeat;
  opacity: 0.95;
}

/* Subtle pulse when the user has unread notifications. */
.icon-toggle-pill__btn[data-notification-bell].has-unread .bell-icon {
  animation: bell-chime 4.5s cubic-bezier(0.36, 0, 0.66, -0.56) infinite;
  transform-origin: 50% 15%;
}

@keyframes bell-chime {
  0%, 85%, 100% { transform: rotate(0); }
  88%           { transform: rotate(-12deg); }
  92%           { transform: rotate(10deg); }
  96%           { transform: rotate(-4deg); }
}

@media (prefers-reduced-motion: reduce) {
  .icon-toggle-pill__btn[data-notification-bell].has-unread .bell-icon { animation: none; }
}

/* Badge — uses the brand accent, not bright red. */
.notification-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--accent) 90%, white 10%),
    color-mix(in srgb, var(--accent) 60%, transparent));
  color: var(--bg, #05070d);
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  letter-spacing: 0.02em;
  text-align: center;
  border: 1.5px solid color-mix(in srgb, var(--bg, #05070d) 80%, transparent);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent),
    0 4px 14px color-mix(in srgb, var(--accent) 35%, transparent),
    0 8px 20px rgba(2, 6, 12, 0.55);
  animation: badgePulse 2s ease-in-out infinite;
}

.notification-badge[hidden] { display: none; }

.notification-badge.has-new {
  animation: badgePulse 1s ease-in-out infinite, badgePop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ============================================================
   LUXURY TOPBAR ACTION BUTTONS
   Search, bell, sound, more — glass-morphism, gradient icons,
   hover glow, active indicators, smooth transitions, tooltips.
   ============================================================ */

/* Base luxury action button */
.topbar-action-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 55%, transparent);
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--glass-bg) 50%, transparent),
    color-mix(in srgb, var(--glass-bg-strong) 55%, transparent)
  );
  color: var(--text-soft);
  cursor: pointer;
  overflow: hidden;
  box-shadow:
    inset 0 0 0 1px var(--border-inner),
    0 8px 24px rgba(2, 6, 12, 0.35),
    0 0 12px color-mix(in srgb, var(--glass-bg) 20%, transparent);
  backdrop-filter: blur(var(--blur-sm)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(160%);
  transition:
    color 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    background 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  isolation: isolate;
}

/* Subtle inner shimmer */
.topbar-action-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.08), transparent 60%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
  z-index: 0;
}

/* Icon sizing inside action buttons — inline SVGs (search, etc.) */
.topbar-action-btn .action-icon {
  position: relative;
  display: block;
  width: 18px;
  height: 18px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1;
}

/* Gradient icon for masked icons (bell, sound, find) */
.bell-icon,
.sound-toggle .action-icon,
.find-toggle .action-icon {
  background: linear-gradient(
    135deg,
    var(--text-soft) 0%,
    color-mix(in srgb, var(--accent) 80%, var(--text-soft)) 100%
  );
  -webkit-mask-size: contain;
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-size: contain;
  mask-position: center;
  mask-repeat: no-repeat;
  transition: background 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Hover glow effect */
.topbar-action-btn:hover {
  color: var(--text);
  border-color: color-mix(in srgb, var(--accent) 55%, var(--glass-border));
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--accent) 18%, var(--glass-bg) 55%),
    color-mix(in srgb, var(--accent) 10%, var(--glass-bg-strong) 45%)
  );
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent),
    inset 0 0 0 1px var(--border-inner),
    0 14px 32px rgba(2, 6, 12, 0.5),
    0 0 28px color-mix(in srgb, var(--accent) 20%, transparent),
    0 0 60px color-mix(in srgb, var(--accent) 8%, transparent);
  transform: translateY(-2px) scale(1.06);
}

.topbar-action-btn:hover::before {
  opacity: 1;
}

.topbar-action-btn:hover .bell-icon,
.topbar-action-btn:hover .sound-toggle .action-icon,
.topbar-action-btn:hover .find-toggle .action-icon {
  background: linear-gradient(
    135deg,
    var(--text) 0%,
    color-mix(in srgb, var(--accent) 90%, white 10%) 100%
  );
  transform: scale(1.1);
}

/* Active state */
.topbar-action-btn:active {
  transform: translateY(0) scale(0.98);
}

/* Active/selected indicator */
.topbar-action-btn.is-active {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 55%, var(--glass-border));
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--accent) 20%, var(--glass-bg) 70%),
    color-mix(in srgb, var(--accent) 12%, var(--glass-bg-strong) 50%)
  );
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent),
    inset 0 0 0 1px var(--border-inner),
    0 14px 30px rgba(2, 6, 12, 0.5),
    0 0 24px color-mix(in srgb, var(--accent) 22%, transparent);
}

.topbar-action-btn.is-active .bell-icon,
.topbar-action-btn.is-active .sound-toggle .action-icon,
.topbar-action-btn.is-active .find-toggle .action-icon {
  background: linear-gradient(
    135deg,
    var(--accent) 0%,
    color-mix(in srgb, var(--accent) 80%, white 20%) 100%
  );
  animation: activeIconPulse 2s ease-in-out infinite;
}

@keyframes activeIconPulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 4px color-mix(in srgb, var(--accent) 40%, transparent)); }
  50% { transform: scale(1.1); filter: drop-shadow(0 0 8px color-mix(in srgb, var(--accent) 60%, transparent)); }
}

/* Focus visible */
.topbar-action-btn:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 70%, transparent);
  outline-offset: 2px;
}

/* Ripple effect on click */
.topbar-action-btn .ripple {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    color-mix(in srgb, var(--accent) 40%, transparent) 0%,
    color-mix(in srgb, var(--accent) 15%, transparent) 40%,
    transparent 70%
  );
  transform: scale(0);
  animation: rippleEffect 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  pointer-events: none;
  z-index: 0;
}

@keyframes rippleEffect {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Tooltip on hover */
.topbar-action-btn::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(6px) scale(0.9);
  padding: 6px 12px;
  border-radius: 10px;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--glass-bg-strong) 95%, transparent),
    color-mix(in srgb, var(--glass-bg) 90%, transparent)
  );
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.25s ease,
    transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow:
    0 8px 24px rgba(2, 6, 12, 0.5),
    inset 0 0 0 1px var(--border-inner);
  backdrop-filter: blur(var(--blur-md)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--blur-md)) saturate(160%);
  border: 1px solid color-mix(in srgb, var(--glass-border) 60%, transparent);
  z-index: 100;
}

/* Tooltip arrow */
.topbar-action-btn::before {
  content: "";
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%) translateY(6px) scale(0.9);
  width: 8px;
  height: 8px;
  background: color-mix(in srgb, var(--glass-bg-strong) 95%, transparent);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.25s ease,
    transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  clip-path: polygon(50% 100%, 0 0, 100% 0);
  z-index: 100;
}

.topbar-action-btn:hover::after,
.topbar-action-btn:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}

.topbar-action-btn:hover::before,
.topbar-action-btn:focus-visible::before {
  opacity: 0.8;
  transform: translateX(-50%) translateY(0) scale(1);
}

@keyframes badgePulse {
  0%, 100% {
    box-shadow:
      0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent),
      0 4px 14px color-mix(in srgb, var(--accent) 35%, transparent),
      0 8px 20px rgba(2, 6, 12, 0.55);
  }
  50% {
    box-shadow:
      0 0 0 2px color-mix(in srgb, var(--accent) 45%, transparent),
      0 4px 18px color-mix(in srgb, var(--accent) 45%, transparent),
      0 8px 24px rgba(2, 6, 12, 0.6);
  }
}

@keyframes badgePop {
  0% { transform: scale(0.5); }
  100% { transform: scale(1); }
}

/* Search bar expand animation */
.topbar-search-expand {
  position: relative;
  display: flex;
  align-items: center;
}

.topbar-search-input {
  width: 0;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-sans);
  opacity: 0;
  transition:
    width 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    padding 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.25s ease;
  overflow: hidden;
  white-space: nowrap;
}

.topbar-search-expand.is-open .topbar-search-input {
  width: 180px;
  padding: 8px 12px;
  opacity: 1;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--glass-border));
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--glass-bg) 70%, transparent),
    color-mix(in srgb, var(--glass-bg-strong) 50%, transparent)
  );
  box-shadow:
    inset 0 0 0 1px var(--border-inner),
    0 0 16px color-mix(in srgb, var(--accent) 12%, transparent);
  backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur-sm)) saturate(150%);
}

.topbar-search-input::placeholder {
  color: var(--text-muted);
  font-size: 12px;
}

.topbar-search-input:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--accent) 60%, var(--glass-border));
  box-shadow:
    inset 0 0 0 1px var(--border-inner),
    0 0 20px color-mix(in srgb, var(--accent) 18%, transparent);
}

@media (prefers-reduced-motion: reduce) {
  .topbar-action-btn,
  .topbar-action-btn .action-icon,
  .topbar-action-btn.is-active .action-icon,
  .notification-badge,
  .topbar-search-expand,
  .topbar-search-input,
  .topbar-action-btn::after,
  .topbar-action-btn::before {
    animation: none !important;
    transition: opacity 0.15s ease !important;
  }
}

/* Touch devices: bigger tap targets */
@media (max-width: 980px) {
  .topbar-action-btn {
    width: 44px;
    height: 44px;
  }
  
  .topbar-actions {
    gap: 6px;
    padding: 6px 8px;
  }
  
  .topbar-action-btn::after,
  .topbar-action-btn::before {
    display: none;
  }
}

.notification-dropdown {
  position: fixed;
  top: 80px;
  right: 24px;
  width: min(380px, calc(100vw - 32px));
  max-height: 520px;
  z-index: var(--z-dropdown);
  border-radius: 20px;
  border: 1px solid color-mix(in srgb, var(--glass-border) 75%, transparent);
  background: linear-gradient(145deg, color-mix(in srgb, var(--glass-bg-strong) 88%, transparent), color-mix(in srgb, var(--glass-bg) 76%, transparent));
  backdrop-filter: blur(var(--blur-lg)) saturate(170%);
  -webkit-backdrop-filter: blur(var(--blur-lg)) saturate(170%);
  box-shadow: var(--shadow-3), var(--glass-glow), inset 0 0 0 1px var(--border-inner);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: notifDropdownIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes notifDropdownIn {
  from { opacity: 0; transform: translateY(-10px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.notification-dropdown[hidden] {
  display: none !important;
}

.notification-dropdown-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid color-mix(in srgb, var(--glass-border) 65%, transparent);
}

.notification-dropdown-header h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  background: linear-gradient(135deg, var(--text) 40%, var(--accent) 80%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.notification-dropdown-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: grid;
  gap: 8px;
}

.notification-item {
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--glass-border) 50%, transparent);
  background: color-mix(in srgb, var(--glass-bg) 40%, transparent);
  transition: background-color 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.notification-item:hover {
  background: color-mix(in srgb, var(--glass-bg-strong) 60%, transparent);
  border-color: color-mix(in srgb, var(--accent) 30%, var(--glass-border));
  transform: translateX(2px);
}

.notification-item.is-read {
  opacity: 0.6;
}

.notification-item-content {
  display: grid;
  gap: 4px;
}

.notification-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.notification-message {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.notification-time {
  font-size: 11px;
  color: var(--text-soft);
  margin-top: 2px;
}

/* Notification dropdown filter buttons */
.notification-dropdown-filters {
  display: flex;
  gap: 6px;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.notif-filter-btn {
  background: rgba(255, 255, 255, 0.05);
  border: none;
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
  font-family: inherit;
}

.notif-filter-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

.notif-filter-btn.active {
  background: var(--accent);
  color: var(--bg-0);
}

/* Notification item icon */
.notification-item-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.notification-item {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
}

/* Toast notification popup */
.notif-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--glass-bg, rgba(10, 12, 20, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  max-width: 380px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  z-index: 10000;
  animation: notifToastSlideIn 0.3s ease-out;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.notif-toast-exit {
  animation: notifToastSlideOut 0.3s ease-in forwards;
}

.notif-toast-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(99, 102, 241, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.notif-toast-content {
  flex: 1;
  min-width: 0;
}

.notif-toast-title {
  font-weight: 600;
  color: var(--text-primary, #fff);
  font-size: 14px;
  margin-bottom: 4px;
}

.notif-toast-message {
  color: var(--text-muted, rgba(255, 255, 255, 0.6));
  font-size: 13px;
  line-height: 1.4;
}

.notif-toast-close {
  background: none;
  border: none;
  color: var(--text-soft, rgba(255, 255, 255, 0.4));
  font-size: 20px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.2s;
}

.notif-toast-close:hover {
  color: var(--text-primary, #fff);
}

@keyframes notifToastSlideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes notifToastSlideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

@media (max-width: 980px) {
  .notification-dropdown {
    width: calc(100% - 16px);
    right: 8px;
    top: 72px;
    max-height: 70vh;
  }

  .notif-toast {
    bottom: 16px;
    right: 16px;
    left: 16px;
    max-width: none;
  }
}



/* === navigation.css === */
/* ============================================================
   CYNO.GG — Navigation System
   Slide-in sidebar opened from the topbar MENU trigger.
   ============================================================ */

/* ── Sidebar panel — slides in from the right ── */
.nav-mega-menu {
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: auto !important;
  z-index: 9999 !important;
  width: 280px !important;
  max-width: calc(100vw - 48px);
  max-height: 100vh !important;
  min-width: unset !important;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 !important;
  border-radius: 0 !important;
  border: none !important;
  border-left: 1px solid color-mix(in srgb, var(--glass-border) 50%, transparent) !important;
  background:
    linear-gradient(180deg,
      rgba(8, 14, 24, 0.97) 0%,
      rgba(6, 10, 18, 0.98) 100%) !important;
  box-shadow:
    -20px 0 60px rgba(0, 0, 0, 0.5),
    inset 1px 0 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(40px) saturate(160%);
  -webkit-backdrop-filter: blur(40px) saturate(160%);
  display: flex !important;
  flex-direction: column;
  gap: 0;
  opacity: 0;
  transform: translateX(100%) !important;
  transform-origin: right center !important;
  pointer-events: none;
  transition:
    opacity 0.32s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);

  /* Slim custom scrollbar */
  scrollbar-width: thin;
  scrollbar-color: rgba(123, 220, 255, 0.15) transparent;
}
.nav-mega-menu::-webkit-scrollbar { width: 4px; }
.nav-mega-menu::-webkit-scrollbar-track { background: transparent; }
.nav-mega-menu::-webkit-scrollbar-thumb {
  background: rgba(123, 220, 255, 0.15);
  border-radius: 4px;
}

/* Stagger sections when the sidebar opens */
.nav-mega-menu.is-open .nav-mega-section {
  animation: navSectionSlide 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.nav-mega-menu.is-open .nav-mega-section:nth-child(1) { animation-delay: 0.03s; }
.nav-mega-menu.is-open .nav-mega-section:nth-child(2) { animation-delay: 0.06s; }
.nav-mega-menu.is-open .nav-mega-section:nth-child(3) { animation-delay: 0.09s; }
.nav-mega-menu.is-open .nav-mega-section:nth-child(4) { animation-delay: 0.12s; }
.nav-mega-menu.is-open .nav-mega-section:nth-child(5) { animation-delay: 0.15s; }
.nav-mega-menu.is-open .nav-mega-section:nth-child(6) { animation-delay: 0.18s; }
.nav-mega-menu.is-open .nav-mega-section:nth-child(7) { animation-delay: 0.21s; }
@keyframes navSectionSlide {
  from { opacity: 0; transform: translateX(12px); }
  to   { opacity: 1; transform: translateX(0); }
}
@media (prefers-reduced-motion: reduce) {
  .nav-mega-menu.is-open .nav-mega-section { animation: none; }
}

.nav-mega-menu.is-open {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transform: translateX(0) !important;
}

.nav-mega-menu[hidden] {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Top accent line */
.nav-mega-menu::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--accent) 60%, transparent),
    color-mix(in srgb, #8de6d6 40%, transparent),
    transparent 80%);
  pointer-events: none;
  z-index: 1;
}

/* Remove the hover-bridge (was for centered dropdown) */
.nav-mega-menu::after { display: none; }

/* ── Sidebar header — brand echo + close hint ── */
.nav-mega-menu > .nav-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* ── Mega menu sections ── */
.nav-mega-section {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 10px 12px;
}

/* Thin separator between sections */
.nav-mega-section + .nav-mega-section {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Ensure links visible when open */
.nav-mega-menu.is-open .nav-mega-section a {
  display: flex !important;
}

/* Section titles */
.nav-mega-section .nav-section-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: color-mix(in srgb, var(--accent) 70%, var(--text-muted));
  margin: 0 0 4px;
  padding: 4px 10px 2px;
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

/* No dot marker — cleaner for sidebar */
.nav-mega-section .nav-section-title::before { display: none; }
/* No trailing hairline */
.nav-mega-section .nav-section-title::after { display: none; }

/* ── Nav links — compact list style ── */
.nav-mega-section a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  border: none;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition:
    color 0.18s ease,
    background 0.18s ease,
    padding-left 0.18s ease;
}

/* Left accent bar on hover */
.nav-mega-section a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 0;
  border-radius: 999px;
  background: var(--accent);
  transition: height 0.18s ease;
}

/* Right chevron hint */
.nav-mega-section a::after {
  content: "\203A";
  margin-left: auto;
  font-size: 15px;
  line-height: 1;
  color: var(--accent);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.nav-mega-section a:hover,
.nav-mega-section a:focus-visible {
  color: var(--text);
  background: rgba(123, 220, 255, 0.06);
  padding-left: 14px;
}
.nav-mega-section a:hover::before,
.nav-mega-section a:focus-visible::before { height: 55%; }
.nav-mega-section a:hover::after,
.nav-mega-section a:focus-visible::after { opacity: 1; transform: translateX(0); }

.nav-mega-section a:focus-visible {
  outline: none;
  box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--accent) 40%, transparent);
}

/* Active item */
.nav-mega-section a.active {
  color: var(--accent);
  background: rgba(123, 220, 255, 0.08);
}
.nav-mega-section a.active::before { height: 55%; }

/* ── Backdrop ── */
.nav-mega-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.45);
  transition: opacity 0.25s ease;
}

.nav-mega-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* ── Desktop (>=981px) ── */
@media (min-width: 981px) {
  .nav-mega-section {
    display: flex;
    flex-direction: column;
    gap: 1px;
  }

  .nav-mega-section .nav-section-title {
    grid-column: unset;
  }

  /* Reset any tile overrides — keep the list style */
  .nav-mega-section a {
    flex-direction: row;
    text-align: left;
  }
  .nav-mega-section a::after { content: "\203A"; }

  .nav-mega-section a:hover,
  .nav-mega-section a:focus-visible {
    transform: none;
    box-shadow: none;
  }

  .nav-mega-section a:focus-visible {
    outline: 1.5px solid color-mix(in srgb, var(--accent) 45%, transparent);
    outline-offset: 1px;
  }

  /* Hover no longer opens — sidebar is click-only via JS */
}

/* ── Mobile (<=980px) ── */
@media (max-width: 980px) {
  .nav-mega-menu {
    width: 260px;
  }

  /* Single mobile nav: reset .top-nav to inline container */
  .topbar .top-nav {
    position: static !important;
    display: inline-flex !important;
    width: auto; max-height: none; overflow: visible;
    padding: 0; margin: 0;
    background: none !important; border: none !important;
    box-shadow: none !important; backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    opacity: 1 !important; pointer-events: auto !important;
    transform: none !important;
  }
  .topbar .top-nav > .nav-mega-menu { position: fixed; }
  .topbar-menu-toggle { display: none !important; }
}

@media (max-width: 640px) {
  .nav-mega-menu {
    width: calc(100vw - 32px);
    max-width: 280px;
  }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .nav-mega-menu {
    transition: opacity 0.15s ease !important;
    transform: none !important;
  }

  .nav-mega-section a {
    transition: none !important;
  }
}

/* ── Touch devices: bigger tap targets ── */
html.is-touch .nav-mega-section a {
  padding: 10px 10px;
  min-height: 44px;
}

/* ── Integration with topbar ── */
.topbar .top-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
}

.topbar .top-nav.is-public-hidden {
  display: none !important;
}

@media (min-width: 981px) {
  .topbar .top-nav {
    flex-wrap: nowrap;
  }
}

.topbar .brand { flex-shrink: 0; }
.topbar .topbar-actions { flex-shrink: 0; }

/* ============================================================
   MOBILE BOTTOM TAB BAR
   ============================================================ */

@media (pointer: coarse) and (max-width: 720px) {
  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: var(--z-sticky);
    background: linear-gradient(145deg, color-mix(in srgb, var(--glass-bg-strong) 95%, transparent), color-mix(in srgb, var(--glass-bg) 90%, transparent));
    backdrop-filter: blur(var(--blur-md));
    -webkit-backdrop-filter: blur(var(--blur-md));
    border-top: 1px solid color-mix(in srgb, var(--glass-border) 60%, transparent);
    padding: 6px 0 max(6px, env(safe-area-inset-bottom, 0px));
    justify-content: space-around;
    box-shadow: 0 -4px 20px rgba(2, 6, 12, 0.4);
  }

  .mobile-bottom-nav a {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 6px 10px;
    min-height: 48px;
    min-width: 56px;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 500;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-radius: var(--radius-xs);
    transition: color 0.2s ease, background 0.2s ease;
  }

  .mobile-bottom-nav a svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
  }

  .mobile-bottom-nav a:hover,
  .mobile-bottom-nav a:focus-visible {
    color: var(--text);
    background: color-mix(in srgb, var(--glass-bg) 30%, transparent);
  }

  .mobile-bottom-nav a.active {
    color: var(--accent);
  }

  .mobile-bottom-nav a.active svg {
    filter: drop-shadow(0 0 6px rgba(123, 220, 255, 0.4));
  }

  .mobile-bottom-nav .nav-badge {
    position: absolute;
    top: 2px;
    right: 50%;
    transform: translateX(14px);
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--status-danger);
    color: #041018;
    font-size: 9px;
    font-weight: 700;
    display: grid;
    place-items: center;
    line-height: 1;
  }

  body {
    padding-bottom: max(64px, calc(56px + env(safe-area-inset-bottom, 0px)));
  }
}

@media (min-width: 721px), (pointer: fine) {
  .mobile-bottom-nav {
    display: none !important;
  }
}


/* === topbar-controls.css === */
/* ============================================================================
   Control Hub — one bento trigger → one unified glass panel.
   Sections: Search · Notifications · Music · Sound.

   Design system (kept strict for a professional, cohesive feel):
     radius   : trigger 14, panel 20, fields/tiles 12, pills 999
     spacing  : 16 panel padding, 16 section rhythm, 10/12 inner gaps
     hairline : 1px rgba(255,255,255,0.07) dividers, crisp not muddy
     accent   : var(--accent) used sparingly for state, not decoration
   ============================================================================ */

/* When the topbar holds only the control hub, the .topbar-actions "tray"
   (its own glass pill background + border) is redundant and double-outlines
   the CONTROLS button. Strip the outer layer so just the pill shows. */
.topbar-actions:has(.ctl-hub) {
  padding: 0;
  background: none;
  border: none;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.topbar-actions:has(.ctl-hub)::before { display: none; }

.ctl-hub {
  position: relative;
  display: inline-flex;
}

/* ── Trigger: matches the MENU pill style ─────────────────── */
.ctl-trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  color: rgba(255, 255, 255, 0.35);
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-sans, "Manrope", sans-serif);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  -webkit-backdrop-filter: blur(8px) saturate(120%);
  backdrop-filter: blur(8px) saturate(120%);
  -webkit-backdrop-filter: blur(8px) saturate(120%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), background 0.4s ease, border-color 0.4s ease;
  box-shadow: none;
}

.ctl-trigger:hover,
.ctl-trigger:focus-visible,
.ctl-hub.is-open .ctl-trigger {
  padding: 10px 18px;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--glass-bg-strong) 60%, transparent),
    color-mix(in srgb, var(--glass-bg) 40%, transparent)
  );
  color: var(--text);
  -webkit-backdrop-filter: blur(var(--blur-md, 18px)) saturate(160%);
  backdrop-filter: blur(var(--blur-md, 18px)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--blur-md, 18px)) saturate(160%);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--accent) 15%, transparent),
    0 8px 32px rgba(2, 6, 12, 0.4),
    0 0 40px color-mix(in srgb, var(--accent) 8%, transparent);
}

.ctl-trigger:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 55%, transparent);
  outline-offset: 3px;
}

.ctl-trigger .action-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.ctl-trigger:hover .action-icon,
.ctl-hub.is-open .ctl-trigger .action-icon {
  opacity: 1;
  transform: scale(1.1) rotate(45deg);
}

.ctl-trigger-label {
  display: inline;
  transition: opacity 0.3s ease;
}

/* Tiny unread dot (no number), tucked at the top-right of the pill */
.ctl-trigger-dot {
  position: absolute;
  top: 2px; right: 4px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent, #7bdcff);
  box-shadow: 0 0 6px color-mix(in srgb, var(--accent, #7bdcff) 80%, transparent);
}
.ctl-trigger-dot[hidden] { display: none !important; }

/* ============================================================================
   Unified panel — ultra-clear frosted polyglass
   ============================================================================ */
.ctl-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 320px;
  padding: 16px;
  border-radius: 22px;
  /* Frosted polyglass with a solid dark base so content never bleeds through,
     plus a subtle light sheen on top for the glass feel. */
  background:
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0) 30%),
    linear-gradient(168deg, rgba(20,30,52,0.92), rgba(11,18,33,0.95) 60%, rgba(8,13,24,0.96));
  border: 1px solid rgba(255,255,255,0.12);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(0,0,0,0.2),
    inset 0 1px 0 rgba(255,255,255,0.16);
  z-index: 400;
  transform-origin: top right;
  opacity: 0;
  transform: translateY(-8px) scale(0.97);
  pointer-events: none;
  /* visibility: hidden ensures children (the spinning vinyl, its cyan glow
     box-shadow, the radio sheen) actually leave compositing. Without this,
     the vinyl-label's cyan glow was painting at ~(1387, 267) on the page even
     though opacity:0 was supposed to hide the panel — opacity:0 doesn't
     reliably suppress child box-shadows when the parent has backdrop-filter,
     because that forces a separate compositing layer. */
  visibility: hidden;
  transition: opacity 0.22s ease, transform 0.26s cubic-bezier(0.34,1.4,0.5,1), visibility 0s linear 0.22s;
}

.ctl-hub.is-open .ctl-panel {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  visibility: visible;
  transition: opacity 0.22s ease, transform 0.26s cubic-bezier(0.34,1.4,0.5,1), visibility 0s linear 0s;
}

/* Soft light-catch on the top edge */
.ctl-panel-glow {
  position: absolute;
  top: 0; left: 20%; right: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
}

/* ── Search ───────────────────────────────────────────────── */
.ctl-search {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 40px;
  padding: 0 10px;
  border-radius: 12px;
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-muted, #a8b9d4);
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.ctl-search:focus-within {
  border-color: color-mix(in srgb, var(--accent, #7bdcff) 40%, transparent);
  background: rgba(255,255,255,0.06);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent, #7bdcff) 10%, transparent);
}
.ctl-search > svg { width: 16px; height: 16px; flex-shrink: 0; opacity: 0.8; }
.ctl-search input {
  flex: 1; min-width: 0;
  background: none; border: none; outline: none;
  color: var(--text, #eef3ff);
  font-family: var(--font-sans, "Manrope", sans-serif);
  font-size: 13px;
}
.ctl-search input::placeholder { color: color-mix(in srgb, var(--text-muted, #a8b9d4) 80%, transparent); }
.ctl-kbd {
  flex-shrink: 0;
  font-size: 11px; font-weight: 600;
  color: var(--text-muted, #a8b9d4);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 5px;
  width: 20px; height: 20px;
  display: grid; place-items: center;
}
/* ── Radio shortcut (inside search bar) ──────────────────── */
.ctl-radio-shortcut {
  flex-shrink: 0;
  display: grid; place-items: center;
  width: 22px; height: 22px;
  padding: 0; margin-left: 2px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 6px;
  color: var(--text-muted, #a8b9d4);
  cursor: pointer;
  transition: all 0.2s ease;
  opacity: 0.55;
}
.ctl-radio-shortcut:hover {
  opacity: 1;
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.14);
  color: var(--accent, #7bdcff);
}
.ctl-radio-shortcut.is-active {
  opacity: 0.9;
  color: var(--accent, #7bdcff);
  background: color-mix(in srgb, var(--accent, #7bdcff) 10%, transparent);
  border-color: color-mix(in srgb, var(--accent, #7bdcff) 25%, transparent);
}
/* ── Section rhythm ───────────────────────────────────────── */
.ctl-section {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.07);
}

.ctl-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.ctl-section-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display, "Sora", sans-serif);
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text, #eef3ff);
}
.ctl-section-title svg { width: 15px; height: 15px; opacity: 0.85; }

.ctl-link {
  background: none; border: none; cursor: pointer;
  font-size: 11px; font-weight: 500;
  color: var(--accent, #7bdcff);
  opacity: 0.85;
  transition: opacity 0.2s ease;
  padding: 0;
}
.ctl-link:hover { opacity: 1; }

/* Notifications list */
.ctl-notif-list {
  max-height: 150px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ctl-empty {
  font-size: 12px;
  color: var(--text-muted, #a8b9d4);
  opacity: 0.6;
  text-align: center;
  padding: 10px 0 4px;
}

/* ── Radio ────────────────────────────────────────────────── */
.ctl-radio-now {
  display: flex;
  align-items: center;
  gap: 13px;
}

/* Spinning vinyl disc */
.ctl-vinyl {
  position: relative;
  width: 46px; height: 46px;
  flex-shrink: 0;
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle at center,
      #0a0e17 0, #0a0e17 1px,
      #12182a 1px, #12182a 2px);
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow:
    0 4px 12px rgba(0,0,0,0.5),
    inset 0 0 0 1px rgba(0,0,0,0.4);
  overflow: hidden;
}
.ctl-vinyl-sheen {
  position: absolute; inset: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255,255,255,0.22), transparent 45%, transparent 60%, rgba(255,255,255,0.07));
  pointer-events: none;
}
.ctl-vinyl-label {
  position: absolute; top: 50%; left: 50%;
  width: 18px; height: 18px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: linear-gradient(140deg, var(--accent, #7bdcff), var(--accent-2, #8de6d6));
  box-shadow: 0 0 8px color-mix(in srgb, var(--accent, #7bdcff) 50%, transparent);
}
.ctl-vinyl-hole {
  position: absolute; top: 50%; left: 50%;
  width: 4px; height: 4px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #0a0e17;
  z-index: 1;
}
.ctl-radio.is-playing .ctl-vinyl { animation: ctlSpin 3.2s linear infinite; }
@keyframes ctlSpin { to { transform: rotate(360deg); } }

.ctl-radio-meta { flex: 1; min-width: 0; }
.ctl-radio-title {
  font-family: var(--font-display, "Sora", sans-serif);
  font-size: 14px; font-weight: 600;
  color: var(--text, #eef3ff);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ctl-radio-sub {
  font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-muted, #a8b9d4); margin-top: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Browse drawer */
.ctl-radio-browse { margin-top: 12px; }
.ctl-radio-search {
  display: flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 10px;
  border-radius: 10px;
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-muted, #a8b9d4);
}
.ctl-radio-search:focus-within { border-color: color-mix(in srgb, var(--accent, #7bdcff) 40%, transparent); }
.ctl-radio-search svg { width: 15px; height: 15px; flex-shrink: 0; opacity: 0.8; }
.ctl-radio-search input {
  flex: 1; min-width: 0; background: none; border: none; outline: none;
  color: var(--text, #eef3ff); font-family: var(--font-sans, "Manrope", sans-serif); font-size: 12px;
}
.ctl-radio-search input::placeholder { color: color-mix(in srgb, var(--text-muted, #a8b9d4) 75%, transparent); }

.ctl-radio-list {
  margin-top: 8px;
  max-height: 160px;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 3px;
}
.ctl-station {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 8px;
  border-radius: 9px;
  cursor: pointer;
  border: 1px solid transparent;
  background: none;
  text-align: left;
  width: 100%;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.ctl-station:hover { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.08); }
.ctl-station.is-current { background: color-mix(in srgb, var(--accent, #7bdcff) 12%, transparent); border-color: color-mix(in srgb, var(--accent, #7bdcff) 30%, transparent); }
.ctl-station-flag { font-size: 14px; flex-shrink: 0; width: 18px; text-align: center; color: var(--accent, #7bdcff); }
.ctl-station-info { flex: 1; min-width: 0; }
.ctl-station-name {
  font-size: 12px; font-weight: 500; color: var(--text, #eef3ff);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ctl-station-country {
  font-size: 10px; color: var(--text-muted, #a8b9d4); opacity: 0.8;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ctl-radio-loading { font-size: 11px; color: var(--text-muted, #a8b9d4); opacity: 0.7; text-align: center; padding: 12px 0; }

/* Play button disabled state */
.ctl-play[disabled] { opacity: 0.4; cursor: default; pointer-events: none; }
.ctl-play .tb-icon-pause { display: none; }
.ctl-radio.is-playing .ctl-play .tb-icon-play { display: none; }
.ctl-radio.is-playing .ctl-play .tb-icon-pause { display: block; }

.ctl-play {
  width: 40px; height: 40px;
  flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: 50%;
  cursor: pointer;
  color: #04111c;
  border: none;
  background: linear-gradient(145deg, var(--accent, #7bdcff), var(--accent-2, #8de6d6));
  box-shadow:
    0 4px 14px color-mix(in srgb, var(--accent, #7bdcff) 40%, transparent),
    inset 0 1px 0 rgba(255,255,255,0.45);
  transition: transform 0.2s cubic-bezier(0.34,1.5,0.5,1), box-shadow 0.2s ease;
}
.ctl-play:hover {
  transform: scale(1.07);
  box-shadow: 0 6px 20px color-mix(in srgb, var(--accent, #7bdcff) 55%, transparent), inset 0 1px 0 rgba(255,255,255,0.5);
}
.ctl-play:active { transform: scale(0.94); }
.ctl-play svg { width: 17px; height: 17px; }

/* Volume */
.ctl-vol {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  color: var(--text-muted, #a8b9d4);
}
.ctl-vol svg { width: 15px; height: 15px; flex-shrink: 0; opacity: 0.8; }
.ctl-vol input[type="range"] {
  -webkit-appearance: none; appearance: none;
  flex: 1; height: 4px; border-radius: 999px;
  background: linear-gradient(to right,
    var(--accent, #7bdcff) 0%, var(--accent, #7bdcff) var(--vol, 60%),
    rgba(255,255,255,0.12) var(--vol, 60%), rgba(255,255,255,0.12) 100%);
  cursor: pointer;
}
.ctl-vol input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 13px; height: 13px; border-radius: 50%;
  background: #fff; cursor: pointer;
  box-shadow: 0 0 6px color-mix(in srgb, var(--accent, #7bdcff) 60%, transparent);
  transition: transform 0.15s ease;
}
.ctl-vol input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.2); }
.ctl-vol input[type="range"]::-moz-range-thumb {
  width: 13px; height: 13px; border: none; border-radius: 50%; background: #fff; cursor: pointer;
  box-shadow: 0 0 6px color-mix(in srgb, var(--accent, #7bdcff) 60%, transparent);
}

/* ── Sound row + switch ───────────────────────────────────── */
.ctl-sound-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ctl-sound-row .tb-wave { transform-origin: left center; opacity: 0.85; }
.ctl-sound-row.is-muted .tb-wave { display: none; }
.ctl-switch.is-active .tb-wave-1 { animation: ctlWave 1.4s ease-in-out infinite; }
.ctl-switch.is-active .tb-wave-2 { animation: ctlWave 1.4s ease-in-out infinite 0.2s; }
@keyframes ctlWave { 0%,100%{opacity:.4} 50%{opacity:1} }

.ctl-switch {
  position: relative;
  width: 44px; height: 24px;
  flex-shrink: 0;
  border-radius: 999px;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.06);
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.ctl-switch-knob {
  position: absolute;
  top: 50%; left: 3px;
  width: 18px; height: 18px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: var(--text-muted, #a8b9d4);
  box-shadow: 0 1px 3px rgba(0,0,0,0.4);
  transition: left 0.26s cubic-bezier(0.34,1.5,0.5,1), background 0.25s ease;
}
.ctl-switch.is-active {
  background: linear-gradient(135deg, var(--accent, #7bdcff), var(--accent-2, #8de6d6));
  border-color: color-mix(in srgb, var(--accent, #7bdcff) 55%, transparent);
  box-shadow: 0 0 14px color-mix(in srgb, var(--accent, #7bdcff) 32%, transparent);
}
.ctl-switch.is-active .ctl-switch-knob {
  left: 23px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.ctl-switch:focus-visible { outline: 2px solid var(--accent, #7bdcff); outline-offset: 2px; }

/* ── Reduced motion ───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .ctl-radio.is-playing .ctl-vinyl,
  .ctl-switch.is-active .tb-wave-1,
  .ctl-switch.is-active .tb-wave-2 { animation: none !important; }
}

/* ── Mobile ───────────────────────────────────────────────── */
@media (max-width: 480px) {
  /* Pin to the viewport (not the trigger) so a near-full-width panel can't run
     off the left edge — the Controls trigger sits mid-topbar, so anchoring the
     panel to its right pushed ~140px of the panel off-screen on phones. */
  .ctl-panel {
    position: fixed;
    top: 64px;
    left: 12px;
    right: 12px;
    width: auto;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
  }
  /* On narrow phones the brand wordmark needs to fit on one line — hide the
     "Controls" text label and tighten the pill so the icon stays as a luxe
     touch target without crowding the brand. */
  .ctl-trigger-label { display: none; }
  .ctl-trigger {
    padding-left: 10px;
    padding-right: 10px;
    min-width: 38px;
    justify-content: center;
  }
}


/* === notifications.css === */
/* ============================================
   Cyno.gg Notifications - Luxury Modern Styles
   ============================================ */

:root {
  --notif-primary: var(--accent, #7bdcff);
  --notif-secondary: var(--accent-2, #8de6d6);
  --notif-success: var(--status-success, #10b981);
  --notif-warning: var(--status-warning, #f59e0b);
  --notif-danger: var(--status-danger, #ef4444);
  --notif-info: #3b82f6;
  --notif-bg: var(--bg-0, #0f0f1a);
  --notif-glass: color-mix(in srgb, var(--glass-bg, rgba(30, 30, 50, 0.6)) 60%, transparent);
  --notif-border: var(--glass-border, rgba(255, 255, 255, 0.1));
  --notif-text: var(--text, #e2e8f0);
  --notif-muted: var(--text-muted, #94a3b8);
  --notif-transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                       background-color 0.3s ease,
                       border-color 0.3s ease;
}

/* (Removed dead .notifications-shell rule — the page uses .product-shell; the
   old opaque diagonal slab here never applied and didn't match the unified bg.) */

/* Hero */
.notif-header {
  padding: 24px 32px;
  border-bottom: 1px solid var(--notif-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.notif-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0;
  background: linear-gradient(135deg, var(--notif-text) 0%, var(--notif-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.notif-header-actions {
  display: flex;
  gap: 12px;
}

/* Tab Navigation */
.tab-nav {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--notif-border);
  margin-bottom: 0;
  padding: 0 32px;
  background: rgba(0, 0, 0, 0.2);
}

.tab-btn {
  background: none;
  border: none;
  padding: 14px 20px;
  color: var(--notif-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--notif-transition);
}

.tab-btn:hover {
  color: var(--notif-text);
}

.tab-btn.active {
  color: var(--notif-primary);
  border-bottom-color: var(--notif-primary);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  /* breathing room so the search/toolbar doesn't touch the Inbox tab bar above */
  padding-top: 20px;
}

/* Filters */
.notif-filters {
  display: flex;
  gap: 8px;
  padding: 16px 32px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--notif-border);
}

.notif-filter-btn {
  padding: 6px 14px;
  border-radius: var(--radius-sm, 8px);
  border: 1px solid var(--notif-border);
  background: var(--notif-glass);
  color: var(--notif-muted);
  cursor: pointer;
  font-size: 0.85rem;
  transition: var(--notif-transition);
}

.notif-filter-btn:hover {
  border-color: var(--notif-primary);
  color: var(--notif-text);
}

.notif-filter-btn.active {
  background: var(--notif-primary);
  border-color: var(--notif-primary);
  color: white;
}

/* Notification List */
.notif-list {
  padding: 0;
}

.notif-item {
  display: flex;
  gap: 16px;
  padding: 20px 32px;
  border-bottom: 1px solid var(--notif-border);
  transition: var(--notif-transition);
  cursor: pointer;
  position: relative;
}

.notif-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--notif-primary), var(--notif-secondary));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.notif-item:hover {
  background: rgba(123, 220, 255, 0.05);
}

.notif-item:hover::before {
  opacity: 1;
}

.notif-item.unread {
  background: rgba(123, 220, 255, 0.08);
}

.notif-item.unread::before {
  opacity: 1;
}

.notif-item.unread .notif-title {
  color: var(--notif-text);
  font-weight: 700;
}

/* Notification Icon */
.notif-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md, 12px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.notif-icon.transactional { background: linear-gradient(135deg, rgba(34, 197, 94, 0.3), rgba(34, 197, 94, 0.1)); }
.notif-icon.support { background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(59, 130, 246, 0.1)); }
.notif-icon.engagement { background: linear-gradient(135deg, rgba(123, 220, 255, 0.3), rgba(141, 230, 214, 0.1)); }
.notif-icon.rewards { background: linear-gradient(135deg, rgba(251, 191, 36, 0.3), rgba(251, 191, 36, 0.1)); }
.notif-icon.system { background: linear-gradient(135deg, rgba(239, 68, 68, 0.3), rgba(239, 68, 68, 0.1)); }
.notif-icon.account { background: linear-gradient(135deg, rgba(20, 184, 166, 0.3), rgba(20, 184, 166, 0.1)); }
.notif-icon.social { background: linear-gradient(135deg, rgba(141, 230, 214, 0.3), rgba(141, 230, 214, 0.1)); }
.notif-icon.reminder { background: linear-gradient(135deg, rgba(251, 146, 60, 0.3), rgba(251, 146, 60, 0.1)); }
.notif-icon.marketplace { background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(99, 102, 241, 0.1)); }

/* Notification Content */
.notif-content {
  flex: 1;
  min-width: 0;
}

.notif-title {
  font-weight: 600;
  color: var(--notif-text);
  margin-bottom: 8px;
}

.notif-message {
  color: var(--notif-muted);
  font-size: 0.9rem;
  margin-bottom: 8px;
  line-height: 1.5;
}

.notif-time {
  font-size: 0.75rem;
  color: var(--notif-muted);
  opacity: 0.7;
}

/* Notification Actions */
.notif-actions {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  flex-shrink: 0;
}

.notif-btn {
  background: var(--notif-glass);
  border: 1px solid var(--notif-border);
  color: var(--notif-muted);
  cursor: pointer;
  padding: 6px 10px;
  border-radius: var(--radius-sm, 8px);
  font-size: 0.8rem;
  transition: var(--notif-transition);
}

.notif-btn:hover {
  background: rgba(123, 220, 255, 0.1);
  border-color: var(--notif-primary);
  color: var(--notif-text);
}

/* Preferences Section */
.pref-section {
  padding: 24px 32px;
}

.pref-group {
  margin-bottom: 32px;
}

.pref-group h3 {
  color: var(--notif-text);
  margin-bottom: 16px;
  font-size: 1.1rem;
  font-weight: 600;
}

.pref-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--notif-border);
}

.pref-label {
  color: var(--notif-text);
  font-size: 0.95rem;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  width: 48px;
  height: 26px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 13px;
  cursor: pointer;
  transition: var(--notif-transition);
}

.toggle-switch.active {
  background: linear-gradient(135deg, var(--notif-primary), var(--notif-secondary));
}

.toggle-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch.active::after {
  transform: translateX(22px);
}

/* Push Status */
.push-status {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--notif-glass);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-md, 12px);
  border: 1px solid var(--notif-border);
  margin-bottom: 24px;
}

.push-status .status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.push-status .status-dot.enabled {
  background: var(--notif-success);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

.push-status .status-dot.disabled {
  background: var(--notif-danger);
}

/* Empty State */
.empty-notifs {
  text-align: center;
  padding: 60px 20px;
  color: var(--notif-muted);
}


.empty-notifs p {
  font-size: 0.9rem;
  max-width: 300px;
  margin: 0 auto;
}

/* Responsive */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 768px) {
  .notif-header {
    padding: 16px;
  }

  .tab-nav {
    padding: 0 16px;
  }

  .notif-filters {
    padding: 12px 16px;
  }

  .notif-item {
    padding: 16px;
    gap: 12px;
  }

  .notif-icon {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }

  .notif-actions {
    flex-direction: column;
  }

  .pref-section {
    padding: 16px;
  }
}

/* ============================================================
   Notifications — inbox toolbar (search + type filter) and
   delivery settings (added)
   ============================================================ */
.notif-toolbar {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  margin-bottom: 14px;
}
.notif-search {
  position: relative; flex: 1 1 240px; min-width: 200px;
  display: flex; align-items: center;
}
.notif-search svg {
  position: absolute; left: 12px; width: 16px; height: 16px;
  color: var(--text-muted, #9fb1cc); pointer-events: none;
}
.notif-search input {
  width: 100%;
  padding: 10px 12px 10px 36px;
  font-size: 13.5px; color: var(--text, #eef3ff);
  background: color-mix(in srgb, var(--glass-bg, rgba(20,30,52,0.6)) 88%, transparent);
  border: 1px solid color-mix(in srgb, var(--glass-border) 55%, transparent);
  border-radius: 11px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.notif-search input::placeholder { color: var(--text-muted, #9fb1cc); }
.notif-search input:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--accent) 60%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}
.notif-toolbar .pref-select { min-width: 150px; }

.notif-pref-heading {
  margin: 0 0 10px; font-size: 15px; font-weight: 700; color: var(--text, #eef3ff);
}
.mt-24 { margin-top: 24px; }

.notif-quiet-inputs { display: flex; align-items: center; gap: 8px; }
.notif-quiet-sep { color: var(--text-muted, #9fb1cc); }
.pref-time {
  padding: 7px 10px; font-size: 13px; color: var(--text, #eef3ff);
  background: color-mix(in srgb, var(--glass-bg, rgba(20,30,52,0.6)) 88%, transparent);
  border: 1px solid color-mix(in srgb, var(--glass-border) 55%, transparent);
  border-radius: 9px;
}
.pref-time::-webkit-calendar-picker-indicator { filter: invert(0.8); cursor: pointer; }
.pref-time:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--accent) 60%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}

@media (max-width: 520px) {
  .notif-toolbar { flex-direction: column; align-items: stretch; }
  .notif-toolbar .pref-select { width: 100%; }
}

/* === footer.css === */
/* ═══════════════════════════════════════════════════════════════
   CYNO.GG — Footer Component
   ═══════════════════════════════════════════════════════════════ */

.site-footer {
  margin-top: auto;
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.8125rem;
  border-top: 1px solid var(--glass-border);
  background: var(--glass-bg-strong);
  backdrop-filter: blur(var(--blur-sm));
  -webkit-backdrop-filter: blur(var(--blur-sm));
  contain: layout style paint;
}

.site-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-copyright {
  color: var(--muted);
  font-size: 0.75rem;
}

.footer-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-status .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--status-success);
}

@media (max-width: 720px) {
  .site-footer {
    padding: 1.5rem 1rem;
  }

  .footer-links {
    gap: 1rem;
    flex-direction: column;
    align-items: center;
  }
}


/* === responsive.css === */
@media (max-width: 1380px) {
  .catalog-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .dashboard-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .status-hero {
    grid-template-columns: 1fr;
  }

  .status-summary {
    justify-content: flex-start;
  }

  .dashboard-grid,
  .landing-grid,
  .admin-grid,
  .messages-grid,
  .tickets-grid,
  .profile-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-chat-panel {
    grid-column: auto;
  }
}

@media (max-width: 980px) {
  .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .catalog-hero {
    grid-template-columns: 1fr;
  }

  .catalog-hero-actions {
    width: 100%;
    justify-items: stretch;
  }

  .landing-hero {
    grid-template-columns: 1fr;
  }

  .dashboard-hero-actions,
  .messages-hero-actions,
  .profile-hero-actions,
  .catalog-filters,
  .status-summary {
    justify-content: flex-start;
  }

  .product-grid,
  .specs-grid,
  .sync-grid,
  .status-board,
  .purchase-grid {
    grid-template-columns: 1fr;
  }

  .product-hero-main {
    max-width: none;
  }

  .status-controls {
    grid-template-columns: 1fr;
  }

  .catalog-card {
    min-height: auto;
  }

  .landing-preview-3d {
    padding: 16px;
  }

  .preview-3d-box {
    max-width: 180px;
  }
}

@media (max-width: 720px) {
  .page-shell {
    padding: 24px 16px 48px;
  }

  .catalog-grid,
  .pricing-grid,
  .showcase-screen-grid {
    grid-template-columns: 1fr;
  }

  .landing-grid {
    grid-template-columns: 1fr;
  }

  .catalog-hero,
  .dashboard-hero,
  .messages-hero,
  .profile-hero,
  .product-hero,
  .status-hero {
    padding: 22px 18px;
  }

  .dashboard-metrics,
  .dashboard-split {
    grid-template-columns: 1fr;
  }

  .dashboard-chat-input {
    flex-wrap: wrap;
    border-radius: var(--radius-md);
    padding: 10px;
  }

  .dashboard-chat-input .btn {
    width: 100%;
    justify-content: center;
  }

  .chat-meta .metric-label {
    margin-left: 0;
    width: 100%;
  }

  .catalog-search {
    flex-direction: column;
    align-items: stretch;
  }

  .catalog-search input,
  .catalog-search .btn {
    width: 100%;
  }

  .status-row {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

  .status-actions {
    justify-content: flex-start;
  }

  .summary-item {
    min-width: calc(50% - 9px);
    flex: 1 1 140px;
  }

  .message-item,
  .ticket-item,
  .profile-row {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .showcase-character {
    width: min(100%, 340px);
    margin: 0 auto;
  }

  .product-hero-card {
    width: 100%;
  }

  .landing-particles {
    display: none;
  }

  :root {
    --blur-xl: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .find-toggle.is-loading .find-icon {
    animation: none;
  }

  .find-label {
    transition: none;
  }

  .status-dot--live,
  .status-dot--warning,
  .status-dot--danger {
    animation: none !important;
  }

  .landing-feature,
  .invite-card,
  .preview-3d-box,
  .store-3d-card {
    animation: none !important;
  }

  .stagger-in > * {
    animation: none !important;
    opacity: 1;
  }
}

/* Touch-friendly tap targets for accessibility */
@media (pointer: coarse) {
  .btn,
  .btn-chip,
  .btn-ghost,
  .btn-primary,
  .topbar-menu-toggle,
  .icon-toggle-pill,
  .sound-toggle,
  .toggle,
  .toggle-slider,
  a.btn,
  [role="button"] {
    min-height: 44px;
    min-width: 44px;
  }

  .btn-success,
  .btn-warning,
  .btn-danger,
  .btn-luxury,
  .btn-gradient-border,
  .btn-icon-only,
  .icon-toggle-pill__btn {
    min-height: 44px;
    min-width: 44px;
  }

  .icon-toggle-pill__btn {
    padding: 4px;
  }

  .top-nav a {
    padding: 12px 16px;
  }

  .catalog-search button,
  .catalog-sort select,
  .admin-list-actions button,
  .pagination button,
  .status-pill {
    min-height: 44px;
  }

  input[type="checkbox"],
  input[type="radio"],
  input[type="range"]::-webkit-slider-thumb {
    min-width: 44px;
    min-height: 44px;
  }

  table button,
  .admin-actions button {
    min-height: 44px;
  }

  /* Mobile modals: full-screen on phones */
  .modal-overlay:not([hidden]) .modal-content,
  [data-admin-modal-overlay]:not([hidden]) [data-admin-modal],
  [data-ticket-modal-overlay]:not([hidden]) [data-ticket-modal] {
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    margin: 0;
  }

  .modal-body,
  [data-admin-modal-body],
  [data-ticket-modal-body] {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Safe area insets for notched devices */
  .topbar {
    padding-top: max(12px, env(safe-area-inset-top, 0px));
  }

  .modal-content {
    padding-bottom: max(16px, env(safe-area-inset-bottom, 0px));
  }
}

/* ============================================================================
   ULTRAWIDE MONITOR SUPPORT (1440px+)
   ============================================================================ */

@media (min-width: 1440px) {
  /* Expand containers for ultrawide screens */
  .page-shell {
    max-width: 1440px;
    width: min(calc(100% - 80px), 1440px);
    padding: 40px 32px 80px;
  }

  .topbar {
    width: min(calc(100% - 80px), 1440px);
    padding: 16px 28px;
    gap: 28px;
  }

  /* Status page gets wider on ultrawide */
  body[data-page="status"] .topbar {
    max-width: 1600px;
  }

  /* Landing page stays constrained for readability */
  body[data-page="landing"] .page-shell,
  body[data-page="landing"] .topbar {
    max-width: 1260px;
    width: min(calc(100% - 44px), 1260px);
  }

  /* Larger text on big screens */
  .gradient-title {
    font-size: clamp(36px, 2.5vw, 48px);
  }

  /* Expand grids for more space */
  .catalog-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .dashboard-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ============================================================================
   EXTRA-LARGE SCREENS (1920px+)
   ============================================================================ */

@media (min-width: 1920px) {
  .page-shell {
    max-width: 1600px;
    width: min(calc(100% - 120px), 1600px);
    padding: 48px 40px 96px;
  }

  .topbar {
    width: min(calc(100% - 120px), 1600px);
    padding: 18px 32px;
    gap: 32px;
  }

  body[data-page="status"] .topbar {
    max-width: 1800px;
  }

  body[data-page="landing"] .page-shell,
  body[data-page="landing"] .topbar {
    max-width: 1400px;
    width: min(calc(100% - 80px), 1400px);
  }

  .gradient-title {
    font-size: clamp(42px, 3vw, 56px);
  }

  .catalog-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

/* ============================================================================
   ULTRAWIDE+ MONITORS (2560px+)
   ============================================================================ */

@media (min-width: 2560px) {
  .page-shell {
    max-width: 1920px;
    width: min(calc(100% - 200px), 1920px);
    padding: 56px 48px 120px;
  }

  .topbar {
    width: min(calc(100% - 200px), 1920px);
    padding: 20px 40px;
    gap: 40px;
  }

  body[data-page="landing"] .page-shell,
  body[data-page="landing"] .topbar {
    max-width: 1600px;
    width: min(calc(100% - 120px), 1600px);
  }

  html {
    font-size: 18px; /* Scale up base font size */
  }

  .catalog-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

/* ============================================================================
   PERFECT ALIGNMENT FIXES
   ============================================================================ */

/* Ensure topbar and page-shell always align */
@media (min-width: 1180px) and (max-width: 1439px) {
  .page-shell,
  .topbar {
    width: min(calc(100% - 36px), 1380px);
  }

  body[data-page="landing"] .page-shell,
  body[data-page="landing"] .topbar {
    width: min(calc(100% - 44px), 1260px);
  }
}

/* Tablet alignment (981px - 1179px) */
@media (min-width: 981px) and (max-width: 1179px) {
  .page-shell,
  .topbar {
    width: min(calc(100% - 44px), 1260px);
    padding-left: 22px;
    padding-right: 22px;
  }
}

/* Ensure no horizontal scroll on any screen size */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

@media (max-width: 640px) {
  .metric-label,
  .field label,
  .caption,
  .text-muted,
  .eyebrow {
    font-size: var(--fs-xs);
  }
}

@media (max-width: 480px) {
  body {
    font-size: var(--fs-base);
  }
  .glass-panel {
    padding: 12px;
  }
  .panel-body {
    padding: 12px;
  }
  h1 { font-size: var(--fs-2xl); }
  h2 { font-size: var(--fs-xl); }
  h3 { font-size: var(--fs-lg); }
}

/* ============================================================================
   SLOW CONNECTION ADAPTATIONS
   Applied when navigator.connection.effectiveType is 2g or slow-2g.
   Disables expensive rendering features to improve performance on slow networks.
   ============================================================================ */

html.is-slow-connection .glass-panel,
html.is-slow-connection .glass-card,
html.is-slow-connection .glass-nav,
html.is-slow-connection .glass-modal,
html.is-slow-connection .glass-input,
html.is-slow-connection .topbar {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

html.is-slow-connection .landing-particles {
  display: none !important;
}

html.is-slow-connection .body-bg::before,
html.is-slow-connection .body-bg::after {
  animation: none !important;
  background: var(--bg-0);
}

html.is-slow-connection .glass-panel::after,
html.is-slow-connection .catalog-card::after,
html.is-slow-connection .game-card::after {
  animation: none !important;
  display: none;
}

html.is-slow-connection .btn::before,
html.is-slow-connection .btn-primary::after {
  display: none;
}

html.is-mid-connection .glass-panel,
html.is-mid-connection .glass-card,
html.is-mid-connection .glass-nav {
  backdrop-filter: blur(12px) saturate(120%) !important;
  -webkit-backdrop-filter: blur(12px) saturate(120%) !important;
}

/* ── 4K / large-display tier (TV from couch distance) ── */
@media (min-width: 3840px) {
  .page-shell, .topbar { max-width: 2560px; width: min(calc(100% - 280px), 2560px); }
  body[data-page="landing"] .page-shell,
  body[data-page="landing"] .topbar { max-width: 2000px; width: min(calc(100% - 200px), 2000px); }
  .catalog-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
}

/* ── TV / large-screen focus: thicker, room-visible focus rings ── */
@media (min-width: 1920px) {
  :focus-visible { outline-width: 3px; outline-offset: 3px; }
  .top-nav a:focus-visible { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 70%, transparent); }
  button:focus-visible, a:focus-visible, [role="button"]:focus-visible,
  [tabindex]:focus-visible { box-shadow: 0 0 0 6px rgba(123, 220, 255, 0.3); }
}

/* ── Tablet: give 3-col product/spec grids a 2-col step (instead of 3->1) ── */
@media (min-width: 721px) and (max-width: 980px) {
  .specs-grid, .sync-grid, .showcase-screen-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* === mobile-first.css === */
/* ============================================================
   CYNO.GG — Mobile-First Base Styles
   ============================================================
   This file sets mobile (<=720px) as the baseline.
   Desktop enhancements are applied via min-width queries.
   Works alongside responsive.css (max-width queries) as fallback.
   ============================================================ */

/* ── Mobile baseline (applies to all screens by default) ── */

.page-shell {
  padding: 24px 16px 48px;
}

.glass-panel {
  padding: 16px;
}

.panel-body {
  padding: 16px;
}

.catalog-hero,
.dashboard-hero,
.messages-hero,
.profile-hero,
.product-hero,
.status-hero {
  padding: 22px 18px;
}

/* Stack all grids on mobile */
.catalog-grid,
.pricing-grid,
.showcase-screen-grid {
  grid-template-columns: 1fr;
}

.dashboard-metrics,
.dashboard-split {
  grid-template-columns: 1fr;
}

.dashboard-grid,
.landing-grid,
.admin-grid,
.messages-grid,
.tickets-grid,
.profile-grid {
  grid-template-columns: 1fr;
}

.product-grid,
.specs-grid,
.sync-grid,
.status-board,
.purchase-grid {
  grid-template-columns: 1fr;
}

/* Full-width inputs and buttons on mobile */
.dashboard-chat-input {
  flex-wrap: wrap;
  border-radius: var(--radius-md);
  padding: 10px;
}

.dashboard-chat-input .btn {
  width: 100%;
  justify-content: center;
}

.catalog-search {
  flex-direction: column;
  align-items: stretch;
}

.catalog-search input,
.catalog-search .btn {
  width: 100%;
}

.status-row {
  grid-template-columns: 1fr;
  align-items: flex-start;
}

.message-item,
.ticket-item,
.profile-row {
  flex-wrap: wrap;
  align-items: flex-start;
}

/* Hide particles on mobile for performance */
.landing-particles {
  display: none;
}

/* Reduce blur on mobile */
:root {
  --blur-xl: 20px;
}

/* Catalog cards don't need minimum height on mobile */
.catalog-card {
  min-height: auto;
}

/* 3D preview smaller on mobile */
.landing-preview-3d {
  padding: 16px;
}

.preview-3d-box {
  max-width: 180px;
}

/* Summary items on mobile */
.summary-item {
  min-width: calc(50% - 9px);
  flex: 1 1 140px;
}

/* ── Tablet and up (>=721px) ── */
@media (min-width: 721px) {
  .page-shell {
    padding: 32px 24px 64px;
  }

  .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* Pricing tiers should sit side-by-side on tablet+. The mobile-first base
     rule stacked them at 1fr; without this restore, the pricing page rendered
     each tier as a full-width card on desktop too. */
  .pricing-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }

  .landing-particles {
    display: block;
  }

  :root {
    --blur-xl: 40px;
  }
}

/* ── Desktop and up (>=981px) ── */
@media (min-width: 981px) {
  .page-shell {
    padding: 40px 32px 80px;
  }

  .catalog-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dashboard-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-grid,
  .landing-grid,
  .admin-grid,
  .messages-grid,
  .tickets-grid,
  .profile-grid {
    /* Let page-specific CSS control grid columns on desktop */
  }

  .catalog-hero,
  .dashboard-hero,
  .messages-hero,
  .profile-hero,
  .product-hero,
  .status-hero {
    padding: 32px 28px;
  }

  .catalog-search {
    flex-direction: row;
    align-items: center;
  }

  .catalog-search input,
  .catalog-search .btn {
    width: auto;
  }

  .dashboard-chat-input {
    flex-wrap: nowrap;
    padding: 14px;
  }

  .dashboard-chat-input .btn {
    width: auto;
    justify-content: center;
  }

  .message-item,
  .ticket-item,
  .profile-row {
    flex-wrap: nowrap;
    align-items: center;
  }

  .summary-item {
    min-width: auto;
    flex: none;
  }

  .product-grid,
  .specs-grid,
  .sync-grid,
  .status-board,
  .purchase-grid {
    /* Reset to page-specific layouts */
  }

  .catalog-card {
    /* Restore min-height from page CSS */
  }

  .landing-preview-3d {
    padding: 24px;
  }

  .preview-3d-box {
    max-width: none;
  }
}

/* ── Small desktop (>=1101px) ── */
@media (min-width: 1101px) {
  .dashboard-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ── Large desktop (>=1381px) ── */
@media (min-width: 1381px) {
  .catalog-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
